@cloudcare/browser-rum 2.2.1 → 2.2.3
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 +2 -1
- package/bundle/dataflux-rum.js +1 -1
- package/cjs/boot/buildEnv.js +1 -1
- package/cjs/domain/configuration.js +7 -0
- package/cjs/domain/rumEventsCollection/resource/resourceCollection.js +1 -1
- package/cjs/domain/tracing/ddtraceTracer.js +4 -4
- package/cjs/domain/tracing/jaegerTracer.js +4 -3
- package/cjs/domain/tracing/skywalkingTracer.js +11 -10
- package/cjs/domain/tracing/tracer.js +9 -6
- package/cjs/domain/tracing/w3cTraceParentTracer.js +5 -4
- package/cjs/domain/tracing/zipkinMultiTracer.js +4 -3
- package/cjs/domain/tracing/zipkinSingleTracer.js +5 -4
- package/esm/boot/buildEnv.js +1 -1
- package/esm/boot/rumPublicApi.js +1 -1
- package/esm/domain/configuration.js +6 -0
- package/esm/domain/rumEventsCollection/resource/resourceCollection.js +1 -1
- package/esm/domain/tracing/ddtraceTracer.js +4 -4
- package/esm/domain/tracing/jaegerTracer.js +4 -3
- package/esm/domain/tracing/skywalkingTracer.js +11 -10
- package/esm/domain/tracing/tracer.js +10 -7
- package/esm/domain/tracing/w3cTraceParentTracer.js +5 -4
- package/esm/domain/tracing/zipkinMultiTracer.js +4 -3
- package/esm/domain/tracing/zipkinSingleTracer.js +5 -4
- package/package.json +3 -3
- package/src/boot/rumPublicApi.js +30 -45
- package/src/domain/configuration.js +8 -0
- package/src/domain/rumEventsCollection/resource/resourceCollection.js +15 -11
- package/src/domain/tracing/ddtraceTracer.js +11 -11
- package/src/domain/tracing/jaegerTracer.js +36 -28
- package/src/domain/tracing/skywalkingTracer.js +94 -53
- package/src/domain/tracing/tracer.js +14 -7
- package/src/domain/tracing/w3cTraceParentTracer.js +35 -27
- package/src/domain/tracing/zipkinMultiTracer.js +29 -28
- package/src/domain/tracing/zipkinSingleTracer.js +34 -27
package/README.md
CHANGED
|
@@ -93,7 +93,8 @@ datafluxRum.init({
|
|
|
93
93
|
| `traceType` $\color{#FF0000}{新增}$ | Enum | 否 | `ddtrace` | 与 APM 采集工具连接的请求header类型,目前兼容的类型包括:`ddtrace`、`zipkin`、`skywalking_v3`、`jaeger`、`zipkin_single_header`、`w3c_traceparent`。*注: opentelemetry 支持 `zipkin_single_header`,`w3c_traceparent`,`zipkin`三种类型* |
|
|
94
94
|
| `traceId128Bit` $\color{#FF0000}{新增}$ | Boolean | 否 | `false` | 是否以128位的方式生成 `traceID`,与`traceType` 对应,目前支持类型 `zipkin`、`jaeger` |
|
|
95
95
|
| `allowedDDTracingOrigins` $\color{#FF0000}{废弃}$ | Array | 否 | `[]` | 允许注入`ddtrace` 采集器所需header头部的所有请求列表。可以是请求的origin,也可以是是正则,origin: `协议(包括://),域名(或IP地址)[和端口号]` 例如:`["https://api.example.com", /https:\/\/.*\.my-api-domain\.com/]` *该参数 旧的配置在新版本中做了兼容, 推荐使用`allowedTracingOrigins`* |
|
|
96
|
-
| `allowedTracingOrigins` $\color{#FF0000}{新增}$ | Array | 否 | `[]` | 允许注入 `trace` 采集器所需header头部的所有请求列表。可以是请求的origin,也可以是是正则,origin: `协议(包括://),域名(或IP地址)[和端口号]` 例如:`["https://api.example.com", /https:\/\/.*\.my-api-domain\.com/]`
|
|
96
|
+
| `allowedTracingOrigins` $\color{#FF0000}{新增}$ | Array | 否 | `[]` | 允许注入 `trace` 采集器所需header头部的所有请求列表。可以是请求的origin,也可以是是正则,origin: `协议(包括://),域名(或IP地址)[和端口号]` 例如:`["https://api.example.com", /https:\/\/.*\.my-api-domain\.com/]` |
|
|
97
|
+
| `tracingSampleRate` | Number | 否 | `100` | 链路数据收集百分比: `100`表示全收集,`0`表示不收集 |
|
|
97
98
|
| `trackInteractions` | Boolean | 否 | `false` | 是否开启用户行为采集 |
|
|
98
99
|
| `isServerError` | Function | 否 | `function(request) {return false}` | 默认情况下,请求如果 `status code`>= 500 则定义为错误请求,会相应的采集为 `error` 指标数据。为满足部分场景可能并非是通过 `status code` 来判断业务请求的错误情况,提供可通过用户自定义的方式来判断请求是否为 error 请求,callback 参数为请求对应的相关返回参数: `{ isAborted: false, method:"get",response: "{...}",status: 200,url: "xxxx" }`, 如果方法返回为true,则该请求相关数据会被采集为 `error` 指标, *该参数 方法返回结果必须为 Boolean 类型, 否则认为是无效参数* |
|
|
99
100
|
| `isIntakeUrl` | Function | 否 | `function(url) {return false}` | 自定义方法根据请求资源 url 判断是否需要采集对应资源数据,默认都采集。 返回:`false` 表示要采集,`true` 表示不需要采集 *该参数 方法返回结果必须为 Boolean 类型, 否则认为是无效参数* |
|
package/bundle/dataflux-rum.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{"use strict";var e=Array.prototype,t=Function.prototype,n=Object.prototype,r=e.slice,i=n.toString,o=n.hasOwnProperty,a=(t.bind,e.forEach),u=(e.indexOf,Array.isArray),s=function(e,t,n){if(null===e)return!1;if(a&&e.forEach===a)e.forEach(t,n);else if(e.length===+e.length){for(var r=0,i=e.length;r<i;r++)if(r in e&&false===t.call(n,e[r],r,e))return!1}else for(var u in e)if(o.call(e,u)&&false===t.call(n,e[u],u,e))return!1};function c(e){return s(r.call(arguments,1),(function(t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})),e}function f(e){return c({},e)}var d=function(e){return s(r.call(arguments,1),(function(t){for(var n in t)void 0!==t[n]&&(e[n]=t[n])})),e},l=function(e){return s(r.call(arguments,1),(function(t){for(var n in t)void 0!==t[n]&&(w(t[n])&&w(e[n])?d(e[n],t[n]):e[n]=t[n])})),e},p=u||function(e){return"[object Array]"===i.call(e)},v=function(e){if(!e)return!1;try{return/^\s*\bfunction\b/.test(e)}catch(e){return!1}},h=function(e){return e?e.toArray?e.toArray():p(e)?r.call(e):(t=e)&&o.call(t,"callee")?r.call(e):m(e):[];var t},m=function(e){var t=[];return null===e||s(e,(function(e){t[t.length]=e})),t},g=function(e,t,n){if(e.filter)return e.filter(t);for(var r=[],i=0;i<e.length;i++)if(o.call(e,i)){var a=e[i];t.call(n,a,i,e)&&r.push(a)}return r},y=function(e,t,n){if(e.map)return e.map(t);for(var r=[],i=0;i<e.length;i++)if(o.call(e,i)){var a=e[i];r.push(t.call(n,a,i,e))}return r},b=function(e,t,n){if(e.some)return e.some(t);for(var r=!1,i=0;i<e.length;i++)if(o.call(e,i)){var a=e[i];if(t.call(n,a,i,e)){r=!0;break}}return r},w=function(e){return null!==e&&"[object Object]"===i.call(e)},_=function(e){if(w(e)){for(var t in e)if(o.call(e,t))return!1;return!0}return!1},S=function(e){var t=[];return s(e,(function(e,n){t.push([n,e])})),t},x=function(e){return"[object String]"===i.call(e)},C=function(e){return"[object Boolean]"===i.call(e)},T=function(e){return"[object Number]"===i.call(e)&&/[\d\.]+/.test(String(e))},E=function e(t){var n=t;try{n=e(t)}catch(e){n=t}return n},O=(Date.now,function(e,t,n){var r,i,o,a,u=0;n||(n={});var s=function(){u=!1===n.leading?0:(new Date).getTime(),r=null,a=e.apply(i,o),r||(i=o=null)},c=function(){o=arguments;var c=(new Date).getTime();u||!1!==n.leading||(u=c);var f=t-(c-u);return i=this,f<=0||f>t?(r&&(clearTimeout(r),r=null),u=c,a=e.apply(i,o),r||(i=o=null)):r||!1===n.trailing||(r=setTimeout(s,f)),a};return c.cancel=function(){clearTimeout(r),u=0,r=null},c}),k=function(e){if("function"==typeof btoa)return btoa(encodeURIComponent(e).replace(/%([0-9A-F]{2})/g,(function(e,t){return String.fromCharCode("0x"+t)})));var t,n,r,i,o,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",u=0,s=0,c="",f=[];if(!(e=String(e)))return e;e=function(e){var t,n,r,i,o="";for(t=n=0,r=(e=(e+"").replace(/\r\n/g,"\n").replace(/\r/g,"\n")).length,i=0;i<r;i++){var a=e.charCodeAt(i),u=null;a<128?n++:u=a>127&&a<2048?String.fromCharCode(a>>6|192,63&a|128):String.fromCharCode(a>>12|224,a>>6&63|128,63&a|128),null!==u&&(n>t&&(o+=e.substring(t,n)),o+=u,t=n=i+1)}return n>t&&(o+=e.substring(t,e.length)),o}(e);do{t=(o=e.charCodeAt(u++)<<16|e.charCodeAt(u++)<<8|e.charCodeAt(u++))>>18&63,n=o>>12&63,r=o>>6&63,i=63&o,f[s++]=a.charAt(t)+a.charAt(n)+a.charAt(r)+a.charAt(i)}while(u<e.length);switch(c=f.join(""),e.length%3){case 1:c=c.slice(0,-2)+"==";break;case 2:c=c.slice(0,-1)+"="}return c};function I(e){return e?(parseInt(e,10)^16*Math.random()>>parseInt(e,10)/4).toString(16):"".concat(1e7,"-",1e3,"-",4e3,"-",8e3,"-",1e11).replace(/[018]/g,I)}function R(e){var t="";return e&&(t=e.replace(/\/([^\/]*)\d([^\/]*)/g,"/?").replace(/\/$/g,"")),t||"/"}var A=function(e){var t=function(e){this._fields={Username:4,Password:5,Port:7,Protocol:2,Host:6,Path:8,URL:0,QueryString:9,Fragment:10},this._values={},this._regex=null,this._regex=/^((\w+):\/\/)?((\w+):?(\w+)?@)?([^\/\?:]+):?(\d+)?(\/?[^\?#]+)?\??([^#]+)?#?(\w*)/,void 0!==e&&this._parse(e)};return t.prototype.setUrl=function(e){this._parse(e)},t.prototype._initValues=function(){for(var e in this._fields)this._values[e]=""},t.prototype.addQueryString=function(e){if("object"!=typeof e)return!1;var t=this._values.QueryString||"";for(var n in e)t=new RegExp(n+"[^&]+").test(t)?t.replace(new RegExp(n+"[^&]+"),n+"="+e[n]):"&"===t.slice(-1)?t+n+"="+e[n]:""===t?n+"="+e[n]:t+"&"+n+"="+e[n];this._values.QueryString=t},t.prototype.getParse=function(){return this._values},t.prototype.getUrl=function(){var e="";return e+=this._values.Origin,e+=this._values.Path,e+=this._values.QueryString?"?"+this._values.QueryString:""},t.prototype._parse=function(e){this._initValues();var t=this._regex.exec(e);if(!t)throw"DPURLParser::_parse -> Invalid URL";for(var n in this._fields)void 0!==t[this._fields[n]]&&(this._values[n]=t[this._fields[n]]);this._values.Path=this._values.Path||"/",this._values.Hostname=this._values.Host.replace(/:\d+$/,""),this._values.Origin=this._values.Protocol+"://"+this._values.Hostname+(this._values.Port?":"+this._values.Port:"")},new t(e)};var M=function(e){var t={},n=e.split("?")[1]||"";return n&&(t=B("?"+n)),t},B=function(e){for(var t=function(e){return E(e)},n={},r=(e=e||"").substring(1).split("&"),i=0;i<r.length;i++){var o=r[i].indexOf("=");if(-1!==o){var a=r[i].substring(0,o),u=r[i].substring(o+1);a=t(a),u=t(u),n[a]=u}}return n};function U(e,t,n){if(void 0===n&&(n=function(){if("undefined"!=typeof WeakSet){var e=new WeakSet;return{hasAlreadyBeenSeen(t){var n=e.has(t);return n||e.add(t),n}}}var t=[];return{hasAlreadyBeenSeen(e){var n=t.indexOf(e)>=0;return n||t.push(e),n}}}()),void 0===t)return e;if("object"!=typeof t||null===t)return t;if(t instanceof Date)return new Date(t.getTime());if(t instanceof RegExp){var r=t.flags||[t.global?"g":"",t.ignoreCase?"i":"",t.multiline?"m":"",t.sticky?"y":"",t.unicode?"u":""].join("");return new RegExp(t.source,r)}if(!n.hasAlreadyBeenSeen(t)){if(Array.isArray(t)){for(var i=Array.isArray(e)?e:[],o=0;o<t.length;++o)i[o]=U(i[o],t[o],n);return i}var a;i="object"==(null===(a=e)?"null":Array.isArray(a)?"array":typeof a)?e:{};for(var u in t)Object.prototype.hasOwnProperty.call(t,u)&&(i[u]=U(i[u],t[u],n));return i}}function L(e){return U(void 0,e)}function $(e){return e?String(e).substr(0,1)+String(e).substr(1).replace(/\d*/g,"x"):e}function P(e,t,n){if(null==e)return JSON.stringify(e);var r=[!1,void 0];D(e)&&(r=[!0,e.toJSON],delete e.toJSON);var i,o,a=[!1,void 0];"object"==typeof e&&D(i=Object.getPrototypeOf(e))&&(a=[!0,i.toJSON],delete i.toJSON);try{o=JSON.stringify(e,void 0,n)}catch(e){o="<error: unable to serialize object>"}finally{r[0]&&(e.toJSON=r[1]),a[0]&&(i.toJSON=a[1])}return o}function D(e){return"object"==typeof e&&null!==e&&e.hasOwnProperty("toJSON")}function F(){}var N,q=1e3,V=6e4;function j(e){return 0!==e&&100*Math.random()<=e}function Q(e,t){return+e.toFixed(t)}function W(e){return"number"!=typeof e?e:Q(1e6*e,0)}function G(e){return T(e)?Q(1e6*e,0):e}function H(e){return e-re()}function X(e){return Math.round(re()+e)}function z(){return performance.now()}function K(){return{relative:z(),timeStamp:J()}}function J(){return Y()}function Y(){return(new Date).getTime()}function Z(e,t){return t-e}function ee(){return{relative:0,timeStamp:re()}}function te(e){return{relative:e,timeStamp:ne(e)}}function ne(e){var t=Y()-performance.now();return t>re()?Math.round(t+e):X(e)}function re(){return void 0===N&&(N=performance.timing.navigationStart),N}function ie(e,t){for(var n=t.split(".");n.length;){var r=n.shift();if(!(e&&r in e&&o.call(e,r)))return;e=e[r]}return e}function oe(e,t){var n=e.charCodeAt(t-1);return n>=55296&&n<=56319?e.slice(0,t+1):e.slice(0,t)}function ae(e,t,n,r){return ue(e,[t],n,r)}function ue(e,t,n,r){var i=r&&r.once?function(e){o(),n(e)}:n;r=r&&r.passive?{capture:r.capture,passive:r.passive}:r&&r.capture,s(t,(function(t){e.addEventListener(t,i,r)}));var o=function(){s(t,(function(t){e.removeEventListener(t,i,r)}))};return{stop:o}}function se(e,t){return-1!==e.indexOf(t)}function ce(){var e={};return{get:function(){return e},add:function(t,n){x(t)&&(e[t]=n)},remove:function(t){delete e[t]},set:function(t){w(t)&&(e=t)},getContext:function(){return L(e)},setContext:function(t){e=L(t)},setContextProperty:function(t,n){e[t]=L(n)},removeContextProperty:function(t){delete e[t]},clearContext:function(){e={}}}}function fe(e,t){for(var n=0;n<e.length;n+=1){var r=e[n];if(t(r,n,e))return r}}function de(e){return T(e)&&e>=0&&e<=100}function le(e){if(e.origin)return e.origin;var t=e.host.replace(/(:80|:443)$/,"");return e.protocol+"//"+t}function pe(e){var t={};return s(e,(function(e,n){var r;t[(r=n,r.replace(/[A-Z]/g,(function(e,t){return(0!==t?"_":"")+e.toLowerCase()})).replace(/-/g,"_"))]=ve(e)})),t}function ve(e){return p(e)?y(e,(function(e){return ve(e)})):"object"==typeof e&&null!==e?pe(e):e}function he(e){if("object"==typeof e&&e)e=P(e);else if(!x(e))return e;return String(e).replace(/[\s=,"]/g,(function(e){return"\\"+e}))}function me(e){return'"'+e.replace(/[\\]*"/g,'"').replace(/"/g,'\\"')+'"'}function ge(e){return"object"==typeof e&&e?me(P(e)):x(e)?me(e):e}function ye(e,t){return null!=e?e:t}var be=function(){this.buffer=[]};be.prototype={add:function(e){this.buffer.push(e)>this.limit&&this.buffer.splice(0,1)},drain:function(e){s(this.buffer,(function(t){e(t)})),this.buffer.length=0}};var we=be,_e=1/0;function Se(e){this.expireDelay=e,this.entries=[];var t=this;this.clearOldContextsInterval=setInterval((function(){t.clearOldContexts()}),6e4)}Se.prototype.add=function(e,t){var n=this,r={context:e,startTime:t,endTime:_e,remove:function(){var e=n.entries.indexOf(r);e>=0&&n.entries.splice(e,1)},close:function(e){r.endTime=e}};return this.entries.unshift(r),r},Se.prototype.find=function(e){for(var t of(void 0===e&&(e=_e),this.entries))if(t.startTime<=e){if(e<=t.endTime)return t.context;break}},Se.prototype.closeActive=function(e){var t=this.entries[0];t&&t.endTime===_e&&t.close(e)},Se.prototype.findAll=function(e){void 0===e&&(e=_e);var t=g(this.entries,(function(t){return t.startTime<=e&&e<=t.endTime}));return y(t,(function(e){return e.context}))},Se.prototype.reset=function(){this.entries=[]},Se.prototype.stop=function(){clearInterval(this.clearOldContextsInterval)},Se.prototype.clearOldContexts=function(){for(var e=z()-this.expireDelay;this.entries.length>0&&this.entries[this.entries.length-1].endTime<e;)this.entries.pop()};var xe={log:"log",debug:"debug",info:"info",warn:"warn",error:"error"},Ce=function e(t){var n=[].slice.call(arguments,1);Object.prototype.hasOwnProperty.call(xe,t)||(t=xe.log),e[t].apply(e,n)};Ce.debug=void 0,Ce.log=void 0,Ce.info=void 0,Ce.warn=void 0,Ce.error=void 0;var Te={navigator:void 0!==window.navigator?window.navigator:{},infoMap:{engine:["WebKit","Trident","Gecko","Presto"],browser:["Safari","Chrome","Edge","IE","IE 11","IE 10","IE 9","IE 8","IE 7","Firefox","Firefox Focus","Chromium","Opera","Vivaldi","Yandex","Arora","Lunascape","QupZilla","Coc Coc","Kindle","Iceweasel","Konqueror","Iceape","SeaMonkey","Epiphany","360","360SE","360EE","UC","QQBrowser","QQ","Baidu","Maxthon","Sogou","LBBROWSER","2345Explorer","TheWorld","XiaoMi","Quark","Qiyu","Wechat",,"WechatWork","Taobao","Alipay","Weibo","Douban","Suning","iQiYi"],os:["Windows","Linux","Mac OS","Android","Ubuntu","FreeBSD","Debian","iOS","Windows Phone","BlackBerry","MeeGo","Symbian","Chrome OS","WebOS"],device:["Mobile","Tablet","iPad"]}},Ee={getMatchMap:function(e){return{Trident:e.indexOf("Trident")>-1||e.indexOf("NET CLR")>-1,Presto:e.indexOf("Presto")>-1,WebKit:e.indexOf("AppleWebKit")>-1,Gecko:e.indexOf("Gecko/")>-1,Safari:e.indexOf("Safari")>-1,Chrome:e.indexOf("Chrome")>-1||e.indexOf("CriOS")>-1,IE:e.indexOf("MSIE")>-1||e.indexOf("Trident")>-1,Edge:e.indexOf("Edge")>-1,Firefox:e.indexOf("Firefox")>-1||e.indexOf("FxiOS")>-1,"Firefox Focus":e.indexOf("Focus")>-1,Chromium:e.indexOf("Chromium")>-1,Opera:e.indexOf("Opera")>-1||e.indexOf("OPR")>-1,Vivaldi:e.indexOf("Vivaldi")>-1,Yandex:e.indexOf("YaBrowser")>-1,Arora:e.indexOf("Arora")>-1,Lunascape:e.indexOf("Lunascape")>-1,QupZilla:e.indexOf("QupZilla")>-1,"Coc Coc":e.indexOf("coc_coc_browser")>-1,Kindle:e.indexOf("Kindle")>-1||e.indexOf("Silk/")>-1,Iceweasel:e.indexOf("Iceweasel")>-1,Konqueror:e.indexOf("Konqueror")>-1,Iceape:e.indexOf("Iceape")>-1,SeaMonkey:e.indexOf("SeaMonkey")>-1,Epiphany:e.indexOf("Epiphany")>-1,360:e.indexOf("QihooBrowser")>-1||e.indexOf("QHBrowser")>-1,"360EE":e.indexOf("360EE")>-1,"360SE":e.indexOf("360SE")>-1,UC:e.indexOf("UC")>-1||e.indexOf(" UBrowser")>-1,QQBrowser:e.indexOf("QQBrowser")>-1,QQ:e.indexOf("QQ/")>-1,Baidu:e.indexOf("Baidu")>-1||e.indexOf("BIDUBrowser")>-1,Maxthon:e.indexOf("Maxthon")>-1,Sogou:e.indexOf("MetaSr")>-1||e.indexOf("Sogou")>-1,LBBROWSER:e.indexOf("LBBROWSER")>-1,"2345Explorer":e.indexOf("2345Explorer")>-1,TheWorld:e.indexOf("TheWorld")>-1,XiaoMi:e.indexOf("MiuiBrowser")>-1,Quark:e.indexOf("Quark")>-1,Qiyu:e.indexOf("Qiyu")>-1,Wechat:e.indexOf("MicroMessenger")>-1,Taobao:e.indexOf("AliApp(TB")>-1,Alipay:e.indexOf("AliApp(AP")>-1,Weibo:e.indexOf("Weibo")>-1,Douban:e.indexOf("com.douban.frodo")>-1,Suning:e.indexOf("SNEBUY-APP")>-1,iQiYi:e.indexOf("IqiyiApp")>-1,Windows:e.indexOf("Windows")>-1,Linux:e.indexOf("Linux")>-1||e.indexOf("X11")>-1,"Mac OS":e.indexOf("Macintosh")>-1,Android:e.indexOf("Android")>-1||e.indexOf("Adr")>-1,Ubuntu:e.indexOf("Ubuntu")>-1,FreeBSD:e.indexOf("FreeBSD")>-1,Debian:e.indexOf("Debian")>-1,"Windows Phone":e.indexOf("IEMobile")>-1||e.indexOf("Windows Phone")>-1,BlackBerry:e.indexOf("BlackBerry")>-1||e.indexOf("RIM")>-1,MeeGo:e.indexOf("MeeGo")>-1,Symbian:e.indexOf("Symbian")>-1,iOS:e.indexOf("like Mac OS X")>-1,"Chrome OS":e.indexOf("CrOS")>-1,WebOS:e.indexOf("hpwOS")>-1,Mobile:e.indexOf("Mobi")>-1||e.indexOf("iPh")>-1||e.indexOf("480")>-1,Tablet:e.indexOf("Tablet")>-1||e.indexOf("Nexus 7")>-1,iPad:e.indexOf("iPad")>-1}},matchInfoMap:function(e){var t=Te.navigator.userAgent||{},n=Ee.getMatchMap(t);for(var r in Te.infoMap)for(var i=0;i<Te.infoMap[r].length;i++){var o=Te.infoMap[r][i];n[o]&&(e[r]=o)}},getOS:function(){return Ee.matchInfoMap(this),this.os||"Unknown"},getOSVersion:function(){var e=this,t=Te.navigator.userAgent||{};e.osVersion="",e.osMajor="";var n={Windows:function(){var e=t.replace(/^.*Windows NT ([\d.]+);.*$/,"$1");return{6.4:"10",6.3:"8.1",6.2:"8",6.1:"7","6.0":"Vista",5.2:"XP",5.1:"XP","5.0":"2000"}[e]||e},Android:function(){return t.replace(/^.*Android ([\d.]+);.*$/,"$1")},iOS:function(){return t.replace(/^.*OS ([\d_]+) like.*$/,"$1").replace(/_/g,".")},Debian:function(){return t.replace(/^.*Debian\/([\d.]+).*$/,"$1")},"Windows Phone":function(){return t.replace(/^.*Windows Phone( OS)? ([\d.]+);.*$/,"$2")},"Mac OS":function(){return t.replace(/^.*Mac OS X ([\d_]+).*$/,"$1").replace(/_/g,".")},WebOS:function(){return t.replace(/^.*hpwOS\/([\d.]+);.*$/,"$1")}};return n[e.os]&&(e.osVersion=n[e.os](),e.osVersion===t&&(e.osVersion="")),e.osVersion&&(e.osMajor=e.osVersion.split(".").length&&e.osVersion.split(".")[0]),{version:e.osVersion,osMajor:e.osMajor}},getOrientationStatu:function(){return window.matchMedia("(orientation: portrait)").matches?"竖屏":"横屏"},getDeviceType:function(){var e=this;return e.device="PC",Ee.matchInfoMap(e),e.device},getNetwork:function(){return navigator&&navigator.connection&&navigator.connection.effectiveType},getLanguage:function(){var e;return this.language=((e=(Te.navigator.browserLanguage||Te.navigator.language).split("-"))[1]&&(e[1]=e[1].toUpperCase()),e.join("_")),this.language},getBrowserInfo:function(){var e=this;Ee.matchInfoMap(e);var t=Te.navigator.userAgent||{},n=function(e,t){var n=Te.navigator.mimeTypes;for(var r in n)if(n[r][e]==t)return!0;return!1},r=Ee.getMatchMap(t),i=!1;if(window.chrome){var o=t.replace(/^.*Chrome\/([\d]+).*$/,"$1");o>36&&window.showModalDialog?i=!0:o>45&&(i=n("type","application/vnd.chromium.remoting-viewer"))}if(r.Baidu&&r.Opera&&(r.Baidu=!1),r.Mobile&&(r.Mobile=!(t.indexOf("iPad")>-1)),i&&(n("type","application/gameplugin")||Te.navigator&&void 0===Te.navigator.connection.saveData?r["360SE"]=!0:r["360EE"]=!0),r.IE||r.Edge)switch(window.screenTop-window.screenY){case 71:case 74:case 99:case 75:case 74:case 105:default:break;case 102:r["360EE"]=!0;break;case 104:r["360SE"]=!0}var a={Safari:function(){return t.replace(/^.*Version\/([\d.]+).*$/,"$1")},Chrome:function(){return t.replace(/^.*Chrome\/([\d.]+).*$/,"$1").replace(/^.*CriOS\/([\d.]+).*$/,"$1")},IE:function(){return t.replace(/^.*MSIE ([\d.]+).*$/,"$1").replace(/^.*rv:([\d.]+).*$/,"$1")},Edge:function(){return t.replace(/^.*Edge\/([\d.]+).*$/,"$1")},Firefox:function(){return t.replace(/^.*Firefox\/([\d.]+).*$/,"$1").replace(/^.*FxiOS\/([\d.]+).*$/,"$1")},"Firefox Focus":function(){return t.replace(/^.*Focus\/([\d.]+).*$/,"$1")},Chromium:function(){return t.replace(/^.*Chromium\/([\d.]+).*$/,"$1")},Opera:function(){return t.replace(/^.*Opera\/([\d.]+).*$/,"$1").replace(/^.*OPR\/([\d.]+).*$/,"$1")},Vivaldi:function(){return t.replace(/^.*Vivaldi\/([\d.]+).*$/,"$1")},Yandex:function(){return t.replace(/^.*YaBrowser\/([\d.]+).*$/,"$1")},Arora:function(){return t.replace(/^.*Arora\/([\d.]+).*$/,"$1")},Lunascape:function(){return t.replace(/^.*Lunascape[\/\s]([\d.]+).*$/,"$1")},QupZilla:function(){return t.replace(/^.*QupZilla[\/\s]([\d.]+).*$/,"$1")},"Coc Coc":function(){return t.replace(/^.*coc_coc_browser\/([\d.]+).*$/,"$1")},Kindle:function(){return t.replace(/^.*Version\/([\d.]+).*$/,"$1")},Iceweasel:function(){return t.replace(/^.*Iceweasel\/([\d.]+).*$/,"$1")},Konqueror:function(){return t.replace(/^.*Konqueror\/([\d.]+).*$/,"$1")},Iceape:function(){return t.replace(/^.*Iceape\/([\d.]+).*$/,"$1")},SeaMonkey:function(){return t.replace(/^.*SeaMonkey\/([\d.]+).*$/,"$1")},Epiphany:function(){return t.replace(/^.*Epiphany\/([\d.]+).*$/,"$1")},360:function(){return t.replace(/^.*QihooBrowser\/([\d.]+).*$/,"$1")},"360SE":function(){return{63:"10.0",55:"9.1",45:"8.1",42:"8.0",31:"7.0",21:"6.3"}[t.replace(/^.*Chrome\/([\d]+).*$/,"$1")]||""},"360EE":function(){return{69:"11.0",63:"9.5",55:"9.0",50:"8.7",30:"7.5"}[t.replace(/^.*Chrome\/([\d]+).*$/,"$1")]||""},Maxthon:function(){return t.replace(/^.*Maxthon\/([\d.]+).*$/,"$1")},QQBrowser:function(){return t.replace(/^.*QQBrowser\/([\d.]+).*$/,"$1")},QQ:function(){return t.replace(/^.*QQ\/([\d.]+).*$/,"$1")},Baidu:function(){return t.replace(/^.*BIDUBrowser[\s\/]([\d.]+).*$/,"$1")},UC:function(){return t.replace(/^.*UC?Browser\/([\d.]+).*$/,"$1")},Sogou:function(){return t.replace(/^.*SE ([\d.X]+).*$/,"$1").replace(/^.*SogouMobileBrowser\/([\d.]+).*$/,"$1")},LBBROWSER:function(){var e="";t.indexOf("LieBaoFast")>-1&&(e=t.replace(/^.*LieBaoFast\/([\d.]+).*$/,"$1"));var n=t.replace(/^.*Chrome\/([\d]+).*$/,"$1");return e||{57:"6.5",49:"6.0",46:"5.9",42:"5.3",39:"5.2",34:"5.0",29:"4.5",21:"4.0"}[n]||""},"2345Explorer":function(){return t.replace(/^.*2345Explorer\/([\d.]+).*$/,"$1")},TheWorld:function(){return t.replace(/^.*TheWorld ([\d.]+).*$/,"$1")},XiaoMi:function(){return t.replace(/^.*MiuiBrowser\/([\d.]+).*$/,"$1")},Quark:function(){return t.replace(/^.*Quark\/([\d.]+).*$/,"$1")},Qiyu:function(){return t.replace(/^.*Qiyu\/([\d.]+).*$/,"$1")},Wechat:function(){return t.replace(/^.*MicroMessenger\/([\d.]+).*$/,"$1")},WechatWork:function(){return t.replace(/^.*wxwork\/([\d.]+).*$/,"$1")},Taobao:function(){return t.replace(/^.*AliApp\(TB\/([\d.]+).*$/,"$1")},Alipay:function(){return t.replace(/^.*AliApp\(AP\/([\d.]+).*$/,"$1")},Weibo:function(){return t.replace(/^.*weibo__([\d.]+).*$/,"$1")},Douban:function(){return t.replace(/^.*com.douban.frodo\/([\d.]+).*$/,"$1")},Suning:function(){return t.replace(/^.*SNEBUY-APP([\d.]+).*$/,"$1")},iQiYi:function(){return t.replace(/^.*IqiyiVersion\/([\d.]+).*$/,"$1")}};return e.browserVersion="",e.browserMajor="",a[e.browser]&&(e.browserVersion=a[e.browser](),e.browserVersion==t&&(e.browserVersion="")),"Chrome"==e.browser&&t.match(/\S+Browser/)&&(e.browser=t.match(/\S+Browser/)[0],e.version=t.replace(/^.*Browser\/([\d.]+).*$/,"$1")),"Edge"==e.browser&&(e.version>"75"?e.engine="Blink":e.engine="EdgeHTML"),("Chrome"==e.browser&&parseInt(e.browserVersion)>27||r.Chrome&&"WebKit"==e.engine&&parseInt(e.browserVersion)>27||"Opera"==e.browser&&parseInt(e.version)>12||"Yandex"==e.browser)&&(e.engine="Blink"),e.browserVersion&&(e.browserMajor=e.browserVersion.split(".").length&&this.browserVersion.split(".")[0]),{browser:e.browser,browserVersion:e.browserVersion,engine:e.engine,browserMajor:e.browserMajor}},getGeoPostion:function(e){navigator&&navigator.geolocation&&navigator.geolocation.getCurrentPosition((function(t){e(t)}),(function(e){Ce.warn(e)}))}},Oe={os:Ee.getOS(),osVersion:Ee.getOSVersion().version,osVersionMajor:Ee.getOSVersion().osMajor,browser:Ee.getBrowserInfo().browser,browserVersion:Ee.getBrowserInfo().browserVersion,browserVersionMajor:Ee.getBrowserInfo().browserMajor,screenSize:window.screen.width+"*"+window.screen.height,networkType:Ee.getNetwork(),divice:Ee.getDeviceType()},ke="beforeunload",Ie="click",Re="keydown",Ae="load",Me="popstate",Be="scroll",Ue="touchstart",Le="visibilitychange",$e="DOMContentLoaded",Pe="pointerdown",De="pointerup",Fe="pointercancel",Ne="hashchange",qe="pagehide",Ve="mousedown",je="input",Qe="securitypolicyviolation",We="selectionchange",Ge="document",He="xhr",Xe="beacon",ze="fetch",Ke="css",Je="js",Ye="image",Ze="font",et="media",tt="other",nt="click",rt="custom",it="rage_click",ot="error_click",at="dead_click",ut={ACTION:"action",ERROR:"error",LONG_TASK:"long_task",VIEW:"view",RESOURCE:"resource",LOGGER:"logger"},st="initial_load",ct="route_change",ft={FETCH:ze,XHR:He},dt="ddtrace",lt="zipkin",pt="zipkin_single_header",vt="w3c_traceparent",ht="skywalking_v3",mt="jaeger",gt="handled",yt="unhandled";function bt(e,t,n){var r=e[t],i=n(r),o=function(){if("function"==typeof i)return i.apply(this,arguments)};return e[t]=o,{stop:function(){e[t]===o?e[t]=r:i=r}}}function wt(e,t,n){return bt(e,t,(function(e){return function(){var t;return n&&n.before&&n.before.apply(this,arguments),"function"==typeof e&&(t=e.apply(this,arguments)),n&&n.after&&n.after.apply(this,arguments),t}}))}var _t="?";function St(e){var t=[],n=Rt(e,"stack");return n&&s(n.split("\n"),(function(e){var n=function(e){var t=Ct.exec(e);if(!t)return;var n=t[2]&&0===t[2].indexOf("native"),r=t[2]&&0===t[2].indexOf("eval"),i=Tt.exec(t[2]);r&&i&&(t[2]=i[1],t[3]=i[2],t[4]=i[3]);return{args:n?[t[2]]:[],column:t[4]?+t[4]:void 0,func:t[1]||_t,line:t[3]?+t[3]:void 0,url:n?void 0:t[2]}}(e)||function(e){var t=Et.exec(e);if(!t)return;return{args:[],column:t[3]?+t[3]:void 0,func:_t,line:t[2]?+t[2]:void 0,url:t[1]}}(e)||function(e){var t=Ot.exec(e);if(!t)return;return{args:[],column:t[4]?+t[4]:void 0,func:t[1]||_t,line:+t[3],url:t[2]}}(e)||function(e){var t=kt.exec(e);if(!t)return;var n=t[3]&&t[3].indexOf(" > eval")>-1,r=It.exec(t[3]);n&&r&&(t[3]=r[1],t[4]=r[2],t[5]=void 0);return{args:t[2]?t[2].split(","):[],column:t[5]?+t[5]:void 0,func:t[1]||_t,line:t[4]?+t[4]:void 0,url:t[3]}}(e);n&&(!n.func&&n.line&&(n.func=_t),t.push(n))})),{message:Rt(e,"message"),name:Rt(e,"name"),stack:t}}var xt="((?:file|https?|blob|chrome-extension|native|eval|webpack|<anonymous>|\\w+\\.|\\/).*?)",Ct=new RegExp("^\\s*at (.*?) ?\\("+xt+"(?::(\\d+))?"+"(?::(\\d+))?\\)?\\s*$","i"),Tt=new RegExp("\\((\\S*)(?::(\\d+))(?::(\\d+))\\)");var Et=new RegExp("^\\s*at ?"+xt+"(?::(\\d+))?"+"(?::(\\d+))??\\s*$","i");var Ot=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i;var kt=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|capacitor|\[native).*?|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i,It=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i;function Rt(e,t){if("object"==typeof e&&e&&t in e){var n=e[t];return"string"==typeof n?n:void 0}}var At=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/;function Mt(e){var t=function(e){return wt(window,"onerror",{before:function(t,n,r,i,o){var a;if(o)a=St(o),e(a,o);else{var u,s={url:n,column:i,line:r},c=t;if("[object String]"==={}.toString.call(t)){var f=At.exec(c);f&&(u=f[1],c=f[2])}e(a={name:u,message:"string"==typeof c?c:void 0,stack:[s]},t)}}})}(e),n=function(e){return wt(window,"onunhandledrejection",{before:function(t){var n=t.reason||"Empty reason",r=St(n);e(r,n)}})}(e);return{stop:function(){t.stop(),n.stop()}}}var Bt={AGENT:"agent",CONSOLE:"console",NETWORK:"network",SOURCE:"source",LOGGER:"logger",CUSTOM:"custom"};function Ut(e){var t=e.stackTrace,n=e.originalError,r=e.handlingStack,i=e.startClocks,o=e.nonErrorPrefix,a=e.source,u=e.handling;return t&&(void 0!==t.message||n instanceof Error)?{startClocks:i,source:a,handling:u,originalError:n,message:t.message||"Empty message",stack:$t(t),handlingStack:r,type:t.name,causes:Dt(n,a)}:{startClocks:i,source:a,handling:u,originalError:n,message:o+" "+P(n),stack:"No stack, consider using an instance of Error",handlingStack:r,type:t&&t.name}}function Lt(){var e=new Error;if(!e.stack)try{throw e}catch(e){}var t=St(e);return t.stack=t.stack.slice(2),$t(t)}function $t(e){var t=Pt(e);return s(e.stack,(function(e){var n="?"===e.func?"<anonymous>":e.func,r=e.args&&e.args.length>0?"("+e.args.join(", ")+")":"",i=e.line?":"+e.line:"",o=e.line&&e.column?":"+e.column:"";t+="\n at "+n+r+" @ "+e.url+i+o})),t}function Pt(e){return(e.name||"Error")+": "+e.message}function Dt(e,t){for(var n=e,r=[];n&&n.cause instanceof Error&&r.length<10;){var i=St(n.cause);r.push({message:n.cause.message,source:t,type:i&&i.name,stack:i&&$t(i)}),n=n.cause}return r.length?r:void 0}var Ft=function(e){this.observers=[],this.onLastUnsubscribe=void 0,this.onFirstSubscribe=e};Ft.prototype={subscribe:function(e){!this.observers.length&&this.onFirstSubscribe&&(this.onLastUnsubscribe=this.onFirstSubscribe()||void 0),this.observers.push(e);var t=this;return{unsubscribe:function(){t.observers=g(t.observers,(function(t){return e!==t})),!t.observers.length&&t.onLastUnsubscribe&&t.onLastUnsubscribe()}}},notify:function(e){s(this.observers,(function(t){t(e)}))}};var Nt=Ft;function qt(){var e=[].slice.call(arguments),t=new Nt((function(){var n=y(e,(function(e){return e.subscribe((function(e){return t.notify(e)}))}));return function(){return s(n,(function(e){return e.unsubscribe()}))}}));return t}var Vt={};function jt(e){var t=y(e,(function(e){return Vt[e]||(Vt[e]=function(e){var t=new Nt((function(){var n=console[e];return console[e]=function(){var r=[].slice.call(arguments);n.apply(console,arguments);var i=Lt();t.notify(Qt(r,e,i))},function(){console[e]=n}}));return t}(e)),Vt[e]}));return qt.apply(this,t)}function Qt(e,t,n){var r,i=y(e,(function(e){return function(e){if("string"==typeof e)return e;if(e instanceof Error)return Pt(St(e));return P(e,0,2)}(e)})).join(" ");if(t===xe.error){var o=fe(e,(function(e){return e instanceof Error}));r=o?$t(St(o)):void 0,i="console error: "+i}return{api:t,message:i,stack:r,handlingStack:n}}var Wt="intervention",Gt="csp_violation";function Ht(e){var t,n=[];se(e,Gt)&&n.push(t=new Nt((function(){return ae(document,Qe,(function(e){t.notify(function(e){var t=Gt,n="'"+e.blockedURI+"' blocked by '"+e.effectiveDirective+"' directive";return{type:Gt,subtype:e.effectiveDirective,message:t+": "+n,stack:Xt(e.effectiveDirective,n+' of the policy "'+oe(e.originalPolicy,100)+'"',e.sourceFile,e.lineNumber,e.columnNumber)}}(e))})).stop})));var r=g(e,(function(e){return e!==Gt}));return r.length&&n.push(function(e){var t=new Nt((function(){if(window.ReportingObserver){var n=function(e){s(e,(function(e){t.notify(function(e){var t=e.body,n=e.type;return{type:n,subtype:t.id,message:n+": "+t.message,stack:Xt(t.id,t.message,t.sourceFile,t.lineNumber,t.columnNumber)}}(e))}))},r=new window.ReportingObserver(n,{types:e,buffered:!0});return r.observe(),function(){r.disconnect()}}}));return t}(r)),qt.apply(this,n)}function Xt(e,t,n,r,i){return n&&$t({name:e,message:t,stack:[{func:"?",url:n,line:r,column:i}]})}var zt=function(){this._events=[],this.pendingEvents=[]};zt.prototype={emit:function(e){var t=[].slice.call(arguments,1);s(this._events,(function(n){if(n.type!==e)return!1;n.callback.apply(n.context,t)}))},on:function(e,t,n){"function"==typeof t&&this._events.push({type:e,callback:t,context:n||this})}};new zt;var Kt,Jt="PERFORMANCE_ENTRIES_COLLECTED",Yt="AUTO_ACTION_COMPLETED",Zt="VIEW_CREATED",en="VIEW_UPDATED",tn="VIEW_ENDED",nn="SESSION_RENEWED",rn="SESSION_EXPIRED",on="BEFORE_UNLOAD",an="REQUEST_STARTED",un="REQUEST_COMPLETED",sn="RAW_RUM_EVENT_COLLECTED",cn="RUM_EVENT_COLLECTED",fn="RAW_ERROR_COLLECTED";function dn(){this.callbacks=[]}function ln(e,t,n){var r=l({},e),i=n(r);return s(t,(function(t){var n=pn(e,t),i=pn(r,t);"string"==typeof n&&"string"==typeof i&&function(e,t,n){for(var r=e,i=t.split("."),o=0;o<i.length;o+=1){var a=i[o];if(!vn(r,a))return;o!==i.length-1?r=r[a]:r[a]=n}}(e,t,i)})),i}function pn(e,t){var n=e;for(var r of t.split(".")){if(!vn(n,r))return;n=n[r]}return n}function vn(e,t){return"object"==typeof e&&null!==e&&t in e}function hn(e,t,n){var r=0,i=!1;return{isLimitReached:function(){if(0===r&&setTimeout((function(){r=0}),V),(r+=1)<=t||i)return i=!1,!1;if(r===t+1){i=!0;try{n({message:"Reached max number of "+e+"s by minute: "+t,source:Bt.AGENT,startClocks:K()})}finally{i=!1}}return!0}}}function mn(e){return yn(e,le(window.location)).href}function gn(e){return le(yn(e))}function yn(e,t){if(function(){if(void 0!==Kt)return Kt;try{var e=new URL("http://test/path");return Kt="http://test/path"===e.href}catch(e){Kt=!1}return Kt}())return void 0!==t?new URL(e,t):new URL(e);if(void 0===t&&!/:/.test(e))throw new Error("Invalid URL: "+e);var n=document,r=n.createElement("a");if(void 0!==t){var i=(n=document.implementation.createHTMLDocument("")).createElement("base");i.href=t,n.head.appendChild(i),n.body.appendChild(r)}return r.href=e,r}dn.prototype={notify:function(e,t){var n=this.callbacks[e];n&&s(n,(function(e){e(t)}))},subscribe:function(e,t){this.callbacks[e]||(this.callbacks[e]=[]),this.callbacks[e].push(t);var n=this;return{unsubscribe:function(){n.callbacks[e]=g(n.callbacks[e],(function(e){return e!==t}))}}}};var bn=navigator.userAgent.toLowerCase(),wn=function(){return/iphone os/.test(bn)};var _n;function Sn(e,t,n,r){var i=new Date;i.setTime(i.getTime()+n);var o="expires="+i.toUTCString(),a=r&&r.crossSite?"none":"strict",u=r&&r.domain?";domain="+r.domain:"",s=r&&r.secure?";secure":"";document.cookie=e+"="+t+";"+o+";path=/;samesite="+a+u+s}function xn(e){return function(e,t){var n=e.match("(?:^|;)\\s*"+t+"\\s*=\\s*([^;]+)");return n?n[1]:void 0}(document.cookie,e)}var Cn,Tn,En=/^\s+|\s+$/g;function On(e){return e.replace(En,"")}function kn(e){return e.lastIndexOf("/")===e.length-1?On(e)+"v1/write/logging":On(e)+"/v1/write/logging"}function In(e){var t,n;if(void 0===e.sampleRate||de(e.sampleRate))return c({beforeSend:e.beforeSend&&(t=e.beforeSend,n="beforeSend threw an error:",function(){var e=[].slice.call(arguments);try{return t.apply(this,e)}catch(e){Ce.error(n,e)}}),cookieOptions:Rn(e),sampleRate:ye(e.sampleRate,100),service:e.service,version:e.version,env:e.env,silentMultipleInit:!!e.silentMultipleInit,batchBytesLimit:16384,eventRateLimiterThreshold:3e3,flushTimeout:3e4,batchMessagesLimit:50,messageBytesLimit:262144},function(e){var t=function(e){return!1};"isIntakeUrl"in e&&v(e.isIntakeUrl)&&C(e.isIntakeUrl())&&(t=e.isIntakeUrl);var n,r=function(e){return!1};return"isServerError"in e&&v(e.isServerError)&&C(e.isServerError())&&(r=e.isServerError),{datakitUrl:(n=e.datakitUrl||e.datakitOrigin,n.lastIndexOf("/")===n.length-1?On(n)+"v1/write/rum":On(n)+"/v1/write/rum"),logsEndpoint:kn(e.datakitOrigin),isIntakeUrl:t,isServerError:r}}(e));Ce.error("Sample Rate should be a number between 0 and 100")}function Rn(e){var t={};return t.secure=function(e){return!!e.useSecureSessionCookie||!!e.useCrossSiteSessionCookie}(e),t.crossSite=!!e.useCrossSiteSessionCookie,e.trackSessionAcrossSubdomains&&(t.domain=function(){if(void 0===_n){for(var e="dd_site_test_".concat(I()),t=window.location.hostname.split("."),n=t.pop();t.length&&!xn(e);)n=t.pop()+"."+n,Sn(e,"test",q,{domain:n});_n=n}return _n}()),t}function An(){var e;return Cn||(e=new Nt((function(){if(window.fetch){var t=bt(window,"fetch",(function(t){return function(n,r){var i,o=function(e,t,n){var r=n&&n.method||"object"==typeof t&&t.method||"GET",i=mn("object"==typeof t&&t.url||t),o=K(),a={state:"start",init:n,input:t,method:r,startClocks:o,url:i};return e.notify(a),a}(e,n,r);return o?(i=t.call(this,o.input,o.init),function(e,t,n){var r=function(t){var r=n;r.state="complete",r.duration=Z(r.startClocks.timeStamp,J()),"stack"in t||t instanceof Error?(r.status=0,r.isAborted=t instanceof DOMException&&t.code===DOMException.ABORT_ERR,r.error=t,e.notify(r)):"status"in t&&(r.response=t,r.responseType=t.type,r.status=t.status,r.isAborted=!1,e.notify(r))};t.then(r,r)}(e,i,o)):i=t.call(this,n,r),i}}));return t.stop}})),Cn=e),Cn}var Mn={};function Bn(){var e;return Tn||(e=new Nt((function(){var t=wt(XMLHttpRequest.prototype,"open",{before:Un}),n=wt(XMLHttpRequest.prototype,"send",{before:function(){Ln.call(this,e)}}),r=wt(XMLHttpRequest.prototype,"abort",{before:Pn});return function(){t.stop(),n.stop(),r.stop()}})),Tn=e),Tn}function Un(e,t){var n=this._DATAFLUX_REQUEST_UUID||I();this._DATAFLUX_REQUEST_UUID=n,Mn[n]={state:"open",method:e,url:mn(String(t))}}function Ln(e){var t=Mn[this._DATAFLUX_REQUEST_UUID];if(t){var n=t;n.state="start",n.startTime=z(),n.startClocks=K(),n.isAborted=!1,n.xhr=this;var r=!1,i=wt(this,"onreadystatechange",{before:function(){this.readyState===XMLHttpRequest.DONE&&o.call(this)}}),o=function o(){if(this.removeEventListener("loadend",o),i.stop(),!r){r=!0;var a=t;a.state="complete",a.duration=Z(n.startClocks.timeStamp,J()),a.status=this.status,e.notify(f(a)),$n.call(this)}};this.addEventListener("loadend",o),e.notify(n)}}function $n(){delete Mn[this._DATAFLUX_REQUEST_UUID],delete this._DATAFLUX_REQUEST_UUID}function Pn(){var e=Mn[this._DATAFLUX_REQUEST_UUID];e&&(e.isAborted=!0)}var Dn={action_id:"action.id",sdk_name:"_dd.sdk_name",sdk_version:"_dd.sdk_version",app_id:"application.id",env:"env",service:"service",version:"version",userid:"user.id",user_email:"user.email",user_name:"user.name",session_id:"session.id",session_type:"session.type",session_sampling:"session.is_sampling",is_signin:"user.is_signin",os:"device.os",os_version:"device.os_version",os_version_major:"device.os_version_major",browser:"device.browser",browser_version:"device.browser_version",browser_version_major:"device.browser_version_major",screen_size:"device.screen_size",network_type:"device.network_type",device:"device.device",view_id:"view.id",view_referrer:"view.referrer",view_url:"view.url",view_host:"view.host",view_path:"view.path",view_path_group:"view.path_group",view_url_query:"view.url_query"},Fn={view:{type:ut.VIEW,tags:{view_loading_type:"view.loading_type",view_apdex_level:"view.apdex_level",is_active:"view.is_active"},fields:{view_error_count:"view.error.count",view_resource_count:"view.resource.count",view_long_task_count:"view.long_task.count",view_action_count:"view.action.count",first_contentful_paint:"view.first_contentful_paint",largest_contentful_paint:"view.largest_contentful_paint",cumulative_layout_shift:"view.cumulative_layout_shift",first_input_delay:"view.first_input_delay",loading_time:"view.loading_time",dom_interactive:"view.dom_interactive",dom_content_loaded:"view.dom_content_loaded",dom_complete:"view.dom_complete",load_event:"view.load_event",first_input_time:"view.first_input_time",first_meaningful_paint:"view.largest_contentful_paint",first_paint_time:"view.fpt",resource_load_time:"view.resource_load_time",time_to_interactive:"view.tti",dom:"view.dom",dom_ready:"view.dom_ready",time_spent:"view.time_spent"}},resource:{type:ut.RESOURCE,tags:{trace_id:"_dd.trace_id",span_id:"_dd.span_id",resource_url:"resource.url",resource_url_host:"resource.url_host",resource_url_path:"resource.url_path",resource_url_path_group:"resource.url_path_group",resource_url_query:"resource.url_query",resource_type:"resource.type",resource_status:"resource.status",resource_status_group:"resource.status_group",resource_method:"resource.method"},fields:{duration:"resource.duration",resource_size:"resource.size",resource_dns:"resource.dns",resource_tcp:"resource.tcp",resource_ssl:"resource.ssl",resource_ttfb:"resource.ttfb",resource_trans:"resource.trans",resource_first_byte:"resource.firstbyte"}},error:{type:ut.ERROR,tags:{error_id:"error.id",trace_id:"_dd.trace_id",span_id:"_dd.span_id",error_source:"error.source",error_type:"error.type",error_handling:"error.handling"},fields:{error_message:["string","error.message"],error_stack:["string","error.stack"],error_causes:["string","error.causes"]}},long_task:{type:ut.LONG_TASK,tags:{long_task_id:"long_task.id"},fields:{duration:"long_task.duration"}},action:{type:ut.ACTION,tags:{action_name:"action.target.name",action_type:"action.type"},fields:{duration:"action.loading_time",action_error_count:"action.error.count",action_resource_count:"action.resource.count",action_frustration_types:"action.frustration.type",action_long_task_count:"action.long_task.count"}},browser_log:{type:ut.LOGGER,tags:{error_source:"error.source",error_type:"error.type",error_resource_url:"http.url",error_resource_url_host:"http.url_host",error_resource_url_path:"http.url_path",error_resource_url_path_group:"http.url_path_group",error_resource_status:"http.status_code",error_resource_status_group:"http.status_group",error_resource_method:"http.method",action_id:"user_action.id",service:"service",status:"status"},fields:{message:["string","message"]}}};var Nn,qn=144e5,Vn=9e5,jn=/^([a-z]+)=([a-z0-9-]+)$/,Qn="&",Wn="_dataflux_s",Gn=[];function Hn(e,t){if(void 0===t&&(t=0),Nn||(Nn=e),e===Nn)if(t>=100)Kn();else{var n,r=Yn();if(Xn()){if(r.lock)return void zn(e,t);if(n=I(),r.lock=n,Jn(r,e.options),(r=Yn()).lock!==n)return void zn(e,t)}var i=e.process(r);if(Xn()&&(r=Yn()).lock!==n)zn(e,t);else{if(i&&function(e,t){if(Zn(e))return void function(e){Sn(Wn,"",0,e)}(t);e.expire=String(Y()+Vn),Jn(e,t)}(i,e.options),Xn()&&(!i||!Zn(i))){if((r=Yn()).lock!==n)return void zn(e,t);delete r.lock,Jn(r,e.options),i=r}e.after&&e.after(i||r),Kn()}}else Gn.push(e)}function Xn(){return!!window.chrome||/HeadlessChrome/.test(window.navigator.userAgent)}function zn(e,t){setTimeout((function(){Hn(e,t+1)}),10)}function Kn(){Nn=void 0;var e=Gn.shift();e&&Hn(e)}function Jn(e,t){Sn(Wn,function(e){return y(S(e),(function(e){return e[0]+"="+e[1]})).join(Qn)}(e),Vn,t)}function Yn(){var e=xn(Wn),t={};return function(e){return void 0!==e&&(-1!==e.indexOf(Qn)||jn.test(e))}(e)&&s(e.split(Qn),(function(e){var n=jn.exec(e);if(null!==n){var r=n[1],i=n[2];t[r]=i}})),t}function Zn(e){return _(e)}function er(e,t,n){var r=new Nt,i=new Nt,o=setInterval((function(){Hn({options:e,process:function(e){return c(e)?void 0:{}},after:u})}),1e3),a=function(){var e=Yn();if(c(e))return e;return{}}();function u(e){return c(e)||(e={}),s()&&(!function(e){return a.id!==e.id||a[t]!==e[t]}(e)?a=e:(a={},i.notify())),e}function s(){return void 0!==a[t]}function c(e){return(void 0===e.created||Y()-Number(e.created)<qn)&&(void 0===e.expire||Y()<Number(e.expire))}return{expandOrRenewSession:O((function(){var i;Hn({options:e,process:function(e){var r=u(e);return i=function(e){var r=n(e[t]),i=r.trackingType,o=r.isTracked;e[t]=i,o&&!e.id&&(e.id=I(),e.created=String(Y()));return o}(r),r},after:function(e){i&&!s()&&function(e){a=e,r.notify()}(e),a=e}})}),1e3),expandSession:function(){Hn({options:e,process:function(e){return s()?u(e):void 0}})},getSession:function(){return a},renewObservable:r,expireObservable:i,stop:function(){clearInterval(o)}}}var tr=[],nr=function(e,t,n){var r=er(e,t,n);tr.push((function(){return r.stop()}));var i,o=new Se(144e5);function a(){return{id:r.getSession().id,trackingType:r.getSession()[t]}}return tr.push((function(){return o.stop()})),r.renewObservable.subscribe((function(){o.add(a(),z())})),r.expireObservable.subscribe((function(){o.closeActive(z())})),r.expandOrRenewSession(),o.add(a(),ee().relative),i=ue(window,[Ie,Ue,Re,Be],(function(){return r.expandOrRenewSession()}),{capture:!0,passive:!0}),tr.push(i.stop),function(e){var t=function(){"visible"===document.visibilityState&&e()},n=ae(document,Le,t);tr.push(n.stop);var r=setInterval(t,6e4);tr.push((function(){clearInterval(r)}))}((function(){return r.expandSession()})),{findActiveSession:function(e){return o.find(e)},renewObservable:r.renewObservable,expireObservable:r.expireObservable}};var rr=3145728,ir="UP",or="FAILURE_DETECTED",ar="DOWN",ur="AFTER_SUCCESS",sr="AFTER_RESUME";function cr(e,t,n,r){t.transportStatus===ir&&0===t.queuedPayloads.size()&&t.bandwidthMonitor.canHandle(e)?dr(e,t,n,{onSuccess:function(){return lr(ur,t,n,r)},onFailure:function(){t.queuedPayloads.enqueue(e),fr(t,n,r)}}):t.queuedPayloads.enqueue(e)}function fr(e,t,n){e.transportStatus===ar&&setTimeout((function(){dr(e.queuedPayloads.first(),e,t,{onSuccess:function(){e.queuedPayloads.dequeue(),e.currentBackoffTime=1e3,lr(sr,e,t,n)},onFailure:function(){e.currentBackoffTime=Math.min(256e3,2*e.currentBackoffTime),fr(e,t,n)}})}),e.currentBackoffTime)}function dr(e,t,n,r){var i=r.onSuccess,o=r.onFailure;t.bandwidthMonitor.add(e),n(e,(function(n){t.bandwidthMonitor.remove(e),!function(e){return 0!==e.status&&e.status<500}(n)?(t.transportStatus=t.bandwidthMonitor.ongoingRequestCount>0?or:ar,t.lastFailureStatus=n.status,o()):(t.transportStatus=ir,i())}))}function lr(e,t,n,r){e===ur&&t.queuedPayloads.isFull()&&!t.queueFullReported&&(r({message:"Reached max events size queued for upload: 3MiB",source:Bt.AGENT,startClocks:K()}),t.queueFullReported=!0);var i=t.queuedPayloads;for(t.queuedPayloads=pr();i.size()>0;)cr(i.dequeue(),t,n,r)}function pr(){var e=[];return{bytesCount:0,enqueue:function(t){this.isFull()||(e.push(t),this.bytesCount+=t.bytesCount)},first:()=>e[0],dequeue(){var t=e.shift();return t&&(this.bytesCount-=t.bytesCount),t},size:()=>e.length,isFull(){return this.bytesCount>=rr}}}function vr(e){return e?e+(-1===e.indexOf("?")?"?":"&")+"precision=ms":e}function hr(e,t,n){var r={transportStatus:ir,lastFailureStatus:0,currentBackoffTime:1e3,bandwidthMonitor:{ongoingRequestCount:0,ongoingByteCount:0,canHandle:function(e){return 0===this.ongoingRequestCount||this.ongoingByteCount+e.bytesCount<=81920&&this.ongoingRequestCount<32},add:function(e){this.ongoingRequestCount+=1,this.ongoingByteCount+=e.bytesCount},remove:function(e){this.ongoingRequestCount-=1,this.ongoingByteCount-=e.bytesCount}},queuedPayloads:pr(),queueFullReported:!1},i=function(n,r){return function(e,t,n,r){var i=n.data,o=n.bytesCount,a=vr(e);(function(){try{return window.Request&&"keepalive"in new Request("http://a")}catch(e){return!1}})()&&o<t?fetch(a,{method:"POST",body:i,keepalive:!0}).then((function(e){"function"==typeof r&&r({status:e.status})}),(function(){mr(a,i,r)})):mr(a,i,r)}(e,t,n,r)};return{send:function(e){cr(e,r,i,n)},sendOnExit:function(n){!function(e,t,n){var r=n.data,i=n.bytesCount,o=vr(e);if(navigator.sendBeacon&&i<t)try{if(navigator.sendBeacon(o,r))return}catch(e){}mr(o,r)}(e,t,n)}}}function mr(e,t,n){var r=new XMLHttpRequest;r.open("POST",e,!0),r.send(t),r.addEventListener("loadend",(function(){"function"==typeof n&&n({status:r.status})}))}var gr=/[^\u0000-\u007F]/,yr="custom_keys",br=function(e){if(!e||!e.type)return{rowStr:"",rowData:void 0};var t={tags:{},fields:{}},n=!1,r="";return s(Fn,(function(i,o){if(i.type===e.type){r+=o+",",t.measurement=o;var a=[],u=d({},Dn,i.tags),c=["date","type",yr];s(u,(function(n,r){var i=ie(e,n);c.push(r),(i||T(i))&&(t.tags[r]=function(e){return x(e)?e:P(e)}(i),a.push(he(r)+"="+he(i)))}));var f=[];if(s(i.fields,(function(n,r){if(p(n)&&2===n.length){n[0];var i=n[1],o=ie(e,i);c.push(r),(o||T(o))&&(t.fields[r]=o,f.push(he(r)+"="+ge(o)))}else if(x(n)){o=ie(e,n);c.push(r),(o||T(o))&&(t.fields[r]=o,f.push(he(r)+"="+ge(o)))}})),e.tags&&w(e.tags)&&!_(e.tags)){var l=[];s(e.tags,(function(e,n){c.indexOf(n)>-1||(c.push(n),(e||T(e))&&(l.push(n),t.fields[n]=e,f.push(he(n)+"="+ge(e))))})),l.length&&(t.fields.custom_keys=ge(l),f.push(he(yr)+"="+ge(l)))}e.type===ut.LOGGER&&s(e,(function(e,n){-1===c.indexOf(n)&&(T(e)||x(e)||C(e))&&(t.fields[n]=e,f.push(he(n)+"="+ge(e)))})),a.length&&(r+=a.join(",")),f.length&&(r+=" ",r+=f.join(","),n=!0),r=r+" "+e.date,t.time=G(e.date)}})),{rowStr:n?r:"",rowData:n?t:void 0}},wr=function(e,t,n,r,i,o){this.pushOnlyBuffer=[],this.upsertBuffer={},this.bufferBytesCount=0,this.bufferMessagesCount=0,this.request=e,this.batchMessagesLimit=t,this.batchBytesLimit=n,this.messageBytesLimit=r,this.flushTimeout=i,this.beforeUnloadCallback="function"==typeof o?o:F,this.setupFlushOnExit(),this.flushPeriodically()};wr.prototype.add=function(e){this.addOrUpdate(e)},wr.prototype.upsert=function(e,t){this.addOrUpdate(e,t)},wr.prototype.flush=function(e){if("function"!=typeof e&&(e=this.request.send),0!==this.bufferMessagesCount){var t=this.pushOnlyBuffer.concat(m(this.upsertBuffer)),n=this.bufferBytesCount;this.pushOnlyBuffer=[],this.upsertBuffer={},this.bufferBytesCount=0,this.bufferMessagesCount=0,t.length>0&&e({data:t.join("\n"),bytesCount:n})}},wr.prototype.flushOnExit=function(){this.flush(this.request.sendOnExit)},wr.prototype.computeBytesCount=function(e){return gr.test(e)?void 0!==window.TextEncoder?(new TextEncoder).encode(e).length:new Blob([e]).size:e.length},wr.prototype.addOrUpdate=function(e,t){var n=this.process(e),r=n.processedMessage,i=n.messageBytesCount;i>=this.messageBytesLimit?Ce.warn("Discarded a message whose size was bigger than the maximum allowed size "+this.messageBytesLimit+"KB."):(this.hasMessageFor(t)&&this.remove(t),this.willReachedBytesLimitWith(i)&&this.flush(),this.push(r,i,t),this.isFull()&&this.flush())},wr.prototype.process=function(e){var t=br(e).rowStr;return{processedMessage:t,messageBytesCount:this.computeBytesCount(t)}},wr.prototype.push=function(e,t,n){this.bufferMessagesCount>0&&(this.bufferBytesCount+=1),void 0!==n?this.upsertBuffer[n]=e:this.pushOnlyBuffer.push(e),this.bufferBytesCount+=t,this.bufferMessagesCount+=1},wr.prototype.remove=function(e){var t=this.upsertBuffer[e];delete this.upsertBuffer[e];var n=this.computeBytesCount(t);this.bufferBytesCount-=n,this.bufferMessagesCount-=1,this.bufferMessagesCount>0&&(this.bufferBytesCount-=1)},wr.prototype.hasMessageFor=function(e){return void 0!==e&&void 0!==this.upsertBuffer[e]},wr.prototype.willReachedBytesLimitWith=function(e){return this.bufferBytesCount+e+1>=this.batchBytesLimit},wr.prototype.isFull=function(){return this.bufferMessagesCount===this.batchMessagesLimit||this.bufferBytesCount>=this.batchBytesLimit},wr.prototype.flushPeriodically=function(){var e=this;setTimeout((function(){e.flush(),e.flushPeriodically()}),this.flushTimeout)},wr.prototype.setupFlushOnExit=function(){var e=this;navigator.sendBeacon&&(ae(window,ke,this.beforeUnloadCallback),ae(document,Le,(function(){"hidden"===document.visibilityState&&e.flushOnExit()})),ae(window,ke,(function(){return e.flushOnExit()})))};var _r=wr;var Sr="0",xr="1",Cr="2";function Tr(e,t){var n=nr(e.cookieOptions,"rum",(function(t){return function(e,t){var n;n=function(e){return e===Sr||e===xr||e===Cr}(t)?t:j(e.sampleRate)?j(e.sessionReplaySampleRate)?xr:Cr:Sr;return{trackingType:n,isTracked:Er(n)}}(e,t)}));return n.expireObservable.subscribe((function(){t.notify(rn)})),n.renewObservable.subscribe((function(){t.notify(nn)})),{findTrackedSession:function(e){var t=n.findActiveSession(e);if(t&&Er(t.trackingType))return{id:t.id}}}}function Er(e){return e===Cr||e===xr}var Or="_dataflulx_usr_id",kr="initial_document",Ir=[[Ge,function(e){return kr===e}],[He,function(e){return"xmlhttprequest"===e}],[ze,function(e){return"fetch"===e}],[Xe,function(e){return"beacon"===e}],[Ke,function(e,t){return null!==t.match(/\.css$/i)}],[Je,function(e,t){return null!==t.match(/\.js$/i)}],[Ye,function(e,t){return se(["image","img","icon"],e)||null!==t.match(/\.(gif|jpg|jpeg|tiff|png|svg|ico)$/i)}],[Ze,function(e,t){return null!==t.match(/\.(woff|eot|woff2|ttf)$/i)}],[et,function(e,t){return se(["audio","video"],e)||null!==t.match(/\.(mp3|mp4)$/i)}]];function Rr(e){var t=e.name;if(!function(e){try{return!!yn(e)}catch(e){return!1}}(t))return tt;var n=function(e){var t=yn(e).pathname;return"/"===t[0]?t:"/"+t}(t),r=tt;return s(Ir,(function(t){var i=t[0];if((0,t[1])(e.initiatorType,n))return r=i,!1})),r}function Ar(){for(var e=h(arguments),t=1;t<e.length;t+=1)if(e[t-1]>e[t])return!1;return!0}function Mr(e){var t=Br(e);if(t){var n=t.startTime,r=t.fetchStart,i=t.redirectStart,o=t.redirectEnd,a=t.domainLookupStart,u=t.domainLookupEnd,s=t.connectStart,c=t.secureConnectionStart,f=t.connectEnd,d=t.requestStart,l=t.responseStart,p=t.responseEnd,v={firstbyte:Lr(n,a,l),trans:Lr(n,l,p),ttfb:Lr(n,d,l)};return f!==r&&(v.tcp=Lr(n,s,f),Ar(s,c,f)&&(v.ssl=Lr(n,c,f))),u!==r&&(v.dns=Lr(n,a,u)),Ur(e)&&(v.redirect=Lr(n,i,o)),v}}function Br(e){if(Ar(e.startTime,e.fetchStart,e.domainLookupStart,e.domainLookupEnd,e.connectStart,e.connectEnd,e.requestStart,e.responseStart,e.responseEnd)){if(!Ur(e))return e;var t=e.redirectStart,n=e.redirectEnd;if(t<e.startTime&&(t=e.startTime),n<e.startTime&&(n=e.fetchStart),Ar(e.startTime,t,n,e.fetchStart))return d({},e,{redirectEnd:n,redirectStart:t})}}function Ur(e){return e.fetchStart!==e.startTime}function Lr(e,t,n){return W(n-t)}function $r(e){if(e.startTime<e.responseStart)return e.decodedBodySize}function Pr(e,t){return t&&!function(e,t){var n=[t.datakitUrl];return t.logsEndpoint&&n.push(t.logsEndpoint),b(n,(function(t){return 0===e.indexOf(t)}))||t.isIntakeUrl(e)}(t,e)}function Dr(){return void 0!==window.performance&&"getEntries"in performance}function Fr(e){return window.PerformanceObserver&&void 0!==PerformanceObserver.supportedEntryTypes&&se(PerformanceObserver.supportedEntryTypes,e)}function Nr(e,t){var n;if(n=function(n){jr(e,t,[n])},qr("interactive",(function(){var e,t={entryType:"resource",initiatorType:kr,traceId:""};if(Fr("navigation")&&performance.getEntriesByType("navigation").length>0){var r=performance.getEntriesByType("navigation")[0];e=d(r.toJSON(),t)}else{var i=Vr();e=d(i,{decodedBodySize:0,duration:i.responseEnd,name:window.location.href,startTime:0},t)}n(e)})),Dr()){var r=performance.getEntries();setTimeout((function(){jr(e,t,r)}))}if(window.PerformanceObserver){var i=function(n){jr(e,t,n.getEntries())},o=["resource","navigation","longtask","paint"],a=["largest-contentful-paint","first-input","layout-shift"];try{s(a,(function(e){new PerformanceObserver(i).observe({type:e,buffered:!0})}))}catch(e){s(a,(function(e){o.push(e)}))}new PerformanceObserver(i).observe({entryTypes:o}),Dr()&&"addEventListener"in performance&&performance.addEventListener("resourcetimingbufferfull",(function(){performance.clearResourceTimings()}))}Fr("navigation")||function(e){function t(){e(d(Vr(),{entryType:"navigation"}))}qr("complete",(function(){setTimeout(t)}))}((function(n){jr(e,t,[n])})),Fr("first-input")||function(e){var t=Y(),n=!1,r=ue(window,[Ie,Ve,Re,Ue,Pe],(function(e){if(e.cancelable){var t={entryType:"first-input",processingStart:z(),startTime:e.timeStamp};e.type===Pe?i(t):o(t)}}),{passive:!0,capture:!0}).stop;function i(e){ue(window,[De,Fe],(function(t){t.type===De&&o(e)}),{once:!0})}function o(i){if(!n){n=!0,r();var o=i.processingStart-i.startTime;o>=0&&o<Y()-t&&e(i)}}}((function(n){return jr(e,t,[n])}))}function qr(e,t){document.readyState===e||"complete"===document.readyState?t():ae(window,"complete"===e?Ae:$e,t,{once:!0})}function Vr(){var e={},t=performance.timing;for(var n in t)T(t[n])&&(e[n]=0===t[n]?0:H(t[n]));return e}function jr(e,t,n){var r=g(n,(function(e){return"resource"===e.entryType||"navigation"===e.entryType||"paint"===e.entryType||"longtask"===e.entryType||"largest-contentful-paint"===e.entryType||"first-input"===e.entryType||"layout-shift"===e.entryType})),i=g(r,(function(e){return!function(e){return"navigation"===e.entryType&&e.loadEventEnd<=0}(e)&&!function(e,t){return"resource"===t.entryType&&!Pr(e,t.name)}(t,e)}));i.length&&e.notify(Jt,i)}function Qr(){var e=function(){var e,t=window;if(t.Zone){var n=t.Zone.__symbol__;if(!(e=t[n("MutationObserver")])&&t.MutationObserver){var r=new t.MutationObserver(F)[n("originalInstance")];e=r&&r.constructor}}e||(e=t.MutationObserver);return e}(),t=new Nt((function(){if(e){var n=new e((function(){return t.notify()}));return n.observe(document,{attributes:!0,characterData:!0,childList:!0,subtree:!0}),function(){return n.disconnect()}}}));return t}function Wr(e){var t=f(e),n=new Nt((function(){var e=function(e){var t=history.pushState;history.pushState=function(){t.apply(this,arguments),e()};var n=history.replaceState;history.replaceState=function(){n.apply(this,arguments),e()};var r=ae(window,Me,e).stop;return{stop:function(){r(),history.pushState=t,history.replaceState=n}}}(r),t=ae(window,Ne,r);return function(){e.stop(),t.stop()}}));function r(){if(t.href!==e.href){var r=f(e);n.notify({newLocation:r,oldLocation:t}),t=r}}return n}function Gr(e,t){void 0===t&&(t=F);var n={errorCount:0,longTaskCount:0,resourceCount:0,actionCount:0,frustrationCount:0},r=e.subscribe(cn,(function(e){switch(e.type){case ut.ERROR:n.errorCount+=1,t(n);break;case ut.ACTION:e.action.frustration&&(n.frustrationCount+=e.action.frustration.type.length),n.actionCount+=1,t(n);break;case ut.LONG_TASK:n.longTaskCount+=1,t(n);break;case ut.RESOURCE:n.resourceCount+=1,t(n)}}));return{stop:function(){r.unsubscribe()},eventCounts:n}}function Hr(e,t,n,r,i){var o=function(e,t,n){var r=new Nt((function(){var i,o=[],a=0;return o.push(t.subscribe(u),e.subscribe(Jt,(function(e){b(e,(function(e){return"resource"===e.entryType&&!Xr(n,e.name)}))&&u()})),e.subscribe(an,(function(e){Xr(n,e.url)||(void 0===i&&(i=e.requestIndex),a+=1,u())})),e.subscribe(un,(function(e){Xr(n,e.url)||void 0===i||e.requestIndex<i||(a-=1,u())}))),wt(window,"open",{before:u}),function(){s(o,(function(e){e.unsubscribe()}))};function u(){r.notify({isBusy:a>0})}}));return r}(e,t,n);return function(e,t,n){var r,i=!1,o=setTimeout((function(){c({hadActivity:!1})}),100),a=n&&setTimeout((function(){return c({hadActivity:!0,end:J()})}),n),u=e.subscribe((function(e){var t=e.isBusy;clearTimeout(o),clearTimeout(r);var n=J();t||(r=setTimeout((function(){c({hadActivity:!0,end:n})}),100))})),s=function(){i=!0,clearTimeout(o),clearTimeout(r),clearTimeout(a),u.unsubscribe()};function c(e){i||(s(),t(e))}return{stop:s}}(o,r,i)}function Xr(e,t){return n=e.excludedActivityUrls,r=t,b(n,(function(e){return e===r||e instanceof RegExp&&e.test(r)}));var n,r}var zr=q,Kr="WaitingForMoreClicks",Jr="WaitingForClicksToStop",Yr="Finalized";function Zr(e,t){var n,r=[],i=Kr;function a(e){e.stopObservable.subscribe(u),r.push(e),clearTimeout(n),n=setTimeout(s,1e3)}function u(){i===Jr&&function(e,t,n){if(e.every)return e.every(t);for(var r=!0,i=0;i<e.length;i++)if(o.call(e,i)){var a=e[i];if(!t.call(n,a,i,e)){r=!1;break}}return r}(r,(function(e){return e.isStopped()}))&&(i=Yr,t(r))}function s(){clearTimeout(n),i===Kr&&(i=Jr,u())}return a(e),{tryAppend:function(e){return i===Kr&&(r.length>0&&(t=r[r.length-1].event,n=e.event,!(t.target===n.target&&(o=t,u=n,Math.sqrt(Math.pow(o.clientX-u.clientX,2)+Math.pow(o.clientY-u.clientY,2))<=100)&&t.timeStamp-n.timeStamp<=zr))?(s(),!1):(a(e),!0));var t,n,o,u},stop:function(){s()}}}var ei="data-guance-action-name";function ti(e,t){return ni(e,ei)||t&&ni(e,t)||ui(e,t,oi)||ui(e,t,ai)||""}function ni(e,t){var n;if(function(){void 0===ii&&(ii="closest"in HTMLElement.prototype);return ii}())n=e.closest("["+t+"]");else for(var r=e;r;){if(r.hasAttribute(t)){n=r;break}r=r.parentElement}if(n)return ci(si(n.getAttribute(t).trim()))}var ri,ii,oi=[function(e,t){if(function(){void 0===ri&&(ri="labels"in HTMLInputElement.prototype);return ri}()){if("labels"in e&&e.labels&&e.labels.length>0)return fi(e.labels[0],t)}else if(e.id){var n=e.ownerDocument&&fe(e.ownerDocument.querySelectorAll("label"),(function(t){return t.htmlFor===e.id}));return n&&fi(n,t)}},function(e){if("INPUT"===e.nodeName){var t=e,n=t.getAttribute("type");if("button"===n||"submit"===n||"reset"===n)return t.value}},function(e,t){if("BUTTON"===e.nodeName||"LABEL"===e.nodeName||"button"===e.getAttribute("role"))return fi(e,t)},function(e){return e.getAttribute("aria-label")},function(e,t){var n=e.getAttribute("aria-labelledby");if(n)return n=n.split(/\s+/),n=y(n,(function(t){return function(e,t){return e.ownerDocument?e.ownerDocument.getElementById(t):null}(e,t)})),n=g(n,(function(e){return Boolean(e)})),(n=y(n,(function(e){return fi(e)}))).join(" ")},function(e){return e.getAttribute("alt")},function(e){return e.getAttribute("name")},function(e){return e.getAttribute("title")},function(e){return e.getAttribute("placeholder")},function(e){if("options"in e&&e.options.length>0)return fi(e.options[0])}],ai=[function(e,t){return fi(e,t)}];function ui(e,t,n){for(var r=e,i=0;i<=10&&r&&"BODY"!==r.nodeName&&"HTML"!==r.nodeName&&"HEAD"!==r.nodeName;){for(var o of n){var a=o(r,t);if("string"==typeof a){var u=a.trim();if(u)return ci(si(u))}}if("FORM"===r.nodeName)break;r=r.parentElement,i+=1}}function si(e){return e.replace(/\s+/g," ")}function ci(e){return e.length>100?oe(e,100)+" [...]":e}function fi(e,t){if(!e.isContentEditable){if("innerText"in e){var n=e.innerText,r=function(t){for(var r=e.querySelectorAll(t),i=0;i<r.length;i+=1){var o=r[i];if("innerText"in o){var a=o.innerText;a&&a.trim().length>0&&(n=n.replace(a,""))}}};return Boolean(document.documentMode)&&r("script, style"),r("[data-guance-action-name]"),t&&r("["+t+"]"),n}return e.textContent}}function di(){var e=window.getSelection();return!e||e.isCollapsed}function li(e){return e.target instanceof Element}function pi(e,t){if(function(e){if(b(e,(function(e){return e.getUserActivity().selection})))return!1;for(var t=0;t<e.length-2;t+=1)if(e[t+3-1].event.timeStamp-e[t].event.timeStamp<=q)return!0;return!1}(e))return t.addFrustration(it),e.some(vi)&&t.addFrustration(at),t.hasError&&t.addFrustration(ot),{isRage:!0};var n=b(e,(function(e){return e.getUserActivity().selection}));return s(e,(function(e){e.hasError&&e.addFrustration(ot),vi(e)&&!n&&e.addFrustration(at)})),{isRage:!1}}function vi(e){return!e.hasPageActivity&&!e.getUserActivity().input&&(t=e.event.target,n='input:not([type="checkbox"]):not([type="radio"]):not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="range"]),textarea,select,canvas,a[href],a[href] *',!(t.matches?t.matches(n):t.msMatchesSelector&&t.msMatchesSelector(n)));var t,n}function hi(e,t,n){var r,i=new Se(3e5),o=new Nt;e.subscribe(nn,(function(){i.reset()})),e.subscribe(on,g),e.subscribe(tn,g);var a,u,c,f,d,l,p,v,h=(a={onPointerDown:function(e){return function(e,t){return function(e,t){var n,r;return{type:"click",target:n,position:r,name:ti(e.target,t)}}(t,e.actionNameAttribute)}(n,e)},onClick:function(r,a,u){return function(e,t,n,r,i,o,a,u,s){var c=bi(t,r,s,a,u);e.trackFrustrations&&o(c);var f=Hr(t,n,e,(function(t){t.hadActivity&&t.end<c.startClocks.timeStamp?c.discard():(c.stop(t.hadActivity?t.end:void 0),e.trackFrustrations||(t.hadActivity?c.validate():c.discard()))}),1e4),d=t.subscribe(tn,(function(e){c.stop(e.endClocks.timeStamp)})),l=i.subscribe((function(){c.stop()}));c.stopObservable.subscribe((function(){d.unsubscribe(),f.stop(),l.unsubscribe()}))}(n,e,t,i,o,b,r,a,u)}},f=a.onClick,d=a.onPointerDown,l=!1,p=!1,v=[ae(window,Pe,(function(e){l=!1,u=di(),li(e)&&(c=d(e))}),{capture:!0}),ae(window,We,(function(){u&&di()||(l=!0)}),{capture:!0}),ae(window,Ie,(function(e){if(li(e)&&c){var t={selection:l,input:p};p||setTimeout((function(){t.input=p})),f(c,e,(function(){return t})),c=void 0}}),{capture:!0}),ae(window,je,(function(){p=!0}),{capture:!0})],{stop:function(){s(v,(function(e){return e.stop()}))}}),m=h.stop;return{stop:function(){g(),o.notify(),m()},actionContexts:{findActionId:function(e){return n.trackFrustrations?i.findAll(e):i.find(e)}}};function g(){r&&r.stop()}function b(e){if(!r||!r.tryAppend(e)){var t=e.clone();r=Zr(e,(function(e){!function(e,t){pi(e,t).isRage?(s(e,(function(e){e.discard()})),t.stop(J()),t.validate(y(e,(function(e){return e.event})))):(t.discard(),s(e,(function(e){e.validate()})))}(e,t)}))}}}var mi="ONGOING",gi="STOPPED",yi="FINALIZED";function bi(e,t,n,r,i){var o,a=I(),u=K(),s=t.add(a,u.relative),f=Gr(e),d=mi,l=[],p=new Nt;function v(e){d===mi&&(d=gi,(o=e)?s.close(H(o)):s.remove(),f.stop(),p.notify())}return{event:i,stop:v,startClocks:u,stopObservable:p,hasError:f.eventCounts.errorCount>0,hasPageActivity:void 0!==o,getUserActivity:n,addFrustration:function(e){l.push(e)},isStopped:function(){return d===gi||d===yi},clone:function(){return bi(e,t,n,r,i)},validate:function(t){if(v(),d===gi){var n=f.eventCounts,s=n.resourceCount,p=n.errorCount,h=n.longTaskCount,m=c({type:nt,duration:o&&Z(u.timeStamp,o),startClocks:u,id:a,frustrationTypes:l,counts:{resourceCount:s,errorCount:p,longTaskCount:h},events:ye(t,[i]),event:i},r);e.notify(Yt,m),d=yi}},discard:function(){v(),d=yi}}}function wi(e){var t=_i(e)?{action:{error:{count:e.counts.errorCount},id:e.id,loadingTime:G(e.duration),frustration:{type:e.frustrationTypes},long_task:{count:e.counts.longTaskCount},resource:{count:e.counts.resourceCount}},_dd:{action:{target:e.target,position:e.position}}}:{action:{loadingTime:0}};return{customerContext:_i(e)?void 0:e.context,rawRumEvent:l({action:{id:I(),target:{name:e.name},type:e.type},date:e.startClocks.timeStamp,type:ut.ACTION},t),startTime:e.startClocks.relative,domainContext:_i(e)?{event:e.event,events:e.events}:{}}}function _i(e){return e.type!==rt}function Si(e,t,n){var r=function(e,t,n){var r=i(e.datakitUrl,(function(){t.notify(on)}));function i(t,r){return new _r(hr(t,e.batchBytesLimit,n),e.batchMessagesLimit,e.batchBytesLimit,e.messageBytesLimit,e.flushTimeout,r)}return{add:function(e){r.add(e)},upsert:function(e,t){r.upsert(e,t)}}}(e,t,n);t.subscribe(cn,(function(e){e.type===ut.VIEW?r.upsert(e,e.view.id):r.add(e)}))}var xi="synthetics",Ci="user",Ti=["view.url","view.referrer","action.target.name","error.message","error.stack","error.resource.url","resource.url"],Ei=Ti.concat(["tags"]);function Oi(e,t,n,r,i,o,a,u,s){var c={};c[ut.ERROR]=hn(ut.ERROR,e.eventRateLimiterThreshold,s),c[ut.ACTION]=hn(ut.ACTION,e.eventRateLimiterThreshold,s),t.subscribe(sn,(function(s){var f=s.startTime,d=s.rawRumEvent,p=s.savedCommonContext,v=s.customerContext,h=s.domainContext,m=i.findView(f),g=o.findUrl(f),y=n.findTrackedSession(d.type!==ut.VIEW?f:void 0);if(y&&m&&g){var b=a.findActionId(f),w=p||u(),S={_dd:{sdkName:e.sdkName,sdkVersion:e.sdkVersion,drift:Math.round(Y()-(re()+performance.now()))},terminal:{type:"web"},application:{id:e.applicationId},device:Oe,env:e.env||"",service:m.service||e.service||"browser",version:m.version||e.version||"",source:"browser",date:J(),user:{id:r.getId(),is_signin:"F"},session:{type:void 0===window._DATAFLUX_SYNTHETICS_BROWSER?Ci:xi,id:y.id},view:{id:m.id,name:m.name,url:g.url,referrer:g.referrer,host:g.host,path:g.path,pathGroup:g.pathGroup,urlQuery:g.urlQuery},action:ki(d)&&b?{id:b}:void 0},x=pe(l(S,m,d)),C=l({},w.context,v);_(C)||(x.tags=C),"has_replay"in x.session||(x.session.has_replay=w.hasReplay),_(w.user)||(x.user=l({is_signin:"T"},w.user)),function(e,t,n,r){if(t){var i=ln(e,e.type===ut.VIEW?Ti:Ei,(function(e){return t(e,r)}));if(!1===i&&e.type!==ut.VIEW)return!1;!1===i&&Ce.warn("Can't dismiss view events using beforeSend!")}var o=!1;n[e.type]&&(o=n[e.type].isLimitReached());return!o}(x,e.beforeSend,c,h)&&(_(x.tags)&&delete x.tags,t.notify(cn,x))}}))}function ki(e){return-1!==[ut.ERROR,ut.RESOURCE,ut.LONG_TASK].indexOf(e.type)}var Ii;function Ri(e){var t=new Nt;return function(e){var t=jt([xe.error]).subscribe((function(t){e.notify({startClocks:K(),message:t.message,stack:t.stack,source:Bt.CONSOLE,handling:gt,handlingStack:t.handlingStack})}))}(t),function(e){Mt((function(t,n){e.notify(Ut({stackTrace:t,originalError:n,startClocks:K(),nonErrorPrefix:"Uncaught",source:Bt.SOURCE,handling:yt}))}))}(t),function(e){var t=Ht([Gt,Wt]).subscribe((function(t){e.notify({startClocks:K(),message:t.message,stack:t.stack,type:t.subtype,source:Bt.REPORT,handling:yt})}))}(t),t.subscribe((function(t){e.notify(fn,{error:t})})),function(e){return e.subscribe(fn,(function(t){e.notify(sn,c({customerContext:t.customerContext,savedCommonContext:t.savedCommonContext},function(e){return{rawRumEvent:{date:e.startClocks.timeStamp,error:{id:I(),message:e.message,source:e.source,stack:e.stack,handling_stack:e.handlingStack,type:e.type,handling:e.handling,causes:e.causes,source_type:"browser"},type:ut.ERROR},startTime:e.startClocks.relative,domainContext:{error:e.originalError}}}(t.error)))})),{addError:function(t,n){var r=t.error,i=Ut({stackTrace:r instanceof Error?St(r):void 0,originalError:r,handlingStack:t.handlingStack,startClocks:t.startClocks,nonErrorPrefix:"Provided",source:Bt.CUSTOM,handling:gt});e.notify(fn,{customerContext:t.context,savedCommonContext:n,error:i})}}}(e)}function Ai(e){if(void 0===e&&(e=window),!Ii)if("hidden"===document.visibilityState)Ii={timeStamp:0};else{Ii={timeStamp:1/0};var t=ue(e,[qe,Le],(function(e){"pagehide"!==event.type&&"hidden"!==document.visibilityState||(Ii.timeStamp=event.timeStamp,t())}),{capture:!0}).stop}return Ii}var Mi=6e5;function Bi(e,t){var n={};function r(e){n=d(n,e),t(n)}var i=function(e,t){return{stop:e.subscribe(Jt,(function(e){for(var n of e)"navigation"===n.entryType&&t({fetchStart:n.fetchStart,responseEnd:n.responseEnd,domComplete:n.domComplete,domContentLoaded:n.domContentLoadedEventEnd,domInteractive:n.domInteractive,loadEvent:n.loadEventEnd,loadEventEnd:n.loadEventEnd,loadEventStart:n.loadEventStart,domContentLoadedEventEnd:n.domContentLoadedEventEnd,domContentLoadedEventStart:n.domContentLoadedEventStart})})).unsubscribe}}(e,r),o=i.stop,a=function(e,t){var n=Ai();return{stop:e.subscribe(Jt,(function(e){var r=fe(e,(function(e){return"paint"===e.entryType&&"first-contentful-paint"===e.name&&e.startTime<n.timeStamp&&e.startTime<Mi}));r&&t(r.startTime)})).unsubscribe}}(e,(function(e){r({firstContentfulPaint:e})})),u=a.stop,s=function(e,t,n){var r=Ai(),i=1/0,o=ue(t,[Pe,Re],(function(e){i=e.timeStamp}),{capture:!0,once:!0}).stop,a=e.subscribe(Jt,(function(e){var t=function(e,t){for(var n=e.length-1;n>=0;n-=1){var r=e[n];if(t(r,n,e))return r}}(e,(function(e){return"largest-contentful-paint"===e.entryType&&e.startTime<i&&e.startTime<r.timeStamp&&e.startTime<Mi}));t&&n(t.startTime)})).unsubscribe;return{stop:function(){o(),a()}}}(e,window,(function(e){r({largestContentfulPaint:e})})),c=s.stop,f=function(e,t){var n=Ai();return{stop:e.subscribe(Jt,(function(e){var r=fe(e,(function(e){return"first-input"===e.entryType&&e.startTime<n.timeStamp}));if(r){var i=Z(r.startTime,r.processingStart);t({firstInputDelay:i>=0?i:0,firstInputTime:r.startTime})}})).unsubscribe}}(e,(function(e){r({firstInputDelay:e.firstInputDelay,firstInputTime:e.firstInputTime})})),l=f.stop;return{stop:function(){o(),u(),c(),l()}}}function Ui(e,t,n,r,i,o){var a,u={eventCounts:{errorCount:0,longTaskCount:0,resourceCount:0,actionCount:0,frustrationCount:0}},s=Gr(e,(function(e){u.eventCounts=e,r()})).stop,c=function(e,t,n,r,i,o){var a=r===st,u=!0,s=[];function c(){!u&&!a&&s.length>0&&o(Math.max.apply(Math,s))}return{setLoadEvent:function(e){a&&(a=!1,s.push(e),c())},stop:Hr(e,t,n,(function(e){u&&(u=!1,e.hadActivity&&s.push(Z(i.timeStamp,e.end)),c())})).stop}}(e,t,n,i,o,(function(e){u.loadingTime=e,r()})),f=c.setLoadEvent,d=c.stop;if(Fr("layout-shift")){u.cumulativeLayoutShift=0;var l=function(e,t){var n=0,r=function(){var e,t,n=0;return{update:function(r){void 0===e||r.startTime-t>=q||r.startTime-e>=5e3?(e=t=r.startTime,n=r.value):(n+=r.value,t=r.startTime)},value:function(){return n}}}();return{stop:e.subscribe(Jt,(function(e){for(var i of e)"layout-shift"!==i.entryType||i.hadRecentInput||(r.update(i),r.value()>n&&(n=r.value(),t(Q(n,4))))})).unsubscribe}}(e,(function(e){u.cumulativeLayoutShift=e,r()}));a=l.stop}else a=F;return{stop:function(){s(),d(),a()},setLoadEvent:f,viewMetrics:u}}function Li(e,t,n,r,i,o,a){var u,s=function(i){var o=$i(t,n,r,e,st,ee(),i),a=Bi(t,(function(e){o.updateTimings(e),o.scheduleUpdate()}));return{initialView:o,stop:a.stop}}(a),c=s.stop,f=s.initialView,d=function(){t.subscribe(nn,(function(){f.end(),f=l(void 0,{name:f.name,service:f.service,version:f.version})})),t.subscribe(on,(function(){f.end(),f.triggerUpdate()}));var e=window.setInterval((function(){f.triggerUpdate()}),3e5);return{stop:function(){clearInterval(e)}}}().stop;function l(i,o){return $i(t,n,r,e,ct,i,o)}return o&&(u=function(e){return e.subscribe((function(e){var t,n,r,i,o=e.oldLocation,a=e.newLocation;if(n=a,(t=o).pathname!==n.pathname||(r=n.hash,i=r.substr(1),!document.getElementById(i)&&Pi(n.hash)!==Pi(t.hash)))return f.end(),f.triggerUpdate(),void(f=l())}))}(i)),{addTiming:function(e,t){void 0===t&&(t=J()),f.addTiming(e,t),f.scheduleUpdate()},startView:function(e,t){f.end(t),f.triggerUpdate(),f=l(t,e)},stop:function(){u&&u.unsubscribe(),c(),d(),f.end()}}}function $i(e,t,n,r,i,o,a){void 0===o&&(o=K());var u,s,d,l,p=I(),v={},h={},m=0,g=f(r);a&&(s=a.name,d=a.service,l=a.version),e.notify(Zt,{id:p,name:s,startClocks:o,service:d,version:l});var y=O(C,3e3,{leading:!1}),b=y.cancel,w=Ui(e,t,n,y,i,o),_=w.setLoadEvent,S=w.stop,x=w.viewMetrics;function C(){m+=1;var t=void 0===u?J():u.timeStamp;e.notify(en,c({customTimings:h,documentVersion:m,id:p,name:s,service:d,version:l,loadingType:i,location:g,startClocks:o,timings:v,duration:Z(o.timeStamp,t),isActive:void 0===u},x))}return C(),{name:s,service:d,version:l,scheduleUpdate:y,end:function(t){void 0===t&&(t=K()),u=t,e.notify(tn,{endClocks:u}),S()},triggerUpdate:function(){b(),C()},updateTimings:function(e){v=e,void 0!==e.loadEvent&&_(e.loadEvent)},addTiming:function(e,t){var n=function(e){return e<31536e6}(t)?t:Z(o.timeStamp,t);h[function(e){var t=e.replace(/[^a-zA-Z0-9-_.@$]/g,"_");return t}(e)]=n}}}function Pi(e){var t=e.indexOf("?");return t<0?e:e.slice(0,t)}function Di(e,t,n,r,i,o){return e.subscribe(en,(function(t){e.notify(sn,function(e){var t={_dd:{document_version:e.documentVersion},date:e.startClocks.timeStamp,type:ut.VIEW,view:{action:{count:e.eventCounts.actionCount},frustration:{count:e.eventCounts.frustrationCount},cumulative_layout_shift:e.cumulativeLayoutShift,first_byte:G(e.timings.firstByte),dom_complete:G(e.timings.domComplete),dom_content_loaded:G(e.timings.domContentLoaded),dom_interactive:G(e.timings.domInteractive),error:{count:e.eventCounts.errorCount},first_contentful_paint:G(e.timings.firstContentfulPaint),first_input_delay:G(e.timings.firstInputDelay),first_input_time:G(e.timings.firstInputTime),is_active:e.isActive,name:e.name,largest_contentful_paint:G(e.timings.largestContentfulPaint),load_event:G(e.timings.loadEvent),loading_time:Ni(G(e.loadingTime)),loading_type:e.loadingType,long_task:{count:e.eventCounts.longTaskCount},resource:{count:e.eventCounts.resourceCount},time_spent:G(e.duration)}};_(e.customTimings)||(t.view.custom_timings=(n=e.customTimings,r=G,i={},s(n,(function(e,t){i[t]=r(e)})),i));var n,r,i;return{rawRumEvent:t=l(t,{view:Fi(e.timings)}),startTime:e.startClocks.relative,domainContext:{location:e.location}}}(t))})),Li(n,e,r,t,i,!t.trackViewsManually,o)}function Fi(e){var t=Br(e);if(t){var n=t.fetchStart,r=t.responseEnd,i=t.domInteractive,o=t.domContentLoaded,a=t.domComplete,u=t.loadEventEnd,s=t.loadEventStart,c=t.domContentLoadedEventEnd,f={fmp:G(t.largestContentfulPaint)};if(r!==n){f.fpt=G(r-n);var d=parseInt((r-n)/1e3);f.apdexLevel=d>9?9:d}return i!==n&&(f.tti=G(i-n)),o!==n&&(f.dom_ready=G(o-n)),u!==n&&(f.load=G(u-n)),s!==c&&(f.resource_load_time=G(s-c)),a!==i&&(f.dom=G(a-i)),f}}function Ni(e){return T(e)&&e<0?void 0:e}function qi(){this.buffer=new Uint8Array(8),Vi().getRandomValues(this.buffer),this.buffer[0]=127&this.buffer[0]}function Vi(){return window.crypto||window.msCrypto}function ji(e){this._spanId=(new qi).toDecimalString(),this._traceId=(new qi).toDecimalString()}function Qi(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}))}function Wi(e,t){this._spanId=Qi(),this._traceId=Qi(),this._applicationId=e.applicationId,this._env=e.env,this._version=e.version,this._urlParse=A(t).getParse()}function Gi(){for(var e="",t=0;t<16;t+=1){e+="0123456789abcdef"[Math.floor(16*Math.random())]}return e}function Hi(e){var t=Gi();e.traceId128Bit?this._traceId=Gi()+t:this._traceId=t,this._spanId=t}function Xi(){for(var e="",t=0;t<16;t+=1){e+="0123456789abcdef"[Math.floor(16*Math.random())]}return e}function zi(e){var t=Xi();this._traceId=Xi()+t,this._spanId=t}function Ki(){for(var e="",t=0;t<16;t+=1){e+="0123456789abcdef"[Math.floor(16*Math.random())]}return e}function Ji(e){var t=Ki();e.traceId128Bit?this._traceId=Ki()+t:this._traceId=t,this._spanId=t}function Yi(){for(var e="",t=0;t<16;t+=1){e+="0123456789abcdef"[Math.floor(16*Math.random())]}return e}function Zi(e){var t=Yi();this._traceId=Yi()+t,this._spanId=t}function eo(e){0!==e.status||e.isAborted||(e.traceId=void 0,e.spanId=void 0)}function to(e,t,n,r){if(function(e,t){var n=gn(t),r=!1;return s(e.allowedTracingOrigins,(function(e){if(n===e||e instanceof RegExp&&e.test(n))return r=!0,!1})),r}(e,t.url)&&e.traceType&&n.findTrackedSession()){var i;switch(e.traceType){case dt:i=new ji;break;case ht:i=new Wi(e,t.url);break;case lt:i=new Ji(e);break;case mt:i=new Hi(e);break;case vt:i=new Zi(e);break;case pt:i=new zi(e)}i&&i.isTracingSupported()&&(t.traceId=i.getTraceId(),t.spanId=i.getSpanId(),r(i.makeTracingHeaders()))}}qi.prototype={toString:function(e){for(var t=this.readInt32(0),n=this.readInt32(4),r="";;){var i=t%e*4294967296+n;if(t=Math.floor(t/e),n=Math.floor(i/e),r=(i%e).toString(e)+r,!t&&!n)break}return r},toDecimalString:function(){return this.toString(10)},readInt32:function(e){return 16777216*this.buffer[e]+(this.buffer[e+1]<<16)+(this.buffer[e+2]<<8)+this.buffer[e+3]}},ji.prototype={isTracingSupported:function(){return void 0!==Vi()},getSpanId:function(){return this._spanId},getTraceId:function(){return this._traceId},makeTracingHeaders:function(){return{"x-datadog-origin":"rum","x-datadog-parent-id":this.getSpanId(),"x-datadog-sampled":"1","x-datadog-sampling-priority":"1","x-datadog-trace-id":this.getTraceId()}}},Wi.prototype={isTracingSupported:function(){return!!(this._env&&this._version&&this._urlParse)},getSpanId:function(){return this._spanId},getTraceId:function(){return this._traceId},getSkyWalkingSw8:function(){try{var e=String(k(this._traceId)),t=String(k(this._spanId)),n=String(k(this._applicationId+"_rum_"+this.env)),r=String(k(this._version)),i=String(k(window.location.href)),o=String(k(this._urlParse.Host));return"1-"+e+"-"+t+"-0-"+n+"-"+r+"-"+i+"-"+o}catch(e){return""}},makeTracingHeaders:function(){return{sw8:this.getSkyWalkingSw8()}}},Hi.prototype={isTracingSupported:function(){return!0},getSpanId:function(){return this._spanId},getTraceId:function(){return this._traceId},getUberTraceId:function(){return this._traceId+":"+this._spanId+":0:1"},makeTracingHeaders:function(){return{"uber-trace-id":this.getUberTraceId()}}},zi.prototype={isTracingSupported:function(){return!0},getSpanId:function(){return this._spanId},getTraceId:function(){return this._traceId},getB3Str:function(){return this._traceId+"-"+this._spanId+"-1"},makeTracingHeaders:function(){return{b3:this.getB3Str()}}},Ji.prototype={isTracingSupported:function(){return!0},getSpanId:function(){return this._spanId},getTraceId:function(){return this._traceId},makeTracingHeaders:function(){return{"X-B3-TraceId":this.getTraceId(),"X-B3-SpanId":this.getSpanId(),"X-B3-Sampled":"1"}}},Zi.prototype={isTracingSupported:function(){return!0},getSpanId:function(){return this._spanId},getTraceId:function(){return this._traceId},getTraceParent:function(){return"00-"+this._traceId+"-"+this._spanId+"-01"},makeTracingHeaders:function(){return{traceparent:this.getTraceParent()}}};let no=1;function ro(e,t,n){var r=function(e,t){return{clearTracingIfNeeded:eo,traceFetch:function(n){return to(e,n,t,(function(e){if(!(n.input instanceof Request)||n.init&&n.init.headers){n.init=f(n.init);var t=[];n.init.headers instanceof Headers?n.init.headers.forEach((function(e,n){t.push([n,e])})):p(n.init.headers)?s(n.init.headers,(function(e){t.push(e)})):n.init.headers&&s(n.init.headers,(function(e,n){t.push([n,e])}));var r={};s(t.concat(S(e)),(function(e){r[e[0]]=e[1]})),n.init.headers=r}else n.input=new Request(n.input),s(e,(function(e,t){n.input.headers.append(t,e)}))}))},traceXhr:function(n,r){return to(e,n,t,(function(e){s(e,(function(e,t){r.setRequestHeader(t,e)}))}))}}}(t,n);!function(e,t,n){var r=Bn().subscribe((function(r){var i=r;if(Pr(t,i.url))switch(i.state){case"start":n.traceXhr(i,i.xhr),i.requestIndex=io(),e.notify(an,{requestIndex:i.requestIndex,url:i.url});break;case"complete":n.clearTracingIfNeeded(i),e.notify(un,{duration:i.duration,method:i.method,requestIndex:i.requestIndex,spanId:i.spanId,startClocks:i.startClocks,status:i.status,traceId:i.traceId,traceSampled:i.traceSampled,type:ft.XHR,url:i.url,xhr:i.xhr})}}))}(e,t,r),function(e,t,n){var r=An().subscribe((function(r){var i=r;if(Pr(t,i.url))switch(i.state){case"start":n.traceFetch(i),i.requestIndex=io(),e.notify(an,{requestIndex:i.requestIndex,url:i.url});break;case"complete":n.clearTracingIfNeeded(i),e.notify(un,{duration:i.duration,method:i.method,requestIndex:i.requestIndex,responseType:i.responseType,spanId:i.spanId,startClocks:i.startClocks,status:i.status,traceId:i.traceId,traceSampled:i.traceSampled,type:ft.FETCH,url:i.url,response:i.response,init:i.init,input:i.input})}}))}(e,t,r)}function io(){var e=no;return no+=1,e}function oo(e){if(performance&&"getEntriesByName"in performance){var t=performance.getEntriesByName(e.url,"resource");if(t.length&&"toJSON"in t[0]){var n,r=y(t,(function(e){return e.toJSON()}));return r=g(r,Br),1===(r=g(r,(function(t){return n=t,r=e.startClocks.relative,i=ao({startTime:e.startClocks.relative,duration:e.duration}),o=1,n.startTime>=r-o&&ao(n)<=i+o;var n,r,i,o}))).length?r[0]:2===r.length&&ao((n=r)[0])<=n[1].startTime?r[1]:void 0}}}function ao(e){return e.startTime+e.duration}function uo(e,t){e.subscribe(un,(function(t){e.notify(sn,function(e){var t=e.type===ft.XHR?He:ze,n=oo(e),r=n?te(n.startTime):e.startClocks,i=n?co(n):void 0,o=function(e){if(!e.traceId||!e.spanId)return;return{_dd:{spanId:e.spanId,traceId:e.traceId},resource:{id:I()}}}(e),a=A(e.url).getParse(),u=l({date:r.timeStamp,resource:{id:I,type:t,duration:W(e.duration),method:e.method,status:e.status,statusGroup:$(e.status),url:e.url,urlHost:a.Host,urlPath:a.Path,urlPathGroup:R(a.Path),urlQuery:P(M(e.url))},type:ut.RESOURCE},o,i);return{startTime:r.relative,rawRumEvent:u,domainContext:{performanceEntry:n&&fo(n),xhr:e.xhr,response:e.response,requestInput:e.input,requestInit:e.init,error:e.error}}}(t))})),e.subscribe(Jt,(function(t){for(var n of t)"resource"===n.entryType&&("xmlhttprequest"!==(r=n).initiatorType&&"fetch"!==r.initiatorType)&&e.notify(sn,so(n));var r}))}function so(e){var t=Rr(e),n=co(e),r=function(e){return e.traceId?{_dd:{traceId:e.traceId}}:void 0}(e),i=A(e.name).getParse(),o="";!function(e){return e.encodedBodySize>0&&e.transferSize>0&&e.transferSize<e.encodedBodySize||null}(e)?function(e){return!(e.transferSize>0)&&(e.decodedBodySize>0||e.duration<30)}(e)&&(o=200):o=304;var a=te(e.startTime),u=l({date:a.timeStamp,resource:{id:I(),type:t,url:e.name,urlHost:i.Host,urlPath:i.Path,urlPathGroup:R(i.Path),urlQuery:P(M(e.name)),method:"GET",status:o,statusGroup:$(o)},type:ut.RESOURCE},r,n);return{startTime:a.relative,rawRumEvent:u,domainContext:{performanceEntry:fo(e)}}}function co(e){return{resource:l({},{duration:(t=e,0===t.duration&&t.startTime<t.responseEnd?W(t.responseEnd-t.startTime):W(t.duration)),size:$r(e)},Mr(e))};var t}function fo(e){return"function"==typeof PerformanceEntry&&e instanceof PerformanceEntry&&e.toJSON(),e}var lo={sdkVersion:"2.2.1",sdkName:"df_web_rum_sdk"};var po,vo,ho,mo,go=function(e){var t,n,r=!1,i=ce(),o=ce(),a=new we,u=function(e,t){void 0===t&&(t=J()),a.add((function(){return u(e,t)}))},s=function(e,t){void 0===t&&(t=K()),a.add((function(){return s(e,t)}))},f=function(e,t){void 0===t&&(t={context:i.getContext(),user:o.getContext()}),a.add((function(){return f(e,t)}))},l=function(e,t){void 0===t&&(t={context:i.getContext(),user:o.getContext()}),a.add((function(){return l(e,t)}))},v=function(){},h=function(){};function m(t,n){var r=e(t,(function(){return{user:o.getContext(),context:i.getContext()}}),n);s=r.startView,f=r.addAction,l=r.addError,u=r.addTiming,v=r.getInternalContext,a.drain()}return t={init:function(e){if(function(e){return function(e){if(void 0===document.cookie||null===document.cookie)return!1;try{var t="dd_cookie_test_".concat(I()),n="test";return Sn(t,n,q,e),xn(t)===n}catch(e){return!1}}(Rn(e))?"file:"!==window.location.protocol||(Ce.error("Execution is not allowed in the current context."),!1):(Ce.warn("Cookies are not authorized, we will not send any data."),!1)}(e)&&function(e){return!r||(e.silentMultipleInit||Ce.error("DATAFLUX_RUM is already initialized."),!1)}(e)){var t=function(e){if(e.applicationId){if(!e.datakitUrl&&!e.datakitOrigin)return Ce.error("datakitOrigin is not configured, no RUM data will be collected."),!1;if(void 0===e.sessionReplaySampleRate||de(e.sessionReplaySampleRate))if(void 0===e.allowedTracingOrigins||p(e.allowedTracingOrigins))if(void 0===e.allowedDDTracingOrigins||p(e.allowedDDTracingOrigins))if(void 0===e.excludedActivityUrls||p(e.excludedActivityUrls)){var t=In(e);if(t){var n=!!e.trackFrustrations;return c({applicationId:e.applicationId,actionNameAttribute:e.actionNameAttribute,sessionReplaySampleRate:ye(e.sessionReplaySampleRate,100),allowedTracingOrigins:ye(e.allowedTracingOrigins||e.allowedDDTracingOrigins,[]),excludedActivityUrls:ye(e.excludedActivityUrls,[]),trackInteractions:!!e.trackInteractions||n,trackFrustrations:n,trackViewsManually:!!e.trackViewsManually,traceType:ye(e.traceType,dt),traceId128Bit:!!e.traceId128Bit,isJsBirdge:!!e.isJsBirdge},t,lo)}}else Ce.error("Excluded Activity Urls should be an array");else Ce.error("Allowed Tracing Origins should be an array");else Ce.error("Allowed Tracing Origins should be an array");else Ce.error("Premium Sample Rate should be a number between 0 and 100")}else Ce.error("Application ID is not configured, no RUM data will be collected.")}(e);if(t){if(t.trackViewsManually){var n=a;a=new we,s=function(e){m(t,e)},n.drain()}else m(t);h=function(){return L(e)},r=!0}}},addRumGlobalContext:i.add,setGlobalContextProperty:i.setContextProperty,removeRumGlobalContext:i.remove,removeGlobalContextProperty:i.removeContextProperty,getRumGlobalContext:i.get,getGlobalContext:i.getContext,setRumGlobalContext:i.set,setGlobalContext:i.setContext,clearGlobalContext:i.clearContext,getInitConfiguration:function(){return h()},getInternalContext:function(e){return v(e)},addDebugSession:function(e){},clearDebugSession:function(){},getDebugSession:function(){},addAction:function(e,t){f({name:e,context:L(t),startClocks:K(),type:rt})},addError:function(e,t){var n=Lt();l({error:e,handlingStack:n,context:L(t),startClocks:K()})},addTiming:function(e,t){u(e,t)},setUser:function(e){"object"==typeof e&&e?o.setContext(g(e)):Ce.error("Unsupported user:",e)},getUser:o.getContext,setUserProperty:function(e,t){var n={};n[e]=t;var r=g(n)[e];o.setContextProperty(e,r)},removeUserProperty:o.removeContextProperty,removeUser:o.clearContext,clearUser:o.clearContext,startView:function(e){s("object"==typeof e?e:{name:e})}},n=d({},t,{onReady:function(e){e()}}),Object.defineProperty(n,"_setDebug",{get:function(){return setDebugMode},enumerable:!1}),n;function g(e){var t=c(e,{});return"id"in t&&(t.id=String(t.id)),"name"in t&&(t.name=String(t.name)),"email"in t&&(t.email=String(t.email)),t}}((function(e,t,n){var r=new dn,i=function(e){r.notify(fn,{error:e})};Si(e,r,i);var o=Tr(e,r),a=function(e){var t=xn(Or);return t||(t=I(),Sn(Or,t,5184e6,e.cookieOptions)),{getId:function(){return t}}}(e),u=Qr(),s=Wr(location),c=function(e,t,n,r,i,o,a,u,s){var c=function(e){var t=new Se(144e5);return e.subscribe(Zt,(function(e){t.add(function(e){return{service:e.service,version:e.version,id:e.id,name:e.name}}(e),e.startClocks.relative)})),e.subscribe(tn,(function(e){t.closeActive(e.endClocks.relative)})),e.subscribe(nn,(function(){t.reset()})),{findView:function(e){return t.find(e)},stop:function(){t.stop()}}}(t),f=function(e,t,n){var r,i=new Se(144e5);e.subscribe(tn,(function(e){i.closeActive(e.endClocks.relative)})),e.subscribe(Zt,(function(e){var t=n.href;i.add(a({url:t,location:n,referrer:r||document.referrer}),e.startClocks.relative),r=t}));var o=t.subscribe((function(e){var t=i.find();if(t){var n=z();i.closeActive(n),i.add(a({url:e.newLocation.href,location:e.newLocation,referrer:t.referrer}),n)}}));function a(e){return{url:e.url,referrer:e.referrer,host:e.location.host,path:e.location.pathname,pathGroup:R(e.location.pathname),urlQuery:P(M(e.location.href))}}return{findUrl:function(e){return i.find(e)},stop:function(){o.unsubscribe(),i.stop()}}}(t,o,e),l=function(e,t,n){e.subscribe(Yt,(function(t){e.notify(sn,wi(t))}));var r={findActionId:F};return n.trackInteractions&&(r=hi(e,t,n).actionContexts),{actionContexts:r,addAction:function(t,n){e.notify(sn,d({savedCommonContext:n},wi(t)))}}}(t,a,n),p=l.actionContexts;return Oi(n,t,r,i,c,f,p,u,s),{viewContexts:c,urlContexts:f,addAction:l.addAction,actionContexts:p,stop:function(){c.stop()}}}(location,r,e,o,a,s,u,t,i),f=c.viewContexts,l=c.urlContexts,p=c.actionContexts;!function(e,t){e.subscribe(Jt,(function(n){for(var r of n){if("longtask"!==r.entryType)return;if(!t.findTrackedSession(r.startTime))break;var i=te(r.startTime),o={date:i.timeStamp,long_task:{id:I(),duration:G(r.duration)},type:ut.LONG_TASK};e.notify(sn,{rawRumEvent:o,startTime:i.relative,domainContext:{performanceEntry:r.toJSON()}})}}))}(r,o),uo(r);var v=Di(r,e,location,u,s,n),h=v.addTiming,m=v.startView,g=Ri(r).addError;ro(r,e,o),Nr(r,e);var y=function(e,t,n,r,i){return{get:function(o){var a=n.findView(o),u=i.findUrl(o),s=t.findTrackedSession(o);if(s&&a&&u){var c=r.findActionId(o);return{application:{id:e},session:{id:s.id},userAction:c?{id:c}:void 0,view:{id:a.id,name:a.name,url:u.url,referrer:u.referrer,host:u.host,path:u.pathname,pathGroup:u.pathGroup,urlQuery:u.urlQuery}}}}}}(e.applicationId,o,f,p,l);return{addAction:c.addAction,addError:g,addTiming:h,configuration:e,lifeCycle:r,viewContexts:f,session:o,startView:m,getInternalContext:y.get}}));po=function(){if("object"==typeof globalThis)return globalThis;Object.defineProperty(Object.prototype,"_dd_temp_",{get:function(){return this},configurable:!0});var e=_dd_temp_;return delete Object.prototype._dd_temp_,"object"!=typeof e&&(e="object"==typeof self?self:"object"==typeof window?window:{}),e}(),ho=go,mo=po[vo="DATAFLUX_RUM"],po[vo]=ho,mo&&mo.q&&s(mo.q,(function(e){e()}))})();
|
|
1
|
+
(()=>{"use strict";var e=Array.prototype,t=Function.prototype,n=Object.prototype,r=e.slice,i=n.toString,o=n.hasOwnProperty,a=(t.bind,e.forEach),u=(e.indexOf,Array.isArray),s=function(e,t,n){if(null===e)return!1;if(a&&e.forEach===a)e.forEach(t,n);else if(e.length===+e.length){for(var r=0,i=e.length;r<i;r++)if(r in e&&false===t.call(n,e[r],r,e))return!1}else for(var u in e)if(o.call(e,u)&&false===t.call(n,e[u],u,e))return!1};function c(e){return s(r.call(arguments,1),(function(t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})),e}function f(e){return c({},e)}var d=function(e){return s(r.call(arguments,1),(function(t){for(var n in t)void 0!==t[n]&&(e[n]=t[n])})),e},l=function(e){return s(r.call(arguments,1),(function(t){for(var n in t)void 0!==t[n]&&(w(t[n])&&w(e[n])?d(e[n],t[n]):e[n]=t[n])})),e},p=u||function(e){return"[object Array]"===i.call(e)},v=function(e){if(!e)return!1;try{return/^\s*\bfunction\b/.test(e)}catch(e){return!1}},h=function(e){return e?e.toArray?e.toArray():p(e)?r.call(e):(t=e)&&o.call(t,"callee")?r.call(e):m(e):[];var t},m=function(e){var t=[];return null===e||s(e,(function(e){t[t.length]=e})),t},g=function(e,t,n){if(e.filter)return e.filter(t);for(var r=[],i=0;i<e.length;i++)if(o.call(e,i)){var a=e[i];t.call(n,a,i,e)&&r.push(a)}return r},y=function(e,t,n){if(e.map)return e.map(t);for(var r=[],i=0;i<e.length;i++)if(o.call(e,i)){var a=e[i];r.push(t.call(n,a,i,e))}return r},b=function(e,t,n){if(e.some)return e.some(t);for(var r=!1,i=0;i<e.length;i++)if(o.call(e,i)){var a=e[i];if(t.call(n,a,i,e)){r=!0;break}}return r},w=function(e){return null!==e&&"[object Object]"===i.call(e)},_=function(e){if(w(e)){for(var t in e)if(o.call(e,t))return!1;return!0}return!1},S=function(e){var t=[];return s(e,(function(e,n){t.push([n,e])})),t},x=function(e){return"[object String]"===i.call(e)},C=function(e){return"[object Boolean]"===i.call(e)},T=function(e){return"[object Number]"===i.call(e)&&/[\d\.]+/.test(String(e))},E=function e(t){var n=t;try{n=e(t)}catch(e){n=t}return n},O=(Date.now,function(e,t,n){var r,i,o,a,u=0;n||(n={});var s=function(){u=!1===n.leading?0:(new Date).getTime(),r=null,a=e.apply(i,o),r||(i=o=null)},c=function(){o=arguments;var c=(new Date).getTime();u||!1!==n.leading||(u=c);var f=t-(c-u);return i=this,f<=0||f>t?(r&&(clearTimeout(r),r=null),u=c,a=e.apply(i,o),r||(i=o=null)):r||!1===n.trailing||(r=setTimeout(s,f)),a};return c.cancel=function(){clearTimeout(r),u=0,r=null},c}),k=function(e){if("function"==typeof btoa)return btoa(encodeURIComponent(e).replace(/%([0-9A-F]{2})/g,(function(e,t){return String.fromCharCode("0x"+t)})));var t,n,r,i,o,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",u=0,s=0,c="",f=[];if(!(e=String(e)))return e;e=function(e){var t,n,r,i,o="";for(t=n=0,r=(e=(e+"").replace(/\r\n/g,"\n").replace(/\r/g,"\n")).length,i=0;i<r;i++){var a=e.charCodeAt(i),u=null;a<128?n++:u=a>127&&a<2048?String.fromCharCode(a>>6|192,63&a|128):String.fromCharCode(a>>12|224,a>>6&63|128,63&a|128),null!==u&&(n>t&&(o+=e.substring(t,n)),o+=u,t=n=i+1)}return n>t&&(o+=e.substring(t,e.length)),o}(e);do{t=(o=e.charCodeAt(u++)<<16|e.charCodeAt(u++)<<8|e.charCodeAt(u++))>>18&63,n=o>>12&63,r=o>>6&63,i=63&o,f[s++]=a.charAt(t)+a.charAt(n)+a.charAt(r)+a.charAt(i)}while(u<e.length);switch(c=f.join(""),e.length%3){case 1:c=c.slice(0,-2)+"==";break;case 2:c=c.slice(0,-1)+"="}return c};function I(e){return e?(parseInt(e,10)^16*Math.random()>>parseInt(e,10)/4).toString(16):"".concat(1e7,"-",1e3,"-",4e3,"-",8e3,"-",1e11).replace(/[018]/g,I)}function R(e){var t="";return e&&(t=e.replace(/\/([^\/]*)\d([^\/]*)/g,"/?").replace(/\/$/g,"")),t||"/"}var A=function(e){var t=function(e){this._fields={Username:4,Password:5,Port:7,Protocol:2,Host:6,Path:8,URL:0,QueryString:9,Fragment:10},this._values={},this._regex=null,this._regex=/^((\w+):\/\/)?((\w+):?(\w+)?@)?([^\/\?:]+):?(\d+)?(\/?[^\?#]+)?\??([^#]+)?#?(\w*)/,void 0!==e&&this._parse(e)};return t.prototype.setUrl=function(e){this._parse(e)},t.prototype._initValues=function(){for(var e in this._fields)this._values[e]=""},t.prototype.addQueryString=function(e){if("object"!=typeof e)return!1;var t=this._values.QueryString||"";for(var n in e)t=new RegExp(n+"[^&]+").test(t)?t.replace(new RegExp(n+"[^&]+"),n+"="+e[n]):"&"===t.slice(-1)?t+n+"="+e[n]:""===t?n+"="+e[n]:t+"&"+n+"="+e[n];this._values.QueryString=t},t.prototype.getParse=function(){return this._values},t.prototype.getUrl=function(){var e="";return e+=this._values.Origin,e+=this._values.Path,e+=this._values.QueryString?"?"+this._values.QueryString:""},t.prototype._parse=function(e){this._initValues();var t=this._regex.exec(e);if(!t)throw"DPURLParser::_parse -> Invalid URL";for(var n in this._fields)void 0!==t[this._fields[n]]&&(this._values[n]=t[this._fields[n]]);this._values.Path=this._values.Path||"/",this._values.Hostname=this._values.Host.replace(/:\d+$/,""),this._values.Origin=this._values.Protocol+"://"+this._values.Hostname+(this._values.Port?":"+this._values.Port:"")},new t(e)};var M=function(e){var t={},n=e.split("?")[1]||"";return n&&(t=B("?"+n)),t},B=function(e){for(var t=function(e){return E(e)},n={},r=(e=e||"").substring(1).split("&"),i=0;i<r.length;i++){var o=r[i].indexOf("=");if(-1!==o){var a=r[i].substring(0,o),u=r[i].substring(o+1);a=t(a),u=t(u),n[a]=u}}return n};function U(e,t,n){if(void 0===n&&(n=function(){if("undefined"!=typeof WeakSet){var e=new WeakSet;return{hasAlreadyBeenSeen(t){var n=e.has(t);return n||e.add(t),n}}}var t=[];return{hasAlreadyBeenSeen(e){var n=t.indexOf(e)>=0;return n||t.push(e),n}}}()),void 0===t)return e;if("object"!=typeof t||null===t)return t;if(t instanceof Date)return new Date(t.getTime());if(t instanceof RegExp){var r=t.flags||[t.global?"g":"",t.ignoreCase?"i":"",t.multiline?"m":"",t.sticky?"y":"",t.unicode?"u":""].join("");return new RegExp(t.source,r)}if(!n.hasAlreadyBeenSeen(t)){if(Array.isArray(t)){for(var i=Array.isArray(e)?e:[],o=0;o<t.length;++o)i[o]=U(i[o],t[o],n);return i}var a;i="object"==(null===(a=e)?"null":Array.isArray(a)?"array":typeof a)?e:{};for(var u in t)Object.prototype.hasOwnProperty.call(t,u)&&(i[u]=U(i[u],t[u],n));return i}}function L(e){return U(void 0,e)}function $(e){return e?String(e).substr(0,1)+String(e).substr(1).replace(/\d*/g,"x"):e}function P(e,t,n){if(null==e)return JSON.stringify(e);var r=[!1,void 0];D(e)&&(r=[!0,e.toJSON],delete e.toJSON);var i,o,a=[!1,void 0];"object"==typeof e&&D(i=Object.getPrototypeOf(e))&&(a=[!0,i.toJSON],delete i.toJSON);try{o=JSON.stringify(e,void 0,n)}catch(e){o="<error: unable to serialize object>"}finally{r[0]&&(e.toJSON=r[1]),a[0]&&(i.toJSON=a[1])}return o}function D(e){return"object"==typeof e&&null!==e&&e.hasOwnProperty("toJSON")}function F(){}var N,q=1e3,V=6e4;function j(e){return 0!==e&&100*Math.random()<=e}function Q(e,t){return+e.toFixed(t)}function W(e){return"number"!=typeof e?e:Q(1e6*e,0)}function G(e){return T(e)?Q(1e6*e,0):e}function H(e){return e-re()}function X(e){return Math.round(re()+e)}function z(){return performance.now()}function K(){return{relative:z(),timeStamp:J()}}function J(){return Y()}function Y(){return(new Date).getTime()}function Z(e,t){return t-e}function ee(){return{relative:0,timeStamp:re()}}function te(e){return{relative:e,timeStamp:ne(e)}}function ne(e){var t=Y()-performance.now();return t>re()?Math.round(t+e):X(e)}function re(){return void 0===N&&(N=performance.timing.navigationStart),N}function ie(e,t){for(var n=t.split(".");n.length;){var r=n.shift();if(!(e&&r in e&&o.call(e,r)))return;e=e[r]}return e}function oe(e,t){var n=e.charCodeAt(t-1);return n>=55296&&n<=56319?e.slice(0,t+1):e.slice(0,t)}function ae(e,t,n,r){return ue(e,[t],n,r)}function ue(e,t,n,r){var i=r&&r.once?function(e){o(),n(e)}:n;r=r&&r.passive?{capture:r.capture,passive:r.passive}:r&&r.capture,s(t,(function(t){e.addEventListener(t,i,r)}));var o=function(){s(t,(function(t){e.removeEventListener(t,i,r)}))};return{stop:o}}function se(e,t){return-1!==e.indexOf(t)}function ce(){var e={};return{get:function(){return e},add:function(t,n){x(t)?e[t]=n:console.error("key 需要传递字符串类型")},remove:function(t){delete e[t]},set:function(t){w(t)?e=t:console.error("content 需要传递对象类型数据")},getContext:function(){return L(e)},setContext:function(t){e=L(t)},setContextProperty:function(t,n){e[t]=L(n)},removeContextProperty:function(t){delete e[t]},clearContext:function(){e={}}}}function fe(e,t){for(var n=0;n<e.length;n+=1){var r=e[n];if(t(r,n,e))return r}}function de(e){return T(e)&&e>=0&&e<=100}function le(e){if(e.origin)return e.origin;var t=e.host.replace(/(:80|:443)$/,"");return e.protocol+"//"+t}function pe(e){var t={};return s(e,(function(e,n){var r;t[(r=n,r.replace(/[A-Z]/g,(function(e,t){return(0!==t?"_":"")+e.toLowerCase()})).replace(/-/g,"_"))]=ve(e)})),t}function ve(e){return p(e)?y(e,(function(e){return ve(e)})):"object"==typeof e&&null!==e?pe(e):e}function he(e){if("object"==typeof e&&e)e=P(e);else if(!x(e))return e;return String(e).replace(/[\s=,"]/g,(function(e){return"\\"+e}))}function me(e){return'"'+e.replace(/[\\]*"/g,'"').replace(/"/g,'\\"')+'"'}function ge(e){return"object"==typeof e&&e?me(P(e)):x(e)?me(e):e}function ye(e,t){return null!=e?e:t}var be=function(){this.buffer=[]};be.prototype={add:function(e){this.buffer.push(e)>this.limit&&this.buffer.splice(0,1)},drain:function(e){s(this.buffer,(function(t){e(t)})),this.buffer.length=0}};var we=be,_e=1/0;function Se(e){this.expireDelay=e,this.entries=[];var t=this;this.clearOldContextsInterval=setInterval((function(){t.clearOldContexts()}),6e4)}Se.prototype.add=function(e,t){var n=this,r={context:e,startTime:t,endTime:_e,remove:function(){var e=n.entries.indexOf(r);e>=0&&n.entries.splice(e,1)},close:function(e){r.endTime=e}};return this.entries.unshift(r),r},Se.prototype.find=function(e){for(var t of(void 0===e&&(e=_e),this.entries))if(t.startTime<=e){if(e<=t.endTime)return t.context;break}},Se.prototype.closeActive=function(e){var t=this.entries[0];t&&t.endTime===_e&&t.close(e)},Se.prototype.findAll=function(e){void 0===e&&(e=_e);var t=g(this.entries,(function(t){return t.startTime<=e&&e<=t.endTime}));return y(t,(function(e){return e.context}))},Se.prototype.reset=function(){this.entries=[]},Se.prototype.stop=function(){clearInterval(this.clearOldContextsInterval)},Se.prototype.clearOldContexts=function(){for(var e=z()-this.expireDelay;this.entries.length>0&&this.entries[this.entries.length-1].endTime<e;)this.entries.pop()};var xe={log:"log",debug:"debug",info:"info",warn:"warn",error:"error"},Ce=function e(t){var n=[].slice.call(arguments,1);Object.prototype.hasOwnProperty.call(xe,t)||(t=xe.log),e[t].apply(e,n)};Ce.debug=console.debug.bind(console),Ce.log=console.log.bind(console),Ce.info=console.info.bind(console),Ce.warn=console.warn.bind(console),Ce.error=console.error.bind(console);var Te={navigator:void 0!==window.navigator?window.navigator:{},infoMap:{engine:["WebKit","Trident","Gecko","Presto"],browser:["Safari","Chrome","Edge","IE","IE 11","IE 10","IE 9","IE 8","IE 7","Firefox","Firefox Focus","Chromium","Opera","Vivaldi","Yandex","Arora","Lunascape","QupZilla","Coc Coc","Kindle","Iceweasel","Konqueror","Iceape","SeaMonkey","Epiphany","360","360SE","360EE","UC","QQBrowser","QQ","Baidu","Maxthon","Sogou","LBBROWSER","2345Explorer","TheWorld","XiaoMi","Quark","Qiyu","Wechat",,"WechatWork","Taobao","Alipay","Weibo","Douban","Suning","iQiYi"],os:["Windows","Linux","Mac OS","Android","Ubuntu","FreeBSD","Debian","iOS","Windows Phone","BlackBerry","MeeGo","Symbian","Chrome OS","WebOS"],device:["Mobile","Tablet","iPad"]}},Ee={getMatchMap:function(e){return{Trident:e.indexOf("Trident")>-1||e.indexOf("NET CLR")>-1,Presto:e.indexOf("Presto")>-1,WebKit:e.indexOf("AppleWebKit")>-1,Gecko:e.indexOf("Gecko/")>-1,Safari:e.indexOf("Safari")>-1,Chrome:e.indexOf("Chrome")>-1||e.indexOf("CriOS")>-1,IE:e.indexOf("MSIE")>-1||e.indexOf("Trident")>-1,Edge:e.indexOf("Edge")>-1,Firefox:e.indexOf("Firefox")>-1||e.indexOf("FxiOS")>-1,"Firefox Focus":e.indexOf("Focus")>-1,Chromium:e.indexOf("Chromium")>-1,Opera:e.indexOf("Opera")>-1||e.indexOf("OPR")>-1,Vivaldi:e.indexOf("Vivaldi")>-1,Yandex:e.indexOf("YaBrowser")>-1,Arora:e.indexOf("Arora")>-1,Lunascape:e.indexOf("Lunascape")>-1,QupZilla:e.indexOf("QupZilla")>-1,"Coc Coc":e.indexOf("coc_coc_browser")>-1,Kindle:e.indexOf("Kindle")>-1||e.indexOf("Silk/")>-1,Iceweasel:e.indexOf("Iceweasel")>-1,Konqueror:e.indexOf("Konqueror")>-1,Iceape:e.indexOf("Iceape")>-1,SeaMonkey:e.indexOf("SeaMonkey")>-1,Epiphany:e.indexOf("Epiphany")>-1,360:e.indexOf("QihooBrowser")>-1||e.indexOf("QHBrowser")>-1,"360EE":e.indexOf("360EE")>-1,"360SE":e.indexOf("360SE")>-1,UC:e.indexOf("UC")>-1||e.indexOf(" UBrowser")>-1,QQBrowser:e.indexOf("QQBrowser")>-1,QQ:e.indexOf("QQ/")>-1,Baidu:e.indexOf("Baidu")>-1||e.indexOf("BIDUBrowser")>-1,Maxthon:e.indexOf("Maxthon")>-1,Sogou:e.indexOf("MetaSr")>-1||e.indexOf("Sogou")>-1,LBBROWSER:e.indexOf("LBBROWSER")>-1,"2345Explorer":e.indexOf("2345Explorer")>-1,TheWorld:e.indexOf("TheWorld")>-1,XiaoMi:e.indexOf("MiuiBrowser")>-1,Quark:e.indexOf("Quark")>-1,Qiyu:e.indexOf("Qiyu")>-1,Wechat:e.indexOf("MicroMessenger")>-1,Taobao:e.indexOf("AliApp(TB")>-1,Alipay:e.indexOf("AliApp(AP")>-1,Weibo:e.indexOf("Weibo")>-1,Douban:e.indexOf("com.douban.frodo")>-1,Suning:e.indexOf("SNEBUY-APP")>-1,iQiYi:e.indexOf("IqiyiApp")>-1,Windows:e.indexOf("Windows")>-1,Linux:e.indexOf("Linux")>-1||e.indexOf("X11")>-1,"Mac OS":e.indexOf("Macintosh")>-1,Android:e.indexOf("Android")>-1||e.indexOf("Adr")>-1,Ubuntu:e.indexOf("Ubuntu")>-1,FreeBSD:e.indexOf("FreeBSD")>-1,Debian:e.indexOf("Debian")>-1,"Windows Phone":e.indexOf("IEMobile")>-1||e.indexOf("Windows Phone")>-1,BlackBerry:e.indexOf("BlackBerry")>-1||e.indexOf("RIM")>-1,MeeGo:e.indexOf("MeeGo")>-1,Symbian:e.indexOf("Symbian")>-1,iOS:e.indexOf("like Mac OS X")>-1,"Chrome OS":e.indexOf("CrOS")>-1,WebOS:e.indexOf("hpwOS")>-1,Mobile:e.indexOf("Mobi")>-1||e.indexOf("iPh")>-1||e.indexOf("480")>-1,Tablet:e.indexOf("Tablet")>-1||e.indexOf("Nexus 7")>-1,iPad:e.indexOf("iPad")>-1}},matchInfoMap:function(e){var t=Te.navigator.userAgent||{},n=Ee.getMatchMap(t);for(var r in Te.infoMap)for(var i=0;i<Te.infoMap[r].length;i++){var o=Te.infoMap[r][i];n[o]&&(e[r]=o)}},getOS:function(){return Ee.matchInfoMap(this),this.os||"Unknown"},getOSVersion:function(){var e=this,t=Te.navigator.userAgent||{};e.osVersion="",e.osMajor="";var n={Windows:function(){var e=t.replace(/^.*Windows NT ([\d.]+);.*$/,"$1");return{6.4:"10",6.3:"8.1",6.2:"8",6.1:"7","6.0":"Vista",5.2:"XP",5.1:"XP","5.0":"2000"}[e]||e},Android:function(){return t.replace(/^.*Android ([\d.]+);.*$/,"$1")},iOS:function(){return t.replace(/^.*OS ([\d_]+) like.*$/,"$1").replace(/_/g,".")},Debian:function(){return t.replace(/^.*Debian\/([\d.]+).*$/,"$1")},"Windows Phone":function(){return t.replace(/^.*Windows Phone( OS)? ([\d.]+);.*$/,"$2")},"Mac OS":function(){return t.replace(/^.*Mac OS X ([\d_]+).*$/,"$1").replace(/_/g,".")},WebOS:function(){return t.replace(/^.*hpwOS\/([\d.]+);.*$/,"$1")}};return n[e.os]&&(e.osVersion=n[e.os](),e.osVersion===t&&(e.osVersion="")),e.osVersion&&(e.osMajor=e.osVersion.split(".").length&&e.osVersion.split(".")[0]),{version:e.osVersion,osMajor:e.osMajor}},getOrientationStatu:function(){return window.matchMedia("(orientation: portrait)").matches?"竖屏":"横屏"},getDeviceType:function(){var e=this;return e.device="PC",Ee.matchInfoMap(e),e.device},getNetwork:function(){return navigator&&navigator.connection&&navigator.connection.effectiveType},getLanguage:function(){var e;return this.language=((e=(Te.navigator.browserLanguage||Te.navigator.language).split("-"))[1]&&(e[1]=e[1].toUpperCase()),e.join("_")),this.language},getBrowserInfo:function(){var e=this;Ee.matchInfoMap(e);var t=Te.navigator.userAgent||{},n=function(e,t){var n=Te.navigator.mimeTypes;for(var r in n)if(n[r][e]==t)return!0;return!1},r=Ee.getMatchMap(t),i=!1;if(window.chrome){var o=t.replace(/^.*Chrome\/([\d]+).*$/,"$1");o>36&&window.showModalDialog?i=!0:o>45&&(i=n("type","application/vnd.chromium.remoting-viewer"))}if(r.Baidu&&r.Opera&&(r.Baidu=!1),r.Mobile&&(r.Mobile=!(t.indexOf("iPad")>-1)),i&&(n("type","application/gameplugin")||Te.navigator&&void 0===Te.navigator.connection.saveData?r["360SE"]=!0:r["360EE"]=!0),r.IE||r.Edge)switch(window.screenTop-window.screenY){case 71:case 74:case 99:case 75:case 74:case 105:default:break;case 102:r["360EE"]=!0;break;case 104:r["360SE"]=!0}var a={Safari:function(){return t.replace(/^.*Version\/([\d.]+).*$/,"$1")},Chrome:function(){return t.replace(/^.*Chrome\/([\d.]+).*$/,"$1").replace(/^.*CriOS\/([\d.]+).*$/,"$1")},IE:function(){return t.replace(/^.*MSIE ([\d.]+).*$/,"$1").replace(/^.*rv:([\d.]+).*$/,"$1")},Edge:function(){return t.replace(/^.*Edge\/([\d.]+).*$/,"$1")},Firefox:function(){return t.replace(/^.*Firefox\/([\d.]+).*$/,"$1").replace(/^.*FxiOS\/([\d.]+).*$/,"$1")},"Firefox Focus":function(){return t.replace(/^.*Focus\/([\d.]+).*$/,"$1")},Chromium:function(){return t.replace(/^.*Chromium\/([\d.]+).*$/,"$1")},Opera:function(){return t.replace(/^.*Opera\/([\d.]+).*$/,"$1").replace(/^.*OPR\/([\d.]+).*$/,"$1")},Vivaldi:function(){return t.replace(/^.*Vivaldi\/([\d.]+).*$/,"$1")},Yandex:function(){return t.replace(/^.*YaBrowser\/([\d.]+).*$/,"$1")},Arora:function(){return t.replace(/^.*Arora\/([\d.]+).*$/,"$1")},Lunascape:function(){return t.replace(/^.*Lunascape[\/\s]([\d.]+).*$/,"$1")},QupZilla:function(){return t.replace(/^.*QupZilla[\/\s]([\d.]+).*$/,"$1")},"Coc Coc":function(){return t.replace(/^.*coc_coc_browser\/([\d.]+).*$/,"$1")},Kindle:function(){return t.replace(/^.*Version\/([\d.]+).*$/,"$1")},Iceweasel:function(){return t.replace(/^.*Iceweasel\/([\d.]+).*$/,"$1")},Konqueror:function(){return t.replace(/^.*Konqueror\/([\d.]+).*$/,"$1")},Iceape:function(){return t.replace(/^.*Iceape\/([\d.]+).*$/,"$1")},SeaMonkey:function(){return t.replace(/^.*SeaMonkey\/([\d.]+).*$/,"$1")},Epiphany:function(){return t.replace(/^.*Epiphany\/([\d.]+).*$/,"$1")},360:function(){return t.replace(/^.*QihooBrowser\/([\d.]+).*$/,"$1")},"360SE":function(){return{63:"10.0",55:"9.1",45:"8.1",42:"8.0",31:"7.0",21:"6.3"}[t.replace(/^.*Chrome\/([\d]+).*$/,"$1")]||""},"360EE":function(){return{69:"11.0",63:"9.5",55:"9.0",50:"8.7",30:"7.5"}[t.replace(/^.*Chrome\/([\d]+).*$/,"$1")]||""},Maxthon:function(){return t.replace(/^.*Maxthon\/([\d.]+).*$/,"$1")},QQBrowser:function(){return t.replace(/^.*QQBrowser\/([\d.]+).*$/,"$1")},QQ:function(){return t.replace(/^.*QQ\/([\d.]+).*$/,"$1")},Baidu:function(){return t.replace(/^.*BIDUBrowser[\s\/]([\d.]+).*$/,"$1")},UC:function(){return t.replace(/^.*UC?Browser\/([\d.]+).*$/,"$1")},Sogou:function(){return t.replace(/^.*SE ([\d.X]+).*$/,"$1").replace(/^.*SogouMobileBrowser\/([\d.]+).*$/,"$1")},LBBROWSER:function(){var e="";t.indexOf("LieBaoFast")>-1&&(e=t.replace(/^.*LieBaoFast\/([\d.]+).*$/,"$1"));var n=t.replace(/^.*Chrome\/([\d]+).*$/,"$1");return e||{57:"6.5",49:"6.0",46:"5.9",42:"5.3",39:"5.2",34:"5.0",29:"4.5",21:"4.0"}[n]||""},"2345Explorer":function(){return t.replace(/^.*2345Explorer\/([\d.]+).*$/,"$1")},TheWorld:function(){return t.replace(/^.*TheWorld ([\d.]+).*$/,"$1")},XiaoMi:function(){return t.replace(/^.*MiuiBrowser\/([\d.]+).*$/,"$1")},Quark:function(){return t.replace(/^.*Quark\/([\d.]+).*$/,"$1")},Qiyu:function(){return t.replace(/^.*Qiyu\/([\d.]+).*$/,"$1")},Wechat:function(){return t.replace(/^.*MicroMessenger\/([\d.]+).*$/,"$1")},WechatWork:function(){return t.replace(/^.*wxwork\/([\d.]+).*$/,"$1")},Taobao:function(){return t.replace(/^.*AliApp\(TB\/([\d.]+).*$/,"$1")},Alipay:function(){return t.replace(/^.*AliApp\(AP\/([\d.]+).*$/,"$1")},Weibo:function(){return t.replace(/^.*weibo__([\d.]+).*$/,"$1")},Douban:function(){return t.replace(/^.*com.douban.frodo\/([\d.]+).*$/,"$1")},Suning:function(){return t.replace(/^.*SNEBUY-APP([\d.]+).*$/,"$1")},iQiYi:function(){return t.replace(/^.*IqiyiVersion\/([\d.]+).*$/,"$1")}};return e.browserVersion="",e.browserMajor="",a[e.browser]&&(e.browserVersion=a[e.browser](),e.browserVersion==t&&(e.browserVersion="")),"Chrome"==e.browser&&t.match(/\S+Browser/)&&(e.browser=t.match(/\S+Browser/)[0],e.version=t.replace(/^.*Browser\/([\d.]+).*$/,"$1")),"Edge"==e.browser&&(e.version>"75"?e.engine="Blink":e.engine="EdgeHTML"),("Chrome"==e.browser&&parseInt(e.browserVersion)>27||r.Chrome&&"WebKit"==e.engine&&parseInt(e.browserVersion)>27||"Opera"==e.browser&&parseInt(e.version)>12||"Yandex"==e.browser)&&(e.engine="Blink"),e.browserVersion&&(e.browserMajor=e.browserVersion.split(".").length&&this.browserVersion.split(".")[0]),{browser:e.browser,browserVersion:e.browserVersion,engine:e.engine,browserMajor:e.browserMajor}},getGeoPostion:function(e){navigator&&navigator.geolocation&&navigator.geolocation.getCurrentPosition((function(t){e(t)}),(function(e){Ce.warn(e)}))}},Oe={os:Ee.getOS(),osVersion:Ee.getOSVersion().version,osVersionMajor:Ee.getOSVersion().osMajor,browser:Ee.getBrowserInfo().browser,browserVersion:Ee.getBrowserInfo().browserVersion,browserVersionMajor:Ee.getBrowserInfo().browserMajor,screenSize:window.screen.width+"*"+window.screen.height,networkType:Ee.getNetwork(),divice:Ee.getDeviceType()},ke="beforeunload",Ie="click",Re="keydown",Ae="load",Me="popstate",Be="scroll",Ue="touchstart",Le="visibilitychange",$e="DOMContentLoaded",Pe="pointerdown",De="pointerup",Fe="pointercancel",Ne="hashchange",qe="pagehide",Ve="mousedown",je="input",Qe="securitypolicyviolation",We="selectionchange",Ge="document",He="xhr",Xe="beacon",ze="fetch",Ke="css",Je="js",Ye="image",Ze="font",et="media",tt="other",nt="click",rt="custom",it="rage_click",ot="error_click",at="dead_click",ut={ACTION:"action",ERROR:"error",LONG_TASK:"long_task",VIEW:"view",RESOURCE:"resource",LOGGER:"logger"},st="initial_load",ct="route_change",ft={FETCH:ze,XHR:He},dt="ddtrace",lt="zipkin",pt="zipkin_single_header",vt="w3c_traceparent",ht="skywalking_v3",mt="jaeger",gt="handled",yt="unhandled";function bt(e,t,n){var r=e[t],i=n(r),o=function(){if("function"==typeof i)return i.apply(this,arguments)};return e[t]=o,{stop:function(){e[t]===o?e[t]=r:i=r}}}function wt(e,t,n){return bt(e,t,(function(e){return function(){var t;return n&&n.before&&n.before.apply(this,arguments),"function"==typeof e&&(t=e.apply(this,arguments)),n&&n.after&&n.after.apply(this,arguments),t}}))}var _t="?";function St(e){var t=[],n=Rt(e,"stack");return n&&s(n.split("\n"),(function(e){var n=function(e){var t=Ct.exec(e);if(!t)return;var n=t[2]&&0===t[2].indexOf("native"),r=t[2]&&0===t[2].indexOf("eval"),i=Tt.exec(t[2]);r&&i&&(t[2]=i[1],t[3]=i[2],t[4]=i[3]);return{args:n?[t[2]]:[],column:t[4]?+t[4]:void 0,func:t[1]||_t,line:t[3]?+t[3]:void 0,url:n?void 0:t[2]}}(e)||function(e){var t=Et.exec(e);if(!t)return;return{args:[],column:t[3]?+t[3]:void 0,func:_t,line:t[2]?+t[2]:void 0,url:t[1]}}(e)||function(e){var t=Ot.exec(e);if(!t)return;return{args:[],column:t[4]?+t[4]:void 0,func:t[1]||_t,line:+t[3],url:t[2]}}(e)||function(e){var t=kt.exec(e);if(!t)return;var n=t[3]&&t[3].indexOf(" > eval")>-1,r=It.exec(t[3]);n&&r&&(t[3]=r[1],t[4]=r[2],t[5]=void 0);return{args:t[2]?t[2].split(","):[],column:t[5]?+t[5]:void 0,func:t[1]||_t,line:t[4]?+t[4]:void 0,url:t[3]}}(e);n&&(!n.func&&n.line&&(n.func=_t),t.push(n))})),{message:Rt(e,"message"),name:Rt(e,"name"),stack:t}}var xt="((?:file|https?|blob|chrome-extension|native|eval|webpack|<anonymous>|\\w+\\.|\\/).*?)",Ct=new RegExp("^\\s*at (.*?) ?\\("+xt+"(?::(\\d+))?"+"(?::(\\d+))?\\)?\\s*$","i"),Tt=new RegExp("\\((\\S*)(?::(\\d+))(?::(\\d+))\\)");var Et=new RegExp("^\\s*at ?"+xt+"(?::(\\d+))?"+"(?::(\\d+))??\\s*$","i");var Ot=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i;var kt=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|capacitor|\[native).*?|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i,It=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i;function Rt(e,t){if("object"==typeof e&&e&&t in e){var n=e[t];return"string"==typeof n?n:void 0}}var At=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/;function Mt(e){var t=function(e){return wt(window,"onerror",{before:function(t,n,r,i,o){var a;if(o)a=St(o),e(a,o);else{var u,s={url:n,column:i,line:r},c=t;if("[object String]"==={}.toString.call(t)){var f=At.exec(c);f&&(u=f[1],c=f[2])}e(a={name:u,message:"string"==typeof c?c:void 0,stack:[s]},t)}}})}(e),n=function(e){return wt(window,"onunhandledrejection",{before:function(t){var n=t.reason||"Empty reason",r=St(n);e(r,n)}})}(e);return{stop:function(){t.stop(),n.stop()}}}var Bt={AGENT:"agent",CONSOLE:"console",NETWORK:"network",SOURCE:"source",LOGGER:"logger",CUSTOM:"custom"};function Ut(e){var t=e.stackTrace,n=e.originalError,r=e.handlingStack,i=e.startClocks,o=e.nonErrorPrefix,a=e.source,u=e.handling;return t&&(void 0!==t.message||n instanceof Error)?{startClocks:i,source:a,handling:u,originalError:n,message:t.message||"Empty message",stack:$t(t),handlingStack:r,type:t.name,causes:Dt(n,a)}:{startClocks:i,source:a,handling:u,originalError:n,message:o+" "+P(n),stack:"No stack, consider using an instance of Error",handlingStack:r,type:t&&t.name}}function Lt(){var e=new Error;if(!e.stack)try{throw e}catch(e){}var t=St(e);return t.stack=t.stack.slice(2),$t(t)}function $t(e){var t=Pt(e);return s(e.stack,(function(e){var n="?"===e.func?"<anonymous>":e.func,r=e.args&&e.args.length>0?"("+e.args.join(", ")+")":"",i=e.line?":"+e.line:"",o=e.line&&e.column?":"+e.column:"";t+="\n at "+n+r+" @ "+e.url+i+o})),t}function Pt(e){return(e.name||"Error")+": "+e.message}function Dt(e,t){for(var n=e,r=[];n&&n.cause instanceof Error&&r.length<10;){var i=St(n.cause);r.push({message:n.cause.message,source:t,type:i&&i.name,stack:i&&$t(i)}),n=n.cause}return r.length?r:void 0}var Ft=function(e){this.observers=[],this.onLastUnsubscribe=void 0,this.onFirstSubscribe=e};Ft.prototype={subscribe:function(e){!this.observers.length&&this.onFirstSubscribe&&(this.onLastUnsubscribe=this.onFirstSubscribe()||void 0),this.observers.push(e);var t=this;return{unsubscribe:function(){t.observers=g(t.observers,(function(t){return e!==t})),!t.observers.length&&t.onLastUnsubscribe&&t.onLastUnsubscribe()}}},notify:function(e){s(this.observers,(function(t){t(e)}))}};var Nt=Ft;function qt(){var e=[].slice.call(arguments),t=new Nt((function(){var n=y(e,(function(e){return e.subscribe((function(e){return t.notify(e)}))}));return function(){return s(n,(function(e){return e.unsubscribe()}))}}));return t}var Vt={};function jt(e){var t=y(e,(function(e){return Vt[e]||(Vt[e]=function(e){var t=new Nt((function(){var n=console[e];return console[e]=function(){var r=[].slice.call(arguments);n.apply(console,arguments);var i=Lt();t.notify(Qt(r,e,i))},function(){console[e]=n}}));return t}(e)),Vt[e]}));return qt.apply(this,t)}function Qt(e,t,n){var r,i=y(e,(function(e){return function(e){if("string"==typeof e)return e;if(e instanceof Error)return Pt(St(e));return P(e,0,2)}(e)})).join(" ");if(t===xe.error){var o=fe(e,(function(e){return e instanceof Error}));r=o?$t(St(o)):void 0,i="console error: "+i}return{api:t,message:i,stack:r,handlingStack:n}}var Wt="intervention",Gt="csp_violation";function Ht(e){var t,n=[];se(e,Gt)&&n.push(t=new Nt((function(){return ae(document,Qe,(function(e){t.notify(function(e){var t=Gt,n="'"+e.blockedURI+"' blocked by '"+e.effectiveDirective+"' directive";return{type:Gt,subtype:e.effectiveDirective,message:t+": "+n,stack:Xt(e.effectiveDirective,n+' of the policy "'+oe(e.originalPolicy,100)+'"',e.sourceFile,e.lineNumber,e.columnNumber)}}(e))})).stop})));var r=g(e,(function(e){return e!==Gt}));return r.length&&n.push(function(e){var t=new Nt((function(){if(window.ReportingObserver){var n=function(e){s(e,(function(e){t.notify(function(e){var t=e.body,n=e.type;return{type:n,subtype:t.id,message:n+": "+t.message,stack:Xt(t.id,t.message,t.sourceFile,t.lineNumber,t.columnNumber)}}(e))}))},r=new window.ReportingObserver(n,{types:e,buffered:!0});return r.observe(),function(){r.disconnect()}}}));return t}(r)),qt.apply(this,n)}function Xt(e,t,n,r,i){return n&&$t({name:e,message:t,stack:[{func:"?",url:n,line:r,column:i}]})}var zt=function(){this._events=[],this.pendingEvents=[]};zt.prototype={emit:function(e){var t=[].slice.call(arguments,1);s(this._events,(function(n){if(n.type!==e)return!1;n.callback.apply(n.context,t)}))},on:function(e,t,n){"function"==typeof t&&this._events.push({type:e,callback:t,context:n||this})}};new zt;var Kt,Jt="PERFORMANCE_ENTRIES_COLLECTED",Yt="AUTO_ACTION_COMPLETED",Zt="VIEW_CREATED",en="VIEW_UPDATED",tn="VIEW_ENDED",nn="SESSION_RENEWED",rn="SESSION_EXPIRED",on="BEFORE_UNLOAD",an="REQUEST_STARTED",un="REQUEST_COMPLETED",sn="RAW_RUM_EVENT_COLLECTED",cn="RUM_EVENT_COLLECTED",fn="RAW_ERROR_COLLECTED";function dn(){this.callbacks=[]}function ln(e,t,n){var r=l({},e),i=n(r);return s(t,(function(t){var n=pn(e,t),i=pn(r,t);"string"==typeof n&&"string"==typeof i&&function(e,t,n){for(var r=e,i=t.split("."),o=0;o<i.length;o+=1){var a=i[o];if(!vn(r,a))return;o!==i.length-1?r=r[a]:r[a]=n}}(e,t,i)})),i}function pn(e,t){var n=e;for(var r of t.split(".")){if(!vn(n,r))return;n=n[r]}return n}function vn(e,t){return"object"==typeof e&&null!==e&&t in e}function hn(e,t,n){var r=0,i=!1;return{isLimitReached:function(){if(0===r&&setTimeout((function(){r=0}),V),(r+=1)<=t||i)return i=!1,!1;if(r===t+1){i=!0;try{n({message:"Reached max number of "+e+"s by minute: "+t,source:Bt.AGENT,startClocks:K()})}finally{i=!1}}return!0}}}function mn(e){return yn(e,le(window.location)).href}function gn(e){return le(yn(e))}function yn(e,t){if(function(){if(void 0!==Kt)return Kt;try{var e=new URL("http://test/path");return Kt="http://test/path"===e.href}catch(e){Kt=!1}return Kt}())return void 0!==t?new URL(e,t):new URL(e);if(void 0===t&&!/:/.test(e))throw new Error("Invalid URL: "+e);var n=document,r=n.createElement("a");if(void 0!==t){var i=(n=document.implementation.createHTMLDocument("")).createElement("base");i.href=t,n.head.appendChild(i),n.body.appendChild(r)}return r.href=e,r}dn.prototype={notify:function(e,t){var n=this.callbacks[e];n&&s(n,(function(e){e(t)}))},subscribe:function(e,t){this.callbacks[e]||(this.callbacks[e]=[]),this.callbacks[e].push(t);var n=this;return{unsubscribe:function(){n.callbacks[e]=g(n.callbacks[e],(function(e){return e!==t}))}}}};var bn=navigator.userAgent.toLowerCase(),wn=function(){return/iphone os/.test(bn)};var _n;function Sn(e,t,n,r){var i=new Date;i.setTime(i.getTime()+n);var o="expires="+i.toUTCString(),a=r&&r.crossSite?"none":"strict",u=r&&r.domain?";domain="+r.domain:"",s=r&&r.secure?";secure":"";document.cookie=e+"="+t+";"+o+";path=/;samesite="+a+u+s}function xn(e){return function(e,t){var n=e.match("(?:^|;)\\s*"+t+"\\s*=\\s*([^;]+)");return n?n[1]:void 0}(document.cookie,e)}var Cn,Tn,En=/^\s+|\s+$/g;function On(e){return e.replace(En,"")}function kn(e){return e.lastIndexOf("/")===e.length-1?On(e)+"v1/write/logging":On(e)+"/v1/write/logging"}function In(e){var t,n;if(void 0===e.sampleRate||de(e.sampleRate))return c({beforeSend:e.beforeSend&&(t=e.beforeSend,n="beforeSend threw an error:",function(){var e=[].slice.call(arguments);try{return t.apply(this,e)}catch(e){Ce.error(n,e)}}),cookieOptions:Rn(e),sampleRate:ye(e.sampleRate,100),service:e.service,version:e.version,env:e.env,silentMultipleInit:!!e.silentMultipleInit,batchBytesLimit:16384,eventRateLimiterThreshold:3e3,flushTimeout:3e4,batchMessagesLimit:50,messageBytesLimit:262144},function(e){var t=function(e){return!1};"isIntakeUrl"in e&&v(e.isIntakeUrl)&&C(e.isIntakeUrl())&&(t=e.isIntakeUrl);var n,r=function(e){return!1};return"isServerError"in e&&v(e.isServerError)&&C(e.isServerError())&&(r=e.isServerError),{datakitUrl:(n=e.datakitUrl||e.datakitOrigin,n.lastIndexOf("/")===n.length-1?On(n)+"v1/write/rum":On(n)+"/v1/write/rum"),logsEndpoint:kn(e.datakitOrigin),isIntakeUrl:t,isServerError:r}}(e));Ce.error("Sample Rate should be a number between 0 and 100")}function Rn(e){var t={};return t.secure=function(e){return!!e.useSecureSessionCookie||!!e.useCrossSiteSessionCookie}(e),t.crossSite=!!e.useCrossSiteSessionCookie,e.trackSessionAcrossSubdomains&&(t.domain=function(){if(void 0===_n){for(var e="dd_site_test_".concat(I()),t=window.location.hostname.split("."),n=t.pop();t.length&&!xn(e);)n=t.pop()+"."+n,Sn(e,"test",q,{domain:n});_n=n}return _n}()),t}function An(){var e;return Cn||(e=new Nt((function(){if(window.fetch){var t=bt(window,"fetch",(function(t){return function(n,r){var i,o=function(e,t,n){var r=n&&n.method||"object"==typeof t&&t.method||"GET",i=mn("object"==typeof t&&t.url||t),o=K(),a={state:"start",init:n,input:t,method:r,startClocks:o,url:i};return e.notify(a),a}(e,n,r);return o?(i=t.call(this,o.input,o.init),function(e,t,n){var r=function(t){var r=n;r.state="complete",r.duration=Z(r.startClocks.timeStamp,J()),"stack"in t||t instanceof Error?(r.status=0,r.isAborted=t instanceof DOMException&&t.code===DOMException.ABORT_ERR,r.error=t,e.notify(r)):"status"in t&&(r.response=t,r.responseType=t.type,r.status=t.status,r.isAborted=!1,e.notify(r))};t.then(r,r)}(e,i,o)):i=t.call(this,n,r),i}}));return t.stop}})),Cn=e),Cn}var Mn={};function Bn(){var e;return Tn||(e=new Nt((function(){var t=wt(XMLHttpRequest.prototype,"open",{before:Un}),n=wt(XMLHttpRequest.prototype,"send",{before:function(){Ln.call(this,e)}}),r=wt(XMLHttpRequest.prototype,"abort",{before:Pn});return function(){t.stop(),n.stop(),r.stop()}})),Tn=e),Tn}function Un(e,t){var n=this._DATAFLUX_REQUEST_UUID||I();this._DATAFLUX_REQUEST_UUID=n,Mn[n]={state:"open",method:e,url:mn(String(t))}}function Ln(e){var t=Mn[this._DATAFLUX_REQUEST_UUID];if(t){var n=t;n.state="start",n.startTime=z(),n.startClocks=K(),n.isAborted=!1,n.xhr=this;var r=!1,i=wt(this,"onreadystatechange",{before:function(){this.readyState===XMLHttpRequest.DONE&&o.call(this)}}),o=function o(){if(this.removeEventListener("loadend",o),i.stop(),!r){r=!0;var a=t;a.state="complete",a.duration=Z(n.startClocks.timeStamp,J()),a.status=this.status,e.notify(f(a)),$n.call(this)}};this.addEventListener("loadend",o),e.notify(n)}}function $n(){delete Mn[this._DATAFLUX_REQUEST_UUID],delete this._DATAFLUX_REQUEST_UUID}function Pn(){var e=Mn[this._DATAFLUX_REQUEST_UUID];e&&(e.isAborted=!0)}var Dn={action_id:"action.id",sdk_name:"_dd.sdk_name",sdk_version:"_dd.sdk_version",app_id:"application.id",env:"env",service:"service",version:"version",userid:"user.id",user_email:"user.email",user_name:"user.name",session_id:"session.id",session_type:"session.type",session_sampling:"session.is_sampling",is_signin:"user.is_signin",os:"device.os",os_version:"device.os_version",os_version_major:"device.os_version_major",browser:"device.browser",browser_version:"device.browser_version",browser_version_major:"device.browser_version_major",screen_size:"device.screen_size",network_type:"device.network_type",device:"device.device",view_id:"view.id",view_referrer:"view.referrer",view_url:"view.url",view_host:"view.host",view_path:"view.path",view_path_group:"view.path_group",view_url_query:"view.url_query"},Fn={view:{type:ut.VIEW,tags:{view_loading_type:"view.loading_type",view_apdex_level:"view.apdex_level",is_active:"view.is_active"},fields:{view_error_count:"view.error.count",view_resource_count:"view.resource.count",view_long_task_count:"view.long_task.count",view_action_count:"view.action.count",first_contentful_paint:"view.first_contentful_paint",largest_contentful_paint:"view.largest_contentful_paint",cumulative_layout_shift:"view.cumulative_layout_shift",first_input_delay:"view.first_input_delay",loading_time:"view.loading_time",dom_interactive:"view.dom_interactive",dom_content_loaded:"view.dom_content_loaded",dom_complete:"view.dom_complete",load_event:"view.load_event",first_input_time:"view.first_input_time",first_meaningful_paint:"view.largest_contentful_paint",first_paint_time:"view.fpt",resource_load_time:"view.resource_load_time",time_to_interactive:"view.tti",dom:"view.dom",dom_ready:"view.dom_ready",time_spent:"view.time_spent"}},resource:{type:ut.RESOURCE,tags:{trace_id:"_dd.trace_id",span_id:"_dd.span_id",resource_url:"resource.url",resource_url_host:"resource.url_host",resource_url_path:"resource.url_path",resource_url_path_group:"resource.url_path_group",resource_url_query:"resource.url_query",resource_type:"resource.type",resource_status:"resource.status",resource_status_group:"resource.status_group",resource_method:"resource.method"},fields:{duration:"resource.duration",resource_size:"resource.size",resource_dns:"resource.dns",resource_tcp:"resource.tcp",resource_ssl:"resource.ssl",resource_ttfb:"resource.ttfb",resource_trans:"resource.trans",resource_first_byte:"resource.firstbyte"}},error:{type:ut.ERROR,tags:{error_id:"error.id",trace_id:"_dd.trace_id",span_id:"_dd.span_id",error_source:"error.source",error_type:"error.type",error_handling:"error.handling"},fields:{error_message:["string","error.message"],error_stack:["string","error.stack"],error_causes:["string","error.causes"]}},long_task:{type:ut.LONG_TASK,tags:{long_task_id:"long_task.id"},fields:{duration:"long_task.duration"}},action:{type:ut.ACTION,tags:{action_name:"action.target.name",action_type:"action.type"},fields:{duration:"action.loading_time",action_error_count:"action.error.count",action_resource_count:"action.resource.count",action_frustration_types:"action.frustration.type",action_long_task_count:"action.long_task.count"}},browser_log:{type:ut.LOGGER,tags:{error_source:"error.source",error_type:"error.type",error_resource_url:"http.url",error_resource_url_host:"http.url_host",error_resource_url_path:"http.url_path",error_resource_url_path_group:"http.url_path_group",error_resource_status:"http.status_code",error_resource_status_group:"http.status_group",error_resource_method:"http.method",action_id:"user_action.id",service:"service",status:"status"},fields:{message:["string","message"]}}};var Nn,qn=144e5,Vn=9e5,jn=/^([a-z]+)=([a-z0-9-]+)$/,Qn="&",Wn="_dataflux_s",Gn=[];function Hn(e,t){if(void 0===t&&(t=0),Nn||(Nn=e),e===Nn)if(t>=100)Kn();else{var n,r=Yn();if(Xn()){if(r.lock)return void zn(e,t);if(n=I(),r.lock=n,Jn(r,e.options),(r=Yn()).lock!==n)return void zn(e,t)}var i=e.process(r);if(Xn()&&(r=Yn()).lock!==n)zn(e,t);else{if(i&&function(e,t){if(Zn(e))return void function(e){Sn(Wn,"",0,e)}(t);e.expire=String(Y()+Vn),Jn(e,t)}(i,e.options),Xn()&&(!i||!Zn(i))){if((r=Yn()).lock!==n)return void zn(e,t);delete r.lock,Jn(r,e.options),i=r}e.after&&e.after(i||r),Kn()}}else Gn.push(e)}function Xn(){return!!window.chrome||/HeadlessChrome/.test(window.navigator.userAgent)}function zn(e,t){setTimeout((function(){Hn(e,t+1)}),10)}function Kn(){Nn=void 0;var e=Gn.shift();e&&Hn(e)}function Jn(e,t){Sn(Wn,function(e){return y(S(e),(function(e){return e[0]+"="+e[1]})).join(Qn)}(e),Vn,t)}function Yn(){var e=xn(Wn),t={};return function(e){return void 0!==e&&(-1!==e.indexOf(Qn)||jn.test(e))}(e)&&s(e.split(Qn),(function(e){var n=jn.exec(e);if(null!==n){var r=n[1],i=n[2];t[r]=i}})),t}function Zn(e){return _(e)}function er(e,t,n){var r=new Nt,i=new Nt,o=setInterval((function(){Hn({options:e,process:function(e){return c(e)?void 0:{}},after:u})}),1e3),a=function(){var e=Yn();if(c(e))return e;return{}}();function u(e){return c(e)||(e={}),s()&&(!function(e){return a.id!==e.id||a[t]!==e[t]}(e)?a=e:(a={},i.notify())),e}function s(){return void 0!==a[t]}function c(e){return(void 0===e.created||Y()-Number(e.created)<qn)&&(void 0===e.expire||Y()<Number(e.expire))}return{expandOrRenewSession:O((function(){var i;Hn({options:e,process:function(e){var r=u(e);return i=function(e){var r=n(e[t]),i=r.trackingType,o=r.isTracked;e[t]=i,o&&!e.id&&(e.id=I(),e.created=String(Y()));return o}(r),r},after:function(e){i&&!s()&&function(e){a=e,r.notify()}(e),a=e}})}),1e3),expandSession:function(){Hn({options:e,process:function(e){return s()?u(e):void 0}})},getSession:function(){return a},renewObservable:r,expireObservable:i,stop:function(){clearInterval(o)}}}var tr=[],nr=function(e,t,n){var r=er(e,t,n);tr.push((function(){return r.stop()}));var i,o=new Se(144e5);function a(){return{id:r.getSession().id,trackingType:r.getSession()[t]}}return tr.push((function(){return o.stop()})),r.renewObservable.subscribe((function(){o.add(a(),z())})),r.expireObservable.subscribe((function(){o.closeActive(z())})),r.expandOrRenewSession(),o.add(a(),ee().relative),i=ue(window,[Ie,Ue,Re,Be],(function(){return r.expandOrRenewSession()}),{capture:!0,passive:!0}),tr.push(i.stop),function(e){var t=function(){"visible"===document.visibilityState&&e()},n=ae(document,Le,t);tr.push(n.stop);var r=setInterval(t,6e4);tr.push((function(){clearInterval(r)}))}((function(){return r.expandSession()})),{findActiveSession:function(e){return o.find(e)},renewObservable:r.renewObservable,expireObservable:r.expireObservable}};var rr=3145728,ir="UP",or="FAILURE_DETECTED",ar="DOWN",ur="AFTER_SUCCESS",sr="AFTER_RESUME";function cr(e,t,n,r){t.transportStatus===ir&&0===t.queuedPayloads.size()&&t.bandwidthMonitor.canHandle(e)?dr(e,t,n,{onSuccess:function(){return lr(ur,t,n,r)},onFailure:function(){t.queuedPayloads.enqueue(e),fr(t,n,r)}}):t.queuedPayloads.enqueue(e)}function fr(e,t,n){e.transportStatus===ar&&setTimeout((function(){dr(e.queuedPayloads.first(),e,t,{onSuccess:function(){e.queuedPayloads.dequeue(),e.currentBackoffTime=1e3,lr(sr,e,t,n)},onFailure:function(){e.currentBackoffTime=Math.min(256e3,2*e.currentBackoffTime),fr(e,t,n)}})}),e.currentBackoffTime)}function dr(e,t,n,r){var i=r.onSuccess,o=r.onFailure;t.bandwidthMonitor.add(e),n(e,(function(n){t.bandwidthMonitor.remove(e),!function(e){return 0!==e.status&&e.status<500}(n)?(t.transportStatus=t.bandwidthMonitor.ongoingRequestCount>0?or:ar,t.lastFailureStatus=n.status,o()):(t.transportStatus=ir,i())}))}function lr(e,t,n,r){e===ur&&t.queuedPayloads.isFull()&&!t.queueFullReported&&(r({message:"Reached max events size queued for upload: 3MiB",source:Bt.AGENT,startClocks:K()}),t.queueFullReported=!0);var i=t.queuedPayloads;for(t.queuedPayloads=pr();i.size()>0;)cr(i.dequeue(),t,n,r)}function pr(){var e=[];return{bytesCount:0,enqueue:function(t){this.isFull()||(e.push(t),this.bytesCount+=t.bytesCount)},first:()=>e[0],dequeue(){var t=e.shift();return t&&(this.bytesCount-=t.bytesCount),t},size:()=>e.length,isFull(){return this.bytesCount>=rr}}}function vr(e){return e?e+(-1===e.indexOf("?")?"?":"&")+"precision=ms":e}function hr(e,t,n){var r={transportStatus:ir,lastFailureStatus:0,currentBackoffTime:1e3,bandwidthMonitor:{ongoingRequestCount:0,ongoingByteCount:0,canHandle:function(e){return 0===this.ongoingRequestCount||this.ongoingByteCount+e.bytesCount<=81920&&this.ongoingRequestCount<32},add:function(e){this.ongoingRequestCount+=1,this.ongoingByteCount+=e.bytesCount},remove:function(e){this.ongoingRequestCount-=1,this.ongoingByteCount-=e.bytesCount}},queuedPayloads:pr(),queueFullReported:!1},i=function(n,r){return function(e,t,n,r){var i=n.data,o=n.bytesCount,a=vr(e);(function(){try{return window.Request&&"keepalive"in new Request("http://a")}catch(e){return!1}})()&&o<t?fetch(a,{method:"POST",body:i,keepalive:!0}).then((function(e){"function"==typeof r&&r({status:e.status})}),(function(){mr(a,i,r)})):mr(a,i,r)}(e,t,n,r)};return{send:function(e){cr(e,r,i,n)},sendOnExit:function(n){!function(e,t,n){var r=n.data,i=n.bytesCount,o=vr(e);if(navigator.sendBeacon&&i<t)try{if(navigator.sendBeacon(o,r))return}catch(e){}mr(o,r)}(e,t,n)}}}function mr(e,t,n){var r=new XMLHttpRequest;r.open("POST",e,!0),r.send(t),r.addEventListener("loadend",(function(){"function"==typeof n&&n({status:r.status})}))}var gr=/[^\u0000-\u007F]/,yr="custom_keys",br=function(e){if(!e||!e.type)return{rowStr:"",rowData:void 0};var t={tags:{},fields:{}},n=!1,r="";return s(Fn,(function(i,o){if(i.type===e.type){r+=o+",",t.measurement=o;var a=[],u=d({},Dn,i.tags),c=["date","type",yr];s(u,(function(n,r){var i=ie(e,n);c.push(r),(i||T(i))&&(t.tags[r]=function(e){return x(e)?e:P(e)}(i),a.push(he(r)+"="+he(i)))}));var f=[];if(s(i.fields,(function(n,r){if(p(n)&&2===n.length){n[0];var i=n[1],o=ie(e,i);c.push(r),(o||T(o))&&(t.fields[r]=o,f.push(he(r)+"="+ge(o)))}else if(x(n)){o=ie(e,n);c.push(r),(o||T(o))&&(t.fields[r]=o,f.push(he(r)+"="+ge(o)))}})),e.tags&&w(e.tags)&&!_(e.tags)){var l=[];s(e.tags,(function(e,n){c.indexOf(n)>-1||(c.push(n),(e||T(e))&&(l.push(n),t.fields[n]=e,f.push(he(n)+"="+ge(e))))})),l.length&&(t.fields.custom_keys=ge(l),f.push(he(yr)+"="+ge(l)))}e.type===ut.LOGGER&&s(e,(function(e,n){-1===c.indexOf(n)&&(T(e)||x(e)||C(e))&&(t.fields[n]=e,f.push(he(n)+"="+ge(e)))})),a.length&&(r+=a.join(",")),f.length&&(r+=" ",r+=f.join(","),n=!0),r=r+" "+e.date,t.time=G(e.date)}})),{rowStr:n?r:"",rowData:n?t:void 0}},wr=function(e,t,n,r,i,o){this.pushOnlyBuffer=[],this.upsertBuffer={},this.bufferBytesCount=0,this.bufferMessagesCount=0,this.request=e,this.batchMessagesLimit=t,this.batchBytesLimit=n,this.messageBytesLimit=r,this.flushTimeout=i,this.beforeUnloadCallback="function"==typeof o?o:F,this.setupFlushOnExit(),this.flushPeriodically()};wr.prototype.add=function(e){this.addOrUpdate(e)},wr.prototype.upsert=function(e,t){this.addOrUpdate(e,t)},wr.prototype.flush=function(e){if("function"!=typeof e&&(e=this.request.send),0!==this.bufferMessagesCount){var t=this.pushOnlyBuffer.concat(m(this.upsertBuffer)),n=this.bufferBytesCount;this.pushOnlyBuffer=[],this.upsertBuffer={},this.bufferBytesCount=0,this.bufferMessagesCount=0,t.length>0&&e({data:t.join("\n"),bytesCount:n})}},wr.prototype.flushOnExit=function(){this.flush(this.request.sendOnExit)},wr.prototype.computeBytesCount=function(e){return gr.test(e)?void 0!==window.TextEncoder?(new TextEncoder).encode(e).length:new Blob([e]).size:e.length},wr.prototype.addOrUpdate=function(e,t){var n=this.process(e),r=n.processedMessage,i=n.messageBytesCount;i>=this.messageBytesLimit?Ce.warn("Discarded a message whose size was bigger than the maximum allowed size "+this.messageBytesLimit+"KB."):(this.hasMessageFor(t)&&this.remove(t),this.willReachedBytesLimitWith(i)&&this.flush(),this.push(r,i,t),this.isFull()&&this.flush())},wr.prototype.process=function(e){var t=br(e).rowStr;return{processedMessage:t,messageBytesCount:this.computeBytesCount(t)}},wr.prototype.push=function(e,t,n){this.bufferMessagesCount>0&&(this.bufferBytesCount+=1),void 0!==n?this.upsertBuffer[n]=e:this.pushOnlyBuffer.push(e),this.bufferBytesCount+=t,this.bufferMessagesCount+=1},wr.prototype.remove=function(e){var t=this.upsertBuffer[e];delete this.upsertBuffer[e];var n=this.computeBytesCount(t);this.bufferBytesCount-=n,this.bufferMessagesCount-=1,this.bufferMessagesCount>0&&(this.bufferBytesCount-=1)},wr.prototype.hasMessageFor=function(e){return void 0!==e&&void 0!==this.upsertBuffer[e]},wr.prototype.willReachedBytesLimitWith=function(e){return this.bufferBytesCount+e+1>=this.batchBytesLimit},wr.prototype.isFull=function(){return this.bufferMessagesCount===this.batchMessagesLimit||this.bufferBytesCount>=this.batchBytesLimit},wr.prototype.flushPeriodically=function(){var e=this;setTimeout((function(){e.flush(),e.flushPeriodically()}),this.flushTimeout)},wr.prototype.setupFlushOnExit=function(){var e=this;navigator.sendBeacon&&(ae(window,ke,this.beforeUnloadCallback),ae(document,Le,(function(){"hidden"===document.visibilityState&&e.flushOnExit()})),ae(window,ke,(function(){return e.flushOnExit()})))};var _r=wr;var Sr="0",xr="1",Cr="2";function Tr(e,t){var n=nr(e.cookieOptions,"rum",(function(t){return function(e,t){var n;n=function(e){return e===Sr||e===xr||e===Cr}(t)?t:j(e.sampleRate)?j(e.sessionReplaySampleRate)?xr:Cr:Sr;return{trackingType:n,isTracked:Er(n)}}(e,t)}));return n.expireObservable.subscribe((function(){t.notify(rn)})),n.renewObservable.subscribe((function(){t.notify(nn)})),{findTrackedSession:function(e){var t=n.findActiveSession(e);if(t&&Er(t.trackingType))return{id:t.id}}}}function Er(e){return e===Cr||e===xr}var Or="_dataflulx_usr_id",kr="initial_document",Ir=[[Ge,function(e){return kr===e}],[He,function(e){return"xmlhttprequest"===e}],[ze,function(e){return"fetch"===e}],[Xe,function(e){return"beacon"===e}],[Ke,function(e,t){return null!==t.match(/\.css$/i)}],[Je,function(e,t){return null!==t.match(/\.js$/i)}],[Ye,function(e,t){return se(["image","img","icon"],e)||null!==t.match(/\.(gif|jpg|jpeg|tiff|png|svg|ico)$/i)}],[Ze,function(e,t){return null!==t.match(/\.(woff|eot|woff2|ttf)$/i)}],[et,function(e,t){return se(["audio","video"],e)||null!==t.match(/\.(mp3|mp4)$/i)}]];function Rr(e){var t=e.name;if(!function(e){try{return!!yn(e)}catch(e){return!1}}(t))return tt;var n=function(e){var t=yn(e).pathname;return"/"===t[0]?t:"/"+t}(t),r=tt;return s(Ir,(function(t){var i=t[0];if((0,t[1])(e.initiatorType,n))return r=i,!1})),r}function Ar(){for(var e=h(arguments),t=1;t<e.length;t+=1)if(e[t-1]>e[t])return!1;return!0}function Mr(e){var t=Br(e);if(t){var n=t.startTime,r=t.fetchStart,i=t.redirectStart,o=t.redirectEnd,a=t.domainLookupStart,u=t.domainLookupEnd,s=t.connectStart,c=t.secureConnectionStart,f=t.connectEnd,d=t.requestStart,l=t.responseStart,p=t.responseEnd,v={firstbyte:Lr(n,a,l),trans:Lr(n,l,p),ttfb:Lr(n,d,l)};return f!==r&&(v.tcp=Lr(n,s,f),Ar(s,c,f)&&(v.ssl=Lr(n,c,f))),u!==r&&(v.dns=Lr(n,a,u)),Ur(e)&&(v.redirect=Lr(n,i,o)),v}}function Br(e){if(Ar(e.startTime,e.fetchStart,e.domainLookupStart,e.domainLookupEnd,e.connectStart,e.connectEnd,e.requestStart,e.responseStart,e.responseEnd)){if(!Ur(e))return e;var t=e.redirectStart,n=e.redirectEnd;if(t<e.startTime&&(t=e.startTime),n<e.startTime&&(n=e.fetchStart),Ar(e.startTime,t,n,e.fetchStart))return d({},e,{redirectEnd:n,redirectStart:t})}}function Ur(e){return e.fetchStart!==e.startTime}function Lr(e,t,n){return W(n-t)}function $r(e){if(e.startTime<e.responseStart)return e.decodedBodySize}function Pr(e,t){return t&&!function(e,t){var n=[t.datakitUrl];return t.logsEndpoint&&n.push(t.logsEndpoint),b(n,(function(t){return 0===e.indexOf(t)}))||t.isIntakeUrl(e)}(t,e)}function Dr(){return void 0!==window.performance&&"getEntries"in performance}function Fr(e){return window.PerformanceObserver&&void 0!==PerformanceObserver.supportedEntryTypes&&se(PerformanceObserver.supportedEntryTypes,e)}function Nr(e,t){var n;if(n=function(n){jr(e,t,[n])},qr("interactive",(function(){var e,t={entryType:"resource",initiatorType:kr,traceId:""};if(Fr("navigation")&&performance.getEntriesByType("navigation").length>0){var r=performance.getEntriesByType("navigation")[0];e=d(r.toJSON(),t)}else{var i=Vr();e=d(i,{decodedBodySize:0,duration:i.responseEnd,name:window.location.href,startTime:0},t)}n(e)})),Dr()){var r=performance.getEntries();setTimeout((function(){jr(e,t,r)}))}if(window.PerformanceObserver){var i=function(n){jr(e,t,n.getEntries())},o=["resource","navigation","longtask","paint"],a=["largest-contentful-paint","first-input","layout-shift"];try{s(a,(function(e){new PerformanceObserver(i).observe({type:e,buffered:!0})}))}catch(e){s(a,(function(e){o.push(e)}))}new PerformanceObserver(i).observe({entryTypes:o}),Dr()&&"addEventListener"in performance&&performance.addEventListener("resourcetimingbufferfull",(function(){performance.clearResourceTimings()}))}Fr("navigation")||function(e){function t(){e(d(Vr(),{entryType:"navigation"}))}qr("complete",(function(){setTimeout(t)}))}((function(n){jr(e,t,[n])})),Fr("first-input")||function(e){var t=Y(),n=!1,r=ue(window,[Ie,Ve,Re,Ue,Pe],(function(e){if(e.cancelable){var t={entryType:"first-input",processingStart:z(),startTime:e.timeStamp};e.type===Pe?i(t):o(t)}}),{passive:!0,capture:!0}).stop;function i(e){ue(window,[De,Fe],(function(t){t.type===De&&o(e)}),{once:!0})}function o(i){if(!n){n=!0,r();var o=i.processingStart-i.startTime;o>=0&&o<Y()-t&&e(i)}}}((function(n){return jr(e,t,[n])}))}function qr(e,t){document.readyState===e||"complete"===document.readyState?t():ae(window,"complete"===e?Ae:$e,t,{once:!0})}function Vr(){var e={},t=performance.timing;for(var n in t)T(t[n])&&(e[n]=0===t[n]?0:H(t[n]));return e}function jr(e,t,n){var r=g(n,(function(e){return"resource"===e.entryType||"navigation"===e.entryType||"paint"===e.entryType||"longtask"===e.entryType||"largest-contentful-paint"===e.entryType||"first-input"===e.entryType||"layout-shift"===e.entryType})),i=g(r,(function(e){return!function(e){return"navigation"===e.entryType&&e.loadEventEnd<=0}(e)&&!function(e,t){return"resource"===t.entryType&&!Pr(e,t.name)}(t,e)}));i.length&&e.notify(Jt,i)}function Qr(){var e=function(){var e,t=window;if(t.Zone){var n=t.Zone.__symbol__;if(!(e=t[n("MutationObserver")])&&t.MutationObserver){var r=new t.MutationObserver(F)[n("originalInstance")];e=r&&r.constructor}}e||(e=t.MutationObserver);return e}(),t=new Nt((function(){if(e){var n=new e((function(){return t.notify()}));return n.observe(document,{attributes:!0,characterData:!0,childList:!0,subtree:!0}),function(){return n.disconnect()}}}));return t}function Wr(e){var t=f(e),n=new Nt((function(){var e=function(e){var t=history.pushState;history.pushState=function(){t.apply(this,arguments),e()};var n=history.replaceState;history.replaceState=function(){n.apply(this,arguments),e()};var r=ae(window,Me,e).stop;return{stop:function(){r(),history.pushState=t,history.replaceState=n}}}(r),t=ae(window,Ne,r);return function(){e.stop(),t.stop()}}));function r(){if(t.href!==e.href){var r=f(e);n.notify({newLocation:r,oldLocation:t}),t=r}}return n}function Gr(e,t){void 0===t&&(t=F);var n={errorCount:0,longTaskCount:0,resourceCount:0,actionCount:0,frustrationCount:0},r=e.subscribe(cn,(function(e){switch(e.type){case ut.ERROR:n.errorCount+=1,t(n);break;case ut.ACTION:e.action.frustration&&(n.frustrationCount+=e.action.frustration.type.length),n.actionCount+=1,t(n);break;case ut.LONG_TASK:n.longTaskCount+=1,t(n);break;case ut.RESOURCE:n.resourceCount+=1,t(n)}}));return{stop:function(){r.unsubscribe()},eventCounts:n}}function Hr(e,t,n,r,i){var o=function(e,t,n){var r=new Nt((function(){var i,o=[],a=0;return o.push(t.subscribe(u),e.subscribe(Jt,(function(e){b(e,(function(e){return"resource"===e.entryType&&!Xr(n,e.name)}))&&u()})),e.subscribe(an,(function(e){Xr(n,e.url)||(void 0===i&&(i=e.requestIndex),a+=1,u())})),e.subscribe(un,(function(e){Xr(n,e.url)||void 0===i||e.requestIndex<i||(a-=1,u())}))),wt(window,"open",{before:u}),function(){s(o,(function(e){e.unsubscribe()}))};function u(){r.notify({isBusy:a>0})}}));return r}(e,t,n);return function(e,t,n){var r,i=!1,o=setTimeout((function(){c({hadActivity:!1})}),100),a=n&&setTimeout((function(){return c({hadActivity:!0,end:J()})}),n),u=e.subscribe((function(e){var t=e.isBusy;clearTimeout(o),clearTimeout(r);var n=J();t||(r=setTimeout((function(){c({hadActivity:!0,end:n})}),100))})),s=function(){i=!0,clearTimeout(o),clearTimeout(r),clearTimeout(a),u.unsubscribe()};function c(e){i||(s(),t(e))}return{stop:s}}(o,r,i)}function Xr(e,t){return n=e.excludedActivityUrls,r=t,b(n,(function(e){return e===r||e instanceof RegExp&&e.test(r)}));var n,r}var zr=q,Kr="WaitingForMoreClicks",Jr="WaitingForClicksToStop",Yr="Finalized";function Zr(e,t){var n,r=[],i=Kr;function a(e){e.stopObservable.subscribe(u),r.push(e),clearTimeout(n),n=setTimeout(s,1e3)}function u(){i===Jr&&function(e,t,n){if(e.every)return e.every(t);for(var r=!0,i=0;i<e.length;i++)if(o.call(e,i)){var a=e[i];if(!t.call(n,a,i,e)){r=!1;break}}return r}(r,(function(e){return e.isStopped()}))&&(i=Yr,t(r))}function s(){clearTimeout(n),i===Kr&&(i=Jr,u())}return a(e),{tryAppend:function(e){return i===Kr&&(r.length>0&&(t=r[r.length-1].event,n=e.event,!(t.target===n.target&&(o=t,u=n,Math.sqrt(Math.pow(o.clientX-u.clientX,2)+Math.pow(o.clientY-u.clientY,2))<=100)&&t.timeStamp-n.timeStamp<=zr))?(s(),!1):(a(e),!0));var t,n,o,u},stop:function(){s()}}}var ei="data-guance-action-name";function ti(e,t){return ni(e,ei)||t&&ni(e,t)||ui(e,t,oi)||ui(e,t,ai)||""}function ni(e,t){var n;if(function(){void 0===ii&&(ii="closest"in HTMLElement.prototype);return ii}())n=e.closest("["+t+"]");else for(var r=e;r;){if(r.hasAttribute(t)){n=r;break}r=r.parentElement}if(n)return ci(si(n.getAttribute(t).trim()))}var ri,ii,oi=[function(e,t){if(function(){void 0===ri&&(ri="labels"in HTMLInputElement.prototype);return ri}()){if("labels"in e&&e.labels&&e.labels.length>0)return fi(e.labels[0],t)}else if(e.id){var n=e.ownerDocument&&fe(e.ownerDocument.querySelectorAll("label"),(function(t){return t.htmlFor===e.id}));return n&&fi(n,t)}},function(e){if("INPUT"===e.nodeName){var t=e,n=t.getAttribute("type");if("button"===n||"submit"===n||"reset"===n)return t.value}},function(e,t){if("BUTTON"===e.nodeName||"LABEL"===e.nodeName||"button"===e.getAttribute("role"))return fi(e,t)},function(e){return e.getAttribute("aria-label")},function(e,t){var n=e.getAttribute("aria-labelledby");if(n)return n=n.split(/\s+/),n=y(n,(function(t){return function(e,t){return e.ownerDocument?e.ownerDocument.getElementById(t):null}(e,t)})),n=g(n,(function(e){return Boolean(e)})),(n=y(n,(function(e){return fi(e)}))).join(" ")},function(e){return e.getAttribute("alt")},function(e){return e.getAttribute("name")},function(e){return e.getAttribute("title")},function(e){return e.getAttribute("placeholder")},function(e){if("options"in e&&e.options.length>0)return fi(e.options[0])}],ai=[function(e,t){return fi(e,t)}];function ui(e,t,n){for(var r=e,i=0;i<=10&&r&&"BODY"!==r.nodeName&&"HTML"!==r.nodeName&&"HEAD"!==r.nodeName;){for(var o of n){var a=o(r,t);if("string"==typeof a){var u=a.trim();if(u)return ci(si(u))}}if("FORM"===r.nodeName)break;r=r.parentElement,i+=1}}function si(e){return e.replace(/\s+/g," ")}function ci(e){return e.length>100?oe(e,100)+" [...]":e}function fi(e,t){if(!e.isContentEditable){if("innerText"in e){var n=e.innerText,r=function(t){for(var r=e.querySelectorAll(t),i=0;i<r.length;i+=1){var o=r[i];if("innerText"in o){var a=o.innerText;a&&a.trim().length>0&&(n=n.replace(a,""))}}};return Boolean(document.documentMode)&&r("script, style"),r("[data-guance-action-name]"),t&&r("["+t+"]"),n}return e.textContent}}function di(){var e=window.getSelection();return!e||e.isCollapsed}function li(e){return e.target instanceof Element}function pi(e,t){if(function(e){if(b(e,(function(e){return e.getUserActivity().selection})))return!1;for(var t=0;t<e.length-2;t+=1)if(e[t+3-1].event.timeStamp-e[t].event.timeStamp<=q)return!0;return!1}(e))return t.addFrustration(it),e.some(vi)&&t.addFrustration(at),t.hasError&&t.addFrustration(ot),{isRage:!0};var n=b(e,(function(e){return e.getUserActivity().selection}));return s(e,(function(e){e.hasError&&e.addFrustration(ot),vi(e)&&!n&&e.addFrustration(at)})),{isRage:!1}}function vi(e){return!e.hasPageActivity&&!e.getUserActivity().input&&(t=e.event.target,n='input:not([type="checkbox"]):not([type="radio"]):not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="range"]),textarea,select,canvas,a[href],a[href] *',!(t.matches?t.matches(n):t.msMatchesSelector&&t.msMatchesSelector(n)));var t,n}function hi(e,t,n){var r,i=new Se(3e5),o=new Nt;e.subscribe(nn,(function(){i.reset()})),e.subscribe(on,g),e.subscribe(tn,g);var a,u,c,f,d,l,p,v,h=(a={onPointerDown:function(e){return function(e,t){return function(e,t){var n,r;return{type:"click",target:n,position:r,name:ti(e.target,t)}}(t,e.actionNameAttribute)}(n,e)},onClick:function(r,a,u){return function(e,t,n,r,i,o,a,u,s){var c=bi(t,r,s,a,u);e.trackFrustrations&&o(c);var f=Hr(t,n,e,(function(t){t.hadActivity&&t.end<c.startClocks.timeStamp?c.discard():(c.stop(t.hadActivity?t.end:void 0),e.trackFrustrations||(t.hadActivity?c.validate():c.discard()))}),1e4),d=t.subscribe(tn,(function(e){c.stop(e.endClocks.timeStamp)})),l=i.subscribe((function(){c.stop()}));c.stopObservable.subscribe((function(){d.unsubscribe(),f.stop(),l.unsubscribe()}))}(n,e,t,i,o,b,r,a,u)}},f=a.onClick,d=a.onPointerDown,l=!1,p=!1,v=[ae(window,Pe,(function(e){l=!1,u=di(),li(e)&&(c=d(e))}),{capture:!0}),ae(window,We,(function(){u&&di()||(l=!0)}),{capture:!0}),ae(window,Ie,(function(e){if(li(e)&&c){var t={selection:l,input:p};p||setTimeout((function(){t.input=p})),f(c,e,(function(){return t})),c=void 0}}),{capture:!0}),ae(window,je,(function(){p=!0}),{capture:!0})],{stop:function(){s(v,(function(e){return e.stop()}))}}),m=h.stop;return{stop:function(){g(),o.notify(),m()},actionContexts:{findActionId:function(e){return n.trackFrustrations?i.findAll(e):i.find(e)}}};function g(){r&&r.stop()}function b(e){if(!r||!r.tryAppend(e)){var t=e.clone();r=Zr(e,(function(e){!function(e,t){pi(e,t).isRage?(s(e,(function(e){e.discard()})),t.stop(J()),t.validate(y(e,(function(e){return e.event})))):(t.discard(),s(e,(function(e){e.validate()})))}(e,t)}))}}}var mi="ONGOING",gi="STOPPED",yi="FINALIZED";function bi(e,t,n,r,i){var o,a=I(),u=K(),s=t.add(a,u.relative),f=Gr(e),d=mi,l=[],p=new Nt;function v(e){d===mi&&(d=gi,(o=e)?s.close(H(o)):s.remove(),f.stop(),p.notify())}return{event:i,stop:v,startClocks:u,stopObservable:p,hasError:f.eventCounts.errorCount>0,hasPageActivity:void 0!==o,getUserActivity:n,addFrustration:function(e){l.push(e)},isStopped:function(){return d===gi||d===yi},clone:function(){return bi(e,t,n,r,i)},validate:function(t){if(v(),d===gi){var n=f.eventCounts,s=n.resourceCount,p=n.errorCount,h=n.longTaskCount,m=c({type:nt,duration:o&&Z(u.timeStamp,o),startClocks:u,id:a,frustrationTypes:l,counts:{resourceCount:s,errorCount:p,longTaskCount:h},events:ye(t,[i]),event:i},r);e.notify(Yt,m),d=yi}},discard:function(){v(),d=yi}}}function wi(e){var t=_i(e)?{action:{error:{count:e.counts.errorCount},id:e.id,loadingTime:G(e.duration),frustration:{type:e.frustrationTypes},long_task:{count:e.counts.longTaskCount},resource:{count:e.counts.resourceCount}},_dd:{action:{target:e.target,position:e.position}}}:{action:{loadingTime:0}};return{customerContext:_i(e)?void 0:e.context,rawRumEvent:l({action:{id:I(),target:{name:e.name},type:e.type},date:e.startClocks.timeStamp,type:ut.ACTION},t),startTime:e.startClocks.relative,domainContext:_i(e)?{event:e.event,events:e.events}:{}}}function _i(e){return e.type!==rt}function Si(e,t,n){var r=function(e,t,n){var r=i(e.datakitUrl,(function(){t.notify(on)}));function i(t,r){return new _r(hr(t,e.batchBytesLimit,n),e.batchMessagesLimit,e.batchBytesLimit,e.messageBytesLimit,e.flushTimeout,r)}return{add:function(e){r.add(e)},upsert:function(e,t){r.upsert(e,t)}}}(e,t,n);t.subscribe(cn,(function(e){e.type===ut.VIEW?r.upsert(e,e.view.id):r.add(e)}))}var xi="synthetics",Ci="user",Ti=["view.url","view.referrer","action.target.name","error.message","error.stack","error.resource.url","resource.url"],Ei=Ti.concat(["tags"]);function Oi(e,t,n,r,i,o,a,u,s){var c={};c[ut.ERROR]=hn(ut.ERROR,e.eventRateLimiterThreshold,s),c[ut.ACTION]=hn(ut.ACTION,e.eventRateLimiterThreshold,s),t.subscribe(sn,(function(s){var f=s.startTime,d=s.rawRumEvent,p=s.savedCommonContext,v=s.customerContext,h=s.domainContext,m=i.findView(f),g=o.findUrl(f),y=n.findTrackedSession(d.type!==ut.VIEW?f:void 0);if(y&&m&&g){var b=a.findActionId(f),w=p||u(),S={_dd:{sdkName:e.sdkName,sdkVersion:e.sdkVersion,drift:Math.round(Y()-(re()+performance.now()))},terminal:{type:"web"},application:{id:e.applicationId},device:Oe,env:e.env||"",service:m.service||e.service||"browser",version:m.version||e.version||"",source:"browser",date:J(),user:{id:r.getId(),is_signin:"F"},session:{type:void 0===window._DATAFLUX_SYNTHETICS_BROWSER?Ci:xi,id:y.id},view:{id:m.id,name:m.name,url:g.url,referrer:g.referrer,host:g.host,path:g.path,pathGroup:g.pathGroup,urlQuery:g.urlQuery},action:ki(d)&&b?{id:b}:void 0},x=pe(l(S,m,d)),C=l({},w.context,v);_(C)||(x.tags=C),"has_replay"in x.session||(x.session.has_replay=w.hasReplay),_(w.user)||(x.user=l({is_signin:"T"},w.user)),function(e,t,n,r){if(t){var i=ln(e,e.type===ut.VIEW?Ti:Ei,(function(e){return t(e,r)}));if(!1===i&&e.type!==ut.VIEW)return!1;!1===i&&Ce.warn("Can't dismiss view events using beforeSend!")}var o=!1;n[e.type]&&(o=n[e.type].isLimitReached());return!o}(x,e.beforeSend,c,h)&&(_(x.tags)&&delete x.tags,t.notify(cn,x))}}))}function ki(e){return-1!==[ut.ERROR,ut.RESOURCE,ut.LONG_TASK].indexOf(e.type)}var Ii;function Ri(e){var t=new Nt;return function(e){var t=jt([xe.error]).subscribe((function(t){e.notify({startClocks:K(),message:t.message,stack:t.stack,source:Bt.CONSOLE,handling:gt,handlingStack:t.handlingStack})}))}(t),function(e){Mt((function(t,n){e.notify(Ut({stackTrace:t,originalError:n,startClocks:K(),nonErrorPrefix:"Uncaught",source:Bt.SOURCE,handling:yt}))}))}(t),function(e){var t=Ht([Gt,Wt]).subscribe((function(t){e.notify({startClocks:K(),message:t.message,stack:t.stack,type:t.subtype,source:Bt.REPORT,handling:yt})}))}(t),t.subscribe((function(t){e.notify(fn,{error:t})})),function(e){return e.subscribe(fn,(function(t){e.notify(sn,c({customerContext:t.customerContext,savedCommonContext:t.savedCommonContext},function(e){return{rawRumEvent:{date:e.startClocks.timeStamp,error:{id:I(),message:e.message,source:e.source,stack:e.stack,handling_stack:e.handlingStack,type:e.type,handling:e.handling,causes:e.causes,source_type:"browser"},type:ut.ERROR},startTime:e.startClocks.relative,domainContext:{error:e.originalError}}}(t.error)))})),{addError:function(t,n){var r=t.error,i=Ut({stackTrace:r instanceof Error?St(r):void 0,originalError:r,handlingStack:t.handlingStack,startClocks:t.startClocks,nonErrorPrefix:"Provided",source:Bt.CUSTOM,handling:gt});e.notify(fn,{customerContext:t.context,savedCommonContext:n,error:i})}}}(e)}function Ai(e){if(void 0===e&&(e=window),!Ii)if("hidden"===document.visibilityState)Ii={timeStamp:0};else{Ii={timeStamp:1/0};var t=ue(e,[qe,Le],(function(e){"pagehide"!==event.type&&"hidden"!==document.visibilityState||(Ii.timeStamp=event.timeStamp,t())}),{capture:!0}).stop}return Ii}var Mi=6e5;function Bi(e,t){var n={};function r(e){n=d(n,e),t(n)}var i=function(e,t){return{stop:e.subscribe(Jt,(function(e){for(var n of e)"navigation"===n.entryType&&t({fetchStart:n.fetchStart,responseEnd:n.responseEnd,domComplete:n.domComplete,domContentLoaded:n.domContentLoadedEventEnd,domInteractive:n.domInteractive,loadEvent:n.loadEventEnd,loadEventEnd:n.loadEventEnd,loadEventStart:n.loadEventStart,domContentLoadedEventEnd:n.domContentLoadedEventEnd,domContentLoadedEventStart:n.domContentLoadedEventStart})})).unsubscribe}}(e,r),o=i.stop,a=function(e,t){var n=Ai();return{stop:e.subscribe(Jt,(function(e){var r=fe(e,(function(e){return"paint"===e.entryType&&"first-contentful-paint"===e.name&&e.startTime<n.timeStamp&&e.startTime<Mi}));r&&t(r.startTime)})).unsubscribe}}(e,(function(e){r({firstContentfulPaint:e})})),u=a.stop,s=function(e,t,n){var r=Ai(),i=1/0,o=ue(t,[Pe,Re],(function(e){i=e.timeStamp}),{capture:!0,once:!0}).stop,a=e.subscribe(Jt,(function(e){var t=function(e,t){for(var n=e.length-1;n>=0;n-=1){var r=e[n];if(t(r,n,e))return r}}(e,(function(e){return"largest-contentful-paint"===e.entryType&&e.startTime<i&&e.startTime<r.timeStamp&&e.startTime<Mi}));t&&n(t.startTime)})).unsubscribe;return{stop:function(){o(),a()}}}(e,window,(function(e){r({largestContentfulPaint:e})})),c=s.stop,f=function(e,t){var n=Ai();return{stop:e.subscribe(Jt,(function(e){var r=fe(e,(function(e){return"first-input"===e.entryType&&e.startTime<n.timeStamp}));if(r){var i=Z(r.startTime,r.processingStart);t({firstInputDelay:i>=0?i:0,firstInputTime:r.startTime})}})).unsubscribe}}(e,(function(e){r({firstInputDelay:e.firstInputDelay,firstInputTime:e.firstInputTime})})),l=f.stop;return{stop:function(){o(),u(),c(),l()}}}function Ui(e,t,n,r,i,o){var a,u={eventCounts:{errorCount:0,longTaskCount:0,resourceCount:0,actionCount:0,frustrationCount:0}},s=Gr(e,(function(e){u.eventCounts=e,r()})).stop,c=function(e,t,n,r,i,o){var a=r===st,u=!0,s=[];function c(){!u&&!a&&s.length>0&&o(Math.max.apply(Math,s))}return{setLoadEvent:function(e){a&&(a=!1,s.push(e),c())},stop:Hr(e,t,n,(function(e){u&&(u=!1,e.hadActivity&&s.push(Z(i.timeStamp,e.end)),c())})).stop}}(e,t,n,i,o,(function(e){u.loadingTime=e,r()})),f=c.setLoadEvent,d=c.stop;if(Fr("layout-shift")){u.cumulativeLayoutShift=0;var l=function(e,t){var n=0,r=function(){var e,t,n=0;return{update:function(r){void 0===e||r.startTime-t>=q||r.startTime-e>=5e3?(e=t=r.startTime,n=r.value):(n+=r.value,t=r.startTime)},value:function(){return n}}}();return{stop:e.subscribe(Jt,(function(e){for(var i of e)"layout-shift"!==i.entryType||i.hadRecentInput||(r.update(i),r.value()>n&&(n=r.value(),t(Q(n,4))))})).unsubscribe}}(e,(function(e){u.cumulativeLayoutShift=e,r()}));a=l.stop}else a=F;return{stop:function(){s(),d(),a()},setLoadEvent:f,viewMetrics:u}}function Li(e,t,n,r,i,o,a){var u,s=function(i){var o=$i(t,n,r,e,st,ee(),i),a=Bi(t,(function(e){o.updateTimings(e),o.scheduleUpdate()}));return{initialView:o,stop:a.stop}}(a),c=s.stop,f=s.initialView,d=function(){t.subscribe(nn,(function(){f.end(),f=l(void 0,{name:f.name,service:f.service,version:f.version})})),t.subscribe(on,(function(){f.end(),f.triggerUpdate()}));var e=window.setInterval((function(){f.triggerUpdate()}),3e5);return{stop:function(){clearInterval(e)}}}().stop;function l(i,o){return $i(t,n,r,e,ct,i,o)}return o&&(u=function(e){return e.subscribe((function(e){var t,n,r,i,o=e.oldLocation,a=e.newLocation;if(n=a,(t=o).pathname!==n.pathname||(r=n.hash,i=r.substr(1),!document.getElementById(i)&&Pi(n.hash)!==Pi(t.hash)))return f.end(),f.triggerUpdate(),void(f=l())}))}(i)),{addTiming:function(e,t){void 0===t&&(t=J()),f.addTiming(e,t),f.scheduleUpdate()},startView:function(e,t){f.end(t),f.triggerUpdate(),f=l(t,e)},stop:function(){u&&u.unsubscribe(),c(),d(),f.end()}}}function $i(e,t,n,r,i,o,a){void 0===o&&(o=K());var u,s,d,l,p=I(),v={},h={},m=0,g=f(r);a&&(s=a.name,d=a.service,l=a.version),e.notify(Zt,{id:p,name:s,startClocks:o,service:d,version:l});var y=O(C,3e3,{leading:!1}),b=y.cancel,w=Ui(e,t,n,y,i,o),_=w.setLoadEvent,S=w.stop,x=w.viewMetrics;function C(){m+=1;var t=void 0===u?J():u.timeStamp;e.notify(en,c({customTimings:h,documentVersion:m,id:p,name:s,service:d,version:l,loadingType:i,location:g,startClocks:o,timings:v,duration:Z(o.timeStamp,t),isActive:void 0===u},x))}return C(),{name:s,service:d,version:l,scheduleUpdate:y,end:function(t){void 0===t&&(t=K()),u=t,e.notify(tn,{endClocks:u}),S()},triggerUpdate:function(){b(),C()},updateTimings:function(e){v=e,void 0!==e.loadEvent&&_(e.loadEvent)},addTiming:function(e,t){var n=function(e){return e<31536e6}(t)?t:Z(o.timeStamp,t);h[function(e){var t=e.replace(/[^a-zA-Z0-9-_.@$]/g,"_");t!==e&&console.warn("Invalid timing name: "+e+", sanitized to: "+t);return t}(e)]=n}}}function Pi(e){var t=e.indexOf("?");return t<0?e:e.slice(0,t)}function Di(e,t,n,r,i,o){return e.subscribe(en,(function(t){e.notify(sn,function(e){var t={_dd:{document_version:e.documentVersion},date:e.startClocks.timeStamp,type:ut.VIEW,view:{action:{count:e.eventCounts.actionCount},frustration:{count:e.eventCounts.frustrationCount},cumulative_layout_shift:e.cumulativeLayoutShift,first_byte:G(e.timings.firstByte),dom_complete:G(e.timings.domComplete),dom_content_loaded:G(e.timings.domContentLoaded),dom_interactive:G(e.timings.domInteractive),error:{count:e.eventCounts.errorCount},first_contentful_paint:G(e.timings.firstContentfulPaint),first_input_delay:G(e.timings.firstInputDelay),first_input_time:G(e.timings.firstInputTime),is_active:e.isActive,name:e.name,largest_contentful_paint:G(e.timings.largestContentfulPaint),load_event:G(e.timings.loadEvent),loading_time:Ni(G(e.loadingTime)),loading_type:e.loadingType,long_task:{count:e.eventCounts.longTaskCount},resource:{count:e.eventCounts.resourceCount},time_spent:G(e.duration)}};_(e.customTimings)||(t.view.custom_timings=(n=e.customTimings,r=G,i={},s(n,(function(e,t){i[t]=r(e)})),i));var n,r,i;return{rawRumEvent:t=l(t,{view:Fi(e.timings)}),startTime:e.startClocks.relative,domainContext:{location:e.location}}}(t))})),Li(n,e,r,t,i,!t.trackViewsManually,o)}function Fi(e){var t=Br(e);if(t){var n=t.fetchStart,r=t.responseEnd,i=t.domInteractive,o=t.domContentLoaded,a=t.domComplete,u=t.loadEventEnd,s=t.loadEventStart,c=t.domContentLoadedEventEnd,f={fmp:G(t.largestContentfulPaint)};if(r!==n){f.fpt=G(r-n);var d=parseInt((r-n)/1e3);f.apdexLevel=d>9?9:d}return i!==n&&(f.tti=G(i-n)),o!==n&&(f.dom_ready=G(o-n)),u!==n&&(f.load=G(u-n)),s!==c&&(f.resource_load_time=G(s-c)),a!==i&&(f.dom=G(a-i)),f}}function Ni(e){return T(e)&&e<0?void 0:e}function qi(){this.buffer=new Uint8Array(8),Vi().getRandomValues(this.buffer),this.buffer[0]=127&this.buffer[0]}function Vi(){return window.crypto||window.msCrypto}function ji(e){this._spanId=(new qi).toDecimalString(),this._traceId=(new qi).toDecimalString(),this._traceSampled=e}function Qi(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}))}function Wi(e,t,n){this._spanId=Qi(),this._traceId=Qi(),this._applicationId=e.applicationId,this._env=e.env,this._version=e.version,this._urlParse=A(t).getParse(),this._traceSampled=n}function Gi(){for(var e="",t=0;t<16;t+=1){e+="0123456789abcdef"[Math.floor(16*Math.random())]}return e}function Hi(e,t){var n=Gi();e.traceId128Bit?this._traceId=Gi()+n:this._traceId=n,this._spanId=n,this._traceSampled=t}function Xi(){for(var e="",t=0;t<16;t+=1){e+="0123456789abcdef"[Math.floor(16*Math.random())]}return e}function zi(e,t){var n=Xi();this._traceId=Xi()+n,this._spanId=n,this._traceSampled=t}function Ki(){for(var e="",t=0;t<16;t+=1){e+="0123456789abcdef"[Math.floor(16*Math.random())]}return e}function Ji(e,t){var n=Ki();e.traceId128Bit?this._traceId=Ki()+n:this._traceId=n,this._spanId=n,this._traceSampled=t}function Yi(){for(var e="",t=0;t<16;t+=1){e+="0123456789abcdef"[Math.floor(16*Math.random())]}return e}function Zi(e,t){var n=Yi();this._traceId=Yi()+n,this._spanId=n,this._traceSampled=t}function eo(e){0!==e.status||e.isAborted||(e.traceId=void 0,e.spanId=void 0,e.traceSampled=void 0)}function to(e,t,n,r){if(function(e,t){var n=gn(t),r=!1;return s(e.allowedTracingOrigins,(function(e){if(n===e||e instanceof RegExp&&e.test(n))return r=!0,!1})),r}(e,t.url)&&e.traceType&&n.findTrackedSession()){var i,o=!T(e.tracingSampleRate)||j(e.tracingSampleRate);switch(e.traceType){case dt:i=new ji(o);break;case ht:i=new Wi(e,t.url,o);break;case lt:i=new Ji(e,o);break;case mt:i=new Hi(e,o);break;case vt:i=new Zi(e,o);break;case pt:i=new zi(e,o)}i&&i.isTracingSupported()&&(t.traceId=i.getTraceId(),t.spanId=i.getSpanId(),t.traceSampled=o,r(i.makeTracingHeaders()))}}qi.prototype={toString:function(e){for(var t=this.readInt32(0),n=this.readInt32(4),r="";;){var i=t%e*4294967296+n;if(t=Math.floor(t/e),n=Math.floor(i/e),r=(i%e).toString(e)+r,!t&&!n)break}return r},toDecimalString:function(){return this.toString(10)},readInt32:function(e){return 16777216*this.buffer[e]+(this.buffer[e+1]<<16)+(this.buffer[e+2]<<8)+this.buffer[e+3]}},ji.prototype={isTracingSupported:function(){return void 0!==Vi()},getSpanId:function(){return this._spanId},getTraceId:function(){return this._traceId},makeTracingHeaders:function(){return{"x-datadog-origin":"rum","x-datadog-parent-id":this.getSpanId(),"x-datadog-sampling-priority":this._traceSampled?"2":"-1","x-datadog-trace-id":this.getTraceId()}}},Wi.prototype={isTracingSupported:function(){return!!(this._env&&this._version&&this._urlParse)},getSpanId:function(){return this._spanId},getTraceId:function(){return this._traceId},getSkyWalkingSw8:function(){try{var e=String(k(this._traceId)),t=String(k(this._spanId)),n=String(k(this._applicationId+"_rum_"+this.env)),r=String(k(this._version)),i=String(k(window.location.href)),o=String(k(this._urlParse.Host));return(this._traceSampled?"1":"0")+"-"+e+"-"+t+"-0-"+n+"-"+r+"-"+i+"-"+o}catch(e){return""}},makeTracingHeaders:function(){return{sw8:this.getSkyWalkingSw8()}}},Hi.prototype={isTracingSupported:function(){return!0},getSpanId:function(){return this._spanId},getTraceId:function(){return this._traceId},getUberTraceId:function(){return this._traceId+":"+this._spanId+":0:"+(this._traceSampled?"1":"0")},makeTracingHeaders:function(){return{"uber-trace-id":this.getUberTraceId()}}},zi.prototype={isTracingSupported:function(){return!0},getSpanId:function(){return this._spanId},getTraceId:function(){return this._traceId},getB3Str:function(){return this._traceId+"-"+this._spanId+"-"+(this._traceSampled?"1":"0")},makeTracingHeaders:function(){return{b3:this.getB3Str()}}},Ji.prototype={isTracingSupported:function(){return!0},getSpanId:function(){return this._spanId},getTraceId:function(){return this._traceId},makeTracingHeaders:function(){return{"X-B3-TraceId":this.getTraceId(),"X-B3-SpanId":this.getSpanId(),"X-B3-Sampled":this._traceSampled?"1":"0"}}},Zi.prototype={isTracingSupported:function(){return!0},getSpanId:function(){return this._spanId},getTraceId:function(){return this._traceId},getTraceParent:function(){return"00-"+this._traceId+"-"+this._spanId+"-"+(this._traceSampled?"01":"00")},makeTracingHeaders:function(){return{traceparent:this.getTraceParent()}}};let no=1;function ro(e,t,n){var r=function(e,t){return{clearTracingIfNeeded:eo,traceFetch:function(n){return to(e,n,t,(function(e){if(!(n.input instanceof Request)||n.init&&n.init.headers){n.init=f(n.init);var t=[];n.init.headers instanceof Headers?n.init.headers.forEach((function(e,n){t.push([n,e])})):p(n.init.headers)?s(n.init.headers,(function(e){t.push(e)})):n.init.headers&&s(n.init.headers,(function(e,n){t.push([n,e])}));var r={};s(t.concat(S(e)),(function(e){r[e[0]]=e[1]})),n.init.headers=r}else n.input=new Request(n.input),s(e,(function(e,t){n.input.headers.append(t,e)}))}))},traceXhr:function(n,r){return to(e,n,t,(function(e){s(e,(function(e,t){r.setRequestHeader(t,e)}))}))}}}(t,n);!function(e,t,n){var r=Bn().subscribe((function(r){var i=r;if(Pr(t,i.url))switch(i.state){case"start":n.traceXhr(i,i.xhr),i.requestIndex=io(),e.notify(an,{requestIndex:i.requestIndex,url:i.url});break;case"complete":n.clearTracingIfNeeded(i),e.notify(un,{duration:i.duration,method:i.method,requestIndex:i.requestIndex,spanId:i.spanId,startClocks:i.startClocks,status:i.status,traceId:i.traceId,traceSampled:i.traceSampled,type:ft.XHR,url:i.url,xhr:i.xhr})}}))}(e,t,r),function(e,t,n){var r=An().subscribe((function(r){var i=r;if(Pr(t,i.url))switch(i.state){case"start":n.traceFetch(i),i.requestIndex=io(),e.notify(an,{requestIndex:i.requestIndex,url:i.url});break;case"complete":n.clearTracingIfNeeded(i),e.notify(un,{duration:i.duration,method:i.method,requestIndex:i.requestIndex,responseType:i.responseType,spanId:i.spanId,startClocks:i.startClocks,status:i.status,traceId:i.traceId,traceSampled:i.traceSampled,type:ft.FETCH,url:i.url,response:i.response,init:i.init,input:i.input})}}))}(e,t,r)}function io(){var e=no;return no+=1,e}function oo(e){if(performance&&"getEntriesByName"in performance){var t=performance.getEntriesByName(e.url,"resource");if(t.length&&"toJSON"in t[0]){var n,r=y(t,(function(e){return e.toJSON()}));return r=g(r,Br),1===(r=g(r,(function(t){return n=t,r=e.startClocks.relative,i=ao({startTime:e.startClocks.relative,duration:e.duration}),o=1,n.startTime>=r-o&&ao(n)<=i+o;var n,r,i,o}))).length?r[0]:2===r.length&&ao((n=r)[0])<=n[1].startTime?r[1]:void 0}}}function ao(e){return e.startTime+e.duration}function uo(e,t){e.subscribe(un,(function(t){e.notify(sn,function(e){var t=e.type===ft.XHR?He:ze,n=oo(e),r=n?te(n.startTime):e.startClocks,i=n?co(n):void 0,o=function(e){if(!(e.traceSampled&&e.traceId&&e.spanId))return;return{_dd:{spanId:e.spanId,traceId:e.traceId},resource:{id:I()}}}(e),a=A(e.url).getParse(),u=l({date:r.timeStamp,resource:{id:I,type:t,duration:W(e.duration),method:e.method,status:e.status,statusGroup:$(e.status),url:e.url,urlHost:a.Host,urlPath:a.Path,urlPathGroup:R(a.Path),urlQuery:P(M(e.url))},type:ut.RESOURCE},o,i);return{startTime:r.relative,rawRumEvent:u,domainContext:{performanceEntry:n&&fo(n),xhr:e.xhr,response:e.response,requestInput:e.input,requestInit:e.init,error:e.error}}}(t))})),e.subscribe(Jt,(function(t){for(var n of t)"resource"===n.entryType&&("xmlhttprequest"!==(r=n).initiatorType&&"fetch"!==r.initiatorType)&&e.notify(sn,so(n));var r}))}function so(e){var t=Rr(e),n=co(e),r=function(e){return e.traceId?{_dd:{traceId:e.traceId}}:void 0}(e),i=A(e.name).getParse(),o="";!function(e){return e.encodedBodySize>0&&e.transferSize>0&&e.transferSize<e.encodedBodySize||null}(e)?function(e){return!(e.transferSize>0)&&(e.decodedBodySize>0||e.duration<30)}(e)&&(o=200):o=304;var a=te(e.startTime),u=l({date:a.timeStamp,resource:{id:I(),type:t,url:e.name,urlHost:i.Host,urlPath:i.Path,urlPathGroup:R(i.Path),urlQuery:P(M(e.name)),method:"GET",status:o,statusGroup:$(o)},type:ut.RESOURCE},r,n);return{startTime:a.relative,rawRumEvent:u,domainContext:{performanceEntry:fo(e)}}}function co(e){return{resource:l({},{duration:(t=e,0===t.duration&&t.startTime<t.responseEnd?W(t.responseEnd-t.startTime):W(t.duration)),size:$r(e)},Mr(e))};var t}function fo(e){return"function"==typeof PerformanceEntry&&e instanceof PerformanceEntry&&e.toJSON(),e}var lo={sdkVersion:"2.2.3",sdkName:"df_web_rum_sdk"};var po,vo,ho,mo,go=function(e){var t,n,r=!1,i=ce(),o=ce(),a=new we,u=function(e,t){void 0===t&&(t=J()),a.add((function(){return u(e,t)}))},s=function(e,t){void 0===t&&(t=K()),a.add((function(){return s(e,t)}))},f=function(e,t){void 0===t&&(t={context:i.getContext(),user:o.getContext()}),a.add((function(){return f(e,t)}))},l=function(e,t){void 0===t&&(t={context:i.getContext(),user:o.getContext()}),a.add((function(){return l(e,t)}))},v=function(){},h=function(){};function m(t,n){var r=e(t,(function(){return{user:o.getContext(),context:i.getContext()}}),n);s=r.startView,f=r.addAction,l=r.addError,u=r.addTiming,v=r.getInternalContext,a.drain()}return t={init:function(e){if(function(e){return function(e){if(void 0===document.cookie||null===document.cookie)return!1;try{var t="dd_cookie_test_".concat(I()),n="test";return Sn(t,n,q,e),xn(t)===n}catch(e){return console.error(e),!1}}(Rn(e))?"file:"!==window.location.protocol||(Ce.error("Execution is not allowed in the current context."),!1):(Ce.warn("Cookies are not authorized, we will not send any data."),!1)}(e)&&function(e){return!r||(e.silentMultipleInit||Ce.error("DATAFLUX_RUM is already initialized."),!1)}(e)){var t=function(e){if(e.applicationId){if(!e.datakitUrl&&!e.datakitOrigin)return Ce.error("datakitOrigin is not configured, no RUM data will be collected."),!1;if(void 0===e.sessionReplaySampleRate||de(e.sessionReplaySampleRate))if(void 0===e.allowedTracingOrigins||p(e.allowedTracingOrigins))if(void 0===e.allowedDDTracingOrigins||p(e.allowedDDTracingOrigins))if(void 0===e.tracingSampleRate||de(e.tracingSampleRate))if(void 0===e.excludedActivityUrls||p(e.excludedActivityUrls)){var t=In(e);if(t){var n=!!e.trackFrustrations;return c({applicationId:e.applicationId,actionNameAttribute:e.actionNameAttribute,sessionReplaySampleRate:ye(e.sessionReplaySampleRate,100),tracingSampleRate:e.tracingSampleRate,allowedTracingOrigins:ye(e.allowedTracingOrigins||e.allowedDDTracingOrigins,[]),excludedActivityUrls:ye(e.excludedActivityUrls,[]),trackInteractions:!!e.trackInteractions||n,trackFrustrations:n,trackViewsManually:!!e.trackViewsManually,traceType:ye(e.traceType,dt),traceId128Bit:!!e.traceId128Bit,isJsBirdge:!!e.isJsBirdge},t,lo)}}else Ce.error("Excluded Activity Urls should be an array");else Ce.error("Tracing Sample Rate should be a number between 0 and 100");else Ce.error("Allowed Tracing Origins should be an array");else Ce.error("Allowed Tracing Origins should be an array");else Ce.error("Premium Sample Rate should be a number between 0 and 100")}else Ce.error("Application ID is not configured, no RUM data will be collected.")}(e);if(t){if(t.trackViewsManually){var n=a;a=new we,s=function(e){m(t,e)},n.drain()}else m(t);h=function(){return L(e)},r=!0}}},addRumGlobalContext:i.add,setGlobalContextProperty:i.setContextProperty,removeRumGlobalContext:i.remove,removeGlobalContextProperty:i.removeContextProperty,getRumGlobalContext:i.get,getGlobalContext:i.getContext,setRumGlobalContext:i.set,setGlobalContext:i.setContext,clearGlobalContext:i.clearContext,getInitConfiguration:function(){return h()},getInternalContext:function(e){return v(e)},addDebugSession:function(e){},clearDebugSession:function(){},getDebugSession:function(){},addAction:function(e,t){f({name:e,context:L(t),startClocks:K(),type:rt})},addError:function(e,t){var n=Lt();l({error:e,handlingStack:n,context:L(t),startClocks:K()})},addTiming:function(e,t){u(e,t)},setUser:function(e){"object"==typeof e&&e?o.setContext(g(e)):Ce.error("Unsupported user:",e)},getUser:o.getContext,setUserProperty:function(e,t){var n={};n[e]=t;var r=g(n)[e];o.setContextProperty(e,r)},removeUserProperty:o.removeContextProperty,removeUser:o.clearContext,clearUser:o.clearContext,startView:function(e){s("object"==typeof e?e:{name:e})}},n=d({},t,{onReady:function(e){e()}}),Object.defineProperty(n,"_setDebug",{get:function(){return setDebugMode},enumerable:!1}),n;function g(e){var t=c(e,{});return"id"in t&&(t.id=String(t.id)),"name"in t&&(t.name=String(t.name)),"email"in t&&(t.email=String(t.email)),t}}((function(e,t,n){var r=new dn,i=function(e){r.notify(fn,{error:e})};Si(e,r,i);var o=Tr(e,r),a=function(e){var t=xn(Or);return t||(t=I(),Sn(Or,t,5184e6,e.cookieOptions)),{getId:function(){return t}}}(e),u=Qr(),s=Wr(location),c=function(e,t,n,r,i,o,a,u,s){var c=function(e){var t=new Se(144e5);return e.subscribe(Zt,(function(e){t.add(function(e){return{service:e.service,version:e.version,id:e.id,name:e.name}}(e),e.startClocks.relative)})),e.subscribe(tn,(function(e){t.closeActive(e.endClocks.relative)})),e.subscribe(nn,(function(){t.reset()})),{findView:function(e){return t.find(e)},stop:function(){t.stop()}}}(t),f=function(e,t,n){var r,i=new Se(144e5);e.subscribe(tn,(function(e){i.closeActive(e.endClocks.relative)})),e.subscribe(Zt,(function(e){var t=n.href;i.add(a({url:t,location:n,referrer:r||document.referrer}),e.startClocks.relative),r=t}));var o=t.subscribe((function(e){var t=i.find();if(t){var n=z();i.closeActive(n),i.add(a({url:e.newLocation.href,location:e.newLocation,referrer:t.referrer}),n)}}));function a(e){return{url:e.url,referrer:e.referrer,host:e.location.host,path:e.location.pathname,pathGroup:R(e.location.pathname),urlQuery:P(M(e.location.href))}}return{findUrl:function(e){return i.find(e)},stop:function(){o.unsubscribe(),i.stop()}}}(t,o,e),l=function(e,t,n){e.subscribe(Yt,(function(t){e.notify(sn,wi(t))}));var r={findActionId:F};return n.trackInteractions&&(r=hi(e,t,n).actionContexts),{actionContexts:r,addAction:function(t,n){e.notify(sn,d({savedCommonContext:n},wi(t)))}}}(t,a,n),p=l.actionContexts;return Oi(n,t,r,i,c,f,p,u,s),{viewContexts:c,urlContexts:f,addAction:l.addAction,actionContexts:p,stop:function(){c.stop()}}}(location,r,e,o,a,s,u,t,i),f=c.viewContexts,l=c.urlContexts,p=c.actionContexts;!function(e,t){e.subscribe(Jt,(function(n){for(var r of n){if("longtask"!==r.entryType)return;if(!t.findTrackedSession(r.startTime))break;var i=te(r.startTime),o={date:i.timeStamp,long_task:{id:I(),duration:G(r.duration)},type:ut.LONG_TASK};e.notify(sn,{rawRumEvent:o,startTime:i.relative,domainContext:{performanceEntry:r.toJSON()}})}}))}(r,o),uo(r);var v=Di(r,e,location,u,s,n),h=v.addTiming,m=v.startView,g=Ri(r).addError;ro(r,e,o),Nr(r,e);var y=function(e,t,n,r,i){return{get:function(o){var a=n.findView(o),u=i.findUrl(o),s=t.findTrackedSession(o);if(s&&a&&u){var c=r.findActionId(o);return{application:{id:e},session:{id:s.id},userAction:c?{id:c}:void 0,view:{id:a.id,name:a.name,url:u.url,referrer:u.referrer,host:u.host,path:u.pathname,pathGroup:u.pathGroup,urlQuery:u.urlQuery}}}}}}(e.applicationId,o,f,p,l);return{addAction:c.addAction,addError:g,addTiming:h,configuration:e,lifeCycle:r,viewContexts:f,session:o,startView:m,getInternalContext:y.get}}));po=function(){if("object"==typeof globalThis)return globalThis;Object.defineProperty(Object.prototype,"_dd_temp_",{get:function(){return this},configurable:!0});var e=_dd_temp_;return delete Object.prototype._dd_temp_,"object"!=typeof e&&(e="object"==typeof self?self:"object"==typeof window?window:{}),e}(),ho=go,mo=po[vo="DATAFLUX_RUM"],po[vo]=ho,mo&&mo.q&&s(mo.q,(function(e){e()}))})();
|
package/cjs/boot/buildEnv.js
CHANGED
|
@@ -45,6 +45,12 @@ function validateAndBuildRumConfiguration(initConfiguration) {
|
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
+
if (initConfiguration.tracingSampleRate !== undefined && !(0, _browserCore.isPercentage)(initConfiguration.tracingSampleRate)) {
|
|
49
|
+
_browserCore.display.error('Tracing Sample Rate should be a number between 0 and 100');
|
|
50
|
+
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
|
|
48
54
|
if (initConfiguration.excludedActivityUrls !== undefined && !(0, _browserCore.isArray)(initConfiguration.excludedActivityUrls)) {
|
|
49
55
|
_browserCore.display.error('Excluded Activity Urls should be an array');
|
|
50
56
|
|
|
@@ -62,6 +68,7 @@ function validateAndBuildRumConfiguration(initConfiguration) {
|
|
|
62
68
|
applicationId: initConfiguration.applicationId,
|
|
63
69
|
actionNameAttribute: initConfiguration.actionNameAttribute,
|
|
64
70
|
sessionReplaySampleRate: (0, _browserCore.isNullUndefinedDefaultValue)(initConfiguration.sessionReplaySampleRate, 100),
|
|
71
|
+
tracingSampleRate: initConfiguration.tracingSampleRate,
|
|
65
72
|
allowedTracingOrigins: (0, _browserCore.isNullUndefinedDefaultValue)(initConfiguration.allowedTracingOrigins || initConfiguration.allowedDDTracingOrigins, []),
|
|
66
73
|
excludedActivityUrls: (0, _browserCore.isNullUndefinedDefaultValue)(initConfiguration.excludedActivityUrls, []),
|
|
67
74
|
trackInteractions: !!initConfiguration.trackInteractions || trackFrustrations,
|
|
@@ -138,7 +138,7 @@ function toPerformanceEntryRepresentation(entry) {
|
|
|
138
138
|
}
|
|
139
139
|
|
|
140
140
|
function computeRequestTracingInfo(request) {
|
|
141
|
-
var hasBeenTraced = request.traceId && request.spanId;
|
|
141
|
+
var hasBeenTraced = request.traceSampled && request.traceId && request.spanId;
|
|
142
142
|
|
|
143
143
|
if (!hasBeenTraced) {
|
|
144
144
|
return undefined;
|
|
@@ -43,14 +43,15 @@ function getCrypto() {
|
|
|
43
43
|
return window.crypto || window.msCrypto;
|
|
44
44
|
}
|
|
45
45
|
/**
|
|
46
|
-
*
|
|
46
|
+
*
|
|
47
47
|
* @param {*} configuration 配置信息
|
|
48
48
|
*/
|
|
49
49
|
|
|
50
50
|
|
|
51
|
-
function DDtraceTracer(
|
|
51
|
+
function DDtraceTracer(traceSampled) {
|
|
52
52
|
this._spanId = new TraceIdentifier().toDecimalString();
|
|
53
53
|
this._traceId = new TraceIdentifier().toDecimalString();
|
|
54
|
+
this._traceSampled = traceSampled;
|
|
54
55
|
}
|
|
55
56
|
|
|
56
57
|
DDtraceTracer.prototype = {
|
|
@@ -67,8 +68,7 @@ DDtraceTracer.prototype = {
|
|
|
67
68
|
return {
|
|
68
69
|
'x-datadog-origin': 'rum',
|
|
69
70
|
'x-datadog-parent-id': this.getSpanId(),
|
|
70
|
-
'x-datadog-
|
|
71
|
-
'x-datadog-sampling-priority': '1',
|
|
71
|
+
'x-datadog-sampling-priority': this._traceSampled ? '2' : '-1',
|
|
72
72
|
'x-datadog-trace-id': this.getTraceId()
|
|
73
73
|
};
|
|
74
74
|
}
|
|
@@ -18,12 +18,12 @@ function randomTraceId() {
|
|
|
18
18
|
return n;
|
|
19
19
|
}
|
|
20
20
|
/**
|
|
21
|
-
*
|
|
21
|
+
*
|
|
22
22
|
* @param {*} configuration 配置信息
|
|
23
23
|
*/
|
|
24
24
|
|
|
25
25
|
|
|
26
|
-
function JaegerTracer(configuration) {
|
|
26
|
+
function JaegerTracer(configuration, traceSampled) {
|
|
27
27
|
var rootSpanId = randomTraceId(); // this._traceId = randomTraceId() + rootSpanId // 默认用128bit,兼容其他配置
|
|
28
28
|
|
|
29
29
|
if (configuration.traceId128Bit) {
|
|
@@ -34,6 +34,7 @@ function JaegerTracer(configuration) {
|
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
this._spanId = rootSpanId;
|
|
37
|
+
this._traceSampled = traceSampled;
|
|
37
38
|
}
|
|
38
39
|
|
|
39
40
|
JaegerTracer.prototype = {
|
|
@@ -48,7 +49,7 @@ JaegerTracer.prototype = {
|
|
|
48
49
|
},
|
|
49
50
|
getUberTraceId: function getUberTraceId() {
|
|
50
51
|
//{trace-id}:{span-id}:{parent-span-id}:{flags}
|
|
51
|
-
return this._traceId + ':' + this._spanId + ':' + '0' + ':' + '1';
|
|
52
|
+
return this._traceId + ':' + this._spanId + ':' + '0' + ':' + (this._traceSampled ? '1' : '0');
|
|
52
53
|
},
|
|
53
54
|
makeTracingHeaders: function makeTracingHeaders() {
|
|
54
55
|
return {
|