aibox-web-tracing 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +67 -0
- package/es/index.mjs +3702 -0
- package/lib/index.js +11 -0
- package/package.json +83 -0
package/lib/index.js
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const ke=require("vue"),gn=require("rrweb"),Pt=require("pako"),Re=require("js-base64");function ee(e){return function(t){return Object.prototype.toString.call(t)===`[object ${e}]`}}const et=ee("RegExp"),bn=ee("Number"),yn=ee("String"),En=ee("Boolean"),Sn=ee("Function"),Ce=ee("Array"),Ln=ee("Window"),Oe=e=>En(e)&&String(e)==="false";function wn(e){return yn(e)&&e.trim()===""||e===void 0||e===null}const Rn=Ln(typeof window<"u"?window:0),An=!!window?.process?.versions?.electron,je=typeof navigator<"u"&&navigator.userAgent.includes("jsdom")||typeof window<"u"&&window.jsdom;function xt(){return Rn||An||je?window:{}}function In(){return p.__webTracing__=p.__webTracing__||{},p.__webTracing__}function Tn(){return!!p.__webTracingInit__}const p=xt(),C=In();function ae(...e){exports._options.value.debug&&console.log("@web-tracing: ",...e)}function K(...e){console.error("@web-tracing: ",...e)}function V(e,t,n,r=!1){e.addEventListener(t,n,r)}function le(e,t,n,r=!1){if(e!==void 0&&(t in e||r)){const o=e[t],a=n(o);Sn(a)&&(e[t]=a)}}function se(e){return Object.keys(e).forEach(t=>{const n=e[t];bn(n)&&(e[t]=n===0?void 0:parseFloat(n.toFixed(2)))}),e}function N(){return typeof document>"u"||document.location==null?"":document.location.href}function w(){return Date.now()}function Nt(e,t,n=!1){let r=null,o;return function(a,...s){o=s,r===null&&(n&&e.apply(this,o),r=setTimeout(()=>{r=null,e.apply(this,o)},t))}}function kn(e,t,n=!1){let r=null;return function(o,...a){n&&(e.call(this,...a),n=!1),r&&clearTimeout(r),r=setTimeout(()=>{e.call(this,...a)},t)}}function Pe(e,...t){const n=new Map;for(const r of e){const o=t.filter(a=>r[a]).map(a=>r[a]).join(":");n.has(o)||n.set(o,[]),n.get(o).push(r)}return Array.from(n.values())}function Ae(e,...t){return t.forEach(n=>{for(const r in n)n[r]!==null&&et(n[r])?e[r]=n[r]:n[r]!==null&&typeof n[r]=="object"?e[r]=Ae(e[r]||(Ce(n[r])?[]:{}),n[r]):e[r]=n[r]}),e}function O(e){return Tn()?!0:(K(`${e} 需要在SDK初始化之后使用`),!1)}function ce(e){return Object.prototype.toString.call(e).slice(8,-1).toLowerCase()}function de(e,t){return e in t}function Cn(e){return Math.random()<=e}function te(e,t,n="0"){const r=String(e);if(r.length<t){let o=r;for(let a=0;a<t-r.length;a+=1)o=n+o;return o}return r}function On(e){return e.split("?")[0]}function We(){const e=new Date,t=parseInt(`${e.getFullYear()}${te(e.getMonth()+1,2)}${te(e.getDate(),2)}`,10).toString(16),n=parseInt(`${te(e.getHours(),2)}${te(e.getMinutes(),2)}${te(e.getSeconds(),2)}${te(e.getMilliseconds(),3)}`,10).toString(16);let r=t+n.length+n;for(;r.length<32;)r+=Math.floor(Math.random()*16).toString(16);return`${r.slice(0,8)}-${r.slice(8,16)}-${r.slice(16)}`}function tt(e){const t=document.cookie.match(new RegExp(`${e}=([^;]+)(;|$)`));return t?t[1]:void 0}function Pn(e,t){return navigator.sendBeacon(e,JSON.stringify(t))}const Le=[];function xn(e,t){return new Promise(n=>{const r=new Image;r.src=`${e}?v=${encodeURIComponent(JSON.stringify(t))}`,Le.push(r),r.onload=()=>{n()},r.onerror=function(){n()}})}function st(e,t,n=5e3){return new Promise((r,o)=>{const a=new XMLHttpRequest;a.open("post",e),a.setRequestHeader("content-type","application/json"),a.timeout=n,a.send(JSON.stringify(t)),a.onreadystatechange=function(){a.readyState===4&&(a.status>=200&&a.status<300?r():o(new Error("@web-tracing XMLHttpRequest error: "+a.status)))},a.ontimeout=function(){o(new Error("@web-tracing XMLHttpRequest timeout"))},a.onerror=function(){o(new Error("@web-tracing XMLHttpRequest network error"))}})}function ye(e,t,n){if(e.length===0)return n;let r;for(let o=0;o<e.length;o++){const a=e[o];o===0||t?r=a(n):r=a(r)}return r}function xe(e){return Ce(e)?e:[e]}const Nn=Array.prototype.map||function(t){const n=[];for(let r=0;r<this.length;r+=1)n.push(t(this[r],r,this));return n};function Mt(e,t){return Nn.call(e,t)}const Mn=Array.prototype.filter||function(t,n){const r=[];for(let o=0;o<this.length;o+=1)n(this[o],o,this)&&r.push(this[o]);return r};function Fn(e,t){return Mn.call(e,t)}const _n=window.requestIdleCallback||window.requestAnimationFrame||(e=>setTimeout(e,17));function ct(e,t){const n=JSON.stringify(e);return new TextEncoder().encode(n).length/1024>t}function Be(e){if(!e)return{};const t={},n=e.split("?")[1];if(n){const r=n.split("&");for(const o of r){const[a,s]=o.split("=");t[decodeURIComponent(a)]=decodeURIComponent(s)}}return t}function Ze(e,t=new Map){if(e!==null&&typeof e=="object"){let n=t.get(e);return n||(e instanceof Array?(n=[],t.set(e,n),e.forEach((r,o)=>{n[o]=Ze(r,t)})):(n={},t.set(e,n),Object.keys(e).forEach(r=>{de(r,e)&&(n[r]=Ze(e[r],t))})),n)}return e}function j(e,t,n,r=!1){e.removeEventListener(t,n,r)}class Vn{dsn="";appName="";appCode="";appVersion="";userUuid="";sdkUserUuid="";debug=!1;pv={core:!1};performance={core:!1,firstResource:!1,server:!1};error={core:!1,server:!1};event={core:!1};recordScreen=!0;timeout=5e3;maxQueueLength=200;checkRecoverInterval=1;ext={};tracesSampleRate=1;cacheMaxLength=5;cacheWatingTime=5e3;ignoreErrors=[];ignoreRequest=[];scopeError=!1;localization=!1;sendTypeByXmlBody=!1;beforePushEventList=[];beforeSendData=[];afterSendData=[];localizationOverFlow=()=>{};constructor(t){const n=this.transitionOptions(t);n.ignoreRequest.push(new RegExp(n.dsn)),Ae(this,n)}transitionOptions(t){const n=Ae({},this,t),{beforePushEventList:r,beforeSendData:o,afterSendData:a}=t,{pv:s,performance:c,error:i,event:u}=n;return typeof s=="boolean"&&(n.pv={core:s}),typeof c=="boolean"&&(n.performance={core:c,firstResource:c,server:c}),typeof i=="boolean"&&(n.error={core:i,server:i}),typeof u=="boolean"&&(n.event={core:u}),r&&(n.beforePushEventList=[r]),o&&(n.beforeSendData=[o]),a&&(n.afterSendData=[a]),t.timeout!==void 0&&(n.timeout=t.timeout),t.maxQueueLength!==void 0&&(n.maxQueueLength=t.maxQueueLength),t.checkRecoverInterval!==void 0&&(n.checkRecoverInterval=t.checkRecoverInterval),n}}function Hn(e){const{dsn:t,appName:n,appCode:r,appVersion:o,userUuid:a,debug:s,recordScreen:c,pv:i,performance:u,error:l,event:f,ext:m,tracesSampleRate:v,cacheMaxLength:E,cacheWatingTime:b,ignoreErrors:h,ignoreRequest:I,scopeError:P,localization:U,sendTypeByXmlBody:J,beforePushEventList:be,beforeSendData:Y,timeout:fn,maxQueueLength:hn,checkRecoverInterval:pn,transformSendParams:mn}=e,G=[];return i&&typeof i=="object"?G.push(y(i.core,"pv.core","boolean")):G.push(y(i,"pv","boolean")),u&&typeof u=="object"?G.push(y(u.core,"performance.core","boolean"),y(u.firstResource,"performance.firstResource","boolean"),y(u.server,"performance.server","boolean")):G.push(y(u,"performance","boolean")),l&&typeof l=="object"?G.push(y(l.core,"error.core","boolean"),y(l.server,"error.server","boolean")):G.push(y(l,"error","boolean")),f&&typeof f=="object"?G.push(y(f.core,"event.core","boolean")):G.push(y(f,"event","boolean")),[y(t,"dsn","string"),y(n,"appName","string"),y(r,"appCode","string"),y(o,"appVersion","string"),y(a,"userUuid","string"),y(s,"debug","boolean"),y(c,"recordScreen","boolean"),y(m,"ext","object"),y(v,"tracesSampleRate","number"),y(E,"cacheMaxLength","number"),y(b,"cacheWatingTime","number"),y(h,"ignoreErrors","array"),lt(h,"ignoreErrors",["string","regexp"]),y(I,"ignoreRequest","array"),lt(I,"ignoreRequest",["string","regexp"]),y(P,"scopeError","boolean"),y(U,"localization","boolean"),y(J,"sendTypeByXmlBody","boolean"),y(be,"beforePushEventList","function"),y(Y,"beforeSendData","function"),y(fn,"timeout","number"),y(hn,"maxQueueLength","number"),y(pn,"checkRecoverInterval","number"),y(mn,"transformSendParams","function")].every(vn=>!!vn)}function Dn(e){return[ut(e.appName,"appName"),ut(e.dsn,"dsn")].every(n=>!!n)}function ut(e,t){return wn(e)?(K(`【${t}】参数必填`),!1):!0}function y(e,t,n){return!e||ce(e)===n?!0:(K(`TypeError:【${t}】期望传入${n}类型,目前是${ce(e)}类型`),!1)}function lt(e,t,n){if(!e)return!0;let r=!0;return e.forEach(o=>{n.includes(ce(o))||(K(`TypeError:【${t}】数组内的值期望传入${n.join("|")}类型,目前值${o}是${ce(o)}类型`),r=!1)}),r}exports._options=void 0;function Un(e){return!Dn(e)||!Hn(e)?!1:(exports._options=ke.ref(new Vn(e)),C.options=exports._options,!0)}const Xn="0.0.1",dt="_webtracing_device_id",Ye="_webtracing_session_id",jn=18e5,Ge="_webtracing_localization_key",Wn=Xn,d={ERROR:"error",CONSOLEERROR:"consoleError",UNHANDLEDREJECTION:"unhandledrejection",CLICK:"click",LOAD:"load",BEFOREUNLOAD:"beforeunload",FETCH:"fetch",XHROPEN:"xhr-open",XHRSEND:"xhr-send",HASHCHANGE:"hashchange",HISTORYPUSHSTATE:"history-pushState",HISTORYREPLACESTATE:"history-replaceState",POPSTATE:"popstate",READYSTATECHANGE:"readystatechange",ONLINE:"online",OFFLINE:"offline"},M={PV:"pv",PVDURATION:"pv-duration",ERROR:"error",PERFORMANCE:"performance",CLICK:"click",DWELL:"dwell",CUSTOM:"custom",INTERSECTION:"intersection"},k={PAGE:"page",RESOURCE:"resource",SERVER:"server",CODE:"code",REJECT:"reject",CONSOLEERROR:"console.error"},Bn={0:"navigate",1:"reload",2:"back_forward",255:"reserved"};class Zn{handlers;constructor(){this.handlers={}}addEvent(t){!this.handlers[t.type]&&(this.handlers[t.type]=[]),this._getCallbackIndex(t)===-1&&this.handlers[t.type]?.push(t.callback)}delEvent(t){const n=this._getCallbackIndex(t);n!==-1&&this.handlers[t.type]?.splice(n,1)}changeEvent(t,n){const r=this._getCallbackIndex(t);r!==-1&&this.handlers[t.type]?.splice(r,1,n)}getEvent(t){return this.handlers[t]||[]}runEvent(t,...n){this.getEvent(t).forEach(o=>{o(...n)})}_getCallbackIndex(t){if(this.handlers[t.type]){const n=this.handlers[t.type];return n?n.findIndex(r=>r===t.callback):-1}else return-1}removeEvents(t){t.forEach(n=>{delete this.handlers[n]})}}const g=C.eventBus||(C.eventBus=new Zn),R={consoleError:null,xhrOpen:null,xhrSend:null,fetch:null,historyPushState:null,historyReplaceState:null},L={error:null,unhandledrejection:null,click:null,load:null,beforeunload:null,hashchange:null,popstate:null,offline:null,online:null};function Yn(){for(const e in d)de(e,d)&&Gn(e)}function Gn(e){if(!de(e,d))return;switch(d[e]){case d.ERROR:zn(d.ERROR);break;case d.UNHANDLEDREJECTION:Jn(d.UNHANDLEDREJECTION);break;case d.CONSOLEERROR:qn(d.CONSOLEERROR);break;case d.CLICK:$n(d.CLICK);break;case d.LOAD:Qn(d.LOAD);break;case d.BEFOREUNLOAD:Kn(d.BEFOREUNLOAD);break;case d.XHROPEN:er(d.XHROPEN);break;case d.XHRSEND:tr(d.XHRSEND);break;case d.FETCH:nr(d.FETCH);break;case d.HASHCHANGE:rr(d.HASHCHANGE);break;case d.HISTORYPUSHSTATE:ir(d.HISTORYPUSHSTATE);break;case d.HISTORYREPLACESTATE:or(d.HISTORYREPLACESTATE);break;case d.POPSTATE:ar(d.POPSTATE);break;case d.OFFLINE:sr(d.OFFLINE);break;case d.ONLINE:cr(d.ONLINE);break}}function zn(e){const t=function(n){g.runEvent(e,n)};L.error=t,V(p,"error",t,!0)}function Jn(e){const t=function(n){g.runEvent(e,n)};L.unhandledrejection=t,V(p,"unhandledrejection",t)}function qn(e){R.consoleError=console.error,le(console,"error",t=>function(n,...r){r[0]&&r[0].slice&&r[0].slice(0,12)==="@web-tracing"||g.runEvent(e,r),t.apply(this,r)})}function $n(e){if(!("document"in p))return;const t=Nt(g.runEvent,100,!0),n=function(r,o){t.call(g,e,o)};L.click=n,V(p.document,"click",n,!0)}function Qn(e){const t=function(n){g.runEvent(e,n)};L.load=t,V(p,"load",t,!0)}function Kn(e){const t=function(n){g.runEvent(e,n)};L.beforeunload=t,V(p,"beforeunload",t,!1)}function er(e){"XMLHttpRequest"in p&&(R.xhrOpen=XMLHttpRequest.prototype.open,le(XMLHttpRequest.prototype,"open",t=>function(n,...r){g.runEvent(e,...r),t.apply(this,r)}))}function tr(e){"XMLHttpRequest"in p&&(R.xhrSend=XMLHttpRequest.prototype.send,le(XMLHttpRequest.prototype,"send",t=>function(n,...r){g.runEvent(e,this,...r),t.apply(this,r)}))}function nr(e){"fetch"in p&&(R.fetch=p.fetch,le(p,"fetch",t=>function(n,...r){const o=w(),a={};return t.apply(p,r).then(s=>(g.runEvent(e,r[0],r[1],s,o,a),s))}))}function rr(e){const t=function(n){g.runEvent(e,n)};L.hashchange=t,V(p,"hashchange",t)}function or(e){R.historyReplaceState=history.replaceState,le(history,"replaceState",t=>function(n,...r){g.runEvent(e,...r),t.apply(this,r)})}function ir(e){R.historyPushState=history.pushState,le(history,"pushState",t=>function(n,...r){g.runEvent(e,...r),t.apply(this,r)})}function ar(e){const t=function(n){g.runEvent(e,n)};L.popstate=t,V(p,"popstate",t)}function sr(e){const t=function(n){g.runEvent(e,n)};L.offline=t,V(p,"offline",t)}function cr(e){const t=function(n){g.runEvent(e,n)};L.offline=t,V(p,"offline",t)}function ur(){R.consoleError&&console.error!==R.consoleError&&(console.error=R.consoleError),R.xhrOpen&&XMLHttpRequest.prototype.open!==R.xhrOpen&&(XMLHttpRequest.prototype.open=R.xhrOpen),R.xhrSend&&XMLHttpRequest.prototype.send!==R.xhrSend&&(XMLHttpRequest.prototype.send=R.xhrSend),R.fetch&&p.fetch!==R.fetch&&(p.fetch=R.fetch),R.historyPushState&&history.pushState!==R.historyPushState&&(history.pushState=R.historyPushState),R.historyReplaceState&&history.replaceState!==R.historyReplaceState&&(history.replaceState=R.historyReplaceState),L.error&&j(p,"error",L.error,!0),L.unhandledrejection&&j(p,"unhandledrejection",L.unhandledrejection),L.click&&j(p.document,"click",L.click,!0),L.load&&j(p,"load",L.load,!0),L.beforeunload&&j(p,"beforeunload",L.beforeunload,!1),L.hashchange&&j(p,"hashchange",L.hashchange),L.popstate&&j(p,"popstate",L.popstate),L.offline&&j(p,"offline",L.offline),L.online&&j(p,"online",L.online),Object.keys(R).forEach(e=>{R[e]=null}),Object.keys(L).forEach(e=>{L[e]=null})}let ze=function(){return ze=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(const o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},ze.apply(this,arguments)};function Z(e,t,n,r){return new(n||(n=Promise))(function(o,a){function s(u){try{i(r.next(u))}catch(l){a(l)}}function c(u){try{i(r.throw(u))}catch(l){a(l)}}function i(u){let l;u.done?o(u.value):(l=u.value,l instanceof n?l:new n(function(f){f(l)})).then(s,c)}i((r=r.apply(e,[])).next())})}function X(e,t){let n,r,o,a,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function c(i){return function(u){return(function(l){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,l[0]&&(s=0)),s;)try{if(n=1,r&&(o=2&l[0]?r.return:l[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,l[1])).done)return o;switch(r=0,o&&(l=[2&l[0],o.value]),l[0]){case 0:case 1:o=l;break;case 4:return s.label++,{value:l[1],done:!1};case 5:s.label++,r=l[1],l=[0];continue;case 7:l=s.ops.pop(),s.trys.pop();continue;default:if(o=s.trys,!((o=o.length>0&&o[o.length-1])||l[0]!==6&&l[0]!==2)){s=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){s.label=l[1];break}if(l[0]===6&&s.label<o[1]){s.label=o[1],o=l;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(l);break}o[2]&&s.ops.pop(),s.trys.pop();continue}l=t.call(e,s)}catch(f){l=[6,f],r=0}finally{n=o=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}})([i,u])}}}function ie(e,t,n){if(n||arguments.length===2)for(var r,o=0,a=t.length;o<a;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}function B(e,t){return new Promise(function(n){return setTimeout(n,e,t)})}function Ft(e){return!!e&&typeof e.then=="function"}function ft(e,t){try{const n=e();Ft(n)?n.then(function(r){return t(!0,r)},function(r){return t(!1,r)}):t(!0,n)}catch(n){t(!1,n)}}function ht(e,t,n){return n===void 0&&(n=16),Z(this,void 0,void 0,function(){let r,o,a;return X(this,function(s){switch(s.label){case 0:r=Date.now(),o=0,s.label=1;case 1:return o<e.length?(t(e[o],o),(a=Date.now())>=r+n?(r=a,[4,B(0)]):[3,3]):[3,4];case 2:s.sent(),s.label=3;case 3:return++o,[3,1];case 4:return[2]}})})}function Ie(e){e.then(void 0,function(){})}function z(e,t){e=[e[0]>>>16,65535&e[0],e[1]>>>16,65535&e[1]],t=[t[0]>>>16,65535&t[0],t[1]>>>16,65535&t[1]];const n=[0,0,0,0];return n[3]+=e[3]+t[3],n[2]+=n[3]>>>16,n[3]&=65535,n[2]+=e[2]+t[2],n[1]+=n[2]>>>16,n[2]&=65535,n[1]+=e[1]+t[1],n[0]+=n[1]>>>16,n[1]&=65535,n[0]+=e[0]+t[0],n[0]&=65535,[n[0]<<16|n[1],n[2]<<16|n[3]]}function _(e,t){e=[e[0]>>>16,65535&e[0],e[1]>>>16,65535&e[1]],t=[t[0]>>>16,65535&t[0],t[1]>>>16,65535&t[1]];const n=[0,0,0,0];return n[3]+=e[3]*t[3],n[2]+=n[3]>>>16,n[3]&=65535,n[2]+=e[2]*t[3],n[1]+=n[2]>>>16,n[2]&=65535,n[2]+=e[3]*t[2],n[1]+=n[2]>>>16,n[2]&=65535,n[1]+=e[1]*t[3],n[0]+=n[1]>>>16,n[1]&=65535,n[1]+=e[2]*t[2],n[0]+=n[1]>>>16,n[1]&=65535,n[1]+=e[3]*t[1],n[0]+=n[1]>>>16,n[1]&=65535,n[0]+=e[0]*t[3]+e[1]*t[2]+e[2]*t[1]+e[3]*t[0],n[0]&=65535,[n[0]<<16|n[1],n[2]<<16|n[3]]}function ne(e,t){return(t%=64)===32?[e[1],e[0]]:t<32?[e[0]<<t|e[1]>>>32-t,e[1]<<t|e[0]>>>32-t]:(t-=32,[e[1]<<t|e[0]>>>32-t,e[0]<<t|e[1]>>>32-t])}function F(e,t){return(t%=64)===0?e:t<32?[e[0]<<t|e[1]>>>32-t,e[1]<<t]:[e[1]<<t-32,0]}function A(e,t){return[e[0]^t[0],e[1]^t[1]]}function pt(e){return e=A(e,[0,e[0]>>>1]),e=A(e=_(e,[4283543511,3981806797]),[0,e[0]>>>1]),e=A(e=_(e,[3301882366,444984403]),[0,e[0]>>>1])}function lr(e,t){t=t||0;let n,r=(e=e||"").length%16,o=e.length-r,a=[0,t],s=[0,t],c=[0,0],i=[0,0],u=[2277735313,289559509],l=[1291169091,658871167];for(n=0;n<o;n+=16)c=[255&e.charCodeAt(n+4)|(255&e.charCodeAt(n+5))<<8|(255&e.charCodeAt(n+6))<<16|(255&e.charCodeAt(n+7))<<24,255&e.charCodeAt(n)|(255&e.charCodeAt(n+1))<<8|(255&e.charCodeAt(n+2))<<16|(255&e.charCodeAt(n+3))<<24],i=[255&e.charCodeAt(n+12)|(255&e.charCodeAt(n+13))<<8|(255&e.charCodeAt(n+14))<<16|(255&e.charCodeAt(n+15))<<24,255&e.charCodeAt(n+8)|(255&e.charCodeAt(n+9))<<8|(255&e.charCodeAt(n+10))<<16|(255&e.charCodeAt(n+11))<<24],c=ne(c=_(c,u),31),a=z(a=ne(a=A(a,c=_(c,l)),27),s),a=z(_(a,[0,5]),[0,1390208809]),i=ne(i=_(i,l),33),s=z(s=ne(s=A(s,i=_(i,u)),31),a),s=z(_(s,[0,5]),[0,944331445]);switch(c=[0,0],i=[0,0],r){case 15:i=A(i,F([0,e.charCodeAt(n+14)],48));case 14:i=A(i,F([0,e.charCodeAt(n+13)],40));case 13:i=A(i,F([0,e.charCodeAt(n+12)],32));case 12:i=A(i,F([0,e.charCodeAt(n+11)],24));case 11:i=A(i,F([0,e.charCodeAt(n+10)],16));case 10:i=A(i,F([0,e.charCodeAt(n+9)],8));case 9:i=_(i=A(i,[0,e.charCodeAt(n+8)]),l),s=A(s,i=_(i=ne(i,33),u));case 8:c=A(c,F([0,e.charCodeAt(n+7)],56));case 7:c=A(c,F([0,e.charCodeAt(n+6)],48));case 6:c=A(c,F([0,e.charCodeAt(n+5)],40));case 5:c=A(c,F([0,e.charCodeAt(n+4)],32));case 4:c=A(c,F([0,e.charCodeAt(n+3)],24));case 3:c=A(c,F([0,e.charCodeAt(n+2)],16));case 2:c=A(c,F([0,e.charCodeAt(n+1)],8));case 1:c=_(c=A(c,[0,e.charCodeAt(n)]),u),a=A(a,c=_(c=ne(c,31),l))}return a=z(a=A(a,[0,e.length]),s=A(s,[0,e.length])),s=z(s,a),a=z(a=pt(a),s=pt(s)),s=z(s,a),("00000000"+(a[0]>>>0).toString(16)).slice(-8)+("00000000"+(a[1]>>>0).toString(16)).slice(-8)+("00000000"+(s[0]>>>0).toString(16)).slice(-8)+("00000000"+(s[1]>>>0).toString(16)).slice(-8)}function Ne(e){return parseInt(e)}function H(e){return parseFloat(e)}function W(e,t){return typeof e=="number"&&isNaN(e)?t:e}function D(e){return e.reduce(function(t,n){return t+(n?1:0)},0)}function _t(e,t){if(t===void 0&&(t=1),Math.abs(t)>=1)return Math.round(e/t)*t;const n=1/t;return Math.round(e*n)/n}function mt(e){return e&&typeof e=="object"&&"message"in e?e:{message:e}}function dr(e){return typeof e!="function"}function fr(e,t,n){const r=Object.keys(e).filter(function(a){return!(function(s,c){for(let i=0,u=s.length;i<u;++i)if(s[i]===c)return!0;return!1})(n,a)}),o=Array(r.length);return ht(r,function(a,s){o[s]=(function(c,i){const u=new Promise(function(l){const f=Date.now();ft(c.bind(null,i),function(){for(var m=[],v=0;v<arguments.length;v++)m[v]=arguments[v];const E=Date.now()-f;if(!m[0])return l(function(){return{error:mt(m[1]),duration:E}});const b=m[1];if(dr(b))return l(function(){return{value:b,duration:E}});l(function(){return new Promise(function(h){const I=Date.now();ft(b,function(){for(var P=[],U=0;U<arguments.length;U++)P[U]=arguments[U];const J=E+Date.now()-I;if(!P[0])return h({error:mt(P[1]),duration:J});h({value:P[1],duration:J})})})})})});return Ie(u),function(){return u.then(function(l){return l()})}})(e[a],t)}),function(){return Z(this,void 0,void 0,function(){let a,s,c,i,u,l;return X(this,function(f){switch(f.label){case 0:for(a={},s=0,c=r;s<c.length;s++)i=c[s],a[i]=void 0;u=Array(r.length),l=function(){let m;return X(this,function(v){switch(v.label){case 0:return m=!0,[4,ht(r,function(E,b){if(!u[b])if(o[b]){const h=o[b]().then(function(I){return a[E]=I});Ie(h),u[b]=h}else m=!1})];case 1:return v.sent(),m?[2,"break"]:[4,B(1)];case 2:return v.sent(),[2]}})},f.label=1;case 1:return[5,l()];case 2:if(f.sent()==="break")return[3,4];f.label=3;case 3:return[3,1];case 4:return[4,Promise.all(u)];case 5:return f.sent(),[2,a]}})})}}function Vt(){const e=window,t=navigator;return D(["MSCSSMatrix"in e,"msSetImmediate"in e,"msIndexedDB"in e,"msMaxTouchPoints"in t,"msPointerEnabled"in t])>=4}function hr(){const e=window,t=navigator;return D(["msWriteProfilerMark"in e,"MSStream"in e,"msLaunchUri"in t,"msSaveBlob"in t])>=3&&!Vt()}function Je(){const e=window,t=navigator;return D(["webkitPersistentStorage"in t,"webkitTemporaryStorage"in t,t.vendor.indexOf("Google")===0,"webkitResolveLocalFileSystemURL"in e,"BatteryManager"in e,"webkitMediaStream"in e,"webkitSpeechGrammar"in e])>=5}function he(){const e=window,t=navigator;return D(["ApplePayError"in e,"CSSPrimitiveValue"in e,"Counter"in e,t.vendor.indexOf("Apple")===0,"getStorageUpdates"in t,"WebKitMediaKeys"in e])>=4}function qe(){const e=window;return D(["safari"in e,!("DeviceMotionEvent"in e),!("ongestureend"in e),!("standalone"in navigator)])>=3}function pr(){let e,t,n=window;return D(["buildID"in navigator,"MozAppearance"in((t=(e=document.documentElement)===null||e===void 0?void 0:e.style)!==null&&t!==void 0?t:{}),"onmozfullscreenchange"in n,"mozInnerScreenX"in n,"CSSMozDocumentRule"in n,"CanvasCaptureMediaStream"in n])>=4}function mr(){const e=document;return e.fullscreenElement||e.msFullscreenElement||e.mozFullScreenElement||e.webkitFullscreenElement||null}function Ht(){const e=Je(),t=pr();if(!e&&!t)return!1;const n=window;return D(["onorientationchange"in n,"orientation"in n,e&&!("SharedWorker"in n),t&&/android/i.test(navigator.appVersion)])>=2}function vt(e){const t=new Error(e);return t.name=e,t}function gt(e,t,n){let r,o,a;return n===void 0&&(n=50),Z(this,void 0,void 0,function(){let s,c;return X(this,function(i){switch(i.label){case 0:s=document,i.label=1;case 1:return s.body?[3,3]:[4,B(n)];case 2:return i.sent(),[3,1];case 3:c=s.createElement("iframe"),i.label=4;case 4:return i.trys.push([4,,10,11]),[4,new Promise(function(u,l){let f=!1,m=function(){f=!0,u()};c.onload=m,c.onerror=function(b){f=!0,l(b)};const v=c.style;v.setProperty("display","block","important"),v.position="absolute",v.top="0",v.left="0",v.visibility="hidden",c.src="about:blank",s.body.appendChild(c);const E=function(){let b,h;f||(((h=(b=c.contentWindow)===null||b===void 0?void 0:b.document)===null||h===void 0?void 0:h.readyState)==="complete"?m():setTimeout(E,10))};E()})];case 5:i.sent(),i.label=6;case 6:return!((o=(r=c.contentWindow)===null||r===void 0?void 0:r.document)===null||o===void 0)&&o.body?[3,8]:[4,B(n)];case 7:return i.sent(),[3,6];case 8:return[4,e(c,c.contentWindow)];case 9:return[2,i.sent()];case 10:return(a=c.parentNode)===null||a===void 0||a.removeChild(c),[7];case 11:return[2]}})})}function vr(e){for(var t=(function(c){for(var i,u,l="Unexpected syntax '".concat(c,"'"),f=/^\s*([a-z-]*)(.*)$/i.exec(c),m=f[1]||void 0,v={},E=/([.:#][\w-]+|\[.+?\])/gi,b=function(I,P){v[I]=v[I]||[],v[I].push(P)};;){const I=E.exec(f[2]);if(!I)break;const P=I[0];switch(P[0]){case".":b("class",P.slice(1));break;case"#":b("id",P.slice(1));break;case"[":var h=/^\[([\w-]+)([~|^$*]?=("(.*?)"|([\w-]+)))?(\s+[is])?\]$/.exec(P);if(!h)throw new Error(l);b(h[1],(u=(i=h[4])!==null&&i!==void 0?i:h[5])!==null&&u!==void 0?u:"");break;default:throw new Error(l)}}return[m,v]})(e),n=t[0],r=t[1],o=document.createElement(n??"div"),a=0,s=Object.keys(r);a<s.length;a++){const c=s[a],i=r[c].join(" ");c==="style"?gr(o.style,i):o.setAttribute(c,i)}return o}function gr(e,t){for(let n=0,r=t.split(";");n<r.length;n++){const o=r[n],a=/^\s*([\w-]+)\s*:\s*(.+?)(\s*!([\w-]+))?\s*$/.exec(o);if(a){const s=a[1],c=a[2],i=a[4];e.setProperty(s,c,i||"")}}}const re=["monospace","sans-serif","serif"],bt=["sans-serif-thin","ARNO PRO","Agency FB","Arabic Typesetting","Arial Unicode MS","AvantGarde Bk BT","BankGothic Md BT","Batang","Bitstream Vera Sans Mono","Calibri","Century","Century Gothic","Clarendon","EUROSTILE","Franklin Gothic","Futura Bk BT","Futura Md BT","GOTHAM","Gill Sans","HELV","Haettenschweiler","Helvetica Neue","Humanst521 BT","Leelawadee","Letter Gothic","Levenim MT","Lucida Bright","Lucida Sans","Menlo","MS Mincho","MS Outlook","MS Reference Specialty","MS UI Gothic","MT Extra","MYRIAD PRO","Marlett","Meiryo UI","Microsoft Uighur","Minion Pro","Monotype Corsiva","PMingLiU","Pristina","SCRIPTINA","Segoe UI Light","Serifa","SimHei","Small Fonts","Staccato222 BT","TRAJAN PRO","Univers CE 55 Medium","Vrinda","ZWAdobeF"];function Me(e){return e.toDataURL()}let Ee,Fe;function br(){const e=this;return(function(){if(Fe===void 0){const t=function(){const n=_e();Ve(n)?Fe=setTimeout(t,2500):(Ee=n,Fe=void 0)};t()}})(),function(){return Z(e,void 0,void 0,function(){let t;return X(this,function(n){switch(n.label){case 0:return Ve(t=_e())?Ee?[2,ie([],Ee,!0)]:mr()?[4,(r=document,(r.exitFullscreen||r.msExitFullscreen||r.mozCancelFullScreen||r.webkitExitFullscreen).call(r))]:[3,2]:[3,2];case 1:n.sent(),t=_e(),n.label=2;case 2:return Ve(t)||(Ee=t),[2,t]}let r})})}}function _e(){const e=screen;return[W(H(e.availTop),null),W(H(e.width)-H(e.availWidth)-W(H(e.availLeft),0),null),W(H(e.height)-H(e.availHeight)-W(H(e.availTop),0),null),W(H(e.availLeft),null)]}function Ve(e){for(let t=0;t<4;++t)if(e[t])return!1;return!0}function yr(e){let t;return Z(this,void 0,void 0,function(){let n,r,o,a,s,c,i;return X(this,function(u){switch(u.label){case 0:for(n=document,r=n.createElement("div"),o=new Array(e.length),a={},yt(r),i=0;i<e.length;++i)s=vr(e[i]),yt(c=n.createElement("div")),c.appendChild(s),r.appendChild(c),o[i]=s;u.label=1;case 1:return n.body?[3,3]:[4,B(50)];case 2:return u.sent(),[3,1];case 3:n.body.appendChild(r);try{for(i=0;i<e.length;++i)o[i].offsetParent||(a[e[i]]=!0)}finally{(t=r.parentNode)===null||t===void 0||t.removeChild(r)}return[2,a]}})})}function yt(e){e.style.setProperty("display","block","important")}function Et(e){return matchMedia("(inverted-colors: ".concat(e,")")).matches}function St(e){return matchMedia("(forced-colors: ".concat(e,")")).matches}function oe(e){return matchMedia("(prefers-contrast: ".concat(e,")")).matches}function Lt(e){return matchMedia("(prefers-reduced-motion: ".concat(e,")")).matches}function wt(e){return matchMedia("(dynamic-range: ".concat(e,")")).matches}const S=Math,x=function(){return 0},He={default:[],apple:[{font:"-apple-system-body"}],serif:[{fontFamily:"serif"}],sans:[{fontFamily:"sans-serif"}],mono:[{fontFamily:"monospace"}],min:[{fontSize:"1px"}],system:[{fontFamily:"system-ui"}]},Er={fonts:function(){return gt(function(e,t){const n=t.document,r=n.body;r.style.fontSize="48px";const o=n.createElement("div"),a={},s={},c=function(l){const f=n.createElement("span"),m=f.style;return m.position="absolute",m.top="0",m.left="0",m.fontFamily=l,f.textContent="mmMwWLliI0O&1",o.appendChild(f),f},i=re.map(c),u=(function(){for(var l={},f=function(E){l[E]=re.map(function(b){return(function(h,I){return c("'".concat(h,"',").concat(I))})(E,b)})},m=0,v=bt;m<v.length;m++)f(v[m]);return l})();r.appendChild(o);for(let l=0;l<re.length;l++)a[re[l]]=i[l].offsetWidth,s[re[l]]=i[l].offsetHeight;return bt.filter(function(l){return t=u[l],re.some(function(f,m){return t[m].offsetWidth!==a[f]||t[m].offsetHeight!==s[f]})})})},domBlockers:function(e){const t=(e===void 0?{}:e).debug;return Z(this,void 0,void 0,function(){let n,r,o,a,s;return X(this,function(c){switch(c.label){case 0:return he()||Ht()?(i=atob,n={abpIndo:["#Iklan-Melayang","#Kolom-Iklan-728","#SidebarIklan-wrapper",i("YVt0aXRsZT0iN25hZ2EgcG9rZXIiIGld"),'[title="ALIENBOLA" i]'],abpvn:["#quangcaomb",i("Lmlvc0Fkc2lvc0Fkcy1sYXlvdXQ="),".quangcao",i("W2hyZWZePSJodHRwczovL3I4OC52bi8iXQ=="),i("W2hyZWZePSJodHRwczovL3piZXQudm4vIl0=")],adBlockFinland:[".mainostila",i("LnNwb25zb3JpdA=="),".ylamainos",i("YVtocmVmKj0iL2NsaWNrdGhyZ2guYXNwPyJd"),i("YVtocmVmXj0iaHR0cHM6Ly9hcHAucmVhZHBlYWsuY29tL2FkcyJd")],adBlockPersian:["#navbar_notice_50",".kadr",'TABLE[width="140px"]',"#divAgahi",i("I2FkMl9pbmxpbmU=")],adBlockWarningRemoval:["#adblock-honeypot",".adblocker-root",".wp_adblock_detect",i("LmhlYWRlci1ibG9ja2VkLWFk"),i("I2FkX2Jsb2NrZXI=")],adGuardAnnoyances:['amp-embed[type="zen"]',".hs-sosyal","#cookieconsentdiv",'div[class^="app_gdpr"]',".as-oil"],adGuardBase:[".BetterJsPopOverlay",i("I2FkXzMwMFgyNTA="),i("I2Jhbm5lcmZsb2F0MjI="),i("I2FkLWJhbm5lcg=="),i("I2NhbXBhaWduLWJhbm5lcg==")],adGuardChinese:[i("LlppX2FkX2FfSA=="),i("YVtocmVmKj0iL29kMDA1LmNvbSJd"),i("YVtocmVmKj0iLmh0aGJldDM0LmNvbSJd"),".qq_nr_lad","#widget-quan"],adGuardFrench:[i("I2Jsb2NrLXZpZXdzLWFkcy1zaWRlYmFyLWJsb2NrLWJsb2Nr"),"#pavePub",i("LmFkLWRlc2t0b3AtcmVjdGFuZ2xl"),".mobile_adhesion",".widgetadv"],adGuardGerman:[i("LmJhbm5lcml0ZW13ZXJidW5nX2hlYWRfMQ=="),i("LmJveHN0YXJ0d2VyYnVuZw=="),i("LndlcmJ1bmcz"),i("YVtocmVmXj0iaHR0cDovL3d3dy5laXMuZGUvaW5kZXgucGh0bWw/cmVmaWQ9Il0="),i("YVtocmVmXj0iaHR0cHM6Ly93d3cudGlwaWNvLmNvbS8/YWZmaWxpYXRlSWQ9Il0=")],adGuardJapanese:["#kauli_yad_1",i("YVtocmVmXj0iaHR0cDovL2FkMi50cmFmZmljZ2F0ZS5uZXQvIl0="),i("Ll9wb3BJbl9pbmZpbml0ZV9hZA=="),i("LmFkZ29vZ2xl"),i("LmFkX3JlZ3VsYXIz")],adGuardMobile:[i("YW1wLWF1dG8tYWRz"),i("LmFtcF9hZA=="),'amp-embed[type="24smi"]',"#mgid_iframe1",i("I2FkX2ludmlld19hcmVh")],adGuardRussian:[i("YVtocmVmXj0iaHR0cHM6Ly9hZC5sZXRtZWFkcy5jb20vIl0="),i("LnJlY2xhbWE="),'div[id^="smi2adblock"]',i("ZGl2W2lkXj0iQWRGb3hfYmFubmVyXyJd"),i("I2FkX3NxdWFyZQ==")],adGuardSocial:[i("YVtocmVmXj0iLy93d3cuc3R1bWJsZXVwb24uY29tL3N1Ym1pdD91cmw9Il0="),i("YVtocmVmXj0iLy90ZWxlZ3JhbS5tZS9zaGFyZS91cmw/Il0="),".etsy-tweet","#inlineShare",".popup-social"],adGuardSpanishPortuguese:["#barraPublicidade","#Publicidade","#publiEspecial","#queTooltip",i("W2hyZWZePSJodHRwOi8vYWRzLmdsaXNwYS5jb20vIl0=")],adGuardTrackingProtection:["#qoo-counter",i("YVtocmVmXj0iaHR0cDovL2NsaWNrLmhvdGxvZy5ydS8iXQ=="),i("YVtocmVmXj0iaHR0cDovL2hpdGNvdW50ZXIucnUvdG9wL3N0YXQucGhwIl0="),i("YVtocmVmXj0iaHR0cDovL3RvcC5tYWlsLnJ1L2p1bXAiXQ=="),"#top100counter"],adGuardTurkish:["#backkapat",i("I3Jla2xhbWk="),i("YVtocmVmXj0iaHR0cDovL2Fkc2Vydi5vbnRlay5jb20udHIvIl0="),i("YVtocmVmXj0iaHR0cDovL2l6bGVuemkuY29tL2NhbXBhaWduLyJd"),i("YVtocmVmXj0iaHR0cDovL3d3dy5pbnN0YWxsYWRzLm5ldC8iXQ==")],bulgarian:[i("dGQjZnJlZW5ldF90YWJsZV9hZHM="),"#ea_intext_div",".lapni-pop-over","#xenium_hot_offers",i("I25ld0Fk")],easyList:[i("I0FEX0NPTlRST0xfMjg="),i("LnNlY29uZC1wb3N0LWFkcy13cmFwcGVy"),".universalboxADVBOX03",i("LmFkdmVydGlzZW1lbnQtNzI4eDkw"),i("LnNxdWFyZV9hZHM=")],easyListChina:[i("YVtocmVmKj0iLndlbnNpeHVldGFuZy5jb20vIl0="),i("LmFwcGd1aWRlLXdyYXBbb25jbGljayo9ImJjZWJvcy5jb20iXQ=="),i("LmZyb250cGFnZUFkdk0="),"#taotaole","#aafoot.top_box"],easyListCookie:["#AdaCompliance.app-notice",".text-center.rgpd",".panel--cookie",".js-cookies-andromeda",".elxtr-consent"],easyListCzechSlovak:["#onlajny-stickers",i("I3Jla2xhbW5pLWJveA=="),i("LnJla2xhbWEtbWVnYWJvYXJk"),".sklik",i("W2lkXj0ic2tsaWtSZWtsYW1hIl0=")],easyListDutch:[i("I2FkdmVydGVudGll"),i("I3ZpcEFkbWFya3RCYW5uZXJCbG9jaw=="),".adstekst",i("YVtocmVmXj0iaHR0cHM6Ly94bHR1YmUubmwvY2xpY2svIl0="),"#semilo-lrectangle"],easyListGermany:[i("I0FkX1dpbjJkYXk="),i("I3dlcmJ1bmdzYm94MzAw"),i("YVtocmVmXj0iaHR0cDovL3d3dy5yb3RsaWNodGthcnRlaS5jb20vP3NjPSJd"),i("I3dlcmJ1bmdfd2lkZXNreXNjcmFwZXJfc2NyZWVu"),i("YVtocmVmXj0iaHR0cDovL2xhbmRpbmcucGFya3BsYXR6a2FydGVpLmNvbS8/YWc9Il0=")],easyListItaly:[i("LmJveF9hZHZfYW5udW5jaQ=="),".sb-box-pubbliredazionale",i("YVtocmVmXj0iaHR0cDovL2FmZmlsaWF6aW9uaWFkcy5zbmFpLml0LyJd"),i("YVtocmVmXj0iaHR0cHM6Ly9hZHNlcnZlci5odG1sLml0LyJd"),i("YVtocmVmXj0iaHR0cHM6Ly9hZmZpbGlhemlvbmlhZHMuc25haS5pdC8iXQ==")],easyListLithuania:[i("LnJla2xhbW9zX3RhcnBhcw=="),i("LnJla2xhbW9zX251b3JvZG9z"),i("aW1nW2FsdD0iUmVrbGFtaW5pcyBza3lkZWxpcyJd"),i("aW1nW2FsdD0iRGVkaWt1b3RpLmx0IHNlcnZlcmlhaSJd"),i("aW1nW2FsdD0iSG9zdGluZ2FzIFNlcnZlcmlhaS5sdCJd")],estonian:[i("QVtocmVmKj0iaHR0cDovL3BheTRyZXN1bHRzMjQuZXUiXQ==")],fanboyAnnoyances:["#feedback-tab","#taboola-below-article",".feedburnerFeedBlock",".widget-feedburner-counter",'[title="Subscribe to our blog"]'],fanboyAntiFacebook:[".util-bar-module-firefly-visible"],fanboyEnhancedTrackers:[".open.pushModal","#issuem-leaky-paywall-articles-zero-remaining-nag","#sovrn_container",'div[class$="-hide"][zoompage-fontsize][style="display: block;"]',".BlockNag__Card"],fanboySocial:[".td-tags-and-social-wrapper-box",".twitterContainer",".youtube-social",'a[title^="Like us on Facebook"]','img[alt^="Share on Digg"]'],frellwitSwedish:[i("YVtocmVmKj0iY2FzaW5vcHJvLnNlIl1bdGFyZ2V0PSJfYmxhbmsiXQ=="),i("YVtocmVmKj0iZG9rdG9yLXNlLm9uZWxpbmsubWUiXQ=="),"article.category-samarbete",i("ZGl2LmhvbGlkQWRz"),"ul.adsmodern"],greekAdBlock:[i("QVtocmVmKj0iYWRtYW4ub3RlbmV0LmdyL2NsaWNrPyJd"),i("QVtocmVmKj0iaHR0cDovL2F4aWFiYW5uZXJzLmV4b2R1cy5nci8iXQ=="),i("QVtocmVmKj0iaHR0cDovL2ludGVyYWN0aXZlLmZvcnRobmV0LmdyL2NsaWNrPyJd"),"DIV.agores300","TABLE.advright"],hungarian:["#cemp_doboz",".optimonk-iframe-container",i("LmFkX19tYWlu"),i("W2NsYXNzKj0iR29vZ2xlQWRzIl0="),"#hirdetesek_box"],iDontCareAboutCookies:['.alert-info[data-block-track*="CookieNotice"]',".ModuleTemplateCookieIndicator",".o--cookies--container",".cookie-msg-info-container","#cookies-policy-sticky"],icelandicAbp:[i("QVtocmVmXj0iL2ZyYW1ld29yay9yZXNvdXJjZXMvZm9ybXMvYWRzLmFzcHgiXQ==")],latvian:[i("YVtocmVmPSJodHRwOi8vd3d3LnNhbGlkemluaS5sdi8iXVtzdHlsZT0iZGlzcGxheTogYmxvY2s7IHdpZHRoOiAxMjBweDsgaGVpZ2h0OiA0MHB4OyBvdmVyZmxvdzogaGlkZGVuOyBwb3NpdGlvbjogcmVsYXRpdmU7Il0="),i("YVtocmVmPSJodHRwOi8vd3d3LnNhbGlkemluaS5sdi8iXVtzdHlsZT0iZGlzcGxheTogYmxvY2s7IHdpZHRoOiA4OHB4OyBoZWlnaHQ6IDMxcHg7IG92ZXJmbG93OiBoaWRkZW47IHBvc2l0aW9uOiByZWxhdGl2ZTsiXQ==")],listKr:[i("YVtocmVmKj0iLy9hZC5wbGFuYnBsdXMuY28ua3IvIl0="),i("I2xpdmVyZUFkV3JhcHBlcg=="),i("YVtocmVmKj0iLy9hZHYuaW1hZHJlcC5jby5rci8iXQ=="),i("aW5zLmZhc3R2aWV3LWFk"),".revenue_unit_item.dable"],listeAr:[i("LmdlbWluaUxCMUFk"),".right-and-left-sponsers",i("YVtocmVmKj0iLmFmbGFtLmluZm8iXQ=="),i("YVtocmVmKj0iYm9vcmFxLm9yZyJd"),i("YVtocmVmKj0iZHViaXp6bGUuY29tL2FyLz91dG1fc291cmNlPSJd")],listeFr:[i("YVtocmVmXj0iaHR0cDovL3Byb21vLnZhZG9yLmNvbS8iXQ=="),i("I2FkY29udGFpbmVyX3JlY2hlcmNoZQ=="),i("YVtocmVmKj0id2Vib3JhbWEuZnIvZmNnaS1iaW4vIl0="),".site-pub-interstitiel",'div[id^="crt-"][data-criteo-id]'],officialPolish:["#ceneo-placeholder-ceneo-12",i("W2hyZWZePSJodHRwczovL2FmZi5zZW5kaHViLnBsLyJd"),i("YVtocmVmXj0iaHR0cDovL2Fkdm1hbmFnZXIudGVjaGZ1bi5wbC9yZWRpcmVjdC8iXQ=="),i("YVtocmVmXj0iaHR0cDovL3d3dy50cml6ZXIucGwvP3V0bV9zb3VyY2UiXQ=="),i("ZGl2I3NrYXBpZWNfYWQ=")],ro:[i("YVtocmVmXj0iLy9hZmZ0cmsuYWx0ZXgucm8vQ291bnRlci9DbGljayJd"),'a[href^="/magazin/"]',i("YVtocmVmXj0iaHR0cHM6Ly9ibGFja2ZyaWRheXNhbGVzLnJvL3Ryay9zaG9wLyJd"),i("YVtocmVmXj0iaHR0cHM6Ly9ldmVudC4ycGVyZm9ybWFudC5jb20vZXZlbnRzL2NsaWNrIl0="),i("YVtocmVmXj0iaHR0cHM6Ly9sLnByb2ZpdHNoYXJlLnJvLyJd")],ruAd:[i("YVtocmVmKj0iLy9mZWJyYXJlLnJ1LyJd"),i("YVtocmVmKj0iLy91dGltZy5ydS8iXQ=="),i("YVtocmVmKj0iOi8vY2hpa2lkaWtpLnJ1Il0="),"#pgeldiz",".yandex-rtb-block"],thaiAds:["a[href*=macau-uta-popup]",i("I2Fkcy1nb29nbGUtbWlkZGxlX3JlY3RhbmdsZS1ncm91cA=="),i("LmFkczMwMHM="),".bumq",".img-kosana"],webAnnoyancesUltralist:["#mod-social-share-2","#social-tools",i("LmN0cGwtZnVsbGJhbm5lcg=="),".zergnet-recommend",".yt.btn-link.btn-md.btn"]},r=Object.keys(n),[4,yr((s=[]).concat.apply(s,r.map(function(u){return n[u]})))]):[2,void 0];case 1:return o=c.sent(),t&&(function(u,l){for(var f="DOM blockers debug:\n```",m=0,v=Object.keys(u);m<v.length;m++){const E=v[m];f+=`
|
|
2
|
+
`.concat(E,":");for(let b=0,h=u[E];b<h.length;b++){const I=h[b];f+=`
|
|
3
|
+
`.concat(l[I]?"🚫":"➡️"," ").concat(I)}}console.log("".concat(f,"\n```"))})(n,o),(a=r.filter(function(u){const l=n[u];return D(l.map(function(f){return o[f]}))>.6*l.length})).sort(),[2,a]}let i})})},fontPreferences:function(){return(function(e,t){return t===void 0&&(t=4e3),gt(function(n,r){const o=r.document,a=o.body,s=a.style;s.width="".concat(t,"px"),s.webkitTextSizeAdjust=s.textSizeAdjust="none",Je()?a.style.zoom="".concat(1/r.devicePixelRatio):he()&&(a.style.zoom="reset");const c=o.createElement("div");return c.textContent=ie([],Array(t/20<<0),!0).map(function(){return"word"}).join(" "),a.appendChild(c),e(o,a)})})(function(e,t){for(var n={},r={},o=0,a=Object.keys(He);o<a.length;o++){var s=a[o],c=He[s],i=c[0],u=i===void 0?{}:i,l=c[1],f=l===void 0?"mmMwWLliI0fiflO&1":l,m=e.createElement("span");m.textContent=f,m.style.whiteSpace="nowrap";for(let v=0,E=Object.keys(u);v<E.length;v++){const b=E[v],h=u[b];h!==void 0&&(m.style[b]=h)}n[s]=m,t.appendChild(e.createElement("br")),t.appendChild(m)}for(let v=0,E=Object.keys(He);v<E.length;v++)r[s=E[v]]=n[s].getBoundingClientRect().width;return r})},audio:function(){const e=window,t=e.OfflineAudioContext||e.webkitOfflineAudioContext;if(!t)return-2;if(he()&&!qe()&&!(function(){const u=window;return D(["DOMRectList"in u,"RTCPeerConnectionIceEvent"in u,"SVGGeometryElement"in u,"ontransitioncancel"in u])>=3})())return-1;const n=new t(1,5e3,44100),r=n.createOscillator();r.type="triangle",r.frequency.value=1e4;const o=n.createDynamicsCompressor();o.threshold.value=-50,o.knee.value=40,o.ratio.value=12,o.attack.value=0,o.release.value=.25,r.connect(o),o.connect(n.destination),r.start(0);const a=(function(u){let l=3,f=500,m=500,v=5e3,E=function(){};return[new Promise(function(b,h){let I=!1,P=0,U=0;u.oncomplete=function(Y){return b(Y.renderedBuffer)};const J=function(){setTimeout(function(){return h(vt("timeout"))},Math.min(m,U+v-Date.now()))},be=function(){try{const Y=u.startRendering();switch(Ft(Y)&&Ie(Y),u.state){case"running":U=Date.now(),I&&J();break;case"suspended":document.hidden||P++,I&&P>=l?h(vt("suspended")):setTimeout(be,f)}}catch(Y){h(Y)}};be(),E=function(){I||(I=!0,U>0&&J())}}),E]})(n),s=a[0],c=a[1],i=s.then(function(u){return(function(l){for(var f=0,m=0;m<l.length;++m)f+=Math.abs(l[m]);return f})(u.getChannelData(0).subarray(4500))},function(u){if(u.name==="timeout"||u.name==="suspended")return-3;throw u});return Ie(i),function(){return c(),i}},screenFrame:function(){const e=this,t=br();return function(){return Z(e,void 0,void 0,function(){let n,r;return X(this,function(o){switch(o.label){case 0:return[4,t()];case 1:return n=o.sent(),[2,[(r=function(a){return a===null?null:_t(a,10)})(n[0]),r(n[1]),r(n[2]),r(n[3])]]}})})}},osCpu:function(){return navigator.oscpu},languages:function(){let e,t=navigator,n=[],r=t.language||t.userLanguage||t.browserLanguage||t.systemLanguage;if(r!==void 0&&n.push([r]),Array.isArray(t.languages))Je()&&D([!("MediaSettingsRange"in(e=window)),"RTCEncodedAudioFrame"in e,""+e.Intl=="[object Intl]",""+e.Reflect=="[object Reflect]"])>=3||n.push(t.languages);else if(typeof t.languages=="string"){const o=t.languages;o&&n.push(o.split(","))}return n},colorDepth:function(){return window.screen.colorDepth},deviceMemory:function(){return W(H(navigator.deviceMemory),void 0)},screenResolution:function(){const e=screen,t=function(r){return W(Ne(r),null)},n=[t(e.width),t(e.height)];return n.sort().reverse(),n},hardwareConcurrency:function(){return W(Ne(navigator.hardwareConcurrency),void 0)},timezone:function(){let e,t=(e=window.Intl)===null||e===void 0?void 0:e.DateTimeFormat;if(t){const o=new t().resolvedOptions().timeZone;if(o)return o}let n,r=(n=new Date().getFullYear(),-Math.max(H(new Date(n,0,1).getTimezoneOffset()),H(new Date(n,6,1).getTimezoneOffset())));return"UTC".concat(r>=0?"+":"").concat(Math.abs(r))},sessionStorage:function(){try{return!!window.sessionStorage}catch{return!0}},localStorage:function(){try{return!!window.localStorage}catch{return!0}},indexedDB:function(){if(!Vt()&&!hr())try{return!!window.indexedDB}catch{return!0}},openDatabase:function(){return!!window.openDatabase},cpuClass:function(){return navigator.cpuClass},platform:function(){const e=navigator.platform;return e==="MacIntel"&&he()&&!qe()?(function(){if(navigator.platform==="iPad")return!0;const t=screen,n=t.width/t.height;return D(["MediaSource"in window,!!Element.prototype.webkitRequestFullscreen,n>.65&&n<1.53])>=2})()?"iPad":"iPhone":e},plugins:function(){const e=navigator.plugins;if(e){for(var t=[],n=0;n<e.length;++n){const a=e[n];if(a){for(var r=[],o=0;o<a.length;++o){const s=a[o];r.push({type:s.type,suffixes:s.suffixes})}t.push({name:a.name,description:a.description,mimeTypes:r})}}return t}},canvas:function(){let e,t,n=!1,r=(function(){const s=document.createElement("canvas");return s.width=1,s.height=1,[s,s.getContext("2d")]})(),o=r[0],a=r[1];if((function(s,c){return!(!c||!s.toDataURL)})(o,a)){n=(function(c){return c.rect(0,0,10,10),c.rect(2,2,6,6),!c.isPointInPath(5,5,"evenodd")})(a),(function(c,i){c.width=240,c.height=60,i.textBaseline="alphabetic",i.fillStyle="#f60",i.fillRect(100,1,62,20),i.fillStyle="#069",i.font='11pt "Times New Roman"';const u="Cwm fjordbank gly ".concat("😃");i.fillText(u,2,15),i.fillStyle="rgba(102, 204, 0, 0.2)",i.font="18pt Arial",i.fillText(u,4,45)})(o,a);const s=Me(o);s!==Me(o)?e=t="unstable":(t=s,(function(c,i){c.width=122,c.height=110,i.globalCompositeOperation="multiply";for(let u=0,l=[["#f2f",40,40],["#2ff",80,40],["#ff2",60,80]];u<l.length;u++){const f=l[u],m=f[0],v=f[1],E=f[2];i.fillStyle=m,i.beginPath(),i.arc(v,E,40,0,2*Math.PI,!0),i.closePath(),i.fill()}i.fillStyle="#f9c",i.arc(60,60,60,0,2*Math.PI,!0),i.arc(60,60,20,0,2*Math.PI,!0),i.fill("evenodd")})(o,a),e=Me(o))}else e=t="";return{winding:n,geometry:e,text:t}},touchSupport:function(){let e,t=navigator,n=0;t.maxTouchPoints!==void 0?n=Ne(t.maxTouchPoints):t.msMaxTouchPoints!==void 0&&(n=t.msMaxTouchPoints);try{document.createEvent("TouchEvent"),e=!0}catch{e=!1}return{maxTouchPoints:n,touchEvent:e,touchStart:"ontouchstart"in window}},vendor:function(){return navigator.vendor||""},vendorFlavors:function(){for(var e=[],t=0,n=["chrome","safari","__crWeb","__gCrWeb","yandex","__yb","__ybro","__firefox__","__edgeTrackingPreventionStatistics","webkit","oprt","samsungAr","ucweb","UCShellJava","puffinDevice"];t<n.length;t++){const r=n[t],o=window[r];o&&typeof o=="object"&&e.push(r)}return e.sort()},cookiesEnabled:function(){const e=document;try{e.cookie="cookietest=1; SameSite=Strict;";const t=e.cookie.indexOf("cookietest=")!==-1;return e.cookie="cookietest=1; SameSite=Strict; expires=Thu, 01-Jan-1970 00:00:01 GMT",t}catch{return!1}},colorGamut:function(){for(let e=0,t=["rec2020","p3","srgb"];e<t.length;e++){const n=t[e];if(matchMedia("(color-gamut: ".concat(n,")")).matches)return n}},invertedColors:function(){return!!Et("inverted")||!Et("none")&&void 0},forcedColors:function(){return!!St("active")||!St("none")&&void 0},monochrome:function(){if(matchMedia("(min-monochrome: 0)").matches){for(let e=0;e<=100;++e)if(matchMedia("(max-monochrome: ".concat(e,")")).matches)return e;throw new Error("Too high value")}},contrast:function(){return oe("no-preference")?0:oe("high")||oe("more")?1:oe("low")||oe("less")?-1:oe("forced")?10:void 0},reducedMotion:function(){return!!Lt("reduce")||!Lt("no-preference")&&void 0},hdr:function(){return!!wt("high")||!wt("standard")&&void 0},math:function(){let e,t=S.acos||x,n=S.acosh||x,r=S.asin||x,o=S.asinh||x,a=S.atanh||x,s=S.atan||x,c=S.sin||x,i=S.sinh||x,u=S.cos||x,l=S.cosh||x,f=S.tan||x,m=S.tanh||x,v=S.exp||x,E=S.expm1||x,b=S.log1p||x;return{acos:t(.12312423423423424),acosh:n(1e308),acoshPf:(e=1e154,S.log(e+S.sqrt(e*e-1))),asin:r(.12312423423423424),asinh:o(1),asinhPf:(function(h){return S.log(h+S.sqrt(h*h+1))})(1),atanh:a(.5),atanhPf:(function(h){return S.log((1+h)/(1-h))/2})(.5),atan:s(.5),sin:c(-1e300),sinh:i(1),sinhPf:(function(h){return S.exp(h)-1/S.exp(h)/2})(1),cos:u(10.000000000123),cosh:l(1),coshPf:(function(h){return(S.exp(h)+1/S.exp(h))/2})(1),tan:f(-1e300),tanh:m(1),tanhPf:(function(h){return(S.exp(2*h)-1)/(S.exp(2*h)+1)})(1),exp:v(1),expm1:E(1),expm1Pf:(function(h){return S.exp(h)-1})(1),log1p:b(10),log1pPf:(function(h){return S.log(1+h)})(10),powPI:(function(h){return S.pow(S.PI,h)})(-100)}},videoCard:function(){let e,t=document.createElement("canvas"),n=(e=t.getContext("webgl"))!==null&&e!==void 0?e:t.getContext("experimental-webgl");if(n&&"getExtension"in n){const r=n.getExtension("WEBGL_debug_renderer_info");if(r)return{vendor:(n.getParameter(r.UNMASKED_VENDOR_WEBGL)||"").toString(),renderer:(n.getParameter(r.UNMASKED_RENDERER_WEBGL)||"").toString()}}},pdfViewerEnabled:function(){return navigator.pdfViewerEnabled},architecture:function(){const e=new Float32Array(1),t=new Uint8Array(e.buffer);return e[0]=1/0,e[0]=e[0]-e[0],t[3]}};function Sr(e){const t=(function(r){if(Ht())return .4;if(he())return qe()?.5:.3;const o=r.platform.value||"";return/^Win/.test(o)?.6:/^Mac/.test(o)?.5:.7})(e),n=(function(r){return _t(.99+.01*r,1e-4)})(t);return{score:t,comment:"$ if upgrade to Pro: https://fpjs.dev/pro".replace(/\$/g,"".concat(n))}}function Lr(e){return JSON.stringify(e,function(t,n){return n instanceof Error?ze({name:(ie=n).name,message:ie.message,stack:(B=ie.stack)===null||B===void 0?void 0:B.split(`
|
|
4
|
+
`)},ie):n},2)}function wr(e){return lr((function(t){for(var n="",r=0,o=Object.keys(t).sort();r<o.length;r++){const a=o[r],s=t[a],c=s.error?"error":JSON.stringify(s.value);n+="".concat(n?"|":"").concat(a.replace(/([:|\\])/g,"\\$1"),":").concat(c)}return n})(e))}function Rr(e){return e===void 0&&(e=50),(function(t,n){n===void 0&&(n=1/0);const r=window.requestIdleCallback;return r?new Promise(function(o){return r.call(window,function(){return o()},{timeout:n})}):B(Math.min(t,n))})(e,2*e)}function Ar(e,t){const n=Date.now();return{get:function(r){return Z(this,void 0,void 0,function(){let o,a,s;return X(this,function(c){switch(c.label){case 0:return o=Date.now(),[4,e()];case 1:return a=c.sent(),s=(function(i){let u;return{get visitorId(){return u===void 0&&(u=wr(this.components)),u},set visitorId(l){u=l},confidence:Sr(i),components:i,version:"3.4.1"}})(a),(t||r?.debug)&&console.log("Copy the text below to get the debug data:\n\n```\nversion: ".concat(s.version,`
|
|
5
|
+
userAgent: `).concat(navigator.userAgent,`
|
|
6
|
+
timeBetweenLoadAndGet: `).concat(o-n,`
|
|
7
|
+
visitorId: `).concat(s.visitorId,`
|
|
8
|
+
components: `).concat(Lr(a),"\n```")),[2,s]}})})}}}function Ir(e){const t=e===void 0?{}:e,n=t.delayFallback,r=t.debug;return t.monitoring,Z(this,void 0,void 0,function(){return X(this,function(o){switch(o.label){case 0:return[4,Rr(n)];case 1:return o.sent(),[2,Ar(fr(Er,{debug:r},[]),r)]}})})}function nt(){const e=tt(Ye)||`s_${We()}`,t=new Date(w()+jn);return document.cookie=`${Ye}=${e};path=/;max-age=1800;expires=${t.toUTCString()}`,e}function Tr(){return tt(Ye)||nt()}nt();function kr(e){return Dt.test(e)}function Cr(e){return Ut.test(e)}const Dt=/((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])/,Ut=/((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))/,Or=[Ut,Dt];function Pr(e){let t,n=window.RTCPeerConnection||window.mozRTCPeerConnection||window.webkitRTCPeerConnection;function r(){(t=new n({iceServers:[{urls:"stun:stun.l.google.com:19302"}]})).onicecandidate=s=>a(s),t.createDataChannel("fake_data_channel")}function o(){return t.createOffer().then(s=>t.setLocalDescription(s))}function a(s){s&&s.candidate&&s.candidate.candidate&&e(s&&s.candidate&&s.candidate.candidate)}return{start:function(){r(),o()},stop:function(){if(t)try{t.close()}finally{t.onicecandidate=()=>{},t=null}},createConnection:r,createStunRequest:o,handleCandidates:a}}function $e(e){if(e&&e<100)throw new Error("Custom timeout cannot be under 100 milliseconds.");const t=[],n=Pr(function(o){const a=[];for(const s of Or){const c=[],i=s.exec(o);if(i){for(let u=0;u<i.length;u++)(kr(i[u])||Cr(i[u]))&&c.push(i[u]);a.push(c)}}(function(s){t.includes(s)||t.push(r(s.flat(1/0)))})(a.flat(1/0))});function r(o){return Array.from(new Set(o))}return new Promise(function(o,a){n.start(),setTimeout(()=>{t&&t!==[]?o(r(t.flat(1/0))):a("No IP addresses were found."),n.stop()},e||500)})}function rt(e){return new Promise(function(t,n){const r=[];$e(e).then(o=>{o.forEach(a=>{a.match(/^(192\.168\.|169\.254\.|10\.|172\.(1[6-9]|2\d|3[01]))/)?r.push({ip:a,type:"private",IPv4:!0}):a.match(/((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))/)?r.push({ip:a,type:"IPv6",IPv4:!1}):r.push({ip:a,type:"public",IPv4:!0})}),t(r)}).catch(n)})}function xr(e){return rt(e).then(t=>{const n=t.filter(r=>r.IPv4);for(let r=0;r<n.length;r++)n[r]=n[r].ip;return n||""})}function Nr(e){return rt(e).then(t=>{const n=t.filter(r=>r.type==="IPv6");for(let r=0;r<n.length;r++)n[r]=n[r].ip;return n?n.ip:""})}function Xt(e){return Object.assign($e(e),{types:rt,public:$e,IPv4:xr,IPv6:Nr})}class Qe{static maxSize=.01*1024*1e3;static getItem(t){const n=localStorage.getItem(t);return n?JSON.parse(n):null}static setItem(t,n){localStorage.setItem(t,JSON.stringify(n))}static removeItem(t){localStorage.removeItem(t)}static getSize(){let t=0;for(let n=0;n<localStorage.length;n++){const r=localStorage.key(n);if(r){const o=localStorage.getItem(r);o&&(t+=this.getBytes(o))}}return t}static setSendDataItem(t,n){if(this.getSize()>=this.maxSize)return!1;const r=this.getItem(t)||{baseInfo:{},eventInfo:[]},o={baseInfo:Ae(r.baseInfo,n.baseInfo),eventInfo:r.eventInfo.concat(n.eventInfo)};return this.setItem(t,o),!0}static getBytes(t){return new Blob([t]).size}}class Mr{events=[];timeoutID;isServerAvailable=!0;retryTimer;send(){if(!this.events.length||!this.isServerAvailable)return;const t=this.events.slice(0,exports._options.value.cacheMaxLength);this.events=this.events.slice(exports._options.value.cacheMaxLength);const n=w(),r=ke.computed(()=>({baseInfo:{...ue.base?.value,sendTime:n,userUuid:exports._options.value.userUuid},eventInfo:Mt(t,s=>(s.sendTime=n,s))})),o=exports._options.value.transformSendParams?exports._options.value.transformSendParams(r.value):null;if(exports._options.value.localization){Qe.setSendDataItem(Ge,r.value)||exports._options.value.localizationOverFlow(r.value);return}const a=ye(exports._options.value.beforeSendData,!1,o??r.value);Oe(a)||this.validateObject(a,"beforeSendData")&&(ae("send events",a),this.executeSend(exports._options.value.dsn,a).then(s=>{s.success===!1?this.handleServerError():(this.isServerAvailable=!0,ye(exports._options.value.afterSendData,!0,{...s,params:a}))}),this.events.length&&_n(this.send.bind(this)))}handleServerError(){if(this.isServerAvailable=!1,this.retryTimer&&clearTimeout(this.retryTimer),exports._options.value.checkRecoverInterval===-1)return;const t=(exports._options.value.checkRecoverInterval??1)*60*1e3;this.retryTimer=setTimeout(()=>{this.testServerAvailable()},t)}testServerAvailable(){st(exports._options.value.dsn,{ping:1},exports._options.value.timeout).then(()=>{this.isServerAvailable=!0,this.retryTimer&&clearTimeout(this.retryTimer),this.events.length&&this.send()}).catch(()=>{this.handleServerError()})}sendLocal(t){const n=exports._options.value.transformSendParams?exports._options.value.transformSendParams(t):null,r=ye(exports._options.value.beforeSendData,!1,n??t);Oe(r)||this.validateObject(r,"beforeSendData")&&(ae("send events",r),this.executeSend(exports._options.value.dsn,r))}emit(t,n=!1){if(!t||!C.lineStatus.onLine||!n&&!Cn(exports._options.value.tracesSampleRate))return;Ce(t)||(t=[t]);const r=exports._options.value.maxQueueLength??200;if(!this.isServerAvailable&&this.events.length>=r){this.events=this.events.slice(this.events.length-r+t.length).concat(t);return}const o=ye(exports._options.value.beforePushEventList,!1,t);Oe(o)||this.validateObject(o,"beforePushEventList")&&(this.events=this.events.concat(o),nt(),this.timeoutID&&clearTimeout(this.timeoutID),ue._initSuccess&&(this.events.length>=exports._options.value.cacheMaxLength||n?this.send():this.timeoutID=setTimeout(this.send.bind(this),exports._options.value.cacheWatingTime)))}executeSend(t,n){let r=1;return exports._options.value.sendTypeByXmlBody?r=3:p.navigator?r=ct(n,60)?3:1:r=ct(n,2)?3:2,new Promise(o=>{switch(r){case 1:o({sendType:"sendBeacon",success:Pn(t,n)});break;case 2:xn(t,n).then(()=>{o({sendType:"image",success:!0})}).catch(()=>{o({sendType:"image",success:!1})});break;case 3:st(t,n,exports._options.value.timeout).then(()=>{o({sendType:"xml",success:!0})}).catch(()=>{o({sendType:"xml",success:!1})});break}})}validateObject(t,n){return t===!1?!1:t?["object","array"].includes(ce(t))?!0:(K(`TypeError: ${n}期望返回 {} 或者 [] 类型,目前是${ce(t)}类型`),!1):(K(`NullError: ${n}期望返回 {} 或者 [] 类型,目前无返回值`),!1)}destroy(){this.timeoutID&&clearTimeout(this.timeoutID),this.retryTimer&&clearTimeout(this.retryTimer),this.events=[],this.isServerAvailable=!0}}let T;function Fr(){C.sendData=new Mr,T=C.sendData}class _r{base;pageId;sdkUserUuid="";device;_initSuccess=!1;constructor(){this.pageId=We(),this.initSdkUserUuid().then(()=>{this.initDevice(),this.initBase()}).finally(()=>{this._initSuccess=!0,T.emit([])})}initDevice(){const{screen:t}=xt(),{clientWidth:n,clientHeight:r}=document.documentElement,{width:o,height:a,colorDepth:s,pixelDepth:c}=t;let i=tt(dt);i||(i=`t_${We()}`,document.cookie=`${dt}=${i};path=/;`),this.device={clientHeight:r,clientWidth:n,colorDepth:s,pixelDepth:c,deviceId:i,screenWidth:o,screenHeight:a,vendor:navigator.vendor,platform:navigator.platform}}initBase(){const t=Tr();let n="";this.base=ke.computed(()=>({...this.device,userUuid:exports._options.value.userUuid,sdkUserUuid:this.sdkUserUuid,ext:exports._options.value.ext,appName:exports._options.value.appName,appCode:exports._options.value.appCode,pageId:this.pageId,sessionId:t,sdkVersion:Wn,ip:n})),!je&&Xt().then(r=>{this.base.value.ip=r[0],n=r[0]})}initSdkUserUuid(){return je?Promise.resolve().then(()=>{this.sdkUserUuid="unit-test-id",exports._options.value.sdkUserUuid="unit-test-id"}):Ir({}).then(t=>t.get()).then(t=>{const n=t.visitorId;this.sdkUserUuid=n,exports._options.value.sdkUserUuid=n})}}let ue;function Vr(){ue=new _r,C.baseInfo=ue}class Hr{onLine=!0;constructor(){this.init()}init(){g.addEvent({type:d.OFFLINE,callback:t=>{t.type==="offline"&&(ae("网络断开"),this.onLine=!1)}}),g.addEvent({type:d.ONLINE,callback:t=>{t.type==="online"&&(ae("网络连接"),this.onLine=!0)}})}}function Dr(){C.lineStatus=new Hr,C.lineStatus}const Ur=5e3,Xr=3;let q;class Rt{eventList=[{scope:`${w()}-`,eventList:[]}];closeCallback;constructor(){this.init()}init(){this.closeCallback=gn.record({emit:(t,n)=>{const r=this.eventList[this.eventList.length-1];r.eventList.push(t),n&&(this.eventList.length>0&&(this.eventList[this.eventList.length-1].scope=r.scope+w()),this.eventList.length>Xr&&this.eventList.shift(),this.eventList.push({scope:`${w()}-`,eventList:[]}))},recordCanvas:!0,checkoutEveryNms:Ur})}close(){this.closeCallback?.(),this.closeCallback=void 0}}function jr(){ke.watch(exports._options,(e,t)=>{e.recordScreen!==t.recordScreen&&(e.recordScreen?q=new Rt:(q?.close(),q=void 0))}),q=exports._options.value.recordScreen?new Rt:void 0}function Wr(){return q?.eventList??[]}function Br(e){if(!e)return e;const t=typeof e!="string"&&typeof e!="number"?JSON.stringify(e):e,n=Re.Base64.encode(t),r=Pt.gzip(n),o=Array.from(r);let a="";return o.forEach(s=>{a+=String.fromCharCode(s)}),Re.Base64.btoa(a)}function Zr(e){const n=Re.Base64.atob(e).split("").map(function(l){return l.charCodeAt(0)}),r=new Uint8Array(n),o=Pt.ungzip(r);let a="";const s=8*1024;let c;for(c=0;c<o.length/s;c++)a+=String.fromCharCode.apply(null,o.slice(c*s,(c+1)*s));a+=String.fromCharCode.apply(null,o.slice(c*s));const i=Re.Base64.decode(a);let u="";try{u=JSON.parse(i)}catch(l){/Unexpected token o in JSON at position 0/.test(l)&&(u=i)}return u}function Yr(){q?.close(),q=void 0}const Gr=2e3,zr=2e4,Se=5,De=["errMessage","eventId","requestUrl"];class Jr{cacheErrorA;cacheErrorB;throttleProxyAddCacheErrorA;throttleProxyAddCacheErrorB;constructor(){this.cacheErrorA=[],this.cacheErrorB=[],this.throttleProxyAddCacheErrorA=kn(this.proxyAddCacheErrorA,Gr),this.throttleProxyAddCacheErrorB=Nt(this.proxyAddCacheErrorB,zr)}proxyAddCacheErrorA(){let t=this.cacheErrorA.length;if(!t)return;const n=Pe(this.cacheErrorA,...De),r=n.filter(a=>a.length<Se),o=n.filter(a=>a.length>=Se);if(r.length&&T.emit(r.flat(1/0)),o.length){const a=[];o.forEach(s=>{const c=s[0];c.batchError=!0,c.batchErrorLength=s.length,c.batchErrorLastHappenTime=s[s.length-1].triggerTime,a.push(c)}),this.cacheErrorB.push(...a),this.throttleProxyAddCacheErrorB()}for(;t--;)this.cacheErrorA.shift()}proxyAddCacheErrorB(){let t=this.cacheErrorB.length;if(!t)return;const n=Pe(this.cacheErrorB,...De);for(;t--;)this.cacheErrorB.shift();const r=[];n.forEach(o=>{const a=o[0];o.length>1&&(a.batchErrorLength=o.reduce((s,c)=>s+=c.batchErrorLength,0),a.batchErrorLastHappenTime=o[o.length-1].triggerTime),r.push(a)}),T.emit(r)}sendAllCacheError(){const t=this.cacheErrorA.concat(this.cacheErrorB),n=Pe(t,...De),r=n.filter(a=>a.length<Se),o=n.filter(a=>a.length>=Se);if(r.length&&T.emit(r.flat(1/0),!0),o.length){const a=[];o.forEach(s=>{const c=s[0];c.batchError=!0,c.batchErrorLength=s.length,c.batchErrorLastHappenTime=s[s.length-1].triggerTime,a.push(c)}),T.emit(a,!0)}}pushCacheErrorA(t){this.cacheErrorA.push(t),this.throttleProxyAddCacheErrorA(),this.cacheErrorA.length>=50&&(this.proxyAddCacheErrorA(),this.proxyAddCacheErrorB())}}let ot;function qr(){ot=new Jr}function $r(e){return e.map(n=>{if(n===null)return"null";if(n===void 0)return"undefined";if(typeof n=="string")return n;if(typeof n=="number"||typeof n=="boolean")return String(n);if(typeof n=="function")return`[Function: ${n.name||"anonymous"}]`;if(n instanceof Error)return`${n.name}: ${n.message}${n.stack?`
|
|
9
|
+
`+n.stack:""}`;if(typeof n=="object")try{return JSON.stringify(n,null,2)}catch{return n.toString()}return String(n)}).join(" | ")}function At(e){const{stack:t="",message:n=""}=e,r={eventId:k.CODE,errMessage:n,errStack:t};if(t){const o=/^\s*at\s*([^(]+)\s*\((.+?):(\d+):(\d+)\)$/,a=/^\s*([^@]*)@(.+?):(\d+):(\d+)$/,s=t.replace(new RegExp(`^[\\w\\s:]*${n}
|
|
10
|
+
`),""),i=Mt(Fn(s.split(`
|
|
11
|
+
`),u=>u),u=>{const l=u.match(o);if(l)return{triggerPageUrl:l[2],line:l[3],col:l[4]};const f=u.match(a);return f?{triggerPageUrl:f[2],line:f[3],col:f[4]}:{}})[0]||{};return{...r,...i}}return r}function Te(e){if(e instanceof Error){const{message:t,stack:n,lineNumber:r,fileName:o,columnNumber:a}=e;return o?{errMessage:t,errStack:n,eventId:k.CODE,line:r,col:a,triggerPageUrl:o}:At(e)}return e.message?At(e):typeof e=="string"?{eventId:k.REJECT,errMessage:e}:Ce(e)?{eventId:k.CONSOLEERROR,errMessage:$r(e)}:{}}function Qr(e){return e&&e.reason!==void 0}function It(e){if(Qr(e))return{eventId:k.CODE,...Te(e.reason)};const{target:t}=e;if(t instanceof HTMLElement&&t.nodeType===1){const n={initiatorType:t.nodeName.toLowerCase(),eventId:k.RESOURCE,requestUrl:""};switch(t.nodeName.toLowerCase()){case"link":n.requestUrl=t.href;break;default:n.requestUrl=t.currentSrc||t.src}return n}if(e.error){const n=e.error;return n.fileName=n.filename||e.filename,n.columnNumber=n.colno||e.colno,n.lineNumber=n.lineno||e.lineno,{eventId:k.CODE,...Te(n)}}return{eventId:k.CODE,line:p.event.errorLine,col:p.event.errorCharacter,errMessage:p.event.errorMessage,triggerPageUrl:p.event.errorUrl}}function Ue(e){if(!exports._options.value.ignoreErrors.length)return!1;let t=e.errMessage||e.message;return t?(t=String(t),exports._options.value.ignoreErrors.some(n=>et(n)?n.test(t)?(ae(`ignoreErrors拦截成功 - 截条件:${n} 错误信息:${t}`),!0):!1:t===n?(ae(`ignoreErrors拦截成功 - 截条件:${n} 错误信息:${t}`),!0):!1)):!1}function Kr(){return JSON.parse(JSON.stringify(Wr())).slice(-2).map(t=>t.eventList).flat()}function we(e,t=!1){const n={...e,eventType:M.ERROR,recordscreen:exports._options.value.recordScreen?Br(Kr()):null,triggerPageUrl:N(),triggerTime:w()};exports._options.value.scopeError?ot.pushCacheErrorA(n):T.emit(n,t)}function eo(){exports._options.value.error.core&&(exports._options.value.scopeError&&(qr(),g.addEvent({type:d.BEFOREUNLOAD,callback:()=>{ot.sendAllCacheError()}})),g.addEvent({type:d.ERROR,callback:e=>{const t=It(e);Ue(t)||we(t)}}),g.addEvent({type:d.UNHANDLEDREJECTION,callback:e=>{const t=It(e);Ue(t)||we(t)}}),g.addEvent({type:d.CONSOLEERROR,callback:e=>{const t=Te(e);Ue(t)||we({eventId:k.CODE,...t})}}))}function it(e={},t=!1){we(e,t)}function to(){g.removeEvents([d.ERROR,d.UNHANDLEDREJECTION,d.CONSOLEERROR])}function Xe(e,t){return e.find(n=>n.hasAttribute&&n.hasAttribute(t))}function Tt(e){if(e.length>0){const t=["em","b","strong","span","img","i","code"];return e.filter(({tagName:r})=>t.indexOf(r.toLowerCase())>=0).length===e.length}return!0}function jt(e,t=""){if(!e)return t;const n=e.parentElement,{id:r}=e,o=e.tagName.toLowerCase(),a=t?`>${t}`:"";return!n||n===document.documentElement||n===document.body?`${o}${a}`:r?`#${r}${a}`:jt(n,`${o}${a}`)}class no{eventId="";eventType="";title="";triggerPageUrl="";x=-1;y=-1;params={};elementPath="";triggerTime=-1;constructor(t={}){Object.keys(t).forEach(n=>{de(n,t)&&(this[n]=t[n]||null)})}}function ro(){g.addEvent({type:d.CLICK,callback:e=>{const t=new no({eventType:M.CLICK}),n=e.composedPath()?e.composedPath():e.target?oo(e.target):[],r=n.find(i=>i.hasAttribute&&(i.hasAttribute("data-warden-container")||i.hasAttribute("data-warden-event-id")||i.hasAttribute("data-warden-title")));if(!r)return;const{scrollTop:o,scrollLeft:a}=document.documentElement,{top:s,left:c}=e.target.getBoundingClientRect();t.x=c+a,t.y=s+o,t.triggerTime=w(),t.triggerPageUrl=N(),t.title=io(r),t.eventId=co(n),t.params=uo(n),t.elementPath=jt(r).slice(-128),T.emit(t)}})}function oo(e,t={includeSelf:!0,order:"asc"}){if(!e)return[];const{includeSelf:n,order:r}=t;let o=n?e:e.parentElement,a=[];for(;o;)a=r==="asc"?a.concat(o):[o].concat(a),o=o.parentElement;return a}function io(e){const t=kt(e);if(t)return t;let n=e.parentElement;for(;n&&n!==document.body&&!n.hasAttribute("data-warden-container");)n=n.parentElement;const r=kt(n);if(r)return r;const{tagName:o}=e;return!e.hasChildNodes()||o.toLowerCase()==="svg"?ao(e):so(e)}function kt(e){return e?e.hasAttribute("data-warden-title")?e.getAttribute("data-warden-title"):e.title:""}function ao(e){const{tagName:t,textContent:n}=e;if(t==="IMG")return e.getAttribute("alt")||null;if(t==="svg"){const r=[...Array(e.children)].find(o=>o.tagName==="use");if(r)return r.getAttribute("xlink:href")||null}return n}function so(e){const{tagName:t,textContent:n}=e;if(t==="A")return Tt([...Array.from(e.children)])?n:e.getAttribute("href")||null;if(t==="BUTTON"){const o=e.getAttribute("name"),a=Tt([...Array.from(e.children)]);return o||a?n:e.getAttribute("href")||null}const{length:r}=[...Array.from(e.children)].filter(()=>e.hasChildNodes());return r>0?null:n}function co(e=[]){const t=Xe(e,"data-warden-event-id");if(t)return t.getAttribute("data-warden-event-id");const n=Xe(e,"title");if(n)return n.getAttribute("title");const r=Xe(e,"data-warden-container");if(r){if(r.getAttribute("data-warden-event-id"))return r.getAttribute("data-warden-event-id");if(r.getAttribute("title"))return r.getAttribute("title");const o=r.getAttribute("data-warden-container");if(typeof o=="string"&&o)return o}return e[0].tagName.toLowerCase()}function uo(e=[]){const t=/^data-warden-/;let n,r=-1;for(let i=0;i<e.length;i++){const u=e[i];if(n=(u&&u.attributes&&Array.from(u.attributes)||[]).find(f=>f.nodeName.match(t)?f.nodeName.match(t):f.nodeName.indexOf("data-warden-container")!==-1),n){r=i;break}}if(r<0)return{};const o=e[r],a=Array.from(o.attributes)||[],s={},c=["container","title","event-id"];return a.forEach(i=>{if(i.nodeName.indexOf("data-warden")<0)return;const u=i.nodeName.replace(t,"");c.includes(u)||(s[u]=i.nodeValue)}),s}function lo(){exports._options.value.event.core&&ro()}function fo(e={},t=!1){T.emit({...e,eventType:M.CUSTOM,triggerTime:w(),triggerPageUrl:N()},t)}function ho(){g.removeEvents([d.CLICK,d.LOAD])}const $={performance:!!p.performance,getEntriesByType:!!(p.performance&&p.performance.getEntriesByType),PerformanceObserver:"PerformanceObserver"in p,MutationObserver:"MutationObserver"in p,PerformanceNavigationTiming:"PerformanceNavigationTiming"in p},po={initiatorType:"",transferSize:0,encodedBodySize:0,decodedBodySize:0,duration:0,redirectStart:0,redirectEnd:0,startTime:0,fetchStart:0,domainLookupStart:0,domainLookupEnd:0,connectStart:0,connectEnd:0,requestStart:0,responseStart:0,responseEnd:0,workerStart:0};function Ct(e){const t=["img","script","link","audio","video","css"],n=e.getEntriesByType("resource"),r=[];return n.forEach(o=>{const{initiatorType:a=""}=o;if(t.indexOf(a.toLowerCase())<0)return;if(Le.length){const c=Le.findIndex(i=>i.src===o.name);if(c!==-1){Le.splice(c,1);return}}const s={};Object.keys(po).forEach(c=>{de(c,o)&&(s[c]=o[c])}),r.push(se({...s,eventType:M.PERFORMANCE,eventId:k.RESOURCE,requestUrl:o.name,triggerTime:w(),triggerPageUrl:N()}))}),r.length&&T.emit(r),r}let pe=null,me=null;function mo(){const e=["img","script","link"];pe=new MutationObserver(t=>{for(let n=0;n<t.length;n+=1){const r=w(),{addedNodes:o=[]}=t[n];o.forEach(a=>{const{nodeName:s}=a;e.indexOf(s.toLowerCase())!==-1&&(V(a,d.LOAD,function(){T.emit(se({eventType:M.PERFORMANCE,eventId:k.RESOURCE,requestUrl:a.src||a.href,duration:w()-r,triggerTime:w(),triggerPageUrl:N()}))}),V(a,d.ERROR,function(){T.emit(se({eventType:M.PERFORMANCE,eventId:k.RESOURCE,requestUrl:a.src||a.href,responseStatus:"error",duration:w()-r,triggerTime:w(),triggerPageUrl:N()}))}))})}}),pe.observe(p.document,{subtree:!0,childList:!0})}function vo(){const e=t=>{const n={...t,triggerPageUrl:N()};C.firstScreen?C.firstScreen.push({...n}):C.firstScreen=[{...n}],T.emit(se({...n,eventType:M.PERFORMANCE,eventId:k.PAGE}))};new PerformanceObserver((t,n)=>{const r=t.getEntriesByName("first-contentful-paint")[0];r&&(n.disconnect(),e({fcp:r.startTime}))}).observe({type:"paint",buffered:!0}),new PerformanceObserver((t,n)=>{const r=t.getEntriesByType("largest-contentful-paint").at(-1);r&&(n.disconnect(),e({lcp:r.startTime}))}).observe({type:"largest-contentful-paint",buffered:!0})}function go(){const e={},{performance:t}=p;let n=t.timing;if(e.fmp=0,$.getEntriesByType){const o=t.getEntriesByType("paint");if(o.length&&(e.fmp=o[o.length-1].startTime),$.PerformanceNavigationTiming){const a=t.getEntriesByType("navigation")[0];a&&(n=a)}}e.fmp&&$.PerformanceNavigationTiming&&(e.fmp-=n.fetchStart),e.whiteScreenTime=n.responseEnd-n.fetchStart,e.tti=n.domInteractive-n.fetchStart,e.ready=n.domContentLoadedEventEnd-n.fetchStart,e.loadTime=n.loadEventStart-n.fetchStart,e.firstByte=n.responseStart-n.domainLookupStart,e.dns=n.domainLookupEnd-n.domainLookupStart,e.dnsCache=n.domainLookupStart-n.fetchStart,e.tcp=n.connectEnd-n.connectStart,e.ttfb=n.responseStart-n.requestStart,e.trans=n.responseEnd-n.responseStart,e.dom=n.domInteractive-n.responseEnd,e.res=n.loadEventStart-n.domContentLoadedEventEnd,e.ssllink=n.connectEnd-n.secureConnectionStart,e.redirect=n.redirectEnd-n.redirectStart,e.unloadTime=n.unloadEventEnd-n.unloadEventStart;const r={...e,triggerPageUrl:N()};C.firstScreen?C.firstScreen.push({...r}):C.firstScreen=[{...r}],T.emit(se({...r,eventType:M.PERFORMANCE,eventId:k.PAGE}))}function Ot(){$.performance&&exports._options.value.performance.firstResource&&(go(),vo()),$.performance&&exports._options.value.performance.core&&(Ct(p.performance),$.PerformanceObserver?(me=new PerformanceObserver(Ct),me.observe({entryTypes:["resource"]})):$.MutationObserver&&mo())}function bo(){!exports._options.value.performance.firstResource&&!exports._options.value.performance.core||(document.readyState==="complete"?Ot():g.addEvent({type:d.LOAD,callback:()=>{Ot()}}))}function at(e={},t=!1){const n={...e,triggerTime:w(),triggerPageUrl:N(),eventType:M.PERFORMANCE};T.emit(se(n),t)}function yo(){pe&&(pe.disconnect(),pe=null),me&&(me.disconnect(),me=null)}function Eo(){g.addEvent({type:d.FETCH,callback:async(e,t={},n,r,o={})=>{const{method:a="GET",body:s={}}=t,{url:c,status:i,statusText:u}=n,l=String(a).toLocaleLowerCase();Wt(c)||(i===200||i===304?exports._options.value.performance.server&&at({eventId:k.SERVER,requestUrl:c,triggerTime:r,duration:w()-r,responseStatus:i,requestMethod:l,requestType:"fetch",...o,params:a.toUpperCase()==="POST"?s:Be(c)}):exports._options.value.error.server&&it({eventId:k.SERVER,triggerTime:r,duration:w()-r,errMessage:u,requestUrl:On(c),responseStatus:i,requestMethod:l,requestType:"fetch",...o,params:a.toUpperCase()==="POST"?s:Be(c)}))}})}class So{requestUrl="";requestMethod="";requestParams={};triggerTime=-1;constructor(t={}){Object.keys(t).forEach(n=>{de(n,t)&&(this[n]=t[n]||null)})}}function Lo(){const e=new So;g.addEvent({type:d.XHROPEN,callback:(t,n)=>{e.requestMethod=String(t).toLocaleLowerCase(),e.requestUrl=n,e.requestParams=Be(n)}}),g.addEvent({type:d.XHRSEND,callback:(t,n)=>{V(t,d.READYSTATECHANGE,function(){const{readyState:r,status:o,responseURL:a,statusText:s}=t,c=t.responseType===""||t.responseType==="text"?t.responseText:"";if(r===4){const i=a||e.requestUrl;if(Wt(i))return;o===200||o===304?exports._options.value.performance.server&&at({eventId:k.SERVER,requestUrl:i,requestMethod:e.requestMethod,requestType:"xhr",responseStatus:o,duration:w()-e.triggerTime,params:e.requestMethod==="post"?n:e.requestParams}):exports._options.value.error.server&&it({eventId:k.SERVER,errMessage:s||c,requestUrl:i,requestMethod:e.requestMethod,requestType:"xhr",responseStatus:o,params:e.requestMethod==="post"?n:e.requestParams})}}),e.triggerTime=w()}})}function Wt(e){return!exports._options.value.ignoreRequest.length||!e?!1:exports._options.value.ignoreRequest.some(t=>et(t)?!!t.test(e):e===t)}function wo(){!exports._options.value.performance.server&&!exports._options.value.error.server||(Lo(),Eo())}function Ro(){g.removeEvents([d.FETCH,d.XHROPEN,d.XHRSEND])}let Q=N();function Ao(){if(!exports._options.value.pv.core)return;let e=!1,t=!1;fe({referer:document.referrer}),g.addEvent({type:d.HISTORYPUSHSTATE,callback:()=>{t||(e=!1,fe({action:"navigation"}))}}),g.addEvent({type:d.HISTORYREPLACESTATE,callback:()=>{t=!0,e=!1,fe({action:"navigation"}),setTimeout(()=>{t=!1},100)}}),g.addEvent({type:d.HASHCHANGE,callback:()=>{t||(e||fe(),e=!1)}}),g.addEvent({type:d.POPSTATE,callback:()=>{if(!t){if(p.location.hash!==""){const n=Q.indexOf("#")>0?Q.slice(0,Q.indexOf("#")):Q;if(p.location.href.slice(0,p.location.href.indexOf("#"))===n)return}e=!0,fe()}}}),g.addEvent({type:d.BEFOREUNLOAD,callback:()=>{const n=w()-Ke;Object.values(ve).length>0&&n>100&&T.emit({...ve,durationTime:n},!0)}})}let Ke=w(),ve={};function fe(e={}){const{referer:t=Q,action:n,params:r,title:o}=e;let a=n;a||(a=Bn[performance.navigation.type]||""),setTimeout(()=>{Q=N();const s={eventType:M.PV,eventId:ue.pageId,triggerPageUrl:N(),referer:t,params:r,title:o||document.title,action:a,triggerTime:w()};T.emit(s);const c=w()-Ke;Ke=w(),Object.values(ve).length>0&&c>100&&T.emit({...ve,durationTime:c}),ve={...s,eventType:M.PVDURATION}},o?0:17)}function Io(e={},t=!1){T.emit({referer:Q,title:document.title,...e,eventType:M.PV,eventId:ue.pageId,triggerPageUrl:N(),triggerTime:w()},t)}function To(){g.removeEvents([d.HISTORYPUSHSTATE,d.HISTORYREPLACESTATE,d.HASHCHANGE,d.POPSTATE,d.BEFOREUNLOAD])}class ko{ioMap={};targetMap=[];options={root:null,rootMargin:"0px",threshold:.5};initObserver(t){return new IntersectionObserver(n=>{n.forEach(r=>{if(r.isIntersecting){const o=this.targetMap.find(a=>a.target===r.target);o&&(o.showTime=w())}else{const o=this.targetMap.find(a=>a.target===r.target);if(o){if(!o.showTime)return;o.showEndTime=w(),this.sendEvent(o)}}})},{...this.options,threshold:t})}sendEvent(t){T.emit({eventType:M.INTERSECTION,triggerPageUrl:N(),...t})}observe(t){xe(t).forEach(r=>{const o=xe(r.target);Object.prototype.hasOwnProperty.call(this.ioMap,r.threshold)||(this.ioMap[r.threshold]=this.initObserver(r.threshold||.5)),o.forEach(a=>{this.targetMap.findIndex(c=>c.target===a)===-1&&(this.ioMap[r.threshold].observe(a),this.targetMap.push({target:a,threshold:r.threshold,observeTime:w(),params:r.params}))})})}unobserve(t){xe(t).forEach(r=>{const o=this.targetMap.findIndex(s=>s.target===r);if(o===-1)return;const a=this.ioMap[this.targetMap[o].threshold];a&&(this.targetMap.splice(o,1),a.unobserve(r))})}disconnect(){for(const t in this.ioMap)Object.prototype.hasOwnProperty.call(this.ioMap,t)&&this.ioMap[t].disconnect();this.targetMap=[],this.ioMap={}}}let ge;function Co(){C.intersection=new ko,ge=C.intersection}function Oo(){ge?.disconnect()}function Bt(e){return Zr(e)}function Zt(e){O("beforePushEventList")&&exports._options.value.beforePushEventList.push(e)}function Yt(e){O("beforeSendData")&&exports._options.value.beforeSendData.push(e)}function Gt(e){O("afterSendData")&&exports._options.value.afterSendData.push(e)}function zt(e){O("setUserUuid")&&(exports._options.value.userUuid=e)}function Jt(){if(O("getUserUuid"))return exports._options.value.userUuid}function qt(){if(O("getSDKUserUuid"))return exports._options.value.sdkUserUuid}function $t(){if(O("getBaseInfo"))return{...C.baseInfo.base,userUuid:exports._options.value.userUuid}}function Qt(){if(O("getFirstScreen"))return{...C.firstScreen}}function Kt(e={},t=!1){if(O("traceError"))return it(e,t)}function en(e={},t=!1){if(O("tracePerformance"))return at(e,t)}function tn(e={},t=!1){if(O("traceCustomEvent"))return fo(e,t)}function nn(e={},t=!1){if(O("tracePageView"))return Io(e,t)}function rn(){return Xt().then(e=>e[0])}function on(e){O("intersectionObserver")&&ge.observe(e)}function an(e){O("intersectionUnobserve")&&ge.unobserve(e)}function sn(){O("intersectionDisconnect")&&ge.disconnect()}function cn(){if(!O("sendData")&&!exports._options.value.localization)return;const e=Qe.getItem(Ge);e&&(T.sendLocal(e),Qe.removeItem(Ge))}function un(e){!O("localizationOverFlow")&&!exports._options.value.localization||(exports._options.value.localizationOverFlow=e)}function ln(){return Ze(exports._options.value)}const Po=Object.freeze(Object.defineProperty({__proto__:null,afterSendData:Gt,beforePushEventList:Zt,beforeSendData:Yt,getBaseInfo:$t,getFirstScreen:Qt,getIPs:rn,getOptions:ln,getSDKUserUuid:qt,getUserUuid:Jt,intersectionDisconnect:sn,intersectionObserver:on,intersectionUnobserve:an,sendLocal:cn,setLocalizationOverFlow:un,setUserUuid:zt,traceCustomEvent:tn,traceError:Kt,tracePageView:nn,tracePerformance:en,unzipRecordscreen:Bt},Symbol.toStringTag,{value:"Module"}));function dn(e){p.__webTracingInit__||Un(e)&&(Yn(),Vr(),Fr(),Dr(),eo(),lo(),wo(),bo(),Ao(),Co(),exports._options.value.recordScreen&&jr(),p.__webTracingInit__=!0)}function xo(){ho(),to(),Ro(),yo(),Oo(),Yr(),To(),ur(),T&&T.destroy(),p.__webTracingInit__=!1}function No(e,t){dn(t)}const Mo={install:No};exports.SEDNEVENTTYPES=M;exports.SENDID=k;exports.afterSendData=Gt;exports.beforePushEventList=Zt;exports.beforeSendData=Yt;exports.default=Mo;exports.destroyTracing=xo;exports.exportMethods=Po;exports.getBaseInfo=$t;exports.getFirstScreen=Qt;exports.getIPs=rn;exports.getOptions=ln;exports.getSDKUserUuid=qt;exports.getUserUuid=Jt;exports.init=dn;exports.intersectionDisconnect=sn;exports.intersectionObserver=on;exports.intersectionUnobserve=an;exports.logError=K;exports.parseError=Te;exports.sendLocal=cn;exports.setLocalizationOverFlow=un;exports.setUserUuid=zt;exports.traceCustomEvent=tn;exports.traceError=Kt;exports.tracePageView=nn;exports.tracePerformance=en;exports.unzipRecordscreen=Bt;
|
package/package.json
ADDED
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "aibox-web-tracing",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"keywords": [
|
|
5
|
+
"tracing",
|
|
6
|
+
"utils",
|
|
7
|
+
"vue"
|
|
8
|
+
],
|
|
9
|
+
"homepage": "https://192.168.18.100:10443/aibox/aibox-web-tracing#readme",
|
|
10
|
+
"repository": {
|
|
11
|
+
"type": "git",
|
|
12
|
+
"url": "git+https://192.168.18.100:10443/aibox/aibox-web-tracing.git"
|
|
13
|
+
},
|
|
14
|
+
"license": "MIT",
|
|
15
|
+
"author": {
|
|
16
|
+
"name": "林鸾纯",
|
|
17
|
+
"email": "linluanchun@richinfo.cn"
|
|
18
|
+
},
|
|
19
|
+
"sideEffects": [
|
|
20
|
+
"**/*.css"
|
|
21
|
+
],
|
|
22
|
+
"exports": {
|
|
23
|
+
".": {
|
|
24
|
+
"import": "./es/index.mjs",
|
|
25
|
+
"require": "./lib/index.js"
|
|
26
|
+
},
|
|
27
|
+
"./es": {
|
|
28
|
+
"import": "./es/index.mjs"
|
|
29
|
+
},
|
|
30
|
+
"./lib": {
|
|
31
|
+
"require": "./lib/index.js"
|
|
32
|
+
},
|
|
33
|
+
"./es/*": {
|
|
34
|
+
"import": "./es/*.mjs"
|
|
35
|
+
},
|
|
36
|
+
"./es/*.mjs": {
|
|
37
|
+
"import": "./es/*.mjs"
|
|
38
|
+
},
|
|
39
|
+
"./lib/*.js": {
|
|
40
|
+
"require": "./lib/*.js"
|
|
41
|
+
},
|
|
42
|
+
"./lib/*": {
|
|
43
|
+
"require": "./lib/*.js"
|
|
44
|
+
},
|
|
45
|
+
"./index.css": "./es/assets/index.css"
|
|
46
|
+
},
|
|
47
|
+
"main": "lib/index.js",
|
|
48
|
+
"import": "./es/index.mjs",
|
|
49
|
+
"module": "lib/index.js",
|
|
50
|
+
"files": [
|
|
51
|
+
"es",
|
|
52
|
+
"lib",
|
|
53
|
+
"index.css"
|
|
54
|
+
],
|
|
55
|
+
"peerDependencies": {
|
|
56
|
+
"vue": "^3.5.26"
|
|
57
|
+
},
|
|
58
|
+
"dependencies": {
|
|
59
|
+
"js-base64": "^3.7.5",
|
|
60
|
+
"rrweb": "2.0.0-alpha.5",
|
|
61
|
+
"pako": "^2.1.0",
|
|
62
|
+
"@types/pako": "^2.0.0"
|
|
63
|
+
},
|
|
64
|
+
"devDependencies": {
|
|
65
|
+
"vite": "^7.3.0",
|
|
66
|
+
"vite-plugin-dts": "^4.5.4"
|
|
67
|
+
},
|
|
68
|
+
"optionalDependencies": {
|
|
69
|
+
"@ast-grep/napi-linux-x64-musl": "^0.39.6",
|
|
70
|
+
"@rollup/rollup-linux-x64-musl": "^4.52.5"
|
|
71
|
+
},
|
|
72
|
+
"engines": {
|
|
73
|
+
"node": ">=18"
|
|
74
|
+
},
|
|
75
|
+
"scripts": {
|
|
76
|
+
"build": "vite build && pnpm run postbuild",
|
|
77
|
+
"postbuild": "node -e \"const fs = require('fs'); const path = require('path'); const src = path.join(__dirname, 'es', 'assets', 'index.css'); const dest = path.join(__dirname, 'index.css'); if (fs.existsSync(src)) { fs.copyFileSync(src, dest); console.log('方法库样式文件已复制到根目录'); } else { console.log('警告: 方法库样式文件不存在'); }\"",
|
|
78
|
+
"build:clean": "rimraf lib es",
|
|
79
|
+
"dev": "vite --config ./play/vite.config.js",
|
|
80
|
+
"lint": "eslint . && stylelint \"**/*.{css,less,scss}\"",
|
|
81
|
+
"lint:fix": "prettier --write . && eslint --fix . && stylelint --fix \"**/*.{css,less,scss}\" "
|
|
82
|
+
}
|
|
83
|
+
}
|