@cloudcare/browser-rum 2.1.1 → 2.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundle/dataflux-rum.js +1 -1
- package/cjs/boot/buildEnv.js +1 -1
- package/esm/boot/buildEnv.js +1 -1
- package/package.json +3 -3
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),s=(e.indexOf,Array.isArray),u=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 s in e)if(o.call(e,s)&&false===t.call(n,e[s],s,e))return!1};function c(e){return function(e){return u(r.call(arguments,1),(function(t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})),e}({},e)}var d=function(e){return u(r.call(arguments,1),(function(t){for(var n in t)void 0!==t[n]&&(e[n]=t[n])})),e},f=function(e){return u(r.call(arguments,1),(function(t){for(var n in t)void 0!==t[n]&&(y(t[n])&&y(e[n])?d(e[n],t[n]):e[n]=t[n])})),e},l=s||function(e){return"[object Array]"===i.call(e)},p=function(e){if(!e)return!1;try{return/^\s*\bfunction\b/.test(e)}catch(e){return!1}},v=function(e){return e?e.toArray?e.toArray():l(e)?r.call(e):(t=e)&&o.call(t,"callee")?r.call(e):h(e):[];var t},h=function(e){var t=[];return null===e||u(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},m=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},y=function(e){return null!==e&&"[object Object]"===i.call(e)},w=function(e){if(y(e)){for(var t in e)if(o.call(e,t))return!1;return!0}return!1},b=function(e){var t=[];return u(e,(function(e,n){t.push([n,e])})),t},_=function(e){return"[object String]"===i.call(e)},S=function(e){return"[object Boolean]"===i.call(e)},T=function(e){return"[object Number]"===i.call(e)&&/[\d\.]+/.test(String(e))},x=function e(t){var n=t;try{n=e(t)}catch(e){n=t}return n},E=(Date.now,function(e,t,n){var r,i,o,a,s=0;n||(n={});var u=function(){s=!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();s||!1!==n.leading||(s=c);var d=t-(c-s);return i=this,d<=0||d>t?(r&&(clearTimeout(r),r=null),s=c,a=e.apply(i,o),r||(i=o=null)):r||!1===n.trailing||(r=setTimeout(u,d)),a};return c.cancel=function(){clearTimeout(r),s=0,r=null},c}),O=function(e){function t(e){return e<10?"0"+e:e}return e.getFullYear()+"-"+t(e.getMonth()+1)+"-"+t(e.getDate())+" "+t(e.getHours())+":"+t(e.getMinutes())+":"+t(e.getSeconds())+"."+t(e.getMilliseconds())},C=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+/=",s=0,u=0,c="",d=[];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),s=null;a<128?n++:s=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!==s&&(n>t&&(o+=e.substring(t,n)),o+=s,t=n=i+1)}return n>t&&(o+=e.substring(t,e.length)),o}(e);do{t=(o=e.charCodeAt(s++)<<16|e.charCodeAt(s++)<<8|e.charCodeAt(s++))>>18&63,n=o>>12&63,r=o>>6&63,i=63&o,d[u++]=a.charAt(t)+a.charAt(n)+a.charAt(r)+a.charAt(i)}while(s<e.length);switch(c=d.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 k(e){var t="";return e&&(t=e.replace(/\/([^\/]*)\d([^\/]*)/g,"/?").replace(/\/$/g,"")),t||"/"}var R=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)},A=function(e){var t={},n=e.split("?")[1]||"";return n&&(t=B("?"+n)),t},B=function(e){for(var t=function(e){return x(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),s=r[i].substring(o+1);a=t(a),s=t(s),n[a]=s}}return n};function L(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]=L(i[o],t[o],n);return i}var a;i="object"==(null===(a=e)?"null":Array.isArray(a)?"array":typeof a)?e:{};for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(i[s]=L(i[s],t[s],n));return i}}function M(e){return L(void 0,e)}function $(e){return e?String(e).substr(0,1)+String(e).substr(1).replace(/\d*/g,"x"):e}function D(e,t,n){if(null==e)return JSON.stringify(e);var r=[!1,void 0];W(e)&&(r=[!0,e.toJSON],delete e.toJSON);var i,o,a=[!1,void 0];"object"==typeof e&&W(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 W(e){return"object"==typeof e&&null!==e&&e.hasOwnProperty("toJSON")}function P(){}var N,U=1e3,V=6e4;function j(e){return 0!==e&&100*Math.random()<=e}function H(e,t){return+e.toFixed(t)}function q(e){return"number"!=typeof e?e:H(1e6*e,0)}function F(e){return T(e)?H(1e6*e,0):e}function Q(){return J()}function z(e){return Math.floor(te()+e)}function J(){return performance.now()}function G(){return{relative:J(),timeStamp:X()}}function X(){return Date.now()}function K(e,t){return t-e}function Y(e){return e.relative}function Z(e){return z(e.relative)}function ee(e){return{relative:e,timeStamp:z(e)}}function te(){return void 0===N&&(N=performance.timing.navigationStart),N}function ne(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 re(e,t,n,r){return ie(e,[t],n,r)}function ie(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,u(t,(function(t){e.addEventListener(t,i,r)}));var o=function(){u(t,(function(t){e.removeEventListener(t,i,r)}))};return{stop:o}}function oe(e,t){return-1!==e.indexOf(t)}function ae(e){return T(e)&&e>=0&&e<=100}function se(e){if(e.origin)return e.origin;var t=e.host.replace(/(:80|:443)$/,"");return e.protocol+"//"+t}function ue(e){var t={};return u(e,(function(e,n){var r;t[(r=n,r.replace(/[A-Z]/g,(function(e,t){return(0!==t?"_":"")+e.toLowerCase()})).replace(/-/g,"_"))]=ce(e)})),t}function ce(e){return l(e)?m(e,(function(e){return ce(e)})):"object"==typeof e&&null!==e?ue(e):e}function de(e){if("object"==typeof e&&e)e=D(e);else if(!_(e))return e;return String(e).replace(/[\s=,"]/g,(function(e){return"\\"+e}))}function fe(e){return _(e)?e:D(e)}var le=function(){this.buffer=[]};le.prototype={add:function(e){this.buffer.push(e)>this.limit&&this.buffer.splice(0,1)},drain:function(e){u(this.buffer,(function(t){e(t)})),this.buffer.length=0}};var pe=le,ve={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","Windows 2000","Windows XP","Windows Vista","Windows 7","Windows 8","Windows 8.1","Windows Server 2003","Windows ME","Windows 10","Windows 98","Windows 95","Windows NT 4.0","Windows CE","Windows 3.11","Linux","Mac OS","Android","Ubuntu","FreeBSD","Debian","iOS","Windows Phone","BlackBerry","MeeGo","Symbian","Chrome OS","WebOS"],device:["Mobile","Tablet","iPad"]}},he={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,"IE 11":e.indexOf("Trident")>-1&&e.indexOf("rv:11.0")>-1,"IE 10":e.indexOf("MSIE 10.0")>-1&&e.indexOf("Trident")>-1,"IE 9":e.indexOf("MSIE 9.0")>-1&&e.indexOf("Trident")>-1,"IE 8":e.indexOf("MSIE 9.0")>-1&&e.indexOf("Trident")>-1,"IE 7":e.indexOf("MSIE 7.0")>-1&&e.indexOf("Trident")>-1,Edge:e.indexOf("Edg")>-1||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||e.indexOf("LieBaoFast")>-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,WechatWork:e.indexOf("wxwork/")>-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,"Windows 2000":e.indexOf("Windows NT 5.0")>-1||e.indexOf("Windows 2000")>-1,"Windows XP":e.indexOf("Windows NT 5.1")>-1||e.indexOf("Windows XP")>-1,"Windows Server 2003":e.indexOf("Windows NT 5.2")>-1,"Windows Vista":e.indexOf("Windows NT 6.0")>-1,"Windows 7":e.indexOf("Windows 7")>-1||e.indexOf("Windows NT 6.1")>-1,"Windows 8":e.indexOf("Windows 8")>-1||e.indexOf("Windows NT 6.2")>-1,"Windows 8.1":e.indexOf("Windows 8.1")>-1||e.indexOf("Windows NT 6.3")>-1,"Windows ME":e.indexOf("Win 9x 4.90")>-1||e.indexOf("Windows ME")>-1,"Windows 10":e.indexOf("Windows 10.0")>-1||e.indexOf("Windows NT 10.0")>-1,"Windows 98":e.indexOf("Windows 98")>-1||e.indexOf("Win98")>-1,"Windows 95":e.indexOf("Windows 95")>-1||e.indexOf("Win95")>-1||e.indexOf("Windows_95")>-1,"Windows NT 4.0":e.indexOf("Windows NT 4.0")>-1||e.indexOf("WinNT4.0")>-1||e.indexOf("WinNT")>-1,"Windows CE":e.indexOf("Windows CE")>-1,"Windows 3.11":e.indexOf("Win16")>-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=ve.navigator.userAgent||{},n=he.getMatchMap(t);for(var r in ve.infoMap)for(var i=0;i<ve.infoMap[r].length;i++){var o=ve.infoMap[r][i];n[o]&&(e[r]=o)}},getOS:function(){return he.matchInfoMap(this),this.os||"Unknown"},getOSVersion:function(){var e=this,t=ve.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",he.matchInfoMap(e),e.device},getNetwork:function(){return navigator&&navigator.connection&&navigator.connection.effectiveType},getLanguage:function(){var e;return this.language=((e=(ve.navigator.browserLanguage||ve.navigator.language).split("-"))[1]&&(e[1]=e[1].toUpperCase()),e.join("_")),this.language},getBrowserInfo:function(){var e=this;he.matchInfoMap(e);var t=ve.navigator.userAgent||{},n=function(e,t){var n=ve.navigator.mimeTypes;for(var r in n)if(n[r][e]==t)return!0;return!1},r=he.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")||ve.navigator&&void 0===ve.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){}))}},ge={os:he.getOS(),osVersion:he.getOSVersion().version,osVersionMajor:he.getOSVersion().osMajor,browser:he.getBrowserInfo().browser,browserVersion:he.getBrowserInfo().browserVersion,browserVersionMajor:he.getBrowserInfo().browserMajor,screenSize:window.screen.width+"*"+window.screen.height,networkType:he.getNetwork(),divice:he.getDeviceType()},me="beforeunload",ye="click",we="keydown",be="load",_e="popstate",Se="scroll",Te="touchstart",xe="visibilitychange",Ee="DOMContentLoaded",Oe="pointerdown",Ce="pointerup",Ie="pointercancel",ke="hashchange",Re="pagehide",Ae="mousedown",Be="document",Le="xhr",Me="beacon",$e="fetch",De="css",We="js",Pe="image",Ne="font",Ue="media",Ve="other",je="click",He="custom",qe={ACTION:"action",ERROR:"error",LONG_TASK:"long_task",VIEW:"view",RESOURCE:"resource",LOGGER:"logger"},Fe={FETCH:$e,XHR:Le},Qe={DDTRACE:"ddtrace",ZIPKIN_MULTI_HEADER:"zipkin",ZIPKIN_SINGLE_HEADER:"zipkin_single_header",W3C_TRACEPARENT:"w3c_traceparent",SKYWALKING_V3:"skywalking_v3",JAEGER:"jaeger"},ze="handled",Je="unhandled",Ge=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/;function Xe(e){if(Ye){if(Ke===e)return;st()}var t=ct(e);throw Ye=t,Ke=e,setTimeout((function(){Ke===e&&st()}),t.incomplete?2e3:0),e}var Ke,Ye,Ze,et,tt,nt=[];function rt(e){!function(){if(et)return;Ze=window.onerror,window.onerror=ot,et=!0}(),function(){if(tt)return;null!==window.onunhandledrejection?window.onunhandledrejection:void 0,window.onunhandledrejection=at,tt=!0}(),nt.push(e)}function it(e,t,n){var r;if(u(nt,(function(i){try{i(e,t,n)}catch(e){r=e}})),r)throw r}function ot(e,t,n,r,i){if(Ye)ft(Ye,t,n),st();else if(i)it(ct(i),!0,i);else{var o,a={url:t,column:r,line:n},s=e;if("[object String]"==={}.toString.call(e)){var u=Ge.exec(s);u&&(o=u[1],s=u[2])}it({name:o,message:"string"==typeof s?s:void 0,stack:[a]},!0,e)}return!!Ze&&Ze.apply(this,arguments)}function at(e){var t=e.reason||"Empty reason";it(ct(t),!0,t)}function st(){var e=Ye,t=Ke;Ye=void 0,Ke=void 0,it(e,!1,t)}var ut="?";function ct(e,t){var n,r=void 0===t?0:+t;try{if(n=function(e){var t=pt(e,"stacktrace");if(!t)return;for(var n,r=/ line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i,i=/ line (\d+), column (\d+)\s*(?:in (?:<anonymous function: ([^>]+)>|([^\)]+))\((.*)\))? in (.*):\s*$/i,o=t.split("\n"),a=[],s=0;s<o.length;s+=2){var u;r.exec(o[s])?u={args:[],column:void 0,func:(n=r.exec(o[s]))[3],line:+n[1],url:n[2]}:i.exec(o[s])&&(u={args:(n=i.exec(o[s]))[5]?n[5].split(","):[],column:+n[2],func:n[3]||n[4],line:+n[1],url:n[6]}),u&&(!u.func&&u.line&&(u.func=ut),u.context=[o[s+1]],a.push(u))}if(!a.length)return;return{stack:a,message:pt(e,"message"),name:pt(e,"name")}}(e),n)return n}catch(e){if(dt)throw e}try{if(n=function(e){var t=pt(e,"stack");if(!t)return;for(var n,r,i,o,a=/^\s*at (.*?) ?\(((?:file|https?|blob|chrome-extension|native|eval|webpack|<anonymous>|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,s=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|capacitor|\[native).*?|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i,u=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,c=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,d=/\((\S*)(?::(\d+))(?::(\d+))\)/,f=t.split("\n"),l=[],p=0,v=f.length;p<v;p+=1){if(a.exec(f[p])){var h=(i=a.exec(f[p]))[2]&&0===i[2].indexOf("native");n=i[2]&&0===i[2].indexOf("eval"),r=d.exec(i[2]),n&&r&&(i[2]=r[1],i[3]=r[2],i[4]=r[3]),o={args:h?[i[2]]:[],column:i[4]?+i[4]:void 0,func:i[1]||ut,line:i[3]?+i[3]:void 0,url:h?void 0:i[2]}}else if(u.exec(f[p]))o={args:[],column:(i=u.exec(f[p]))[4]?+i[4]:void 0,func:i[1]||ut,line:+i[3],url:i[2]};else{if(!s.exec(f[p]))continue;n=(i=s.exec(f[p]))[3]&&i[3].indexOf(" > eval")>-1,r=c.exec(i[3]),n&&r?(i[3]=r[1],i[4]=r[2],i[5]=void 0):0!==p||i[5]||ht(e.columnNumber)||(l[0].column=e.columnNumber+1),o={args:i[2]?i[2].split(","):[],column:i[5]?+i[5]:void 0,func:i[1]||ut,line:i[4]?+i[4]:void 0,url:i[3]}}!o.func&&o.line&&(o.func=ut),l.push(o)}if(!l.length)return;return{stack:l,message:pt(e,"message"),name:pt(e,"name")}}(e),n)return n}catch(e){if(dt)throw e}try{if(n=function(e){var t=pt(e,"message");if(!t)return;var n=t.split("\n");if(n.length<4)return;var r,i=/^\s*Line (\d+) of linked script ((?:file|https?|blob)\S+)(?:: in function (\S+))?\s*$/i,o=/^\s*Line (\d+) of inline#(\d+) script in ((?:file|https?|blob)\S+)(?:: in function (\S+))?\s*$/i,a=/^\s*Line (\d+) of function script\s*$/i,s=[],u=window&&window.document&&window.document.getElementsByTagName("script"),c=[];for(var d in u)vt(u,d)&&!u[d].src&&c.push(u[d]);for(var f=2;f<n.length;f+=2){var l;if(i.exec(n[f]))l={args:[],column:void 0,func:(r=i.exec(n[f]))[3],line:+r[1],url:r[2]};else if(o.exec(n[f]))l={args:[],column:void 0,func:(r=o.exec(n[f]))[4],line:+r[1],url:r[3]};else if(a.exec(n[f])){r=a.exec(n[f]),l={url:window.location.href.replace(/#.*$/,""),args:[],column:void 0,func:"",line:+r[1]}}l&&(l.func||(l.func=ut),l.context=[n[f+1]],s.push(l))}if(!s.length)return;return{stack:s,message:n[0],name:pt(e,"name")}}(e),n)return n}catch(e){if(dt)throw e}try{if(n=lt(e,r+1))return n}catch(e){if(dt)throw e}return{message:pt(e,"message"),name:pt(e,"name"),stack:[]}}var dt=!1;function ft(e,t,n){var r={url:t,line:n?+n:void 0};if(r.url&&r.line){e.incomplete=!1;var i=e.stack;if(i.length>0&&i[0].url===r.url){if(i[0].line===r.line)return!1;if(!i[0].line&&i[0].func===r.func)return i[0].line=r.line,i[0].context=r.context,!1}return i.unshift(r),e.partial=!0,!0}return e.incomplete=!0,!1}function lt(e,t){for(var n,r,i=/function\s+([_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*)?\s*\(/i,o=[],a={},s=!1,u=lt.caller;u&&!s;u=u.caller)u!==ct&&u!==Xe&&(r={args:[],column:void 0,func:ut,line:void 0,url:void 0},n=i.exec(u.toString()),u.name?r.func=u.name:n&&(r.func=n[1]),void 0===r.func&&(r.func=n?n.input.substring(0,n.input.indexOf("{")):void 0),a[u.toString()]?s=!0:a[u.toString()]=!0,o.push(r));t&&o.splice(0,t);var c={stack:o,message:pt(e,"message"),name:pt(e,"name")};return ft(c,pt(e,"sourceURL")||pt(e,"fileName"),pt(e,"line")||pt(e,"lineNumber")),c}function pt(e,t){if("object"==typeof e&&e&&t in e){var n=e[t];return"string"==typeof n?n:void 0}}function vt(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function ht(e){return void 0===e}var gt="agent",mt="console",yt="network",wt="source",bt="custom";function _t(e,t,n,r){return e&&(void 0!==e.message||t instanceof Error)?{message:e.message||"Empty message",stack:Tt(e),handlingStack:r,type:e.name}:{message:n+""+JSON.stringify(t),stack:"No stack, consider using an instance of Error",handlingStack:r,type:e&&e.name}}function St(){var e=new Error;if(!e.stack)try{throw e}catch(e){}var t=ct(e);return t.stack=t.stack.slice(2),Tt(t)}function Tt(e){var t=e.name||"Error: "+e.message;return u(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}var xt=function(){this._events=[],this.pendingEvents=[]};xt.prototype={emit:function(e){var t=[].slice.call(arguments,1);u(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 xt;var Et="PERFORMANCE_ENTRY_COLLECTED",Ot="AUTO_ACTION_CREATED",Ct="AUTO_ACTION_COMPLETED",It="AUTO_ACTION_DISCARDED",kt="VIEW_CREATED",Rt="VIEW_UPDATED",At="VIEW_ENDED",Bt="SESSION_RENEWED",Lt="DOM_MUTATED",Mt="BEFORE_UNLOAD",$t="REQUEST_STARTED",Dt="REQUEST_COMPLETED",Wt="RAW_RUM_EVENT_COLLECTED",Pt="RUM_EVENT_COLLECTED",Nt="RAW_ERROR_COLLECTED",Ut="RECORD_STARTED",Vt="RECORD_STOPPED";function jt(){this.callbacks=[]}function Ht(e,t,n){var r=f({},e),i=n(r);return u(t,(function(t){var n=qt(e,t),i=qt(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(!Ft(r,a))return;o!==i.length-1?r=r[a]:r[a]=n}}(e,t,i)})),i}function qt(e,t){var n=e;for(var r of t.split(".")){if(!Ft(n,r))return;n=n[r]}return n}function Ft(e,t){return"object"==typeof e&&null!==e&&t in e}jt.prototype={notify:function(e,t){var n=this.callbacks[e];n&&u(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 Qt=function(){this.observers=[]};Qt.prototype={subscribe:function(e){this.observers.push(e)},notify:function(e){u(this.observers,(function(t){t(e)}))}};var zt,Jt=Qt;function Gt(e){return Kt(e,se(window.location)).href}function Xt(e){return se(Kt(e))}function Kt(e,t){if(function(){if(void 0!==zt)return zt;try{var e=new URL("http://test/path");return zt="http://test/path"===e.href}catch(e){zt=!1}return zt}())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}var Yt=navigator.userAgent.toLowerCase(),Zt=function(){return/iphone os/.test(Yt)};(tn=function(){this.bridge=window.FTWebViewJavascriptBridge,this.tagMaps={},window.mapWebViewCallBack={};try{this.initBridge()}catch(e){}}).prototype={initBridge:function(){var e=this;if(Zt()&&!e.bridge){if(window.WVJBCallbacks)return void window.WVJBCallbacks.push((function(t){e.bridge=t}));window.WVJBCallbacks=[function(t){e.bridge=t}];var t=document.createElement("iframe");t.style.display="none",t.src="wvjbscheme://__BRIDGE_LOADED__",document.documentElement.appendChild(t),setTimeout((function(){document.documentElement.removeChild(t)}),0)}},sendEvent:function(e,t){void 0===e&&(e={});var n=this,r="Unique id:"+(new Date).getTime();if(e.name){n.tagMaps[e.name]=r,window.mapWebViewCallBack[r]=function(e,t){return Promise.resolve(e,t)},e._tag=r;try{Zt()?n.bridge.callHandler("sendEvent",JSON.stringify(e),"mapWebViewCallBack"):n.bridge.sendEvent(JSON.stringify(e),"mapWebViewCallBack")}catch(e){}}else t({error:"请传入发送事件的名称!!"})},addEventListener:function(e,t){var n="Unique id:"+(new Date).getTime(),r=this;if(e.name){r.tagMaps[e.name]=n,window.mapWebViewCallBack[n]=function(e,n){t(e,n)},e._tag=n;try{Zt()?r.bridge.callHandler("addEventListener",JSON.stringify(e),"mapWebViewCallBack"):r.bridge.addEventListener(JSON.stringify(e),"mapWebViewCallBack")}catch(e){}}else t({error:"请传入监听事件的名称!!"})}};var en,tn=tn;function nn(e,t){var n,r,i=!1,o=function(){i=!0,window.clearTimeout(n),n=window.setTimeout((function(){i=!1}),1e3)};return{get:function(){return i||(r=on(e),o()),r},set:function(n,i){rn(e,n,i,t),r=n,o()},clearCache:function(){window.clearTimeout(n),i=!1}}}function rn(e,t,n,r){var i=new Date;i.setTime(i.getTime()+n);var o="expires="+i.toUTCString(),a=r&&r.crossSite?"none":"strict",s=r&&r.domain?";domain="+r.domain:"",u=r&&r.secure?";secure":"";document.cookie=e+"="+t+";"+o+";path=/;samesite="+a+s+u}function on(e){return function(e,t){var n=e.match("(?:^|;)\\s*"+t+"\\s*=\\s*([^;]+)");return n?n[1]:void 0}(document.cookie,e)}var an=/^\s+|\s+$/g,sn={resourceSampleRate:100,sampleRate:100,flushTimeout:3e4,maxErrorsByMinute:3e3,maxBatchSize:50,maxMessageSize:262144,requestErrorResponseLengthLimit:32768,batchBytesLimit:16384,datakitUrl:"",logsEndpoint:"",traceType:Qe.DDTRACE,traceId128Bit:!1,trackInteractions:!1,allowedDDTracingOrigins:[],allowedTracingOrigins:[],isServiceSampling:!1,isJsBirdge:!1,isLineProtocolToJson:!1,beforeSend:function(e){},isServerError:function(e){return!1}};function un(e){return e.replace(an,"")}function cn(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===en){for(var e="dd_site_test_".concat(I()),t=window.location.hostname.split("."),n=t.pop();t.length&&!on(e);)n=t.pop()+"."+n,rn(e,"test",U,{domain:n});en=n}return en}()),t}function dn(e){return e.lastIndexOf("/")===e.length-1?un(e)+"v1/write/logging":un(e)+"/v1/write/logging"}function fn(e,t){var n,r,i=l(e.enableExperimentalFeatures)?e.enableExperimentalFeatures:[],o={applicationId:e.applicationId,env:e.env||"",version:e.version||"",service:e.service||"browser",sdkVersion:t.sdkVersion,sdkName:t.sdkName,datakitUrl:(n=e.datakitUrl||e.datakitOrigin,n.lastIndexOf("/")===n.length-1?un(n)+"v1/write/rum":un(n)+"/v1/write/rum"),logsEndpoint:dn(e.datakitOrigin),isEnabled:function(e){return oe(i,e)},cookieOptions:cn(e)};return"isJsBirdge"in e&&(o.isJsBirdge=e.isJsBirdge),"isLineProtocolToJson"in e&&(o.isLineProtocolToJson=e.isLineProtocolToJson),"allowedDDTracingOrigins"in e&&(o.allowedTracingOrigins=e.allowedDDTracingOrigins),"allowedTracingOrigins"in e&&(o.allowedTracingOrigins=e.allowedTracingOrigins),"sampleRate"in e&&(o.sampleRate=e.sampleRate),"resourceSampleRate"in e&&(o.resourceSampleRate=e.resourceSampleRate),"trackInteractions"in e&&(o.trackInteractions=!!e.trackInteractions),"isServerError"in e&&p(e.isServerError)&&S(e.isServerError())&&(o.isServerError=e.isServerError),"traceId128Bit"in e&&(o.traceId128Bit=!!e.traceId128Bit),"traceType"in e&&((r=e.traceType)&&h(Qe).indexOf(r)>-1)&&(o.traceType=e.traceType),"isServiceSampling"in e&&S(e.isServiceSampling)&&(o.isServiceSampling=e.isServiceSampling),f({},sn,o)}function ln(e,t){var n=[t.datakitUrl];t.logsEndpoint&&n.push(t.logsEndpoint);var r=!1;for(var i of n)if(0===e.indexOf(i)){r=!0;break}return r}var pn,vn,hn,gn,mn,yn,wn={sdk_name:"_dd.sdk_name",sdk_version:"_dd.sdk_version",app_id:"application.id",env:"_dd.env",service:"_dd.service",version:"_dd.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"},bn={view:{type:qe.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:qe.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:qe.ERROR,tags:{trace_id:"_dd.trace_id",span_id:"_dd.span_id",error_source:"error.source",error_type:"error.type",error_handling:"error.handling",resource_url:"error.resource.url",resource_url_host:"error.resource.url_host",resource_url_path:"error.resource.url_path",resource_url_path_group:"error.resource.url_path_group",resource_status:"error.resource.status",resource_status_group:"error.resource.status_group",resource_method:"error.resource.method"},fields:{error_message:["string","error.message"],error_stack:["string","error.stack"]}},long_task:{type:qe.LONG_TASK,tags:{},fields:{duration:"long_task.duration"}},action:{type:qe.ACTION,tags:{action_id:"action.id",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_long_task_count:"action.long_task.count"}},browser_log:{type:qe.LOGGER,tags:{error_source:"error.source",error_type:"error.type",error_resource_url:"resource.url",error_resource_url_host:"resource.url_host",error_resource_url_path:"resource.url_path",error_resource_url_path_group:"resource.url_path_group",error_resource_status:"resource.status",error_resource_status_group:"resource.status_group",error_resource_method:"resource.method",action_id:"user_action.id",service:"service",status:"status"},fields:{message:["string","message"]}}},_n=[],Sn=[];function Tn(){return pn||(vn=XMLHttpRequest.prototype.open,hn=XMLHttpRequest.prototype.send,gn=XMLHttpRequest.prototype.abort,XMLHttpRequest.prototype.open=function(e,t){return this._dataflux_xhr={method:e,startTime:-1,url:Gt(t)},vn.apply(this,arguments)},XMLHttpRequest.prototype.send=function(e){var t=this;if(this._dataflux_xhr){var n=this._dataflux_xhr;n.startTime=J(),n.startClocks=G(),n.isAborted=!1;var r=this.onreadystatechange;this.onreadystatechange=function(){this.readyState===XMLHttpRequest.DONE&&o(),r&&r.apply(this,arguments)};var i=!1,o=function e(){if(t.removeEventListener("loadend",e),!i){i=!0;var r=d({},n,{duration:K(n.startClocks.relative,J()),response:t.response,status:t.status});u(Sn,(function(e){e(r,t)}))}};t.addEventListener("loadend",o),u(_n,(function(e){e(n,t)}))}return hn.apply(t,arguments)},XMLHttpRequest.prototype.abort=function(){return this._dataflux_xhr&&(this._dataflux_xhr.isAborted=!0),gn.apply(this,arguments)},pn={beforeSend:function(e){_n.push(e)},onRequestComplete:function(e){Sn.push(e)}}),pn}function xn(e,t,n,r,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,i)}var En,On,Cn=[],In=[];function kn(){return mn||(!function(){if(!window.fetch)return;yn=window.fetch,window.fetch=function(e,t){var n,r=Rn.apply(null,[e,t]);return r?(n=yn.call(this,r.input,r.init),An.apply(null,[n,r])):n=yn.call(this,e,t),n}}(),mn={beforeSend:function(e){Cn.push(e)},onRequestComplete:function(e){In.push(e)}}),mn}function Rn(e,t){var n=t&&t.method||"object"==typeof e&&e.method||"GET",r=Gt("object"==typeof e&&e.url||e),i=G(),o={init:t,input:e,method:n,startTime:J(),startClocks:i,url:r};return u(Cn,(function(e){e(o)})),o}function An(e,t){var n=function(){var e,n=(e=function*(e){if(t.duration=K(t.startClocks.relative,J()),"stack"in e||e instanceof Error)t.status=0,t.response=Tt(ct(e)),t.headers=e.headers,t.isAborted=e instanceof DOMException&&e.code===DOMException.ABORT_ERR,u(In,(function(e){e(t)}));else if("status"in e){var n;try{n=yield e.clone().text()}catch(e){n="Unable to retrieve response: "+e}t.response=n,t.responseType=e.type,t.status=e.status,t.headers=e.headers,t.isAborted=!1,u(In,(function(e){e(t)}))}},function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){xn(o,r,i,a,s,"next",e)}function s(e){xn(o,r,i,a,s,"throw",e)}a(void 0)}))});return function(e){return n.apply(this,arguments)}}();e.then(n,n)}function Bn(e){return En||(function(e,t){function n(n,r){ln(r.url,e)||r.isAborted||!(function(e){return 0===e.status&&"opaque"!==e.responseType}(r)||function(e){return e.status>=500}(r)||e.isServerError(r))||t.notify({message:$n(n)+" error "+r.method+" "+r.url,resource:{method:r.method,statusCode:r.status,url:r.url,traceId:r.traceId,spanId:r.spanId},source:yt,stack:Mn(r.response,e)||"Failed to load",startClocks:r.startClocks})}Tn().onRequestComplete((function(e){n(Fe.XHR,e)})),kn().onRequestComplete((function(e){n(Fe.FETCH,e)}))}(e,En=new Jt),function(e){On=console.error,console.error=function(){On.apply(console,arguments);var t=St();e.notify(d({},Ln(v(arguments),t),{source:mt,startClocks:G(),handling:ze}))}}(En),function(e){rt((function(t,n,r){var i=_t(t,r,"Uncaught");e.notify({message:i.message,stack:i.stack,type:i.type,source:wt,startClocks:G(),handling:Je})}))}(En)),En}function Ln(e,t){var n=function(e,t){for(var n=0;n<e.length;n+=1){var r=e[n];if(t(r,n,e))return r}}(e,(function(e){return e instanceof Error}));return{message:m(["console error:"].concat(e),(function(e){return function(e){if("string"==typeof e)return e;if(e instanceof Error)return((t=ct(e)).name||"Error")+": "+t.message;var t;return D(e,0,2)}(e)})).join(" "),stack:n?Tt(ct(n)):void 0,handlingStack:t}}function Mn(e,t){return e&&e.length>t.requestErrorResponseLengthLimit?e.substring(0,t.requestErrorResponseLengthLimit)+"...":e}function $n(e){return Fe.XHR===e?"XHR":"Fetch"}function Dn(){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}function Wn(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 rn(t,n,U,e),on(t)===n}catch(e){return!1}}(e)}function Pn(){return"file:"!==window.location.protocol}var Nn=9e5,Un=144e5;function Vn(e,t,n){var r=function(e){var t=nn("_dataflulx_an_id",e);return t.get()||t.set(I(),5184e6),t}(e),i=nn("_dataflux_s",e),o=new Jt,a=qn(i).id,s=E((function(){i.clearCache();var e=qn(i),r=n(e[t]);e[t]=r.trackingType,r.isTracked&&!e.id&&(e.id=I(),e.created=String(Date.now())),Fn(e,i),r.isTracked&&a!==e.id&&(a=e.id,o.notify())}),1e3);return s(),function(e){var t=ie(window,[ye,Te,we,Se],e,{capture:!0,passive:!0});zn.push(t.stop)}(s),function(e){var t=function(){"visible"===document.visibilityState&&e()},n=re(document,xe,t);zn.push(n.stop);var r=window.setInterval(t,6e4);zn.push((function(){clearInterval(r)}))}((function(){i.clearCache(),Fn(qn(i),i)})),{getAnonymousID:function(){return r.get()},getId:function(){var e=qn(i);return e.did||e.id},getTrackingType:function(){return qn(i)[t]},getDebugSession:function(){var e=qn(i);return w(e)||!e.did?{}:{id:e.did,created:e.dcreated}},addDebugSession:function(e,t){var n=qn(i);w(n)||(n.did=e||I,n.dcreated=t||String(Date.now()),Fn(n,i))},clearDebugSession:function(){var e=qn(i),t={};u(b(e),(function(e){"did"!==e[0]&&"dcreated"!==e[0]&&(t[e[0]]=e[1])})),Fn(t,i)},renewObservable:o}}var jn=/^([a-z]+)=([a-z0-9-]+)$/,Hn="&";function qn(e){var t=function(e){var t=e.get(),n={};(function(e){return void 0!==e&&(-1!==e.indexOf("&")||jn.test(e))})(t)&&u(t.split(Hn),(function(e){var t=jn.exec(e);if(null!==t){var r=t[1],i=t[2];n[r]=i}}));return n}(e);return function(e){return(void 0===e.created||Date.now()-Number(e.created)<Un)&&(void 0===e.expire||Date.now()<Number(e.expire))}(t)?t:(Qn(e),{})}function Fn(e,t){if(w(e))Qn(t);else{e.expire=String(Date.now()+Nn);var n=[];u(b(e),(function(e){n.push(e[0]+"="+e[1])}));var r=n.join(Hn);t.set(r,Nn)}}function Qn(e){e.set("",0)}var zn=[];var Jn=/[^\u0000-\u007F]/,Gn="custom_keys";var Xn=Dn(),Kn=function(e,t,n){this.endpointUrl=e,this.bytesLimit=t,this.isLineProtocolToJson=n;var r="[object Navigator]"===Object.prototype.toString.call(Xn&&Xn.navigator)&&"function"==typeof Xn.navigator.sendBeacon;this.sendBeacon=r?Xn.navigator.sendBeacon.bind(Xn.navigator):void 0};Kn.prototype={send:function(e,t){var n=function(e){return e?e+(-1===e.indexOf("?")?"?":"&")+"precision=ms":e}(this.endpointUrl);if(this.sendBeacon&&t<this.bytesLimit&&!this.isLineProtocolToJson){if(this.sendBeacon(n,e))return}else if(this.sendBeacon&&t<this.bytesLimit&&this.isLineProtocolToJson){var r=new Blob([JSON.stringify(e)],{type:"application/json"});if(this.sendBeacon(n,r))return}var i=new XMLHttpRequest;i.open("POST",n,!0),i.withCredentials=!0,this.isLineProtocolToJson?(i.setRequestHeader("Content-type","application/json"),i.send(JSON.stringify(e))):(i.setRequestHeader("Content-type","text/plain;charset=UTF-8"),i.send(e))}};var Yn=Kn,Zn=function(e){if(!e||!e.type)return{rowStr:"",rowData:void 0};var t={tags:{},fields:{}},n=!1,r="";return u(bn,(function(i,o){if(i.type===e.type){r+=o+",",t.measurement=o;var a=[],s=d({},wn,i.tags),c=["date","type"];u(s,(function(n,r){var i=ne(e,n);c.push(r),(i||T(i))&&(t.tags[r]=fe(i),a.push(de(r)+"="+de(i)))}));var f=[];if(u(i.fields,(function(n,r){if(l(n)&&2===n.length){var i=n[0],o=n[1],a=ne(e,o);c.push(r),(a||T(a))&&(t.fields[r]=a,a="string"===i?'"'+a.replace(/[\\]*"/g,'"').replace(/"/g,'\\"')+'"':de(a),f.push(de(r)+"="+a))}else if(_(n)){a=ne(e,n);c.push(r),(a||T(a))&&(t.fields[r]=a,a=de(a),f.push(de(r)+"="+a))}})),e.tags&&y(e.tags)&&!w(e.tags)){var p=[];u(e.tags,(function(e,n){c.indexOf(n)>-1||(c.push(n),(e||T(e))&&(p.push(n),t.tags[n]=fe(e),a.push(de(n)+"="+de(e))))})),p.length&&(t.tags.custom_keys=fe(p),a.push(de(Gn)+"="+de(p)))}e.type===qe.LOGGER&&u(e,(function(e,n){-1===c.indexOf(n)&&(T(e)||_(e)||S(e))&&(t.tags[n]=fe(e),a.push(de(n)+"="+de(e)))})),a.length&&(r+=a.join(",")),f.length&&(r+=" ",r+=f.join(","),n=!0),r=r+" "+e.date,t.time=F(e.date)}})),{rowStr:n?r:"",rowData:n?t:void 0}},er=function(e,t,n,r,i,o,a){this.request=e,this.maxSize=t,this.bytesLimit=n,this.maxMessageSize=r,this.flushTimeout=i,this.isLineProtocolToJson=o,this.beforeUnloadCallback=a,this.pushOnlyBuffer=[],this.upsertBuffer={},this.bufferBytesSize=0,this.bufferMessageCount=0,this.flushOnVisibilityHidden(),this.flushPeriodically()};er.prototype={add:function(e){this.addOrUpdate(e)},upsert:function(e,t){this.addOrUpdate(e,t)},flush:function(){if(0!==this.bufferMessageCount){var e=this.pushOnlyBuffer.concat(h(this.upsertBuffer));if(0===e.length)return;this.isLineProtocolToJson?this.request.send(m(e,(function(e){return JSON.parse(e)})),this.bufferBytesSize):this.request.send(e.join("\n"),this.bufferBytesSize),this.pushOnlyBuffer=[],this.upsertBuffer={},this.bufferBytesSize=0,this.bufferMessageCount=0}},processSendData:function(e){return this.isLineProtocolToJson?JSON.stringify(Zn(e).rowData):Zn(e).rowStr},sizeInBytes:function(e){return Jn.test(e)?void 0!==window.TextEncoder?(new TextEncoder).encode(e).length:new Blob([e]).size:e.length},addOrUpdate:function(e,t){var n=this.process(e);n.processedMessage&&""!==n.processedMessage&&(n.messageBytesSize>=this.maxMessageSize||(this.hasMessageFor(t)&&this.remove(t),this.willReachedBytesLimitWith(n.messageBytesSize)&&this.flush(),this.push(n.processedMessage,n.messageBytesSize,t),this.isFull()&&this.flush()))},process:function(e){var t="";return{processedMessage:t=this.processSendData(e),messageBytesSize:this.sizeInBytes(t)}},push:function(e,t,n){this.bufferMessageCount>0&&(this.bufferBytesSize+=1),void 0!==n?this.upsertBuffer[n]=e:this.pushOnlyBuffer.push(e),this.bufferBytesSize+=t,this.bufferMessageCount+=1},remove:function(e){var t=this.upsertBuffer[e];delete this.upsertBuffer[e];var n=this.sizeInBytes(t);this.bufferBytesSize-=n,this.bufferMessageCount-=1,this.bufferMessageCount>0&&(this.bufferBytesSize-=1)},hasMessageFor:function(e){return void 0!==e&&void 0!==this.upsertBuffer[e]},willReachedBytesLimitWith:function(e){return this.bufferBytesSize+e+1>=this.bytesLimit},isFull:function(){return this.bufferMessageCount===this.maxSize||this.bufferBytesSize>=this.bytesLimit},flushPeriodically:function(){var e=this;setTimeout((function(){e.flush(),e.flushPeriodically()}),e.flushTimeout)},flushOnVisibilityHidden:function(){var e=this;Xn.navigator.sendBeacon&&(re(window,me,e.beforeUnloadCallback),re(document,xe,(function(){"hidden"===document.visibilityState&&e.flush()})),re(window,me,(function(){e.flush()})))}};var tr=er,nr="0",rr="1",ir="2",or="3";function ar(e,t){var n=Vn(e.cookieOptions,"rum",(function(t){return function(e,t){var n;n=function(e){return e===nr||e===rr||e===ir||e===or}(t)?t:j(e.sampleRate)?j(e.resourceSampleRate)?rr:e.isServiceSampling?or:ir:e.isServiceSampling?or:nr;return{trackingType:n,isTracked:sr(n)}}(e,t)}));return n.renewObservable.subscribe((function(){t.notify(Bt)})),{getId:n.getId,getAnonymousID:n.getAnonymousID,getDebugSession:n.getDebugSession,addDebugSession:n.addDebugSession,clearDebugSession:n.clearDebugSession,isTracked:function(){return void 0!==n.getId()&&sr(n.getTrackingType())},isTrackedWidthService:function(){return void 0!==n.getId()&&n.getTrackingType()===or},isTrackedWithResource:function(){var e=n.getTrackingType();return void 0!==n.getId()&&(e===rr||e===or)}}}function sr(e){return e===rr||e===ir||e===or}var ur={sdkVersion:"2.1.1",sdkName:"df_web_rum_sdk"},cr="initial_document",dr=[[Be,function(e){return cr===e}],[Le,function(e){return"xmlhttprequest"===e}],[$e,function(e){return"fetch"===e}],[Me,function(e){return"beacon"===e}],[De,function(e,t){return null!==t.match(/\.css$/i)}],[We,function(e,t){return null!==t.match(/\.js$/i)}],[Pe,function(e,t){return oe(["image","img","icon"],e)||null!==t.match(/\.(gif|jpg|jpeg|tiff|png|svg|ico)$/i)}],[Ne,function(e,t){return null!==t.match(/\.(woff|eot|woff2|ttf)$/i)}],[Ue,function(e,t){return oe(["audio","video"],e)||null!==t.match(/\.(mp3|mp4)$/i)}]];function fr(e){var t=e.name;if(!function(e){try{return!!Kt(e)}catch(e){return!1}}(t))return Ve;var n=function(e){var t=Kt(e).pathname;return"/"===t[0]?t:"/"+t}(t),r=Ve;return u(dr,(function(t){var i=t[0];if((0,t[1])(e.initiatorType,n))return r=i,!1})),r}function lr(){for(var e=v(arguments),t=1;t<e.length;t+=1)if(e[t-1]>e[t])return!1;return!0}function pr(e){var t=vr(e);if(t){var n=t.startTime,r=t.fetchStart,i=t.redirectStart,o=t.redirectEnd,a=t.domainLookupStart,s=t.domainLookupEnd,u=t.connectStart,c=t.secureConnectionStart,d=t.connectEnd,f=t.requestStart,l=t.responseStart,p=t.responseEnd,v={firstbyte:gr(n,a,l),trans:gr(n,l,p),ttfb:gr(n,f,l)};return d!==r&&(v.tcp=gr(n,u,d),lr(u,c,d)&&(v.ssl=gr(n,c,d))),s!==r&&(v.dns=gr(n,a,s)),hr(e)&&(v.redirect=gr(n,i,o)),v}}function vr(e){if(lr(e.startTime,e.fetchStart,e.domainLookupStart,e.domainLookupEnd,e.connectStart,e.connectEnd,e.requestStart,e.responseStart,e.responseEnd)){if(!hr(e))return e;var t=e.redirectStart,n=e.redirectEnd;if(t<e.startTime&&(t=e.startTime),n<e.startTime&&(n=e.fetchStart),lr(e.startTime,t,n,e.fetchStart))return d({},e,{redirectEnd:n,redirectStart:t})}}function hr(e){return e.fetchStart!==e.startTime}function gr(e,t,n){return q(n-t)}function mr(e){if(e.startTime<e.responseStart)return e.decodedBodySize}function yr(e,t){return t&&!ln(t,e)}function wr(){return void 0!==window.performance&&"getEntries"in performance}function br(e){return window.PerformanceObserver&&void 0!==PerformanceObserver.supportedEntryTypes&&oe(PerformanceObserver.supportedEntryTypes,e)}function _r(e,t){var n;if(n=function(n){Er(e,t,n)},Sr("interactive",(function(){var e,t={entryType:"resource",initiatorType:cr,traceId:""};if(br("navigation")&&performance.getEntriesByType("navigation").length>0){var r=performance.getEntriesByType("navigation")[0];e=d(r.toJSON(),t)}else{var i=Tr();e=d(i,{decodedBodySize:0,duration:i.responseEnd,name:window.location.href,startTime:0},t)}n(e)})),wr()&&xr(e,t,performance.getEntries()),window.PerformanceObserver){new PerformanceObserver((function(n){xr(e,t,n.getEntries())})).observe({entryTypes:["resource","navigation","longtask","paint","largest-contentful-paint","first-input","layout-shift"]}),wr()&&"addEventListener"in performance&&performance.addEventListener("resourcetimingbufferfull",(function(){performance.clearResourceTimings()}))}br("navigation")||function(e){function t(){e(d(Tr(),{entryType:"navigation"}))}Sr("complete",(function(){setTimeout(t)}))}((function(n){Er(e,t,n)})),br("first-input")||function(e){var t=Date.now(),n=!1,r=ie(window,[ye,Ae,we,Te,Oe],(function(e){if(e.cancelable){var t={entryType:"first-input",processingStart:performance.now(),startTime:e.timeStamp};e.type===Oe?i(t):o(t)}}),{passive:!0,capture:!0}).stop;function i(e){ie(window,[Ce,Ie],(function(t){t.type===Ce&&o(e)}),{once:!0})}function o(i){if(!n){n=!0,r();var o=i.processingStart-i.startTime;o>=0&&o<Date.now()-t&&e(i)}}}((n=>{Er(e,t,n)}))}function Sr(e,t){document.readyState===e||"complete"===document.readyState?t():re(window,"complete"===e?be:Ee,t,{once:!0})}function Tr(){var e={},t=performance.timing;for(var n in t)T(t[n])&&(e[n]=0===t[n]?0:t[n]-te());return e}function xr(e,t,n){u(n,(function(n){"resource"!==n.entryType&&"navigation"!==n.entryType&&"paint"!==n.entryType&&"longtask"!==n.entryType&&"largest-contentful-paint"!==n.entryType&&"first-input"!==n.entryType&&"layout-shift"!==n.entryType||Er(e,t,n)}))}function Er(e,t,n){(function(e){return"navigation"===e.entryType&&e.loadEventEnd<=0})(n)||function(e,t){return"resource"===t.entryType&&!yr(e,t.name)}(t,n)||e.notify(Et,n)}function Or(e){var t,n=function(){var e,t=window;if(t.Zone){var n=t.Zone.__symbol__("MutationObserver");e=t[n]}return e||(e=t.MutationObserver),e}();return n&&(t=new n((function(){e.notify(Lt)}))).observe(document.documentElement,{attributes:!0,characterData:!0,childList:!0,subtree:!0}),{stop:function(){t&&t.disconnect()}}}function Cr(e,t){void 0===t&&(t=P);var n={errorCount:0,longTaskCount:0,resourceCount:0,userActionCount:0},r=e.subscribe(Wt,(function(e){switch(e.rawRumEvent.type){case qe.ERROR:n.errorCount+=1,t(n);break;case qe.ACTION:n.userActionCount+=1,t(n);break;case qe.LONG_TASK:n.longTaskCount+=1,t(n);break;case qe.RESOURCE:n.resourceCount+=1,t(n)}}));return{stop:function(){r.unsubscribe()},eventCounts:n}}function Ir(e,t){var n=function(e){var t,n=new Jt,r=[],i=0;function o(){n.notify({isBusy:i>0})}return r.push(e.subscribe(Lt,(function(){o()}))),r.push(e.subscribe(Et,(function(e){"resource"===e.entryType&&o()}))),r.push(e.subscribe($t,(function(e){void 0===t&&(t=e.requestIndex),i+=1,o()}))),r.push(e.subscribe(Dt,(function(e){void 0===t||e.requestIndex<t||(i-=1,o())}))),{observable:n,stop:function(){u(r,(function(e){e.unsubscribe()}))}}}(e),r=n.observable,i=n.stop,o=function(e,t,n){var r,i=!1,o=setTimeout((function(){u({hadActivity:!1})}),100),a=setTimeout((function(){u({hadActivity:!0,endTime:Q()})}),1e4);function s(){i=!0,clearTimeout(o),clearTimeout(r),clearTimeout(a),t()}function u(e){i||(s(),n(e))}return e.subscribe((function(e){var t=e.isBusy;clearTimeout(o),clearTimeout(r);var n=Q();t||(r=setTimeout((function(){u({hadActivity:!0,endTime:n})}),100))})),{stop:s}}(r,i,t),a=o.stop;return{stop:function(){a(),i()}}}function kr(e){return function(e){var t;if(function(){void 0===Lr&&(Lr="closest"in HTMLElement.prototype);return Lr}())t=e.closest("[data-df-action-name]");else for(var n=e;n;){if(n.hasAttribute(Rr)){t=n;break}n=n.parentElement}if(!t)return;return Pr(Wr(t.getAttribute(Rr).trim()))}(e)||Dr(e,Mr)||Dr(e,$r)||""}var Rr="data-df-action-name";var Ar,Br,Lr,Mr=[function(e){if(function(){void 0===Br&&(Br="labels"in HTMLInputElement.prototype);return Br}()){if("labels"in e&&e.labels&&e.labels.length>0)return Nr(e.labels[0])}else if(e.id){var t=e.ownerDocument&&e.ownerDocument.querySelector('label[for="'+e.id.replace('"','\\"')+'"]');return t&&Nr(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){if("BUTTON"===e.nodeName||"LABEL"===e.nodeName||"button"===e.getAttribute("role"))return Nr(e)},function(e){return e.getAttribute("aria-label")},function(e){var t=e.getAttribute("aria-labelledby");if(t)return t=t.split(/\s+/),t=m(t,(function(t){return function(e,t){return e.ownerDocument?e.ownerDocument.getElementById(t):null}(e,t)})),t=g(t,(function(e){return Boolean(e)})),(t=m(t,(function(e){return Nr(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 Nr(e.options[0])}],$r=[function(e){return Nr(e)}];function Dr(e,t){for(var n=e,r=0;r<=10&&n&&"BODY"!==n.nodeName&&"HTML"!==n.nodeName&&"HEAD"!==n.nodeName;){for(var i of t){var o=i(n);if("string"==typeof o){var a=o.trim();if(a)return Pr(Wr(a))}}if("FORM"===n.nodeName)break;n=n.parentElement,r+=1}}function Wr(e){return e.replace(/\s+/g," ")}function Pr(e){return e.length>100?(n=100,((r=(t=e).charCodeAt(n-1))>=55296&&r<=56319?t.slice(0,n+1):t.slice(0,n))+" [...]"):e;var t,n,r}function Nr(e){if(!e.isContentEditable){if("innerText"in e){var t=e.innerText;if(!function(){if(void 0===Ar){var e=document.createElement("style");e.textContent="*";var t=document.createElement("div");t.appendChild(e),document.body.appendChild(t),Ar=""===t.innerText,document.body.removeChild(t)}return Ar}())for(var n=e.querySelectorAll("script, style"),r=0;r<n.length;r+=1){var i=n[r].innerText;i.trim().length>0&&(t=t.replace(i,""))}return t}return e.textContent}}function Ur(e){var t=function(e){var t,n;return{create:function(r,i){if(!t){var o=new Vr(e,r,i);t=o,n=Ir(e,(function(e){e.hadActivity?o.complete(e.endTime):o.discard(),t=void 0}))}},discardCurrent:function(){t&&(n.stop(),t.discard(),t=void 0)}}}(e);e.subscribe(kt,(function(){t.discardCurrent()}));var n=re(window,ye,(function(e){if(e.target instanceof Element){var n=kr(e.target);n&&t.create(je,n)}}),{capture:!0}).stop;return{stop:function(){t.discardCurrent(),n()}}}var Vr=function(e,t,n){this.id=I(),this.startClocks=G(),this.name=n,this.type=t,this.lifeCycle=e,this.eventCountsSubscription=Cr(e),this.lifeCycle.notify(Ot,{id:this.id,startClocks:this.startClocks})};function jr(e,t){return e.subscribe(Ct,(function(t){e.notify(Wt,Hr(t))})),t.trackInteractions&&Ur(e),{addAction:function(t,n){e.notify(Wt,d({savedCommonContext:n},Hr(t)))}}}function Hr(e){var t=qr(e)?{action:{error:{count:e.counts.errorCount},id:e.id,loadingTime:F(e.duration),long_task:{count:e.counts.longTaskCount},resource:{count:e.counts.resourceCount}}}:{action:{loadingTime:0}};return{customerContext:qr(e)?void 0:e.context,rawRumEvent:f({action:{target:{name:e.name},type:e.type},date:Z(e.startClocks),type:qe.ACTION},t),startTime:e.startClocks.relative}}function qr(e){return e.type!==He}Vr.prototype={complete:function(e){var t=this.eventCountsSubscription.eventCounts;this.lifeCycle.notify(Ct,{counts:{errorCount:t.errorCount,longTaskCount:t.longTaskCount,resourceCount:t.resourceCount},duration:K(Y(this.startClocks),e),id:this.id,name:this.name,startClocks:this.startClocks,type:this.type}),this.eventCountsSubscription.stop()},discard:function(){this.lifeCycle.notify(It),this.eventCountsSubscription.stop()}};function Fr(e,t){var n,r=function(e,t){var n=r(e.datakitUrl,(function(){t.notify(Mt)}));function r(t,n){return new tr(new Yn(t,e.batchBytesLimit,e.isLineProtocolToJson),e.maxBatchSize,e.batchBytesLimit,e.maxMessageSize,e.flushTimeout,e.isLineProtocolToJson,n)}var i=!1;return{add:function(e){i||n.add(e)},stop:function(){i=!0},upsert:function(e,t){i||n.upsert(e,t)}}}(e,t);return e.isJsBirdge&&(n=new tn(e)),t.subscribe(Pt,(function(e){n&&n.bridge?function(e,t){var n=Zn(e).rowData;n&&t.sendEvent({name:"rum",data:n})}(e,n):function(e,t){e.type===qe.VIEW?t.upsert(e,e.view.id):t.add(e)}(e,r)})),{stop:function(){r.stop()}}}var Qr,zr="synthetics",Jr="user",Gr=["view.url","view.referrer","action.target.name","error.message","error.stack","error.resource.url","resource.url"];function Xr(e,t,n,r,i,o){var a=function(e,t){var n=0,r=!1;return{isLimitReached:function(){if(0===n&&setTimeout((function(){n=0}),V),(n+=1)<=e.maxErrorsByMinute||r)return r=!1,!1;if(n===e.maxErrorsByMinute+1){r=!0;try{t({message:"Reached max number of errors by minute: ".concat(e.maxErrorsByMinute),source:gt,startClocks:G()})}finally{r=!1}}return!0}}}(t,(function(e){n.notify(Nt,{error:e})}));n.subscribe(Wt,(function(s){var u,c=s.startTime,d=s.rawRumEvent,l=s.savedCommonContext,p=s.customerContext,v=i.findView(c),h={device:ge};if(r.isTracked()&&v&&v.session.id===r.getId()){var g=i.findAction(c),m=l||o(),y={_dd:{sdkName:t.sdkName,sdkVersion:t.sdkVersion,env:t.env,version:t.version,service:t.service},terminal:{type:"web"},application:{id:e},device:{},date:X(),user:{id:r.getAnonymousID(),is_signin:"F"},session:{type:void 0===window._DATAFLUX_SYNTHETICS_BROWSER?Jr:zr}},b={};r.isTrackedWidthService()&&(b={session:{is_sampling:"1"}});var _=ue((u=d,-1!==[qe.ERROR,qe.RESOURCE,qe.LONG_TASK].indexOf(u.type)?f(y,h,b,v,g,d):f(y,h,b,v,d))),S=f({},m.context,p);w(S)||(_.tags=S),"has_replay"in _.session||(_.session.has_replay=m.hasReplay),w(m.user)||(_.user=f({id:r.getAnonymousID(),is_signin:"T"},m.user)),function(e,t,n){if(t){var r=Ht(e,Gr,t);if(!1===r&&e.type!==qe.VIEW)return!1}if(e.type===qe.ERROR)return!n.isLimitReached();return!0}(_,t.beforeSend,a)&&n.notify(Pt,_)}}))}function Kr(e,t){return Bn(t).subscribe((function(t){e.notify(Nt,{error:t})})),function(e){return e.subscribe(Nt,(function(t){e.notify(Wt,d({customerContext:t.customerContext,savedCommonContext:t.savedCommonContext},function(e){var t,n=e.resource;if(n){t=function(e){if(!e.traceId||!e.spanId)return;return{_dd:{spanId:e.spanId,traceId:e.traceId}}}(n);var r=R(e.resource.url).getParse();n={method:e.resource.method,status:e.resource.statusCode,statusGroup:$(e.resource.statusCode),url:e.resource.url,urlHost:r.Host,urlPath:r.Path,urlPathGroup:k(r.Path)}}return{rawRumEvent:f({date:z(e.startClocks.relative),error:{message:e.message,resource:n,source:e.source,stack:e.stack,type:e.type,handling_stack:e.handlingStack,handling:e.handling,starttime:z(e.startClocks.relative)},type:qe.ERROR},t),startTime:e.startClocks.relative}}(t.error)))})),{addError:function(t,n){var r=function(e,t,n){const r=e instanceof Error?ct(e):void 0;return d({startClocks:n,source:bt,originalError:e,handling:ze},_t(r,e,"Provided",t))}(t.error,t.handlingStack,t.startClocks);e.notify(Nt,{customerContext:t.context,savedCommonContext:n,error:r})}}}(e)}function Yr(e){if(void 0===e&&(e=window),!Qr)if("hidden"===document.visibilityState)Qr={timeStamp:0};else{Qr={timeStamp:1/0};var t=re(e,Re,(function(e){Qr.timeStamp=e.timeStamp}),{capture:!0,once:!0});t.stop}return Qr}function Zr(e,t){var n={};function r(e){n=d(n,e),t(n)}var i=function(e,t){return{stop:e.subscribe(Et,(function(e){"navigation"===e.entryType&&t({fetchStart:e.fetchStart,responseEnd:e.responseEnd,domComplete:e.domComplete,domContentLoaded:e.domContentLoadedEventEnd,domInteractive:e.domInteractive,loadEvent:e.loadEventEnd,loadEventEnd:e.loadEventEnd,loadEventStart:e.loadEventStart,domContentLoadedEventEnd:e.domContentLoadedEventEnd,domContentLoadedEventStart:e.domContentLoadedEventStart})})).unsubscribe}}(e,r),o=i.stop,a=function(e,t){var n=Yr();return{stop:e.subscribe(Et,(function(e){"paint"===e.entryType&&"first-contentful-paint"===e.name&&e.startTime<n.timeStamp&&t(e.startTime)})).unsubscribe}}(e,(function(e){r({firstContentfulPaint:e})})),s=a.stop,u=function(e,t,n){var r=Yr(),i=1/0,o=ie(t,[Oe,we],(function(e){i=e.timeStamp}),{capture:!0,once:!0}).stop,a=e.subscribe(Et,(function(e){"largest-contentful-paint"===e.entryType&&e.startTime<i&&e.startTime<r.timeStamp&&n(e.startTime)})).unsubscribe;return{stop:function(){o(),a()}}}(e,window,(function(e){r({largestContentfulPaint:e})})),c=u.stop,f=function(e,t){var n=Yr();return{stop:e.subscribe(Et,(function(e){if("first-input"===e.entryType&&e.startTime<n.timeStamp){var r=K(e.startTime,e.processingStart);t({firstInputDelay:r>=0?r:0,firstInputTime:e.startTime})}})).unsubscribe}}(e,(function(e){r({firstInputDelay:e.firstInputDelay,firstInputTime:e.firstInputTime})})),l=f.stop;return{stop:function(){o(),s(),c(),l()}}}function ei(e){var t=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=re(window,_e,e).stop;return{stop:function(){r(),history.pushState=t,history.replaceState=n}}}(e),n=re(window,ke,e),r=t.stop,i=n.stop;return{stop:function(){r(),i()}}}function ti(e,t){return e.pathname!==t.pathname||(n=t.hash,r=n.substr(1),!document.getElementById(r)&&ni(t.hash)!==ni(e.hash));var n,r}function ni(e){var t=e.indexOf("?");return t<0?e:e.slice(0,t)}function ri(e,t,n){var r,i={eventCounts:{errorCount:0,longTaskCount:0,resourceCount:0,userActionCount:0}},o=Cr(e,(function(e){i.eventCounts=e,t()})).stop,a=function(e,t){var n=e===ii.INITIAL_LOAD,r=!0,i=[];function o(){!r&&!n&&i.length>0&&t(Math.max.apply(Math,i))}return{setLoadEvent:function(e){n&&(n=!1,i.push(e),o())},setActivityLoadingTime:function(e){r&&(r=!1,void 0!==e&&i.push(e),o())}}}(n,(function(e){i.loadingTime=e,t()})),s=a.setActivityLoadingTime,u=a.setLoadEvent,c=function(e,t){var n=Q();return{stop:Ir(e,(function(e){e.hadActivity?t(K(n,e.endTime)):t(void 0)})).stop}}(e,s),d=c.stop;if(br("layout-shift")){i.cumulativeLayoutShift=0;var f=function(e,t){return{stop:e.subscribe(Et,(function(e){"layout-shift"!==e.entryType||e.hadRecentInput||t(e.value)})).unsubscribe}}(e,(function(e){i.cumulativeLayoutShift=H(i.cumulativeLayoutShift+e,4),t()}));r=f.stop}else r=P;return{stop:function(){o(),d(),r()},setLoadEvent:u,viewMetrics:i}}var ii={INITIAL_LOAD:"initial_load",ROUTE_CHANGE:"route_change"};function oi(e,t){var n,r,i=!1,o=(n=ai(t,e,i,ii.INITIAL_LOAD,document.referrer,{relative:0,timeStamp:te()}),r=Zr(t,(function(e){n.updateTimings(e),n.scheduleUpdate()})).stop,{initialView:n,stop:r}),a=o.stop,s=o.initialView,u=ei((function(){if(ti(s.getLocation(),e))return s.end(),s.triggerUpdate(),void(s=d());s.updateLocation(e),s.triggerUpdate()})).stop;t.subscribe(Bt,(function(){s.end(),s=d()})),t.subscribe(Mt,(function(){s.end(),s.triggerUpdate()})),t.subscribe(Ut,(function(){i=!0,s.updateHasReplay(!0)})),t.subscribe(Vt,(function(){i=!1}));var c=window.setInterval((function(){s.triggerUpdate()}),3e5);function d(){return ai(t,e,i,ii.ROUTE_CHANGE,s.url)}return{addTiming:function(e,t){void 0===t&&(t=G()),s.addTiming(e,t),s.triggerUpdate()},stop:function(){a(),u(),s.end(),clearInterval(c)}}}function ai(e,t,n,r,i,o,a){void 0===o&&(o=G());var s,u=I(),c={},f={},l=0,p=d({},t),v=n;e.notify(kt,{id:u,startClocks:o,location:p,referrer:i});var h=E(_,3e3,{leading:!1}),g=h.cancel,m=ri(e,h,r),y=m.setLoadEvent,w=m.viewMetrics,b=m.stop;function _(){l+=1,e.notify(Rt,d({},w,{customTimings:f,documentVersion:l,id:u,name:a,loadingType:r,location:p,hasReplay:v,referrer:i,startClocks:o,timings:c,duration:K(Y(o),Y(void 0===s?G():s)),isActive:void 0===s}))}return _(),{scheduleUpdate:h,end:function(){s=G(),b(),e.notify(At,{endClocks:s})},getLocation:function(){return p},triggerUpdate:function(){g(),_()},updateTimings:function(e){c=e,void 0!==e.loadEvent&&y(e.loadEvent)},addTiming:function(e,t){f[function(e){var t=e.replace(/[^a-zA-Z0-9-_.@$]/g,"_");return t}(e)]=K(Y(o),Y(t))},updateLocation:function(e){p=d({},e)},updateHasReplay:function(e){v=e},url:p.href}}function si(e,t,n){return e.subscribe(Rt,(function(t){e.notify(Wt,function(e){var t={_dd:{documentVersion:e.documentVersion},date:Z(e.startClocks),type:qe.VIEW,view:{action:{count:e.eventCounts.userActionCount},cumulativeLayoutShift:e.cumulativeLayoutShift,domComplete:q(e.timings.domComplete),domContentLoaded:q(e.timings.domContentLoaded),domInteractive:q(e.timings.domInteractive),error:{count:e.eventCounts.errorCount},firstContentfulPaint:q(e.timings.firstContentfulPaint),firstInputDelay:q(e.timings.firstInputDelay),firstInputTime:q(e.timings.firstInputTime),largestContentfulPaint:q(e.timings.largestContentfulPaint),loadEventEnd:q(e.timings.loadEventEnd),load_event:q(e.timings.load_event),loadingTime:q(e.loadingTime),loadingType:e.loadingType,isActive:e.isActive,name:e.name,longTask:{count:e.eventCounts.longTaskCount},resource:{count:e.eventCounts.resourceCount},timeSpent:q(e.duration)},session:{hasReplay:e.hasReplay||void 0}};w(e.customTimings)||(t.view.custom_timings=(n=e.customTimings,r=F,i={},u(n,(function(e,t){i[t]=r(e)})),i));var n,r,i;return{rawRumEvent:t=f(t,{view:ui(e.timings)}),startTime:e.startClocks.relative}}(t))})),oi(n,e)}function ui(e){var t=vr(e);if(t){var n=t.fetchStart,r=t.responseEnd,i=t.domInteractive,o=t.domContentLoaded,a=t.domComplete,s=t.loadEventEnd,u=t.loadEventStart,c=t.domContentLoadedEventEnd,d={fmp:q(t.largestContentfulPaint)};if(r!==n){d.fpt=q(r-n);var f=parseInt((r-n)/1e3);d.apdexLevel=f>9?9:f}return i!==n&&(d.tti=q(i-n)),o!==n&&(d.domReady=q(o-n)),s!==n&&(d.load=q(s-n)),u!==c&&(d.resourceLoadTime=q(u-c)),a!==i&&(d.dom=q(a-i)),d}}function ci(){this.buffer=new Uint8Array(8),di().getRandomValues(this.buffer),this.buffer[0]=127&this.buffer[0]}function di(){return window.crypto||window.msCrypto}function fi(e){this._spanId=(new ci).toDecimalString(),this._traceId=(new ci).toDecimalString()}function li(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(e=>{const t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}))}function pi(e,t){this._spanId=li(),this._traceId=li(),this._applicationId=e.applicationId,this._env=e.env,this._version=e.version,this._urlParse=R(t).getParse()}function vi(){let e="";for(let t=0;t<16;t+=1){e+="0123456789abcdef"[Math.floor(16*Math.random())]}return e}function hi(e){const t=vi();e.traceId128Bit?this._traceId=vi()+t:this._traceId=t,this._spanId=t}function gi(){let e="";for(let t=0;t<16;t+=1){e+="0123456789abcdef"[Math.floor(16*Math.random())]}return e}function mi(e){const t=gi();this._traceId=gi()+t,this._spanId=t}function yi(){let e="";for(let t=0;t<16;t+=1){e+="0123456789abcdef"[Math.floor(16*Math.random())]}return e}function wi(e){const t=yi();e.traceId128Bit?this._traceId=yi()+t:this._traceId=t,this._spanId=t}function bi(){let e="";for(let t=0;t<16;t+=1){e+="0123456789abcdef"[Math.floor(16*Math.random())]}return e}function _i(e){const t=bi();this._traceId=bi()+t,this._spanId=t}function Si(e){0===e.status&&(e.traceId=void 0,e.spanId=void 0)}function Ti(e,t,n){if(function(e,t){var n=Xt(t),r=!1;return u(e.allowedTracingOrigins,(function(e){if(n===e||e instanceof RegExp&&e.test(n))return r=!0,!1})),r}(e,t.url)&&e.traceType){var r;switch(e.traceType){case Qe.DDTRACE:r=new fi;break;case Qe.SKYWALKING_V3:r=new pi(e,t.url);break;case Qe.ZIPKIN_MULTI_HEADER:r=new wi(e);break;case Qe.JAEGER:r=new hi(e);break;case Qe.W3C_TRACEPARENT:r=new _i(e);break;case Qe.ZIPKIN_SINGLE_HEADER:r=new mi(e)}r&&r.isTracingSupported()&&(t.traceId=r.getTraceId(),t.spanId=r.getSpanId(),n(r.makeTracingHeaders()))}}ci.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]}},fi.prototype={isTracingSupported:function(){return void 0!==di()},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()}}},pi.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(C(this._traceId)),t=String(C(this._spanId)),n=String(C(this._applicationId+"_rum_"+this.env)),r=String(C(this._version)),i=String(C(window.location.href)),o=String(C(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()}}},mi.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()}}},wi.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"}}},_i.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()}}};var xi=1;function Ei(e,t){var n=function(e){return{clearTracingIfCancelled:Si,traceFetch:function(t){return Ti(e,t,(function(e){if(!(t.input instanceof Request)||t.init&&t.init.headers){t.init=c(t.init);var n=[];t.init.headers instanceof Headers?u(t.init.headers,(function(e,t){n.push([t,e])})):l(t.init.headers)?u(t.init.headers,(function(e){n.push(e)})):t.init.headers&&u(t.init.headers,(function(e,t){n.push([t,e])}));var r={};u(n.concat(b(e)),(function(e){r[e[0]]=e[1]})),t.init.headers=r}else t.input=new Request(t.input),u(e,(function(e,n){t.input.headers.append(n,e)}))}))},traceXhr:function(t,n){return Ti(e,t,(function(e){u(e,(function(e,t){n.setRequestHeader(t,e)}))}))}}}(t);!function(e,t,n){var r=Tn();r.beforeSend((function(r,i){yr(t,r.url)&&(n.traceXhr(r,i),r.requestIndex=Oi(),e.notify($t,{requestIndex:r.requestIndex}))})),r.onRequestComplete((function(r){yr(t,r.url)&&(n.clearTracingIfCancelled(r),e.notify(Dt,{duration:r.duration,method:r.method,requestIndex:r.requestIndex,response:r.response,traceId:r.traceId,startClocks:r.startClocks,spanId:r.spanId,startTime:r.startTime,status:r.status,type:Fe.XHR,url:r.url}))}))}(e,t,n),function(e,t,n){var r=kn();r.beforeSend((function(r){yr(t,r.url)&&(n.traceFetch(r),r.requestIndex=Oi(),e.notify($t,{requestIndex:r.requestIndex}))})),r.onRequestComplete((function(r){yr(t,r.url)&&(n.clearTracingIfCancelled(r),e.notify(Dt,{duration:r.duration,method:r.method,requestIndex:r.requestIndex,response:r.response,responseType:r.responseType,startClocks:r.startClocks,spanId:r.spanId,startTime:r.startTime,status:r.status,traceId:r.traceId,type:Fe.FETCH,url:r.url}))}))}(e,t,n)}function Oi(){var e=xi;return xi+=1,e}function Ci(e){if(performance&&"getEntriesByName"in performance){var t=performance.getEntriesByName(e.url,"resource");if(t.length&&"toJSON"in t[0]){var n,r=m(t,(function(e){return e.toJSON()}));return r=g(r,vr),1===(r=g(r,(function(t){return n=t,r=e.startClocks.relative,i=Ii({startTime:e.startClocks.relative,duration:e.duration}),o=1,n.startTime>=r-o&&Ii(n)<=i+o;var n,r,i,o}))).length?r[0]:2===r.length&&Ii((n=r)[0])<=n[1].startTime?r[1]:void 0}}}function Ii(e){return e.startTime+e.duration}function ki(e,t,n){e.subscribe(Dt,(function(t){n.isTrackedWithResource()&&e.notify(Wt,function(e){var t=e.type===Fe.XHR?Le:$e,n=Ci(e),r=n?ee(n.startTime):e.startClocks,i=n?Ri(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=R(e.url).getParse(),s=f({date:Z(r),resource:{type:t,duration:q(e.duration),method:e.method,status:e.status,statusGroup:$(e.status),url:e.url,urlHost:a.Host,urlPath:a.Path,urlPathGroup:k(a.Path),urlQuery:D(A(e.url))},type:qe.RESOURCE},o,i);return{startTime:r.relative,rawRumEvent:s}}(t))})),e.subscribe(Et,(function(t){var r;n.isTrackedWithResource()&&"resource"===t.entryType&&("xmlhttprequest"!==(r=t).initiatorType&&"fetch"!==r.initiatorType)&&e.notify(Wt,function(e){var t=fr(e),n=Ri(e),r=function(e){return e.traceId?{_dd:{traceId:e.traceId}}:void 0}(e),i=R(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=ee(e.startTime),s=f({date:Z(a),resource:{type:t,url:e.name,urlHost:i.Host,urlPath:i.Path,urlPathGroup:k(i.Path),urlQuery:D(A(e.name)),method:"GET",status:o,statusGroup:$(o)},type:qe.RESOURCE},r,n);return{startTime:a.relative,rawRumEvent:s}}(t))}))}function Ri(e){return{resource:f({},{duration:(t=e,0===t.duration&&t.startTime<t.responseEnd?q(t.responseEnd-t.startTime):q(t.duration)),size:mr(e)},pr(e))};var t}var Ai=function(e){var t,n=!1,r=(t={},{get:function(){return t},add:function(e,n){_(e)&&(t[e]=n)},remove:function(e){delete t[e]},set:function(e){y(e)&&(t=e)}}),i={},o=function(){},a=function(){return{}},s=function(){},u=new pe,c=function(e){u.add([e,X()])},l=new pe,p=function(e){l.add([e,G()])},v=new pe,h=function(e){v.add([e,b()])},g=new pe,m=function(e){g.add([e,b()])};function b(){return M({context:r.get(),user:i})}var S,T,x=(S={init:function(t){if(Wn(cn(t))&&Pn()&&function(e){return!n&&(!!e.applicationId&&(!(!e.datakitUrl&&!e.datakitOrigin)&&(!(void 0!==e.sampleRate&&!ae(e.sampleRate))&&!(void 0!==e.resourceSampleRate&&!ae(e.resourceSampleRate)))))}(t)){var d=e(t,(function(){return{user:i,context:r.get()}}));c=d.session.addDebugSession,h=d.addAction,m=d.addError,p=d.addTiming,a=d.session.getDebugSession,s=d.session.clearDebugSession,o=d.getInternalContext,u.drain((function(e){var t=e[0],n=e[1];c(t,n)})),v.drain((function(e){var t=e[0],n=e[1];h(t,n)})),g.drain((function(e){var t=e[0],n=e[1];m(t,n)})),l.drain((function(e){var t=e[0],n=e[1];p(t,n)})),n=!0}},addRumGlobalContext:r.add,removeRumGlobalContext:r.remove,getRumGlobalContext:r.get,setRumGlobalContext:r.set,getInternalContext:function(e){return o(e)},addDebugSession:function(e){c(e),this.getDebugSession()},clearDebugSession:function(){s()},getDebugSession:function(){var e=a();if(w(e))return e;{const t=O(new Date(+e.created));return e.id,f(e,{format_created:t})}},addAction:function(e,t){h({name:e,context:M(t),startClocks:G(),type:He})},addError:function(e,t){const n=St();m({error:e,handlingStack:n,context:M(t),startClocks:G()})},setUser:function(e){var t=function(e){if("object"==typeof e&&e){var t=f({},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}}(e);t&&(i=t)},removeUser:function(){i={}}},T=d({},S,{onReady:function(e){e()}}),Object.defineProperty(T,"_setDebug",{get:function(){return setDebugMode},enumerable:!1}),T);return x}((function(e,t){var n=new jt,r=fn(e,ur),i=ar(r,n),o=function(e,t,n,r,i,o){var a=function(e,t){var n,r,i,o=[],a=[];e.subscribe(kt,(function(e){n=e,i=t.getId()})),e.subscribe(Rt,(function(e){n&&n.id===e.id&&(n=e)})),e.subscribe(At,(function(e){n&&(o.unshift({endTime:e.endClocks.relative,context:d(),startTime:n.startClocks.relative}),n=void 0)})),e.subscribe(Ot,(function(e){r=e})),e.subscribe(Ct,(function(e){r&&a.unshift({context:f(),endTime:r.startClocks.relative+e.duration,startTime:r.startClocks.relative}),r=void 0})),e.subscribe(It,(function(){r=void 0})),e.subscribe(Bt,(function(){o=[],a=[],n=void 0,r=void 0}));var s=window.setInterval((function(){c(o,144e5),c(a,3e5)}),6e4);function c(e,t){for(var n=J()-t;e.length>0&&e[e.length-1].startTime<n;)e.pop()}function d(){return{session:{id:i},view:{id:n.id,referrer:n.referrer,name:n.name,url:n.location.href,host:n.location.host,path:n.location.pathname,pathGroup:k(n.location.pathname),urlQuery:D(A(n.location.href))}}}function f(){return{userAction:{id:r.id}}}function l(e,t,n,r){if(void 0===r)return n?e():void 0;if(n&&r>=n.startClocks.relative)return e();var i=void 0;return u(t,(function(e){return!(r>e.endTime)&&(r>=e.startTime?(i=e.context,!1):void 0)})),i}return{findAction:function(e){return l(f,a,r,e)},findView:function(e){return l(d,o,n,e)},stop:function(){window.clearInterval(s)}}}(n,i),s=Fr(r,n);Xr(e,r,n,i,a,o),function(e){e.subscribe(Et,(function(t){if("longtask"===t.entryType){var n=ee(t.startTime),r={date:Z(n),long_task:{duration:F(t.duration)},type:qe.LONG_TASK};e.notify(Wt,{rawRumEvent:r,startTime:n.relative})}}))}(n),ki(n,0,i);var c=si(n,0,t),d=c.addTiming,f=c.stop,l=Kr(n,r);return{addAction:jr(n,r).addAction,addTiming:d,parentContexts:a,addError:l.addError,stop:function(){f(),s.stop()}}}(e.applicationId,location,n,r,i,t),a=o.parentContexts;Ei(n,r),_r(n,r),Or(n);var s=function(e,t,n){return{get:function(r){var i=n.findView(r);if(t.isTracked()&&i&&i.session.id){const t=n.findAction(r);return{application:{id:e},session:{id:i.session.id},userAction:t?{id:t.userAction.id}:void 0,view:i.view}}}}}(e.applicationId,i,a);return{addAction:o.addAction,addError:o.addError,addTiming:o.addTiming,configuration:r,lifeCycle:n,parentContexts:a,session:i,getInternalContext:s.get}}));!function(e,t,n){var r=e[t];e[t]=n,r&&r.q&&u(r.q,(function(e){e()}))}(Dn(),"DATAFLUX_RUM",Ai)})();
|
|
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),s=(e.indexOf,Array.isArray),u=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 s in e)if(o.call(e,s)&&false===t.call(n,e[s],s,e))return!1};function c(e){return function(e){return u(r.call(arguments,1),(function(t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})),e}({},e)}var d=function(e){return u(r.call(arguments,1),(function(t){for(var n in t)void 0!==t[n]&&(e[n]=t[n])})),e},f=function(e){return u(r.call(arguments,1),(function(t){for(var n in t)void 0!==t[n]&&(y(t[n])&&y(e[n])?d(e[n],t[n]):e[n]=t[n])})),e},l=s||function(e){return"[object Array]"===i.call(e)},p=function(e){if(!e)return!1;try{return/^\s*\bfunction\b/.test(e)}catch(e){return!1}},v=function(e){return e?e.toArray?e.toArray():l(e)?r.call(e):(t=e)&&o.call(t,"callee")?r.call(e):h(e):[];var t},h=function(e){var t=[];return null===e||u(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},m=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},y=function(e){return null!==e&&"[object Object]"===i.call(e)},w=function(e){if(y(e)){for(var t in e)if(o.call(e,t))return!1;return!0}return!1},b=function(e){var t=[];return u(e,(function(e,n){t.push([n,e])})),t},_=function(e){return"[object String]"===i.call(e)},S=function(e){return"[object Boolean]"===i.call(e)},T=function(e){return"[object Number]"===i.call(e)&&/[\d\.]+/.test(String(e))},x=function e(t){var n=t;try{n=e(t)}catch(e){n=t}return n},E=(Date.now,function(e,t,n){var r,i,o,a,s=0;n||(n={});var u=function(){s=!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();s||!1!==n.leading||(s=c);var d=t-(c-s);return i=this,d<=0||d>t?(r&&(clearTimeout(r),r=null),s=c,a=e.apply(i,o),r||(i=o=null)):r||!1===n.trailing||(r=setTimeout(u,d)),a};return c.cancel=function(){clearTimeout(r),s=0,r=null},c}),O=function(e){function t(e){return e<10?"0"+e:e}return e.getFullYear()+"-"+t(e.getMonth()+1)+"-"+t(e.getDate())+" "+t(e.getHours())+":"+t(e.getMinutes())+":"+t(e.getSeconds())+"."+t(e.getMilliseconds())},C=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+/=",s=0,u=0,c="",d=[];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),s=null;a<128?n++:s=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!==s&&(n>t&&(o+=e.substring(t,n)),o+=s,t=n=i+1)}return n>t&&(o+=e.substring(t,e.length)),o}(e);do{t=(o=e.charCodeAt(s++)<<16|e.charCodeAt(s++)<<8|e.charCodeAt(s++))>>18&63,n=o>>12&63,r=o>>6&63,i=63&o,d[u++]=a.charAt(t)+a.charAt(n)+a.charAt(r)+a.charAt(i)}while(s<e.length);switch(c=d.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 k(e){var t="";return e&&(t=e.replace(/\/([^\/]*)\d([^\/]*)/g,"/?").replace(/\/$/g,"")),t||"/"}var R=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)},A=function(e){var t={},n=e.split("?")[1]||"";return n&&(t=B("?"+n)),t},B=function(e){for(var t=function(e){return x(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),s=r[i].substring(o+1);a=t(a),s=t(s),n[a]=s}}return n};function L(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]=L(i[o],t[o],n);return i}var a;i="object"==(null===(a=e)?"null":Array.isArray(a)?"array":typeof a)?e:{};for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(i[s]=L(i[s],t[s],n));return i}}function M(e){return L(void 0,e)}function $(e){return e?String(e).substr(0,1)+String(e).substr(1).replace(/\d*/g,"x"):e}function D(e,t,n){if(null==e)return JSON.stringify(e);var r=[!1,void 0];W(e)&&(r=[!0,e.toJSON],delete e.toJSON);var i,o,a=[!1,void 0];"object"==typeof e&&W(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 W(e){return"object"==typeof e&&null!==e&&e.hasOwnProperty("toJSON")}function P(){}var N,U=1e3,V=6e4;function j(e){return 0!==e&&100*Math.random()<=e}function H(e,t){return+e.toFixed(t)}function q(e){return"number"!=typeof e?e:H(1e6*e,0)}function F(e){return T(e)?H(1e6*e,0):e}function Q(){return J()}function z(e){return Math.floor(te()+e)}function J(){return performance.now()}function G(){return{relative:J(),timeStamp:X()}}function X(){return Date.now()}function K(e,t){return t-e}function Y(e){return e.relative}function Z(e){return z(e.relative)}function ee(e){return{relative:e,timeStamp:z(e)}}function te(){return void 0===N&&(N=performance.timing.navigationStart),N}function ne(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 re(e,t,n,r){return ie(e,[t],n,r)}function ie(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,u(t,(function(t){e.addEventListener(t,i,r)}));var o=function(){u(t,(function(t){e.removeEventListener(t,i,r)}))};return{stop:o}}function oe(e,t){return-1!==e.indexOf(t)}function ae(e){return T(e)&&e>=0&&e<=100}function se(e){if(e.origin)return e.origin;var t=e.host.replace(/(:80|:443)$/,"");return e.protocol+"//"+t}function ue(e){var t={};return u(e,(function(e,n){var r;t[(r=n,r.replace(/[A-Z]/g,(function(e,t){return(0!==t?"_":"")+e.toLowerCase()})).replace(/-/g,"_"))]=ce(e)})),t}function ce(e){return l(e)?m(e,(function(e){return ce(e)})):"object"==typeof e&&null!==e?ue(e):e}function de(e){if("object"==typeof e&&e)e=D(e);else if(!_(e))return e;return String(e).replace(/[\s=,"]/g,(function(e){return"\\"+e}))}function fe(e){return'"'+e.replace(/[\\]*"/g,'"').replace(/"/g,'\\"')+'"'}function le(e){return"object"==typeof e&&e?fe(D(e)):_(e)?fe(e):e}var pe=function(){this.buffer=[]};pe.prototype={add:function(e){this.buffer.push(e)>this.limit&&this.buffer.splice(0,1)},drain:function(e){u(this.buffer,(function(t){e(t)})),this.buffer.length=0}};var ve=pe,he={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","Windows 2000","Windows XP","Windows Vista","Windows 7","Windows 8","Windows 8.1","Windows Server 2003","Windows ME","Windows 10","Windows 98","Windows 95","Windows NT 4.0","Windows CE","Windows 3.11","Linux","Mac OS","Android","Ubuntu","FreeBSD","Debian","iOS","Windows Phone","BlackBerry","MeeGo","Symbian","Chrome OS","WebOS"],device:["Mobile","Tablet","iPad"]}},ge={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,"IE 11":e.indexOf("Trident")>-1&&e.indexOf("rv:11.0")>-1,"IE 10":e.indexOf("MSIE 10.0")>-1&&e.indexOf("Trident")>-1,"IE 9":e.indexOf("MSIE 9.0")>-1&&e.indexOf("Trident")>-1,"IE 8":e.indexOf("MSIE 9.0")>-1&&e.indexOf("Trident")>-1,"IE 7":e.indexOf("MSIE 7.0")>-1&&e.indexOf("Trident")>-1,Edge:e.indexOf("Edg")>-1||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||e.indexOf("LieBaoFast")>-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,WechatWork:e.indexOf("wxwork/")>-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,"Windows 2000":e.indexOf("Windows NT 5.0")>-1||e.indexOf("Windows 2000")>-1,"Windows XP":e.indexOf("Windows NT 5.1")>-1||e.indexOf("Windows XP")>-1,"Windows Server 2003":e.indexOf("Windows NT 5.2")>-1,"Windows Vista":e.indexOf("Windows NT 6.0")>-1,"Windows 7":e.indexOf("Windows 7")>-1||e.indexOf("Windows NT 6.1")>-1,"Windows 8":e.indexOf("Windows 8")>-1||e.indexOf("Windows NT 6.2")>-1,"Windows 8.1":e.indexOf("Windows 8.1")>-1||e.indexOf("Windows NT 6.3")>-1,"Windows ME":e.indexOf("Win 9x 4.90")>-1||e.indexOf("Windows ME")>-1,"Windows 10":e.indexOf("Windows 10.0")>-1||e.indexOf("Windows NT 10.0")>-1,"Windows 98":e.indexOf("Windows 98")>-1||e.indexOf("Win98")>-1,"Windows 95":e.indexOf("Windows 95")>-1||e.indexOf("Win95")>-1||e.indexOf("Windows_95")>-1,"Windows NT 4.0":e.indexOf("Windows NT 4.0")>-1||e.indexOf("WinNT4.0")>-1||e.indexOf("WinNT")>-1,"Windows CE":e.indexOf("Windows CE")>-1,"Windows 3.11":e.indexOf("Win16")>-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=he.navigator.userAgent||{},n=ge.getMatchMap(t);for(var r in he.infoMap)for(var i=0;i<he.infoMap[r].length;i++){var o=he.infoMap[r][i];n[o]&&(e[r]=o)}},getOS:function(){return ge.matchInfoMap(this),this.os||"Unknown"},getOSVersion:function(){var e=this,t=he.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",ge.matchInfoMap(e),e.device},getNetwork:function(){return navigator&&navigator.connection&&navigator.connection.effectiveType},getLanguage:function(){var e;return this.language=((e=(he.navigator.browserLanguage||he.navigator.language).split("-"))[1]&&(e[1]=e[1].toUpperCase()),e.join("_")),this.language},getBrowserInfo:function(){var e=this;ge.matchInfoMap(e);var t=he.navigator.userAgent||{},n=function(e,t){var n=he.navigator.mimeTypes;for(var r in n)if(n[r][e]==t)return!0;return!1},r=ge.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")||he.navigator&&void 0===he.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){}))}},me={os:ge.getOS(),osVersion:ge.getOSVersion().version,osVersionMajor:ge.getOSVersion().osMajor,browser:ge.getBrowserInfo().browser,browserVersion:ge.getBrowserInfo().browserVersion,browserVersionMajor:ge.getBrowserInfo().browserMajor,screenSize:window.screen.width+"*"+window.screen.height,networkType:ge.getNetwork(),divice:ge.getDeviceType()},ye="beforeunload",we="click",be="keydown",_e="load",Se="popstate",Te="scroll",xe="touchstart",Ee="visibilitychange",Oe="DOMContentLoaded",Ce="pointerdown",Ie="pointerup",ke="pointercancel",Re="hashchange",Ae="pagehide",Be="mousedown",Le="document",Me="xhr",$e="beacon",De="fetch",We="css",Pe="js",Ne="image",Ue="font",Ve="media",je="other",He="click",qe="custom",Fe={ACTION:"action",ERROR:"error",LONG_TASK:"long_task",VIEW:"view",RESOURCE:"resource",LOGGER:"logger"},Qe={FETCH:De,XHR:Me},ze={DDTRACE:"ddtrace",ZIPKIN_MULTI_HEADER:"zipkin",ZIPKIN_SINGLE_HEADER:"zipkin_single_header",W3C_TRACEPARENT:"w3c_traceparent",SKYWALKING_V3:"skywalking_v3",JAEGER:"jaeger"},Je="handled",Ge="unhandled",Xe=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/;function Ke(e){if(Ze){if(Ye===e)return;ut()}var t=dt(e);throw Ze=t,Ye=e,setTimeout((function(){Ye===e&&ut()}),t.incomplete?2e3:0),e}var Ye,Ze,et,tt,nt,rt=[];function it(e){!function(){if(tt)return;et=window.onerror,window.onerror=at,tt=!0}(),function(){if(nt)return;null!==window.onunhandledrejection?window.onunhandledrejection:void 0,window.onunhandledrejection=st,nt=!0}(),rt.push(e)}function ot(e,t,n){var r;if(u(rt,(function(i){try{i(e,t,n)}catch(e){r=e}})),r)throw r}function at(e,t,n,r,i){if(Ze)lt(Ze,t,n),ut();else if(i)ot(dt(i),!0,i);else{var o,a={url:t,column:r,line:n},s=e;if("[object String]"==={}.toString.call(e)){var u=Xe.exec(s);u&&(o=u[1],s=u[2])}ot({name:o,message:"string"==typeof s?s:void 0,stack:[a]},!0,e)}return!!et&&et.apply(this,arguments)}function st(e){var t=e.reason||"Empty reason";ot(dt(t),!0,t)}function ut(){var e=Ze,t=Ye;Ze=void 0,Ye=void 0,ot(e,!1,t)}var ct="?";function dt(e,t){var n,r=void 0===t?0:+t;try{if(n=function(e){var t=vt(e,"stacktrace");if(!t)return;for(var n,r=/ line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i,i=/ line (\d+), column (\d+)\s*(?:in (?:<anonymous function: ([^>]+)>|([^\)]+))\((.*)\))? in (.*):\s*$/i,o=t.split("\n"),a=[],s=0;s<o.length;s+=2){var u;r.exec(o[s])?u={args:[],column:void 0,func:(n=r.exec(o[s]))[3],line:+n[1],url:n[2]}:i.exec(o[s])&&(u={args:(n=i.exec(o[s]))[5]?n[5].split(","):[],column:+n[2],func:n[3]||n[4],line:+n[1],url:n[6]}),u&&(!u.func&&u.line&&(u.func=ct),u.context=[o[s+1]],a.push(u))}if(!a.length)return;return{stack:a,message:vt(e,"message"),name:vt(e,"name")}}(e),n)return n}catch(e){if(ft)throw e}try{if(n=function(e){var t=vt(e,"stack");if(!t)return;for(var n,r,i,o,a=/^\s*at (.*?) ?\(((?:file|https?|blob|chrome-extension|native|eval|webpack|<anonymous>|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,s=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|capacitor|\[native).*?|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i,u=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,c=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,d=/\((\S*)(?::(\d+))(?::(\d+))\)/,f=t.split("\n"),l=[],p=0,v=f.length;p<v;p+=1){if(a.exec(f[p])){var h=(i=a.exec(f[p]))[2]&&0===i[2].indexOf("native");n=i[2]&&0===i[2].indexOf("eval"),r=d.exec(i[2]),n&&r&&(i[2]=r[1],i[3]=r[2],i[4]=r[3]),o={args:h?[i[2]]:[],column:i[4]?+i[4]:void 0,func:i[1]||ct,line:i[3]?+i[3]:void 0,url:h?void 0:i[2]}}else if(u.exec(f[p]))o={args:[],column:(i=u.exec(f[p]))[4]?+i[4]:void 0,func:i[1]||ct,line:+i[3],url:i[2]};else{if(!s.exec(f[p]))continue;n=(i=s.exec(f[p]))[3]&&i[3].indexOf(" > eval")>-1,r=c.exec(i[3]),n&&r?(i[3]=r[1],i[4]=r[2],i[5]=void 0):0!==p||i[5]||gt(e.columnNumber)||(l[0].column=e.columnNumber+1),o={args:i[2]?i[2].split(","):[],column:i[5]?+i[5]:void 0,func:i[1]||ct,line:i[4]?+i[4]:void 0,url:i[3]}}!o.func&&o.line&&(o.func=ct),l.push(o)}if(!l.length)return;return{stack:l,message:vt(e,"message"),name:vt(e,"name")}}(e),n)return n}catch(e){if(ft)throw e}try{if(n=function(e){var t=vt(e,"message");if(!t)return;var n=t.split("\n");if(n.length<4)return;var r,i=/^\s*Line (\d+) of linked script ((?:file|https?|blob)\S+)(?:: in function (\S+))?\s*$/i,o=/^\s*Line (\d+) of inline#(\d+) script in ((?:file|https?|blob)\S+)(?:: in function (\S+))?\s*$/i,a=/^\s*Line (\d+) of function script\s*$/i,s=[],u=window&&window.document&&window.document.getElementsByTagName("script"),c=[];for(var d in u)ht(u,d)&&!u[d].src&&c.push(u[d]);for(var f=2;f<n.length;f+=2){var l;if(i.exec(n[f]))l={args:[],column:void 0,func:(r=i.exec(n[f]))[3],line:+r[1],url:r[2]};else if(o.exec(n[f]))l={args:[],column:void 0,func:(r=o.exec(n[f]))[4],line:+r[1],url:r[3]};else if(a.exec(n[f])){r=a.exec(n[f]),l={url:window.location.href.replace(/#.*$/,""),args:[],column:void 0,func:"",line:+r[1]}}l&&(l.func||(l.func=ct),l.context=[n[f+1]],s.push(l))}if(!s.length)return;return{stack:s,message:n[0],name:vt(e,"name")}}(e),n)return n}catch(e){if(ft)throw e}try{if(n=pt(e,r+1))return n}catch(e){if(ft)throw e}return{message:vt(e,"message"),name:vt(e,"name"),stack:[]}}var ft=!1;function lt(e,t,n){var r={url:t,line:n?+n:void 0};if(r.url&&r.line){e.incomplete=!1;var i=e.stack;if(i.length>0&&i[0].url===r.url){if(i[0].line===r.line)return!1;if(!i[0].line&&i[0].func===r.func)return i[0].line=r.line,i[0].context=r.context,!1}return i.unshift(r),e.partial=!0,!0}return e.incomplete=!0,!1}function pt(e,t){for(var n,r,i=/function\s+([_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*)?\s*\(/i,o=[],a={},s=!1,u=pt.caller;u&&!s;u=u.caller)u!==dt&&u!==Ke&&(r={args:[],column:void 0,func:ct,line:void 0,url:void 0},n=i.exec(u.toString()),u.name?r.func=u.name:n&&(r.func=n[1]),void 0===r.func&&(r.func=n?n.input.substring(0,n.input.indexOf("{")):void 0),a[u.toString()]?s=!0:a[u.toString()]=!0,o.push(r));t&&o.splice(0,t);var c={stack:o,message:vt(e,"message"),name:vt(e,"name")};return lt(c,vt(e,"sourceURL")||vt(e,"fileName"),vt(e,"line")||vt(e,"lineNumber")),c}function vt(e,t){if("object"==typeof e&&e&&t in e){var n=e[t];return"string"==typeof n?n:void 0}}function ht(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function gt(e){return void 0===e}var mt="agent",yt="console",wt="network",bt="source",_t="custom";function St(e,t,n,r){return e&&(void 0!==e.message||t instanceof Error)?{message:e.message||"Empty message",stack:xt(e),handlingStack:r,type:e.name}:{message:n+""+JSON.stringify(t),stack:"No stack, consider using an instance of Error",handlingStack:r,type:e&&e.name}}function Tt(){var e=new Error;if(!e.stack)try{throw e}catch(e){}var t=dt(e);return t.stack=t.stack.slice(2),xt(t)}function xt(e){var t=e.name||"Error: "+e.message;return u(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}var Et=function(){this._events=[],this.pendingEvents=[]};Et.prototype={emit:function(e){var t=[].slice.call(arguments,1);u(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 Et;var Ot="PERFORMANCE_ENTRY_COLLECTED",Ct="AUTO_ACTION_CREATED",It="AUTO_ACTION_COMPLETED",kt="AUTO_ACTION_DISCARDED",Rt="VIEW_CREATED",At="VIEW_UPDATED",Bt="VIEW_ENDED",Lt="SESSION_RENEWED",Mt="DOM_MUTATED",$t="BEFORE_UNLOAD",Dt="REQUEST_STARTED",Wt="REQUEST_COMPLETED",Pt="RAW_RUM_EVENT_COLLECTED",Nt="RUM_EVENT_COLLECTED",Ut="RAW_ERROR_COLLECTED",Vt="RECORD_STARTED",jt="RECORD_STOPPED";function Ht(){this.callbacks=[]}function qt(e,t,n){var r=f({},e),i=n(r);return u(t,(function(t){var n=Ft(e,t),i=Ft(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(!Qt(r,a))return;o!==i.length-1?r=r[a]:r[a]=n}}(e,t,i)})),i}function Ft(e,t){var n=e;for(var r of t.split(".")){if(!Qt(n,r))return;n=n[r]}return n}function Qt(e,t){return"object"==typeof e&&null!==e&&t in e}Ht.prototype={notify:function(e,t){var n=this.callbacks[e];n&&u(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 zt=function(){this.observers=[]};zt.prototype={subscribe:function(e){this.observers.push(e)},notify:function(e){u(this.observers,(function(t){t(e)}))}};var Jt,Gt=zt;function Xt(e){return Yt(e,se(window.location)).href}function Kt(e){return se(Yt(e))}function Yt(e,t){if(function(){if(void 0!==Jt)return Jt;try{var e=new URL("http://test/path");return Jt="http://test/path"===e.href}catch(e){Jt=!1}return Jt}())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}var Zt=navigator.userAgent.toLowerCase(),en=function(){return/iphone os/.test(Zt)};(nn=function(){this.bridge=window.FTWebViewJavascriptBridge,this.tagMaps={},window.mapWebViewCallBack={};try{this.initBridge()}catch(e){}}).prototype={initBridge:function(){var e=this;if(en()&&!e.bridge){if(window.WVJBCallbacks)return void window.WVJBCallbacks.push((function(t){e.bridge=t}));window.WVJBCallbacks=[function(t){e.bridge=t}];var t=document.createElement("iframe");t.style.display="none",t.src="wvjbscheme://__BRIDGE_LOADED__",document.documentElement.appendChild(t),setTimeout((function(){document.documentElement.removeChild(t)}),0)}},sendEvent:function(e,t){void 0===e&&(e={});var n=this,r="Unique id:"+(new Date).getTime();if(e.name){n.tagMaps[e.name]=r,window.mapWebViewCallBack[r]=function(e,t){return Promise.resolve(e,t)},e._tag=r;try{en()?n.bridge.callHandler("sendEvent",JSON.stringify(e),"mapWebViewCallBack"):n.bridge.sendEvent(JSON.stringify(e),"mapWebViewCallBack")}catch(e){}}else t({error:"请传入发送事件的名称!!"})},addEventListener:function(e,t){var n="Unique id:"+(new Date).getTime(),r=this;if(e.name){r.tagMaps[e.name]=n,window.mapWebViewCallBack[n]=function(e,n){t(e,n)},e._tag=n;try{en()?r.bridge.callHandler("addEventListener",JSON.stringify(e),"mapWebViewCallBack"):r.bridge.addEventListener(JSON.stringify(e),"mapWebViewCallBack")}catch(e){}}else t({error:"请传入监听事件的名称!!"})}};var tn,nn=nn;function rn(e,t){var n,r,i=!1,o=function(){i=!0,window.clearTimeout(n),n=window.setTimeout((function(){i=!1}),1e3)};return{get:function(){return i||(r=an(e),o()),r},set:function(n,i){on(e,n,i,t),r=n,o()},clearCache:function(){window.clearTimeout(n),i=!1}}}function on(e,t,n,r){var i=new Date;i.setTime(i.getTime()+n);var o="expires="+i.toUTCString(),a=r&&r.crossSite?"none":"strict",s=r&&r.domain?";domain="+r.domain:"",u=r&&r.secure?";secure":"";document.cookie=e+"="+t+";"+o+";path=/;samesite="+a+s+u}function an(e){return function(e,t){var n=e.match("(?:^|;)\\s*"+t+"\\s*=\\s*([^;]+)");return n?n[1]:void 0}(document.cookie,e)}var sn=/^\s+|\s+$/g,un={resourceSampleRate:100,sampleRate:100,flushTimeout:3e4,maxErrorsByMinute:3e3,maxBatchSize:50,maxMessageSize:262144,requestErrorResponseLengthLimit:32768,batchBytesLimit:16384,datakitUrl:"",logsEndpoint:"",traceType:ze.DDTRACE,traceId128Bit:!1,trackInteractions:!1,allowedDDTracingOrigins:[],allowedTracingOrigins:[],isServiceSampling:!1,isJsBirdge:!1,isLineProtocolToJson:!1,beforeSend:function(e){},isServerError:function(e){return!1}};function cn(e){return e.replace(sn,"")}function dn(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===tn){for(var e="dd_site_test_".concat(I()),t=window.location.hostname.split("."),n=t.pop();t.length&&!an(e);)n=t.pop()+"."+n,on(e,"test",U,{domain:n});tn=n}return tn}()),t}function fn(e){return e.lastIndexOf("/")===e.length-1?cn(e)+"v1/write/logging":cn(e)+"/v1/write/logging"}function ln(e,t){var n,r,i=l(e.enableExperimentalFeatures)?e.enableExperimentalFeatures:[],o={applicationId:e.applicationId,env:e.env||"",version:e.version||"",service:e.service||"browser",sdkVersion:t.sdkVersion,sdkName:t.sdkName,datakitUrl:(n=e.datakitUrl||e.datakitOrigin,n.lastIndexOf("/")===n.length-1?cn(n)+"v1/write/rum":cn(n)+"/v1/write/rum"),logsEndpoint:fn(e.datakitOrigin),isEnabled:function(e){return oe(i,e)},cookieOptions:dn(e)};return"isJsBirdge"in e&&(o.isJsBirdge=e.isJsBirdge),"isLineProtocolToJson"in e&&(o.isLineProtocolToJson=e.isLineProtocolToJson),"allowedDDTracingOrigins"in e&&(o.allowedTracingOrigins=e.allowedDDTracingOrigins),"allowedTracingOrigins"in e&&(o.allowedTracingOrigins=e.allowedTracingOrigins),"sampleRate"in e&&(o.sampleRate=e.sampleRate),"resourceSampleRate"in e&&(o.resourceSampleRate=e.resourceSampleRate),"trackInteractions"in e&&(o.trackInteractions=!!e.trackInteractions),"isServerError"in e&&p(e.isServerError)&&S(e.isServerError())&&(o.isServerError=e.isServerError),"traceId128Bit"in e&&(o.traceId128Bit=!!e.traceId128Bit),"traceType"in e&&((r=e.traceType)&&h(ze).indexOf(r)>-1)&&(o.traceType=e.traceType),"isServiceSampling"in e&&S(e.isServiceSampling)&&(o.isServiceSampling=e.isServiceSampling),f({},un,o)}function pn(e,t){var n=[t.datakitUrl];t.logsEndpoint&&n.push(t.logsEndpoint);var r=!1;for(var i of n)if(0===e.indexOf(i)){r=!0;break}return r}var vn,hn,gn,mn,yn,wn,bn={sdk_name:"_dd.sdk_name",sdk_version:"_dd.sdk_version",app_id:"application.id",env:"_dd.env",service:"_dd.service",version:"_dd.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"},_n={view:{type:Fe.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:Fe.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:Fe.ERROR,tags:{trace_id:"_dd.trace_id",span_id:"_dd.span_id",error_source:"error.source",error_type:"error.type",error_handling:"error.handling",resource_url:"error.resource.url",resource_url_host:"error.resource.url_host",resource_url_path:"error.resource.url_path",resource_url_path_group:"error.resource.url_path_group",resource_status:"error.resource.status",resource_status_group:"error.resource.status_group",resource_method:"error.resource.method"},fields:{error_message:["string","error.message"],error_stack:["string","error.stack"]}},long_task:{type:Fe.LONG_TASK,tags:{},fields:{duration:"long_task.duration"}},action:{type:Fe.ACTION,tags:{action_id:"action.id",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_long_task_count:"action.long_task.count"}},browser_log:{type:Fe.LOGGER,tags:{error_source:"error.source",error_type:"error.type",error_resource_url:"resource.url",error_resource_url_host:"resource.url_host",error_resource_url_path:"resource.url_path",error_resource_url_path_group:"resource.url_path_group",error_resource_status:"resource.status",error_resource_status_group:"resource.status_group",error_resource_method:"resource.method",action_id:"user_action.id",service:"service",status:"status"},fields:{message:["string","message"]}}},Sn=[],Tn=[];function xn(){return vn||(hn=XMLHttpRequest.prototype.open,gn=XMLHttpRequest.prototype.send,mn=XMLHttpRequest.prototype.abort,XMLHttpRequest.prototype.open=function(e,t){return this._dataflux_xhr={method:e,startTime:-1,url:Xt(t)},hn.apply(this,arguments)},XMLHttpRequest.prototype.send=function(e){var t=this;if(this._dataflux_xhr){var n=this._dataflux_xhr;n.startTime=J(),n.startClocks=G(),n.isAborted=!1;var r=this.onreadystatechange;this.onreadystatechange=function(){this.readyState===XMLHttpRequest.DONE&&o(),r&&r.apply(this,arguments)};var i=!1,o=function e(){if(t.removeEventListener("loadend",e),!i){i=!0;var r=d({},n,{duration:K(n.startClocks.relative,J()),response:t.response,status:t.status});u(Tn,(function(e){e(r,t)}))}};t.addEventListener("loadend",o),u(Sn,(function(e){e(n,t)}))}return gn.apply(t,arguments)},XMLHttpRequest.prototype.abort=function(){return this._dataflux_xhr&&(this._dataflux_xhr.isAborted=!0),mn.apply(this,arguments)},vn={beforeSend:function(e){Sn.push(e)},onRequestComplete:function(e){Tn.push(e)}}),vn}function En(e,t,n,r,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,i)}var On,Cn,In=[],kn=[];function Rn(){return yn||(!function(){if(!window.fetch)return;wn=window.fetch,window.fetch=function(e,t){var n,r=An.apply(null,[e,t]);return r?(n=wn.call(this,r.input,r.init),Bn.apply(null,[n,r])):n=wn.call(this,e,t),n}}(),yn={beforeSend:function(e){In.push(e)},onRequestComplete:function(e){kn.push(e)}}),yn}function An(e,t){var n=t&&t.method||"object"==typeof e&&e.method||"GET",r=Xt("object"==typeof e&&e.url||e),i=G(),o={init:t,input:e,method:n,startTime:J(),startClocks:i,url:r};return u(In,(function(e){e(o)})),o}function Bn(e,t){var n=function(){var e,n=(e=function*(e){if(t.duration=K(t.startClocks.relative,J()),"stack"in e||e instanceof Error)t.status=0,t.response=xt(dt(e)),t.headers=e.headers,t.isAborted=e instanceof DOMException&&e.code===DOMException.ABORT_ERR,u(kn,(function(e){e(t)}));else if("status"in e){var n;try{n=yield e.clone().text()}catch(e){n="Unable to retrieve response: "+e}t.response=n,t.responseType=e.type,t.status=e.status,t.headers=e.headers,t.isAborted=!1,u(kn,(function(e){e(t)}))}},function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){En(o,r,i,a,s,"next",e)}function s(e){En(o,r,i,a,s,"throw",e)}a(void 0)}))});return function(e){return n.apply(this,arguments)}}();e.then(n,n)}function Ln(e){return On||(function(e,t){function n(n,r){pn(r.url,e)||r.isAborted||!(function(e){return 0===e.status&&"opaque"!==e.responseType}(r)||function(e){return e.status>=500}(r)||e.isServerError(r))||t.notify({message:Dn(n)+" error "+r.method+" "+r.url,resource:{method:r.method,statusCode:r.status,url:r.url,traceId:r.traceId,spanId:r.spanId},source:wt,stack:$n(r.response,e)||"Failed to load",startClocks:r.startClocks})}xn().onRequestComplete((function(e){n(Qe.XHR,e)})),Rn().onRequestComplete((function(e){n(Qe.FETCH,e)}))}(e,On=new Gt),function(e){Cn=console.error,console.error=function(){Cn.apply(console,arguments);var t=Tt();e.notify(d({},Mn(v(arguments),t),{source:yt,startClocks:G(),handling:Je}))}}(On),function(e){it((function(t,n,r){var i=St(t,r,"Uncaught");e.notify({message:i.message,stack:i.stack,type:i.type,source:bt,startClocks:G(),handling:Ge})}))}(On)),On}function Mn(e,t){var n=function(e,t){for(var n=0;n<e.length;n+=1){var r=e[n];if(t(r,n,e))return r}}(e,(function(e){return e instanceof Error}));return{message:m(["console error:"].concat(e),(function(e){return function(e){if("string"==typeof e)return e;if(e instanceof Error)return((t=dt(e)).name||"Error")+": "+t.message;var t;return D(e,0,2)}(e)})).join(" "),stack:n?xt(dt(n)):void 0,handlingStack:t}}function $n(e,t){return e&&e.length>t.requestErrorResponseLengthLimit?e.substring(0,t.requestErrorResponseLengthLimit)+"...":e}function Dn(e){return Qe.XHR===e?"XHR":"Fetch"}function Wn(){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}function Pn(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 on(t,n,U,e),an(t)===n}catch(e){return!1}}(e)}function Nn(){return"file:"!==window.location.protocol}var Un=9e5,Vn=144e5;function jn(e,t,n){var r=function(e){var t=rn("_dataflulx_an_id",e);return t.get()||t.set(I(),5184e6),t}(e),i=rn("_dataflux_s",e),o=new Gt,a=Fn(i).id,s=E((function(){i.clearCache();var e=Fn(i),r=n(e[t]);e[t]=r.trackingType,r.isTracked&&!e.id&&(e.id=I(),e.created=String(Date.now())),Qn(e,i),r.isTracked&&a!==e.id&&(a=e.id,o.notify())}),1e3);return s(),function(e){var t=ie(window,[we,xe,be,Te],e,{capture:!0,passive:!0});Jn.push(t.stop)}(s),function(e){var t=function(){"visible"===document.visibilityState&&e()},n=re(document,Ee,t);Jn.push(n.stop);var r=window.setInterval(t,6e4);Jn.push((function(){clearInterval(r)}))}((function(){i.clearCache(),Qn(Fn(i),i)})),{getAnonymousID:function(){return r.get()},getId:function(){var e=Fn(i);return e.did||e.id},getTrackingType:function(){return Fn(i)[t]},getDebugSession:function(){var e=Fn(i);return w(e)||!e.did?{}:{id:e.did,created:e.dcreated}},addDebugSession:function(e,t){var n=Fn(i);w(n)||(n.did=e||I,n.dcreated=t||String(Date.now()),Qn(n,i))},clearDebugSession:function(){var e=Fn(i),t={};u(b(e),(function(e){"did"!==e[0]&&"dcreated"!==e[0]&&(t[e[0]]=e[1])})),Qn(t,i)},renewObservable:o}}var Hn=/^([a-z]+)=([a-z0-9-]+)$/,qn="&";function Fn(e){var t=function(e){var t=e.get(),n={};(function(e){return void 0!==e&&(-1!==e.indexOf("&")||Hn.test(e))})(t)&&u(t.split(qn),(function(e){var t=Hn.exec(e);if(null!==t){var r=t[1],i=t[2];n[r]=i}}));return n}(e);return function(e){return(void 0===e.created||Date.now()-Number(e.created)<Vn)&&(void 0===e.expire||Date.now()<Number(e.expire))}(t)?t:(zn(e),{})}function Qn(e,t){if(w(e))zn(t);else{e.expire=String(Date.now()+Un);var n=[];u(b(e),(function(e){n.push(e[0]+"="+e[1])}));var r=n.join(qn);t.set(r,Un)}}function zn(e){e.set("",0)}var Jn=[];var Gn=/[^\u0000-\u007F]/,Xn="custom_keys";var Kn=Wn(),Yn=function(e,t,n){this.endpointUrl=e,this.bytesLimit=t,this.isLineProtocolToJson=n;var r="[object Navigator]"===Object.prototype.toString.call(Kn&&Kn.navigator)&&"function"==typeof Kn.navigator.sendBeacon;this.sendBeacon=r?Kn.navigator.sendBeacon.bind(Kn.navigator):void 0};Yn.prototype={send:function(e,t){var n=function(e){return e?e+(-1===e.indexOf("?")?"?":"&")+"precision=ms":e}(this.endpointUrl);if(this.sendBeacon&&t<this.bytesLimit&&!this.isLineProtocolToJson){if(this.sendBeacon(n,e))return}else if(this.sendBeacon&&t<this.bytesLimit&&this.isLineProtocolToJson){var r=new Blob([JSON.stringify(e)],{type:"application/json"});if(this.sendBeacon(n,r))return}var i=new XMLHttpRequest;i.open("POST",n,!0),i.withCredentials=!0,this.isLineProtocolToJson?(i.setRequestHeader("Content-type","application/json"),i.send(JSON.stringify(e))):(i.setRequestHeader("Content-type","text/plain;charset=UTF-8"),i.send(e))}};var Zn=Yn,er=function(e){if(!e||!e.type)return{rowStr:"",rowData:void 0};var t={tags:{},fields:{}},n=!1,r="";return u(_n,(function(i,o){if(i.type===e.type){r+=o+",",t.measurement=o;var a=[],s=d({},bn,i.tags),c=["date","type",Xn];u(s,(function(n,r){var i=ne(e,n);c.push(r),(i||T(i))&&(t.tags[r]=function(e){return _(e)?e:D(e)}(i),a.push(de(r)+"="+de(i)))}));var f=[];if(u(i.fields,(function(n,r){if(l(n)&&2===n.length){n[0];var i=n[1],o=ne(e,i);c.push(r),(o||T(o))&&(t.fields[r]=o,f.push(de(r)+"="+le(o)))}else if(_(n)){o=ne(e,n);c.push(r),(o||T(o))&&(t.fields[r]=o,f.push(de(r)+"="+le(o)))}})),e.tags&&y(e.tags)&&!w(e.tags)){var p=[];u(e.tags,(function(e,n){c.indexOf(n)>-1||(c.push(n),(e||T(e))&&(p.push(n),t.fields[n]=e,f.push(de(n)+"="+le(e))))})),p.length&&(t.fields.custom_keys=le(p),f.push(de(Xn)+"="+le(p)))}e.type===Fe.LOGGER&&u(e,(function(e,n){-1===c.indexOf(n)&&(T(e)||_(e)||S(e))&&(t.fields[n]=e,f.push(de(n)+"="+le(e)))})),a.length&&(r+=a.join(",")),f.length&&(r+=" ",r+=f.join(","),n=!0),r=r+" "+e.date,t.time=F(e.date)}})),{rowStr:n?r:"",rowData:n?t:void 0}},tr=function(e,t,n,r,i,o,a){this.request=e,this.maxSize=t,this.bytesLimit=n,this.maxMessageSize=r,this.flushTimeout=i,this.isLineProtocolToJson=o,this.beforeUnloadCallback=a,this.pushOnlyBuffer=[],this.upsertBuffer={},this.bufferBytesSize=0,this.bufferMessageCount=0,this.flushOnVisibilityHidden(),this.flushPeriodically()};tr.prototype={add:function(e){this.addOrUpdate(e)},upsert:function(e,t){this.addOrUpdate(e,t)},flush:function(){if(0!==this.bufferMessageCount){var e=this.pushOnlyBuffer.concat(h(this.upsertBuffer));if(0===e.length)return;this.isLineProtocolToJson?this.request.send(m(e,(function(e){return JSON.parse(e)})),this.bufferBytesSize):this.request.send(e.join("\n"),this.bufferBytesSize),this.pushOnlyBuffer=[],this.upsertBuffer={},this.bufferBytesSize=0,this.bufferMessageCount=0}},processSendData:function(e){return this.isLineProtocolToJson?JSON.stringify(er(e).rowData):er(e).rowStr},sizeInBytes:function(e){return Gn.test(e)?void 0!==window.TextEncoder?(new TextEncoder).encode(e).length:new Blob([e]).size:e.length},addOrUpdate:function(e,t){var n=this.process(e);n.processedMessage&&""!==n.processedMessage&&(n.messageBytesSize>=this.maxMessageSize||(this.hasMessageFor(t)&&this.remove(t),this.willReachedBytesLimitWith(n.messageBytesSize)&&this.flush(),this.push(n.processedMessage,n.messageBytesSize,t),this.isFull()&&this.flush()))},process:function(e){var t="";return{processedMessage:t=this.processSendData(e),messageBytesSize:this.sizeInBytes(t)}},push:function(e,t,n){this.bufferMessageCount>0&&(this.bufferBytesSize+=1),void 0!==n?this.upsertBuffer[n]=e:this.pushOnlyBuffer.push(e),this.bufferBytesSize+=t,this.bufferMessageCount+=1},remove:function(e){var t=this.upsertBuffer[e];delete this.upsertBuffer[e];var n=this.sizeInBytes(t);this.bufferBytesSize-=n,this.bufferMessageCount-=1,this.bufferMessageCount>0&&(this.bufferBytesSize-=1)},hasMessageFor:function(e){return void 0!==e&&void 0!==this.upsertBuffer[e]},willReachedBytesLimitWith:function(e){return this.bufferBytesSize+e+1>=this.bytesLimit},isFull:function(){return this.bufferMessageCount===this.maxSize||this.bufferBytesSize>=this.bytesLimit},flushPeriodically:function(){var e=this;setTimeout((function(){e.flush(),e.flushPeriodically()}),e.flushTimeout)},flushOnVisibilityHidden:function(){var e=this;Kn.navigator.sendBeacon&&(re(window,ye,e.beforeUnloadCallback),re(document,Ee,(function(){"hidden"===document.visibilityState&&e.flush()})),re(window,ye,(function(){e.flush()})))}};var nr=tr,rr="0",ir="1",or="2",ar="3";function sr(e,t){var n=jn(e.cookieOptions,"rum",(function(t){return function(e,t){var n;n=function(e){return e===rr||e===ir||e===or||e===ar}(t)?t:j(e.sampleRate)?j(e.resourceSampleRate)?ir:e.isServiceSampling?ar:or:e.isServiceSampling?ar:rr;return{trackingType:n,isTracked:ur(n)}}(e,t)}));return n.renewObservable.subscribe((function(){t.notify(Lt)})),{getId:n.getId,getAnonymousID:n.getAnonymousID,getDebugSession:n.getDebugSession,addDebugSession:n.addDebugSession,clearDebugSession:n.clearDebugSession,isTracked:function(){return void 0!==n.getId()&&ur(n.getTrackingType())},isTrackedWidthService:function(){return void 0!==n.getId()&&n.getTrackingType()===ar},isTrackedWithResource:function(){var e=n.getTrackingType();return void 0!==n.getId()&&(e===ir||e===ar)}}}function ur(e){return e===ir||e===or||e===ar}var cr={sdkVersion:"2.1.2",sdkName:"df_web_rum_sdk"},dr="initial_document",fr=[[Le,function(e){return dr===e}],[Me,function(e){return"xmlhttprequest"===e}],[De,function(e){return"fetch"===e}],[$e,function(e){return"beacon"===e}],[We,function(e,t){return null!==t.match(/\.css$/i)}],[Pe,function(e,t){return null!==t.match(/\.js$/i)}],[Ne,function(e,t){return oe(["image","img","icon"],e)||null!==t.match(/\.(gif|jpg|jpeg|tiff|png|svg|ico)$/i)}],[Ue,function(e,t){return null!==t.match(/\.(woff|eot|woff2|ttf)$/i)}],[Ve,function(e,t){return oe(["audio","video"],e)||null!==t.match(/\.(mp3|mp4)$/i)}]];function lr(e){var t=e.name;if(!function(e){try{return!!Yt(e)}catch(e){return!1}}(t))return je;var n=function(e){var t=Yt(e).pathname;return"/"===t[0]?t:"/"+t}(t),r=je;return u(fr,(function(t){var i=t[0];if((0,t[1])(e.initiatorType,n))return r=i,!1})),r}function pr(){for(var e=v(arguments),t=1;t<e.length;t+=1)if(e[t-1]>e[t])return!1;return!0}function vr(e){var t=hr(e);if(t){var n=t.startTime,r=t.fetchStart,i=t.redirectStart,o=t.redirectEnd,a=t.domainLookupStart,s=t.domainLookupEnd,u=t.connectStart,c=t.secureConnectionStart,d=t.connectEnd,f=t.requestStart,l=t.responseStart,p=t.responseEnd,v={firstbyte:mr(n,a,l),trans:mr(n,l,p),ttfb:mr(n,f,l)};return d!==r&&(v.tcp=mr(n,u,d),pr(u,c,d)&&(v.ssl=mr(n,c,d))),s!==r&&(v.dns=mr(n,a,s)),gr(e)&&(v.redirect=mr(n,i,o)),v}}function hr(e){if(pr(e.startTime,e.fetchStart,e.domainLookupStart,e.domainLookupEnd,e.connectStart,e.connectEnd,e.requestStart,e.responseStart,e.responseEnd)){if(!gr(e))return e;var t=e.redirectStart,n=e.redirectEnd;if(t<e.startTime&&(t=e.startTime),n<e.startTime&&(n=e.fetchStart),pr(e.startTime,t,n,e.fetchStart))return d({},e,{redirectEnd:n,redirectStart:t})}}function gr(e){return e.fetchStart!==e.startTime}function mr(e,t,n){return q(n-t)}function yr(e){if(e.startTime<e.responseStart)return e.decodedBodySize}function wr(e,t){return t&&!pn(t,e)}function br(){return void 0!==window.performance&&"getEntries"in performance}function _r(e){return window.PerformanceObserver&&void 0!==PerformanceObserver.supportedEntryTypes&&oe(PerformanceObserver.supportedEntryTypes,e)}function Sr(e,t){var n;if(n=function(n){Or(e,t,n)},Tr("interactive",(function(){var e,t={entryType:"resource",initiatorType:dr,traceId:""};if(_r("navigation")&&performance.getEntriesByType("navigation").length>0){var r=performance.getEntriesByType("navigation")[0];e=d(r.toJSON(),t)}else{var i=xr();e=d(i,{decodedBodySize:0,duration:i.responseEnd,name:window.location.href,startTime:0},t)}n(e)})),br()&&Er(e,t,performance.getEntries()),window.PerformanceObserver){new PerformanceObserver((function(n){Er(e,t,n.getEntries())})).observe({entryTypes:["resource","navigation","longtask","paint","largest-contentful-paint","first-input","layout-shift"]}),br()&&"addEventListener"in performance&&performance.addEventListener("resourcetimingbufferfull",(function(){performance.clearResourceTimings()}))}_r("navigation")||function(e){function t(){e(d(xr(),{entryType:"navigation"}))}Tr("complete",(function(){setTimeout(t)}))}((function(n){Or(e,t,n)})),_r("first-input")||function(e){var t=Date.now(),n=!1,r=ie(window,[we,Be,be,xe,Ce],(function(e){if(e.cancelable){var t={entryType:"first-input",processingStart:performance.now(),startTime:e.timeStamp};e.type===Ce?i(t):o(t)}}),{passive:!0,capture:!0}).stop;function i(e){ie(window,[Ie,ke],(function(t){t.type===Ie&&o(e)}),{once:!0})}function o(i){if(!n){n=!0,r();var o=i.processingStart-i.startTime;o>=0&&o<Date.now()-t&&e(i)}}}((n=>{Or(e,t,n)}))}function Tr(e,t){document.readyState===e||"complete"===document.readyState?t():re(window,"complete"===e?_e:Oe,t,{once:!0})}function xr(){var e={},t=performance.timing;for(var n in t)T(t[n])&&(e[n]=0===t[n]?0:t[n]-te());return e}function Er(e,t,n){u(n,(function(n){"resource"!==n.entryType&&"navigation"!==n.entryType&&"paint"!==n.entryType&&"longtask"!==n.entryType&&"largest-contentful-paint"!==n.entryType&&"first-input"!==n.entryType&&"layout-shift"!==n.entryType||Or(e,t,n)}))}function Or(e,t,n){(function(e){return"navigation"===e.entryType&&e.loadEventEnd<=0})(n)||function(e,t){return"resource"===t.entryType&&!wr(e,t.name)}(t,n)||e.notify(Ot,n)}function Cr(e){var t,n=function(){var e,t=window;if(t.Zone){var n=t.Zone.__symbol__("MutationObserver");e=t[n]}return e||(e=t.MutationObserver),e}();return n&&(t=new n((function(){e.notify(Mt)}))).observe(document.documentElement,{attributes:!0,characterData:!0,childList:!0,subtree:!0}),{stop:function(){t&&t.disconnect()}}}function Ir(e,t){void 0===t&&(t=P);var n={errorCount:0,longTaskCount:0,resourceCount:0,userActionCount:0},r=e.subscribe(Pt,(function(e){switch(e.rawRumEvent.type){case Fe.ERROR:n.errorCount+=1,t(n);break;case Fe.ACTION:n.userActionCount+=1,t(n);break;case Fe.LONG_TASK:n.longTaskCount+=1,t(n);break;case Fe.RESOURCE:n.resourceCount+=1,t(n)}}));return{stop:function(){r.unsubscribe()},eventCounts:n}}function kr(e,t){var n=function(e){var t,n=new Gt,r=[],i=0;function o(){n.notify({isBusy:i>0})}return r.push(e.subscribe(Mt,(function(){o()}))),r.push(e.subscribe(Ot,(function(e){"resource"===e.entryType&&o()}))),r.push(e.subscribe(Dt,(function(e){void 0===t&&(t=e.requestIndex),i+=1,o()}))),r.push(e.subscribe(Wt,(function(e){void 0===t||e.requestIndex<t||(i-=1,o())}))),{observable:n,stop:function(){u(r,(function(e){e.unsubscribe()}))}}}(e),r=n.observable,i=n.stop,o=function(e,t,n){var r,i=!1,o=setTimeout((function(){u({hadActivity:!1})}),100),a=setTimeout((function(){u({hadActivity:!0,endTime:Q()})}),1e4);function s(){i=!0,clearTimeout(o),clearTimeout(r),clearTimeout(a),t()}function u(e){i||(s(),n(e))}return e.subscribe((function(e){var t=e.isBusy;clearTimeout(o),clearTimeout(r);var n=Q();t||(r=setTimeout((function(){u({hadActivity:!0,endTime:n})}),100))})),{stop:s}}(r,i,t),a=o.stop;return{stop:function(){a(),i()}}}function Rr(e){return function(e){var t;if(function(){void 0===Mr&&(Mr="closest"in HTMLElement.prototype);return Mr}())t=e.closest("[data-df-action-name]");else for(var n=e;n;){if(n.hasAttribute(Ar)){t=n;break}n=n.parentElement}if(!t)return;return Nr(Pr(t.getAttribute(Ar).trim()))}(e)||Wr(e,$r)||Wr(e,Dr)||""}var Ar="data-df-action-name";var Br,Lr,Mr,$r=[function(e){if(function(){void 0===Lr&&(Lr="labels"in HTMLInputElement.prototype);return Lr}()){if("labels"in e&&e.labels&&e.labels.length>0)return Ur(e.labels[0])}else if(e.id){var t=e.ownerDocument&&e.ownerDocument.querySelector('label[for="'+e.id.replace('"','\\"')+'"]');return t&&Ur(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){if("BUTTON"===e.nodeName||"LABEL"===e.nodeName||"button"===e.getAttribute("role"))return Ur(e)},function(e){return e.getAttribute("aria-label")},function(e){var t=e.getAttribute("aria-labelledby");if(t)return t=t.split(/\s+/),t=m(t,(function(t){return function(e,t){return e.ownerDocument?e.ownerDocument.getElementById(t):null}(e,t)})),t=g(t,(function(e){return Boolean(e)})),(t=m(t,(function(e){return Ur(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 Ur(e.options[0])}],Dr=[function(e){return Ur(e)}];function Wr(e,t){for(var n=e,r=0;r<=10&&n&&"BODY"!==n.nodeName&&"HTML"!==n.nodeName&&"HEAD"!==n.nodeName;){for(var i of t){var o=i(n);if("string"==typeof o){var a=o.trim();if(a)return Nr(Pr(a))}}if("FORM"===n.nodeName)break;n=n.parentElement,r+=1}}function Pr(e){return e.replace(/\s+/g," ")}function Nr(e){return e.length>100?(n=100,((r=(t=e).charCodeAt(n-1))>=55296&&r<=56319?t.slice(0,n+1):t.slice(0,n))+" [...]"):e;var t,n,r}function Ur(e){if(!e.isContentEditable){if("innerText"in e){var t=e.innerText;if(!function(){if(void 0===Br){var e=document.createElement("style");e.textContent="*";var t=document.createElement("div");t.appendChild(e),document.body.appendChild(t),Br=""===t.innerText,document.body.removeChild(t)}return Br}())for(var n=e.querySelectorAll("script, style"),r=0;r<n.length;r+=1){var i=n[r].innerText;i.trim().length>0&&(t=t.replace(i,""))}return t}return e.textContent}}function Vr(e){var t=function(e){var t,n;return{create:function(r,i){if(!t){var o=new jr(e,r,i);t=o,n=kr(e,(function(e){e.hadActivity?o.complete(e.endTime):o.discard(),t=void 0}))}},discardCurrent:function(){t&&(n.stop(),t.discard(),t=void 0)}}}(e);e.subscribe(Rt,(function(){t.discardCurrent()}));var n=re(window,we,(function(e){if(e.target instanceof Element){var n=Rr(e.target);n&&t.create(He,n)}}),{capture:!0}).stop;return{stop:function(){t.discardCurrent(),n()}}}var jr=function(e,t,n){this.id=I(),this.startClocks=G(),this.name=n,this.type=t,this.lifeCycle=e,this.eventCountsSubscription=Ir(e),this.lifeCycle.notify(Ct,{id:this.id,startClocks:this.startClocks})};function Hr(e,t){return e.subscribe(It,(function(t){e.notify(Pt,qr(t))})),t.trackInteractions&&Vr(e),{addAction:function(t,n){e.notify(Pt,d({savedCommonContext:n},qr(t)))}}}function qr(e){var t=Fr(e)?{action:{error:{count:e.counts.errorCount},id:e.id,loadingTime:F(e.duration),long_task:{count:e.counts.longTaskCount},resource:{count:e.counts.resourceCount}}}:{action:{loadingTime:0}};return{customerContext:Fr(e)?void 0:e.context,rawRumEvent:f({action:{target:{name:e.name},type:e.type},date:Z(e.startClocks),type:Fe.ACTION},t),startTime:e.startClocks.relative}}function Fr(e){return e.type!==qe}jr.prototype={complete:function(e){var t=this.eventCountsSubscription.eventCounts;this.lifeCycle.notify(It,{counts:{errorCount:t.errorCount,longTaskCount:t.longTaskCount,resourceCount:t.resourceCount},duration:K(Y(this.startClocks),e),id:this.id,name:this.name,startClocks:this.startClocks,type:this.type}),this.eventCountsSubscription.stop()},discard:function(){this.lifeCycle.notify(kt),this.eventCountsSubscription.stop()}};function Qr(e,t){var n,r=function(e,t){var n=r(e.datakitUrl,(function(){t.notify($t)}));function r(t,n){return new nr(new Zn(t,e.batchBytesLimit,e.isLineProtocolToJson),e.maxBatchSize,e.batchBytesLimit,e.maxMessageSize,e.flushTimeout,e.isLineProtocolToJson,n)}var i=!1;return{add:function(e){i||n.add(e)},stop:function(){i=!0},upsert:function(e,t){i||n.upsert(e,t)}}}(e,t);return e.isJsBirdge&&(n=new nn(e)),t.subscribe(Nt,(function(e){n&&n.bridge?function(e,t){var n=er(e).rowData;n&&t.sendEvent({name:"rum",data:n})}(e,n):function(e,t){e.type===Fe.VIEW?t.upsert(e,e.view.id):t.add(e)}(e,r)})),{stop:function(){r.stop()}}}var zr,Jr="synthetics",Gr="user",Xr=["view.url","view.referrer","action.target.name","error.message","error.stack","error.resource.url","resource.url"];function Kr(e,t,n,r,i,o){var a=function(e,t){var n=0,r=!1;return{isLimitReached:function(){if(0===n&&setTimeout((function(){n=0}),V),(n+=1)<=e.maxErrorsByMinute||r)return r=!1,!1;if(n===e.maxErrorsByMinute+1){r=!0;try{t({message:"Reached max number of errors by minute: ".concat(e.maxErrorsByMinute),source:mt,startClocks:G()})}finally{r=!1}}return!0}}}(t,(function(e){n.notify(Ut,{error:e})}));n.subscribe(Pt,(function(s){var u,c=s.startTime,d=s.rawRumEvent,l=s.savedCommonContext,p=s.customerContext,v=i.findView(c),h={device:me};if(r.isTracked()&&v&&v.session.id===r.getId()){var g=i.findAction(c),m=l||o(),y={_dd:{sdkName:t.sdkName,sdkVersion:t.sdkVersion,env:t.env,version:t.version,service:t.service},terminal:{type:"web"},application:{id:e},device:{},date:X(),user:{id:r.getAnonymousID(),is_signin:"F"},session:{type:void 0===window._DATAFLUX_SYNTHETICS_BROWSER?Gr:Jr}},b={};r.isTrackedWidthService()&&(b={session:{is_sampling:"1"}});var _=ue((u=d,-1!==[Fe.ERROR,Fe.RESOURCE,Fe.LONG_TASK].indexOf(u.type)?f(y,h,b,v,g,d):f(y,h,b,v,d))),S=f({},m.context,p);w(S)||(_.tags=S),"has_replay"in _.session||(_.session.has_replay=m.hasReplay),w(m.user)||(_.user=f({id:r.getAnonymousID(),is_signin:"T"},m.user)),function(e,t,n){if(t){var r=qt(e,Xr,t);if(!1===r&&e.type!==Fe.VIEW)return!1}if(e.type===Fe.ERROR)return!n.isLimitReached();return!0}(_,t.beforeSend,a)&&n.notify(Nt,_)}}))}function Yr(e,t){return Ln(t).subscribe((function(t){e.notify(Ut,{error:t})})),function(e){return e.subscribe(Ut,(function(t){e.notify(Pt,d({customerContext:t.customerContext,savedCommonContext:t.savedCommonContext},function(e){var t,n=e.resource;if(n){t=function(e){if(!e.traceId||!e.spanId)return;return{_dd:{spanId:e.spanId,traceId:e.traceId}}}(n);var r=R(e.resource.url).getParse();n={method:e.resource.method,status:e.resource.statusCode,statusGroup:$(e.resource.statusCode),url:e.resource.url,urlHost:r.Host,urlPath:r.Path,urlPathGroup:k(r.Path)}}return{rawRumEvent:f({date:z(e.startClocks.relative),error:{message:e.message,resource:n,source:e.source,stack:e.stack,type:e.type,handling_stack:e.handlingStack,handling:e.handling,starttime:z(e.startClocks.relative)},type:Fe.ERROR},t),startTime:e.startClocks.relative}}(t.error)))})),{addError:function(t,n){var r=function(e,t,n){const r=e instanceof Error?dt(e):void 0;return d({startClocks:n,source:_t,originalError:e,handling:Je},St(r,e,"Provided",t))}(t.error,t.handlingStack,t.startClocks);e.notify(Ut,{customerContext:t.context,savedCommonContext:n,error:r})}}}(e)}function Zr(e){if(void 0===e&&(e=window),!zr)if("hidden"===document.visibilityState)zr={timeStamp:0};else{zr={timeStamp:1/0};var t=re(e,Ae,(function(e){zr.timeStamp=e.timeStamp}),{capture:!0,once:!0});t.stop}return zr}function ei(e,t){var n={};function r(e){n=d(n,e),t(n)}var i=function(e,t){return{stop:e.subscribe(Ot,(function(e){"navigation"===e.entryType&&t({fetchStart:e.fetchStart,responseEnd:e.responseEnd,domComplete:e.domComplete,domContentLoaded:e.domContentLoadedEventEnd,domInteractive:e.domInteractive,loadEvent:e.loadEventEnd,loadEventEnd:e.loadEventEnd,loadEventStart:e.loadEventStart,domContentLoadedEventEnd:e.domContentLoadedEventEnd,domContentLoadedEventStart:e.domContentLoadedEventStart})})).unsubscribe}}(e,r),o=i.stop,a=function(e,t){var n=Zr();return{stop:e.subscribe(Ot,(function(e){"paint"===e.entryType&&"first-contentful-paint"===e.name&&e.startTime<n.timeStamp&&t(e.startTime)})).unsubscribe}}(e,(function(e){r({firstContentfulPaint:e})})),s=a.stop,u=function(e,t,n){var r=Zr(),i=1/0,o=ie(t,[Ce,be],(function(e){i=e.timeStamp}),{capture:!0,once:!0}).stop,a=e.subscribe(Ot,(function(e){"largest-contentful-paint"===e.entryType&&e.startTime<i&&e.startTime<r.timeStamp&&n(e.startTime)})).unsubscribe;return{stop:function(){o(),a()}}}(e,window,(function(e){r({largestContentfulPaint:e})})),c=u.stop,f=function(e,t){var n=Zr();return{stop:e.subscribe(Ot,(function(e){if("first-input"===e.entryType&&e.startTime<n.timeStamp){var r=K(e.startTime,e.processingStart);t({firstInputDelay:r>=0?r:0,firstInputTime:e.startTime})}})).unsubscribe}}(e,(function(e){r({firstInputDelay:e.firstInputDelay,firstInputTime:e.firstInputTime})})),l=f.stop;return{stop:function(){o(),s(),c(),l()}}}function ti(e){var t=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=re(window,Se,e).stop;return{stop:function(){r(),history.pushState=t,history.replaceState=n}}}(e),n=re(window,Re,e),r=t.stop,i=n.stop;return{stop:function(){r(),i()}}}function ni(e,t){return e.pathname!==t.pathname||(n=t.hash,r=n.substr(1),!document.getElementById(r)&&ri(t.hash)!==ri(e.hash));var n,r}function ri(e){var t=e.indexOf("?");return t<0?e:e.slice(0,t)}function ii(e,t,n){var r,i={eventCounts:{errorCount:0,longTaskCount:0,resourceCount:0,userActionCount:0}},o=Ir(e,(function(e){i.eventCounts=e,t()})).stop,a=function(e,t){var n=e===oi.INITIAL_LOAD,r=!0,i=[];function o(){!r&&!n&&i.length>0&&t(Math.max.apply(Math,i))}return{setLoadEvent:function(e){n&&(n=!1,i.push(e),o())},setActivityLoadingTime:function(e){r&&(r=!1,void 0!==e&&i.push(e),o())}}}(n,(function(e){i.loadingTime=e,t()})),s=a.setActivityLoadingTime,u=a.setLoadEvent,c=function(e,t){var n=Q();return{stop:kr(e,(function(e){e.hadActivity?t(K(n,e.endTime)):t(void 0)})).stop}}(e,s),d=c.stop;if(_r("layout-shift")){i.cumulativeLayoutShift=0;var f=function(e,t){return{stop:e.subscribe(Ot,(function(e){"layout-shift"!==e.entryType||e.hadRecentInput||t(e.value)})).unsubscribe}}(e,(function(e){i.cumulativeLayoutShift=H(i.cumulativeLayoutShift+e,4),t()}));r=f.stop}else r=P;return{stop:function(){o(),d(),r()},setLoadEvent:u,viewMetrics:i}}var oi={INITIAL_LOAD:"initial_load",ROUTE_CHANGE:"route_change"};function ai(e,t){var n,r,i=!1,o=(n=si(t,e,i,oi.INITIAL_LOAD,document.referrer,{relative:0,timeStamp:te()}),r=ei(t,(function(e){n.updateTimings(e),n.scheduleUpdate()})).stop,{initialView:n,stop:r}),a=o.stop,s=o.initialView,u=ti((function(){if(ni(s.getLocation(),e))return s.end(),s.triggerUpdate(),void(s=d());s.updateLocation(e),s.triggerUpdate()})).stop;t.subscribe(Lt,(function(){s.end(),s=d()})),t.subscribe($t,(function(){s.end(),s.triggerUpdate()})),t.subscribe(Vt,(function(){i=!0,s.updateHasReplay(!0)})),t.subscribe(jt,(function(){i=!1}));var c=window.setInterval((function(){s.triggerUpdate()}),3e5);function d(){return si(t,e,i,oi.ROUTE_CHANGE,s.url)}return{addTiming:function(e,t){void 0===t&&(t=G()),s.addTiming(e,t),s.triggerUpdate()},stop:function(){a(),u(),s.end(),clearInterval(c)}}}function si(e,t,n,r,i,o,a){void 0===o&&(o=G());var s,u=I(),c={},f={},l=0,p=d({},t),v=n;e.notify(Rt,{id:u,startClocks:o,location:p,referrer:i});var h=E(_,3e3,{leading:!1}),g=h.cancel,m=ii(e,h,r),y=m.setLoadEvent,w=m.viewMetrics,b=m.stop;function _(){l+=1,e.notify(At,d({},w,{customTimings:f,documentVersion:l,id:u,name:a,loadingType:r,location:p,hasReplay:v,referrer:i,startClocks:o,timings:c,duration:K(Y(o),Y(void 0===s?G():s)),isActive:void 0===s}))}return _(),{scheduleUpdate:h,end:function(){s=G(),b(),e.notify(Bt,{endClocks:s})},getLocation:function(){return p},triggerUpdate:function(){g(),_()},updateTimings:function(e){c=e,void 0!==e.loadEvent&&y(e.loadEvent)},addTiming:function(e,t){f[function(e){var t=e.replace(/[^a-zA-Z0-9-_.@$]/g,"_");return t}(e)]=K(Y(o),Y(t))},updateLocation:function(e){p=d({},e)},updateHasReplay:function(e){v=e},url:p.href}}function ui(e,t,n){return e.subscribe(At,(function(t){e.notify(Pt,function(e){var t={_dd:{documentVersion:e.documentVersion},date:Z(e.startClocks),type:Fe.VIEW,view:{action:{count:e.eventCounts.userActionCount},cumulativeLayoutShift:e.cumulativeLayoutShift,domComplete:q(e.timings.domComplete),domContentLoaded:q(e.timings.domContentLoaded),domInteractive:q(e.timings.domInteractive),error:{count:e.eventCounts.errorCount},firstContentfulPaint:q(e.timings.firstContentfulPaint),firstInputDelay:q(e.timings.firstInputDelay),firstInputTime:q(e.timings.firstInputTime),largestContentfulPaint:q(e.timings.largestContentfulPaint),loadEventEnd:q(e.timings.loadEventEnd),load_event:q(e.timings.load_event),loadingTime:q(e.loadingTime),loadingType:e.loadingType,isActive:e.isActive,name:e.name,longTask:{count:e.eventCounts.longTaskCount},resource:{count:e.eventCounts.resourceCount},timeSpent:q(e.duration)},session:{hasReplay:e.hasReplay||void 0}};w(e.customTimings)||(t.view.custom_timings=(n=e.customTimings,r=F,i={},u(n,(function(e,t){i[t]=r(e)})),i));var n,r,i;return{rawRumEvent:t=f(t,{view:ci(e.timings)}),startTime:e.startClocks.relative}}(t))})),ai(n,e)}function ci(e){var t=hr(e);if(t){var n=t.fetchStart,r=t.responseEnd,i=t.domInteractive,o=t.domContentLoaded,a=t.domComplete,s=t.loadEventEnd,u=t.loadEventStart,c=t.domContentLoadedEventEnd,d={fmp:q(t.largestContentfulPaint)};if(r!==n){d.fpt=q(r-n);var f=parseInt((r-n)/1e3);d.apdexLevel=f>9?9:f}return i!==n&&(d.tti=q(i-n)),o!==n&&(d.domReady=q(o-n)),s!==n&&(d.load=q(s-n)),u!==c&&(d.resourceLoadTime=q(u-c)),a!==i&&(d.dom=q(a-i)),d}}function di(){this.buffer=new Uint8Array(8),fi().getRandomValues(this.buffer),this.buffer[0]=127&this.buffer[0]}function fi(){return window.crypto||window.msCrypto}function li(e){this._spanId=(new di).toDecimalString(),this._traceId=(new di).toDecimalString()}function pi(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(e=>{const t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}))}function vi(e,t){this._spanId=pi(),this._traceId=pi(),this._applicationId=e.applicationId,this._env=e.env,this._version=e.version,this._urlParse=R(t).getParse()}function hi(){let e="";for(let t=0;t<16;t+=1){e+="0123456789abcdef"[Math.floor(16*Math.random())]}return e}function gi(e){const t=hi();e.traceId128Bit?this._traceId=hi()+t:this._traceId=t,this._spanId=t}function mi(){let e="";for(let t=0;t<16;t+=1){e+="0123456789abcdef"[Math.floor(16*Math.random())]}return e}function yi(e){const t=mi();this._traceId=mi()+t,this._spanId=t}function wi(){let e="";for(let t=0;t<16;t+=1){e+="0123456789abcdef"[Math.floor(16*Math.random())]}return e}function bi(e){const t=wi();e.traceId128Bit?this._traceId=wi()+t:this._traceId=t,this._spanId=t}function _i(){let e="";for(let t=0;t<16;t+=1){e+="0123456789abcdef"[Math.floor(16*Math.random())]}return e}function Si(e){const t=_i();this._traceId=_i()+t,this._spanId=t}function Ti(e){0===e.status&&(e.traceId=void 0,e.spanId=void 0)}function xi(e,t,n){if(function(e,t){var n=Kt(t),r=!1;return u(e.allowedTracingOrigins,(function(e){if(n===e||e instanceof RegExp&&e.test(n))return r=!0,!1})),r}(e,t.url)&&e.traceType){var r;switch(e.traceType){case ze.DDTRACE:r=new li;break;case ze.SKYWALKING_V3:r=new vi(e,t.url);break;case ze.ZIPKIN_MULTI_HEADER:r=new bi(e);break;case ze.JAEGER:r=new gi(e);break;case ze.W3C_TRACEPARENT:r=new Si(e);break;case ze.ZIPKIN_SINGLE_HEADER:r=new yi(e)}r&&r.isTracingSupported()&&(t.traceId=r.getTraceId(),t.spanId=r.getSpanId(),n(r.makeTracingHeaders()))}}di.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]}},li.prototype={isTracingSupported:function(){return void 0!==fi()},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()}}},vi.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(C(this._traceId)),t=String(C(this._spanId)),n=String(C(this._applicationId+"_rum_"+this.env)),r=String(C(this._version)),i=String(C(window.location.href)),o=String(C(this._urlParse.Host));return"1-"+e+"-"+t+"-0-"+n+"-"+r+"-"+i+"-"+o}catch(e){return""}},makeTracingHeaders:function(){return{sw8:this.getSkyWalkingSw8()}}},gi.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()}}},yi.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()}}},bi.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"}}},Si.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()}}};var Ei=1;function Oi(e,t){var n=function(e){return{clearTracingIfCancelled:Ti,traceFetch:function(t){return xi(e,t,(function(e){if(!(t.input instanceof Request)||t.init&&t.init.headers){t.init=c(t.init);var n=[];t.init.headers instanceof Headers?u(t.init.headers,(function(e,t){n.push([t,e])})):l(t.init.headers)?u(t.init.headers,(function(e){n.push(e)})):t.init.headers&&u(t.init.headers,(function(e,t){n.push([t,e])}));var r={};u(n.concat(b(e)),(function(e){r[e[0]]=e[1]})),t.init.headers=r}else t.input=new Request(t.input),u(e,(function(e,n){t.input.headers.append(n,e)}))}))},traceXhr:function(t,n){return xi(e,t,(function(e){u(e,(function(e,t){n.setRequestHeader(t,e)}))}))}}}(t);!function(e,t,n){var r=xn();r.beforeSend((function(r,i){wr(t,r.url)&&(n.traceXhr(r,i),r.requestIndex=Ci(),e.notify(Dt,{requestIndex:r.requestIndex}))})),r.onRequestComplete((function(r){wr(t,r.url)&&(n.clearTracingIfCancelled(r),e.notify(Wt,{duration:r.duration,method:r.method,requestIndex:r.requestIndex,response:r.response,traceId:r.traceId,startClocks:r.startClocks,spanId:r.spanId,startTime:r.startTime,status:r.status,type:Qe.XHR,url:r.url}))}))}(e,t,n),function(e,t,n){var r=Rn();r.beforeSend((function(r){wr(t,r.url)&&(n.traceFetch(r),r.requestIndex=Ci(),e.notify(Dt,{requestIndex:r.requestIndex}))})),r.onRequestComplete((function(r){wr(t,r.url)&&(n.clearTracingIfCancelled(r),e.notify(Wt,{duration:r.duration,method:r.method,requestIndex:r.requestIndex,response:r.response,responseType:r.responseType,startClocks:r.startClocks,spanId:r.spanId,startTime:r.startTime,status:r.status,traceId:r.traceId,type:Qe.FETCH,url:r.url}))}))}(e,t,n)}function Ci(){var e=Ei;return Ei+=1,e}function Ii(e){if(performance&&"getEntriesByName"in performance){var t=performance.getEntriesByName(e.url,"resource");if(t.length&&"toJSON"in t[0]){var n,r=m(t,(function(e){return e.toJSON()}));return r=g(r,hr),1===(r=g(r,(function(t){return n=t,r=e.startClocks.relative,i=ki({startTime:e.startClocks.relative,duration:e.duration}),o=1,n.startTime>=r-o&&ki(n)<=i+o;var n,r,i,o}))).length?r[0]:2===r.length&&ki((n=r)[0])<=n[1].startTime?r[1]:void 0}}}function ki(e){return e.startTime+e.duration}function Ri(e,t,n){e.subscribe(Wt,(function(t){n.isTrackedWithResource()&&e.notify(Pt,function(e){var t=e.type===Qe.XHR?Me:De,n=Ii(e),r=n?ee(n.startTime):e.startClocks,i=n?Ai(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=R(e.url).getParse(),s=f({date:Z(r),resource:{type:t,duration:q(e.duration),method:e.method,status:e.status,statusGroup:$(e.status),url:e.url,urlHost:a.Host,urlPath:a.Path,urlPathGroup:k(a.Path),urlQuery:D(A(e.url))},type:Fe.RESOURCE},o,i);return{startTime:r.relative,rawRumEvent:s}}(t))})),e.subscribe(Ot,(function(t){var r;n.isTrackedWithResource()&&"resource"===t.entryType&&("xmlhttprequest"!==(r=t).initiatorType&&"fetch"!==r.initiatorType)&&e.notify(Pt,function(e){var t=lr(e),n=Ai(e),r=function(e){return e.traceId?{_dd:{traceId:e.traceId}}:void 0}(e),i=R(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=ee(e.startTime),s=f({date:Z(a),resource:{type:t,url:e.name,urlHost:i.Host,urlPath:i.Path,urlPathGroup:k(i.Path),urlQuery:D(A(e.name)),method:"GET",status:o,statusGroup:$(o)},type:Fe.RESOURCE},r,n);return{startTime:a.relative,rawRumEvent:s}}(t))}))}function Ai(e){return{resource:f({},{duration:(t=e,0===t.duration&&t.startTime<t.responseEnd?q(t.responseEnd-t.startTime):q(t.duration)),size:yr(e)},vr(e))};var t}var Bi=function(e){var t,n=!1,r=(t={},{get:function(){return t},add:function(e,n){_(e)&&(t[e]=n)},remove:function(e){delete t[e]},set:function(e){y(e)&&(t=e)}}),i={},o=function(){},a=function(){return{}},s=function(){},u=new ve,c=function(e){u.add([e,X()])},l=new ve,p=function(e){l.add([e,G()])},v=new ve,h=function(e){v.add([e,b()])},g=new ve,m=function(e){g.add([e,b()])};function b(){return M({context:r.get(),user:i})}var S,T,x=(S={init:function(t){if(Pn(dn(t))&&Nn()&&function(e){return!n&&(!!e.applicationId&&(!(!e.datakitUrl&&!e.datakitOrigin)&&(!(void 0!==e.sampleRate&&!ae(e.sampleRate))&&!(void 0!==e.resourceSampleRate&&!ae(e.resourceSampleRate)))))}(t)){var d=e(t,(function(){return{user:i,context:r.get()}}));c=d.session.addDebugSession,h=d.addAction,m=d.addError,p=d.addTiming,a=d.session.getDebugSession,s=d.session.clearDebugSession,o=d.getInternalContext,u.drain((function(e){var t=e[0],n=e[1];c(t,n)})),v.drain((function(e){var t=e[0],n=e[1];h(t,n)})),g.drain((function(e){var t=e[0],n=e[1];m(t,n)})),l.drain((function(e){var t=e[0],n=e[1];p(t,n)})),n=!0}},addRumGlobalContext:r.add,removeRumGlobalContext:r.remove,getRumGlobalContext:r.get,setRumGlobalContext:r.set,getInternalContext:function(e){return o(e)},addDebugSession:function(e){c(e),this.getDebugSession()},clearDebugSession:function(){s()},getDebugSession:function(){var e=a();if(w(e))return e;{const t=O(new Date(+e.created));return e.id,f(e,{format_created:t})}},addAction:function(e,t){h({name:e,context:M(t),startClocks:G(),type:qe})},addError:function(e,t){const n=Tt();m({error:e,handlingStack:n,context:M(t),startClocks:G()})},setUser:function(e){var t=function(e){if("object"==typeof e&&e){var t=f({},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}}(e);t&&(i=t)},removeUser:function(){i={}}},T=d({},S,{onReady:function(e){e()}}),Object.defineProperty(T,"_setDebug",{get:function(){return setDebugMode},enumerable:!1}),T);return x}((function(e,t){var n=new Ht,r=ln(e,cr),i=sr(r,n),o=function(e,t,n,r,i,o){var a=function(e,t){var n,r,i,o=[],a=[];e.subscribe(Rt,(function(e){n=e,i=t.getId()})),e.subscribe(At,(function(e){n&&n.id===e.id&&(n=e)})),e.subscribe(Bt,(function(e){n&&(o.unshift({endTime:e.endClocks.relative,context:d(),startTime:n.startClocks.relative}),n=void 0)})),e.subscribe(Ct,(function(e){r=e})),e.subscribe(It,(function(e){r&&a.unshift({context:f(),endTime:r.startClocks.relative+e.duration,startTime:r.startClocks.relative}),r=void 0})),e.subscribe(kt,(function(){r=void 0})),e.subscribe(Lt,(function(){o=[],a=[],n=void 0,r=void 0}));var s=window.setInterval((function(){c(o,144e5),c(a,3e5)}),6e4);function c(e,t){for(var n=J()-t;e.length>0&&e[e.length-1].startTime<n;)e.pop()}function d(){return{session:{id:i},view:{id:n.id,referrer:n.referrer,name:n.name,url:n.location.href,host:n.location.host,path:n.location.pathname,pathGroup:k(n.location.pathname),urlQuery:D(A(n.location.href))}}}function f(){return{userAction:{id:r.id}}}function l(e,t,n,r){if(void 0===r)return n?e():void 0;if(n&&r>=n.startClocks.relative)return e();var i=void 0;return u(t,(function(e){return!(r>e.endTime)&&(r>=e.startTime?(i=e.context,!1):void 0)})),i}return{findAction:function(e){return l(f,a,r,e)},findView:function(e){return l(d,o,n,e)},stop:function(){window.clearInterval(s)}}}(n,i),s=Qr(r,n);Kr(e,r,n,i,a,o),function(e){e.subscribe(Ot,(function(t){if("longtask"===t.entryType){var n=ee(t.startTime),r={date:Z(n),long_task:{duration:F(t.duration)},type:Fe.LONG_TASK};e.notify(Pt,{rawRumEvent:r,startTime:n.relative})}}))}(n),Ri(n,0,i);var c=ui(n,0,t),d=c.addTiming,f=c.stop,l=Yr(n,r);return{addAction:Hr(n,r).addAction,addTiming:d,parentContexts:a,addError:l.addError,stop:function(){f(),s.stop()}}}(e.applicationId,location,n,r,i,t),a=o.parentContexts;Oi(n,r),Sr(n,r),Cr(n);var s=function(e,t,n){return{get:function(r){var i=n.findView(r);if(t.isTracked()&&i&&i.session.id){const t=n.findAction(r);return{application:{id:e},session:{id:i.session.id},userAction:t?{id:t.userAction.id}:void 0,view:i.view}}}}}(e.applicationId,i,a);return{addAction:o.addAction,addError:o.addError,addTiming:o.addTiming,configuration:r,lifeCycle:n,parentContexts:a,session:i,getInternalContext:s.get}}));!function(e,t,n){var r=e[t];e[t]=n,r&&r.q&&u(r.q,(function(e){e()}))}(Wn(),"DATAFLUX_RUM",Bi)})();
|
package/cjs/boot/buildEnv.js
CHANGED
package/esm/boot/buildEnv.js
CHANGED
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudcare/browser-rum",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.2",
|
|
4
4
|
"main": "cjs/index.js",
|
|
5
5
|
"module": "esm/index.js",
|
|
6
6
|
"dependencies": {
|
|
7
|
-
"@cloudcare/browser-core": "1.1.
|
|
7
|
+
"@cloudcare/browser-core": "1.1.1"
|
|
8
8
|
},
|
|
9
9
|
"scripts": {
|
|
10
10
|
"dev": "webpack serve --open --mode=development",
|
|
@@ -29,5 +29,5 @@
|
|
|
29
29
|
"license": "MIT",
|
|
30
30
|
"homepage": "https://github.com/CloudCare/dataflux-rum-sdk-javascript/blob/master/packages/rum/README.md",
|
|
31
31
|
"description": "DataFlux RUM Web 端数据指标监控",
|
|
32
|
-
"gitHead": "
|
|
32
|
+
"gitHead": "6637896a7d66c35f8b37da75b14d234d049c79d5"
|
|
33
33
|
}
|