bw-frontend-sdk 1.2.8 → 1.2.71
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 +40 -1
- package/dist/index.esm.js +2 -2
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/index.umd.js +2 -2
- package/dist/index.umd.js.map +1 -1
- package/package.json +2 -2
package/dist/index.umd.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
!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).FrontendSDK={})}(this,function(e){"use strict";function t(e,t){this.v=e,this.k=t}function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function n(e){if(Array.isArray(e))return e}function i(e){var r={},n=!1;function i(r,i){return n=!0,i=new Promise(function(t){t(e[r](i))}),{done:!1,value:new t(i,1)}}return r["undefined"!=typeof Symbol&&Symbol.iterator||"@@iterator"]=function(){return this},r.next=function(e){return n?(n=!1,e):i("next",e)},"function"==typeof e.throw&&(r.throw=function(e){if(n)throw n=!1,e;return i("throw",e)}),"function"==typeof e.return&&(r.return=function(e){return n?(n=!1,e):i("return",e)}),r}function o(e){var t,r,n,i=2;for("undefined"!=typeof Symbol&&(r=Symbol.asyncIterator,n=Symbol.iterator);i--;){if(r&&null!=(t=e[r]))return t.call(e);if(n&&null!=(t=e[n]))return new a(t.call(e));r="@@asyncIterator",n="@@iterator"}throw new TypeError("Object is not async iterable")}function a(e){function t(e){if(Object(e)!==e)return Promise.reject(new TypeError(e+" is not an object."));var t=e.done;return Promise.resolve(e.value).then(function(e){return{value:e,done:t}})}return a=function(e){this.s=e,this.n=e.next},a.prototype={s:null,n:null,next:function(){return t(this.n.apply(this.s,arguments))},return:function(e){var r=this.s.return;return void 0===r?Promise.resolve({value:e,done:!0}):t(r.apply(this.s,arguments))},throw:function(e){var r=this.s.return;return void 0===r?Promise.reject(e):t(r.apply(this.s,arguments))}},new a(e)}function s(e,t,r,n,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,i)}function u(e){return function(){var t=this,r=arguments;return new Promise(function(n,i){var o=e.apply(t,r);function a(e){s(o,n,i,a,u,"next",e)}function u(e){s(o,n,i,a,u,"throw",e)}a(void 0)})}}function c(e){return new t(e,0)}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,E(n.key),n)}}function h(e,t,r){return t&&f(e.prototype,t),r&&f(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function d(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=
|
|
1
|
+
!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).FrontendSDK={})}(this,function(e){"use strict";function t(e,t){this.v=e,this.k=t}function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function n(e){if(Array.isArray(e))return e}function i(e){var r={},n=!1;function i(r,i){return n=!0,i=new Promise(function(t){t(e[r](i))}),{done:!1,value:new t(i,1)}}return r["undefined"!=typeof Symbol&&Symbol.iterator||"@@iterator"]=function(){return this},r.next=function(e){return n?(n=!1,e):i("next",e)},"function"==typeof e.throw&&(r.throw=function(e){if(n)throw n=!1,e;return i("throw",e)}),"function"==typeof e.return&&(r.return=function(e){return n?(n=!1,e):i("return",e)}),r}function o(e){var t,r,n,i=2;for("undefined"!=typeof Symbol&&(r=Symbol.asyncIterator,n=Symbol.iterator);i--;){if(r&&null!=(t=e[r]))return t.call(e);if(n&&null!=(t=e[n]))return new a(t.call(e));r="@@asyncIterator",n="@@iterator"}throw new TypeError("Object is not async iterable")}function a(e){function t(e){if(Object(e)!==e)return Promise.reject(new TypeError(e+" is not an object."));var t=e.done;return Promise.resolve(e.value).then(function(e){return{value:e,done:t}})}return a=function(e){this.s=e,this.n=e.next},a.prototype={s:null,n:null,next:function(){return t(this.n.apply(this.s,arguments))},return:function(e){var r=this.s.return;return void 0===r?Promise.resolve({value:e,done:!0}):t(r.apply(this.s,arguments))},throw:function(e){var r=this.s.return;return void 0===r?Promise.reject(e):t(r.apply(this.s,arguments))}},new a(e)}function s(e,t,r,n,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,i)}function u(e){return function(){var t=this,r=arguments;return new Promise(function(n,i){var o=e.apply(t,r);function a(e){s(o,n,i,a,u,"next",e)}function u(e){s(o,n,i,a,u,"throw",e)}a(void 0)})}}function c(e){return new t(e,0)}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,E(n.key),n)}}function h(e,t,r){return t&&f(e.prototype,t),r&&f(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function d(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=P(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw o}}}}function p(e,t,r){return(t=E(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function g(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function v(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function m(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function w(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?m(Object(r),!0).forEach(function(t){p(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):m(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function y(){
|
|
2
2
|
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */
|
|
3
|
-
var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",i=r.toStringTag||"@@toStringTag";function o(r,n,i,o){var u=n&&n.prototype instanceof s?n:s,c=Object.create(u.prototype);return b(c,"_invoke",function(r,n,i){var o,s,u,c=0,l=i||[],f=!1,h={p:0,n:0,v:e,a:d,f:d.bind(e,4),d:function(t,r){return o=t,s=0,u=e,h.n=r,a}};function d(r,n){for(s=r,u=n,t=0;!f&&c&&!i&&t<l.length;t++){var i,o=l[t],d=h.p,p=o[2];r>3?(i=p===n)&&(u=o[(s=o[4])?5:(s=3,3)],o[4]=o[5]=e):o[0]<=d&&((i=r<2&&d<o[1])?(s=0,h.v=n,h.n=o[1]):d<p&&(i=r<3||o[0]>n||n>p)&&(o[4]=r,o[5]=n,h.n=p,s=0))}if(i||r>1)return a;throw f=!0,n}return function(i,l,p){if(c>1)throw TypeError("Generator is already running");for(f&&1===l&&d(l,p),s=l,u=p;(t=s<2?e:u)||!f;){o||(s?s<3?(s>1&&(h.n=-1),d(s,u)):h.n=u:h.v=u);try{if(c=2,o){if(s||(i="next"),t=o[i]){if(!(t=t.call(o,u)))throw TypeError("iterator result is not an object");if(!t.done)return t;u=t.value,s<2&&(s=0)}else 1===s&&(t=o.return)&&t.call(o),s<2&&(u=TypeError("The iterator does not provide a '"+i+"' method"),s=1);o=e}else if((t=(f=h.n<0)?u:r.call(n,h))!==a)break}catch(t){o=e,s=1,u=t}finally{c=1}}return{value:t,done:f}}}(r,i,o),!0),c}var a={};function s(){}function u(){}function c(){}t=Object.getPrototypeOf;var l=[][n]?t(t([][n]())):(b(t={},n,function(){return this}),t),f=c.prototype=s.prototype=Object.create(l);function h(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,b(e,i,"GeneratorFunction")),e.prototype=Object.create(f),e}return u.prototype=c,b(f,"constructor",c),b(c,"constructor",u),u.displayName="GeneratorFunction",b(c,i,"GeneratorFunction"),b(f),b(f,i,"Generator"),b(f,n,function(){return this}),b(f,"toString",function(){return"[object Generator]"}),(y=function(){return{w:o,m:h}})()}function b(e,t,r,n){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}b=function(e,t,r,n){function o(t,r){b(e,t,function(e){return this._invoke(t,r,e)})}t?i?i(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r:(o("next",0),o("throw",1),o("return",2))},b(e,t,r,n)}function k(e){if(null!=e){var t=e["function"==typeof Symbol&&Symbol.iterator||"@@iterator"],r=0;if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}}}throw new TypeError(typeof e+" is not iterable")}function T(e,t){return n(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,o,a,s=[],u=!0,c=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=o.call(r)).done)&&(s.push(n.value),s.length!==t);u=!0);}catch(e){c=!0,i=e}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(e,t)||R(e,t)||v()}function S(e){return function(e){if(Array.isArray(e))return r(e)}(e)||g(e)||R(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function E(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}function P(e){return P="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},P(e)}function R(e,t){if(e){if("string"==typeof e)return r(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}function x(e){return function(){return new C(e.apply(this,arguments))}}function C(e){var r,n;function i(r,n){try{var a=e[r](n),s=a.value,u=s instanceof t;Promise.resolve(u?s.v:s).then(function(t){if(u){var n="return"===r?"return":"next";if(!s.k||t.done)return i(n,t);t=e[n](t).value}o(a.done?"return":"normal",t)},function(e){i("throw",e)})}catch(e){o("throw",e)}}function o(e,t){switch(e){case"return":r.resolve({value:t,done:!0});break;case"throw":r.reject(t);break;default:r.resolve({value:t,done:!1})}(r=r.next)?i(r.key,r.arg):n=null}this._invoke=function(e,t){return new Promise(function(o,a){var s={key:e,arg:t,resolve:o,reject:a,next:null};n?n=n.next=s:(r=n=s,i(e,t))})},"function"!=typeof e.return&&(this.return=void 0)}function I(e,t){return function(){return e.apply(t,arguments)}}C.prototype["function"==typeof Symbol&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},C.prototype.next=function(e){return this._invoke("next",e)},C.prototype.throw=function(e){return this._invoke("throw",e)},C.prototype.return=function(e){return this._invoke("return",e)};var O,A=Object.prototype.toString,_=Object.getPrototypeOf,D=Symbol.iterator,N=Symbol.toStringTag,L=(O=Object.create(null),function(e){var t=A.call(e);return O[t]||(O[t]=t.slice(8,-1).toLowerCase())}),U=function(e){return e=e.toLowerCase(),function(t){return L(t)===e}},j=function(e){return function(t){return P(t)===e}},F=Array.isArray,B=j("undefined");function M(e){return null!==e&&!B(e)&&null!==e.constructor&&!B(e.constructor)&&H(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}var z=U("ArrayBuffer");var K=j("string"),H=j("function"),V=j("number"),q=function(e){return null!==e&&"object"===P(e)},Q=function(e){if("object"!==L(e))return!1;var t=_(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||N in e||D in e)},W=U("Date"),G=U("File"),J=U("Blob"),X=U("FileList"),$=U("URLSearchParams"),Y=T(["ReadableStream","Request","Response","Headers"].map(U),4),Z=Y[0],ee=Y[1],te=Y[2],re=Y[3];function ne(e,t){var r,n,i=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).allOwnKeys,o=void 0!==i&&i;if(null!=e)if("object"!==P(e)&&(e=[e]),F(e))for(r=0,n=e.length;r<n;r++)t.call(null,e[r],r,e);else{if(M(e))return;var a,s=o?Object.getOwnPropertyNames(e):Object.keys(e),u=s.length;for(r=0;r<u;r++)a=s[r],t.call(null,e[a],a,e)}}function ie(e,t){if(M(e))return null;t=t.toLowerCase();for(var r,n=Object.keys(e),i=n.length;i-- >0;)if(t===(r=n[i]).toLowerCase())return r;return null}var oe="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,ae=function(e){return!B(e)&&e!==oe};var se,ue=(se="undefined"!=typeof Uint8Array&&_(Uint8Array),function(e){return se&&e instanceof se}),ce=U("HTMLFormElement"),le=function(){var e=Object.prototype.hasOwnProperty;return function(t,r){return e.call(t,r)}}(),fe=U("RegExp"),he=function(e,t){var r=Object.getOwnPropertyDescriptors(e),n={};ne(r,function(r,i){var o;!1!==(o=t(r,i,e))&&(n[i]=o||r)}),Object.defineProperties(e,n)};var de,pe,ge,ve,me=U("AsyncFunction"),we=(de="function"==typeof setImmediate,pe=H(oe.postMessage),de?setImmediate:pe?(ge="axios@".concat(Math.random()),ve=[],oe.addEventListener("message",function(e){var t=e.source,r=e.data;t===oe&&r===ge&&ve.length&&ve.shift()()},!1),function(e){ve.push(e),oe.postMessage(ge,"*")}):function(e){return setTimeout(e)}),ye="undefined"!=typeof queueMicrotask?queueMicrotask.bind(oe):"undefined"!=typeof process&&process.nextTick||we,be={isArray:F,isArrayBuffer:z,isBuffer:M,isFormData:function(e){var t;return e&&("function"==typeof FormData&&e instanceof FormData||H(e.append)&&("formdata"===(t=L(e))||"object"===t&&H(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&z(e.buffer)},isString:K,isNumber:V,isBoolean:function(e){return!0===e||!1===e},isObject:q,isPlainObject:Q,isEmptyObject:function(e){if(!q(e)||M(e))return!1;try{return 0===Object.keys(e).length&&Object.getPrototypeOf(e)===Object.prototype}catch(e){return!1}},isReadableStream:Z,isRequest:ee,isResponse:te,isHeaders:re,isUndefined:B,isDate:W,isFile:G,isBlob:J,isRegExp:fe,isFunction:H,isStream:function(e){return q(e)&&H(e.pipe)},isURLSearchParams:$,isTypedArray:ue,isFileList:X,forEach:ne,merge:function e(){for(var t=(ae(this)&&this||{}).caseless,r={},n=function(n,i){var o=t&&ie(r,i)||i;Q(r[o])&&Q(n)?r[o]=e(r[o],n):Q(n)?r[o]=e({},n):F(n)?r[o]=n.slice():r[o]=n},i=0,o=arguments.length;i<o;i++)arguments[i]&&ne(arguments[i],n);return r},extend:function(e,t,r){return ne(t,function(t,n){r&&H(t)?e[n]=I(t,r):e[n]=t},{allOwnKeys:(arguments.length>3&&void 0!==arguments[3]?arguments[3]:{}).allOwnKeys}),e},trim:function(e){return e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")},stripBOM:function(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e},inherits:function(e,t,r,n){e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},toFlatObject:function(e,t,r,n){var i,o,a,s={};if(t=t||{},null==e)return t;do{for(o=(i=Object.getOwnPropertyNames(e)).length;o-- >0;)a=i[o],n&&!n(a,e,t)||s[a]||(t[a]=e[a],s[a]=!0);e=!1!==r&&_(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},kindOf:L,kindOfTest:U,endsWith:function(e,t,r){e=String(e),(void 0===r||r>e.length)&&(r=e.length),r-=t.length;var n=e.indexOf(t,r);return-1!==n&&n===r},toArray:function(e){if(!e)return null;if(F(e))return e;var t=e.length;if(!V(t))return null;for(var r=new Array(t);t-- >0;)r[t]=e[t];return r},forEachEntry:function(e,t){for(var r,n=(e&&e[D]).call(e);(r=n.next())&&!r.done;){var i=r.value;t.call(e,i[0],i[1])}},matchAll:function(e,t){for(var r,n=[];null!==(r=e.exec(t));)n.push(r);return n},isHTMLForm:ce,hasOwnProperty:le,hasOwnProp:le,reduceDescriptors:he,freezeMethods:function(e){he(e,function(t,r){if(H(e)&&-1!==["arguments","caller","callee"].indexOf(r))return!1;var n=e[r];H(n)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=function(){throw Error("Can not rewrite read-only method '"+r+"'")}))})},toObjectSet:function(e,t){var r={},n=function(e){e.forEach(function(e){r[e]=!0})};return F(e)?n(e):n(String(e).split(t)),r},toCamelCase:function(e){return e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,r){return t.toUpperCase()+r})},noop:function(){},toFiniteNumber:function(e,t){return null!=e&&Number.isFinite(e=+e)?e:t},findKey:ie,global:oe,isContextDefined:ae,isSpecCompliantForm:function(e){return!!(e&&H(e.append)&&"FormData"===e[N]&&e[D])},toJSONObject:function(e){var t=new Array(10),r=function(e,n){if(q(e)){if(t.indexOf(e)>=0)return;if(M(e))return e;if(!("toJSON"in e)){t[n]=e;var i=F(e)?[]:{};return ne(e,function(e,t){var o=r(e,n+1);!B(o)&&(i[t]=o)}),t[n]=void 0,i}}return e};return r(e,0)},isAsyncFn:me,isThenable:function(e){return e&&(q(e)||H(e))&&H(e.then)&&H(e.catch)},setImmediate:we,asap:ye,isIterable:function(e){return null!=e&&H(e[D])}};function ke(e,t,r,n,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),i&&(this.response=i,this.status=i.status?i.status:null)}be.inherits(ke,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:be.toJSONObject(this.config),code:this.code,status:this.status}}});var Te=ke.prototype,Se={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(function(e){Se[e]={value:e}}),Object.defineProperties(ke,Se),Object.defineProperty(Te,"isAxiosError",{value:!0}),ke.from=function(e,t,r,n,i,o){var a=Object.create(Te);return be.toFlatObject(e,a,function(e){return e!==Error.prototype},function(e){return"isAxiosError"!==e}),ke.call(a,e.message,t,r,n,i),a.cause=e,a.name=e.name,o&&Object.assign(a,o),a};function Ee(e){return be.isPlainObject(e)||be.isArray(e)}function Pe(e){return be.endsWith(e,"[]")?e.slice(0,-2):e}function Re(e,t,r){return e?e.concat(t).map(function(e,t){return e=Pe(e),!r&&t?"["+e+"]":e}).join(r?".":""):t}var xe=be.toFlatObject(be,{},null,function(e){return/^is[A-Z]/.test(e)});function Ce(e,t,r){if(!be.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;var n=(r=be.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(e,t){return!be.isUndefined(t[e])})).metaTokens,i=r.visitor||c,o=r.dots,a=r.indexes,s=(r.Blob||"undefined"!=typeof Blob&&Blob)&&be.isSpecCompliantForm(t);if(!be.isFunction(i))throw new TypeError("visitor must be a function");function u(e){if(null===e)return"";if(be.isDate(e))return e.toISOString();if(be.isBoolean(e))return e.toString();if(!s&&be.isBlob(e))throw new ke("Blob is not supported. Use a Buffer instead.");return be.isArrayBuffer(e)||be.isTypedArray(e)?s&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function c(e,r,i){var s=e;if(e&&!i&&"object"===P(e))if(be.endsWith(r,"{}"))r=n?r:r.slice(0,-2),e=JSON.stringify(e);else if(be.isArray(e)&&function(e){return be.isArray(e)&&!e.some(Ee)}(e)||(be.isFileList(e)||be.endsWith(r,"[]"))&&(s=be.toArray(e)))return r=Pe(r),s.forEach(function(e,n){!be.isUndefined(e)&&null!==e&&t.append(!0===a?Re([r],n,o):null===a?r:r+"[]",u(e))}),!1;return!!Ee(e)||(t.append(Re(i,r,o),u(e)),!1)}var l=[],f=Object.assign(xe,{defaultVisitor:c,convertValue:u,isVisitable:Ee});if(!be.isObject(e))throw new TypeError("data must be an object");return function e(r,n){if(!be.isUndefined(r)){if(-1!==l.indexOf(r))throw Error("Circular reference detected in "+n.join("."));l.push(r),be.forEach(r,function(r,o){!0===(!(be.isUndefined(r)||null===r)&&i.call(t,r,be.isString(o)?o.trim():o,n,f))&&e(r,n?n.concat(o):[o])}),l.pop()}}(e),t}function Ie(e){var t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(e){return t[e]})}function Oe(e,t){this._pairs=[],e&&Ce(e,this,t)}var Ae=Oe.prototype;function _e(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function De(e,t,r){if(!t)return e;var n=r&&r.encode||_e;be.isFunction(r)&&(r={serialize:r});var i,o=r&&r.serialize;if(i=o?o(t,r):be.isURLSearchParams(t)?t.toString():new Oe(t,r).toString(n)){var a=e.indexOf("#");-1!==a&&(e=e.slice(0,a)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e}Ae.append=function(e,t){this._pairs.push([e,t])},Ae.toString=function(e){var t=e?function(t){return e.call(this,t,Ie)}:Ie;return this._pairs.map(function(e){return t(e[0])+"="+t(e[1])},"").join("&")};var Ne=function(){return h(function e(){l(this,e),this.handlers=[]},[{key:"use",value:function(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1}},{key:"eject",value:function(e){this.handlers[e]&&(this.handlers[e]=null)}},{key:"clear",value:function(){this.handlers&&(this.handlers=[])}},{key:"forEach",value:function(e){be.forEach(this.handlers,function(t){null!==t&&e(t)})}}])}(),Le={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Ue={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:Oe,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},je="undefined"!=typeof window&&"undefined"!=typeof document,Fe="object"===("undefined"==typeof navigator?"undefined":P(navigator))&&navigator||void 0,Be=je&&(!Fe||["ReactNative","NativeScript","NS"].indexOf(Fe.product)<0),Me="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,ze=je&&window.location.href||"http://localhost",Ke=w(w({},Object.freeze({__proto__:null,hasBrowserEnv:je,hasStandardBrowserWebWorkerEnv:Me,hasStandardBrowserEnv:Be,navigator:Fe,origin:ze})),Ue);function He(e){function t(e,r,n,i){var o=e[i++];if("__proto__"===o)return!0;var a=Number.isFinite(+o),s=i>=e.length;return o=!o&&be.isArray(n)?n.length:o,s?(be.hasOwnProp(n,o)?n[o]=[n[o],r]:n[o]=r,!a):(n[o]&&be.isObject(n[o])||(n[o]=[]),t(e,r,n[o],i)&&be.isArray(n[o])&&(n[o]=function(e){var t,r,n={},i=Object.keys(e),o=i.length;for(t=0;t<o;t++)n[r=i[t]]=e[r];return n}(n[o])),!a)}if(be.isFormData(e)&&be.isFunction(e.entries)){var r={};return be.forEachEntry(e,function(e,n){t(function(e){return be.matchAll(/\w+|\[(\w*)]/g,e).map(function(e){return"[]"===e[0]?"":e[1]||e[0]})}(e),n,r,0)}),r}return null}var Ve={transitional:Le,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){var r,n=t.getContentType()||"",i=n.indexOf("application/json")>-1,o=be.isObject(e);if(o&&be.isHTMLForm(e)&&(e=new FormData(e)),be.isFormData(e))return i?JSON.stringify(He(e)):e;if(be.isArrayBuffer(e)||be.isBuffer(e)||be.isStream(e)||be.isFile(e)||be.isBlob(e)||be.isReadableStream(e))return e;if(be.isArrayBufferView(e))return e.buffer;if(be.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return Ce(e,new Ke.classes.URLSearchParams,w({visitor:function(e,t,r,n){return Ke.isNode&&be.isBuffer(e)?(this.append(t,e.toString("base64")),!1):n.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((r=be.isFileList(e))||n.indexOf("multipart/form-data")>-1){var a=this.env&&this.env.FormData;return Ce(r?{"files[]":e}:e,a&&new a,this.formSerializer)}}return o||i?(t.setContentType("application/json",!1),function(e,t,r){if(be.isString(e))try{return(t||JSON.parse)(e),be.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(r||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional||Ve.transitional,r=t&&t.forcedJSONParsing,n="json"===this.responseType;if(be.isResponse(e)||be.isReadableStream(e))return e;if(e&&be.isString(e)&&(r&&!this.responseType||n)){var i=!(t&&t.silentJSONParsing)&&n;try{return JSON.parse(e)}catch(e){if(i){if("SyntaxError"===e.name)throw ke.from(e,ke.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Ke.classes.FormData,Blob:Ke.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};be.forEach(["delete","get","head","post","put","patch"],function(e){Ve.headers[e]={}});var qe=Ve,Qe=be.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),We=Symbol("internals");function Ge(e){return e&&String(e).trim().toLowerCase()}function Je(e){return!1===e||null==e?e:be.isArray(e)?e.map(Je):String(e)}function Xe(e,t,r,n,i){return be.isFunction(n)?n.call(this,t,r):(i&&(t=r),be.isString(t)?be.isString(n)?-1!==t.indexOf(n):be.isRegExp(n)?n.test(t):void 0:void 0)}var $e=function(){return h(function e(t){l(this,e),t&&this.set(t)},[{key:"set",value:function(e,t,r){var n=this;function i(e,t,r){var i=Ge(t);if(!i)throw new Error("header name must be a non-empty string");var o=be.findKey(n,i);(!o||void 0===n[o]||!0===r||void 0===r&&!1!==n[o])&&(n[o||t]=Je(e))}var o=function(e,t){return be.forEach(e,function(e,r){return i(e,r,t)})};if(be.isPlainObject(e)||e instanceof this.constructor)o(e,t);else if(be.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))o(function(e){var t,r,n,i={};return e&&e.split("\n").forEach(function(e){n=e.indexOf(":"),t=e.substring(0,n).trim().toLowerCase(),r=e.substring(n+1).trim(),!t||i[t]&&Qe[t]||("set-cookie"===t?i[t]?i[t].push(r):i[t]=[r]:i[t]=i[t]?i[t]+", "+r:r)}),i}(e),t);else if(be.isObject(e)&&be.isIterable(e)){var a,s,u,c={},l=d(e);try{for(l.s();!(u=l.n()).done;){var f=u.value;if(!be.isArray(f))throw TypeError("Object iterator must return a key-value pair");c[s=f[0]]=(a=c[s])?be.isArray(a)?[].concat(S(a),[f[1]]):[a,f[1]]:f[1]}}catch(e){l.e(e)}finally{l.f()}o(c,t)}else null!=e&&i(t,e,r);return this}},{key:"get",value:function(e,t){if(e=Ge(e)){var r=be.findKey(this,e);if(r){var n=this[r];if(!t)return n;if(!0===t)return function(e){for(var t,r=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;t=n.exec(e);)r[t[1]]=t[2];return r}(n);if(be.isFunction(t))return t.call(this,n,r);if(be.isRegExp(t))return t.exec(n);throw new TypeError("parser must be boolean|regexp|function")}}}},{key:"has",value:function(e,t){if(e=Ge(e)){var r=be.findKey(this,e);return!(!r||void 0===this[r]||t&&!Xe(0,this[r],r,t))}return!1}},{key:"delete",value:function(e,t){var r=this,n=!1;function i(e){if(e=Ge(e)){var i=be.findKey(r,e);!i||t&&!Xe(0,r[i],i,t)||(delete r[i],n=!0)}}return be.isArray(e)?e.forEach(i):i(e),n}},{key:"clear",value:function(e){for(var t=Object.keys(this),r=t.length,n=!1;r--;){var i=t[r];e&&!Xe(0,this[i],i,e,!0)||(delete this[i],n=!0)}return n}},{key:"normalize",value:function(e){var t=this,r={};return be.forEach(this,function(n,i){var o=be.findKey(r,i);if(o)return t[o]=Je(n),void delete t[i];var a=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,function(e,t,r){return t.toUpperCase()+r})}(i):String(i).trim();a!==i&&delete t[i],t[a]=Je(n),r[a]=!0}),this}},{key:"concat",value:function(){for(var e,t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return(e=this.constructor).concat.apply(e,[this].concat(r))}},{key:"toJSON",value:function(e){var t=Object.create(null);return be.forEach(this,function(r,n){null!=r&&!1!==r&&(t[n]=e&&be.isArray(r)?r.join(", "):r)}),t}},{key:Symbol.iterator,value:function(){return Object.entries(this.toJSON())[Symbol.iterator]()}},{key:"toString",value:function(){return Object.entries(this.toJSON()).map(function(e){var t=T(e,2);return t[0]+": "+t[1]}).join("\n")}},{key:"getSetCookie",value:function(){return this.get("set-cookie")||[]}},{key:Symbol.toStringTag,get:function(){return"AxiosHeaders"}}],[{key:"from",value:function(e){return e instanceof this?e:new this(e)}},{key:"concat",value:function(e){for(var t=new this(e),r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];return n.forEach(function(e){return t.set(e)}),t}},{key:"accessor",value:function(e){var t=(this[We]=this[We]={accessors:{}}).accessors,r=this.prototype;function n(e){var n=Ge(e);t[n]||(!function(e,t){var r=be.toCamelCase(" "+t);["get","set","has"].forEach(function(n){Object.defineProperty(e,n+r,{value:function(e,r,i){return this[n].call(this,t,e,r,i)},configurable:!0})})}(r,e),t[n]=!0)}return be.isArray(e)?e.forEach(n):n(e),this}}])}();$e.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),be.reduceDescriptors($e.prototype,function(e,t){var r=e.value,n=t[0].toUpperCase()+t.slice(1);return{get:function(){return r},set:function(e){this[n]=e}}}),be.freezeMethods($e);var Ye=$e;function Ze(e,t){var r=this||qe,n=t||r,i=Ye.from(n.headers),o=n.data;return be.forEach(e,function(e){o=e.call(r,o,i.normalize(),t?t.status:void 0)}),i.normalize(),o}function et(e){return!(!e||!e.__CANCEL__)}function tt(e,t,r){ke.call(this,null==e?"canceled":e,ke.ERR_CANCELED,t,r),this.name="CanceledError"}function rt(e,t,r){var n=r.config.validateStatus;r.status&&n&&!n(r.status)?t(new ke("Request failed with status code "+r.status,[ke.ERR_BAD_REQUEST,ke.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r)):e(r)}be.inherits(tt,ke,{__CANCEL__:!0});var nt=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:3,n=0,i=function(e,t){e=e||10;var r,n=new Array(e),i=new Array(e),o=0,a=0;return t=void 0!==t?t:1e3,function(s){var u=Date.now(),c=i[a];r||(r=u),n[o]=s,i[o]=u;for(var l=a,f=0;l!==o;)f+=n[l++],l%=e;if((o=(o+1)%e)===a&&(a=(a+1)%e),!(u-r<t)){var h=c&&u-c;return h?Math.round(1e3*f/h):void 0}}}(50,250);return function(e,t){var r,n,i=0,o=1e3/t,a=function(t){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Date.now();i=o,r=null,n&&(clearTimeout(n),n=null),e.apply(void 0,S(t))};return[function(){for(var e=Date.now(),t=e-i,s=arguments.length,u=new Array(s),c=0;c<s;c++)u[c]=arguments[c];t>=o?a(u,e):(r=u,n||(n=setTimeout(function(){n=null,a(r)},o-t)))},function(){return r&&a(r)}]}(function(r){var o=r.loaded,a=r.lengthComputable?r.total:void 0,s=o-n,u=i(s);n=o;var c=p({loaded:o,total:a,progress:a?o/a:void 0,bytes:s,rate:u||void 0,estimated:u&&a&&o<=a?(a-o)/u:void 0,event:r,lengthComputable:null!=a},t?"download":"upload",!0);e(c)},r)},it=function(e,t){var r=null!=e;return[function(n){return t[0]({lengthComputable:r,total:e,loaded:n})},t[1]]},ot=function(e){return function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return be.asap(function(){return e.apply(void 0,r)})}},at=Ke.hasStandardBrowserEnv?function(e,t){return function(r){return r=new URL(r,Ke.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)}}(new URL(Ke.origin),Ke.navigator&&/(msie|trident)/i.test(Ke.navigator.userAgent)):function(){return!0},st=Ke.hasStandardBrowserEnv?{write:function(e,t,r,n,i,o){var a=[e+"="+encodeURIComponent(t)];be.isNumber(r)&&a.push("expires="+new Date(r).toGMTString()),be.isString(n)&&a.push("path="+n),be.isString(i)&&a.push("domain="+i),!0===o&&a.push("secure"),document.cookie=a.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}};function ut(e,t,r){var n=!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t);return e&&(n||0==r)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}var ct=function(e){return e instanceof Ye?w({},e):e};function lt(e,t){t=t||{};var r={};function n(e,t,r,n){return be.isPlainObject(e)&&be.isPlainObject(t)?be.merge.call({caseless:n},e,t):be.isPlainObject(t)?be.merge({},t):be.isArray(t)?t.slice():t}function i(e,t,r,i){return be.isUndefined(t)?be.isUndefined(e)?void 0:n(void 0,e,0,i):n(e,t,0,i)}function o(e,t){if(!be.isUndefined(t))return n(void 0,t)}function a(e,t){return be.isUndefined(t)?be.isUndefined(e)?void 0:n(void 0,e):n(void 0,t)}function s(r,i,o){return o in t?n(r,i):o in e?n(void 0,r):void 0}var u={url:o,method:o,data:o,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:function(e,t,r){return i(ct(e),ct(t),0,!0)}};return be.forEach(Object.keys(w(w({},e),t)),function(n){var o=u[n]||i,a=o(e[n],t[n],n);be.isUndefined(a)&&o!==s||(r[n]=a)}),r}var ft,ht,dt=function(e){var t,i,o=lt({},e),a=o.data,s=o.withXSRFToken,u=o.xsrfHeaderName,c=o.xsrfCookieName,l=o.headers,f=o.auth;if(o.headers=l=Ye.from(l),o.url=De(ut(o.baseURL,o.url,o.allowAbsoluteUrls),e.params,e.paramsSerializer),f&&l.set("Authorization","Basic "+btoa((f.username||"")+":"+(f.password?unescape(encodeURIComponent(f.password)):""))),be.isFormData(a))if(Ke.hasStandardBrowserEnv||Ke.hasStandardBrowserWebWorkerEnv)l.setContentType(void 0);else if(!1!==(t=l.getContentType())){var h=t?t.split(";").map(function(e){return e.trim()}).filter(Boolean):[],d=n(i=h)||g(i)||R(i)||v(),p=d[0],m=r(d).slice(1);l.setContentType([p||"multipart/form-data"].concat(S(m)).join("; "))}if(Ke.hasStandardBrowserEnv&&(s&&be.isFunction(s)&&(s=s(o)),s||!1!==s&&at(o.url))){var w=u&&c&&st.read(c);w&&l.set(u,w)}return o},pt="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise(function(t,r){var n,i,o,a,s,u=dt(e),c=u.data,l=Ye.from(u.headers).normalize(),f=u.responseType,h=u.onUploadProgress,d=u.onDownloadProgress;function p(){a&&a(),s&&s(),u.cancelToken&&u.cancelToken.unsubscribe(n),u.signal&&u.signal.removeEventListener("abort",n)}var g=new XMLHttpRequest;function v(){if(g){var n=Ye.from("getAllResponseHeaders"in g&&g.getAllResponseHeaders());rt(function(e){t(e),p()},function(e){r(e),p()},{data:f&&"text"!==f&&"json"!==f?g.response:g.responseText,status:g.status,statusText:g.statusText,headers:n,config:e,request:g}),g=null}}if(g.open(u.method.toUpperCase(),u.url,!0),g.timeout=u.timeout,"onloadend"in g?g.onloadend=v:g.onreadystatechange=function(){g&&4===g.readyState&&(0!==g.status||g.responseURL&&0===g.responseURL.indexOf("file:"))&&setTimeout(v)},g.onabort=function(){g&&(r(new ke("Request aborted",ke.ECONNABORTED,e,g)),g=null)},g.onerror=function(){r(new ke("Network Error",ke.ERR_NETWORK,e,g)),g=null},g.ontimeout=function(){var t=u.timeout?"timeout of "+u.timeout+"ms exceeded":"timeout exceeded",n=u.transitional||Le;u.timeoutErrorMessage&&(t=u.timeoutErrorMessage),r(new ke(t,n.clarifyTimeoutError?ke.ETIMEDOUT:ke.ECONNABORTED,e,g)),g=null},void 0===c&&l.setContentType(null),"setRequestHeader"in g&&be.forEach(l.toJSON(),function(e,t){g.setRequestHeader(t,e)}),be.isUndefined(u.withCredentials)||(g.withCredentials=!!u.withCredentials),f&&"json"!==f&&(g.responseType=u.responseType),d){var m=T(nt(d,!0),2);o=m[0],s=m[1],g.addEventListener("progress",o)}if(h&&g.upload){var w=T(nt(h),2);i=w[0],a=w[1],g.upload.addEventListener("progress",i),g.upload.addEventListener("loadend",a)}(u.cancelToken||u.signal)&&(n=function(t){g&&(r(!t||t.type?new tt(null,e,g):t),g.abort(),g=null)},u.cancelToken&&u.cancelToken.subscribe(n),u.signal&&(u.signal.aborted?n():u.signal.addEventListener("abort",n)));var y,b,k=(y=u.url,(b=/^([-+\w]{1,25})(:?\/\/|:)/.exec(y))&&b[1]||"");k&&-1===Ke.protocols.indexOf(k)?r(new ke("Unsupported protocol "+k+":",ke.ERR_BAD_REQUEST,e)):g.send(c||null)})},gt=function(e,t){var r=(e=e?e.filter(Boolean):[]).length;if(t||r){var n,i=new AbortController,o=function(e){if(!n){n=!0,s();var t=e instanceof Error?e:this.reason;i.abort(t instanceof ke?t:new tt(t instanceof Error?t.message:t))}},a=t&&setTimeout(function(){a=null,o(new ke("timeout ".concat(t," of ms exceeded"),ke.ETIMEDOUT))},t),s=function(){e&&(a&&clearTimeout(a),a=null,e.forEach(function(e){e.unsubscribe?e.unsubscribe(o):e.removeEventListener("abort",o)}),e=null)};e.forEach(function(e){return e.addEventListener("abort",o)});var u=i.signal;return u.unsubscribe=function(){return be.asap(s)},u}},vt=y().m(function e(t,r){var n,i,o;return y().w(function(e){for(;;)switch(e.n){case 0:if(n=t.byteLength,r&&!(n<r)){e.n=2;break}return e.n=1,t;case 1:return e.a(2);case 2:i=0;case 3:if(!(i<n)){e.n=5;break}return o=i+r,e.n=4,t.slice(i,o);case 4:i=o,e.n=3;break;case 5:return e.a(2)}},e)}),mt=function(){var e=x(y().m(function e(t,r){var n,a,s,u,l,f,h;return y().w(function(e){for(;;)switch(e.p=e.n){case 0:n=!1,a=!1,e.p=1,u=o(wt(t));case 2:return e.n=3,c(u.next());case 3:if(!(n=!(l=e.v).done)){e.n=5;break}return f=l.value,e.d(k(i(o(vt(f,r)))),4);case 4:n=!1,e.n=2;break;case 5:e.n=7;break;case 6:e.p=6,h=e.v,a=!0,s=h;case 7:if(e.p=7,e.p=8,!n||null==u.return){e.n=9;break}return e.n=9,c(u.return());case 9:if(e.p=9,!a){e.n=10;break}throw s;case 10:return e.f(9);case 11:return e.f(7);case 12:return e.a(2)}},e,null,[[8,,9,11],[1,6,7,12]])}));return function(t,r){return e.apply(this,arguments)}}(),wt=function(){var e=x(y().m(function e(t){var r,n,a,s;return y().w(function(e){for(;;)switch(e.p=e.n){case 0:if(!t[Symbol.asyncIterator]){e.n=2;break}return e.d(k(i(o(t))),1);case 1:return e.a(2);case 2:r=t.getReader(),e.p=3;case 4:return e.n=5,c(r.read());case 5:if(n=e.v,a=n.done,s=n.value,!a){e.n=6;break}return e.a(3,8);case 6:return e.n=7,s;case 7:e.n=4;break;case 8:return e.p=8,e.n=9,c(r.cancel());case 9:return e.f(8);case 10:return e.a(2)}},e,null,[[3,,8,10]])}));return function(t){return e.apply(this,arguments)}}(),yt=function(e,t,r,n){var i,o=mt(e,t),a=0,s=function(e){i||(i=!0,n&&n(e))};return new ReadableStream({pull:function(e){return u(y().m(function t(){var n,i,u,c,l,f;return y().w(function(t){for(;;)switch(t.p=t.n){case 0:return t.p=0,t.n=1,o.next();case 1:if(n=t.v,i=n.done,u=n.value,!i){t.n=2;break}return s(),e.close(),t.a(2);case 2:c=u.byteLength,r&&(l=a+=c,r(l)),e.enqueue(new Uint8Array(u)),t.n=4;break;case 3:throw t.p=3,f=t.v,s(f),f;case 4:return t.a(2)}},t,null,[[0,3]])}))()},cancel:function(e){return s(e),o.return()}},{highWaterMark:2})},bt="function"==typeof fetch&&"function"==typeof Request&&"function"==typeof Response,kt=bt&&"function"==typeof ReadableStream,Tt=bt&&("function"==typeof TextEncoder?(ft=new TextEncoder,function(e){return ft.encode(e)}):function(){var e=u(y().m(function e(t){var r,n;return y().w(function(e){for(;;)switch(e.n){case 0:return r=Uint8Array,e.n=1,new Response(t).arrayBuffer();case 1:return n=e.v,e.a(2,new r(n))}},e)}));return function(t){return e.apply(this,arguments)}}()),St=function(e){try{for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return!!e.apply(void 0,r)}catch(e){return!1}},Et=kt&&St(function(){var e=!1,t=new Request(Ke.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),Pt=kt&&St(function(){return be.isReadableStream(new Response("").body)}),Rt={stream:Pt&&function(e){return e.body}};bt&&(ht=new Response,["text","arrayBuffer","blob","formData","stream"].forEach(function(e){!Rt[e]&&(Rt[e]=be.isFunction(ht[e])?function(t){return t[e]()}:function(t,r){throw new ke("Response type '".concat(e,"' is not supported"),ke.ERR_NOT_SUPPORT,r)})}));var xt=function(){var e=u(y().m(function e(t){var r;return y().w(function(e){for(;;)switch(e.n){case 0:if(null!=t){e.n=1;break}return e.a(2,0);case 1:if(!be.isBlob(t)){e.n=2;break}return e.a(2,t.size);case 2:if(!be.isSpecCompliantForm(t)){e.n=4;break}return r=new Request(Ke.origin,{method:"POST",body:t}),e.n=3,r.arrayBuffer();case 3:case 6:return e.a(2,e.v.byteLength);case 4:if(!be.isArrayBufferView(t)&&!be.isArrayBuffer(t)){e.n=5;break}return e.a(2,t.byteLength);case 5:if(be.isURLSearchParams(t)&&(t+=""),!be.isString(t)){e.n=7;break}return e.n=6,Tt(t);case 7:return e.a(2)}},e)}));return function(t){return e.apply(this,arguments)}}(),Ct=function(){var e=u(y().m(function e(t,r){var n;return y().w(function(e){for(;;)if(0===e.n)return n=be.toFiniteNumber(t.getContentLength()),e.a(2,null==n?xt(r):n)},e)}));return function(t,r){return e.apply(this,arguments)}}(),It=bt&&function(){var e=u(y().m(function e(t){var r,n,i,o,a,s,u,c,l,f,h,d,p,g,v,m,b,k,S,E,P,R,x,C,I,O,A,_,D,N,L,U,j,F,B,M,z;return y().w(function(e){for(;;)switch(e.p=e.n){case 0:if(r=dt(t),n=r.url,i=r.method,o=r.data,a=r.signal,s=r.cancelToken,u=r.timeout,c=r.onDownloadProgress,l=r.onUploadProgress,f=r.responseType,h=r.headers,d=r.withCredentials,p=void 0===d?"same-origin":d,g=r.fetchOptions,f=f?(f+"").toLowerCase():"text",v=gt([a,s&&s.toAbortSignal()],u),b=v&&v.unsubscribe&&function(){v.unsubscribe()},e.p=1,!(B=l&&Et&&"get"!==i&&"head"!==i)){e.n=3;break}return e.n=2,Ct(h,o);case 2:M=k=e.v,B=0!==M;case 3:if(!B){e.n=4;break}S=new Request(n,{method:"POST",body:o,duplex:"half"}),be.isFormData(o)&&(E=S.headers.get("content-type"))&&h.setContentType(E),S.body&&(P=it(k,nt(ot(l))),R=T(P,2),x=R[0],C=R[1],o=yt(S.body,65536,x,C));case 4:return be.isString(p)||(p=p?"include":"omit"),I="credentials"in Request.prototype,m=new Request(n,w(w({},g),{},{signal:v,method:i.toUpperCase(),headers:h.normalize().toJSON(),body:o,duplex:"half",credentials:I?p:void 0})),e.n=5,fetch(m,g);case 5:return O=e.v,A=Pt&&("stream"===f||"response"===f),Pt&&(c||A&&b)&&(_={},["status","statusText","headers"].forEach(function(e){_[e]=O[e]}),D=be.toFiniteNumber(O.headers.get("content-length")),N=c&&it(D,nt(ot(c),!0))||[],L=T(N,2),U=L[0],j=L[1],O=new Response(yt(O.body,65536,U,function(){j&&j(),b&&b()}),_)),f=f||"text",e.n=6,Rt[be.findKey(Rt,f)||"text"](O,t);case 6:return F=e.v,!A&&b&&b(),e.n=7,new Promise(function(e,r){rt(e,r,{data:F,headers:Ye.from(O.headers),status:O.status,statusText:O.statusText,config:t,request:m})});case 7:return e.a(2,e.v);case 8:if(e.p=8,z=e.v,b&&b(),!z||"TypeError"!==z.name||!/Load failed|fetch/i.test(z.message)){e.n=9;break}throw Object.assign(new ke("Network Error",ke.ERR_NETWORK,t,m),{cause:z.cause||z});case 9:throw ke.from(z,z&&z.code,t,m);case 10:return e.a(2)}},e,null,[[1,8]])}));return function(t){return e.apply(this,arguments)}}(),Ot={http:null,xhr:pt,fetch:It};be.forEach(Ot,function(e,t){if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}});var At=function(e){return"- ".concat(e)},_t=function(e){return be.isFunction(e)||null===e||!1===e},Dt=function(e){for(var t,r,n=(e=be.isArray(e)?e:[e]).length,i={},o=0;o<n;o++){var a=void 0;if(r=t=e[o],!_t(t)&&void 0===(r=Ot[(a=String(t)).toLowerCase()]))throw new ke("Unknown adapter '".concat(a,"'"));if(r)break;i[a||"#"+o]=r}if(!r){var s=Object.entries(i).map(function(e){var t=T(e,2),r=t[0],n=t[1];return"adapter ".concat(r," ")+(!1===n?"is not supported by the environment":"is not available in the build")});throw new ke("There is no suitable adapter to dispatch the request "+(n?s.length>1?"since :\n"+s.map(At).join("\n"):" "+At(s[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return r};function Nt(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new tt(null,e)}function Lt(e){return Nt(e),e.headers=Ye.from(e.headers),e.data=Ze.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Dt(e.adapter||qe.adapter)(e).then(function(t){return Nt(e),t.data=Ze.call(e,e.transformResponse,t),t.headers=Ye.from(t.headers),t},function(t){return et(t)||(Nt(e),t&&t.response&&(t.response.data=Ze.call(e,e.transformResponse,t.response),t.response.headers=Ye.from(t.response.headers))),Promise.reject(t)})}var Ut="1.11.0",jt={};["object","boolean","number","function","string","symbol"].forEach(function(e,t){jt[e]=function(r){return P(r)===e||"a"+(t<1?"n ":" ")+e}});var Ft={};jt.transitional=function(e,t,r){function n(e,t){return"[Axios v"+Ut+"] Transitional option '"+e+"'"+t+(r?". "+r:"")}return function(r,i,o){if(!1===e)throw new ke(n(i," has been removed"+(t?" in "+t:"")),ke.ERR_DEPRECATED);return t&&!Ft[i]&&(Ft[i]=!0,console.warn(n(i," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(r,i,o)}},jt.spelling=function(e){return function(t,r){return console.warn("".concat(r," is likely a misspelling of ").concat(e)),!0}};var Bt={assertOptions:function(e,t,r){if("object"!==P(e))throw new ke("options must be an object",ke.ERR_BAD_OPTION_VALUE);for(var n=Object.keys(e),i=n.length;i-- >0;){var o=n[i],a=t[o];if(a){var s=e[o],u=void 0===s||a(s,o,e);if(!0!==u)throw new ke("option "+o+" must be "+u,ke.ERR_BAD_OPTION_VALUE)}else if(!0!==r)throw new ke("Unknown option "+o,ke.ERR_BAD_OPTION)}},validators:jt},Mt=Bt.validators,zt=function(){return h(function e(t){l(this,e),this.defaults=t||{},this.interceptors={request:new Ne,response:new Ne}},[{key:"request",value:(e=u(y().m(function e(t,r){var n,i,o;return y().w(function(e){for(;;)switch(e.p=e.n){case 0:return e.p=0,e.n=1,this._request(t,r);case 1:return e.a(2,e.v);case 2:if(e.p=2,(o=e.v)instanceof Error){n={},Error.captureStackTrace?Error.captureStackTrace(n):n=new Error,i=n.stack?n.stack.replace(/^.+\n/,""):"";try{o.stack?i&&!String(o.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(o.stack+="\n"+i):o.stack=i}catch(e){}}throw o;case 3:return e.a(2)}},e,this,[[0,2]])})),function(t,r){return e.apply(this,arguments)})},{key:"_request",value:function(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{};var r=t=lt(this.defaults,t),n=r.transitional,i=r.paramsSerializer,o=r.headers;void 0!==n&&Bt.assertOptions(n,{silentJSONParsing:Mt.transitional(Mt.boolean),forcedJSONParsing:Mt.transitional(Mt.boolean),clarifyTimeoutError:Mt.transitional(Mt.boolean)},!1),null!=i&&(be.isFunction(i)?t.paramsSerializer={serialize:i}:Bt.assertOptions(i,{encode:Mt.function,serialize:Mt.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),Bt.assertOptions(t,{baseUrl:Mt.spelling("baseURL"),withXsrfToken:Mt.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();var a=o&&be.merge(o.common,o[t.method]);o&&be.forEach(["delete","get","head","post","put","patch","common"],function(e){delete o[e]}),t.headers=Ye.concat(a,o);var s=[],u=!0;this.interceptors.request.forEach(function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(u=u&&e.synchronous,s.unshift(e.fulfilled,e.rejected))});var c,l=[];this.interceptors.response.forEach(function(e){l.push(e.fulfilled,e.rejected)});var f,h=0;if(!u){var d=[Lt.bind(this),void 0];for(d.unshift.apply(d,s),d.push.apply(d,l),f=d.length,c=Promise.resolve(t);h<f;)c=c.then(d[h++],d[h++]);return c}f=s.length;var p=t;for(h=0;h<f;){var g=s[h++],v=s[h++];try{p=g(p)}catch(e){v.call(this,e);break}}try{c=Lt.call(this,p)}catch(e){return Promise.reject(e)}for(h=0,f=l.length;h<f;)c=c.then(l[h++],l[h++]);return c}},{key:"getUri",value:function(e){return De(ut((e=lt(this.defaults,e)).baseURL,e.url,e.allowAbsoluteUrls),e.params,e.paramsSerializer)}}]);var e}();be.forEach(["delete","get","head","options"],function(e){zt.prototype[e]=function(t,r){return this.request(lt(r||{},{method:e,url:t,data:(r||{}).data}))}}),be.forEach(["post","put","patch"],function(e){function t(t){return function(r,n,i){return this.request(lt(i||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:r,data:n}))}}zt.prototype[e]=t(),zt.prototype[e+"Form"]=t(!0)});var Kt=zt,Ht=function(){function e(t){if(l(this,e),"function"!=typeof t)throw new TypeError("executor must be a function.");var r;this.promise=new Promise(function(e){r=e});var n=this;this.promise.then(function(e){if(n._listeners){for(var t=n._listeners.length;t-- >0;)n._listeners[t](e);n._listeners=null}}),this.promise.then=function(e){var t,r=new Promise(function(e){n.subscribe(e),t=e}).then(e);return r.cancel=function(){n.unsubscribe(t)},r},t(function(e,t,i){n.reason||(n.reason=new tt(e,t,i),r(n.reason))})}return h(e,[{key:"throwIfRequested",value:function(){if(this.reason)throw this.reason}},{key:"subscribe",value:function(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}},{key:"unsubscribe",value:function(e){if(this._listeners){var t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}}},{key:"toAbortSignal",value:function(){var e=this,t=new AbortController,r=function(e){t.abort(e)};return this.subscribe(r),t.signal.unsubscribe=function(){return e.unsubscribe(r)},t.signal}}],[{key:"source",value:function(){var t;return{token:new e(function(e){t=e}),cancel:t}}}])}(),Vt=Ht;var qt={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(qt).forEach(function(e){var t=T(e,2),r=t[0],n=t[1];qt[n]=r});var Qt=qt;var Wt=function e(t){var r=new Kt(t),n=I(Kt.prototype.request,r);return be.extend(n,Kt.prototype,r,{allOwnKeys:!0}),be.extend(n,r,null,{allOwnKeys:!0}),n.create=function(r){return e(lt(t,r))},n}(qe);Wt.Axios=Kt,Wt.CanceledError=tt,Wt.CancelToken=Vt,Wt.isCancel=et,Wt.VERSION=Ut,Wt.toFormData=Ce,Wt.AxiosError=ke,Wt.Cancel=Wt.CanceledError,Wt.all=function(e){return Promise.all(e)},Wt.spread=function(e){return function(t){return e.apply(null,t)}},Wt.isAxiosError=function(e){return be.isObject(e)&&!0===e.isAxiosError},Wt.mergeConfig=lt,Wt.AxiosHeaders=Ye,Wt.formToJSON=function(e){return He(be.isHTMLForm(e)?new FormData(e):e)},Wt.getAdapter=Dt,Wt.HttpStatusCode=Qt,Wt.default=Wt;var Gt=Wt;Gt.Axios,Gt.AxiosError,Gt.CanceledError,Gt.isCancel,Gt.CancelToken,Gt.VERSION,Gt.all,Gt.Cancel,Gt.isAxiosError,Gt.spread,Gt.toFormData,Gt.AxiosHeaders,Gt.HttpStatusCode,Gt.formToJSON,Gt.getAdapter,Gt.mergeConfig;var Jt=Gt.create({timeout:1e4,headers:{"Content-Type":"multipart/form-data"}});Jt.interceptors.request.use(function(e){return e},function(e){return Promise.reject(e)}),Jt.interceptors.response.use(function(e){return e},function(e){return Promise.reject(e)});var Xt,$t="user-agent",Yt="",Zt="function",er="object",tr="string",rr="undefined",nr="browser",ir="cpu",or="device",ar="engine",sr="os",ur="result",cr="name",lr="type",fr="vendor",hr="version",dr="architecture",pr="major",gr="model",vr="console",mr="mobile",wr="tablet",yr="smarttv",br="wearable",kr="xr",Tr="embedded",Sr="inapp",Er="brands",Pr="formFactors",Rr="fullVersionList",xr="platform",Cr="platformVersion",Ir="bitness",Or="sec-ch-ua",Ar=Or+"-full-version-list",_r=Or+"-arch",Dr=Or+"-"+Ir,Nr=Or+"-form-factors",Lr=Or+"-"+mr,Ur=Or+"-"+gr,jr=Or+"-"+xr,Fr=jr+"-version",Br=[Er,Rr,mr,gr,xr,Cr,dr,Pr,Ir],Mr="Amazon",zr="Apple",Kr="ASUS",Hr="BlackBerry",Vr="Google",qr="Huawei",Qr="Lenovo",Wr="Honor",Gr="LG",Jr="Microsoft",Xr="Motorola",$r="Nvidia",Yr="OnePlus",Zr="OPPO",en="Samsung",tn="Sharp",rn="Sony",nn="Xiaomi",on="Zebra",an="Chrome",sn="Chromium",un="Chromecast",cn="Edge",ln="Firefox",fn="Opera",hn="Facebook",dn="Sogou",pn="Mobile ",gn=" Browser",vn="Windows",mn=("undefined"==typeof window?"undefined":P(window))!==rr&&window.navigator?window.navigator:void 0,wn=mn&&mn.userAgentData?mn.userAgentData:void 0,yn=function(e){for(var t={},r=0;r<e.length;r++)t[e[r].toUpperCase()]=e[r];return t},bn=function(e,t){if(P(e)===er&&e.length>0){for(var r in e)if(En(t)==En(e[r]))return!0;return!1}return!!Tn(e)&&En(t)==En(e)},kn=function(e,t){for(var r in e)return/^(browser|cpu|device|engine|os)$/.test(r)||!!t&&kn(e[r])},Tn=function(e){return P(e)===tr},Sn=function(e){if(e){for(var t=[],r=xn(/\\?\"/g,e).split(","),n=0;n<r.length;n++)if(r[n].indexOf(";")>-1){var i=In(r[n]).split(";v=");t[n]={brand:i[0],version:i[1]}}else t[n]=In(r[n]);return t}},En=function(e){return Tn(e)?e.toLowerCase():e},Pn=function(e){return Tn(e)?xn(/[^\d\.]/g,e).split(".")[0]:void 0},Rn=function(e){for(var t in e)if(e.hasOwnProperty(t)){var r=e[t];P(r)==er&&2==r.length?this[r[0]]=r[1]:this[r]=void 0}return this},xn=function(e,t){return Tn(t)?t.replace(e,Yt):t},Cn=function(e){return xn(/\\?\"/g,e)},In=function(e,t){return e=xn(/^\s\s*/,String(e)),P(t)===rr?e:e.substring(0,t)},On=function(e,t){if(e&&t)for(var r,n,i,o,a,s,u=0;u<t.length&&!a;){var c=t[u],l=t[u+1];for(r=n=0;r<c.length&&!a&&c[r];)if(a=c[r++].exec(e))for(i=0;i<l.length;i++)s=a[++n],P(o=l[i])===er&&o.length>0?2===o.length?P(o[1])==Zt?this[o[0]]=o[1].call(this,s):this[o[0]]=o[1]:o.length>=3&&(P(o[1])!==Zt||o[1].exec&&o[1].test?3==o.length?this[o[0]]=s?s.replace(o[1],o[2]):void 0:4==o.length?this[o[0]]=s?o[3].call(this,s.replace(o[1],o[2])):void 0:o.length>4&&(this[o[0]]=s?o[3].apply(this,[s.replace(o[1],o[2])].concat(o.slice(4))):void 0):o.length>3?this[o[0]]=s?o[1].apply(this,o.slice(2)):void 0:this[o[0]]=s?o[1].call(this,s,o[2]):void 0):this[o]=s||void 0;u+=2}},An=function(e,t){for(var r in t)if(P(t[r])===er&&t[r].length>0){for(var n=0;n<t[r].length;n++)if(bn(t[r][n],e))return"?"===r?void 0:r}else if(bn(t[r],e))return"?"===r?void 0:r;return t.hasOwnProperty("*")?t["*"]:e},_n={ME:"4.90","NT 3.51":"3.51","NT 4.0":"4.0",2e3:["5.0","5.01"],XP:["5.1","5.2"],Vista:"6.0",7:"6.1",8:"6.2",8.1:"6.3",10:["6.4","10.0"],NT:""},Dn={embedded:"Automotive",mobile:"Mobile",tablet:["Tablet","EInk"],smarttv:"TV",wearable:"Watch",xr:["VR","XR"],"?":["Desktop","Unknown"],"*":void 0},Nn={Chrome:"Google Chrome",Edge:"Microsoft Edge","Edge WebView2":"Microsoft Edge WebView2","Chrome WebView":"Android WebView","Chrome Headless":"HeadlessChrome","Huawei Browser":"HuaweiBrowser","MIUI Browser":"Miui Browser","Opera Mobi":"OperaMobile",Yandex:"YaBrowser"},Ln={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[hr,[cr,pn+"Chrome"]],[/webview.+edge\/([\w\.]+)/i],[hr,[cr,cn+" WebView"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[hr,[cr,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[cr,hr],[/opios[\/ ]+([\w\.]+)/i],[hr,[cr,fn+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[hr,[cr,fn+" GX"]],[/\bopr\/([\w\.]+)/i],[hr,[cr,fn]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[hr,[cr,"Baidu"]],[/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i],[hr,[cr,"Maxthon"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim(?:browser|boat|jet))[\/ ]?([\d\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio|(?=comodo_)?dragon|otter|dooble|(?:lg |qute)browser|palemoon)\/([-\w\.]+)/i,/(heytap|ovi|115|surf|qwant)browser\/([\d\.]+)/i,/(qwant)(?:ios|mobile)\/([\d\.]+)/i,/(ecosia|weibo)(?:__| \w+@)([\d\.]+)/i],[cr,hr],[/quark(?:pc)?\/([-\w\.]+)/i],[hr,[cr,"Quark"]],[/\bddg\/([\w\.]+)/i],[hr,[cr,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[hr,[cr,"UCBrowser"]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[hr,[cr,"WeChat"]],[/konqueror\/([\w\.]+)/i],[hr,[cr,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[hr,[cr,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[hr,[cr,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[hr,[cr,"Smart "+Qr+gn]],[/(avast|avg)\/([\w\.]+)/i],[[cr,/(.+)/,"$1 Secure"+gn],hr],[/\bfocus\/([\w\.]+)/i],[hr,[cr,ln+" Focus"]],[/\bopt\/([\w\.]+)/i],[hr,[cr,fn+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[hr,[cr,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[hr,[cr,"Dolphin"]],[/coast\/([\w\.]+)/i],[hr,[cr,fn+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[hr,[cr,"MIUI"+gn]],[/fxios\/([\w\.-]+)/i],[hr,[cr,pn+ln]],[/\bqihoobrowser\/?([\w\.]*)/i],[hr,[cr,"360"]],[/\b(qq)\/([\w\.]+)/i],[[cr,/(.+)/,"$1Browser"],hr],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[cr,/(.+)/,"$1"+gn],hr],[/samsungbrowser\/([\w\.]+)/i],[hr,[cr,en+" Internet"]],[/metasr[\/ ]?([\d\.]+)/i],[hr,[cr,dn+" Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[cr,dn+" Mobile"],hr],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i],[cr,hr],[/(lbbrowser|rekonq)/i],[cr],[/ome\/([\w\.]+) \w* ?(iron) saf/i,/ome\/([\w\.]+).+qihu (360)[es]e/i],[hr,cr],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[cr,hn],hr,[lr,Sr]],[/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/(daum)apps[\/ ]([\w\.]+)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(bing)(?:web|sapphire)\/([\w\.]+)/i,/(instagram|snapchat|klarna)[\/ ]([-\w\.]+)/i],[cr,hr,[lr,Sr]],[/\bgsa\/([\w\.]+) .*safari\//i],[hr,[cr,"GSA"],[lr,Sr]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[hr,[cr,"TikTok"],[lr,Sr]],[/\[(linkedin)app\]/i],[cr,[lr,Sr]],[/(zalo(?:app)?)[\/\sa-z]*([\w\.-]+)/i],[[cr,/(.+)/,"Zalo"],hr,[lr,Sr]],[/(chromium)[\/ ]([-\w\.]+)/i],[cr,hr],[/headlesschrome(?:\/([\w\.]+)| )/i],[hr,[cr,an+" Headless"]],[/wv\).+chrome\/([\w\.]+).+edgw\//i],[hr,[cr,cn+" WebView2"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[cr,an+" WebView"],hr],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[hr,[cr,"Android"+gn]],[/chrome\/([\w\.]+) mobile/i],[hr,[cr,pn+"Chrome"]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[cr,hr],[/version\/([\w\.\,]+) .*mobile(?:\/\w+ | ?)safari/i],[hr,[cr,pn+"Safari"]],[/iphone .*mobile(?:\/\w+ | ?)safari/i],[[cr,pn+"Safari"]],[/version\/([\w\.\,]+) .*(safari)/i],[hr,cr],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[cr,[hr,"1"]],[/(webkit|khtml)\/([\w\.]+)/i],[cr,hr],[/(?:mobile|tablet);.*(firefox)\/([\w\.-]+)/i],[[cr,pn+ln],hr],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[cr,"Netscape"],hr],[/(wolvic|librewolf)\/([\w\.]+)/i],[cr,hr],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[hr,[cr,ln+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+(?= .+rv\:.+gecko\/\d+)|[0-4][\w\.]+(?!.+compatible))/i,/(amaya|dillo|doris|icab|ladybird|lynx|mosaic|netsurf|obigo|polaris|w3m|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/\b(links) \(([\w\.]+)/i],[cr,[hr,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[cr,[hr,/[^\d\.]+./,Yt]]],cpu:[[/\b((amd|x|x86[-_]?|wow|win)64)\b/i],[[dr,"amd64"]],[/(ia32(?=;))/i,/\b((i[346]|x)86)(pc)?\b/i],[[dr,"ia32"]],[/\b(aarch64|arm(v?[89]e?l?|_?64))\b/i],[[dr,"arm64"]],[/\b(arm(v[67])?ht?n?[fl]p?)\b/i],[[dr,"armhf"]],[/( (ce|mobile); ppc;|\/[\w\.]+arm\b)/i],[[dr,"arm"]],[/ sun4\w[;\)]/i],[[dr,"sparc"]],[/\b(avr32|ia64(?=;)|68k(?=\))|\barm(?=v([1-7]|[5-7]1)l?|;|eabi)|(irix|mips|sparc)(64)?\b|pa-risc)/i,/((ppc|powerpc)(64)?)( mac|;|\))/i,/(?:osf1|[freopnt]{3,4}bsd) (alpha)/i],[[dr,/ower/,Yt,En]],[/mc680.0/i],[[dr,"68k"]],[/winnt.+\[axp/i],[[dr,"alpha"]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[gr,[fr,en],[lr,wr]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr]|browser)[-\w]+)/i,/sec-(sgh\w+)/i],[gr,[fr,en],[lr,mr]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)[\/\);]/i],[gr,[fr,zr],[lr,mr]],[/\b(?:ios|apple\w+)\/.+[\(\/](ipad)/i,/\b(ipad)[\d,]*[;\] ].+(mac |i(pad)?)os/i],[gr,[fr,zr],[lr,wr]],[/(macintosh);/i],[gr,[fr,zr]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[gr,[fr,tn],[lr,mr]],[/\b((?:brt|eln|hey2?|gdi|jdn)-a?[lnw]09|(?:ag[rm]3?|jdn2|kob2)-a?[lw]0[09]hn)(?: bui|\)|;)/i],[gr,[fr,Wr],[lr,wr]],[/honor([-\w ]+)[;\)]/i],[gr,[fr,Wr],[lr,mr]],[/\b((?:ag[rs][2356]?k?|bah[234]?|bg[2o]|bt[kv]|cmr|cpn|db[ry]2?|jdn2|got|kob2?k?|mon|pce|scm|sht?|[tw]gr|vrd)-[ad]?[lw][0125][09]b?|605hw|bg2-u03|(?:gem|fdr|m2|ple|t1)-[7a]0[1-4][lu]|t1-a2[13][lw]|mediapad[\w\. ]*(?= bui|\)))\b(?!.+d\/s)/i],[gr,[fr,qr],[lr,wr]],[/(?:huawei) ?([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][\dc][adnt]?)\b(?!.+d\/s)/i],[gr,[fr,qr],[lr,mr]],[/oid[^\)]+; (2[\dbc]{4}(182|283|rp\w{2})[cgl]|m2105k81a?c)(?: bui|\))/i,/\b(?:xiao)?((?:red)?mi[-_ ]?pad[\w- ]*)(?: bui|\))/i],[[gr,/_/g," "],[fr,nn],[lr,wr]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note|max|cc)?[_ ]?(?:\d{0,2}\w?)[_ ]?(?:plus|se|lite|pro)?( 5g|lte)?)(?: bui|\))/i,/ ([\w ]+) miui\/v?\d/i],[[gr,/_/g," "],[fr,nn],[lr,mr]],[/droid.+; (cph2[3-6]\d[13579]|((gm|hd)19|(ac|be|in|kb)20|(d[en]|eb|le|mt)21|ne22)[0-2]\d|p[g-k]\w[1m]10)\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[gr,[fr,Yr],[lr,mr]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[gr,[fr,Zr],[lr,mr]],[/\b(opd2(\d{3}a?))(?: bui|\))/i],[gr,[fr,An,{OnePlus:["203","304","403","404","413","415"],"*":Zr}],[lr,wr]],[/(vivo (5r?|6|8l?|go|one|s|x[il]?[2-4]?)[\w\+ ]*)(?: bui|\))/i],[gr,[fr,"BLU"],[lr,mr]],[/; vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[gr,[fr,"Vivo"],[lr,mr]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[gr,[fr,"Realme"],[lr,mr]],[/(ideatab[-\w ]+|602lv|d-42a|a101lv|a2109a|a3500-hv|s[56]000|pb-6505[my]|tb-?x?\d{3,4}(?:f[cu]|xu|[av])|yt\d?-[jx]?\d+[lfmx])( bui|;|\)|\/)/i,/lenovo ?(b[68]0[08]0-?[hf]?|tab(?:[\w- ]+?)|tb[\w-]{6,7})( bui|;|\)|\/)/i],[gr,[fr,Qr],[lr,wr]],[/lenovo[-_ ]?([-\w ]+?)(?: bui|\)|\/)/i],[gr,[fr,Qr],[lr,mr]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ]([\w\s]+)(\)| bui)/i,/((?:moto(?! 360)[-\w\(\) ]+|xt\d{3,4}[cgkosw\+]?[-\d]*|nexus 6)(?= bui|\)))/i],[gr,[fr,Xr],[lr,mr]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[gr,[fr,Xr],[lr,wr]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[gr,[fr,Gr],[lr,wr]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+(?!.*(?:browser|netcast|android tv|watch|webos))(\w+)/i,/\blg-?([\d\w]+) bui/i],[gr,[fr,Gr],[lr,mr]],[/(nokia) (t[12][01])/i],[fr,gr,[lr,wr]],[/(?:maemo|nokia).*(n900|lumia \d+|rm-\d+)/i,/nokia[-_ ]?(([-\w\. ]*?))( bui|\)|;|\/)/i],[[gr,/_/g," "],[lr,mr],[fr,"Nokia"]],[/(pixel (c|tablet))\b/i],[gr,[fr,Vr],[lr,wr]],[/droid.+;(?: google)? (g(01[13]a|020[aem]|025[jn]|1b60|1f8f|2ybb|4s1m|576d|5nz6|8hhn|8vou|a02099|c15s|d1yq|e2ae|ec77|gh2x|kv4x|p4bc|pj41|r83y|tt9q|ur25|wvk6)|pixel[\d ]*a?( pro)?( xl)?( fold)?( \(5g\))?)( bui|\))/i],[gr,[fr,Vr],[lr,mr]],[/(google) (pixelbook( go)?)/i],[fr,gr],[/droid.+; (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-\w\w\d\d)(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[gr,[fr,rn],[lr,mr]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[gr,"Xperia Tablet"],[fr,rn],[lr,wr]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[gr,[fr,Mr],[lr,wr]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[gr,/(.+)/g,"Fire Phone $1"],[fr,Mr],[lr,mr]],[/(playbook);[-\w\),; ]+(rim)/i],[gr,fr,[lr,wr]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/(?:blackberry|\(bb10;) (\w+)/i],[gr,[fr,Hr],[lr,mr]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[gr,[fr,Kr],[lr,wr]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[gr,[fr,Kr],[lr,mr]],[/(nexus 9)/i],[gr,[fr,"HTC"],[lr,wr]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[fr,[gr,/_/g," "],[lr,mr]],[/tcl (xess p17aa)/i,/droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])(_\w(\w|\w\w))?(\)| bui)/i],[gr,[fr,"TCL"],[lr,wr]],[/droid [\w\.]+; (418(?:7d|8v)|5087z|5102l|61(?:02[dh]|25[adfh]|27[ai]|56[dh]|59k|65[ah])|a509dl|t(?:43(?:0w|1[adepqu])|50(?:6d|7[adju])|6(?:09dl|10k|12b|71[efho]|76[hjk])|7(?:66[ahju]|67[hw]|7[045][bh]|71[hk]|73o|76[ho]|79w|81[hks]?|82h|90[bhsy]|99b)|810[hs]))(_\w(\w|\w\w))?(\)| bui)/i],[gr,[fr,"TCL"],[lr,mr]],[/(itel) ((\w+))/i],[[fr,En],gr,[lr,An,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[gr,[fr,"Acer"],[lr,wr]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[gr,[fr,"Meizu"],[lr,mr]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[gr,[fr,"Ulefone"],[lr,mr]],[/; (energy ?\w+)(?: bui|\))/i,/; energizer ([\w ]+)(?: bui|\))/i],[gr,[fr,"Energizer"],[lr,mr]],[/; cat (b35);/i,/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i],[gr,[fr,"Cat"],[lr,mr]],[/((?:new )?andromax[\w- ]+)(?: bui|\))/i],[gr,[fr,"Smartfren"],[lr,mr]],[/droid.+; (a(in)?(0(15|59|6[35])|142)p?)/i],[gr,[fr,"Nothing"],[lr,mr]],[/; (x67 5g|tikeasy \w+|ac[1789]\d\w+)( b|\))/i,/archos ?(5|gamepad2?|([\w ]*[t1789]|hello) ?\d+[\w ]*)( b|\))/i],[gr,[fr,"Archos"],[lr,wr]],[/archos ([\w ]+)( b|\))/i,/; (ac[3-6]\d\w{2,8})( b|\))/i],[gr,[fr,"Archos"],[lr,mr]],[/; (n159v)/i],[gr,[fr,"HMD"],[lr,mr]],[/(imo) (tab \w+)/i,/(infinix|tecno) (x1101b?|p904|dp(7c|8d|10a)( pro)?|p70[1-3]a?|p904|t1101)/i],[fr,gr,[lr,wr]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus(?! zenw)|dell|jolla|meizu|motorola|polytron|tecno|micromax|advan)[-_ ]?([-\w]*)/i,/; (blu|hmd|imo|infinix|lava|oneplus|tcl|wiko)[_ ]([\w\+ ]+?)(?: bui|\)|; r)/i,/(hp) ([\w ]+\w)/i,/(microsoft); (lumia[\w ]+)/i,/(oppo) ?([\w ]+) bui/i,/(hisense) ([ehv][\w ]+)\)/i,/droid[^;]+; (philips)[_ ]([sv-x][\d]{3,4}[xz]?)/i],[fr,gr,[lr,mr]],[/(kobo)\s(ereader|touch)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i],[fr,gr,[lr,wr]],[/(surface duo)/i],[gr,[fr,Jr],[lr,wr]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[gr,[fr,"Fairphone"],[lr,mr]],[/((?:tegranote|shield t(?!.+d tv))[\w- ]*?)(?: b|\))/i],[gr,[fr,$r],[lr,wr]],[/(sprint) (\w+)/i],[fr,gr,[lr,mr]],[/(kin\.[onetw]{3})/i],[[gr,/\./g," "],[fr,Jr],[lr,mr]],[/droid.+; ([c6]+|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[gr,[fr,on],[lr,wr]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[gr,[fr,on],[lr,mr]],[/(philips)[\w ]+tv/i,/smart-tv.+(samsung)/i],[fr,[lr,yr]],[/hbbtv.+maple;(\d+)/i],[[gr,/^/,"SmartTV"],[fr,en],[lr,yr]],[/(vizio)(?: |.+model\/)(\w+-\w+)/i,/tcast.+(lg)e?. ([-\w]+)/i],[fr,gr,[lr,yr]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[fr,Gr],[lr,yr]],[/(apple) ?tv/i],[fr,[gr,zr+" TV"],[lr,yr]],[/crkey.*devicetype\/chromecast/i],[[gr,un+" Third Generation"],[fr,Vr],[lr,yr]],[/crkey.*devicetype\/([^/]*)/i],[[gr,/^/,"Chromecast "],[fr,Vr],[lr,yr]],[/fuchsia.*crkey/i],[[gr,un+" Nest Hub"],[fr,Vr],[lr,yr]],[/crkey/i],[[gr,un],[fr,Vr],[lr,yr]],[/(portaltv)/i],[gr,[fr,hn],[lr,yr]],[/droid.+aft(\w+)( bui|\))/i],[gr,[fr,Mr],[lr,yr]],[/(shield \w+ tv)/i],[gr,[fr,$r],[lr,yr]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[gr,[fr,tn],[lr,yr]],[/(bravia[\w ]+)( bui|\))/i],[gr,[fr,rn],[lr,yr]],[/(mi(tv|box)-?\w+) bui/i],[gr,[fr,nn],[lr,yr]],[/Hbbtv.*(technisat) (.*);/i],[fr,gr,[lr,yr]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[fr,/.+\/(\w+)/,"$1",An,{LG:"lge"}],[gr,In],[lr,yr]],[/(playstation \w+)/i],[gr,[fr,rn],[lr,vr]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[gr,[fr,Jr],[lr,vr]],[/(ouya)/i,/(nintendo) (\w+)/i,/(retroid) (pocket ([^\)]+))/i],[fr,gr,[lr,vr]],[/droid.+; (shield)( bui|\))/i],[gr,[fr,$r],[lr,vr]],[/\b(sm-[lr]\d\d[0156][fnuw]?s?|gear live)\b/i],[gr,[fr,en],[lr,br]],[/((pebble))app/i,/(asus|google|lg|oppo) ((pixel |zen)?watch[\w ]*)( bui|\))/i],[fr,gr,[lr,br]],[/(ow(?:19|20)?we?[1-3]{1,3})/i],[gr,[fr,Zr],[lr,br]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[gr,[fr,zr],[lr,br]],[/(opwwe\d{3})/i],[gr,[fr,Yr],[lr,br]],[/(moto 360)/i],[gr,[fr,Xr],[lr,br]],[/(smartwatch 3)/i],[gr,[fr,rn],[lr,br]],[/(g watch r)/i],[gr,[fr,Gr],[lr,br]],[/droid.+; (wt63?0{2,3})\)/i],[gr,[fr,on],[lr,br]],[/droid.+; (glass) \d/i],[gr,[fr,Vr],[lr,kr]],[/(pico) ([\w ]+) os\d/i],[fr,gr,[lr,kr]],[/(quest( \d| pro)?s?).+vr/i],[gr,[fr,hn],[lr,kr]],[/mobile vr; rv.+firefox/i],[[lr,kr]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[fr,[lr,Tr]],[/(aeobc)\b/i],[gr,[fr,Mr],[lr,Tr]],[/(homepod).+mac os/i],[gr,[fr,zr],[lr,Tr]],[/windows iot/i],[[lr,Tr]],[/droid.+; ([\w- ]+) (4k|android|smart|google)[- ]?tv/i],[gr,[lr,yr]],[/\b((4k|android|smart|opera)[- ]?tv|tv; rv:|large screen[\w ]+safari)\b/i],[[lr,yr]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew|; hmsc).+?(mobile|vr|\d) safari/i],[gr,[lr,An,{mobile:"Mobile",xr:"VR","*":wr}]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[lr,wr]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[lr,mr]],[/droid .+?; ([\w\. -]+)( bui|\))/i],[gr,[fr,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[hr,[cr,cn+"HTML"]],[/(arkweb)\/([\w\.]+)/i],[cr,hr],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[hr,[cr,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna|servo)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[cr,hr],[/ladybird\//i],[[cr,"LibWeb"]],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[hr,cr]],os:[[/(windows nt) (6\.[23]); arm/i],[[cr,/N/,"R"],[hr,An,_n]],[/(windows (?:phone|mobile|iot))(?: os)?[\/ ]?([\d\.]*( se)?)/i,/(windows)[\/ ](1[01]|2000|3\.1|7|8(\.1)?|9[58]|me|server 20\d\d( r2)?|vista|xp)/i],[cr,hr],[/windows nt ?([\d\.\)]*)(?!.+xbox)/i,/\bwin(?=3| ?9|n)(?:nt| 9x )?([\d\.;]*)/i],[[hr,/(;|\))/g,"",An,_n],[cr,vn]],[/(windows ce)\/?([\d\.]*)/i],[cr,hr],[/[adehimnop]{4,7}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv|ios(?=.+ip(?:ad|hone))|ip(?:ad|hone)(?: |.+i(?:pad)?)os)[\/ ]([\w\.]+)/i,/cfnetwork\/.+darwin/i],[[hr,/_/g,"."],[cr,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+(haiku|morphos))/i],[[cr,"macOS"],[hr,/_/g,"."]],[/android ([\d\.]+).*crkey/i],[hr,[cr,un+" Android"]],[/fuchsia.*crkey\/([\d\.]+)/i],[hr,[cr,un+" Fuchsia"]],[/crkey\/([\d\.]+).*devicetype\/smartspeaker/i],[hr,[cr,un+" SmartSpeaker"]],[/linux.*crkey\/([\d\.]+)/i],[hr,[cr,un+" Linux"]],[/crkey\/([\d\.]+)/i],[hr,[cr,un]],[/droid ([\w\.]+)\b.+(android[- ]x86)/i],[hr,cr],[/(ubuntu) ([\w\.]+) like android/i],[[cr,/(.+)/,"$1 Touch"],hr],[/(harmonyos)[\/ ]?([\d\.]*)/i,/(android|bada|blackberry|kaios|maemo|meego|openharmony|qnx|rim tablet os|sailfish|series40|symbian|tizen)\w*[-\/\.; ]?([\d\.]*)/i],[cr,hr],[/\(bb(10);/i],[hr,[cr,Hr]],[/(?:symbian ?os|symbos|s60(?=;)|series ?60)[-\/ ]?([\w\.]*)/i],[hr,[cr,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[hr,[cr,ln+" OS"]],[/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i,/webos(?:[ \/]?|\.tv-20(?=2[2-9]))(\d[\d\.]*)/i],[hr,[cr,"webOS"]],[/web0s;.+?(?:chr[o0]me|safari)\/(\d+)/i],[[hr,An,{25:"120",24:"108",23:"94",22:"87",6:"79",5:"68",4:"53",3:"38",2:"538",1:"537","*":"TV"}],[cr,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[hr,[cr,"watchOS"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[cr,"Chrome OS"],hr],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) (\w+)/i,/(xbox); +xbox ([^\);]+)/i,/(pico) .+os([\w\.]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/linux.+(mint)[\/\(\) ]?([\w\.]*)/i,/(mageia|vectorlinux|fuchsia|arcaos|arch(?= ?linux))[;l ]([\d\.]*)/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire|knoppix)(?: gnu[\/ ]linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/\b(aix)[; ]([1-9\.]{0,4})/i,/(hurd|linux|morphos)(?: (?:arm|x86|ppc)\w*| ?)([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) ?(r\d)?/i],[cr,hr],[/(sunos) ?([\d\.]*)/i],[[cr,"Solaris"],hr],[/\b(beos|os\/2|amigaos|openvms|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[cr,hr]]},Un=(Rn.call((Xt={init:{},isIgnore:{},isIgnoreRgx:{},toString:{}}).init,[[nr,[cr,hr,pr,lr]],[ir,[dr]],[or,[lr,gr,fr]],[ar,[cr,hr]],[sr,[cr,hr]]]),Rn.call(Xt.isIgnore,[[nr,[hr,pr]],[ar,[hr]],[sr,[hr]]]),Rn.call(Xt.isIgnoreRgx,[[nr,/ ?browser$/i],[sr,/ ?os$/i]]),Rn.call(Xt.toString,[[nr,[cr,hr]],[ir,[dr]],[or,[fr,gr]],[ar,[cr,hr]],[sr,[cr,hr]]]),Xt),jn=function(e,t){var r=Un.init[t],n=Un.isIgnore[t]||0,i=Un.isIgnoreRgx[t]||0,o=Un.toString[t]||0;function a(){Rn.call(this,r)}return a.prototype.getItem=function(){return e},a.prototype.withClientHints=function(){return wn?wn.getHighEntropyValues(Br).then(function(t){return e.setCH(new Fn(t,!1)).parseCH().get()}):e.parseCH().get()},a.prototype.withFeatureCheck=function(){return e.detectFeature().get()},t!=ur&&(a.prototype.is=function(e){var t=!1;for(var r in this)if(this.hasOwnProperty(r)&&!bn(n,r)&&En(i?xn(i,this[r]):this[r])==En(i?xn(i,e):e)){if(t=!0,e!=rr)break}else if(e==rr&&t){t=!t;break}return t},a.prototype.toString=function(){var e=Yt;for(var t in o)P(this[o[t]])!==rr&&(e+=(e?" ":Yt)+this[o[t]]);return e||rr}),wn||(a.prototype.then=function(e){var t=this,r=function(){for(var e in t)t.hasOwnProperty(e)&&(this[e]=t[e])};r.prototype={is:a.prototype.is,toString:a.prototype.toString};var n=new r;return e(n),n}),new a};function Fn(e,t){if(e=e||{},Rn.call(this,Br),t)Rn.call(this,[[Er,Sn(e[Or])],[Rr,Sn(e[Ar])],[mr,/\?1/.test(e[Lr])],[gr,Cn(e[Ur])],[xr,Cn(e[jr])],[Cr,Cn(e[Fr])],[dr,Cn(e[_r])],[Pr,Sn(e[Nr])],[Ir,Cn(e[Dr])]]);else for(var r in e)this.hasOwnProperty(r)&&P(e[r])!==rr&&(this[r]=e[r])}function Bn(e,t,r,n){return this.get=function(e){return e?this.data.hasOwnProperty(e)?this.data[e]:void 0:this.data},this.set=function(e,t){return this.data[e]=t,this},this.setCH=function(e){return this.uaCH=e,this},this.detectFeature=function(){if(mn&&mn.userAgent==this.ua)switch(this.itemType){case nr:mn.brave&&P(mn.brave.isBrave)==Zt&&this.set(cr,"Brave");break;case or:!this.get(lr)&&wn&&wn[mr]&&this.set(lr,mr),"Macintosh"==this.get(gr)&&mn&&P(mn.standalone)!==rr&&mn.maxTouchPoints&&mn.maxTouchPoints>2&&this.set(gr,"iPad").set(lr,wr);break;case sr:!this.get(cr)&&wn&&wn[xr]&&this.set(cr,wn[xr]);break;case ur:var e=this.data,t=function(t){return e[t].getItem().detectFeature().get()};this.set(nr,t(nr)).set(ir,t(ir)).set(or,t(or)).set(ar,t(ar)).set(sr,t(sr))}return this},this.parseUA=function(){switch(this.itemType!=ur&&On.call(this.data,this.ua,this.rgxMap),this.itemType){case nr:this.set(pr,Pn(this.get(hr)));break;case sr:if("iOS"==this.get(cr)&&"18.6"==this.get(hr)){var e=/\) Version\/([\d\.]+)/.exec(this.ua);e&&parseInt(e[1].substring(0,2),10)>=26&&this.set(hr,e[1])}}return this},this.parseCH=function(){var e=this.uaCH,t=this.rgxMap;switch(this.itemType){case nr:case ar:var r,n=e[Rr]||e[Er];if(n)for(var i=0;i<n.length;i++){var o=n[i].brand||n[i],a=n[i].version;this.itemType==nr&&!/not.a.brand/i.test(o)&&(!r||/Chrom/.test(r)&&o!=sn||r==cn&&/WebView2/.test(o))&&(o=An(o,Nn),(r=this.get(cr))&&!/Chrom/.test(r)&&/Chrom/.test(o)||this.set(cr,o).set(hr,a).set(pr,Pn(a)),r=o),this.itemType==ar&&o==sn&&this.set(hr,a)}break;case ir:var s=e[dr];s&&(s&&"64"==e[Ir]&&(s+="64"),On.call(this.data,s+";",t));break;case or:if(e[mr]&&this.set(lr,mr),e[gr]&&(this.set(gr,e[gr]),!this.get(lr)||!this.get(fr))){var u={};On.call(u,"droid 9; "+e[gr]+")",t),!this.get(lr)&&u.type&&this.set(lr,u.type),!this.get(fr)&&u.vendor&&this.set(fr,u.vendor)}if(e[Pr]){var c;if("string"!=typeof e[Pr])for(var l=0;!c&&l<e[Pr].length;)c=An(e[Pr][l++],Dn);else c=An(e[Pr],Dn);this.set(lr,c)}break;case sr:var f=e[xr];if(f){var h=e[Cr];f==vn&&(h=parseInt(Pn(h),10)>=13?"11":"10"),this.set(cr,f).set(hr,h)}this.get(cr)==vn&&"Xbox"==e[gr]&&this.set(cr,"Xbox").set(hr,void 0);break;case ur:var d=this.data,p=function(t){return d[t].getItem().setCH(e).parseCH().get()};this.set(nr,p(nr)).set(ir,p(ir)).set(or,p(or)).set(ar,p(ar)).set(sr,p(sr))}return this},Rn.call(this,[["itemType",e],["ua",t],["uaCH",n],["rgxMap",r],["data",jn(this,e)]]),this}function Mn(e,t,r){if(P(e)===er?(kn(e,!0)?(P(t)===er&&(r=t),t=e):(r=e,t=void 0),e=void 0):P(e)!==tr||kn(t,!0)||(r=t,t=void 0),r)if(P(r.append)===Zt){var n={};r.forEach(function(e,t){n[String(t).toLowerCase()]=e}),r=n}else{var i={};for(var o in r)r.hasOwnProperty(o)&&(i[String(o).toLowerCase()]=r[o]);r=i}if(!(this instanceof Mn))return new Mn(e,t,r).getResult();var a=P(e)===tr?e:r&&r[$t]?r[$t]:mn&&mn.userAgent?mn.userAgent:Yt,s=new Fn(r,!0),u=t?function(e,t){var r={},n=t;if(!kn(t))for(var i in n={},t)for(var o in t[i])n[o]=t[i][o].concat(n[o]?n[o]:[]);for(var a in e)r[a]=n[a]&&n[a].length%2==0?n[a].concat(e[a]):e[a];return r}(Ln,t):Ln,c=function(e){return e==ur?function(){return new Bn(e,a,u,s).set("ua",a).set(nr,this.getBrowser()).set(ir,this.getCPU()).set(or,this.getDevice()).set(ar,this.getEngine()).set(sr,this.getOS()).get()}:function(){return new Bn(e,a,u[e],s).parseUA().get()}};return Rn.call(this,[["getBrowser",c(nr)],["getCPU",c(ir)],["getDevice",c(or)],["getEngine",c(ar)],["getOS",c(sr)],["getResult",c(ur)],["getUA",function(){return a}],["setUA",function(e){return Tn(e)&&(a=In(e,500)),this}]]).setUA(a),this}Mn.VERSION="2.0.6",Mn.BROWSER=yn([cr,hr,pr,lr]),Mn.CPU=yn([dr]),Mn.DEVICE=yn([gr,fr,lr,vr,mr,yr,wr,br,Tr]),Mn.ENGINE=Mn.OS=yn([cr,hr]);var zn=function(e){return!(!function(e){return null===e}(e)&&!function(e){return void 0===e}(e)&&""!==e)},Kn="undefined"!=typeof performance&&"function"==typeof performance.now?function(){return performance.now()}:function(){return Date.now()};function Hn(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"0",n=String(e);if(n.length<t){for(var i=n,o=0;o<t-n.length;o+=1)i=r+i;return i}return n}var Vn=0,qn=0,Qn=Math.floor(65535*Math.random())<<16|Date.now()%65535,Wn=function(){var e=Date.now();e===qn?Vn++:(Vn=0,qn=e);var t=Hn(e.toString(16),11,"0"),r=e>>12&4095,n=4095&e,i=e>>36&255,o=t+Hn(Vn.toString(16),4,"0")+Hn((65535&Qn).toString(16),4,"0")+(Hn((e>>24&1048575).toString(16),5,"0")+Hn(i.toString(16),2,"0")+Hn(r.toString(16),3,"0")+Hn(n.toString(16),3,"0"));return o=Hn(o=o.slice(0,32),32,"0"),"".concat(o.slice(0,8)).concat(o.slice(8,16)).concat(o.slice(16))},Gn=0;function Jn(){var e=Date.now().toString(36).slice(-8).padStart(8,"0");Gn=(Gn+1)%46656;var t=Math.floor(36*Math.random());return e+(Gn.toString(36).padStart(2,"0")+t.toString(36)).padStart(4,"0").slice(-4)}var Xn,$n=function(){return function(){if("undefined"!=typeof WeixinJSBridge)return!0;var e=navigator.userAgent.toLowerCase();return!(-1===(null==e?void 0:e.indexOf("micromessenger"))&&"micromessenger"!=(null==e?void 0:e.match(/MicroMessenger/i)))}()?"WECHAT":function(){var e,t=null===(e=navigator)||void 0===e||null===(e=e.userAgent)||void 0===e?void 0:e.toLowerCase();return!(-1===(null==t?void 0:t.indexOf("alipay"))&&"alipay"!=(null==t?void 0:t.match(/Alipay/i)))}()?"ALIPAY":"OTHER"},Yn=function(e){var t;console.log("extractHashPath--",e);var r=null==e?void 0:e.indexOf("#");if(-1===r)return"";var n=null==e?void 0:e.slice(r+1),i=n?null===(t=n.replace(/^\//,""))||void 0===t?void 0:t.split("?")[0]:"";return console.log("hashPart--pathWithoutQuery",n,i),null!=i&&i.includes("/")?null==i?void 0:i.split("/")[0]:i},Zn=function(e,t){var r=e;if(e&&"string"==typeof e){var n=e.split("/");n.length>1&&(r=n[0])}var i,o=r.toLowerCase();if(["HONGSHUN","IOP-V2","XIAOCHENG-V2","BLACKGOLD"].includes(t)&&("chargemoney"===o&&(null===(i=window.location.href)||void 0===i?void 0:i.indexOf("showMoney=false"))>-1))return"EQUITY";return e&&"string"==typeof e&&e.includes("/")?r:{login:"LOGIN",buyPkgListNew:"BUY_LIST",cardDetailInfo:"CARD_DETAIL",flowSettle:"SETTLEMENT",chargeMoney:"WALLET",payOrderDetail:"ORDER_DETAIL",alipayOrderDetail:"ORDER_DETAIL"}[e]||e},ei=function(){var e=navigator.userAgent.toLowerCase();return/android|adr/.test(e)?"Android":/iphone|ipad|ipod|ios/.test(e)?"iOS":"其他"},ti=function(e){try{return new Mn(e||("undefined"!=typeof navigator?navigator.userAgent:"")).getResult()}catch(e){return console.warn("UAParser 解析失败:",e),{ua:"undefined"!=typeof navigator?navigator.userAgent:"",browser:{},engine:{},os:{name:ei()},device:{},cpu:{}}}},ri=function(e){try{var t,r=ti(e);if(null!=r&&null!==(t=r.os)&&void 0!==t&&t.version)return r.os.version;var n=e||("undefined"!=typeof navigator?navigator.userAgent:""),i=n.match(/OS\s+(\d+)[_.](\d+)/i);if(i)return"".concat(i[1],".").concat(i[2]);var o=n.match(/Android\s+([\d.]+)/i);return o?o[1]:null}catch(e){return console.warn("获取系统版本失败:",e),null}},ni=function(){return h(function e(t){l(this,e),this.config=t,this.isReporting=!1,this._cachedSessionId=null,this._sessionIdFromStorage=!1},[{key:"report",value:(f=u(y().m(function e(t,r){var n,i;return y().w(function(e){for(;;)switch(e.p=e.n){case 0:if(e.p=0,n=this.formatReportData(t,r),!this.config.getConfig().customReport){e.n=2;break}return e.n=1,this.config.getConfig().customReport(t,n);case 1:e.n=3;break;case 2:return e.n=3,this.defaultReport(t,n);case 3:e.n=5;break;case 4:e.p=4,i=e.v,console.error("上报失败:",i),this.config.getConfig().debugSwitch&&console.error("上报失败详情:",{type:t,error:i.message,stack:i.stack});case 5:return e.a(2)}},e,this,[[0,4]])})),function(e,t){return f.apply(this,arguments)})},{key:"getDeviceInfo",value:function(){return{screen:{width:screen.width,height:screen.height,availWidth:screen.availWidth,availHeight:screen.availHeight,colorDepth:screen.colorDepth,pixelDepth:screen.pixelDepth},viewport:{width:window.innerWidth,height:window.innerHeight},connection:navigator.connection?{effectiveType:navigator.connection.effectiveType,downlink:navigator.connection.downlink,rtt:navigator.connection.rtt}:null,memory:navigator.memory?{usedJSHeapSize:navigator.memory.usedJSHeapSize,totalJSHeapSize:navigator.memory.totalJSHeapSize,jsHeapSizeLimit:navigator.memory.jsHeapSizeLimit}:null}}},{key:"getSessionId",value:function(){if(this._sessionIdFromStorage&&this._cachedSessionId)return this._cachedSessionId;var e=this.config.getConfig().sessionId||"";if(!this._sessionIdFromStorage&&"undefined"!=typeof sessionStorage)try{var t=sessionStorage.getItem("SS_TRACESDK_INFO");if(t){var r=JSON.parse(t);if(r&&!zn(r.sessionId))return e=r.sessionId,this.config.updateConfig({sessionId:e}),this._cachedSessionId=e,this._sessionIdFromStorage=!0,this.config.getConfig().debugSwitch&&console.log("从 sessionStorage 成功读取 sessionId:",e),e}this.config.getConfig().debugSwitch&&console.log("sessionStorage 中未找到有效的 sessionId,下次继续尝试读取")}catch(e){this.config.getConfig().debugSwitch&&console.warn("读取 SS_TRACESDK_INFO 失败,下次继续尝试:",e)}return zn(e)&&(e=Wn(),this.config.updateConfig({sessionId:e})),e}},{key:"formatReportData",value:function(e,t){var r,n,i,o={sessionId:this.getSessionId()||"",channel:$n(),uiVer:this.config.getConfig().uiVersion,osType:(i=ti(),zn(null==i?void 0:i.os)?ei():["iOS","Android"].includes(null==i||null===(r=i.os)||void 0===r?void 0:r.name)?(console.log("parseagernt--",null==i?void 0:i.os),null==i||null===(n=i.os)||void 0===n?void 0:n.name):"其他"),osVersion:ri(),screenWidth:screen.width,screenHeight:screen.height,windowInnerWidth:window.innerWidth,windowInnerHeight:window.innerHeight,netType:navigator.connection?navigator.connection.effectiveType:"",userAgent:navigator.userAgent,tags:{customerId:this.config.getConfig().customerId,deviceId:this.config.getConfig().deviceId,deviceNo:this.config.getConfig().deviceNo,userId:this.config.getConfig().userId}},a=Array.isArray(t)?t:[t];return a.forEach(function(e){var t=Object.assign({},o.tags||{},e&&e.tags||{});Object.assign(e,o),Object.keys(t).length>0&&(e.tags=t)}),a}},{key:"defaultReport",value:(c=u(y().m(function e(t,r){var n,i;return y().w(function(e){for(;;)switch(e.n){case 0:if(n=this.config.getReportUrl(),i=this.config.getThirdPartyConfig(),!n){e.n=1;break}return e.n=1,this.reportToBackend(n,r);case 1:if(!(i&&Object.keys(i).length>0)){e.n=2;break}return e.n=2,this.reportToThirdParty(i,r);case 2:return e.a(2)}},e,this)})),function(e,t){return c.apply(this,arguments)})},{key:"reportToBackend",value:(s=u(y().m(function e(t,r){var n,i;return y().w(function(e){for(;;)switch(e.n){case 0:if(!navigator.sendBeacon||this.isObjectOverSizeLimit(r,60)){e.n=3;break}if((n=new FormData).append("events",JSON.stringify(r)),i=navigator.sendBeacon(t,n),this.config.getConfig().debugSwitch&&console.log("上报数据:",t,r),i){e.n=2;break}return e.n=1,this.reportViaAxios(t,n);case 1:case 4:return e.a(2,e.v);case 2:e.n=5;break;case 3:return this.config.getConfig().debugSwitch&&console.warn("浏览器不支持 sendBeacon,使用 axios"),e.n=4,this.reportViaAxios(t,r);case 5:return e.a(2)}},e,this)})),function(e,t){return s.apply(this,arguments)})},{key:"reportViaAxios",value:(a=u(y().m(function e(t,r){var n,i;return y().w(function(e){for(;;)switch(e.p=e.n){case 0:return e.p=0,e.n=1,Jt.post(t,r);case 1:return n=e.v,e.a(2,n.data);case 2:e.p=2,i=e.v,console.error("后端上报失败:",i);case 3:return e.a(2)}},e,null,[[0,2]])})),function(e,t){return a.apply(this,arguments)})},{key:"reportToThirdParty",value:(o=u(y().m(function e(t,r){var n,i;return y().w(function(e){for(;;)switch(e.p=e.n){case 0:return n=[],t.baidu&&window._hmt&&n.push(this.reportToBaidu(t.baidu,r)),t.umeng&&window._um&&n.push(this.reportToUmeng(t.umeng,r)),t.sensors&&window.sensors&&n.push(this.reportToSensors(t.sensors,r)),t.tencent&&window.MTA&&n.push(this.reportToTencent(t.tencent,r)),t.custom&&n.push(this.reportToCustom(t.custom,r)),e.p=1,e.n=2,Promise.allSettled(n);case 2:e.n=4;break;case 3:e.p=3,i=e.v,console.error("第三方上报失败:",i);case 4:return e.a(2)}},e,this,[[1,3]])})),function(e,t){return o.apply(this,arguments)})},{key:"reportToBaidu",value:(i=u(y().m(function e(t,r){return y().w(function(e){for(;;)switch(e.n){case 0:window._hmt&&window._hmt.push(["_trackEvent",r.type,JSON.stringify(r.data)]);case 1:return e.a(2)}},e)})),function(e,t){return i.apply(this,arguments)})},{key:"reportToUmeng",value:(n=u(y().m(function e(t,r){return y().w(function(e){for(;;)switch(e.n){case 0:window._um&&window._um.push(["track",r.type,r.data]);case 1:return e.a(2)}},e)})),function(e,t){return n.apply(this,arguments)})},{key:"reportToSensors",value:(r=u(y().m(function e(t,r){return y().w(function(e){for(;;)switch(e.n){case 0:window.sensors&&window.sensors.track(r.type,r.data[0]||{});case 1:return e.a(2)}},e)})),function(e,t){return r.apply(this,arguments)})},{key:"reportToTencent",value:(t=u(y().m(function e(t,r){return y().w(function(e){for(;;)switch(e.n){case 0:window.MTA&&window.MTA.Event.stat(r.type,r.data[0]||{});case 1:return e.a(2)}},e)})),function(e,r){return t.apply(this,arguments)})},{key:"reportToCustom",value:(e=u(y().m(function e(t,r){return y().w(function(e){for(;;)switch(e.n){case 0:if("function"!=typeof t.report){e.n=1;break}return e.n=1,t.report(r);case 1:return e.a(2)}},e)})),function(t,r){return e.apply(this,arguments)})},{key:"isObjectOverSizeLimit",value:function(e,t){var r=JSON.stringify(e);return(new TextEncoder).encode(r).length/1024>t}}]);var e,t,r,n,i,o,a,s,c,f}(),ii=function(){return h(function e(t){l(this,e),this.config=t,this.reporter=new ni(t),this.errorQueue=[],this.isInitialized=!1,this.reportTimer=null,this.errorCache=new Map,this.errorCacheTimeout=5e3,this.maxCacheSize=100,this.errorFingerprint=this.createErrorFingerprint.bind(this),this.errorTimeout=null,this.resourceErrorTimeout=null,this.lastResourceError=null},[{key:"createErrorFingerprint",value:function(e,t){var r=(null==e?void 0:e.message)||(null==e?void 0:e.toString())||e,n=(null==e?void 0:e.stack)||t.stack,i=t.type||"unknown",o=window.location.href;return"".concat(i,":").concat(r,":").concat(o,":").concat(n?n.split("\n")[0]:"")}},{key:"isDuplicateError",value:function(e,t){var r=this.errorFingerprint(e,t),n=Date.now();if((this.cleanupErrorCache(n),this.errorCache.has(r))&&n-this.errorCache.get(r)<this.errorCacheTimeout)return!0;if(this.errorCache.set(r,n),this.errorCache.size>this.maxCacheSize){var i=this.errorCache.keys().next().value;this.errorCache.delete(i)}return!1}},{key:"cleanupErrorCache",value:function(e){var t,r=d(this.errorCache.entries());try{for(r.s();!(t=r.n()).done;){var n=T(t.value,2),i=n[0];e-n[1]>this.errorCacheTimeout&&this.errorCache.delete(i)}}catch(e){r.e(e)}finally{r.f()}}},{key:"init",value:function(){if(!this.isInitialized){var e=this.config.getConfig();(e.enableErrorTracking||e.enableResourceError)&&this.setupErrorListener(),e.enableUnhandledRejection&&this.setupUnhandledRejectionListener(),e.reportInterval>0&&this.setupPeriodicReport(),this.isInitialized=!0}}},{key:"setupPeriodicReport",value:function(){var e=this,t=this.config.getConfig().reportInterval;t>0&&(this.reportTimer&&clearInterval(this.reportTimer),this.reportTimer=setInterval(function(){e.flushErrorQueue()},t))}},{key:"setupErrorListener",value:function(){var e=this;window.addEventListener("error",function(t){t.target&&t.target!==window?e.handleResourceError(t):e.handleJavaScriptError(t)},!0)}},{key:"handleJavaScriptError",value:function(e){var t=this;this.errorTimeout&&clearTimeout(this.errorTimeout),this.errorTimeout=setTimeout(function(){var r;t.handleError(e.error||e.message,{type:"javascript",filename:e.filename,lineno:e.lineno,colno:e.colno,stack:null===(r=e.error)||void 0===r?void 0:r.stack})},100)}},{key:"handleResourceError",value:function(e){var t=this,r="".concat(e.target.tagName,":").concat(e.target.src||e.target.href);this.lastResourceError!==r?(this.lastResourceError=r,this.resourceErrorTimeout&&clearTimeout(this.resourceErrorTimeout),this.resourceErrorTimeout=setTimeout(function(){t.handleError("Resource load failed: ".concat(e.target.src||e.target.href),{type:"resource",tagName:e.target.tagName,src:e.target.src,href:e.target.href}),setTimeout(function(){t.lastResourceError=null},2e3)},100)):this.config.getConfig().debugSwitch&&console.log("忽略重复的资源加载错误:",r)}},{key:"setupUnhandledRejectionListener",value:function(){var e=this,t=null,r=null;window.addEventListener("unhandledrejection",function(n){var i,o,a="".concat((null===(i=n.reason)||void 0===i?void 0:i.message)||n.reason,":").concat((null===(o=n.reason)||void 0===o?void 0:o.stack)||"");r!==a?(r=a,t&&clearTimeout(t),t=setTimeout(function(){var t;e.handleError(n.reason,{type:"unhandledrejection",stack:null===(t=n.reason)||void 0===t?void 0:t.stack}),setTimeout(function(){r=null},1e3)},100)):e.config.getConfig().debugSwitch&&console.log("忽略重复的 Promise 拒绝:",n.reason)})}},{key:"handleError",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.isDuplicateError(e,t))this.config.getConfig().debugSwitch&&console.log("忽略重复错误:",(null==e?void 0:e.message)||e);else{var r=this.parseStack(e),n=w({message:(null==e?void 0:e.message)||(null==e?void 0:e.toString())||e,stack:(null==e?void 0:e.stack)||t.stack,type:t.type||"unknown",timestamp:Date.now(),url:window.location.href,userAgent:navigator.userAgent,fileName:r.fileName,lineNumber:r.lineNumber,columnNumber:r.columnNumber,functionName:r.functionName,stackFrames:r.stackFrames},t);this.errorQueue.push(n),0===this.config.getConfig().reportInterval?this.reporter.report("error",[n]):this.errorQueue.length>=this.config.getConfig().maxQueueSize&&this.flushErrorQueue()}}},{key:"parseStack",value:function(e){var t=(null==e?void 0:e.stack)||"",r=(null==e?void 0:e.message)||(null==e?void 0:e.toString())||"",n={errMessage:r,errStack:t,fileName:"",lineNumber:"",columnNumber:"",functionName:"",stackFrames:[]};if(!t)return n;try{var i=/^\s*at\s+([^(]+?)\s+\((.+?):(\d+):(\d+)\)$/,o=/^\s*at\s+(.+?):(\d+):(\d+)$/,a=/^\s*([^@]*)@(.+?):(\d+):(\d+)$/,s=t;if(r&&t.startsWith(r))s=t.substring(r.length).replace(/^\n+/,"");else if(t.includes("\n")){var u=t.split("\n");!u[0]||u[0].trim().startsWith("at")||u[0].includes("@")||(s=u.slice(1).join("\n"))}var c,l=s.split("\n").filter(function(e){return e.trim()}),f=[],h=d(l);try{for(h.s();!(c=h.n()).done;){var p=c.value,g=null,v=p.match(i);v?g={functionName:v[1].trim(),fileName:v[2],lineNumber:parseInt(v[3]),columnNumber:parseInt(v[4])}:(v=p.match(o))?g={functionName:"",fileName:v[1],lineNumber:parseInt(v[2]),columnNumber:parseInt(v[3])}:(v=p.match(a))&&(g={functionName:v[1].trim(),fileName:v[2],lineNumber:parseInt(v[3]),columnNumber:parseInt(v[4])}),g&&f.push(g)}}catch(e){h.e(e)}finally{h.f()}if(f.length>0){var m=f[0];n.fileName=m.fileName,n.lineNumber=m.lineNumber,n.columnNumber=m.columnNumber,n.functionName=m.functionName}n.stackFrames=f}catch(e){var w;null!==(w=this.config)&&void 0!==w&&null!==(w=w.getConfig())&&void 0!==w&&w.debugSwitch&&console.warn("解析堆栈失败:",e)}return n}},{key:"reportError",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.handleError(e,t)}},{key:"flushErrorQueue",value:function(){this.errorQueue.length>0&&(this.reporter.report("error",S(this.errorQueue)),this.errorQueue=[])}},{key:"destroy",value:function(){this.config.getConfig().reportInterval>0&&this.flushErrorQueue(),this.reportTimer&&(clearInterval(this.reportTimer),this.reportTimer=null),this.isInitialized=!1}}])}(),oi=function(){return h(function e(t){l(this,e),this.config=t,this.reporter=new ni(t),this.eventQueue=[],this.isInitialized=!1,this.clickListener=null,this.pageViewListener=null,this.reportTimer=null,this.originalPushState=null,this.originalReplaceState=null,this.pageHistory=[],this.currentPage=null,this.currentPageStartTime=Date.now(),this.previousPage=null,this.previousPageStayTime=0,this.currentRoute=null,this.routeStartTime=Date.now(),this.vueRouter=null,this._lastPageStartUri=null,this._lastPageStartTs=0},[{key:"init",value:function(){if(!this.isInitialized){var e=this.config.getConfig();this.currentPage={url:window.location.href,title:document.title,enterTime:Date.now(),referrer:document.referrer},this.currentPageStartTime=Date.now(),e.enableClickTracking&&this.setupClickTracking(),e.enablePageViewTracking&&this.setupPageViewTracking(),document.addEventListener("visibilitychange",function(){}),this.config.getConfig().reportInterval>0&&this.setupPeriodicReport(),this.isInitialized=!0}}},{key:"handlePageUnload",value:function(){if(!this._isUnloadingHandled&&(this._isUnloadingHandled=!0,this.currentPage)){var e,t=Date.now()-this.currentPageStartTime,r=this.config.getConfig().uiVersion,n=Zn(Yn(this.currentPage.url),r),i=Yn(this.currentPage.url),o=Yn((null===(e=this.previousPage)||void 0===e?void 0:e.url)||"");this.reportPageViewEvent("pageEnd",{pageKey:n,pageUri:i,refer:o,duration:t,timestamp:Date.now()})}}},{key:"setupClickTracking",value:function(){var e=this;this.clickListener=function(t){var r,n=t.target,i={type:"click",timestamp:Date.now(),url:window.location.href,element:{tagName:n.tagName,className:n.className,id:n.id,text:null===(r=n.textContent)||void 0===r?void 0:r.substring(0,50)},position:{x:t.clientX,y:t.clientY}};e.handleEvent("click",i)},document.addEventListener("click",this.clickListener,!0)}},{key:"setupPageViewTracking",value:function(){var e=this,t=this.config.getConfig().pageViewTracking||{},r=window.location.href,n=0,i=t.debounce||100;this.pageViewListener=function(){var t,o=window.location.href,a=Date.now();if(!e._isUnloadingHandled){var s=Yn(o);if(!(null!=e._lastPageStartUri&&s===e._lastPageStartUri&&a-e._lastPageStartTs<i))if(!(s===Yn(r)&&a-n<i)){var u=e.config.getConfig().uiVersion,c=Yn(o);if(e.currentPage&&e.currentPage.url!==o){var l,f=a-e.currentPageStartTime,h=Zn(Yn(e.currentPage.url),u),d=Yn(e.currentPage.url),p=Yn((null===(l=e.previousPage)||void 0===l?void 0:l.url)||"");e.reportPageViewEvent("pageEnd",{pageKey:h,pageUri:d,refer:p,duration:f,timestamp:a})}e.handlePageChange(o,a),r=o,n=a,e._lastPageStartUri=c,e._lastPageStartTs=a;var g=Zn(c,u),v=g||c;if("undefined"!=typeof window&&v)try{window.__SS_TRACKER_LAST_PAGESTART__=window.__SS_TRACKER_LAST_PAGESTART__||{};if(a-Number(window.__SS_TRACKER_LAST_PAGESTART__[v]||0)<1e4)return;window.__SS_TRACKER_LAST_PAGESTART__[v]=a}catch(e){}e.reportPageViewEvent("pageStart",{pageKey:g,pageUri:c,refer:Yn((null===(t=e.previousPage)||void 0===t?void 0:t.url)||""),timestamp:a})}}},!1!==t.listenPopstate&&window.addEventListener("popstate",this.pageViewListener),!1!==t.listenHistoryAPI&&(this.originalPushState=history.pushState,this.originalReplaceState=history.replaceState,history.pushState=function(){for(var e=this,t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];this.originalPushState.apply(history,r),setTimeout(function(){e.pageViewListener()},0)}.bind(this),history.replaceState=function(){for(var e=this,t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];this.originalReplaceState.apply(history,r),setTimeout(function(){e.pageViewListener()},0)}.bind(this)),t.vueRouterMode&&this.config.getConfig().debugSwitch&&console.log("Vue Router 模式:页面浏览追踪已优化");var o=function(){e.pageViewListener()};!function(){if(e.config.getConfig().userId)o();else var t=0,r=setInterval(function(){if(t++,e.config.getConfig().userId)return clearInterval(r),void o();t>=25&&(clearInterval(r),o())},100)}()}},{key:"setupPeriodicReport",value:function(){var e=this,t=this.config.getConfig().reportInterval;t>0&&(this.reportTimer&&clearInterval(this.reportTimer),this.reportTimer=setInterval(function(){e.flushEventQueue()},t))}},{key:"handlePageChange",value:function(e,t){this.currentPage&&(this.previousPage=w({},this.currentPage),this.pageHistory.push(w({},this.previousPage)),this.pageHistory.length>20&&this.pageHistory.shift()),this.currentPage={url:e,title:document.title,enterTime:t,referrer:document.referrer},this.currentPageStartTime=t}},{key:"setupVueRouterMonitoring",value:function(e){var t,r=this;e&&!this.vueRouter&&(this.vueRouter=e,this.currentRoute=e.currentRoute.value,e.beforeEach(function(e,t,n){t.name&&r.handleRouteLeave(t,e),n()}),e.afterEach(function(e,t){r.handleRouteEnter(e,t)}),e.beforeResolve(function(e,t,n){t.name&&r.calculateRouteStayTime(t),n()}),null!==(t=this.config)&&void 0!==t&&null!==(t=t.getConfig())&&void 0!==t&&t.debugSwitch&&console.log("Vue Router 监控已设置"))}},{key:"handleRouteLeave",value:function(e,t){var r=Date.now()-this.routeStartTime;this.recordRouteStayTime(e,r),this.currentRoute=e,this.routeStartTime=Date.now()}},{key:"handleRouteEnter",value:function(e,t){this.routeStartTime=Date.now(),this.currentRoute=e,this.recordRouteEnter(e,t)}},{key:"recordRouteStayTime",value:function(e,t){var r,n;this.previousPage||(this.previousPage={url:(null==e?void 0:e.fullPath)||(null==e?void 0:e.path)||"",title:(null==e||null===(n=e.meta)||void 0===n?void 0:n.title)||(null==e?void 0:e.name)||"unknown"});this.previousPage.stayTime=t,this.previousPageStayTime=t,null!==(r=this.config)&&void 0!==r&&null!==(r=r.getConfig())&&void 0!==r&&r.debugSwitch&&console.log("路由停留时间数据",this.previousPage)}},{key:"recordRouteEnter",value:function(e,t){var r;null!==(r=this.config)&&void 0!==r&&null!==(r=r.getConfig())&&void 0!==r&&r.debugSwitch&&console.log("进入路由: ".concat(e.name||e.path))}},{key:"calculateRouteStayTime",value:function(e){return this.routeStartTime?Date.now()-this.routeStartTime:0}},{key:"getCurrentRoute",value:function(){return this.currentRoute}},{key:"getPreviousPageInfo",value:function(){return{previousPage:this.previousPage?{url:this.previousPage.url,title:this.previousPage.title,stayTime:this.previousPageStayTime}:null,previousPageStayTime:this.previousPageStayTime}}},{key:"getCurrentPageStayTime",value:function(){return this.currentPageStartTime?Date.now()-this.currentPageStartTime:0}},{key:"getCurrentRouteStayTime",value:function(){return this.routeStartTime?Date.now()-this.routeStartTime:0}},{key:"handleEvent",value:function(e,t){var r,n=this.getPreviousPageInfo(),i=w(w({},t),{},{tags:w(w({},t.tags),{},{refer:Yn(null==n||null===(r=n.previousPage)||void 0===r?void 0:r.url)})});0!==this.config.getConfig().reportInterval?(this.eventQueue.push(i),this.eventQueue.length>=this.config.getConfig().maxQueueSize&&this.flushEventQueue()):this.reporter.report("event",[i])}},{key:"reportPageViewEvent",value:function(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("pageStart"===e){var n=(null==r?void 0:r.pageKey)||"",i=(null==r?void 0:r.pageUri)||"",o=n||i;if(o){var a=Date.now();try{if("undefined"!=typeof window){window.__SS_TRACKER_DEDUP_PAGESTART__=window.__SS_TRACKER_DEDUP_PAGESTART__||{};var s="SS_TRACKER_DEDUP_PAGESTART_".concat(o);if(a-Number(window.__SS_TRACKER_DEDUP_PAGESTART__[s]||0)<1e4)return;window.__SS_TRACKER_DEDUP_PAGESTART__[s]=a}}catch(e){}try{if("undefined"!=typeof sessionStorage){var u="SS_TRACKER_DEDUP_PAGESTART_".concat(o);if(a-Number(sessionStorage.getItem(u)||0)<1e4)return;sessionStorage.setItem(u,String(a))}}catch(e){}}}var c={refer:null!=r.refer?r.refer:Yn((null===(t=this.previousPage)||void 0===t?void 0:t.url)||"")};"pageEnd"===e&&null!=r.duration&&(c.duration=r.duration);var l={uuid:Jn(),timestamp:null!=r.timestamp?r.timestamp:Date.now(),pageKey:r.pageKey,pageUri:r.pageUri,eventType:"VIEW",eventName:e,tags:c};0!==this.config.getConfig().reportInterval?(this.eventQueue.push(l),this.eventQueue.length>=this.config.getConfig().maxQueueSize&&this.flushEventQueue()):this.reporter.report("event",[l])}},{key:"reportEvent",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=w(w({uuid:Jn(),timestamp:Date.now(),pageKey:Zn(Yn(window.location.href),this.config.getConfig().uiVersion),pageUri:Yn(window.location.href),eventType:"CLICK"},n),{},{tags:w({actionKey:e},r)});"CREATE_ORDER"===e?this.reporter.report("event",[i]).catch(function(e){console.error("CREATE_ORDER 事件上报失败:",e),t.config.getConfig().debugSwitch&&console.error("CREATE_ORDER 事件上报失败详情:",e)}):this.handleEvent(e,i)}},{key:"reportCustomEvent",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r={uuid:Jn(),timestamp:Date.now(),pageKey:(null==t?void 0:t.pageKey)||Zn(Yn(window.location.href),this.config.getConfig().uiVersion),pageUri:(null==t?void 0:t.pageUri)||Yn(window.location.href),eventType:t.eventType||"VIEW",tags:w(w({},t.tags),{},{refer:t.refer})};0!==this.config.getConfig().reportInterval?this.eventQueue.push(r):this.reporter.report("event",[r])}},{key:"flushEventQueue",value:function(){var e,t;0!==(null===(e=this.config)||void 0===e||null===(t=e.getConfig)||void 0===t?void 0:t.call(e).reportInterval)?this.eventQueue.length>0&&(this.reporter.report("event",S(this.eventQueue)),this.eventQueue=[]):this.eventQueue=[]}},{key:"destroy",value:function(){this.flushEventQueue(),this.reportTimer&&(clearInterval(this.reportTimer),this.reportTimer=null),this.clickListener&&(document.removeEventListener("click",this.clickListener,!0),this.clickListener=null),this.pageViewListener&&(window.removeEventListener("popstate",this.pageViewListener),this.pageViewListener=null),this.originalPushState&&(history.pushState=this.originalPushState,this.originalPushState=null),this.originalReplaceState&&(history.replaceState=this.originalReplaceState,this.originalReplaceState=null),this.isInitialized=!1}}])}(),ai=function(){return h(function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;l(this,e),this.config=t,this.reporter=new ni(t),this.eventTracker=r,this.isInitialized=!1,this.pageStartTime=Date.now(),this.performanceQueue=[],this.thirdPartySDKs={},this.reportTimer=null,this.currentRoute=null,this.routeStartTime=Date.now(),this.routeHistory=[],this.vueRouter=null,this.metrics={fcp:0,lcp:0,fid:0,cls:0,ttfb:0,domLoad:0,windowLoad:0,resourceLoad:[],apiRequests:[],pageStayTime:0,previousPageUrl:"",currentPageUrl:""}},[{key:"init",value:function(){if(!this.isInitialized){var e=this.config.getConfig();e.enablePerformanceTracking&&this.setupPerformanceMonitoring(),e.enableResourceTracking&&this.setupResourceMonitoring(),e.enableApiTracking&&this.setupApiMonitoring(),e.enableInteractionTracking&&this.setupInteractionMonitoring(),this.initThirdPartySDKs(),e.reportInterval>0&&this.setupPeriodicReport(),this.isInitialized=!0}}},{key:"setupPeriodicReport",value:function(){var e=this,t=this.config.getConfig().reportInterval;t>0&&(this.reportTimer&&clearInterval(this.reportTimer),this.reportTimer=setInterval(function(){e.flushPerformanceQueue()},t))}},{key:"setupVueRouterMonitoring",value:function(e){var t=this;e&&!this.vueRouter&&(this.vueRouter=e,this.currentRoute=e.currentRoute.value,e.beforeEach(function(e,r,n){r.name&&t.handleRouteLeave(r,e),n()}),e.afterEach(function(e,r){t.handleRouteEnter(e,r)}),e.beforeResolve(function(e,r,n){r.name&&t.calculateRouteStayTime(r),n()}))}},{key:"handleRouteLeave",value:function(e,t){var r=Date.now()-this.routeStartTime;this.recordRouteStayTime(e,r),this.currentRoute=e,this.routeStartTime=Date.now()}},{key:"handleRouteEnter",value:function(e,t){this.routeStartTime=Date.now(),this.currentRoute=e,this.recordRouteEnter(e,t)}},{key:"recordRouteStayTime",value:function(e,t){var r,n={name:e.name||"unknown",path:e.path,fullPath:e.fullPath,stayTime:t,enterTime:this.routeStartTime,leaveTime:Date.now(),params:e.params,query:e.query,meta:e.meta};this.routeHistory.push(n),this.metrics.pageStayTime=t,this.metrics.previousPageUrl=e.name,this.reportRouteStayTime(n),null!==(r=this.config)&&void 0!==r&&null!==(r=r.config)&&void 0!==r&&r.debugSwitch&&console.log("路由数据",n)}},{key:"recordRouteEnter",value:function(e,t){var r;e.name,e.path,e.fullPath,Date.now(),e.params,e.query,e.meta,t&&(t.name,t.path),this.metrics.currentPageUrl=e.name,null!==(r=this.config)&&void 0!==r&&null!==(r=r.config)&&void 0!==r&&r.debugSwitch&&console.log("进入路由: ".concat(e.name||e.path))}},{key:"calculateRouteStayTime",value:function(e){return this.routeStartTime?Date.now()-this.routeStartTime:0}},{key:"reportRouteStayTime",value:function(e){var t={type:"route_stay_time",timestamp:Date.now(),route:e,user:this.config.getUser(),device:this.getDeviceInfo()};this.reporter.report("route_performance",[t])}},{key:"getCurrentRoute",value:function(){return this.currentRoute}},{key:"getRouteHistory",value:function(){return S(this.routeHistory)}},{key:"getCurrentPageStayTime",value:function(){return this.routeStartTime?Date.now()-this.routeStartTime:0}},{key:"getRoutePerformanceStats",value:function(){var e={totalRoutes:this.routeHistory.length,averageStayTime:0,routesByPath:new Map,totalStayTime:0};return this.routeHistory.length>0&&(this.routeHistory.forEach(function(t){e.totalStayTime+=t.stayTime,e.routesByPath.has(t.path)||e.routesByPath.set(t.path,{count:0,totalStayTime:0,averageStayTime:0});var r=e.routesByPath.get(t.path);r.count++,r.totalStayTime+=t.stayTime,r.averageStayTime=r.totalStayTime/r.count}),e.averageStayTime=e.totalStayTime/e.totalRoutes),e}},{key:"setupPerformanceMonitoring",value:function(){var e=this;"loading"===document.readyState?document.addEventListener("DOMContentLoaded",function(){e.captureDOMLoadTime()}):this.captureDOMLoadTime(),window.addEventListener("load",function(){e.captureWindowLoadTime(),e.captureWebVitals(),e.reportPerformanceMetrics()})}},{key:"setupResourceMonitoring",value:function(){var e=this;if("undefined"!=typeof window&&"PerformanceObserver"in window){var t=new PerformanceObserver(function(t){var r,n=d(t.getEntries());try{for(n.s();!(r=n.n()).done;){var i=r.value;"resource"===i.entryType&&e.handleResourceLoad(i)}}catch(e){n.e(e)}finally{n.f()}});try{t.observe({entryTypes:["resource"]})}catch(e){}}}},{key:"setupApiMonitoring",value:function(){var e=this;void 0!==window.axios&&(window.axios.interceptors.request.use(function(e){return e._startTime=Kn(),e}),window.axios.interceptors.response.use(function(t){var r=Kn()-t.config._startTime;return e.handleApiRequest(t.config.url,r,t.status),t},function(t){if(t.config){var r=Kn()-t.config._startTime;e.handleApiRequest(t.config.url,r,"error")}throw t}))}},{key:"setupInteractionMonitoring",value:function(){var e=this,t=0,r=0,n=function(i){0===t&&(t=Kn(),r=t-e.metrics.fcp,e.metrics.fid=r,document.removeEventListener("click",n,!0),document.removeEventListener("keydown",n,!0),document.removeEventListener("touchstart",n,!0))};document.addEventListener("click",n,!0),document.addEventListener("keydown",n,!0),document.addEventListener("touchstart",n,!0)}},{key:"captureDOMLoadTime",value:function(){this.metrics.domLoad=Kn()}},{key:"captureWindowLoadTime",value:function(){this.metrics.windowLoad=Kn()}},{key:"captureWebVitals",value:function(){var e=this;if("undefined"!=typeof window&&"PerformanceObserver"in window)try{new PerformanceObserver(function(t){var r,n=d(t.getEntries());try{for(n.s();!(r=n.n()).done;){var i,o=r.value;if("first-contentful-paint"===o.name)e.metrics.fcp=o.startTime,null!==(i=e.config)&&void 0!==i&&null!==(i=i.config)&&void 0!==i&&i.debugSwitch&&console.log("FCP:",o.startTime)}}catch(e){n.e(e)}finally{n.f()}}).observe({type:"paint",buffered:!0})}catch(e){console.warn("FCP监控失败:",e)}if("undefined"!=typeof window&&"PerformanceObserver"in window)try{new PerformanceObserver(function(t){var r,n=d(t.getEntries());try{for(n.s();!(r=n.n()).done;){var i=r.value;e.metrics.lcp=i.startTime}}catch(e){n.e(e)}finally{n.f()}}).observe({entryTypes:["largest-contentful-paint"]})}catch(e){console.warn("LCP监控失败:",e)}if("undefined"!=typeof window&&"PerformanceObserver"in window)try{var t=0;new PerformanceObserver(function(r){var n,i=d(r.getEntries());try{for(i.s();!(n=i.n()).done;){var o=n.value;o.hadRecentInput||(t+=o.value)}}catch(e){i.e(e)}finally{i.f()}e.metrics.cls=t}).observe({entryTypes:["layout-shift"]})}catch(e){console.warn("CLS监控失败:",e)}}},{key:"handleResourceLoad",value:function(e){var t={name:e.name,type:e.initiatorType,duration:e.duration,size:e.transferSize,timestamp:Date.now()};this.metrics.resourceLoad.push(t),e.duration>3e3&&this.reportSlowResource(t)}},{key:"handleApiRequest",value:function(e,t,r){var n,i,o={};this.eventTracker&&"function"==typeof this.eventTracker.getPreviousPageInfo&&(o=this.eventTracker.getPreviousPageInfo());var a={interfaceUrl:"string"==typeof e?e:e.toString(),interfaceDuration:t,status:r,uuid:Jn(),timestamp:Date.now(),pageKey:Zn(Yn(window.location.href),this.config.getConfig().uiVersion),pageUri:Yn(window.location.href),eventType:"INTERFACEDURATION",refer:Yn((null===(n=o)||void 0===n||null===(n=n.previousPage)||void 0===n?void 0:n.url)||""),duration:(null===(i=o)||void 0===i?void 0:i.previousPageStayTime)||0,tags:{actionKey:""}};t>5e3||this.performanceQueue.push(a)}},{key:"handlePageHidden",value:function(){this.calculatePageStayTime()}},{key:"handlePageVisible",value:function(){this.pageStartTime=Date.now()}},{key:"calculatePageStayTime",value:function(){var e=Date.now()-this.pageStartTime;this.reportPageStayTime(e)}},{key:"reportPerformanceMetrics",value:function(){var e=this;setTimeout(function(){var t,r,n={};e.eventTracker&&"function"==typeof e.eventTracker.getPreviousPageInfo&&(n=e.eventTracker.getPreviousPageInfo());var i={eventType:"PERFORMANCE",uuid:Jn(),timestamp:Date.now(),pageKey:Zn(Yn(window.location.href),e.config.getConfig().uiVersion),pageUri:Yn(window.location.href),refer:Yn((null===(t=n)||void 0===t||null===(t=t.previousPage)||void 0===t?void 0:t.url)||""),duration:(null===(r=n)||void 0===r?void 0:r.previousPageStayTime)||0,metrics:e.metrics};e.performanceQueue.push(i),e.config.getConfig().debugSwitch&&console.log("Performance Data:",i),0===e.config.getConfig().reportInterval?e.reporter.report("performance",[i]):e.performanceQueue.length>=e.config.getConfig().maxQueueSize&&e.flushPerformanceQueue()},100)}},{key:"reportSlowResource",value:function(e){this.reporter.report("slow_resource",[e])}},{key:"reportSlowApi",value:function(e){this.reporter.report("slow_api",[e])}},{key:"reportPageStayTime",value:function(e){var t={type:"page_stay",url:window.location.href,stayTime:e,timestamp:Date.now()};this.reporter.report("page_stay",[t])}},{key:"getDeviceInfo",value:function(){return{screen:{width:screen.width,height:screen.height,availWidth:screen.availWidth,availHeight:screen.availHeight,colorDepth:screen.colorDepth,pixelDepth:screen.pixelDepth},viewport:{width:window.innerWidth,height:window.innerHeight},connection:navigator.connection?{effectiveType:navigator.connection.effectiveType,downlink:navigator.connection.downlink,rtt:navigator.connection.rtt}:null,memory:navigator.memory?{usedJSHeapSize:navigator.memory.usedJSHeapSize,totalJSHeapSize:navigator.memory.totalJSHeapSize,jsHeapSizeLimit:navigator.memory.jsHeapSizeLimit}:null}}},{key:"initThirdPartySDKs",value:function(){var e=this.config.getThirdPartyConfig();e.baidu&&window._hmt&&(this.thirdPartySDKs.baidu=window._hmt),e.umeng&&window._um&&(this.thirdPartySDKs.umeng=window._um),e.sensors&&window.sensors&&(this.thirdPartySDKs.sensors=window.sensors),e.tencent&&window.MTA&&(this.thirdPartySDKs.tencent=window.MTA)}},{key:"flushPerformanceQueue",value:function(){this.performanceQueue.length>0&&(this.reporter.report("performance",S(this.performanceQueue)),this.performanceQueue=[])}},{key:"reportPerformance",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={type:"custom_performance",timestamp:Date.now(),url:window.location.href,metrics:e,user:this.config.getUser()};this.reporter.report("performance",[t])}},{key:"getCurrentMetrics",value:function(){return w({},this.metrics)}},{key:"destroy",value:function(){this.config.getConfig().reportInterval>0&&this.flushPerformanceQueue(),this.reportTimer&&(clearInterval(this.reportTimer),this.reportTimer=null),this.isInitialized=!1}}])}(),si=function(){return h(function e(t){l(this,e),this.config=t,this.reporter=new ni(t),this.isInitialized=!1,this.behaviorQueue=[],this.sessionId=this.generateSessionId(),this.pageStartTime=Date.now(),this.scrollDepth=0,this.mouseMovements=[],this.keyStrokes=[],this.formInteractions=[],this.timeTracker=null,this.reportTimer=null,this.originalPushState=null,this.originalReplaceState=null,this.behaviors={pageViews:[],clicks:[],scrolls:[],formSubmissions:[],navigation:[],timeOnPage:0}},[{key:"init",value:function(){if(!this.isInitialized){var e=this.config.getConfig();e.enableUserInteractionTracking&&this.setupUserInteractionTracking(),e.enableFormTracking&&this.setupFormTracking(),e.enableScrollTracking&&this.setupScrollTracking(),e.enableMouseTracking&&this.setupMouseTracking(),e.enableKeyboardTracking&&this.setupKeyboardTracking(),this.setupTimeTracking(),e.reportInterval>0&&this.setupPeriodicReport(),this.isInitialized=!0}}},{key:"setupPeriodicReport",value:function(){var e=this,t=this.config.getConfig().reportInterval;t>0&&(this.reportTimer&&clearInterval(this.reportTimer),this.reportTimer=setInterval(function(){e.flushBehaviorQueue()},t))}},{key:"setupUserInteractionTracking",value:function(){var e=this;document.addEventListener("click",function(t){e.trackClick(t)},!0),document.addEventListener("dblclick",function(t){e.trackDoubleClick(t)},!0),document.addEventListener("contextmenu",function(t){e.trackRightClick(t)},!0),"ontouchstart"in window&&document.addEventListener("touchstart",function(t){e.trackTouch(t)},!0)}},{key:"setupFormTracking",value:function(){var e=this;document.addEventListener("submit",function(t){e.trackFormSubmission(t)},!0),document.addEventListener("change",function(t){"INPUT"!==t.target.tagName&&"SELECT"!==t.target.tagName&&"TEXTAREA"!==t.target.tagName||e.trackFormFieldChange(t)},!0),document.addEventListener("focus",function(t){"INPUT"!==t.target.tagName&&"SELECT"!==t.target.tagName&&"TEXTAREA"!==t.target.tagName||e.trackFormFieldFocus(t)},!0),document.addEventListener("blur",function(t){"INPUT"!==t.target.tagName&&"SELECT"!==t.target.tagName&&"TEXTAREA"!==t.target.tagName||e.trackFormFieldBlur(t)},!0)}},{key:"setupScrollTracking",value:function(){var e,t=this;document.addEventListener("scroll",function(){clearTimeout(e),e=setTimeout(function(){var e=window.pageYOffset||document.documentElement.scrollTop,r=document.documentElement.scrollHeight,n=document.documentElement.clientHeight,i=Math.round(e/(r-n)*100);i>t.scrollDepth&&(t.scrollDepth=i,t.trackScroll(i,e))},100)},{passive:!0})}},{key:"setupMouseTracking",value:function(){var e,t=this,r=[];document.addEventListener("mousemove",function(n){clearTimeout(e),r.push({x:n.clientX,y:n.clientY,timestamp:Date.now()}),r.length>100&&r.shift(),e=setTimeout(function(){r.length>10&&(t.trackMouseMovement(r),r=[])},1e3)},{passive:!0})}},{key:"setupKeyboardTracking",value:function(){var e=this;document.addEventListener("keydown",function(t){"password"!==t.target.type&&e.trackKeyStroke(t)},!0)}},{key:"setupTimeTracking",value:function(){var e=this;this.timeTracker&&clearInterval(this.timeTracker),this.timeTracker=setInterval(function(){e.behaviors.timeOnPage+=1},1e3),window.addEventListener("beforeunload",function(){e.reportTimeOnPage()})}},{key:"trackReferrer",value:function(){var e=document.referrer;if(e){var t={type:"referrer",url:e,domain:this.extractDomain(e),timestamp:Date.now()};this.config.getConfig().debugSwitch&&console.log("referrerData----",t),this.behaviors.navigation.push(t),this.reportBehavior("referrer",t)}}},{key:"trackPageView",value:function(){var e={type:"pageview",url:window.location.href,title:document.title,timestamp:Date.now(),sessionId:this.sessionId,referrer:document.referrer};this.behaviors.pageViews.push(e),this.reportBehavior("pageview",e),this.pageStartTime=Date.now(),this.scrollDepth=0}},{key:"trackClick",value:function(e){var t,r={type:"click",element:{tagName:e.target.tagName,className:e.target.className,id:e.target.id,text:null===(t=e.target.textContent)||void 0===t?void 0:t.substring(0,50),href:e.target.href},position:{x:e.clientX,y:e.clientY,pageX:e.pageX,pageY:e.pageY},timestamp:Date.now(),sessionId:this.sessionId};this.behaviors.clicks.push(r),this.reportBehavior("click",r)}},{key:"trackDoubleClick",value:function(e){var t={type:"doubleclick",element:{tagName:e.target.tagName,className:e.target.className,id:e.target.id},position:{x:e.clientX,y:e.clientY},timestamp:Date.now(),sessionId:this.sessionId};this.reportBehavior("doubleclick",t)}},{key:"trackRightClick",value:function(e){var t={type:"rightclick",element:{tagName:e.target.tagName,className:e.target.className,id:e.target.id},position:{x:e.clientX,y:e.clientY},timestamp:Date.now(),sessionId:this.sessionId};this.reportBehavior("rightclick",t)}},{key:"trackTouch",value:function(e){var t={type:"touch",touches:Array.from(e.touches).map(function(e){return{x:e.clientX,y:e.clientY,identifier:e.identifier}}),timestamp:Date.now(),sessionId:this.sessionId};this.reportBehavior("touch",t)}},{key:"trackFormSubmission",value:function(e){var t={type:"form_submission",form:{action:e.target.action,method:e.target.method,id:e.target.id,className:e.target.className},fields:this.getFormFields(e.target),timestamp:Date.now(),sessionId:this.sessionId};this.behaviors.formSubmissions.push(t),this.reportBehavior("form_submission",t)}},{key:"trackFormFieldChange",value:function(e){var t={type:"form_field_change",field:{name:e.target.name,type:e.target.type,value:"password"===e.target.type?"***":e.target.value,id:e.target.id},timestamp:Date.now(),sessionId:this.sessionId};this.reportBehavior("form_field_change",t)}},{key:"trackFormFieldFocus",value:function(e){var t={type:"form_field_focus",field:{name:e.target.name,type:e.target.type,id:e.target.id},timestamp:Date.now(),sessionId:this.sessionId};this.reportBehavior("form_field_focus",t)}},{key:"trackFormFieldBlur",value:function(e){var t={type:"form_field_blur",field:{name:e.target.name,type:e.target.type,id:e.target.id},timestamp:Date.now(),sessionId:this.sessionId};this.reportBehavior("form_field_blur",t)}},{key:"trackScroll",value:function(e,t){var r={type:"scroll",depth:e,scrollTop:t,timestamp:Date.now(),sessionId:this.sessionId};this.config.getConfig().debugSwitch&&console.log("scrollData---",r),this.reportBehavior("scroll",r)}},{key:"trackMouseMovement",value:function(e){var t={type:"mouse_movement",movements:e,timestamp:Date.now(),sessionId:this.sessionId};this.config.getConfig().debugSwitch&&console.log("mouse_movement---",t),this.reportBehavior("mouse_movement",t)}},{key:"trackKeyStroke",value:function(e){var t={type:"keystroke",key:e.key,code:e.code,ctrlKey:e.ctrlKey,shiftKey:e.shiftKey,altKey:e.altKey,metaKey:e.metaKey,timestamp:Date.now(),sessionId:this.sessionId};this.config.getConfig().debugSwitch&&console.log("keystroke---",t),this.reportBehavior("keystroke",t)}},{key:"reportBehavior",value:function(e,t){var r={type:e,data:t,user:this.config.getUser(),config:{appId:this.config.getConfig().appId,appVersion:this.config.getConfig().appVersion}};this.behaviorQueue.push(r),0===this.config.getConfig().reportInterval?this.reporter.report("behavior",[r]):this.behaviorQueue.length>=this.config.getConfig().maxQueueSize&&this.flushBehaviorQueue()}},{key:"reportCustomBehavior",value:function(e){var t=w(w({type:"custom_behavior",eventName:e},arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}),{},{timestamp:Date.now(),sessionId:this.sessionId});this.reportBehavior("custom_behavior",t)}},{key:"flushBehaviorQueue",value:function(){this.behaviorQueue.length>0&&(this.reporter.report("behavior",S(this.behaviorQueue)),this.behaviorQueue=[])}},{key:"getFormFields",value:function(e){for(var t=[],r=e.elements,n=0;n<r.length;n++){var i=r[n];i.name&&t.push({name:i.name,type:i.type,value:"password"===i.type?"***":i.value})}return t}},{key:"extractDomain",value:function(e){try{return new URL(e).hostname}catch(t){return e}}},{key:"generateSessionId",value:function(){return"session_"+Date.now()+"_"+Math.random().toString(36).substr(2,9)}},{key:"getCurrentBehaviors",value:function(){return w({},this.behaviors)}},{key:"getSessionId",value:function(){return this.sessionId}},{key:"destroy",value:function(){this.config.getConfig().reportInterval>0&&this.flushBehaviorQueue(),this.reportTimeOnPage(),this.reportTimer&&(clearInterval(this.reportTimer),this.reportTimer=null),this.timeTracker&&(clearInterval(this.timeTracker),this.timeTracker=null),this.originalPushState&&(history.pushState=this.originalPushState,this.originalPushState=null),this.originalReplaceState&&(history.replaceState=this.originalReplaceState,this.originalReplaceState=null),this.isInitialized=!1}}])}(),ui=function(){return h(function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;l(this,e),this.config=t,this.reporter=new ni(t),this.eventTracker=r,this.isInitialized=!1,this.observer=null,this.trackedElements=new Map,this.exposureQueue=[],this.reportTimer=null,this.scrollTimer=null,this.useFallback=!1,this.lastReportTime=new Map,this.debounceTime=500,this.defaultOptions={threshold:.5,rootMargin:"0px",scrollThrottle:100}},[{key:"init",value:function(){if(!this.isInitialized){this.isIntersectionObserverSupported()?(this.createObserver(),this.useFallback=!1,this.config.getConfig().debugSwitch&&console.log("曝光追踪器初始化完成(使用 Intersection Observer API)")):(this.setupFallbackTracking(),this.useFallback=!0,this.config.getConfig().debugSwitch&&console.warn("浏览器不支持 Intersection Observer,使用降级方案(滚动事件追踪)"));var e=this.config.getConfig();e.reportInterval>0&&this.setupPeriodicReport(),this.isInitialized=!0,e.debugSwitch&&console.log("曝光追踪器初始化完成")}}},{key:"isIntersectionObserverSupported",value:function(){return"undefined"!=typeof window&&"IntersectionObserver"in window&&"IntersectionObserverEntry"in window&&"intersectionRatio"in window.IntersectionObserverEntry.prototype}},{key:"createObserver",value:function(){var e=this,t={root:null,rootMargin:this.defaultOptions.rootMargin,threshold:[0,.5,1]};this.observer=new IntersectionObserver(function(t){t.forEach(function(t){e.handleIntersection(t)})},t)}},{key:"handleIntersection",value:function(e){var t=e.target,r=this.getElementId(t),n=this.getElementConfig(t),i=n.threshold||this.defaultOptions.threshold,o=e.intersectionRatio;if(o>=i){this.trackedElements.has(r)||this.trackedElements.set(r,{element:t,config:n});var a=this.trackedElements.get(r),s=Date.now(),u=s-(this.lastReportTime.get(r)||0);u>=this.debounceTime?(this.lastReportTime.set(r,s),this.triggerExposure(t,r,a,o,0)):this.config.getConfig().debugSwitch&&console.log("元素 ".concat(r," 跳过上报(去重),距离上次上报 ").concat(u,"ms,需要间隔 ").concat(this.debounceTime,"ms"))}}},{key:"triggerExposure",value:function(e,t,r,n,i){var o,a=this,s=this.extractProductInfo(e,r.config),u={};this.eventTracker&&"function"==typeof this.eventTracker.getPreviousPageInfo&&(u=this.eventTracker.getPreviousPageInfo());var c=this.getElementConfig(e),l=w(w({uuid:Jn(),timestamp:Date.now(),pageKey:Zn(Yn(window.location.href),this.config.getConfig().uiVersion),pageUri:Yn(window.location.href),eventType:"EXPOSE"},c.oneLevelData),{},{viewParam:w({},s),tags:w(w({actionKey:""},c.tagData),{},{refer:Yn(null===(o=u)||void 0===o||null===(o=o.previousPage)||void 0===o?void 0:o.url)})}),f=this.config.getConfig().reportInterval;0!==f?(this.exposureQueue.push(l),0===f||this.exposureQueue.length>=this.config.getConfig().maxQueueSize&&this.flushExposureQueue()):Promise.resolve().then(function(){a.reporter.report("exposure",a.getReportData([l])).catch(function(e){console.error("曝光上报失败:",e),a.config.getConfig().debugSwitch&&console.error("曝光上报失败详情:",e)})})}},{key:"setupFallbackTracking",value:function(){var e=this;this.observer={observe:function(t){var r=e.getElementId(t);e.trackedElements.has(r)},unobserve:function(t){var r=e.getElementId(t);e.trackedElements.delete(r)},disconnect:function(){e.trackedElements.clear(),e.removeScrollListener()}},this.addScrollListener(),setTimeout(function(){e.checkAllElementsVisibility()},100)}},{key:"addScrollListener",value:function(){var e=this;if(!this.scrollHandler){var t=0,r=this.defaultOptions.scrollThrottle;this.scrollHandler=function(){var n=Date.now();n-t>=r&&(t=n,e.checkAllElementsVisibility())},window.addEventListener("scroll",this.scrollHandler,{passive:!0}),window.addEventListener("touchmove",this.scrollHandler,{passive:!0}),window.addEventListener("resize",this.scrollHandler,{passive:!0})}}},{key:"removeScrollListener",value:function(){this.scrollHandler&&(window.removeEventListener("scroll",this.scrollHandler),window.removeEventListener("touchmove",this.scrollHandler),window.removeEventListener("resize",this.scrollHandler),this.scrollHandler=null)}},{key:"checkAllElementsVisibility",value:function(){var e=this;if(this.useFallback){var t=window.innerHeight,r=window.innerWidth;this.trackedElements.forEach(function(n,i){var o=n.element;if(o&&document.contains(o)){var a=n.config.threshold||e.defaultOptions.threshold,s=e.calculateVisibleRatio(o,0,t,0,r);if(s>=a){var u=Date.now(),c=u-(e.lastReportTime.get(i)||0);c>=e.debounceTime?(e.lastReportTime.set(i,u),e.triggerExposure(o,i,n,s,0),e.config.getConfig().debugSwitch&&console.log("元素 ".concat(i," 进入可视区域,可见比例: ").concat((100*s).toFixed(2),"%,立即触发曝光"))):e.config.getConfig().debugSwitch&&console.log("元素 ".concat(i," 跳过上报(去重),距离上次上报 ").concat(c,"ms,需要间隔 ").concat(e.debounceTime,"ms"))}}else e.trackedElements.delete(i)})}}},{key:"calculateVisibleRatio",value:function(e,t,r,n,i){var o=e.getBoundingClientRect();if(o.bottom<t||o.top>r||o.right<n||o.left>i)return 0;var a=Math.max(o.top,t),s=Math.min(o.bottom,r),u=Math.max(o.left,n),c=Math.min(o.right,i),l=Math.max(0,c-u)*Math.max(0,s-a),f=o.width*o.height;return 0===f?0:l/f}},{key:"trackProduct",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.isInitialized)if(e&&"object"===P(e)&&e.nodeType){var n=this.getElementId(e),i=w({},r);this.trackedElements.has(n)&&this.untrackProduct(e),e.setAttribute("data-exposure-tracked","true"),e.setAttribute("data-exposure-config",JSON.stringify(i)),this.trackedElements.set(n,{element:e,config:i}),this.observer&&this.observer.observe(e),this.useFallback&&setTimeout(function(){t.checkAllElementsVisibility()},0),this.config.getConfig().debugSwitch}else console.warn("无效的元素,无法追踪");else console.warn("曝光追踪器未初始化")}},{key:"trackProducts",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.isInitialized&&this.observer){var n=[];if("string"==typeof e)n=Array.from(document.querySelectorAll(e));else{if(!Array.isArray(e))return void console.warn("无效的选择器或元素列表");n=e}n.forEach(function(e,n){var i=Array.isArray(r)?r[n]||{}:r;t.trackProduct(e,i)}),this.config.getConfig().debugSwitch}else console.warn("曝光追踪器未初始化")}},{key:"untrackProduct",value:function(e){if(this.observer){var t=this.getElementId(e);this.observer.unobserve&&this.observer.unobserve(e),this.trackedElements.delete(t),this.lastReportTime.delete(t),e&&e.removeAttribute&&(e.removeAttribute("data-exposure-tracked"),e.removeAttribute("data-exposure-config")),this.config.getConfig().debugSwitch&&console.log("取消追踪商品元素: ".concat(t))}}},{key:"untrackAll",value:function(){var e=this;this.observer&&(this.useFallback||this.trackedElements.forEach(function(t,r){t.element&&e.observer.unobserve&&e.observer.unobserve(t.element)}),this.trackedElements.clear())}},{key:"getElementId",value:function(e){if(e.getAttribute("data-exposure-id"))return e.getAttribute("data-exposure-id");if(e._exposureUniqueId)return e._exposureUniqueId;if(e.id)return"id_".concat(e.id);if(e.getAttribute("data-product-id"))return"product_".concat(e.getAttribute("data-product-id"));var t=Jn();return e._exposureUniqueId=t,t}},{key:"getElementConfig",value:function(e){var t=e.getAttribute("data-exposure-config");if(t)try{return JSON.parse(t)}catch(e){return{}}return{}}},{key:"extractProductInfo",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r={productId:t.productId||e.getAttribute("data-product-id")||null,productName:t.productName||e.getAttribute("data-product-name")||null,productPrice:t.productPrice||e.getAttribute("data-product-price")||null,productCategory:t.productCategory||e.getAttribute("data-product-category")||null,productImage:t.productImage||e.getAttribute("data-product-image")||null};return Object.keys(r).forEach(function(e){null===r[e]&&delete r[e]}),r}},{key:"setupPeriodicReport",value:function(){var e=this,t=this.config.getConfig().reportInterval;t>0&&(this.reportTimer&&clearInterval(this.reportTimer),this.reportTimer=setInterval(function(){e.flushExposureQueue()},t))}},{key:"getReportData",value:function(e){if(e.length>0){var t=e[0];if(t.tags){var r=function(e){return Array.from(new Set(e))}(e.map(function(e){var t;return null===(t=e.viewParam)||void 0===t?void 0:t.productId}).filter(Boolean));t.tags.exposeContent=(null==r?void 0:r.length)>0?r.join(","):""}return delete t.viewParam,t}return null}},{key:"flushExposureQueue",value:function(){var e,t,r=this;if(0!==(null===(e=this.config)||void 0===e||null===(t=e.getConfig)||void 0===t?void 0:t.call(e).reportInterval)){if(this.exposureQueue.length>0){var n=S(this.exposureQueue);this.exposureQueue=[],Promise.resolve().then(function(){r.reporter.report("exposure",r.getReportData(n)).catch(function(e){console.error("批量曝光上报失败:",e),r.config.getConfig().debugSwitch&&console.error("批量曝光上报失败详情:",e)})})}}else this.exposureQueue=[]}},{key:"reportExposure",value:function(){var e,t=this,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n={};this.eventTracker&&"function"==typeof this.eventTracker.getPreviousPageInfo&&(n=this.eventTracker.getPreviousPageInfo());var i={uuid:Jn(),timestamp:Date.now(),pageKey:Zn(Yn(window.location.href),this.config.getConfig().uiVersion),pageUri:Yn(window.location.href),eventType:"EXPOSE",viewParam:w({},r),tags:w(w({},config),{},{actionKey:"",refer:Yn(null===(e=n)||void 0===e||null===(e=e.previousPage)||void 0===e?void 0:e.url)})};Promise.resolve().then(function(){t.reporter.report("exposure",t.getReportData(i)).catch(function(e){console.error("手动曝光上报失败:",e),t.config.getConfig().debugSwitch&&console.error("手动曝光上报失败详情:",e)})})}},{key:"getTrackedElements",value:function(){return Array.from(this.trackedElements.keys())}},{key:"getExposureQueue",value:function(){return S(this.exposureQueue)}},{key:"destroy",value:function(){this.flushExposureQueue(),this.reportTimer&&(clearInterval(this.reportTimer),this.reportTimer=null),this.untrackAll(),this.observer&&(this.observer.disconnect&&this.observer.disconnect(),this.observer=null),this.removeScrollListener(),this.trackedElements.clear(),this.exposureQueue=[],this.lastReportTime.clear(),this.useFallback=!1,this.isInitialized=!1,this.config.getConfig().debugSwitch&&console.log("曝光追踪器已销毁")}}])}(),ci=function(){return h(function e(t){l(this,e),this.config=t,this.integratedSDKs={},this.isInitialized=!1},[{key:"init",value:function(){if(!this.isInitialized){var e=this.config.getThirdPartyConfig();e.baidu&&e.baidu.enabled&&this.initBaiduAnalytics(e.baidu),e.umeng&&e.umeng.enabled&&this.initUmengAnalytics(e.umeng),e.sensors&&e.sensors.enabled&&this.initSensorsAnalytics(e.sensors),e.tencent&&e.tencent.enabled&&this.initTencentAnalytics(e.tencent),e.google&&e.google.enabled&&this.initGoogleAnalytics(e.google),e.custom&&e.custom.enabled&&this.initCustomAnalytics(e.custom),this.isInitialized=!0}}},{key:"initBaiduAnalytics",value:function(e){try{window._hmt?(this.integratedSDKs.baidu={name:"baidu",instance:window._hmt,config:e},e.siteId&&window._hmt.push(["_setAccount",e.siteId]),!1!==e.autoPageview&&window._hmt.push(["_trackPageview"]),console.log("百度统计集成成功")):console.warn("百度统计未加载,请检查脚本是否正确引入")}catch(e){console.error("百度统计集成失败:",e)}}},{key:"initUmengAnalytics",value:function(e){try{window._um?(this.integratedSDKs.umeng={name:"umeng",instance:window._um,config:e},e.siteId&&window._um.push(["setAccount",e.siteId]),!1!==e.autoPageview&&window._um.push(["trackPageview"]),console.log("友盟统计集成成功")):console.warn("友盟统计未加载,请检查脚本是否正确引入")}catch(e){console.error("友盟统计集成失败:",e)}}},{key:"initSensorsAnalytics",value:function(e){try{window.sensors?(this.integratedSDKs.sensors={name:"sensors",instance:window.sensors,config:e},e.serverUrl&&window.sensors.setServerUrl(e.serverUrl),e.siteId&&window.sensors.setSiteId(e.siteId),!1!==e.autoPageview&&window.sensors.trackPageview(),console.log("神策数据集成成功")):console.warn("神策数据未加载,请检查脚本是否正确引入")}catch(e){console.error("神策数据集成失败:",e)}}},{key:"initTencentAnalytics",value:function(e){try{window.MTA?(this.integratedSDKs.tencent={name:"tencent",instance:window.MTA,config:e},e.appId&&window.MTA.setAppId(e.appId),!1!==e.autoPageview&&window.MTA.trackPageview(),console.log("腾讯云分析集成成功")):console.warn("腾讯云分析未加载,请检查脚本是否正确引入")}catch(e){console.error("腾讯云分析集成失败:",e)}}},{key:"initGoogleAnalytics",value:function(e){try{window.gtag?(this.integratedSDKs.google={name:"google",instance:window.gtag,config:e},e.measurementId&&window.gtag("config",e.measurementId,{page_title:document.title,page_location:window.location.href}),console.log("Google Analytics集成成功")):console.warn("Google Analytics未加载,请检查脚本是否正确引入")}catch(e){console.error("Google Analytics集成失败:",e)}}},{key:"initCustomAnalytics",value:function(e){try{if("function"==typeof e.init){var t=e.init(e);this.integratedSDKs.custom={name:"custom",instance:t,config:e},console.log("自定义第三方集成成功")}else console.warn("自定义第三方配置缺少init函数")}catch(e){console.error("自定义第三方集成失败:",e)}}},{key:"reportEvent",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Object.values(this.integratedSDKs).forEach(function(n){try{t.reportToSDK(n,e,r)}catch(e){console.error("上报事件到".concat(n.name,"失败:"),e)}})}},{key:"reportPageView",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object.values(this.integratedSDKs).forEach(function(r){try{e.reportPageViewToSDK(r,t)}catch(e){console.error("上报页面浏览到".concat(r.name,"失败:"),e)}})}},{key:"reportUser",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object.values(this.integratedSDKs).forEach(function(r){try{e.reportUserToSDK(r,t)}catch(e){console.error("上报用户信息到".concat(r.name,"失败:"),e)}})}},{key:"reportPerformance",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object.values(this.integratedSDKs).forEach(function(r){try{e.reportPerformanceToSDK(r,t)}catch(e){console.error("上报性能指标到".concat(r.name,"失败:"),e)}})}},{key:"reportToSDK",value:function(e,t,r){switch(e.name){case"baidu":e.instance&&e.instance.push&&e.instance.push(["_trackEvent",t,JSON.stringify(r)]);break;case"umeng":e.instance&&e.instance.push&&e.instance.push(["track",t,r]);break;case"sensors":e.instance&&e.instance.track&&e.instance.track(t,r);break;case"tencent":e.instance&&e.instance.Event&&e.instance.Event.stat&&e.instance.Event.stat(t,r);break;case"google":e.instance&&"function"==typeof e.instance&&e.instance("event",t,r);break;case"custom":e.instance&&"function"==typeof e.instance.track&&e.instance.track(t,r);break;default:console.warn("未知的SDK类型: ".concat(e.name))}}},{key:"reportPageViewToSDK",value:function(e,t){switch(e.name){case"baidu":e.instance&&e.instance.push&&e.instance.push(["_trackPageview",t.url||window.location.href]);break;case"umeng":e.instance&&e.instance.push&&e.instance.push(["trackPageview",t.url||window.location.href]);break;case"sensors":e.instance&&e.instance.trackPageview&&e.instance.trackPageview(t);break;case"tencent":e.instance&&e.instance.trackPageview&&e.instance.trackPageview(t.url||window.location.href);break;case"google":e.instance&&"function"==typeof e.instance&&e.instance("config",e.config.measurementId,{page_title:t.title||document.title,page_location:t.url||window.location.href});break;case"custom":e.instance&&"function"==typeof e.instance.trackPageview&&e.instance.trackPageview(t);break;default:console.warn("未知的SDK类型: ".concat(e.name))}}},{key:"reportUserToSDK",value:function(e,t){switch(e.name){case"baidu":e.instance&&e.instance.push&&(e.instance.push(["_setUserTag","userId",t.userId]),e.instance.push(["_setUserTag","userType",t.userType]));break;case"umeng":e.instance&&e.instance.push&&(e.instance.push(["setUserTag","userId",t.userId]),e.instance.push(["setUserTag","userType",t.userType]));break;case"sensors":e.instance&&e.instance.setProfile&&e.instance.setProfile(t);break;case"tencent":e.instance&&e.instance.setUserInfo&&e.instance.setUserInfo(t);break;case"google":e.instance&&"function"==typeof e.instance&&e.instance("set","user_id",t.userId);break;case"custom":e.instance&&"function"==typeof e.instance.setUser&&e.instance.setUser(t);break;default:console.warn("未知的SDK类型: ".concat(e.name))}}},{key:"reportPerformanceToSDK",value:function(e,t){switch(e.name){case"baidu":e.instance&&e.instance.push&&e.instance.push(["_trackEvent","performance",JSON.stringify(t)]);break;case"umeng":e.instance&&e.instance.push&&e.instance.push(["track","performance",t]);break;case"sensors":e.instance&&e.instance.track&&e.instance.track("performance",t);break;case"tencent":e.instance&&e.instance.Event&&e.instance.Event.stat&&e.instance.Event.stat("performance",t);break;case"google":e.instance&&"function"==typeof e.instance&&e.instance("event","performance",t);break;case"custom":e.instance&&"function"==typeof e.instance.trackPerformance&&e.instance.trackPerformance(t);break;default:console.warn("未知的SDK类型: ".concat(e.name))}}},{key:"isSDKIntegrated",value:function(e){return!!this.integratedSDKs[e]}},{key:"getIntegratedSDKs",value:function(){return Object.keys(this.integratedSDKs)}},{key:"getSDKInstance",value:function(e){var t;return(null===(t=this.integratedSDKs[e])||void 0===t?void 0:t.instance)||null}},{key:"destroy",value:function(){Object.values(this.integratedSDKs).forEach(function(e){try{e.instance&&"function"==typeof e.instance.destroy&&e.instance.destroy()}catch(t){console.error("销毁".concat(e.name,"失败:"),t)}}),this.integratedSDKs={},this.isInitialized=!1}}])}(),li=function(){return h(function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};l(this,e),this.config={appId:t.appId||"",appVersion:t.appVersion||"1.0.0",environment:t.environment||"production",debugSwitch:!0===t.debugSwitch,customerId:t.customerId||"",userId:t.userId||"",deviceNo:t.deviceNo||"",deviceId:t.userId||"",uiVersion:t.uiVersion||"",sessionId:Wn(),reportUrl:t.reportUrl||"",reportInterval:"number"==typeof t.reportInterval?t.reportInterval:0,maxQueueSize:t.maxQueueSize||100,enableErrorTracking:!1!==t.enableErrorTracking,enableUnhandledRejection:!1!==t.enableUnhandledRejection,enableResourceError:!1!==t.enableResourceError,enableEventTracking:!1!==t.enableEventTracking,enableClickTracking:!1!==t.enableClickTracking,enablePageViewTracking:!1!==t.enablePageViewTracking,enablePerformanceTracking:!1!==t.enablePerformanceTracking,enableResourceTracking:!1!==t.enableResourceTracking,enableApiTracking:!1!==t.enableApiTracking,enableInteractionTracking:!1!==t.enableInteractionTracking,enableRouteTracking:!1!==t.enableRouteTracking,enableUserInteractionTracking:!1!==t.enableUserInteractionTracking,enableFormTracking:!1!==t.enableFormTracking,enableScrollTracking:!1!==t.enableScrollTracking,enableMouseTracking:!1!==t.enableMouseTracking,enableKeyboardTracking:!1!==t.enableKeyboardTracking,thirdPartyConfig:t.thirdPartyConfig||{},user:t.user||null,customReport:t.customReport||null},this.user=null},[{key:"updateConfig",value:function(e){this.config=w(w({},this.config),e)}},{key:"setUser",value:function(e){this.user=e}},{key:"getConfig",value:function(){return this.config}},{key:"getUser",value:function(){return this.user}},{key:"getReportUrl",value:function(){return this.config.reportUrl}},{key:"getThirdPartyConfig",value:function(){return this.config.thirdPartyConfig}},{key:"isErrorTrackingEnabled",value:function(){return this.config.enableErrorTracking}},{key:"isEventTrackingEnabled",value:function(){return this.config.enableEventTracking}}])}();"undefined"==typeof window||null!==(Xn=window)&&void 0!==Xn&&Xn.axios||(window.axios=Jt);var fi=function(){return h(function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};l(this,e),this.config=new li(t),this.errorTracker=new ii(this.config),this.eventTracker=new oi(this.config),this.performanceTracker=new ai(this.config,this.eventTracker),this.userBehaviorTracker=new si(this.config),this.exposureTracker=new ui(this.config,this.eventTracker),this.thirdPartyIntegrator=new ci(this.config),this.init()},[{key:"init",value:function(){this.eventTracker.init(),this.exposureTracker.init(),this.thirdPartyIntegrator.init(),this.setupPageUnloadHandler(),console.log("Frontend SDK 初始化完成")}},{key:"setupPageUnloadHandler",value:function(){var e=this,t=!1,r=function(){if(!t){t=!0;try{e.eventTracker&&"function"==typeof e.eventTracker.handlePageUnload&&e.eventTracker.handlePageUnload(),e.eventTracker&&"function"==typeof e.eventTracker.flushEventQueue&&e.eventTracker.flushEventQueue(),e.exposureTracker&&"function"==typeof e.exposureTracker.flushExposureQueue&&e.exposureTracker.flushExposureQueue(),e.errorTracker&&"function"==typeof e.errorTracker.flushErrorQueue&&e.errorTracker.flushErrorQueue(),e.performanceTracker&&"function"==typeof e.performanceTracker.flushPerformanceQueue&&e.performanceTracker.flushPerformanceQueue(),e.userBehaviorTracker&&"function"==typeof e.userBehaviorTracker.flushBehaviorQueue&&e.userBehaviorTracker.flushBehaviorQueue(),e.config.getConfig().debugSwitch&&console.log("页面卸载:已刷新所有待上报队列,使用 sendBeacon 发送")}catch(e){console.error("页面卸载时刷新队列失败:",e)}}};this.setupUrlChangeMonitoring(r),window.addEventListener("pagehide",function(e){r()},{capture:!0}),window.addEventListener("beforeunload",function(){r()},{capture:!0})}},{key:"setupUrlChangeMonitoring",value:function(e){var t=this,r=location.href,n=location.origin,i=!0,o=null,a=function(){i&&(i=!1,o&&(clearInterval(o),o=null))};o=setInterval(function(){if(i)try{var o=location.href,s=location.origin;o!==r&&(s!==n&&(t.config.getConfig().debugSwitch&&console.log("检测到跳转到外部页面(域名变化),立即发送埋点数据:",o),a(),e()),r=o,n=s)}catch(e){t.config.getConfig().debugSwitch&&console.warn("URL 监控异常:",e),a()}},30),this._urlMonitoringCleanup=a}},{key:"reportError",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.errorTracker.reportError(e,t)}},{key:"reportEvent",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.eventTracker.reportEvent(e,t,r)}},{key:"reportCustomEvent",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.eventTracker.reportCustomEvent(e,t)}},{key:"beforeExternalNavigation",value:function(){try{this.eventTracker&&"function"==typeof this.eventTracker.handlePageUnload&&this.eventTracker.handlePageUnload(),this.eventTracker&&"function"==typeof this.eventTracker.flushEventQueue&&this.eventTracker.flushEventQueue()}catch(e){}}},{key:"getCurrentPageStayTime",value:function(){return this.eventTracker.getCurrentPageStayTime()}},{key:"getPageHistory",value:function(){return this.eventTracker.pageHistory||[]}},{key:"reportPerformance",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.performanceTracker.reportPerformance(e)}},{key:"reportBehavior",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.userBehaviorTracker.reportCustomBehavior(e,t)}},{key:"setUser",value:function(e){this.config.setUser(e),this.thirdPartyIntegrator.reportUser(e)}},{key:"setConfig",value:function(e){this.config.updateConfig(e)}},{key:"getPerformanceMetrics",value:function(){return this.performanceTracker.getCurrentMetrics()}},{key:"getBehaviorData",value:function(){return this.userBehaviorTracker.getCurrentBehaviors()}},{key:"getSessionId",value:function(){return this.userBehaviorTracker.getSessionId()}},{key:"isThirdPartySDKIntegrated",value:function(e){return this.thirdPartyIntegrator.isSDKIntegrated(e)}},{key:"getIntegratedThirdPartySDKs",value:function(){return this.thirdPartyIntegrator.getIntegratedSDKs()}},{key:"setupVueRouterMonitoring",value:function(e){e?this.config.config.enableRouteTracking&&this.eventTracker.setupVueRouterMonitoring(e):console.warn("Vue Router 实例未提供")}},{key:"getCurrentRoute",value:function(){return this.eventTracker.getCurrentRoute()}},{key:"getPreviousPageInfo",value:function(){return this.eventTracker.getPreviousPageInfo()}},{key:"getCurrentRouteStayTime",value:function(){return this.eventTracker.getCurrentRouteStayTime()}},{key:"trackProduct",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.exposureTracker.trackProduct(e,t)}},{key:"trackProducts",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.exposureTracker.trackProducts(e,t)}},{key:"untrackProduct",value:function(e){return this.exposureTracker.untrackProduct(e)}},{key:"untrackAllProducts",value:function(){return this.exposureTracker.untrackAll()}},{key:"reportExposure",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.exposureTracker.reportExposure(e)}},{key:"getTrackedProducts",value:function(){return this.exposureTracker.getTrackedElements()}},{key:"getExposureQueue",value:function(){return this.exposureTracker.getExposureQueue()}},{key:"flushExposureQueue",value:function(){return this.exposureTracker.flushExposureQueue()}},{key:"destroy",value:function(){this._urlMonitoringCleanup&&"function"==typeof this._urlMonitoringCleanup&&this._urlMonitoringCleanup(),this.errorTracker.destroy(),this.eventTracker.destroy(),this.performanceTracker.destroy(),this.userBehaviorTracker.destroy(),this.exposureTracker.destroy(),this.thirdPartyIntegrator.destroy(),console.log("Frontend SDK 已销毁")}}])}();e.default=fi,e.performanceNow=Kn,Object.defineProperty(e,"__esModule",{value:!0})});
|
|
3
|
+
var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",i=r.toStringTag||"@@toStringTag";function o(r,n,i,o){var u=n&&n.prototype instanceof s?n:s,c=Object.create(u.prototype);return b(c,"_invoke",function(r,n,i){var o,s,u,c=0,l=i||[],f=!1,h={p:0,n:0,v:e,a:d,f:d.bind(e,4),d:function(t,r){return o=t,s=0,u=e,h.n=r,a}};function d(r,n){for(s=r,u=n,t=0;!f&&c&&!i&&t<l.length;t++){var i,o=l[t],d=h.p,p=o[2];r>3?(i=p===n)&&(u=o[(s=o[4])?5:(s=3,3)],o[4]=o[5]=e):o[0]<=d&&((i=r<2&&d<o[1])?(s=0,h.v=n,h.n=o[1]):d<p&&(i=r<3||o[0]>n||n>p)&&(o[4]=r,o[5]=n,h.n=p,s=0))}if(i||r>1)return a;throw f=!0,n}return function(i,l,p){if(c>1)throw TypeError("Generator is already running");for(f&&1===l&&d(l,p),s=l,u=p;(t=s<2?e:u)||!f;){o||(s?s<3?(s>1&&(h.n=-1),d(s,u)):h.n=u:h.v=u);try{if(c=2,o){if(s||(i="next"),t=o[i]){if(!(t=t.call(o,u)))throw TypeError("iterator result is not an object");if(!t.done)return t;u=t.value,s<2&&(s=0)}else 1===s&&(t=o.return)&&t.call(o),s<2&&(u=TypeError("The iterator does not provide a '"+i+"' method"),s=1);o=e}else if((t=(f=h.n<0)?u:r.call(n,h))!==a)break}catch(t){o=e,s=1,u=t}finally{c=1}}return{value:t,done:f}}}(r,i,o),!0),c}var a={};function s(){}function u(){}function c(){}t=Object.getPrototypeOf;var l=[][n]?t(t([][n]())):(b(t={},n,function(){return this}),t),f=c.prototype=s.prototype=Object.create(l);function h(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,b(e,i,"GeneratorFunction")),e.prototype=Object.create(f),e}return u.prototype=c,b(f,"constructor",c),b(c,"constructor",u),u.displayName="GeneratorFunction",b(c,i,"GeneratorFunction"),b(f),b(f,i,"Generator"),b(f,n,function(){return this}),b(f,"toString",function(){return"[object Generator]"}),(y=function(){return{w:o,m:h}})()}function b(e,t,r,n){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}b=function(e,t,r,n){function o(t,r){b(e,t,function(e){return this._invoke(t,r,e)})}t?i?i(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r:(o("next",0),o("throw",1),o("return",2))},b(e,t,r,n)}function k(e){if(null!=e){var t=e["function"==typeof Symbol&&Symbol.iterator||"@@iterator"],r=0;if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}}}throw new TypeError(typeof e+" is not iterable")}function T(e,t){return n(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,o,a,s=[],u=!0,c=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=o.call(r)).done)&&(s.push(n.value),s.length!==t);u=!0);}catch(e){c=!0,i=e}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(e,t)||P(e,t)||v()}function S(e){return function(e){if(Array.isArray(e))return r(e)}(e)||g(e)||P(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function E(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}function x(e){return x="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},x(e)}function P(e,t){if(e){if("string"==typeof e)return r(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}function R(e){return function(){return new C(e.apply(this,arguments))}}function C(e){var r,n;function i(r,n){try{var a=e[r](n),s=a.value,u=s instanceof t;Promise.resolve(u?s.v:s).then(function(t){if(u){var n="return"===r?"return":"next";if(!s.k||t.done)return i(n,t);t=e[n](t).value}o(a.done?"return":"normal",t)},function(e){i("throw",e)})}catch(e){o("throw",e)}}function o(e,t){switch(e){case"return":r.resolve({value:t,done:!0});break;case"throw":r.reject(t);break;default:r.resolve({value:t,done:!1})}(r=r.next)?i(r.key,r.arg):n=null}this._invoke=function(e,t){return new Promise(function(o,a){var s={key:e,arg:t,resolve:o,reject:a,next:null};n?n=n.next=s:(r=n=s,i(e,t))})},"function"!=typeof e.return&&(this.return=void 0)}function I(e,t){return function(){return e.apply(t,arguments)}}C.prototype["function"==typeof Symbol&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},C.prototype.next=function(e){return this._invoke("next",e)},C.prototype.throw=function(e){return this._invoke("throw",e)},C.prototype.return=function(e){return this._invoke("return",e)};var O,A=Object.prototype.toString,D=Object.getPrototypeOf,_=Symbol.iterator,N=Symbol.toStringTag,L=(O=Object.create(null),function(e){var t=A.call(e);return O[t]||(O[t]=t.slice(8,-1).toLowerCase())}),j=function(e){return e=e.toLowerCase(),function(t){return L(t)===e}},U=function(e){return function(t){return x(t)===e}},F=Array.isArray,B=U("undefined");function M(e){return null!==e&&!B(e)&&null!==e.constructor&&!B(e.constructor)&&V(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}var z=j("ArrayBuffer");var H=U("string"),V=U("function"),K=U("number"),q=function(e){return null!==e&&"object"===x(e)},Q=function(e){if("object"!==L(e))return!1;var t=D(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||N in e||_ in e)},W=j("Date"),J=j("File"),G=j("Blob"),X=j("FileList"),$=j("URLSearchParams"),Y=T(["ReadableStream","Request","Response","Headers"].map(j),4),Z=Y[0],ee=Y[1],te=Y[2],re=Y[3];function ne(e,t){var r,n,i=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).allOwnKeys,o=void 0!==i&&i;if(null!=e)if("object"!==x(e)&&(e=[e]),F(e))for(r=0,n=e.length;r<n;r++)t.call(null,e[r],r,e);else{if(M(e))return;var a,s=o?Object.getOwnPropertyNames(e):Object.keys(e),u=s.length;for(r=0;r<u;r++)a=s[r],t.call(null,e[a],a,e)}}function ie(e,t){if(M(e))return null;t=t.toLowerCase();for(var r,n=Object.keys(e),i=n.length;i-- >0;)if(t===(r=n[i]).toLowerCase())return r;return null}var oe="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,ae=function(e){return!B(e)&&e!==oe};var se,ue=(se="undefined"!=typeof Uint8Array&&D(Uint8Array),function(e){return se&&e instanceof se}),ce=j("HTMLFormElement"),le=function(){var e=Object.prototype.hasOwnProperty;return function(t,r){return e.call(t,r)}}(),fe=j("RegExp"),he=function(e,t){var r=Object.getOwnPropertyDescriptors(e),n={};ne(r,function(r,i){var o;!1!==(o=t(r,i,e))&&(n[i]=o||r)}),Object.defineProperties(e,n)};var de,pe,ge,ve,me=j("AsyncFunction"),we=(de="function"==typeof setImmediate,pe=V(oe.postMessage),de?setImmediate:pe?(ge="axios@".concat(Math.random()),ve=[],oe.addEventListener("message",function(e){var t=e.source,r=e.data;t===oe&&r===ge&&ve.length&&ve.shift()()},!1),function(e){ve.push(e),oe.postMessage(ge,"*")}):function(e){return setTimeout(e)}),ye="undefined"!=typeof queueMicrotask?queueMicrotask.bind(oe):"undefined"!=typeof process&&process.nextTick||we,be={isArray:F,isArrayBuffer:z,isBuffer:M,isFormData:function(e){var t;return e&&("function"==typeof FormData&&e instanceof FormData||V(e.append)&&("formdata"===(t=L(e))||"object"===t&&V(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&z(e.buffer)},isString:H,isNumber:K,isBoolean:function(e){return!0===e||!1===e},isObject:q,isPlainObject:Q,isEmptyObject:function(e){if(!q(e)||M(e))return!1;try{return 0===Object.keys(e).length&&Object.getPrototypeOf(e)===Object.prototype}catch(e){return!1}},isReadableStream:Z,isRequest:ee,isResponse:te,isHeaders:re,isUndefined:B,isDate:W,isFile:J,isBlob:G,isRegExp:fe,isFunction:V,isStream:function(e){return q(e)&&V(e.pipe)},isURLSearchParams:$,isTypedArray:ue,isFileList:X,forEach:ne,merge:function e(){for(var t=(ae(this)&&this||{}).caseless,r={},n=function(n,i){var o=t&&ie(r,i)||i;Q(r[o])&&Q(n)?r[o]=e(r[o],n):Q(n)?r[o]=e({},n):F(n)?r[o]=n.slice():r[o]=n},i=0,o=arguments.length;i<o;i++)arguments[i]&&ne(arguments[i],n);return r},extend:function(e,t,r){return ne(t,function(t,n){r&&V(t)?e[n]=I(t,r):e[n]=t},{allOwnKeys:(arguments.length>3&&void 0!==arguments[3]?arguments[3]:{}).allOwnKeys}),e},trim:function(e){return e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")},stripBOM:function(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e},inherits:function(e,t,r,n){e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},toFlatObject:function(e,t,r,n){var i,o,a,s={};if(t=t||{},null==e)return t;do{for(o=(i=Object.getOwnPropertyNames(e)).length;o-- >0;)a=i[o],n&&!n(a,e,t)||s[a]||(t[a]=e[a],s[a]=!0);e=!1!==r&&D(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},kindOf:L,kindOfTest:j,endsWith:function(e,t,r){e=String(e),(void 0===r||r>e.length)&&(r=e.length),r-=t.length;var n=e.indexOf(t,r);return-1!==n&&n===r},toArray:function(e){if(!e)return null;if(F(e))return e;var t=e.length;if(!K(t))return null;for(var r=new Array(t);t-- >0;)r[t]=e[t];return r},forEachEntry:function(e,t){for(var r,n=(e&&e[_]).call(e);(r=n.next())&&!r.done;){var i=r.value;t.call(e,i[0],i[1])}},matchAll:function(e,t){for(var r,n=[];null!==(r=e.exec(t));)n.push(r);return n},isHTMLForm:ce,hasOwnProperty:le,hasOwnProp:le,reduceDescriptors:he,freezeMethods:function(e){he(e,function(t,r){if(V(e)&&-1!==["arguments","caller","callee"].indexOf(r))return!1;var n=e[r];V(n)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=function(){throw Error("Can not rewrite read-only method '"+r+"'")}))})},toObjectSet:function(e,t){var r={},n=function(e){e.forEach(function(e){r[e]=!0})};return F(e)?n(e):n(String(e).split(t)),r},toCamelCase:function(e){return e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,r){return t.toUpperCase()+r})},noop:function(){},toFiniteNumber:function(e,t){return null!=e&&Number.isFinite(e=+e)?e:t},findKey:ie,global:oe,isContextDefined:ae,isSpecCompliantForm:function(e){return!!(e&&V(e.append)&&"FormData"===e[N]&&e[_])},toJSONObject:function(e){var t=new Array(10),r=function(e,n){if(q(e)){if(t.indexOf(e)>=0)return;if(M(e))return e;if(!("toJSON"in e)){t[n]=e;var i=F(e)?[]:{};return ne(e,function(e,t){var o=r(e,n+1);!B(o)&&(i[t]=o)}),t[n]=void 0,i}}return e};return r(e,0)},isAsyncFn:me,isThenable:function(e){return e&&(q(e)||V(e))&&V(e.then)&&V(e.catch)},setImmediate:we,asap:ye,isIterable:function(e){return null!=e&&V(e[_])}};function ke(e,t,r,n,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),i&&(this.response=i,this.status=i.status?i.status:null)}be.inherits(ke,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:be.toJSONObject(this.config),code:this.code,status:this.status}}});var Te=ke.prototype,Se={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(function(e){Se[e]={value:e}}),Object.defineProperties(ke,Se),Object.defineProperty(Te,"isAxiosError",{value:!0}),ke.from=function(e,t,r,n,i,o){var a=Object.create(Te);return be.toFlatObject(e,a,function(e){return e!==Error.prototype},function(e){return"isAxiosError"!==e}),ke.call(a,e.message,t,r,n,i),a.cause=e,a.name=e.name,o&&Object.assign(a,o),a};function Ee(e){return be.isPlainObject(e)||be.isArray(e)}function xe(e){return be.endsWith(e,"[]")?e.slice(0,-2):e}function Pe(e,t,r){return e?e.concat(t).map(function(e,t){return e=xe(e),!r&&t?"["+e+"]":e}).join(r?".":""):t}var Re=be.toFlatObject(be,{},null,function(e){return/^is[A-Z]/.test(e)});function Ce(e,t,r){if(!be.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;var n=(r=be.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(e,t){return!be.isUndefined(t[e])})).metaTokens,i=r.visitor||c,o=r.dots,a=r.indexes,s=(r.Blob||"undefined"!=typeof Blob&&Blob)&&be.isSpecCompliantForm(t);if(!be.isFunction(i))throw new TypeError("visitor must be a function");function u(e){if(null===e)return"";if(be.isDate(e))return e.toISOString();if(be.isBoolean(e))return e.toString();if(!s&&be.isBlob(e))throw new ke("Blob is not supported. Use a Buffer instead.");return be.isArrayBuffer(e)||be.isTypedArray(e)?s&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function c(e,r,i){var s=e;if(e&&!i&&"object"===x(e))if(be.endsWith(r,"{}"))r=n?r:r.slice(0,-2),e=JSON.stringify(e);else if(be.isArray(e)&&function(e){return be.isArray(e)&&!e.some(Ee)}(e)||(be.isFileList(e)||be.endsWith(r,"[]"))&&(s=be.toArray(e)))return r=xe(r),s.forEach(function(e,n){!be.isUndefined(e)&&null!==e&&t.append(!0===a?Pe([r],n,o):null===a?r:r+"[]",u(e))}),!1;return!!Ee(e)||(t.append(Pe(i,r,o),u(e)),!1)}var l=[],f=Object.assign(Re,{defaultVisitor:c,convertValue:u,isVisitable:Ee});if(!be.isObject(e))throw new TypeError("data must be an object");return function e(r,n){if(!be.isUndefined(r)){if(-1!==l.indexOf(r))throw Error("Circular reference detected in "+n.join("."));l.push(r),be.forEach(r,function(r,o){!0===(!(be.isUndefined(r)||null===r)&&i.call(t,r,be.isString(o)?o.trim():o,n,f))&&e(r,n?n.concat(o):[o])}),l.pop()}}(e),t}function Ie(e){var t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(e){return t[e]})}function Oe(e,t){this._pairs=[],e&&Ce(e,this,t)}var Ae=Oe.prototype;function De(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function _e(e,t,r){if(!t)return e;var n=r&&r.encode||De;be.isFunction(r)&&(r={serialize:r});var i,o=r&&r.serialize;if(i=o?o(t,r):be.isURLSearchParams(t)?t.toString():new Oe(t,r).toString(n)){var a=e.indexOf("#");-1!==a&&(e=e.slice(0,a)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e}Ae.append=function(e,t){this._pairs.push([e,t])},Ae.toString=function(e){var t=e?function(t){return e.call(this,t,Ie)}:Ie;return this._pairs.map(function(e){return t(e[0])+"="+t(e[1])},"").join("&")};var Ne=function(){return h(function e(){l(this,e),this.handlers=[]},[{key:"use",value:function(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1}},{key:"eject",value:function(e){this.handlers[e]&&(this.handlers[e]=null)}},{key:"clear",value:function(){this.handlers&&(this.handlers=[])}},{key:"forEach",value:function(e){be.forEach(this.handlers,function(t){null!==t&&e(t)})}}])}(),Le={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},je={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:Oe,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},Ue="undefined"!=typeof window&&"undefined"!=typeof document,Fe="object"===("undefined"==typeof navigator?"undefined":x(navigator))&&navigator||void 0,Be=Ue&&(!Fe||["ReactNative","NativeScript","NS"].indexOf(Fe.product)<0),Me="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,ze=Ue&&window.location.href||"http://localhost",He=w(w({},Object.freeze({__proto__:null,hasBrowserEnv:Ue,hasStandardBrowserWebWorkerEnv:Me,hasStandardBrowserEnv:Be,navigator:Fe,origin:ze})),je);function Ve(e){function t(e,r,n,i){var o=e[i++];if("__proto__"===o)return!0;var a=Number.isFinite(+o),s=i>=e.length;return o=!o&&be.isArray(n)?n.length:o,s?(be.hasOwnProp(n,o)?n[o]=[n[o],r]:n[o]=r,!a):(n[o]&&be.isObject(n[o])||(n[o]=[]),t(e,r,n[o],i)&&be.isArray(n[o])&&(n[o]=function(e){var t,r,n={},i=Object.keys(e),o=i.length;for(t=0;t<o;t++)n[r=i[t]]=e[r];return n}(n[o])),!a)}if(be.isFormData(e)&&be.isFunction(e.entries)){var r={};return be.forEachEntry(e,function(e,n){t(function(e){return be.matchAll(/\w+|\[(\w*)]/g,e).map(function(e){return"[]"===e[0]?"":e[1]||e[0]})}(e),n,r,0)}),r}return null}var Ke={transitional:Le,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){var r,n=t.getContentType()||"",i=n.indexOf("application/json")>-1,o=be.isObject(e);if(o&&be.isHTMLForm(e)&&(e=new FormData(e)),be.isFormData(e))return i?JSON.stringify(Ve(e)):e;if(be.isArrayBuffer(e)||be.isBuffer(e)||be.isStream(e)||be.isFile(e)||be.isBlob(e)||be.isReadableStream(e))return e;if(be.isArrayBufferView(e))return e.buffer;if(be.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return Ce(e,new He.classes.URLSearchParams,w({visitor:function(e,t,r,n){return He.isNode&&be.isBuffer(e)?(this.append(t,e.toString("base64")),!1):n.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((r=be.isFileList(e))||n.indexOf("multipart/form-data")>-1){var a=this.env&&this.env.FormData;return Ce(r?{"files[]":e}:e,a&&new a,this.formSerializer)}}return o||i?(t.setContentType("application/json",!1),function(e,t,r){if(be.isString(e))try{return(t||JSON.parse)(e),be.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(r||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional||Ke.transitional,r=t&&t.forcedJSONParsing,n="json"===this.responseType;if(be.isResponse(e)||be.isReadableStream(e))return e;if(e&&be.isString(e)&&(r&&!this.responseType||n)){var i=!(t&&t.silentJSONParsing)&&n;try{return JSON.parse(e)}catch(e){if(i){if("SyntaxError"===e.name)throw ke.from(e,ke.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:He.classes.FormData,Blob:He.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};be.forEach(["delete","get","head","post","put","patch"],function(e){Ke.headers[e]={}});var qe=Ke,Qe=be.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),We=Symbol("internals");function Je(e){return e&&String(e).trim().toLowerCase()}function Ge(e){return!1===e||null==e?e:be.isArray(e)?e.map(Ge):String(e)}function Xe(e,t,r,n,i){return be.isFunction(n)?n.call(this,t,r):(i&&(t=r),be.isString(t)?be.isString(n)?-1!==t.indexOf(n):be.isRegExp(n)?n.test(t):void 0:void 0)}var $e=function(){return h(function e(t){l(this,e),t&&this.set(t)},[{key:"set",value:function(e,t,r){var n=this;function i(e,t,r){var i=Je(t);if(!i)throw new Error("header name must be a non-empty string");var o=be.findKey(n,i);(!o||void 0===n[o]||!0===r||void 0===r&&!1!==n[o])&&(n[o||t]=Ge(e))}var o=function(e,t){return be.forEach(e,function(e,r){return i(e,r,t)})};if(be.isPlainObject(e)||e instanceof this.constructor)o(e,t);else if(be.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))o(function(e){var t,r,n,i={};return e&&e.split("\n").forEach(function(e){n=e.indexOf(":"),t=e.substring(0,n).trim().toLowerCase(),r=e.substring(n+1).trim(),!t||i[t]&&Qe[t]||("set-cookie"===t?i[t]?i[t].push(r):i[t]=[r]:i[t]=i[t]?i[t]+", "+r:r)}),i}(e),t);else if(be.isObject(e)&&be.isIterable(e)){var a,s,u,c={},l=d(e);try{for(l.s();!(u=l.n()).done;){var f=u.value;if(!be.isArray(f))throw TypeError("Object iterator must return a key-value pair");c[s=f[0]]=(a=c[s])?be.isArray(a)?[].concat(S(a),[f[1]]):[a,f[1]]:f[1]}}catch(e){l.e(e)}finally{l.f()}o(c,t)}else null!=e&&i(t,e,r);return this}},{key:"get",value:function(e,t){if(e=Je(e)){var r=be.findKey(this,e);if(r){var n=this[r];if(!t)return n;if(!0===t)return function(e){for(var t,r=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;t=n.exec(e);)r[t[1]]=t[2];return r}(n);if(be.isFunction(t))return t.call(this,n,r);if(be.isRegExp(t))return t.exec(n);throw new TypeError("parser must be boolean|regexp|function")}}}},{key:"has",value:function(e,t){if(e=Je(e)){var r=be.findKey(this,e);return!(!r||void 0===this[r]||t&&!Xe(0,this[r],r,t))}return!1}},{key:"delete",value:function(e,t){var r=this,n=!1;function i(e){if(e=Je(e)){var i=be.findKey(r,e);!i||t&&!Xe(0,r[i],i,t)||(delete r[i],n=!0)}}return be.isArray(e)?e.forEach(i):i(e),n}},{key:"clear",value:function(e){for(var t=Object.keys(this),r=t.length,n=!1;r--;){var i=t[r];e&&!Xe(0,this[i],i,e,!0)||(delete this[i],n=!0)}return n}},{key:"normalize",value:function(e){var t=this,r={};return be.forEach(this,function(n,i){var o=be.findKey(r,i);if(o)return t[o]=Ge(n),void delete t[i];var a=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,function(e,t,r){return t.toUpperCase()+r})}(i):String(i).trim();a!==i&&delete t[i],t[a]=Ge(n),r[a]=!0}),this}},{key:"concat",value:function(){for(var e,t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return(e=this.constructor).concat.apply(e,[this].concat(r))}},{key:"toJSON",value:function(e){var t=Object.create(null);return be.forEach(this,function(r,n){null!=r&&!1!==r&&(t[n]=e&&be.isArray(r)?r.join(", "):r)}),t}},{key:Symbol.iterator,value:function(){return Object.entries(this.toJSON())[Symbol.iterator]()}},{key:"toString",value:function(){return Object.entries(this.toJSON()).map(function(e){var t=T(e,2);return t[0]+": "+t[1]}).join("\n")}},{key:"getSetCookie",value:function(){return this.get("set-cookie")||[]}},{key:Symbol.toStringTag,get:function(){return"AxiosHeaders"}}],[{key:"from",value:function(e){return e instanceof this?e:new this(e)}},{key:"concat",value:function(e){for(var t=new this(e),r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];return n.forEach(function(e){return t.set(e)}),t}},{key:"accessor",value:function(e){var t=(this[We]=this[We]={accessors:{}}).accessors,r=this.prototype;function n(e){var n=Je(e);t[n]||(!function(e,t){var r=be.toCamelCase(" "+t);["get","set","has"].forEach(function(n){Object.defineProperty(e,n+r,{value:function(e,r,i){return this[n].call(this,t,e,r,i)},configurable:!0})})}(r,e),t[n]=!0)}return be.isArray(e)?e.forEach(n):n(e),this}}])}();$e.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),be.reduceDescriptors($e.prototype,function(e,t){var r=e.value,n=t[0].toUpperCase()+t.slice(1);return{get:function(){return r},set:function(e){this[n]=e}}}),be.freezeMethods($e);var Ye=$e;function Ze(e,t){var r=this||qe,n=t||r,i=Ye.from(n.headers),o=n.data;return be.forEach(e,function(e){o=e.call(r,o,i.normalize(),t?t.status:void 0)}),i.normalize(),o}function et(e){return!(!e||!e.__CANCEL__)}function tt(e,t,r){ke.call(this,null==e?"canceled":e,ke.ERR_CANCELED,t,r),this.name="CanceledError"}function rt(e,t,r){var n=r.config.validateStatus;r.status&&n&&!n(r.status)?t(new ke("Request failed with status code "+r.status,[ke.ERR_BAD_REQUEST,ke.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r)):e(r)}be.inherits(tt,ke,{__CANCEL__:!0});var nt=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:3,n=0,i=function(e,t){e=e||10;var r,n=new Array(e),i=new Array(e),o=0,a=0;return t=void 0!==t?t:1e3,function(s){var u=Date.now(),c=i[a];r||(r=u),n[o]=s,i[o]=u;for(var l=a,f=0;l!==o;)f+=n[l++],l%=e;if((o=(o+1)%e)===a&&(a=(a+1)%e),!(u-r<t)){var h=c&&u-c;return h?Math.round(1e3*f/h):void 0}}}(50,250);return function(e,t){var r,n,i=0,o=1e3/t,a=function(t){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Date.now();i=o,r=null,n&&(clearTimeout(n),n=null),e.apply(void 0,S(t))};return[function(){for(var e=Date.now(),t=e-i,s=arguments.length,u=new Array(s),c=0;c<s;c++)u[c]=arguments[c];t>=o?a(u,e):(r=u,n||(n=setTimeout(function(){n=null,a(r)},o-t)))},function(){return r&&a(r)}]}(function(r){var o=r.loaded,a=r.lengthComputable?r.total:void 0,s=o-n,u=i(s);n=o;var c=p({loaded:o,total:a,progress:a?o/a:void 0,bytes:s,rate:u||void 0,estimated:u&&a&&o<=a?(a-o)/u:void 0,event:r,lengthComputable:null!=a},t?"download":"upload",!0);e(c)},r)},it=function(e,t){var r=null!=e;return[function(n){return t[0]({lengthComputable:r,total:e,loaded:n})},t[1]]},ot=function(e){return function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return be.asap(function(){return e.apply(void 0,r)})}},at=He.hasStandardBrowserEnv?function(e,t){return function(r){return r=new URL(r,He.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)}}(new URL(He.origin),He.navigator&&/(msie|trident)/i.test(He.navigator.userAgent)):function(){return!0},st=He.hasStandardBrowserEnv?{write:function(e,t,r,n,i,o){var a=[e+"="+encodeURIComponent(t)];be.isNumber(r)&&a.push("expires="+new Date(r).toGMTString()),be.isString(n)&&a.push("path="+n),be.isString(i)&&a.push("domain="+i),!0===o&&a.push("secure"),document.cookie=a.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}};function ut(e,t,r){var n=!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t);return e&&(n||0==r)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}var ct=function(e){return e instanceof Ye?w({},e):e};function lt(e,t){t=t||{};var r={};function n(e,t,r,n){return be.isPlainObject(e)&&be.isPlainObject(t)?be.merge.call({caseless:n},e,t):be.isPlainObject(t)?be.merge({},t):be.isArray(t)?t.slice():t}function i(e,t,r,i){return be.isUndefined(t)?be.isUndefined(e)?void 0:n(void 0,e,0,i):n(e,t,0,i)}function o(e,t){if(!be.isUndefined(t))return n(void 0,t)}function a(e,t){return be.isUndefined(t)?be.isUndefined(e)?void 0:n(void 0,e):n(void 0,t)}function s(r,i,o){return o in t?n(r,i):o in e?n(void 0,r):void 0}var u={url:o,method:o,data:o,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:function(e,t,r){return i(ct(e),ct(t),0,!0)}};return be.forEach(Object.keys(w(w({},e),t)),function(n){var o=u[n]||i,a=o(e[n],t[n],n);be.isUndefined(a)&&o!==s||(r[n]=a)}),r}var ft,ht,dt=function(e){var t,i,o=lt({},e),a=o.data,s=o.withXSRFToken,u=o.xsrfHeaderName,c=o.xsrfCookieName,l=o.headers,f=o.auth;if(o.headers=l=Ye.from(l),o.url=_e(ut(o.baseURL,o.url,o.allowAbsoluteUrls),e.params,e.paramsSerializer),f&&l.set("Authorization","Basic "+btoa((f.username||"")+":"+(f.password?unescape(encodeURIComponent(f.password)):""))),be.isFormData(a))if(He.hasStandardBrowserEnv||He.hasStandardBrowserWebWorkerEnv)l.setContentType(void 0);else if(!1!==(t=l.getContentType())){var h=t?t.split(";").map(function(e){return e.trim()}).filter(Boolean):[],d=n(i=h)||g(i)||P(i)||v(),p=d[0],m=r(d).slice(1);l.setContentType([p||"multipart/form-data"].concat(S(m)).join("; "))}if(He.hasStandardBrowserEnv&&(s&&be.isFunction(s)&&(s=s(o)),s||!1!==s&&at(o.url))){var w=u&&c&&st.read(c);w&&l.set(u,w)}return o},pt="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise(function(t,r){var n,i,o,a,s,u=dt(e),c=u.data,l=Ye.from(u.headers).normalize(),f=u.responseType,h=u.onUploadProgress,d=u.onDownloadProgress;function p(){a&&a(),s&&s(),u.cancelToken&&u.cancelToken.unsubscribe(n),u.signal&&u.signal.removeEventListener("abort",n)}var g=new XMLHttpRequest;function v(){if(g){var n=Ye.from("getAllResponseHeaders"in g&&g.getAllResponseHeaders());rt(function(e){t(e),p()},function(e){r(e),p()},{data:f&&"text"!==f&&"json"!==f?g.response:g.responseText,status:g.status,statusText:g.statusText,headers:n,config:e,request:g}),g=null}}if(g.open(u.method.toUpperCase(),u.url,!0),g.timeout=u.timeout,"onloadend"in g?g.onloadend=v:g.onreadystatechange=function(){g&&4===g.readyState&&(0!==g.status||g.responseURL&&0===g.responseURL.indexOf("file:"))&&setTimeout(v)},g.onabort=function(){g&&(r(new ke("Request aborted",ke.ECONNABORTED,e,g)),g=null)},g.onerror=function(){r(new ke("Network Error",ke.ERR_NETWORK,e,g)),g=null},g.ontimeout=function(){var t=u.timeout?"timeout of "+u.timeout+"ms exceeded":"timeout exceeded",n=u.transitional||Le;u.timeoutErrorMessage&&(t=u.timeoutErrorMessage),r(new ke(t,n.clarifyTimeoutError?ke.ETIMEDOUT:ke.ECONNABORTED,e,g)),g=null},void 0===c&&l.setContentType(null),"setRequestHeader"in g&&be.forEach(l.toJSON(),function(e,t){g.setRequestHeader(t,e)}),be.isUndefined(u.withCredentials)||(g.withCredentials=!!u.withCredentials),f&&"json"!==f&&(g.responseType=u.responseType),d){var m=T(nt(d,!0),2);o=m[0],s=m[1],g.addEventListener("progress",o)}if(h&&g.upload){var w=T(nt(h),2);i=w[0],a=w[1],g.upload.addEventListener("progress",i),g.upload.addEventListener("loadend",a)}(u.cancelToken||u.signal)&&(n=function(t){g&&(r(!t||t.type?new tt(null,e,g):t),g.abort(),g=null)},u.cancelToken&&u.cancelToken.subscribe(n),u.signal&&(u.signal.aborted?n():u.signal.addEventListener("abort",n)));var y,b,k=(y=u.url,(b=/^([-+\w]{1,25})(:?\/\/|:)/.exec(y))&&b[1]||"");k&&-1===He.protocols.indexOf(k)?r(new ke("Unsupported protocol "+k+":",ke.ERR_BAD_REQUEST,e)):g.send(c||null)})},gt=function(e,t){var r=(e=e?e.filter(Boolean):[]).length;if(t||r){var n,i=new AbortController,o=function(e){if(!n){n=!0,s();var t=e instanceof Error?e:this.reason;i.abort(t instanceof ke?t:new tt(t instanceof Error?t.message:t))}},a=t&&setTimeout(function(){a=null,o(new ke("timeout ".concat(t," of ms exceeded"),ke.ETIMEDOUT))},t),s=function(){e&&(a&&clearTimeout(a),a=null,e.forEach(function(e){e.unsubscribe?e.unsubscribe(o):e.removeEventListener("abort",o)}),e=null)};e.forEach(function(e){return e.addEventListener("abort",o)});var u=i.signal;return u.unsubscribe=function(){return be.asap(s)},u}},vt=y().m(function e(t,r){var n,i,o;return y().w(function(e){for(;;)switch(e.n){case 0:if(n=t.byteLength,r&&!(n<r)){e.n=2;break}return e.n=1,t;case 1:return e.a(2);case 2:i=0;case 3:if(!(i<n)){e.n=5;break}return o=i+r,e.n=4,t.slice(i,o);case 4:i=o,e.n=3;break;case 5:return e.a(2)}},e)}),mt=function(){var e=R(y().m(function e(t,r){var n,a,s,u,l,f,h;return y().w(function(e){for(;;)switch(e.p=e.n){case 0:n=!1,a=!1,e.p=1,u=o(wt(t));case 2:return e.n=3,c(u.next());case 3:if(!(n=!(l=e.v).done)){e.n=5;break}return f=l.value,e.d(k(i(o(vt(f,r)))),4);case 4:n=!1,e.n=2;break;case 5:e.n=7;break;case 6:e.p=6,h=e.v,a=!0,s=h;case 7:if(e.p=7,e.p=8,!n||null==u.return){e.n=9;break}return e.n=9,c(u.return());case 9:if(e.p=9,!a){e.n=10;break}throw s;case 10:return e.f(9);case 11:return e.f(7);case 12:return e.a(2)}},e,null,[[8,,9,11],[1,6,7,12]])}));return function(t,r){return e.apply(this,arguments)}}(),wt=function(){var e=R(y().m(function e(t){var r,n,a,s;return y().w(function(e){for(;;)switch(e.p=e.n){case 0:if(!t[Symbol.asyncIterator]){e.n=2;break}return e.d(k(i(o(t))),1);case 1:return e.a(2);case 2:r=t.getReader(),e.p=3;case 4:return e.n=5,c(r.read());case 5:if(n=e.v,a=n.done,s=n.value,!a){e.n=6;break}return e.a(3,8);case 6:return e.n=7,s;case 7:e.n=4;break;case 8:return e.p=8,e.n=9,c(r.cancel());case 9:return e.f(8);case 10:return e.a(2)}},e,null,[[3,,8,10]])}));return function(t){return e.apply(this,arguments)}}(),yt=function(e,t,r,n){var i,o=mt(e,t),a=0,s=function(e){i||(i=!0,n&&n(e))};return new ReadableStream({pull:function(e){return u(y().m(function t(){var n,i,u,c,l,f;return y().w(function(t){for(;;)switch(t.p=t.n){case 0:return t.p=0,t.n=1,o.next();case 1:if(n=t.v,i=n.done,u=n.value,!i){t.n=2;break}return s(),e.close(),t.a(2);case 2:c=u.byteLength,r&&(l=a+=c,r(l)),e.enqueue(new Uint8Array(u)),t.n=4;break;case 3:throw t.p=3,f=t.v,s(f),f;case 4:return t.a(2)}},t,null,[[0,3]])}))()},cancel:function(e){return s(e),o.return()}},{highWaterMark:2})},bt="function"==typeof fetch&&"function"==typeof Request&&"function"==typeof Response,kt=bt&&"function"==typeof ReadableStream,Tt=bt&&("function"==typeof TextEncoder?(ft=new TextEncoder,function(e){return ft.encode(e)}):function(){var e=u(y().m(function e(t){var r,n;return y().w(function(e){for(;;)switch(e.n){case 0:return r=Uint8Array,e.n=1,new Response(t).arrayBuffer();case 1:return n=e.v,e.a(2,new r(n))}},e)}));return function(t){return e.apply(this,arguments)}}()),St=function(e){try{for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return!!e.apply(void 0,r)}catch(e){return!1}},Et=kt&&St(function(){var e=!1,t=new Request(He.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),xt=kt&&St(function(){return be.isReadableStream(new Response("").body)}),Pt={stream:xt&&function(e){return e.body}};bt&&(ht=new Response,["text","arrayBuffer","blob","formData","stream"].forEach(function(e){!Pt[e]&&(Pt[e]=be.isFunction(ht[e])?function(t){return t[e]()}:function(t,r){throw new ke("Response type '".concat(e,"' is not supported"),ke.ERR_NOT_SUPPORT,r)})}));var Rt=function(){var e=u(y().m(function e(t){var r;return y().w(function(e){for(;;)switch(e.n){case 0:if(null!=t){e.n=1;break}return e.a(2,0);case 1:if(!be.isBlob(t)){e.n=2;break}return e.a(2,t.size);case 2:if(!be.isSpecCompliantForm(t)){e.n=4;break}return r=new Request(He.origin,{method:"POST",body:t}),e.n=3,r.arrayBuffer();case 3:case 6:return e.a(2,e.v.byteLength);case 4:if(!be.isArrayBufferView(t)&&!be.isArrayBuffer(t)){e.n=5;break}return e.a(2,t.byteLength);case 5:if(be.isURLSearchParams(t)&&(t+=""),!be.isString(t)){e.n=7;break}return e.n=6,Tt(t);case 7:return e.a(2)}},e)}));return function(t){return e.apply(this,arguments)}}(),Ct=function(){var e=u(y().m(function e(t,r){var n;return y().w(function(e){for(;;)if(0===e.n)return n=be.toFiniteNumber(t.getContentLength()),e.a(2,null==n?Rt(r):n)},e)}));return function(t,r){return e.apply(this,arguments)}}(),It=bt&&function(){var e=u(y().m(function e(t){var r,n,i,o,a,s,u,c,l,f,h,d,p,g,v,m,b,k,S,E,x,P,R,C,I,O,A,D,_,N,L,j,U,F,B,M,z;return y().w(function(e){for(;;)switch(e.p=e.n){case 0:if(r=dt(t),n=r.url,i=r.method,o=r.data,a=r.signal,s=r.cancelToken,u=r.timeout,c=r.onDownloadProgress,l=r.onUploadProgress,f=r.responseType,h=r.headers,d=r.withCredentials,p=void 0===d?"same-origin":d,g=r.fetchOptions,f=f?(f+"").toLowerCase():"text",v=gt([a,s&&s.toAbortSignal()],u),b=v&&v.unsubscribe&&function(){v.unsubscribe()},e.p=1,!(B=l&&Et&&"get"!==i&&"head"!==i)){e.n=3;break}return e.n=2,Ct(h,o);case 2:M=k=e.v,B=0!==M;case 3:if(!B){e.n=4;break}S=new Request(n,{method:"POST",body:o,duplex:"half"}),be.isFormData(o)&&(E=S.headers.get("content-type"))&&h.setContentType(E),S.body&&(x=it(k,nt(ot(l))),P=T(x,2),R=P[0],C=P[1],o=yt(S.body,65536,R,C));case 4:return be.isString(p)||(p=p?"include":"omit"),I="credentials"in Request.prototype,m=new Request(n,w(w({},g),{},{signal:v,method:i.toUpperCase(),headers:h.normalize().toJSON(),body:o,duplex:"half",credentials:I?p:void 0})),e.n=5,fetch(m,g);case 5:return O=e.v,A=xt&&("stream"===f||"response"===f),xt&&(c||A&&b)&&(D={},["status","statusText","headers"].forEach(function(e){D[e]=O[e]}),_=be.toFiniteNumber(O.headers.get("content-length")),N=c&&it(_,nt(ot(c),!0))||[],L=T(N,2),j=L[0],U=L[1],O=new Response(yt(O.body,65536,j,function(){U&&U(),b&&b()}),D)),f=f||"text",e.n=6,Pt[be.findKey(Pt,f)||"text"](O,t);case 6:return F=e.v,!A&&b&&b(),e.n=7,new Promise(function(e,r){rt(e,r,{data:F,headers:Ye.from(O.headers),status:O.status,statusText:O.statusText,config:t,request:m})});case 7:return e.a(2,e.v);case 8:if(e.p=8,z=e.v,b&&b(),!z||"TypeError"!==z.name||!/Load failed|fetch/i.test(z.message)){e.n=9;break}throw Object.assign(new ke("Network Error",ke.ERR_NETWORK,t,m),{cause:z.cause||z});case 9:throw ke.from(z,z&&z.code,t,m);case 10:return e.a(2)}},e,null,[[1,8]])}));return function(t){return e.apply(this,arguments)}}(),Ot={http:null,xhr:pt,fetch:It};be.forEach(Ot,function(e,t){if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}});var At=function(e){return"- ".concat(e)},Dt=function(e){return be.isFunction(e)||null===e||!1===e},_t=function(e){for(var t,r,n=(e=be.isArray(e)?e:[e]).length,i={},o=0;o<n;o++){var a=void 0;if(r=t=e[o],!Dt(t)&&void 0===(r=Ot[(a=String(t)).toLowerCase()]))throw new ke("Unknown adapter '".concat(a,"'"));if(r)break;i[a||"#"+o]=r}if(!r){var s=Object.entries(i).map(function(e){var t=T(e,2),r=t[0],n=t[1];return"adapter ".concat(r," ")+(!1===n?"is not supported by the environment":"is not available in the build")});throw new ke("There is no suitable adapter to dispatch the request "+(n?s.length>1?"since :\n"+s.map(At).join("\n"):" "+At(s[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return r};function Nt(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new tt(null,e)}function Lt(e){return Nt(e),e.headers=Ye.from(e.headers),e.data=Ze.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1),_t(e.adapter||qe.adapter)(e).then(function(t){return Nt(e),t.data=Ze.call(e,e.transformResponse,t),t.headers=Ye.from(t.headers),t},function(t){return et(t)||(Nt(e),t&&t.response&&(t.response.data=Ze.call(e,e.transformResponse,t.response),t.response.headers=Ye.from(t.response.headers))),Promise.reject(t)})}var jt="1.11.0",Ut={};["object","boolean","number","function","string","symbol"].forEach(function(e,t){Ut[e]=function(r){return x(r)===e||"a"+(t<1?"n ":" ")+e}});var Ft={};Ut.transitional=function(e,t,r){function n(e,t){return"[Axios v"+jt+"] Transitional option '"+e+"'"+t+(r?". "+r:"")}return function(r,i,o){if(!1===e)throw new ke(n(i," has been removed"+(t?" in "+t:"")),ke.ERR_DEPRECATED);return t&&!Ft[i]&&(Ft[i]=!0,console.warn(n(i," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(r,i,o)}},Ut.spelling=function(e){return function(t,r){return console.warn("".concat(r," is likely a misspelling of ").concat(e)),!0}};var Bt={assertOptions:function(e,t,r){if("object"!==x(e))throw new ke("options must be an object",ke.ERR_BAD_OPTION_VALUE);for(var n=Object.keys(e),i=n.length;i-- >0;){var o=n[i],a=t[o];if(a){var s=e[o],u=void 0===s||a(s,o,e);if(!0!==u)throw new ke("option "+o+" must be "+u,ke.ERR_BAD_OPTION_VALUE)}else if(!0!==r)throw new ke("Unknown option "+o,ke.ERR_BAD_OPTION)}},validators:Ut},Mt=Bt.validators,zt=function(){return h(function e(t){l(this,e),this.defaults=t||{},this.interceptors={request:new Ne,response:new Ne}},[{key:"request",value:(e=u(y().m(function e(t,r){var n,i,o;return y().w(function(e){for(;;)switch(e.p=e.n){case 0:return e.p=0,e.n=1,this._request(t,r);case 1:return e.a(2,e.v);case 2:if(e.p=2,(o=e.v)instanceof Error){n={},Error.captureStackTrace?Error.captureStackTrace(n):n=new Error,i=n.stack?n.stack.replace(/^.+\n/,""):"";try{o.stack?i&&!String(o.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(o.stack+="\n"+i):o.stack=i}catch(e){}}throw o;case 3:return e.a(2)}},e,this,[[0,2]])})),function(t,r){return e.apply(this,arguments)})},{key:"_request",value:function(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{};var r=t=lt(this.defaults,t),n=r.transitional,i=r.paramsSerializer,o=r.headers;void 0!==n&&Bt.assertOptions(n,{silentJSONParsing:Mt.transitional(Mt.boolean),forcedJSONParsing:Mt.transitional(Mt.boolean),clarifyTimeoutError:Mt.transitional(Mt.boolean)},!1),null!=i&&(be.isFunction(i)?t.paramsSerializer={serialize:i}:Bt.assertOptions(i,{encode:Mt.function,serialize:Mt.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),Bt.assertOptions(t,{baseUrl:Mt.spelling("baseURL"),withXsrfToken:Mt.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();var a=o&&be.merge(o.common,o[t.method]);o&&be.forEach(["delete","get","head","post","put","patch","common"],function(e){delete o[e]}),t.headers=Ye.concat(a,o);var s=[],u=!0;this.interceptors.request.forEach(function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(u=u&&e.synchronous,s.unshift(e.fulfilled,e.rejected))});var c,l=[];this.interceptors.response.forEach(function(e){l.push(e.fulfilled,e.rejected)});var f,h=0;if(!u){var d=[Lt.bind(this),void 0];for(d.unshift.apply(d,s),d.push.apply(d,l),f=d.length,c=Promise.resolve(t);h<f;)c=c.then(d[h++],d[h++]);return c}f=s.length;var p=t;for(h=0;h<f;){var g=s[h++],v=s[h++];try{p=g(p)}catch(e){v.call(this,e);break}}try{c=Lt.call(this,p)}catch(e){return Promise.reject(e)}for(h=0,f=l.length;h<f;)c=c.then(l[h++],l[h++]);return c}},{key:"getUri",value:function(e){return _e(ut((e=lt(this.defaults,e)).baseURL,e.url,e.allowAbsoluteUrls),e.params,e.paramsSerializer)}}]);var e}();be.forEach(["delete","get","head","options"],function(e){zt.prototype[e]=function(t,r){return this.request(lt(r||{},{method:e,url:t,data:(r||{}).data}))}}),be.forEach(["post","put","patch"],function(e){function t(t){return function(r,n,i){return this.request(lt(i||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:r,data:n}))}}zt.prototype[e]=t(),zt.prototype[e+"Form"]=t(!0)});var Ht=zt,Vt=function(){function e(t){if(l(this,e),"function"!=typeof t)throw new TypeError("executor must be a function.");var r;this.promise=new Promise(function(e){r=e});var n=this;this.promise.then(function(e){if(n._listeners){for(var t=n._listeners.length;t-- >0;)n._listeners[t](e);n._listeners=null}}),this.promise.then=function(e){var t,r=new Promise(function(e){n.subscribe(e),t=e}).then(e);return r.cancel=function(){n.unsubscribe(t)},r},t(function(e,t,i){n.reason||(n.reason=new tt(e,t,i),r(n.reason))})}return h(e,[{key:"throwIfRequested",value:function(){if(this.reason)throw this.reason}},{key:"subscribe",value:function(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}},{key:"unsubscribe",value:function(e){if(this._listeners){var t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}}},{key:"toAbortSignal",value:function(){var e=this,t=new AbortController,r=function(e){t.abort(e)};return this.subscribe(r),t.signal.unsubscribe=function(){return e.unsubscribe(r)},t.signal}}],[{key:"source",value:function(){var t;return{token:new e(function(e){t=e}),cancel:t}}}])}(),Kt=Vt;var qt={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(qt).forEach(function(e){var t=T(e,2),r=t[0],n=t[1];qt[n]=r});var Qt=qt;var Wt=function e(t){var r=new Ht(t),n=I(Ht.prototype.request,r);return be.extend(n,Ht.prototype,r,{allOwnKeys:!0}),be.extend(n,r,null,{allOwnKeys:!0}),n.create=function(r){return e(lt(t,r))},n}(qe);Wt.Axios=Ht,Wt.CanceledError=tt,Wt.CancelToken=Kt,Wt.isCancel=et,Wt.VERSION=jt,Wt.toFormData=Ce,Wt.AxiosError=ke,Wt.Cancel=Wt.CanceledError,Wt.all=function(e){return Promise.all(e)},Wt.spread=function(e){return function(t){return e.apply(null,t)}},Wt.isAxiosError=function(e){return be.isObject(e)&&!0===e.isAxiosError},Wt.mergeConfig=lt,Wt.AxiosHeaders=Ye,Wt.formToJSON=function(e){return Ve(be.isHTMLForm(e)?new FormData(e):e)},Wt.getAdapter=_t,Wt.HttpStatusCode=Qt,Wt.default=Wt;var Jt=Wt;Jt.Axios,Jt.AxiosError,Jt.CanceledError,Jt.isCancel,Jt.CancelToken,Jt.VERSION,Jt.all,Jt.Cancel,Jt.isAxiosError,Jt.spread,Jt.toFormData,Jt.AxiosHeaders,Jt.HttpStatusCode,Jt.formToJSON,Jt.getAdapter,Jt.mergeConfig;var Gt=Jt.create({timeout:1e4,headers:{"Content-Type":"multipart/form-data"}});Gt.interceptors.request.use(function(e){return e},function(e){return Promise.reject(e)}),Gt.interceptors.response.use(function(e){return e},function(e){return Promise.reject(e)});var Xt,$t="user-agent",Yt="",Zt="function",er="object",tr="string",rr="undefined",nr="browser",ir="cpu",or="device",ar="engine",sr="os",ur="result",cr="name",lr="type",fr="vendor",hr="version",dr="architecture",pr="major",gr="model",vr="console",mr="mobile",wr="tablet",yr="smarttv",br="wearable",kr="xr",Tr="embedded",Sr="inapp",Er="brands",xr="formFactors",Pr="fullVersionList",Rr="platform",Cr="platformVersion",Ir="bitness",Or="sec-ch-ua",Ar=Or+"-full-version-list",Dr=Or+"-arch",_r=Or+"-"+Ir,Nr=Or+"-form-factors",Lr=Or+"-"+mr,jr=Or+"-"+gr,Ur=Or+"-"+Rr,Fr=Ur+"-version",Br=[Er,Pr,mr,gr,Rr,Cr,dr,xr,Ir],Mr="Amazon",zr="Apple",Hr="ASUS",Vr="BlackBerry",Kr="Google",qr="Huawei",Qr="Lenovo",Wr="Honor",Jr="LG",Gr="Microsoft",Xr="Motorola",$r="Nvidia",Yr="OnePlus",Zr="OPPO",en="Samsung",tn="Sharp",rn="Sony",nn="Xiaomi",on="Zebra",an="Chrome",sn="Chromium",un="Chromecast",cn="Edge",ln="Firefox",fn="Opera",hn="Facebook",dn="Sogou",pn="Mobile ",gn=" Browser",vn="Windows",mn=("undefined"==typeof window?"undefined":x(window))!==rr&&window.navigator?window.navigator:void 0,wn=mn&&mn.userAgentData?mn.userAgentData:void 0,yn=function(e){for(var t={},r=0;r<e.length;r++)t[e[r].toUpperCase()]=e[r];return t},bn=function(e,t){if(x(e)===er&&e.length>0){for(var r in e)if(En(t)==En(e[r]))return!0;return!1}return!!Tn(e)&&En(t)==En(e)},kn=function(e,t){for(var r in e)return/^(browser|cpu|device|engine|os)$/.test(r)||!!t&&kn(e[r])},Tn=function(e){return x(e)===tr},Sn=function(e){if(e){for(var t=[],r=Rn(/\\?\"/g,e).split(","),n=0;n<r.length;n++)if(r[n].indexOf(";")>-1){var i=In(r[n]).split(";v=");t[n]={brand:i[0],version:i[1]}}else t[n]=In(r[n]);return t}},En=function(e){return Tn(e)?e.toLowerCase():e},xn=function(e){return Tn(e)?Rn(/[^\d\.]/g,e).split(".")[0]:void 0},Pn=function(e){for(var t in e)if(e.hasOwnProperty(t)){var r=e[t];x(r)==er&&2==r.length?this[r[0]]=r[1]:this[r]=void 0}return this},Rn=function(e,t){return Tn(t)?t.replace(e,Yt):t},Cn=function(e){return Rn(/\\?\"/g,e)},In=function(e,t){return e=Rn(/^\s\s*/,String(e)),x(t)===rr?e:e.substring(0,t)},On=function(e,t){if(e&&t)for(var r,n,i,o,a,s,u=0;u<t.length&&!a;){var c=t[u],l=t[u+1];for(r=n=0;r<c.length&&!a&&c[r];)if(a=c[r++].exec(e))for(i=0;i<l.length;i++)s=a[++n],x(o=l[i])===er&&o.length>0?2===o.length?x(o[1])==Zt?this[o[0]]=o[1].call(this,s):this[o[0]]=o[1]:o.length>=3&&(x(o[1])!==Zt||o[1].exec&&o[1].test?3==o.length?this[o[0]]=s?s.replace(o[1],o[2]):void 0:4==o.length?this[o[0]]=s?o[3].call(this,s.replace(o[1],o[2])):void 0:o.length>4&&(this[o[0]]=s?o[3].apply(this,[s.replace(o[1],o[2])].concat(o.slice(4))):void 0):o.length>3?this[o[0]]=s?o[1].apply(this,o.slice(2)):void 0:this[o[0]]=s?o[1].call(this,s,o[2]):void 0):this[o]=s||void 0;u+=2}},An=function(e,t){for(var r in t)if(x(t[r])===er&&t[r].length>0){for(var n=0;n<t[r].length;n++)if(bn(t[r][n],e))return"?"===r?void 0:r}else if(bn(t[r],e))return"?"===r?void 0:r;return t.hasOwnProperty("*")?t["*"]:e},Dn={ME:"4.90","NT 3.51":"3.51","NT 4.0":"4.0",2e3:["5.0","5.01"],XP:["5.1","5.2"],Vista:"6.0",7:"6.1",8:"6.2",8.1:"6.3",10:["6.4","10.0"],NT:""},_n={embedded:"Automotive",mobile:"Mobile",tablet:["Tablet","EInk"],smarttv:"TV",wearable:"Watch",xr:["VR","XR"],"?":["Desktop","Unknown"],"*":void 0},Nn={Chrome:"Google Chrome",Edge:"Microsoft Edge","Edge WebView2":"Microsoft Edge WebView2","Chrome WebView":"Android WebView","Chrome Headless":"HeadlessChrome","Huawei Browser":"HuaweiBrowser","MIUI Browser":"Miui Browser","Opera Mobi":"OperaMobile",Yandex:"YaBrowser"},Ln={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[hr,[cr,pn+"Chrome"]],[/webview.+edge\/([\w\.]+)/i],[hr,[cr,cn+" WebView"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[hr,[cr,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[cr,hr],[/opios[\/ ]+([\w\.]+)/i],[hr,[cr,fn+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[hr,[cr,fn+" GX"]],[/\bopr\/([\w\.]+)/i],[hr,[cr,fn]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[hr,[cr,"Baidu"]],[/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i],[hr,[cr,"Maxthon"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim(?:browser|boat|jet))[\/ ]?([\d\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio|(?=comodo_)?dragon|otter|dooble|(?:lg |qute)browser|palemoon)\/([-\w\.]+)/i,/(heytap|ovi|115|surf|qwant)browser\/([\d\.]+)/i,/(qwant)(?:ios|mobile)\/([\d\.]+)/i,/(ecosia|weibo)(?:__| \w+@)([\d\.]+)/i],[cr,hr],[/quark(?:pc)?\/([-\w\.]+)/i],[hr,[cr,"Quark"]],[/\bddg\/([\w\.]+)/i],[hr,[cr,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[hr,[cr,"UCBrowser"]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[hr,[cr,"WeChat"]],[/konqueror\/([\w\.]+)/i],[hr,[cr,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[hr,[cr,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[hr,[cr,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[hr,[cr,"Smart "+Qr+gn]],[/(avast|avg)\/([\w\.]+)/i],[[cr,/(.+)/,"$1 Secure"+gn],hr],[/\bfocus\/([\w\.]+)/i],[hr,[cr,ln+" Focus"]],[/\bopt\/([\w\.]+)/i],[hr,[cr,fn+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[hr,[cr,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[hr,[cr,"Dolphin"]],[/coast\/([\w\.]+)/i],[hr,[cr,fn+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[hr,[cr,"MIUI"+gn]],[/fxios\/([\w\.-]+)/i],[hr,[cr,pn+ln]],[/\bqihoobrowser\/?([\w\.]*)/i],[hr,[cr,"360"]],[/\b(qq)\/([\w\.]+)/i],[[cr,/(.+)/,"$1Browser"],hr],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[cr,/(.+)/,"$1"+gn],hr],[/samsungbrowser\/([\w\.]+)/i],[hr,[cr,en+" Internet"]],[/metasr[\/ ]?([\d\.]+)/i],[hr,[cr,dn+" Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[cr,dn+" Mobile"],hr],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i],[cr,hr],[/(lbbrowser|rekonq)/i],[cr],[/ome\/([\w\.]+) \w* ?(iron) saf/i,/ome\/([\w\.]+).+qihu (360)[es]e/i],[hr,cr],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[cr,hn],hr,[lr,Sr]],[/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/(daum)apps[\/ ]([\w\.]+)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(bing)(?:web|sapphire)\/([\w\.]+)/i,/(instagram|snapchat|klarna)[\/ ]([-\w\.]+)/i],[cr,hr,[lr,Sr]],[/\bgsa\/([\w\.]+) .*safari\//i],[hr,[cr,"GSA"],[lr,Sr]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[hr,[cr,"TikTok"],[lr,Sr]],[/\[(linkedin)app\]/i],[cr,[lr,Sr]],[/(zalo(?:app)?)[\/\sa-z]*([\w\.-]+)/i],[[cr,/(.+)/,"Zalo"],hr,[lr,Sr]],[/(chromium)[\/ ]([-\w\.]+)/i],[cr,hr],[/headlesschrome(?:\/([\w\.]+)| )/i],[hr,[cr,an+" Headless"]],[/wv\).+chrome\/([\w\.]+).+edgw\//i],[hr,[cr,cn+" WebView2"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[cr,an+" WebView"],hr],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[hr,[cr,"Android"+gn]],[/chrome\/([\w\.]+) mobile/i],[hr,[cr,pn+"Chrome"]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[cr,hr],[/version\/([\w\.\,]+) .*mobile(?:\/\w+ | ?)safari/i],[hr,[cr,pn+"Safari"]],[/iphone .*mobile(?:\/\w+ | ?)safari/i],[[cr,pn+"Safari"]],[/version\/([\w\.\,]+) .*(safari)/i],[hr,cr],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[cr,[hr,"1"]],[/(webkit|khtml)\/([\w\.]+)/i],[cr,hr],[/(?:mobile|tablet);.*(firefox)\/([\w\.-]+)/i],[[cr,pn+ln],hr],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[cr,"Netscape"],hr],[/(wolvic|librewolf)\/([\w\.]+)/i],[cr,hr],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[hr,[cr,ln+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+(?= .+rv\:.+gecko\/\d+)|[0-4][\w\.]+(?!.+compatible))/i,/(amaya|dillo|doris|icab|ladybird|lynx|mosaic|netsurf|obigo|polaris|w3m|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/\b(links) \(([\w\.]+)/i],[cr,[hr,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[cr,[hr,/[^\d\.]+./,Yt]]],cpu:[[/\b((amd|x|x86[-_]?|wow|win)64)\b/i],[[dr,"amd64"]],[/(ia32(?=;))/i,/\b((i[346]|x)86)(pc)?\b/i],[[dr,"ia32"]],[/\b(aarch64|arm(v?[89]e?l?|_?64))\b/i],[[dr,"arm64"]],[/\b(arm(v[67])?ht?n?[fl]p?)\b/i],[[dr,"armhf"]],[/( (ce|mobile); ppc;|\/[\w\.]+arm\b)/i],[[dr,"arm"]],[/ sun4\w[;\)]/i],[[dr,"sparc"]],[/\b(avr32|ia64(?=;)|68k(?=\))|\barm(?=v([1-7]|[5-7]1)l?|;|eabi)|(irix|mips|sparc)(64)?\b|pa-risc)/i,/((ppc|powerpc)(64)?)( mac|;|\))/i,/(?:osf1|[freopnt]{3,4}bsd) (alpha)/i],[[dr,/ower/,Yt,En]],[/mc680.0/i],[[dr,"68k"]],[/winnt.+\[axp/i],[[dr,"alpha"]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[gr,[fr,en],[lr,wr]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr]|browser)[-\w]+)/i,/sec-(sgh\w+)/i],[gr,[fr,en],[lr,mr]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)[\/\);]/i],[gr,[fr,zr],[lr,mr]],[/\b(?:ios|apple\w+)\/.+[\(\/](ipad)/i,/\b(ipad)[\d,]*[;\] ].+(mac |i(pad)?)os/i],[gr,[fr,zr],[lr,wr]],[/(macintosh);/i],[gr,[fr,zr]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[gr,[fr,tn],[lr,mr]],[/\b((?:brt|eln|hey2?|gdi|jdn)-a?[lnw]09|(?:ag[rm]3?|jdn2|kob2)-a?[lw]0[09]hn)(?: bui|\)|;)/i],[gr,[fr,Wr],[lr,wr]],[/honor([-\w ]+)[;\)]/i],[gr,[fr,Wr],[lr,mr]],[/\b((?:ag[rs][2356]?k?|bah[234]?|bg[2o]|bt[kv]|cmr|cpn|db[ry]2?|jdn2|got|kob2?k?|mon|pce|scm|sht?|[tw]gr|vrd)-[ad]?[lw][0125][09]b?|605hw|bg2-u03|(?:gem|fdr|m2|ple|t1)-[7a]0[1-4][lu]|t1-a2[13][lw]|mediapad[\w\. ]*(?= bui|\)))\b(?!.+d\/s)/i],[gr,[fr,qr],[lr,wr]],[/(?:huawei) ?([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][\dc][adnt]?)\b(?!.+d\/s)/i],[gr,[fr,qr],[lr,mr]],[/oid[^\)]+; (2[\dbc]{4}(182|283|rp\w{2})[cgl]|m2105k81a?c)(?: bui|\))/i,/\b(?:xiao)?((?:red)?mi[-_ ]?pad[\w- ]*)(?: bui|\))/i],[[gr,/_/g," "],[fr,nn],[lr,wr]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note|max|cc)?[_ ]?(?:\d{0,2}\w?)[_ ]?(?:plus|se|lite|pro)?( 5g|lte)?)(?: bui|\))/i,/ ([\w ]+) miui\/v?\d/i],[[gr,/_/g," "],[fr,nn],[lr,mr]],[/droid.+; (cph2[3-6]\d[13579]|((gm|hd)19|(ac|be|in|kb)20|(d[en]|eb|le|mt)21|ne22)[0-2]\d|p[g-k]\w[1m]10)\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[gr,[fr,Yr],[lr,mr]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[gr,[fr,Zr],[lr,mr]],[/\b(opd2(\d{3}a?))(?: bui|\))/i],[gr,[fr,An,{OnePlus:["203","304","403","404","413","415"],"*":Zr}],[lr,wr]],[/(vivo (5r?|6|8l?|go|one|s|x[il]?[2-4]?)[\w\+ ]*)(?: bui|\))/i],[gr,[fr,"BLU"],[lr,mr]],[/; vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[gr,[fr,"Vivo"],[lr,mr]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[gr,[fr,"Realme"],[lr,mr]],[/(ideatab[-\w ]+|602lv|d-42a|a101lv|a2109a|a3500-hv|s[56]000|pb-6505[my]|tb-?x?\d{3,4}(?:f[cu]|xu|[av])|yt\d?-[jx]?\d+[lfmx])( bui|;|\)|\/)/i,/lenovo ?(b[68]0[08]0-?[hf]?|tab(?:[\w- ]+?)|tb[\w-]{6,7})( bui|;|\)|\/)/i],[gr,[fr,Qr],[lr,wr]],[/lenovo[-_ ]?([-\w ]+?)(?: bui|\)|\/)/i],[gr,[fr,Qr],[lr,mr]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ]([\w\s]+)(\)| bui)/i,/((?:moto(?! 360)[-\w\(\) ]+|xt\d{3,4}[cgkosw\+]?[-\d]*|nexus 6)(?= bui|\)))/i],[gr,[fr,Xr],[lr,mr]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[gr,[fr,Xr],[lr,wr]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[gr,[fr,Jr],[lr,wr]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+(?!.*(?:browser|netcast|android tv|watch|webos))(\w+)/i,/\blg-?([\d\w]+) bui/i],[gr,[fr,Jr],[lr,mr]],[/(nokia) (t[12][01])/i],[fr,gr,[lr,wr]],[/(?:maemo|nokia).*(n900|lumia \d+|rm-\d+)/i,/nokia[-_ ]?(([-\w\. ]*?))( bui|\)|;|\/)/i],[[gr,/_/g," "],[lr,mr],[fr,"Nokia"]],[/(pixel (c|tablet))\b/i],[gr,[fr,Kr],[lr,wr]],[/droid.+;(?: google)? (g(01[13]a|020[aem]|025[jn]|1b60|1f8f|2ybb|4s1m|576d|5nz6|8hhn|8vou|a02099|c15s|d1yq|e2ae|ec77|gh2x|kv4x|p4bc|pj41|r83y|tt9q|ur25|wvk6)|pixel[\d ]*a?( pro)?( xl)?( fold)?( \(5g\))?)( bui|\))/i],[gr,[fr,Kr],[lr,mr]],[/(google) (pixelbook( go)?)/i],[fr,gr],[/droid.+; (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-\w\w\d\d)(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[gr,[fr,rn],[lr,mr]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[gr,"Xperia Tablet"],[fr,rn],[lr,wr]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[gr,[fr,Mr],[lr,wr]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[gr,/(.+)/g,"Fire Phone $1"],[fr,Mr],[lr,mr]],[/(playbook);[-\w\),; ]+(rim)/i],[gr,fr,[lr,wr]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/(?:blackberry|\(bb10;) (\w+)/i],[gr,[fr,Vr],[lr,mr]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[gr,[fr,Hr],[lr,wr]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[gr,[fr,Hr],[lr,mr]],[/(nexus 9)/i],[gr,[fr,"HTC"],[lr,wr]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[fr,[gr,/_/g," "],[lr,mr]],[/tcl (xess p17aa)/i,/droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])(_\w(\w|\w\w))?(\)| bui)/i],[gr,[fr,"TCL"],[lr,wr]],[/droid [\w\.]+; (418(?:7d|8v)|5087z|5102l|61(?:02[dh]|25[adfh]|27[ai]|56[dh]|59k|65[ah])|a509dl|t(?:43(?:0w|1[adepqu])|50(?:6d|7[adju])|6(?:09dl|10k|12b|71[efho]|76[hjk])|7(?:66[ahju]|67[hw]|7[045][bh]|71[hk]|73o|76[ho]|79w|81[hks]?|82h|90[bhsy]|99b)|810[hs]))(_\w(\w|\w\w))?(\)| bui)/i],[gr,[fr,"TCL"],[lr,mr]],[/(itel) ((\w+))/i],[[fr,En],gr,[lr,An,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[gr,[fr,"Acer"],[lr,wr]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[gr,[fr,"Meizu"],[lr,mr]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[gr,[fr,"Ulefone"],[lr,mr]],[/; (energy ?\w+)(?: bui|\))/i,/; energizer ([\w ]+)(?: bui|\))/i],[gr,[fr,"Energizer"],[lr,mr]],[/; cat (b35);/i,/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i],[gr,[fr,"Cat"],[lr,mr]],[/((?:new )?andromax[\w- ]+)(?: bui|\))/i],[gr,[fr,"Smartfren"],[lr,mr]],[/droid.+; (a(in)?(0(15|59|6[35])|142)p?)/i],[gr,[fr,"Nothing"],[lr,mr]],[/; (x67 5g|tikeasy \w+|ac[1789]\d\w+)( b|\))/i,/archos ?(5|gamepad2?|([\w ]*[t1789]|hello) ?\d+[\w ]*)( b|\))/i],[gr,[fr,"Archos"],[lr,wr]],[/archos ([\w ]+)( b|\))/i,/; (ac[3-6]\d\w{2,8})( b|\))/i],[gr,[fr,"Archos"],[lr,mr]],[/; (n159v)/i],[gr,[fr,"HMD"],[lr,mr]],[/(imo) (tab \w+)/i,/(infinix|tecno) (x1101b?|p904|dp(7c|8d|10a)( pro)?|p70[1-3]a?|p904|t1101)/i],[fr,gr,[lr,wr]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus(?! zenw)|dell|jolla|meizu|motorola|polytron|tecno|micromax|advan)[-_ ]?([-\w]*)/i,/; (blu|hmd|imo|infinix|lava|oneplus|tcl|wiko)[_ ]([\w\+ ]+?)(?: bui|\)|; r)/i,/(hp) ([\w ]+\w)/i,/(microsoft); (lumia[\w ]+)/i,/(oppo) ?([\w ]+) bui/i,/(hisense) ([ehv][\w ]+)\)/i,/droid[^;]+; (philips)[_ ]([sv-x][\d]{3,4}[xz]?)/i],[fr,gr,[lr,mr]],[/(kobo)\s(ereader|touch)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i],[fr,gr,[lr,wr]],[/(surface duo)/i],[gr,[fr,Gr],[lr,wr]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[gr,[fr,"Fairphone"],[lr,mr]],[/((?:tegranote|shield t(?!.+d tv))[\w- ]*?)(?: b|\))/i],[gr,[fr,$r],[lr,wr]],[/(sprint) (\w+)/i],[fr,gr,[lr,mr]],[/(kin\.[onetw]{3})/i],[[gr,/\./g," "],[fr,Gr],[lr,mr]],[/droid.+; ([c6]+|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[gr,[fr,on],[lr,wr]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[gr,[fr,on],[lr,mr]],[/(philips)[\w ]+tv/i,/smart-tv.+(samsung)/i],[fr,[lr,yr]],[/hbbtv.+maple;(\d+)/i],[[gr,/^/,"SmartTV"],[fr,en],[lr,yr]],[/(vizio)(?: |.+model\/)(\w+-\w+)/i,/tcast.+(lg)e?. ([-\w]+)/i],[fr,gr,[lr,yr]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[fr,Jr],[lr,yr]],[/(apple) ?tv/i],[fr,[gr,zr+" TV"],[lr,yr]],[/crkey.*devicetype\/chromecast/i],[[gr,un+" Third Generation"],[fr,Kr],[lr,yr]],[/crkey.*devicetype\/([^/]*)/i],[[gr,/^/,"Chromecast "],[fr,Kr],[lr,yr]],[/fuchsia.*crkey/i],[[gr,un+" Nest Hub"],[fr,Kr],[lr,yr]],[/crkey/i],[[gr,un],[fr,Kr],[lr,yr]],[/(portaltv)/i],[gr,[fr,hn],[lr,yr]],[/droid.+aft(\w+)( bui|\))/i],[gr,[fr,Mr],[lr,yr]],[/(shield \w+ tv)/i],[gr,[fr,$r],[lr,yr]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[gr,[fr,tn],[lr,yr]],[/(bravia[\w ]+)( bui|\))/i],[gr,[fr,rn],[lr,yr]],[/(mi(tv|box)-?\w+) bui/i],[gr,[fr,nn],[lr,yr]],[/Hbbtv.*(technisat) (.*);/i],[fr,gr,[lr,yr]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[fr,/.+\/(\w+)/,"$1",An,{LG:"lge"}],[gr,In],[lr,yr]],[/(playstation \w+)/i],[gr,[fr,rn],[lr,vr]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[gr,[fr,Gr],[lr,vr]],[/(ouya)/i,/(nintendo) (\w+)/i,/(retroid) (pocket ([^\)]+))/i],[fr,gr,[lr,vr]],[/droid.+; (shield)( bui|\))/i],[gr,[fr,$r],[lr,vr]],[/\b(sm-[lr]\d\d[0156][fnuw]?s?|gear live)\b/i],[gr,[fr,en],[lr,br]],[/((pebble))app/i,/(asus|google|lg|oppo) ((pixel |zen)?watch[\w ]*)( bui|\))/i],[fr,gr,[lr,br]],[/(ow(?:19|20)?we?[1-3]{1,3})/i],[gr,[fr,Zr],[lr,br]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[gr,[fr,zr],[lr,br]],[/(opwwe\d{3})/i],[gr,[fr,Yr],[lr,br]],[/(moto 360)/i],[gr,[fr,Xr],[lr,br]],[/(smartwatch 3)/i],[gr,[fr,rn],[lr,br]],[/(g watch r)/i],[gr,[fr,Jr],[lr,br]],[/droid.+; (wt63?0{2,3})\)/i],[gr,[fr,on],[lr,br]],[/droid.+; (glass) \d/i],[gr,[fr,Kr],[lr,kr]],[/(pico) ([\w ]+) os\d/i],[fr,gr,[lr,kr]],[/(quest( \d| pro)?s?).+vr/i],[gr,[fr,hn],[lr,kr]],[/mobile vr; rv.+firefox/i],[[lr,kr]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[fr,[lr,Tr]],[/(aeobc)\b/i],[gr,[fr,Mr],[lr,Tr]],[/(homepod).+mac os/i],[gr,[fr,zr],[lr,Tr]],[/windows iot/i],[[lr,Tr]],[/droid.+; ([\w- ]+) (4k|android|smart|google)[- ]?tv/i],[gr,[lr,yr]],[/\b((4k|android|smart|opera)[- ]?tv|tv; rv:|large screen[\w ]+safari)\b/i],[[lr,yr]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew|; hmsc).+?(mobile|vr|\d) safari/i],[gr,[lr,An,{mobile:"Mobile",xr:"VR","*":wr}]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[lr,wr]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[lr,mr]],[/droid .+?; ([\w\. -]+)( bui|\))/i],[gr,[fr,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[hr,[cr,cn+"HTML"]],[/(arkweb)\/([\w\.]+)/i],[cr,hr],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[hr,[cr,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna|servo)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[cr,hr],[/ladybird\//i],[[cr,"LibWeb"]],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[hr,cr]],os:[[/(windows nt) (6\.[23]); arm/i],[[cr,/N/,"R"],[hr,An,Dn]],[/(windows (?:phone|mobile|iot))(?: os)?[\/ ]?([\d\.]*( se)?)/i,/(windows)[\/ ](1[01]|2000|3\.1|7|8(\.1)?|9[58]|me|server 20\d\d( r2)?|vista|xp)/i],[cr,hr],[/windows nt ?([\d\.\)]*)(?!.+xbox)/i,/\bwin(?=3| ?9|n)(?:nt| 9x )?([\d\.;]*)/i],[[hr,/(;|\))/g,"",An,Dn],[cr,vn]],[/(windows ce)\/?([\d\.]*)/i],[cr,hr],[/[adehimnop]{4,7}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv|ios(?=.+ip(?:ad|hone))|ip(?:ad|hone)(?: |.+i(?:pad)?)os)[\/ ]([\w\.]+)/i,/cfnetwork\/.+darwin/i],[[hr,/_/g,"."],[cr,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+(haiku|morphos))/i],[[cr,"macOS"],[hr,/_/g,"."]],[/android ([\d\.]+).*crkey/i],[hr,[cr,un+" Android"]],[/fuchsia.*crkey\/([\d\.]+)/i],[hr,[cr,un+" Fuchsia"]],[/crkey\/([\d\.]+).*devicetype\/smartspeaker/i],[hr,[cr,un+" SmartSpeaker"]],[/linux.*crkey\/([\d\.]+)/i],[hr,[cr,un+" Linux"]],[/crkey\/([\d\.]+)/i],[hr,[cr,un]],[/droid ([\w\.]+)\b.+(android[- ]x86)/i],[hr,cr],[/(ubuntu) ([\w\.]+) like android/i],[[cr,/(.+)/,"$1 Touch"],hr],[/(harmonyos)[\/ ]?([\d\.]*)/i,/(android|bada|blackberry|kaios|maemo|meego|openharmony|qnx|rim tablet os|sailfish|series40|symbian|tizen)\w*[-\/\.; ]?([\d\.]*)/i],[cr,hr],[/\(bb(10);/i],[hr,[cr,Vr]],[/(?:symbian ?os|symbos|s60(?=;)|series ?60)[-\/ ]?([\w\.]*)/i],[hr,[cr,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[hr,[cr,ln+" OS"]],[/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i,/webos(?:[ \/]?|\.tv-20(?=2[2-9]))(\d[\d\.]*)/i],[hr,[cr,"webOS"]],[/web0s;.+?(?:chr[o0]me|safari)\/(\d+)/i],[[hr,An,{25:"120",24:"108",23:"94",22:"87",6:"79",5:"68",4:"53",3:"38",2:"538",1:"537","*":"TV"}],[cr,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[hr,[cr,"watchOS"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[cr,"Chrome OS"],hr],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) (\w+)/i,/(xbox); +xbox ([^\);]+)/i,/(pico) .+os([\w\.]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/linux.+(mint)[\/\(\) ]?([\w\.]*)/i,/(mageia|vectorlinux|fuchsia|arcaos|arch(?= ?linux))[;l ]([\d\.]*)/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire|knoppix)(?: gnu[\/ ]linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/\b(aix)[; ]([1-9\.]{0,4})/i,/(hurd|linux|morphos)(?: (?:arm|x86|ppc)\w*| ?)([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) ?(r\d)?/i],[cr,hr],[/(sunos) ?([\d\.]*)/i],[[cr,"Solaris"],hr],[/\b(beos|os\/2|amigaos|openvms|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[cr,hr]]},jn=(Pn.call((Xt={init:{},isIgnore:{},isIgnoreRgx:{},toString:{}}).init,[[nr,[cr,hr,pr,lr]],[ir,[dr]],[or,[lr,gr,fr]],[ar,[cr,hr]],[sr,[cr,hr]]]),Pn.call(Xt.isIgnore,[[nr,[hr,pr]],[ar,[hr]],[sr,[hr]]]),Pn.call(Xt.isIgnoreRgx,[[nr,/ ?browser$/i],[sr,/ ?os$/i]]),Pn.call(Xt.toString,[[nr,[cr,hr]],[ir,[dr]],[or,[fr,gr]],[ar,[cr,hr]],[sr,[cr,hr]]]),Xt),Un=function(e,t){var r=jn.init[t],n=jn.isIgnore[t]||0,i=jn.isIgnoreRgx[t]||0,o=jn.toString[t]||0;function a(){Pn.call(this,r)}return a.prototype.getItem=function(){return e},a.prototype.withClientHints=function(){return wn?wn.getHighEntropyValues(Br).then(function(t){return e.setCH(new Fn(t,!1)).parseCH().get()}):e.parseCH().get()},a.prototype.withFeatureCheck=function(){return e.detectFeature().get()},t!=ur&&(a.prototype.is=function(e){var t=!1;for(var r in this)if(this.hasOwnProperty(r)&&!bn(n,r)&&En(i?Rn(i,this[r]):this[r])==En(i?Rn(i,e):e)){if(t=!0,e!=rr)break}else if(e==rr&&t){t=!t;break}return t},a.prototype.toString=function(){var e=Yt;for(var t in o)x(this[o[t]])!==rr&&(e+=(e?" ":Yt)+this[o[t]]);return e||rr}),wn||(a.prototype.then=function(e){var t=this,r=function(){for(var e in t)t.hasOwnProperty(e)&&(this[e]=t[e])};r.prototype={is:a.prototype.is,toString:a.prototype.toString};var n=new r;return e(n),n}),new a};function Fn(e,t){if(e=e||{},Pn.call(this,Br),t)Pn.call(this,[[Er,Sn(e[Or])],[Pr,Sn(e[Ar])],[mr,/\?1/.test(e[Lr])],[gr,Cn(e[jr])],[Rr,Cn(e[Ur])],[Cr,Cn(e[Fr])],[dr,Cn(e[Dr])],[xr,Sn(e[Nr])],[Ir,Cn(e[_r])]]);else for(var r in e)this.hasOwnProperty(r)&&x(e[r])!==rr&&(this[r]=e[r])}function Bn(e,t,r,n){return this.get=function(e){return e?this.data.hasOwnProperty(e)?this.data[e]:void 0:this.data},this.set=function(e,t){return this.data[e]=t,this},this.setCH=function(e){return this.uaCH=e,this},this.detectFeature=function(){if(mn&&mn.userAgent==this.ua)switch(this.itemType){case nr:mn.brave&&x(mn.brave.isBrave)==Zt&&this.set(cr,"Brave");break;case or:!this.get(lr)&&wn&&wn[mr]&&this.set(lr,mr),"Macintosh"==this.get(gr)&&mn&&x(mn.standalone)!==rr&&mn.maxTouchPoints&&mn.maxTouchPoints>2&&this.set(gr,"iPad").set(lr,wr);break;case sr:!this.get(cr)&&wn&&wn[Rr]&&this.set(cr,wn[Rr]);break;case ur:var e=this.data,t=function(t){return e[t].getItem().detectFeature().get()};this.set(nr,t(nr)).set(ir,t(ir)).set(or,t(or)).set(ar,t(ar)).set(sr,t(sr))}return this},this.parseUA=function(){switch(this.itemType!=ur&&On.call(this.data,this.ua,this.rgxMap),this.itemType){case nr:this.set(pr,xn(this.get(hr)));break;case sr:if("iOS"==this.get(cr)&&"18.6"==this.get(hr)){var e=/\) Version\/([\d\.]+)/.exec(this.ua);e&&parseInt(e[1].substring(0,2),10)>=26&&this.set(hr,e[1])}}return this},this.parseCH=function(){var e=this.uaCH,t=this.rgxMap;switch(this.itemType){case nr:case ar:var r,n=e[Pr]||e[Er];if(n)for(var i=0;i<n.length;i++){var o=n[i].brand||n[i],a=n[i].version;this.itemType==nr&&!/not.a.brand/i.test(o)&&(!r||/Chrom/.test(r)&&o!=sn||r==cn&&/WebView2/.test(o))&&(o=An(o,Nn),(r=this.get(cr))&&!/Chrom/.test(r)&&/Chrom/.test(o)||this.set(cr,o).set(hr,a).set(pr,xn(a)),r=o),this.itemType==ar&&o==sn&&this.set(hr,a)}break;case ir:var s=e[dr];s&&(s&&"64"==e[Ir]&&(s+="64"),On.call(this.data,s+";",t));break;case or:if(e[mr]&&this.set(lr,mr),e[gr]&&(this.set(gr,e[gr]),!this.get(lr)||!this.get(fr))){var u={};On.call(u,"droid 9; "+e[gr]+")",t),!this.get(lr)&&u.type&&this.set(lr,u.type),!this.get(fr)&&u.vendor&&this.set(fr,u.vendor)}if(e[xr]){var c;if("string"!=typeof e[xr])for(var l=0;!c&&l<e[xr].length;)c=An(e[xr][l++],_n);else c=An(e[xr],_n);this.set(lr,c)}break;case sr:var f=e[Rr];if(f){var h=e[Cr];f==vn&&(h=parseInt(xn(h),10)>=13?"11":"10"),this.set(cr,f).set(hr,h)}this.get(cr)==vn&&"Xbox"==e[gr]&&this.set(cr,"Xbox").set(hr,void 0);break;case ur:var d=this.data,p=function(t){return d[t].getItem().setCH(e).parseCH().get()};this.set(nr,p(nr)).set(ir,p(ir)).set(or,p(or)).set(ar,p(ar)).set(sr,p(sr))}return this},Pn.call(this,[["itemType",e],["ua",t],["uaCH",n],["rgxMap",r],["data",Un(this,e)]]),this}function Mn(e,t,r){if(x(e)===er?(kn(e,!0)?(x(t)===er&&(r=t),t=e):(r=e,t=void 0),e=void 0):x(e)!==tr||kn(t,!0)||(r=t,t=void 0),r)if(x(r.append)===Zt){var n={};r.forEach(function(e,t){n[String(t).toLowerCase()]=e}),r=n}else{var i={};for(var o in r)r.hasOwnProperty(o)&&(i[String(o).toLowerCase()]=r[o]);r=i}if(!(this instanceof Mn))return new Mn(e,t,r).getResult();var a=x(e)===tr?e:r&&r[$t]?r[$t]:mn&&mn.userAgent?mn.userAgent:Yt,s=new Fn(r,!0),u=t?function(e,t){var r={},n=t;if(!kn(t))for(var i in n={},t)for(var o in t[i])n[o]=t[i][o].concat(n[o]?n[o]:[]);for(var a in e)r[a]=n[a]&&n[a].length%2==0?n[a].concat(e[a]):e[a];return r}(Ln,t):Ln,c=function(e){return e==ur?function(){return new Bn(e,a,u,s).set("ua",a).set(nr,this.getBrowser()).set(ir,this.getCPU()).set(or,this.getDevice()).set(ar,this.getEngine()).set(sr,this.getOS()).get()}:function(){return new Bn(e,a,u[e],s).parseUA().get()}};return Pn.call(this,[["getBrowser",c(nr)],["getCPU",c(ir)],["getDevice",c(or)],["getEngine",c(ar)],["getOS",c(sr)],["getResult",c(ur)],["getUA",function(){return a}],["setUA",function(e){return Tn(e)&&(a=In(e,500)),this}]]).setUA(a),this}Mn.VERSION="2.0.6",Mn.BROWSER=yn([cr,hr,pr,lr]),Mn.CPU=yn([dr]),Mn.DEVICE=yn([gr,fr,lr,vr,mr,yr,wr,br,Tr]),Mn.ENGINE=Mn.OS=yn([cr,hr]);var zn=function(e){return!(!function(e){return null===e}(e)&&!function(e){return void 0===e}(e)&&""!==e)},Hn="undefined"!=typeof performance&&"function"==typeof performance.now?function(){return performance.now()}:function(){return Date.now()};function Vn(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"0",n=String(e);if(n.length<t){for(var i=n,o=0;o<t-n.length;o+=1)i=r+i;return i}return n}var Kn=0,qn=0,Qn=Math.floor(65535*Math.random())<<16|Date.now()%65535,Wn=function(){var e=Date.now();e===qn?Kn++:(Kn=0,qn=e);var t=Vn(e.toString(16),11,"0"),r=e>>12&4095,n=4095&e,i=e>>36&255,o=t+Vn(Kn.toString(16),4,"0")+Vn((65535&Qn).toString(16),4,"0")+(Vn((e>>24&1048575).toString(16),5,"0")+Vn(i.toString(16),2,"0")+Vn(r.toString(16),3,"0")+Vn(n.toString(16),3,"0"));return o=Vn(o=o.slice(0,32),32,"0"),"".concat(o.slice(0,8)).concat(o.slice(8,16)).concat(o.slice(16))},Jn=0;function Gn(){var e=Date.now().toString(36).slice(-8).padStart(8,"0");Jn=(Jn+1)%46656;var t=Math.floor(36*Math.random());return e+(Jn.toString(36).padStart(2,"0")+t.toString(36)).padStart(4,"0").slice(-4)}var Xn,$n=function(){return function(){if("undefined"!=typeof WeixinJSBridge)return!0;var e=navigator.userAgent.toLowerCase();return!(-1===(null==e?void 0:e.indexOf("micromessenger"))&&"micromessenger"!=(null==e?void 0:e.match(/MicroMessenger/i)))}()?"WECHAT":function(){var e,t=null===(e=navigator)||void 0===e||null===(e=e.userAgent)||void 0===e?void 0:e.toLowerCase();return!(-1===(null==t?void 0:t.indexOf("alipay"))&&"alipay"!=(null==t?void 0:t.match(/Alipay/i)))}()?"ALIPAY":"OTHER"},Yn=function(e){var t;console.log("extractHashPath--",e);var r=null==e?void 0:e.indexOf("#");if(-1===r)return"";var n=null==e?void 0:e.slice(r+1),i=n?null===(t=n.replace(/^\//,""))||void 0===t?void 0:t.split("?")[0]:"";return console.log("hashPart--pathWithoutQuery",n,i),null!=i&&i.includes("/")?null==i?void 0:i.split("/")[0]:i},Zn=function(e,t){var r=e;if(e&&"string"==typeof e){var n=e.split("/");n.length>1&&(r=n[0])}var i,o=r.toLowerCase();if(["HONGSHUN","IOP-V2","XIAOCHENG-V2","BLACKGOLD"].includes(t)&&("chargemoney"===o&&(null===(i=window.location.href)||void 0===i?void 0:i.indexOf("showMoney=false"))>-1))return"EQUITY";return e&&"string"==typeof e&&e.includes("/")?r:{login:"LOGIN",buyPkgListNew:"BUY_LIST",cardDetailInfo:"CARD_DETAIL",flowSettle:"SETTLEMENT",chargeMoney:"WALLET",payOrderDetail:"ORDER_DETAIL",alipayOrderDetail:"ORDER_DETAIL"}[e]||e},ei=function(){var e=navigator.userAgent.toLowerCase();return/android|adr/.test(e)?"Android":/iphone|ipad|ipod|ios/.test(e)?"iOS":"其他"},ti=function(e){try{return new Mn(e||("undefined"!=typeof navigator?navigator.userAgent:"")).getResult()}catch(e){return console.warn("UAParser 解析失败:",e),{ua:"undefined"!=typeof navigator?navigator.userAgent:"",browser:{},engine:{},os:{name:ei()},device:{},cpu:{}}}},ri=function(e){try{var t,r=ti(e);if(null!=r&&null!==(t=r.os)&&void 0!==t&&t.version)return r.os.version;var n=e||("undefined"!=typeof navigator?navigator.userAgent:""),i=n.match(/OS\s+(\d+)[_.](\d+)/i);if(i)return"".concat(i[1],".").concat(i[2]);var o=n.match(/Android\s+([\d.]+)/i);return o?o[1]:null}catch(e){return console.warn("获取系统版本失败:",e),null}},ni=function(){return h(function e(t){l(this,e),this.config=t,this.isReporting=!1,this._cachedSessionId=null,this._sessionIdFromStorage=!1},[{key:"report",value:(f=u(y().m(function e(t,r){var n,i;return y().w(function(e){for(;;)switch(e.p=e.n){case 0:if(e.p=0,n=this.formatReportData(t,r),!this.config.getConfig().customReport){e.n=2;break}return e.n=1,this.config.getConfig().customReport(t,n);case 1:e.n=3;break;case 2:return e.n=3,this.defaultReport(t,n);case 3:e.n=5;break;case 4:e.p=4,i=e.v,console.error("上报失败:",i),this.config.getConfig().debugSwitch&&console.error("上报失败详情:",{type:t,error:i.message,stack:i.stack});case 5:return e.a(2)}},e,this,[[0,4]])})),function(e,t){return f.apply(this,arguments)})},{key:"getDeviceInfo",value:function(){return{screen:{width:screen.width,height:screen.height,availWidth:screen.availWidth,availHeight:screen.availHeight,colorDepth:screen.colorDepth,pixelDepth:screen.pixelDepth},viewport:{width:window.innerWidth,height:window.innerHeight},connection:navigator.connection?{effectiveType:navigator.connection.effectiveType,downlink:navigator.connection.downlink,rtt:navigator.connection.rtt}:null,memory:navigator.memory?{usedJSHeapSize:navigator.memory.usedJSHeapSize,totalJSHeapSize:navigator.memory.totalJSHeapSize,jsHeapSizeLimit:navigator.memory.jsHeapSizeLimit}:null}}},{key:"getSessionId",value:function(){if(this._sessionIdFromStorage&&this._cachedSessionId)return this._cachedSessionId;var e=this.config.getConfig().sessionId||"";if(!this._sessionIdFromStorage&&"undefined"!=typeof sessionStorage)try{var t=sessionStorage.getItem("SS_TRACESDK_INFO");if(t){var r=JSON.parse(t);if(r&&!zn(r.sessionId))return e=r.sessionId,this.config.updateConfig({sessionId:e}),this._cachedSessionId=e,this._sessionIdFromStorage=!0,this.config.getConfig().debugSwitch&&console.log("从 sessionStorage 成功读取 sessionId:",e),e}this.config.getConfig().debugSwitch&&console.log("sessionStorage 中未找到有效的 sessionId,下次继续尝试读取")}catch(e){this.config.getConfig().debugSwitch&&console.warn("读取 SS_TRACESDK_INFO 失败,下次继续尝试:",e)}return zn(e)&&(e=Wn(),this.config.updateConfig({sessionId:e})),e}},{key:"formatReportData",value:function(e,t){var r,n,i,o={sessionId:this.getSessionId()||"",channel:$n(),uiVer:this.config.getConfig().uiVersion,osType:(i=ti(),zn(null==i?void 0:i.os)?ei():["iOS","Android"].includes(null==i||null===(r=i.os)||void 0===r?void 0:r.name)?(console.log("parseagernt--",null==i?void 0:i.os),null==i||null===(n=i.os)||void 0===n?void 0:n.name):"其他"),osVersion:ri(),screenWidth:screen.width,screenHeight:screen.height,windowInnerWidth:window.innerWidth,windowInnerHeight:window.innerHeight,netType:navigator.connection?navigator.connection.effectiveType:"",tags:{customerId:this.config.getConfig().customerId,deviceId:this.config.getConfig().deviceId,deviceNo:this.config.getConfig().deviceNo,userId:this.config.getConfig().userId}},a=Array.isArray(t)?t:[t];return a.forEach(function(e){var t=Object.assign({},o.tags||{},e&&e.tags||{});Object.assign(e,o),Object.keys(t).length>0&&(e.tags=t)}),a}},{key:"defaultReport",value:(c=u(y().m(function e(t,r){var n,i;return y().w(function(e){for(;;)switch(e.n){case 0:if(n=this.config.getReportUrl(),i=this.config.getThirdPartyConfig(),!n){e.n=1;break}return e.n=1,this.reportToBackend(n,r);case 1:if(!(i&&Object.keys(i).length>0)){e.n=2;break}return e.n=2,this.reportToThirdParty(i,r);case 2:return e.a(2)}},e,this)})),function(e,t){return c.apply(this,arguments)})},{key:"reportToBackend",value:(s=u(y().m(function e(t,r){var n,i;return y().w(function(e){for(;;)switch(e.n){case 0:if(!navigator.sendBeacon||this.isObjectOverSizeLimit(r,60)){e.n=3;break}if((n=new FormData).append("events",JSON.stringify(r)),i=navigator.sendBeacon(t,n),this.config.getConfig().debugSwitch&&console.log("上报数据:",t,r),i){e.n=2;break}return e.n=1,this.reportViaAxios(t,n);case 1:case 4:return e.a(2,e.v);case 2:e.n=5;break;case 3:return this.config.getConfig().debugSwitch&&console.warn("浏览器不支持 sendBeacon,使用 axios"),e.n=4,this.reportViaAxios(t,r);case 5:return e.a(2)}},e,this)})),function(e,t){return s.apply(this,arguments)})},{key:"reportViaAxios",value:(a=u(y().m(function e(t,r){var n,i;return y().w(function(e){for(;;)switch(e.p=e.n){case 0:return e.p=0,e.n=1,Gt.post(t,r);case 1:return n=e.v,e.a(2,n.data);case 2:e.p=2,i=e.v,console.error("后端上报失败:",i);case 3:return e.a(2)}},e,null,[[0,2]])})),function(e,t){return a.apply(this,arguments)})},{key:"reportToThirdParty",value:(o=u(y().m(function e(t,r){var n,i;return y().w(function(e){for(;;)switch(e.p=e.n){case 0:return n=[],t.baidu&&window._hmt&&n.push(this.reportToBaidu(t.baidu,r)),t.umeng&&window._um&&n.push(this.reportToUmeng(t.umeng,r)),t.sensors&&window.sensors&&n.push(this.reportToSensors(t.sensors,r)),t.tencent&&window.MTA&&n.push(this.reportToTencent(t.tencent,r)),t.custom&&n.push(this.reportToCustom(t.custom,r)),e.p=1,e.n=2,Promise.allSettled(n);case 2:e.n=4;break;case 3:e.p=3,i=e.v,console.error("第三方上报失败:",i);case 4:return e.a(2)}},e,this,[[1,3]])})),function(e,t){return o.apply(this,arguments)})},{key:"reportToBaidu",value:(i=u(y().m(function e(t,r){return y().w(function(e){for(;;)switch(e.n){case 0:window._hmt&&window._hmt.push(["_trackEvent",r.type,JSON.stringify(r.data)]);case 1:return e.a(2)}},e)})),function(e,t){return i.apply(this,arguments)})},{key:"reportToUmeng",value:(n=u(y().m(function e(t,r){return y().w(function(e){for(;;)switch(e.n){case 0:window._um&&window._um.push(["track",r.type,r.data]);case 1:return e.a(2)}},e)})),function(e,t){return n.apply(this,arguments)})},{key:"reportToSensors",value:(r=u(y().m(function e(t,r){return y().w(function(e){for(;;)switch(e.n){case 0:window.sensors&&window.sensors.track(r.type,r.data[0]||{});case 1:return e.a(2)}},e)})),function(e,t){return r.apply(this,arguments)})},{key:"reportToTencent",value:(t=u(y().m(function e(t,r){return y().w(function(e){for(;;)switch(e.n){case 0:window.MTA&&window.MTA.Event.stat(r.type,r.data[0]||{});case 1:return e.a(2)}},e)})),function(e,r){return t.apply(this,arguments)})},{key:"reportToCustom",value:(e=u(y().m(function e(t,r){return y().w(function(e){for(;;)switch(e.n){case 0:if("function"!=typeof t.report){e.n=1;break}return e.n=1,t.report(r);case 1:return e.a(2)}},e)})),function(t,r){return e.apply(this,arguments)})},{key:"isObjectOverSizeLimit",value:function(e,t){var r=JSON.stringify(e);return(new TextEncoder).encode(r).length/1024>t}}]);var e,t,r,n,i,o,a,s,c,f}(),ii=function(){return h(function e(t){l(this,e),this.config=t,this.reporter=new ni(t),this.errorQueue=[],this.isInitialized=!1,this.reportTimer=null,this.errorCache=new Map,this.errorCacheTimeout=5e3,this.maxCacheSize=100,this.errorFingerprint=this.createErrorFingerprint.bind(this),this.errorTimeout=null,this.resourceErrorTimeout=null,this.lastResourceError=null},[{key:"createErrorFingerprint",value:function(e,t){var r=(null==e?void 0:e.message)||(null==e?void 0:e.toString())||e,n=(null==e?void 0:e.stack)||t.stack,i=t.type||"unknown",o=window.location.href;return"".concat(i,":").concat(r,":").concat(o,":").concat(n?n.split("\n")[0]:"")}},{key:"isDuplicateError",value:function(e,t){var r=this.errorFingerprint(e,t),n=Date.now();if((this.cleanupErrorCache(n),this.errorCache.has(r))&&n-this.errorCache.get(r)<this.errorCacheTimeout)return!0;if(this.errorCache.set(r,n),this.errorCache.size>this.maxCacheSize){var i=this.errorCache.keys().next().value;this.errorCache.delete(i)}return!1}},{key:"cleanupErrorCache",value:function(e){var t,r=d(this.errorCache.entries());try{for(r.s();!(t=r.n()).done;){var n=T(t.value,2),i=n[0];e-n[1]>this.errorCacheTimeout&&this.errorCache.delete(i)}}catch(e){r.e(e)}finally{r.f()}}},{key:"init",value:function(){if(!this.isInitialized){var e=this.config.getConfig();(e.enableErrorTracking||e.enableResourceError)&&this.setupErrorListener(),e.enableUnhandledRejection&&this.setupUnhandledRejectionListener(),e.reportInterval>0&&this.setupPeriodicReport(),this.isInitialized=!0}}},{key:"setupPeriodicReport",value:function(){var e=this,t=this.config.getConfig().reportInterval;t>0&&(this.reportTimer&&clearInterval(this.reportTimer),this.reportTimer=setInterval(function(){e.flushErrorQueue()},t))}},{key:"setupErrorListener",value:function(){var e=this;window.addEventListener("error",function(t){t.target&&t.target!==window?e.handleResourceError(t):e.handleJavaScriptError(t)},!0)}},{key:"handleJavaScriptError",value:function(e){var t=this;this.errorTimeout&&clearTimeout(this.errorTimeout),this.errorTimeout=setTimeout(function(){var r;t.handleError(e.error||e.message,{type:"javascript",filename:e.filename,lineno:e.lineno,colno:e.colno,stack:null===(r=e.error)||void 0===r?void 0:r.stack})},100)}},{key:"handleResourceError",value:function(e){var t=this,r="".concat(e.target.tagName,":").concat(e.target.src||e.target.href);this.lastResourceError!==r?(this.lastResourceError=r,this.resourceErrorTimeout&&clearTimeout(this.resourceErrorTimeout),this.resourceErrorTimeout=setTimeout(function(){t.handleError("Resource load failed: ".concat(e.target.src||e.target.href),{type:"resource",tagName:e.target.tagName,src:e.target.src,href:e.target.href}),setTimeout(function(){t.lastResourceError=null},2e3)},100)):this.config.getConfig().debugSwitch&&console.log("忽略重复的资源加载错误:",r)}},{key:"setupUnhandledRejectionListener",value:function(){var e=this,t=null,r=null;window.addEventListener("unhandledrejection",function(n){var i,o,a="".concat((null===(i=n.reason)||void 0===i?void 0:i.message)||n.reason,":").concat((null===(o=n.reason)||void 0===o?void 0:o.stack)||"");r!==a?(r=a,t&&clearTimeout(t),t=setTimeout(function(){var t;e.handleError(n.reason,{type:"unhandledrejection",stack:null===(t=n.reason)||void 0===t?void 0:t.stack}),setTimeout(function(){r=null},1e3)},100)):e.config.getConfig().debugSwitch&&console.log("忽略重复的 Promise 拒绝:",n.reason)})}},{key:"handleError",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.isDuplicateError(e,t))this.config.getConfig().debugSwitch&&console.log("忽略重复错误:",(null==e?void 0:e.message)||e);else{var r=this.parseStack(e),n=w({message:(null==e?void 0:e.message)||(null==e?void 0:e.toString())||e,stack:(null==e?void 0:e.stack)||t.stack,type:t.type||"unknown",timestamp:Date.now(),url:window.location.href,userAgent:navigator.userAgent,fileName:r.fileName,lineNumber:r.lineNumber,columnNumber:r.columnNumber,functionName:r.functionName,stackFrames:r.stackFrames},t);this.errorQueue.push(n),0===this.config.getConfig().reportInterval?this.reporter.report("error",[n]):this.errorQueue.length>=this.config.getConfig().maxQueueSize&&this.flushErrorQueue()}}},{key:"parseStack",value:function(e){var t=(null==e?void 0:e.stack)||"",r=(null==e?void 0:e.message)||(null==e?void 0:e.toString())||"",n={errMessage:r,errStack:t,fileName:"",lineNumber:"",columnNumber:"",functionName:"",stackFrames:[]};if(!t)return n;try{var i=/^\s*at\s+([^(]+?)\s+\((.+?):(\d+):(\d+)\)$/,o=/^\s*at\s+(.+?):(\d+):(\d+)$/,a=/^\s*([^@]*)@(.+?):(\d+):(\d+)$/,s=t;if(r&&t.startsWith(r))s=t.substring(r.length).replace(/^\n+/,"");else if(t.includes("\n")){var u=t.split("\n");!u[0]||u[0].trim().startsWith("at")||u[0].includes("@")||(s=u.slice(1).join("\n"))}var c,l=s.split("\n").filter(function(e){return e.trim()}),f=[],h=d(l);try{for(h.s();!(c=h.n()).done;){var p=c.value,g=null,v=p.match(i);v?g={functionName:v[1].trim(),fileName:v[2],lineNumber:parseInt(v[3]),columnNumber:parseInt(v[4])}:(v=p.match(o))?g={functionName:"",fileName:v[1],lineNumber:parseInt(v[2]),columnNumber:parseInt(v[3])}:(v=p.match(a))&&(g={functionName:v[1].trim(),fileName:v[2],lineNumber:parseInt(v[3]),columnNumber:parseInt(v[4])}),g&&f.push(g)}}catch(e){h.e(e)}finally{h.f()}if(f.length>0){var m=f[0];n.fileName=m.fileName,n.lineNumber=m.lineNumber,n.columnNumber=m.columnNumber,n.functionName=m.functionName}n.stackFrames=f}catch(e){var w;null!==(w=this.config)&&void 0!==w&&null!==(w=w.getConfig())&&void 0!==w&&w.debugSwitch&&console.warn("解析堆栈失败:",e)}return n}},{key:"reportError",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.handleError(e,t)}},{key:"flushErrorQueue",value:function(){this.errorQueue.length>0&&(this.reporter.report("error",S(this.errorQueue)),this.errorQueue=[])}},{key:"destroy",value:function(){this.config.getConfig().reportInterval>0&&this.flushErrorQueue(),this.reportTimer&&(clearInterval(this.reportTimer),this.reportTimer=null),this.isInitialized=!1}}])}(),oi=function(){return h(function e(t){l(this,e),this.config=t,this.reporter=new ni(t),this.eventQueue=[],this.isInitialized=!1,this.clickListener=null,this.pageViewListener=null,this.reportTimer=null,this.originalPushState=null,this.originalReplaceState=null,this.pageHistory=[],this.currentPage=null,this.currentPageStartTime=Date.now(),this.previousPage=null,this.previousPageStayTime=0,this.currentRoute=null,this.routeStartTime=Date.now(),this.vueRouter=null},[{key:"init",value:function(){if(!this.isInitialized){var e=this.config.getConfig();this.currentPage={url:window.location.href,title:document.title,enterTime:Date.now(),referrer:document.referrer},this.currentPageStartTime=Date.now(),e.enableClickTracking&&this.setupClickTracking(),e.enablePageViewTracking&&this.setupPageViewTracking(),document.addEventListener("visibilitychange",function(){}),this.config.getConfig().reportInterval>0&&this.setupPeriodicReport(),this.isInitialized=!0}}},{key:"setupClickTracking",value:function(){var e=this;this.clickListener=function(t){var r,n=t.target,i={type:"click",timestamp:Date.now(),url:window.location.href,element:{tagName:n.tagName,className:n.className,id:n.id,text:null===(r=n.textContent)||void 0===r?void 0:r.substring(0,50)},position:{x:t.clientX,y:t.clientY}};e.handleEvent("click",i)},document.addEventListener("click",this.clickListener,!0)}},{key:"setupPageViewTracking",value:function(){var e=this,t=this.config.getConfig().pageViewTracking||{},r=window.location.href,n=Date.now(),i=t.debounce||100;this.pageViewListener=function(){var t=window.location.href,o=Date.now();t===r&&o-n<i&&e.config.getConfig().debugSwitch?console.log("忽略重复的页面浏览事件:",t):(e.handlePageChange(t,o),r=t,n=o,e.handleEvent("pageview",{uuid:Gn(),timestamp:o,pageKey:Zn(Yn(t),e.config.getConfig().uiVersion),pageUri:Yn(t),eventType:"VIEW"}))},!1!==t.listenPopstate&&window.addEventListener("popstate",this.pageViewListener),!1!==t.listenHistoryAPI&&(this.originalPushState=history.pushState,this.originalReplaceState=history.replaceState,history.pushState=function(){for(var e=this,t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];this.originalPushState.apply(history,r),setTimeout(function(){e.pageViewListener()},0)}.bind(this),history.replaceState=function(){for(var e=this,t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];this.originalReplaceState.apply(history,r),setTimeout(function(){e.pageViewListener()},0)}.bind(this)),t.vueRouterMode&&(this.config.getConfig().debugSwitch&&console.log("Vue Router 模式:页面浏览追踪已优化"),this.pageViewListener())}},{key:"setupPeriodicReport",value:function(){var e=this,t=this.config.getConfig().reportInterval;t>0&&(this.reportTimer&&clearInterval(this.reportTimer),this.reportTimer=setInterval(function(){e.flushEventQueue()},t))}},{key:"handlePageChange",value:function(e,t){this.currentPage&&(this.previousPage=w({},this.currentPage),this.pageHistory.push(w({},this.previousPage)),this.pageHistory.length>20&&this.pageHistory.shift()),this.currentPage={url:e,title:document.title,enterTime:t,referrer:document.referrer},this.currentPageStartTime=t}},{key:"setupVueRouterMonitoring",value:function(e){var t,r=this;e&&!this.vueRouter&&(this.vueRouter=e,this.currentRoute=e.currentRoute.value,e.beforeEach(function(e,t,n){t.name&&r.handleRouteLeave(t,e),n()}),e.afterEach(function(e,t){r.handleRouteEnter(e,t)}),e.beforeResolve(function(e,t,n){t.name&&r.calculateRouteStayTime(t),n()}),null!==(t=this.config)&&void 0!==t&&null!==(t=t.getConfig())&&void 0!==t&&t.debugSwitch&&console.log("Vue Router 监控已设置"))}},{key:"handleRouteLeave",value:function(e,t){var r=Date.now()-this.routeStartTime;this.recordRouteStayTime(e,r),this.currentRoute=e,this.routeStartTime=Date.now()}},{key:"handleRouteEnter",value:function(e,t){this.routeStartTime=Date.now(),this.currentRoute=e,this.recordRouteEnter(e,t)}},{key:"recordRouteStayTime",value:function(e,t){var r,n;this.previousPage||(this.previousPage={url:(null==e?void 0:e.fullPath)||(null==e?void 0:e.path)||"",title:(null==e||null===(n=e.meta)||void 0===n?void 0:n.title)||(null==e?void 0:e.name)||"unknown"});this.previousPage.stayTime=t,this.previousPageStayTime=t,null!==(r=this.config)&&void 0!==r&&null!==(r=r.getConfig())&&void 0!==r&&r.debugSwitch&&console.log("路由停留时间数据",this.previousPage)}},{key:"recordRouteEnter",value:function(e,t){var r;null!==(r=this.config)&&void 0!==r&&null!==(r=r.getConfig())&&void 0!==r&&r.debugSwitch&&console.log("进入路由: ".concat(e.name||e.path))}},{key:"calculateRouteStayTime",value:function(e){return this.routeStartTime?Date.now()-this.routeStartTime:0}},{key:"getCurrentRoute",value:function(){return this.currentRoute}},{key:"getPreviousPageInfo",value:function(){return{previousPage:this.previousPage?{url:this.previousPage.url,title:this.previousPage.title,stayTime:this.previousPageStayTime}:null,previousPageStayTime:this.previousPageStayTime}}},{key:"getCurrentPageStayTime",value:function(){return this.currentPageStartTime?Date.now()-this.currentPageStartTime:0}},{key:"getCurrentRouteStayTime",value:function(){return this.routeStartTime?Date.now()-this.routeStartTime:0}},{key:"handleEvent",value:function(e,t){var r,n=this.getPreviousPageInfo(),i=w(w({},t),{},{tags:w(w({},t.tags),{},{refer:Yn(null==n||null===(r=n.previousPage)||void 0===r?void 0:r.url),duration:null==n?void 0:n.previousPageStayTime})});this.eventQueue.push(i),0===this.config.getConfig().reportInterval?this.reporter.report("event",[i]):this.eventQueue.length>=this.config.getConfig().maxQueueSize&&this.flushEventQueue()}},{key:"reportEvent",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={uuid:Gn(),timestamp:Date.now(),pageKey:Zn(Yn(window.location.href),this.config.getConfig().uiVersion),pageUri:Yn(window.location.href),eventType:"CLICK",tags:w({actionKey:e},r)};"CREATE_ORDER"===e?this.reporter.report("event",[n]).catch(function(e){console.error("CREATE_ORDER 事件上报失败:",e),t.config.getConfig().debugSwitch&&console.error("CREATE_ORDER 事件上报失败详情:",e)}):this.handleEvent(e,n)}},{key:"reportCustomEvent",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r={uuid:Gn(),timestamp:Date.now(),pageKey:(null==t?void 0:t.pageKey)||Zn(Yn(window.location.href),this.config.getConfig().uiVersion),pageUri:(null==t?void 0:t.pageUri)||Yn(window.location.href),eventType:t.eventType||"VIEW",tags:w(w({},t.tags),{},{refer:t.refer,duration:0})};this.eventQueue.push(r)}},{key:"flushEventQueue",value:function(){this.eventQueue.length>0&&(this.reporter.report("event",S(this.eventQueue)),this.eventQueue=[])}},{key:"destroy",value:function(){this.flushEventQueue(),this.reportTimer&&(clearInterval(this.reportTimer),this.reportTimer=null),this.clickListener&&(document.removeEventListener("click",this.clickListener,!0),this.clickListener=null),this.pageViewListener&&(window.removeEventListener("popstate",this.pageViewListener),this.pageViewListener=null),this.originalPushState&&(history.pushState=this.originalPushState,this.originalPushState=null),this.originalReplaceState&&(history.replaceState=this.originalReplaceState,this.originalReplaceState=null),this.isInitialized=!1}}])}(),ai=function(){return h(function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;l(this,e),this.config=t,this.reporter=new ni(t),this.eventTracker=r,this.isInitialized=!1,this.pageStartTime=Date.now(),this.performanceQueue=[],this.thirdPartySDKs={},this.reportTimer=null,this.currentRoute=null,this.routeStartTime=Date.now(),this.routeHistory=[],this.vueRouter=null,this.metrics={fcp:0,lcp:0,fid:0,cls:0,ttfb:0,domLoad:0,windowLoad:0,resourceLoad:[],apiRequests:[],pageStayTime:0,previousPageUrl:"",currentPageUrl:""}},[{key:"init",value:function(){if(!this.isInitialized){var e=this.config.getConfig();e.enablePerformanceTracking&&this.setupPerformanceMonitoring(),e.enableResourceTracking&&this.setupResourceMonitoring(),e.enableApiTracking&&this.setupApiMonitoring(),e.enableInteractionTracking&&this.setupInteractionMonitoring(),this.initThirdPartySDKs(),e.reportInterval>0&&this.setupPeriodicReport(),this.isInitialized=!0}}},{key:"setupPeriodicReport",value:function(){var e=this,t=this.config.getConfig().reportInterval;t>0&&(this.reportTimer&&clearInterval(this.reportTimer),this.reportTimer=setInterval(function(){e.flushPerformanceQueue()},t))}},{key:"setupVueRouterMonitoring",value:function(e){var t=this;e&&!this.vueRouter&&(this.vueRouter=e,this.currentRoute=e.currentRoute.value,e.beforeEach(function(e,r,n){r.name&&t.handleRouteLeave(r,e),n()}),e.afterEach(function(e,r){t.handleRouteEnter(e,r)}),e.beforeResolve(function(e,r,n){r.name&&t.calculateRouteStayTime(r),n()}))}},{key:"handleRouteLeave",value:function(e,t){var r=Date.now()-this.routeStartTime;this.recordRouteStayTime(e,r),this.currentRoute=e,this.routeStartTime=Date.now()}},{key:"handleRouteEnter",value:function(e,t){this.routeStartTime=Date.now(),this.currentRoute=e,this.recordRouteEnter(e,t)}},{key:"recordRouteStayTime",value:function(e,t){var r,n={name:e.name||"unknown",path:e.path,fullPath:e.fullPath,stayTime:t,enterTime:this.routeStartTime,leaveTime:Date.now(),params:e.params,query:e.query,meta:e.meta};this.routeHistory.push(n),this.metrics.pageStayTime=t,this.metrics.previousPageUrl=e.name,this.reportRouteStayTime(n),null!==(r=this.config)&&void 0!==r&&null!==(r=r.config)&&void 0!==r&&r.debugSwitch&&console.log("路由数据",n)}},{key:"recordRouteEnter",value:function(e,t){var r;e.name,e.path,e.fullPath,Date.now(),e.params,e.query,e.meta,t&&(t.name,t.path),this.metrics.currentPageUrl=e.name,null!==(r=this.config)&&void 0!==r&&null!==(r=r.config)&&void 0!==r&&r.debugSwitch&&console.log("进入路由: ".concat(e.name||e.path))}},{key:"calculateRouteStayTime",value:function(e){return this.routeStartTime?Date.now()-this.routeStartTime:0}},{key:"reportRouteStayTime",value:function(e){var t={type:"route_stay_time",timestamp:Date.now(),route:e,user:this.config.getUser(),device:this.getDeviceInfo()};this.reporter.report("route_performance",[t])}},{key:"getCurrentRoute",value:function(){return this.currentRoute}},{key:"getRouteHistory",value:function(){return S(this.routeHistory)}},{key:"getCurrentPageStayTime",value:function(){return this.routeStartTime?Date.now()-this.routeStartTime:0}},{key:"getRoutePerformanceStats",value:function(){var e={totalRoutes:this.routeHistory.length,averageStayTime:0,routesByPath:new Map,totalStayTime:0};return this.routeHistory.length>0&&(this.routeHistory.forEach(function(t){e.totalStayTime+=t.stayTime,e.routesByPath.has(t.path)||e.routesByPath.set(t.path,{count:0,totalStayTime:0,averageStayTime:0});var r=e.routesByPath.get(t.path);r.count++,r.totalStayTime+=t.stayTime,r.averageStayTime=r.totalStayTime/r.count}),e.averageStayTime=e.totalStayTime/e.totalRoutes),e}},{key:"setupPerformanceMonitoring",value:function(){var e=this;"loading"===document.readyState?document.addEventListener("DOMContentLoaded",function(){e.captureDOMLoadTime()}):this.captureDOMLoadTime(),window.addEventListener("load",function(){e.captureWindowLoadTime(),e.captureWebVitals(),e.reportPerformanceMetrics()})}},{key:"setupResourceMonitoring",value:function(){var e=this;if("undefined"!=typeof window&&"PerformanceObserver"in window){var t=new PerformanceObserver(function(t){var r,n=d(t.getEntries());try{for(n.s();!(r=n.n()).done;){var i=r.value;"resource"===i.entryType&&e.handleResourceLoad(i)}}catch(e){n.e(e)}finally{n.f()}});try{t.observe({entryTypes:["resource"]})}catch(e){}}}},{key:"setupApiMonitoring",value:function(){var e=this;void 0!==window.axios&&(window.axios.interceptors.request.use(function(e){return e._startTime=Hn(),e}),window.axios.interceptors.response.use(function(t){var r=Hn()-t.config._startTime;return e.handleApiRequest(t.config.url,r,t.status),t},function(t){if(t.config){var r=Hn()-t.config._startTime;e.handleApiRequest(t.config.url,r,"error")}throw t}))}},{key:"setupInteractionMonitoring",value:function(){var e=this,t=0,r=0,n=function(i){0===t&&(t=Hn(),r=t-e.metrics.fcp,e.metrics.fid=r,document.removeEventListener("click",n,!0),document.removeEventListener("keydown",n,!0),document.removeEventListener("touchstart",n,!0))};document.addEventListener("click",n,!0),document.addEventListener("keydown",n,!0),document.addEventListener("touchstart",n,!0)}},{key:"captureDOMLoadTime",value:function(){this.metrics.domLoad=Hn()}},{key:"captureWindowLoadTime",value:function(){this.metrics.windowLoad=Hn()}},{key:"captureWebVitals",value:function(){var e=this;if("undefined"!=typeof window&&"PerformanceObserver"in window)try{new PerformanceObserver(function(t){var r,n=d(t.getEntries());try{for(n.s();!(r=n.n()).done;){var i,o=r.value;if("first-contentful-paint"===o.name)e.metrics.fcp=o.startTime,null!==(i=e.config)&&void 0!==i&&null!==(i=i.config)&&void 0!==i&&i.debugSwitch&&console.log("FCP:",o.startTime)}}catch(e){n.e(e)}finally{n.f()}}).observe({type:"paint",buffered:!0})}catch(e){console.warn("FCP监控失败:",e)}if("undefined"!=typeof window&&"PerformanceObserver"in window)try{new PerformanceObserver(function(t){var r,n=d(t.getEntries());try{for(n.s();!(r=n.n()).done;){var i=r.value;e.metrics.lcp=i.startTime}}catch(e){n.e(e)}finally{n.f()}}).observe({entryTypes:["largest-contentful-paint"]})}catch(e){console.warn("LCP监控失败:",e)}if("undefined"!=typeof window&&"PerformanceObserver"in window)try{var t=0;new PerformanceObserver(function(r){var n,i=d(r.getEntries());try{for(i.s();!(n=i.n()).done;){var o=n.value;o.hadRecentInput||(t+=o.value)}}catch(e){i.e(e)}finally{i.f()}e.metrics.cls=t}).observe({entryTypes:["layout-shift"]})}catch(e){console.warn("CLS监控失败:",e)}}},{key:"handleResourceLoad",value:function(e){var t={name:e.name,type:e.initiatorType,duration:e.duration,size:e.transferSize,timestamp:Date.now()};this.metrics.resourceLoad.push(t),e.duration>3e3&&this.reportSlowResource(t)}},{key:"handleApiRequest",value:function(e,t,r){var n,i,o={};this.eventTracker&&"function"==typeof this.eventTracker.getPreviousPageInfo&&(o=this.eventTracker.getPreviousPageInfo());var a={interfaceUrl:"string"==typeof e?e:e.toString(),interfaceDuration:t,status:r,uuid:Gn(),timestamp:Date.now(),pageKey:Zn(Yn(window.location.href),this.config.getConfig().uiVersion),pageUri:Yn(window.location.href),eventType:"INTERFACEDURATION",refer:Yn((null===(n=o)||void 0===n||null===(n=n.previousPage)||void 0===n?void 0:n.url)||""),duration:(null===(i=o)||void 0===i?void 0:i.previousPageStayTime)||0,tags:{actionKey:""}};t>5e3||this.performanceQueue.push(a)}},{key:"handlePageHidden",value:function(){this.calculatePageStayTime()}},{key:"handlePageVisible",value:function(){this.pageStartTime=Date.now()}},{key:"calculatePageStayTime",value:function(){var e=Date.now()-this.pageStartTime;this.reportPageStayTime(e)}},{key:"reportPerformanceMetrics",value:function(){var e=this;setTimeout(function(){var t,r,n={};e.eventTracker&&"function"==typeof e.eventTracker.getPreviousPageInfo&&(n=e.eventTracker.getPreviousPageInfo());var i={eventType:"PERFORMANCE",uuid:Gn(),timestamp:Date.now(),pageKey:Zn(Yn(window.location.href),e.config.getConfig().uiVersion),pageUri:Yn(window.location.href),refer:Yn((null===(t=n)||void 0===t||null===(t=t.previousPage)||void 0===t?void 0:t.url)||""),duration:(null===(r=n)||void 0===r?void 0:r.previousPageStayTime)||0,metrics:e.metrics};e.performanceQueue.push(i),e.config.getConfig().debugSwitch&&console.log("Performance Data:",i),0===e.config.getConfig().reportInterval?e.reporter.report("performance",[i]):e.performanceQueue.length>=e.config.getConfig().maxQueueSize&&e.flushPerformanceQueue()},100)}},{key:"reportSlowResource",value:function(e){this.reporter.report("slow_resource",[e])}},{key:"reportSlowApi",value:function(e){this.reporter.report("slow_api",[e])}},{key:"reportPageStayTime",value:function(e){var t={type:"page_stay",url:window.location.href,stayTime:e,timestamp:Date.now()};this.reporter.report("page_stay",[t])}},{key:"getDeviceInfo",value:function(){return{screen:{width:screen.width,height:screen.height,availWidth:screen.availWidth,availHeight:screen.availHeight,colorDepth:screen.colorDepth,pixelDepth:screen.pixelDepth},viewport:{width:window.innerWidth,height:window.innerHeight},connection:navigator.connection?{effectiveType:navigator.connection.effectiveType,downlink:navigator.connection.downlink,rtt:navigator.connection.rtt}:null,memory:navigator.memory?{usedJSHeapSize:navigator.memory.usedJSHeapSize,totalJSHeapSize:navigator.memory.totalJSHeapSize,jsHeapSizeLimit:navigator.memory.jsHeapSizeLimit}:null}}},{key:"initThirdPartySDKs",value:function(){var e=this.config.getThirdPartyConfig();e.baidu&&window._hmt&&(this.thirdPartySDKs.baidu=window._hmt),e.umeng&&window._um&&(this.thirdPartySDKs.umeng=window._um),e.sensors&&window.sensors&&(this.thirdPartySDKs.sensors=window.sensors),e.tencent&&window.MTA&&(this.thirdPartySDKs.tencent=window.MTA)}},{key:"flushPerformanceQueue",value:function(){this.performanceQueue.length>0&&(this.reporter.report("performance",S(this.performanceQueue)),this.performanceQueue=[])}},{key:"reportPerformance",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={type:"custom_performance",timestamp:Date.now(),url:window.location.href,metrics:e,user:this.config.getUser()};this.reporter.report("performance",[t])}},{key:"getCurrentMetrics",value:function(){return w({},this.metrics)}},{key:"destroy",value:function(){this.config.getConfig().reportInterval>0&&this.flushPerformanceQueue(),this.reportTimer&&(clearInterval(this.reportTimer),this.reportTimer=null),this.isInitialized=!1}}])}(),si=function(){return h(function e(t){l(this,e),this.config=t,this.reporter=new ni(t),this.isInitialized=!1,this.behaviorQueue=[],this.sessionId=this.generateSessionId(),this.pageStartTime=Date.now(),this.scrollDepth=0,this.mouseMovements=[],this.keyStrokes=[],this.formInteractions=[],this.timeTracker=null,this.reportTimer=null,this.originalPushState=null,this.originalReplaceState=null,this.behaviors={pageViews:[],clicks:[],scrolls:[],formSubmissions:[],navigation:[],timeOnPage:0}},[{key:"init",value:function(){if(!this.isInitialized){var e=this.config.getConfig();e.enableUserInteractionTracking&&this.setupUserInteractionTracking(),e.enableFormTracking&&this.setupFormTracking(),e.enableScrollTracking&&this.setupScrollTracking(),e.enableMouseTracking&&this.setupMouseTracking(),e.enableKeyboardTracking&&this.setupKeyboardTracking(),this.setupTimeTracking(),e.reportInterval>0&&this.setupPeriodicReport(),this.isInitialized=!0}}},{key:"setupPeriodicReport",value:function(){var e=this,t=this.config.getConfig().reportInterval;t>0&&(this.reportTimer&&clearInterval(this.reportTimer),this.reportTimer=setInterval(function(){e.flushBehaviorQueue()},t))}},{key:"setupUserInteractionTracking",value:function(){var e=this;document.addEventListener("click",function(t){e.trackClick(t)},!0),document.addEventListener("dblclick",function(t){e.trackDoubleClick(t)},!0),document.addEventListener("contextmenu",function(t){e.trackRightClick(t)},!0),"ontouchstart"in window&&document.addEventListener("touchstart",function(t){e.trackTouch(t)},!0)}},{key:"setupFormTracking",value:function(){var e=this;document.addEventListener("submit",function(t){e.trackFormSubmission(t)},!0),document.addEventListener("change",function(t){"INPUT"!==t.target.tagName&&"SELECT"!==t.target.tagName&&"TEXTAREA"!==t.target.tagName||e.trackFormFieldChange(t)},!0),document.addEventListener("focus",function(t){"INPUT"!==t.target.tagName&&"SELECT"!==t.target.tagName&&"TEXTAREA"!==t.target.tagName||e.trackFormFieldFocus(t)},!0),document.addEventListener("blur",function(t){"INPUT"!==t.target.tagName&&"SELECT"!==t.target.tagName&&"TEXTAREA"!==t.target.tagName||e.trackFormFieldBlur(t)},!0)}},{key:"setupScrollTracking",value:function(){var e,t=this;document.addEventListener("scroll",function(){clearTimeout(e),e=setTimeout(function(){var e=window.pageYOffset||document.documentElement.scrollTop,r=document.documentElement.scrollHeight,n=document.documentElement.clientHeight,i=Math.round(e/(r-n)*100);i>t.scrollDepth&&(t.scrollDepth=i,t.trackScroll(i,e))},100)},{passive:!0})}},{key:"setupMouseTracking",value:function(){var e,t=this,r=[];document.addEventListener("mousemove",function(n){clearTimeout(e),r.push({x:n.clientX,y:n.clientY,timestamp:Date.now()}),r.length>100&&r.shift(),e=setTimeout(function(){r.length>10&&(t.trackMouseMovement(r),r=[])},1e3)},{passive:!0})}},{key:"setupKeyboardTracking",value:function(){var e=this;document.addEventListener("keydown",function(t){"password"!==t.target.type&&e.trackKeyStroke(t)},!0)}},{key:"setupTimeTracking",value:function(){var e=this;this.timeTracker&&clearInterval(this.timeTracker),this.timeTracker=setInterval(function(){e.behaviors.timeOnPage+=1},1e3),window.addEventListener("beforeunload",function(){e.reportTimeOnPage()})}},{key:"trackReferrer",value:function(){var e=document.referrer;if(e){var t={type:"referrer",url:e,domain:this.extractDomain(e),timestamp:Date.now()};this.config.getConfig().debugSwitch&&console.log("referrerData----",t),this.behaviors.navigation.push(t),this.reportBehavior("referrer",t)}}},{key:"trackPageView",value:function(){var e={type:"pageview",url:window.location.href,title:document.title,timestamp:Date.now(),sessionId:this.sessionId,referrer:document.referrer};this.behaviors.pageViews.push(e),this.reportBehavior("pageview",e),this.pageStartTime=Date.now(),this.scrollDepth=0}},{key:"trackClick",value:function(e){var t,r={type:"click",element:{tagName:e.target.tagName,className:e.target.className,id:e.target.id,text:null===(t=e.target.textContent)||void 0===t?void 0:t.substring(0,50),href:e.target.href},position:{x:e.clientX,y:e.clientY,pageX:e.pageX,pageY:e.pageY},timestamp:Date.now(),sessionId:this.sessionId};this.behaviors.clicks.push(r),this.reportBehavior("click",r)}},{key:"trackDoubleClick",value:function(e){var t={type:"doubleclick",element:{tagName:e.target.tagName,className:e.target.className,id:e.target.id},position:{x:e.clientX,y:e.clientY},timestamp:Date.now(),sessionId:this.sessionId};this.reportBehavior("doubleclick",t)}},{key:"trackRightClick",value:function(e){var t={type:"rightclick",element:{tagName:e.target.tagName,className:e.target.className,id:e.target.id},position:{x:e.clientX,y:e.clientY},timestamp:Date.now(),sessionId:this.sessionId};this.reportBehavior("rightclick",t)}},{key:"trackTouch",value:function(e){var t={type:"touch",touches:Array.from(e.touches).map(function(e){return{x:e.clientX,y:e.clientY,identifier:e.identifier}}),timestamp:Date.now(),sessionId:this.sessionId};this.reportBehavior("touch",t)}},{key:"trackFormSubmission",value:function(e){var t={type:"form_submission",form:{action:e.target.action,method:e.target.method,id:e.target.id,className:e.target.className},fields:this.getFormFields(e.target),timestamp:Date.now(),sessionId:this.sessionId};this.behaviors.formSubmissions.push(t),this.reportBehavior("form_submission",t)}},{key:"trackFormFieldChange",value:function(e){var t={type:"form_field_change",field:{name:e.target.name,type:e.target.type,value:"password"===e.target.type?"***":e.target.value,id:e.target.id},timestamp:Date.now(),sessionId:this.sessionId};this.reportBehavior("form_field_change",t)}},{key:"trackFormFieldFocus",value:function(e){var t={type:"form_field_focus",field:{name:e.target.name,type:e.target.type,id:e.target.id},timestamp:Date.now(),sessionId:this.sessionId};this.reportBehavior("form_field_focus",t)}},{key:"trackFormFieldBlur",value:function(e){var t={type:"form_field_blur",field:{name:e.target.name,type:e.target.type,id:e.target.id},timestamp:Date.now(),sessionId:this.sessionId};this.reportBehavior("form_field_blur",t)}},{key:"trackScroll",value:function(e,t){var r={type:"scroll",depth:e,scrollTop:t,timestamp:Date.now(),sessionId:this.sessionId};this.config.getConfig().debugSwitch&&console.log("scrollData---",r),this.reportBehavior("scroll",r)}},{key:"trackMouseMovement",value:function(e){var t={type:"mouse_movement",movements:e,timestamp:Date.now(),sessionId:this.sessionId};this.config.getConfig().debugSwitch&&console.log("mouse_movement---",t),this.reportBehavior("mouse_movement",t)}},{key:"trackKeyStroke",value:function(e){var t={type:"keystroke",key:e.key,code:e.code,ctrlKey:e.ctrlKey,shiftKey:e.shiftKey,altKey:e.altKey,metaKey:e.metaKey,timestamp:Date.now(),sessionId:this.sessionId};this.config.getConfig().debugSwitch&&console.log("keystroke---",t),this.reportBehavior("keystroke",t)}},{key:"reportBehavior",value:function(e,t){var r={type:e,data:t,user:this.config.getUser(),config:{appId:this.config.getConfig().appId,appVersion:this.config.getConfig().appVersion}};this.behaviorQueue.push(r),0===this.config.getConfig().reportInterval?this.reporter.report("behavior",[r]):this.behaviorQueue.length>=this.config.getConfig().maxQueueSize&&this.flushBehaviorQueue()}},{key:"reportCustomBehavior",value:function(e){var t=w(w({type:"custom_behavior",eventName:e},arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}),{},{timestamp:Date.now(),sessionId:this.sessionId});this.reportBehavior("custom_behavior",t)}},{key:"flushBehaviorQueue",value:function(){this.behaviorQueue.length>0&&(this.reporter.report("behavior",S(this.behaviorQueue)),this.behaviorQueue=[])}},{key:"getFormFields",value:function(e){for(var t=[],r=e.elements,n=0;n<r.length;n++){var i=r[n];i.name&&t.push({name:i.name,type:i.type,value:"password"===i.type?"***":i.value})}return t}},{key:"extractDomain",value:function(e){try{return new URL(e).hostname}catch(t){return e}}},{key:"generateSessionId",value:function(){return"session_"+Date.now()+"_"+Math.random().toString(36).substr(2,9)}},{key:"getCurrentBehaviors",value:function(){return w({},this.behaviors)}},{key:"getSessionId",value:function(){return this.sessionId}},{key:"destroy",value:function(){this.config.getConfig().reportInterval>0&&this.flushBehaviorQueue(),this.reportTimeOnPage(),this.reportTimer&&(clearInterval(this.reportTimer),this.reportTimer=null),this.timeTracker&&(clearInterval(this.timeTracker),this.timeTracker=null),this.originalPushState&&(history.pushState=this.originalPushState,this.originalPushState=null),this.originalReplaceState&&(history.replaceState=this.originalReplaceState,this.originalReplaceState=null),this.isInitialized=!1}}])}(),ui=function(){return h(function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;l(this,e),this.config=t,this.reporter=new ni(t),this.eventTracker=r,this.isInitialized=!1,this.observer=null,this.trackedElements=new Map,this.exposureQueue=[],this.reportTimer=null,this.scrollTimer=null,this.useFallback=!1,this.lastReportTime=new Map,this.debounceTime=500,this._exposureSuspended=!1,this.defaultOptions={threshold:.5,rootMargin:"0px",scrollThrottle:100}},[{key:"init",value:function(){if(!this.isInitialized){this.isIntersectionObserverSupported()?(this.createObserver(),this.useFallback=!1,this.config.getConfig().debugSwitch&&console.log("曝光追踪器初始化完成(使用 Intersection Observer API)")):(this.setupFallbackTracking(),this.useFallback=!0,this.config.getConfig().debugSwitch&&console.warn("浏览器不支持 Intersection Observer,使用降级方案(滚动事件追踪)"));var e=this.config.getConfig();e.reportInterval>0&&this.setupPeriodicReport(),this.setupExposureLifecycleGuards(),this.isInitialized=!0,e.debugSwitch&&console.log("曝光追踪器初始化完成")}}},{key:"setupExposureLifecycleGuards",value:function(){var e=this;if("undefined"!=typeof window){var t=function(){e._exposureSuspended=!0},r=function(){e._exposureSuspended=!1};window.addEventListener("pagehide",t,{capture:!0}),window.addEventListener("beforeunload",t,{capture:!0}),window.addEventListener("pageshow",r,{capture:!0}),document.addEventListener("visibilitychange",function(){"hidden"===document.visibilityState?t():r()},{capture:!0})}}},{key:"suspendExposureForUnload",value:function(){this._exposureSuspended=!0}},{key:"resumeExposureTracking",value:function(){this._exposureSuspended=!1}},{key:"isIntersectionObserverSupported",value:function(){return"undefined"!=typeof window&&"IntersectionObserver"in window&&"IntersectionObserverEntry"in window&&"intersectionRatio"in window.IntersectionObserverEntry.prototype}},{key:"createObserver",value:function(){var e=this,t={root:null,rootMargin:this.defaultOptions.rootMargin,threshold:[0,.5,1]};this.observer=new IntersectionObserver(function(t){t.forEach(function(t){e.handleIntersection(t)})},t)}},{key:"handleIntersection",value:function(e){if(!this._exposureSuspended){var t=e.target,r=this.getElementId(t),n=this.getElementConfig(t),i=n.threshold||this.defaultOptions.threshold,o=e.intersectionRatio;if(o>=i){this.trackedElements.has(r)||this.trackedElements.set(r,{element:t,config:n});var a=this.trackedElements.get(r),s=Date.now(),u=s-(this.lastReportTime.get(r)||0);u>=this.debounceTime?(this.lastReportTime.set(r,s),this.triggerExposure(t,r,a,o,0)):this.config.getConfig().debugSwitch&&console.log("元素 ".concat(r," 跳过上报(去重),距离上次上报 ").concat(u,"ms,需要间隔 ").concat(this.debounceTime,"ms"))}}}},{key:"triggerExposure",value:function(e,t,r,n,i){var o,a,s=this;if(!this._exposureSuspended){var u=this.extractProductInfo(e,r.config),c={};this.eventTracker&&"function"==typeof this.eventTracker.getPreviousPageInfo&&(c=this.eventTracker.getPreviousPageInfo());var l=this.getElementConfig(e),f={uuid:Gn(),timestamp:Date.now(),pageKey:Zn(Yn(window.location.href),this.config.getConfig().uiVersion),pageUri:Yn(window.location.href),eventType:"EXPOSE",viewParam:w({},u),tags:w(w({actionKey:""},l),{},{refer:Yn(null===(o=c)||void 0===o||null===(o=o.previousPage)||void 0===o?void 0:o.url),duration:null===(a=c)||void 0===a?void 0:a.previousPageStayTime})};0!==this.config.getConfig().reportInterval?(this.exposureQueue.push(f),this.exposureQueue.length>=this.config.getConfig().maxQueueSize&&this.flushExposureQueue()):this.reporter.report("exposure",this.getReportData([f])).catch(function(e){console.error("曝光上报失败:",e),s.config.getConfig().debugSwitch&&console.error("曝光上报失败详情:",e)})}}},{key:"setupFallbackTracking",value:function(){var e=this;this.observer={observe:function(t){var r=e.getElementId(t);e.trackedElements.has(r)},unobserve:function(t){var r=e.getElementId(t);e.trackedElements.delete(r)},disconnect:function(){e.trackedElements.clear(),e.removeScrollListener()}},this.addScrollListener(),setTimeout(function(){e.checkAllElementsVisibility()},100)}},{key:"addScrollListener",value:function(){var e=this;if(!this.scrollHandler){var t=0,r=this.defaultOptions.scrollThrottle;this.scrollHandler=function(){var n=Date.now();n-t>=r&&(t=n,e.checkAllElementsVisibility())},window.addEventListener("scroll",this.scrollHandler,{passive:!0}),window.addEventListener("touchmove",this.scrollHandler,{passive:!0}),window.addEventListener("resize",this.scrollHandler,{passive:!0})}}},{key:"removeScrollListener",value:function(){this.scrollHandler&&(window.removeEventListener("scroll",this.scrollHandler),window.removeEventListener("touchmove",this.scrollHandler),window.removeEventListener("resize",this.scrollHandler),this.scrollHandler=null)}},{key:"checkAllElementsVisibility",value:function(){var e=this;if(this.useFallback&&!this._exposureSuspended){var t=window.innerHeight,r=window.innerWidth;this.trackedElements.forEach(function(n,i){var o=n.element;if(o&&document.contains(o)){var a=n.config.threshold||e.defaultOptions.threshold,s=e.calculateVisibleRatio(o,0,t,0,r);if(s>=a){var u=Date.now(),c=u-(e.lastReportTime.get(i)||0);c>=e.debounceTime?(e.lastReportTime.set(i,u),e.triggerExposure(o,i,n,s,0),e.config.getConfig().debugSwitch&&console.log("元素 ".concat(i," 进入可视区域,可见比例: ").concat((100*s).toFixed(2),"%,立即触发曝光"))):e.config.getConfig().debugSwitch&&console.log("元素 ".concat(i," 跳过上报(去重),距离上次上报 ").concat(c,"ms,需要间隔 ").concat(e.debounceTime,"ms"))}}else e.trackedElements.delete(i)})}}},{key:"calculateVisibleRatio",value:function(e,t,r,n,i){var o=e.getBoundingClientRect();if(o.bottom<t||o.top>r||o.right<n||o.left>i)return 0;var a=Math.max(o.top,t),s=Math.min(o.bottom,r),u=Math.max(o.left,n),c=Math.min(o.right,i),l=Math.max(0,c-u)*Math.max(0,s-a),f=o.width*o.height;return 0===f?0:l/f}},{key:"trackProduct",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.isInitialized)if(e&&"object"===x(e)&&e.nodeType){var n=this.getElementId(e),i=w({},r);this.trackedElements.has(n)&&this.untrackProduct(e),e.setAttribute("data-exposure-tracked","true"),e.setAttribute("data-exposure-config",JSON.stringify(i)),this.trackedElements.set(n,{element:e,config:i}),this.observer&&this.observer.observe(e),this.useFallback&&setTimeout(function(){t.checkAllElementsVisibility()},0),this.config.getConfig().debugSwitch}else console.warn("无效的元素,无法追踪");else console.warn("曝光追踪器未初始化")}},{key:"trackProducts",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.isInitialized&&this.observer){var n=[];if("string"==typeof e)n=Array.from(document.querySelectorAll(e));else{if(!Array.isArray(e))return void console.warn("无效的选择器或元素列表");n=e}n.forEach(function(e,n){var i=Array.isArray(r)?r[n]||{}:r;t.trackProduct(e,i)}),this.config.getConfig().debugSwitch}else console.warn("曝光追踪器未初始化")}},{key:"untrackProduct",value:function(e){if(this.observer){var t=this.getElementId(e);this.observer.unobserve&&this.observer.unobserve(e),this.trackedElements.delete(t),this.lastReportTime.delete(t),e&&e.removeAttribute&&(e.removeAttribute("data-exposure-tracked"),e.removeAttribute("data-exposure-config")),this.config.getConfig().debugSwitch&&console.log("取消追踪商品元素: ".concat(t))}}},{key:"untrackAll",value:function(){var e=this;this.observer&&(this.useFallback||this.trackedElements.forEach(function(t,r){t.element&&e.observer.unobserve&&e.observer.unobserve(t.element)}),this.trackedElements.clear())}},{key:"getElementId",value:function(e){if(e.getAttribute("data-exposure-id"))return e.getAttribute("data-exposure-id");if(e._exposureUniqueId)return e._exposureUniqueId;if(e.id)return"id_".concat(e.id);if(e.getAttribute("data-product-id"))return"product_".concat(e.getAttribute("data-product-id"));var t=Gn();return e._exposureUniqueId=t,t}},{key:"getElementConfig",value:function(e){var t=e.getAttribute("data-exposure-config");if(t)try{return JSON.parse(t)}catch(e){return{}}return{}}},{key:"extractProductInfo",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r={productId:t.productId||e.getAttribute("data-product-id")||null,productName:t.productName||e.getAttribute("data-product-name")||null,productPrice:t.productPrice||e.getAttribute("data-product-price")||null,productCategory:t.productCategory||e.getAttribute("data-product-category")||null,productImage:t.productImage||e.getAttribute("data-product-image")||null};return Object.keys(r).forEach(function(e){null===r[e]&&delete r[e]}),r}},{key:"setupPeriodicReport",value:function(){var e=this,t=this.config.getConfig().reportInterval;t>0&&(this.reportTimer&&clearInterval(this.reportTimer),this.reportTimer=setInterval(function(){e.flushExposureQueue()},t))}},{key:"getReportData",value:function(e){if(e.length>0){var t=e[0];if(t.tags){var r=function(e){return Array.from(new Set(e))}(e.map(function(e){var t;return null===(t=e.viewParam)||void 0===t?void 0:t.productId}).filter(Boolean));t.tags.exposeContent=(null==r?void 0:r.length)>0?r.join(","):""}return delete t.viewParam,t}return null}},{key:"flushExposureQueue",value:function(){var e=this;if(this.exposureQueue.length>0){var t=S(this.exposureQueue);this.exposureQueue=[],Promise.resolve().then(function(){e.reporter.report("exposure",e.getReportData(t)).catch(function(t){console.error("批量曝光上报失败:",t),e.config.getConfig().debugSwitch&&console.error("批量曝光上报失败详情:",t)})})}}},{key:"reportExposure",value:function(){var e,t,r=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!this._exposureSuspended){var i={};this.eventTracker&&"function"==typeof this.eventTracker.getPreviousPageInfo&&(i=this.eventTracker.getPreviousPageInfo());var o={uuid:Gn(),timestamp:Date.now(),pageKey:Zn(Yn(window.location.href),this.config.getConfig().uiVersion),pageUri:Yn(window.location.href),eventType:"EXPOSE",viewParam:w({},n),tags:w(w({},config),{},{actionKey:"",refer:Yn(null===(e=i)||void 0===e||null===(e=e.previousPage)||void 0===e?void 0:e.url),duration:null===(t=i)||void 0===t?void 0:t.previousPageStayTime})};Promise.resolve().then(function(){r.reporter.report("exposure",r.getReportData(o)).catch(function(e){console.error("手动曝光上报失败:",e),r.config.getConfig().debugSwitch&&console.error("手动曝光上报失败详情:",e)})})}}},{key:"getTrackedElements",value:function(){return Array.from(this.trackedElements.keys())}},{key:"getExposureQueue",value:function(){return S(this.exposureQueue)}},{key:"cancelQueuedExposureByProductId",value:function(e){var t=this;try{var r=Array.isArray(e)?e.filter(Boolean):[e].filter(Boolean);if(!r.length)return 0;var n=this.exposureQueue.length;return this.exposureQueue=this.exposureQueue.filter(function(e){var t;return!r.includes(null==e||null===(t=e.viewParam)||void 0===t?void 0:t.productId)}),r.forEach(function(e){try{t.reportedElements.delete("product_".concat(e))}catch(e){}}),n-this.exposureQueue.length}catch(e){return 0}}},{key:"destroy",value:function(){this.flushExposureQueue(),this.reportTimer&&(clearInterval(this.reportTimer),this.reportTimer=null),this.untrackAll(),this.observer&&(this.observer.disconnect&&this.observer.disconnect(),this.observer=null),this.removeScrollListener(),this.trackedElements.clear(),this.exposureQueue=[],this.lastReportTime.clear(),this.useFallback=!1,this.isInitialized=!1,this.config.getConfig().debugSwitch&&console.log("曝光追踪器已销毁")}}])}(),ci=function(){return h(function e(t){l(this,e),this.config=t,this.integratedSDKs={},this.isInitialized=!1},[{key:"init",value:function(){if(!this.isInitialized){var e=this.config.getThirdPartyConfig();e.baidu&&e.baidu.enabled&&this.initBaiduAnalytics(e.baidu),e.umeng&&e.umeng.enabled&&this.initUmengAnalytics(e.umeng),e.sensors&&e.sensors.enabled&&this.initSensorsAnalytics(e.sensors),e.tencent&&e.tencent.enabled&&this.initTencentAnalytics(e.tencent),e.google&&e.google.enabled&&this.initGoogleAnalytics(e.google),e.custom&&e.custom.enabled&&this.initCustomAnalytics(e.custom),this.isInitialized=!0}}},{key:"initBaiduAnalytics",value:function(e){try{window._hmt?(this.integratedSDKs.baidu={name:"baidu",instance:window._hmt,config:e},e.siteId&&window._hmt.push(["_setAccount",e.siteId]),!1!==e.autoPageview&&window._hmt.push(["_trackPageview"]),console.log("百度统计集成成功")):console.warn("百度统计未加载,请检查脚本是否正确引入")}catch(e){console.error("百度统计集成失败:",e)}}},{key:"initUmengAnalytics",value:function(e){try{window._um?(this.integratedSDKs.umeng={name:"umeng",instance:window._um,config:e},e.siteId&&window._um.push(["setAccount",e.siteId]),!1!==e.autoPageview&&window._um.push(["trackPageview"]),console.log("友盟统计集成成功")):console.warn("友盟统计未加载,请检查脚本是否正确引入")}catch(e){console.error("友盟统计集成失败:",e)}}},{key:"initSensorsAnalytics",value:function(e){try{window.sensors?(this.integratedSDKs.sensors={name:"sensors",instance:window.sensors,config:e},e.serverUrl&&window.sensors.setServerUrl(e.serverUrl),e.siteId&&window.sensors.setSiteId(e.siteId),!1!==e.autoPageview&&window.sensors.trackPageview(),console.log("神策数据集成成功")):console.warn("神策数据未加载,请检查脚本是否正确引入")}catch(e){console.error("神策数据集成失败:",e)}}},{key:"initTencentAnalytics",value:function(e){try{window.MTA?(this.integratedSDKs.tencent={name:"tencent",instance:window.MTA,config:e},e.appId&&window.MTA.setAppId(e.appId),!1!==e.autoPageview&&window.MTA.trackPageview(),console.log("腾讯云分析集成成功")):console.warn("腾讯云分析未加载,请检查脚本是否正确引入")}catch(e){console.error("腾讯云分析集成失败:",e)}}},{key:"initGoogleAnalytics",value:function(e){try{window.gtag?(this.integratedSDKs.google={name:"google",instance:window.gtag,config:e},e.measurementId&&window.gtag("config",e.measurementId,{page_title:document.title,page_location:window.location.href}),console.log("Google Analytics集成成功")):console.warn("Google Analytics未加载,请检查脚本是否正确引入")}catch(e){console.error("Google Analytics集成失败:",e)}}},{key:"initCustomAnalytics",value:function(e){try{if("function"==typeof e.init){var t=e.init(e);this.integratedSDKs.custom={name:"custom",instance:t,config:e},console.log("自定义第三方集成成功")}else console.warn("自定义第三方配置缺少init函数")}catch(e){console.error("自定义第三方集成失败:",e)}}},{key:"reportEvent",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Object.values(this.integratedSDKs).forEach(function(n){try{t.reportToSDK(n,e,r)}catch(e){console.error("上报事件到".concat(n.name,"失败:"),e)}})}},{key:"reportPageView",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object.values(this.integratedSDKs).forEach(function(r){try{e.reportPageViewToSDK(r,t)}catch(e){console.error("上报页面浏览到".concat(r.name,"失败:"),e)}})}},{key:"reportUser",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object.values(this.integratedSDKs).forEach(function(r){try{e.reportUserToSDK(r,t)}catch(e){console.error("上报用户信息到".concat(r.name,"失败:"),e)}})}},{key:"reportPerformance",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object.values(this.integratedSDKs).forEach(function(r){try{e.reportPerformanceToSDK(r,t)}catch(e){console.error("上报性能指标到".concat(r.name,"失败:"),e)}})}},{key:"reportToSDK",value:function(e,t,r){switch(e.name){case"baidu":e.instance&&e.instance.push&&e.instance.push(["_trackEvent",t,JSON.stringify(r)]);break;case"umeng":e.instance&&e.instance.push&&e.instance.push(["track",t,r]);break;case"sensors":e.instance&&e.instance.track&&e.instance.track(t,r);break;case"tencent":e.instance&&e.instance.Event&&e.instance.Event.stat&&e.instance.Event.stat(t,r);break;case"google":e.instance&&"function"==typeof e.instance&&e.instance("event",t,r);break;case"custom":e.instance&&"function"==typeof e.instance.track&&e.instance.track(t,r);break;default:console.warn("未知的SDK类型: ".concat(e.name))}}},{key:"reportPageViewToSDK",value:function(e,t){switch(e.name){case"baidu":e.instance&&e.instance.push&&e.instance.push(["_trackPageview",t.url||window.location.href]);break;case"umeng":e.instance&&e.instance.push&&e.instance.push(["trackPageview",t.url||window.location.href]);break;case"sensors":e.instance&&e.instance.trackPageview&&e.instance.trackPageview(t);break;case"tencent":e.instance&&e.instance.trackPageview&&e.instance.trackPageview(t.url||window.location.href);break;case"google":e.instance&&"function"==typeof e.instance&&e.instance("config",e.config.measurementId,{page_title:t.title||document.title,page_location:t.url||window.location.href});break;case"custom":e.instance&&"function"==typeof e.instance.trackPageview&&e.instance.trackPageview(t);break;default:console.warn("未知的SDK类型: ".concat(e.name))}}},{key:"reportUserToSDK",value:function(e,t){switch(e.name){case"baidu":e.instance&&e.instance.push&&(e.instance.push(["_setUserTag","userId",t.userId]),e.instance.push(["_setUserTag","userType",t.userType]));break;case"umeng":e.instance&&e.instance.push&&(e.instance.push(["setUserTag","userId",t.userId]),e.instance.push(["setUserTag","userType",t.userType]));break;case"sensors":e.instance&&e.instance.setProfile&&e.instance.setProfile(t);break;case"tencent":e.instance&&e.instance.setUserInfo&&e.instance.setUserInfo(t);break;case"google":e.instance&&"function"==typeof e.instance&&e.instance("set","user_id",t.userId);break;case"custom":e.instance&&"function"==typeof e.instance.setUser&&e.instance.setUser(t);break;default:console.warn("未知的SDK类型: ".concat(e.name))}}},{key:"reportPerformanceToSDK",value:function(e,t){switch(e.name){case"baidu":e.instance&&e.instance.push&&e.instance.push(["_trackEvent","performance",JSON.stringify(t)]);break;case"umeng":e.instance&&e.instance.push&&e.instance.push(["track","performance",t]);break;case"sensors":e.instance&&e.instance.track&&e.instance.track("performance",t);break;case"tencent":e.instance&&e.instance.Event&&e.instance.Event.stat&&e.instance.Event.stat("performance",t);break;case"google":e.instance&&"function"==typeof e.instance&&e.instance("event","performance",t);break;case"custom":e.instance&&"function"==typeof e.instance.trackPerformance&&e.instance.trackPerformance(t);break;default:console.warn("未知的SDK类型: ".concat(e.name))}}},{key:"isSDKIntegrated",value:function(e){return!!this.integratedSDKs[e]}},{key:"getIntegratedSDKs",value:function(){return Object.keys(this.integratedSDKs)}},{key:"getSDKInstance",value:function(e){var t;return(null===(t=this.integratedSDKs[e])||void 0===t?void 0:t.instance)||null}},{key:"destroy",value:function(){Object.values(this.integratedSDKs).forEach(function(e){try{e.instance&&"function"==typeof e.instance.destroy&&e.instance.destroy()}catch(t){console.error("销毁".concat(e.name,"失败:"),t)}}),this.integratedSDKs={},this.isInitialized=!1}}])}(),li=function(){return h(function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};l(this,e),this.config={appId:t.appId||"",appVersion:t.appVersion||"1.0.0",environment:t.environment||"production",debugSwitch:!0===t.debugSwitch,customerId:t.customerId||"",userId:t.userId||"",deviceNo:t.deviceNo||"",deviceId:t.userId||"",uiVersion:t.uiVersion||"",sessionId:Wn(),reportUrl:t.reportUrl||"",reportInterval:"number"==typeof t.reportInterval?t.reportInterval:0,maxQueueSize:t.maxQueueSize||100,enableErrorTracking:!1!==t.enableErrorTracking,enableUnhandledRejection:!1!==t.enableUnhandledRejection,enableResourceError:!1!==t.enableResourceError,enableEventTracking:!1!==t.enableEventTracking,enableClickTracking:!1!==t.enableClickTracking,enablePageViewTracking:!1!==t.enablePageViewTracking,enablePerformanceTracking:!1!==t.enablePerformanceTracking,enableResourceTracking:!1!==t.enableResourceTracking,enableApiTracking:!1!==t.enableApiTracking,enableInteractionTracking:!1!==t.enableInteractionTracking,enableRouteTracking:!1!==t.enableRouteTracking,enableUserInteractionTracking:!1!==t.enableUserInteractionTracking,enableFormTracking:!1!==t.enableFormTracking,enableScrollTracking:!1!==t.enableScrollTracking,enableMouseTracking:!1!==t.enableMouseTracking,enableKeyboardTracking:!1!==t.enableKeyboardTracking,thirdPartyConfig:t.thirdPartyConfig||{},user:t.user||null,customReport:t.customReport||null},this.user=null},[{key:"updateConfig",value:function(e){this.config=w(w({},this.config),e)}},{key:"setUser",value:function(e){this.user=e}},{key:"getConfig",value:function(){return this.config}},{key:"getUser",value:function(){return this.user}},{key:"getReportUrl",value:function(){return this.config.reportUrl}},{key:"getThirdPartyConfig",value:function(){return this.config.thirdPartyConfig}},{key:"isErrorTrackingEnabled",value:function(){return this.config.enableErrorTracking}},{key:"isEventTrackingEnabled",value:function(){return this.config.enableEventTracking}}])}();"undefined"==typeof window||null!==(Xn=window)&&void 0!==Xn&&Xn.axios||(window.axios=Gt);var fi=function(){return h(function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};l(this,e),this.config=new li(t),this.errorTracker=new ii(this.config),this.eventTracker=new oi(this.config),this.performanceTracker=new ai(this.config,this.eventTracker),this.userBehaviorTracker=new si(this.config),this.exposureTracker=new ui(this.config,this.eventTracker),this.thirdPartyIntegrator=new ci(this.config),this.init()},[{key:"init",value:function(){this.eventTracker.init(),this.exposureTracker.init(),this.thirdPartyIntegrator.init(),this.setupPageUnloadHandler(),console.log("Frontend SDK 初始化完成")}},{key:"setupPageUnloadHandler",value:function(){var e=this,t=!1,r=function(){try{e.exposureTracker&&"function"==typeof e.exposureTracker.suspendExposureForUnload&&e.exposureTracker.suspendExposureForUnload()}catch(e){}if(!t){t=!0;try{e.eventTracker&&"function"==typeof e.eventTracker.flushEventQueue&&e.eventTracker.flushEventQueue(),e.exposureTracker&&"function"==typeof e.exposureTracker.flushExposureQueue&&e.exposureTracker.flushExposureQueue(),e.errorTracker&&"function"==typeof e.errorTracker.flushErrorQueue&&e.errorTracker.flushErrorQueue(),e.performanceTracker&&"function"==typeof e.performanceTracker.flushPerformanceQueue&&e.performanceTracker.flushPerformanceQueue(),e.userBehaviorTracker&&"function"==typeof e.userBehaviorTracker.flushBehaviorQueue&&e.userBehaviorTracker.flushBehaviorQueue(),e.config.getConfig().debugSwitch&&console.log("页面卸载:已刷新所有待上报队列,使用 sendBeacon 发送")}catch(e){console.error("页面卸载时刷新队列失败:",e)}}};this.setupUrlChangeMonitoring(r),window.addEventListener("pagehide",function(e){r()},{capture:!0}),window.addEventListener("beforeunload",function(){r()},{capture:!0})}},{key:"setupUrlChangeMonitoring",value:function(e){var t=this,r=location.href,n=location.origin,i=!0,o=null,a=function(){i&&(i=!1,o&&(clearInterval(o),o=null))};o=setInterval(function(){if(i)try{var o=location.href,s=location.origin;o!==r&&(s!==n&&(t.config.getConfig().debugSwitch&&console.log("检测到跳转到外部页面(域名变化),立即发送埋点数据:",o),a(),e()),r=o,n=s)}catch(e){t.config.getConfig().debugSwitch&&console.warn("URL 监控异常:",e),a()}},30),this._urlMonitoringCleanup=a}},{key:"suspendExposureForUnload",value:function(){this.exposureTracker&&"function"==typeof this.exposureTracker.suspendExposureForUnload&&this.exposureTracker.suspendExposureForUnload()}},{key:"resumeExposureTracking",value:function(){this.exposureTracker&&"function"==typeof this.exposureTracker.resumeExposureTracking&&this.exposureTracker.resumeExposureTracking()}},{key:"reportError",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.errorTracker.reportError(e,t)}},{key:"reportEvent",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.eventTracker.reportEvent(e,t)}},{key:"reportCustomEvent",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.eventTracker.reportCustomEvent(e,t)}},{key:"getCurrentPageStayTime",value:function(){return this.eventTracker.getCurrentPageStayTime()}},{key:"getPageHistory",value:function(){return this.eventTracker.pageHistory||[]}},{key:"reportPerformance",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.performanceTracker.reportPerformance(e)}},{key:"reportBehavior",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.userBehaviorTracker.reportCustomBehavior(e,t)}},{key:"setUser",value:function(e){this.config.setUser(e),this.thirdPartyIntegrator.reportUser(e)}},{key:"setConfig",value:function(e){this.config.updateConfig(e)}},{key:"getPerformanceMetrics",value:function(){return this.performanceTracker.getCurrentMetrics()}},{key:"getBehaviorData",value:function(){return this.userBehaviorTracker.getCurrentBehaviors()}},{key:"getSessionId",value:function(){return this.userBehaviorTracker.getSessionId()}},{key:"isThirdPartySDKIntegrated",value:function(e){return this.thirdPartyIntegrator.isSDKIntegrated(e)}},{key:"getIntegratedThirdPartySDKs",value:function(){return this.thirdPartyIntegrator.getIntegratedSDKs()}},{key:"setupVueRouterMonitoring",value:function(e){e?this.config.config.enableRouteTracking&&this.eventTracker.setupVueRouterMonitoring(e):console.warn("Vue Router 实例未提供")}},{key:"getCurrentRoute",value:function(){return this.eventTracker.getCurrentRoute()}},{key:"getPreviousPageInfo",value:function(){return this.eventTracker.getPreviousPageInfo()}},{key:"getCurrentRouteStayTime",value:function(){return this.eventTracker.getCurrentRouteStayTime()}},{key:"trackProduct",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.exposureTracker.trackProduct(e,t)}},{key:"trackProducts",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.exposureTracker.trackProducts(e,t)}},{key:"untrackProduct",value:function(e){return this.exposureTracker.untrackProduct(e)}},{key:"untrackAllProducts",value:function(){return this.exposureTracker.untrackAll()}},{key:"reportExposure",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.exposureTracker.reportExposure(e)}},{key:"getTrackedProducts",value:function(){return this.exposureTracker.getTrackedElements()}},{key:"getExposureQueue",value:function(){return this.exposureTracker.getExposureQueue()}},{key:"flushExposureQueue",value:function(){return this.exposureTracker.flushExposureQueue()}},{key:"cancelQueuedExposureByProductId",value:function(e){return this.exposureTracker&&"function"==typeof this.exposureTracker.cancelQueuedExposureByProductId?this.exposureTracker.cancelQueuedExposureByProductId(e):0}},{key:"destroy",value:function(){this._urlMonitoringCleanup&&"function"==typeof this._urlMonitoringCleanup&&this._urlMonitoringCleanup(),this.errorTracker.destroy(),this.eventTracker.destroy(),this.performanceTracker.destroy(),this.userBehaviorTracker.destroy(),this.exposureTracker.destroy(),this.thirdPartyIntegrator.destroy(),console.log("Frontend SDK 已销毁")}}])}();e.default=fi,e.performanceNow=Hn,Object.defineProperty(e,"__esModule",{value:!0})});
|
|
4
4
|
//# sourceMappingURL=index.umd.js.map
|