@cloudcare/browser-logs 3.2.42 → 3.2.48

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.
@@ -1 +1 @@
1
- !function(){"use strict";var e={log:"log",debug:"debug",info:"info",warn:"warn",error:"error"},t=console,n={};Object.keys(e).forEach((function(e){n[e]=t[e]||J}));var r,o="GUANCE Browser SDK:",i={debug:n.debug.bind(t,o),log:n.log.bind(t,o),info:n.info.bind(t,o),warn:n.warn.bind(t,o),error:n.error.bind(t,o)},a=!1;function s(e){a=e}function u(e){return function(){return c(e,this,arguments)}}function c(e,t,n){try{return e.apply(t,n)}catch(e){if(f(e),r)try{r(e)}catch(e){f(e)}}}function f(){var e=[].slice.call(arguments);a&&i.error.apply(null,["[MONITOR]"].concat(e))}function l(e,t){return function(){var n=[].slice.call(arguments);try{return e.apply(this,n)}catch(e){i.error(t,e)}}}function d(e){return d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},d(e)}function p(){if("object"===("undefined"==typeof globalThis?"undefined":d(globalThis)))return globalThis;Object.defineProperty(Object.prototype,"_gc_temp_",{get:function(){return this},configurable:!0});var e=_gc_temp_;return delete Object.prototype._gc_temp_,"object"!==d(e)&&(e="object"===("undefined"==typeof self?"undefined":d(self))?self:"object"===("undefined"==typeof window?"undefined":d(window))?window:{}),e}function v(e,t){var n,r=p();return r.Zone&&"function"==typeof r.Zone.__symbol__&&(n=e[r.Zone.__symbol__(t)]),n||(n=e[t]),n}function g(e,t){return v(p(),"setTimeout")(u(e),t)}function y(e){v(p(),"clearTimeout")(e)}function m(e,t){return v(p(),"setInterval")(u(e),t)}function h(e){v(p(),"clearInterval")(e)}function b(e){return b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},b(e)}var _=Array.prototype,w=(Function.prototype,Object.prototype),S=_.slice,x=w.toString,O=w.hasOwnProperty,k=_.forEach,C=Array.isArray,E=!1,T=function(e,t,n){if(null===e)return!1;if(k&&e.forEach===k)e.forEach(t,n);else if(e.length===+e.length){for(var r=0,o=e.length;r<o;r++)if(r in e&&t.call(n,e[r],r,e)===E)return!1}else for(var i in e)if(O.call(e,i)&&t.call(n,e[i],i,e)===E)return!1};function A(e){return T(S.call(arguments,1),(function(t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})),e}var M=function(e){return T(S.call(arguments,1),(function(t){for(var n in t)void 0!==t[n]&&(e[n]=t[n])})),e},$=function(e){return T(S.call(arguments,1),(function(t){for(var n in t)void 0!==t[n]&&(U(t[n])&&U(e[n])?M(e[n],t[n]):e[n]=t[n])})),e},L=C||function(e){return"[object Array]"===x.call(e)},P=function(e){if(!e)return!1;try{return/^\s*\bfunction\b/.test(e)}catch(e){return!1}},R=function(e){var t=[];return null===e||T(e,(function(e){t[t.length]=e})),t},B=function(e){var t=[];return null===e||T(e,(function(e,n){t[t.length]=n})),t},j=function(e,t,n){if(e.filter)return e.filter(t);for(var r=[],o=0;o<e.length;o++)if(O.call(e,o)){var i=e[o];t.call(n,i,o,e)&&r.push(i)}return r},I=function(e,t,n){if(e.map)return e.map(t);for(var r=[],o=0;o<e.length;o++)if(O.call(e,o)){var i=e[o];r.push(t.call(n,i,o,e))}return r},D=function(e,t,n){if(e.some)return e.some(t);for(var r=!1,o=0;o<e.length;o++)if(O.call(e,o)){var i=e[o];if(t.call(n,i,o,e)){r=!0;break}}return r},U=function(e){return null!==e&&"[object Object]"===x.call(e)},q=function(e){if(U(e)){for(var t in e)if(O.call(e,t))return!1;return!0}return!1},F=function(e){return"[object String]"===x.call(e)},W=function(e){return"[object Boolean]"===x.call(e)},N=function(e){return"[object Number]"===x.call(e)&&/[\d\.]+/.test(String(e))},V=(Date.now,function(e,t,n){var r,o,i=!n||void 0===n.leading||n.leading,a=!n||void 0===n.trailing||n.trailing,s=!1,u=this;return{throttled:function(){s?r=arguments:(i?e.apply(u,arguments):r=arguments,s=!0,o=g((function(){a&&r&&e.apply(u,r),s=!1,r=void 0}),t))},cancel:function(){y(o),s=!1,r=void 0}}});function H(e){return e?(parseInt(e,10)^16*Math.random()>>parseInt(e,10)/4).toString(16):"".concat(1e7,"-",1e3,"-",4e3,"-",8e3,"-",1e11).replace(/[018]/g,H)}function Q(e){return null===e?"null":Array.isArray(e)?"array":b(e)}function z(e,t,n){if(void 0===n&&(n=function(){if("undefined"!=typeof WeakSet){var e=new WeakSet;return{hasAlreadyBeenSeen:function(t){var n=e.has(t);return n||e.add(t),n}}}var t=[];return{hasAlreadyBeenSeen:function(e){var n=t.indexOf(e)>=0;return n||t.push(e),n}}}()),void 0===t)return e;if("object"!==b(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 o=Array.isArray(e)?e:[],i=0;i<t.length;++i)o[i]=z(o[i],t[i],n);return o}o="object"===Q(e)?e:{};for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(o[a]=z(o[a],t[a],n));return o}}function G(e){return z(void 0,e)}function J(){}var X,K=1e3,Z=6e4;function Y(e){return 0!==e&&100*Math.random()<=e}function ee(){return performance.now()}function te(){return{relative:ee(),timeStamp:ne()}}function ne(){return re()}function re(){return(new Date).getTime()}function oe(e,t){return t-e}function ie(){return void 0===X&&(X=performance.timing.navigationStart),X}var ae=/([\w-]+)\s*=\s*([^;]+)/g;function se(e,t){for(var n=t.split(".");n.length;){var r=n.shift();if(!(e&&U(e)&&r in e&&O.call(e,r)))return;e=e[r]}return e}function ue(e,t){var n=e.charCodeAt(t-1);return n>=55296&&n<=56319?e.slice(0,t+1):e.slice(0,t)}function ce(e,t){return-1!==e.indexOf(t)}function fe(e){if(Array.from)return Array.from(e);var t=[];if(e instanceof Set)e.forEach((function(e){t.push(e)}));else for(var n=0;n<e.length;n++)t.push(e[n]);return t}function le(e){return N(e)&&e>=0&&e<=100}var de,pe=0,ve=1,ge=2,ye=3;function me(){return _e(de,de=function(e){var t,n;void 0===e&&(e=window||{});var r=(null===(t=e)||void 0===t||null===(t=t.navigator)||void 0===t?void 0:t.userAgent)||"";if(e.chrome||/HeadlessChrome/.test(r))return ve;if(0===(null===(n=e.navigator.vendor)||void 0===n?void 0:n.indexOf("Apple"))||/safari/i.test(r)&&!/chrome|android/i.test(r))return ge;if(e.document.documentMode)return pe;return ye}())}function he(e){var t={};return T(e,(function(e,n){var r;t[(r=n,r.replace(/[A-Z]/g,(function(e,t){return(0!==t?"_":"")+e.toLowerCase()})).replace(/-/g,"_"))]=be(e)})),t}function be(e){return L(e)?I(e,(function(e){return be(e)})):"object"===b(e)&&null!==e?he(e):e}function _e(e,t){return null!=e?e:t}function we(e,t){return e.slice(0,t.length)===t}function Se(e,t){var n=e.indexOf(t);n>=0&&e.splice(n,1)}function xe(){var e=[];return{add:function(t){e.push(t)>500&&e.splice(0,1)},remove:function(t){Se(e,t)},drain:function(t){e.forEach((function(e){e(t)})),e.length=0}}}var Oe=1/0,ke=null,Ce=new Set;var Ee={navigator:"undefined"!=typeof window&&void 0!==window.navigator?window.navigator:{},infoMap:{engine:["WebKit","Trident","Gecko","Presto"],browser:["Safari","Chrome","Edge","IE","IE 11","IE 10","IE 9","IE 8","IE 7","Firefox","Firefox Focus","Chromium","Opera","Vivaldi","Yandex","Arora","Lunascape","QupZilla","Coc Coc","Kindle","Iceweasel","Konqueror","Iceape","SeaMonkey","Epiphany","360","360SE","360EE","UC","QQBrowser","QQ","Baidu","Maxthon","Sogou","LBBROWSER","2345Explorer","TheWorld","XiaoMi","Quark","Qiyu","Wechat",,"WechatWork","Taobao","Alipay","Weibo","Douban","Suning","iQiYi"],os:["Windows","Linux","Mac OS","Android","Ubuntu","FreeBSD","Debian","iOS","Windows Phone","BlackBerry","MeeGo","Symbian","Chrome OS","WebOS"],device:["Mobile","Tablet","iPad"]}},Te={getMatchMap:u((function(e){return{Trident:e.indexOf("Trident")>-1||e.indexOf("NET CLR")>-1,Presto:e.indexOf("Presto")>-1,WebKit:e.indexOf("AppleWebKit")>-1,Gecko:e.indexOf("Gecko/")>-1,Safari:e.indexOf("Safari")>-1,Chrome:e.indexOf("Chrome")>-1||e.indexOf("CriOS")>-1,IE:e.indexOf("MSIE")>-1||e.indexOf("Trident")>-1,Edge:e.indexOf("Edge")>-1||e.indexOf("Edg")>-1,Firefox:e.indexOf("Firefox")>-1||e.indexOf("FxiOS")>-1,"Firefox Focus":e.indexOf("Focus")>-1,Chromium:e.indexOf("Chromium")>-1,Opera:e.indexOf("Opera")>-1||e.indexOf("OPR")>-1,Vivaldi:e.indexOf("Vivaldi")>-1,Yandex:e.indexOf("YaBrowser")>-1,Arora:e.indexOf("Arora")>-1,Lunascape:e.indexOf("Lunascape")>-1,QupZilla:e.indexOf("QupZilla")>-1,"Coc Coc":e.indexOf("coc_coc_browser")>-1,Kindle:e.indexOf("Kindle")>-1||e.indexOf("Silk/")>-1,Iceweasel:e.indexOf("Iceweasel")>-1,Konqueror:e.indexOf("Konqueror")>-1,Iceape:e.indexOf("Iceape")>-1,SeaMonkey:e.indexOf("SeaMonkey")>-1,Epiphany:e.indexOf("Epiphany")>-1,360:e.indexOf("QihooBrowser")>-1||e.indexOf("QHBrowser")>-1,"360EE":e.indexOf("360EE")>-1,"360SE":e.indexOf("360SE")>-1,UC:e.indexOf("UC")>-1||e.indexOf(" UBrowser")>-1,QQBrowser:e.indexOf("QQBrowser")>-1,QQ:e.indexOf("QQ/")>-1,Baidu:e.indexOf("Baidu")>-1||e.indexOf("BIDUBrowser")>-1,Maxthon:e.indexOf("Maxthon")>-1,Sogou:e.indexOf("MetaSr")>-1||e.indexOf("Sogou")>-1,LBBROWSER:e.indexOf("LBBROWSER")>-1,"2345Explorer":e.indexOf("2345Explorer")>-1,TheWorld:e.indexOf("TheWorld")>-1,XiaoMi:e.indexOf("MiuiBrowser")>-1,Quark:e.indexOf("Quark")>-1,Qiyu:e.indexOf("Qiyu")>-1,Wechat:e.indexOf("MicroMessenger")>-1,Taobao:e.indexOf("AliApp(TB")>-1,Alipay:e.indexOf("AliApp(AP")>-1,Weibo:e.indexOf("Weibo")>-1,Douban:e.indexOf("com.douban.frodo")>-1,Suning:e.indexOf("SNEBUY-APP")>-1,iQiYi:e.indexOf("IqiyiApp")>-1,Windows:e.indexOf("Windows")>-1,Linux:e.indexOf("Linux")>-1||e.indexOf("X11")>-1,"Mac OS":e.indexOf("Macintosh")>-1,Android:e.indexOf("Android")>-1||e.indexOf("Adr")>-1,Ubuntu:e.indexOf("Ubuntu")>-1,FreeBSD:e.indexOf("FreeBSD")>-1,Debian:e.indexOf("Debian")>-1,"Windows Phone":e.indexOf("IEMobile")>-1||e.indexOf("Windows Phone")>-1,BlackBerry:e.indexOf("BlackBerry")>-1||e.indexOf("RIM")>-1,MeeGo:e.indexOf("MeeGo")>-1,Symbian:e.indexOf("Symbian")>-1,iOS:e.indexOf("like Mac OS X")>-1,"Chrome OS":e.indexOf("CrOS")>-1,WebOS:e.indexOf("hpwOS")>-1,Mobile:e.indexOf("Mobi")>-1||e.indexOf("iPh")>-1||e.indexOf("480")>-1,Tablet:e.indexOf("Tablet")>-1||e.indexOf("Nexus 7")>-1,iPad:e.indexOf("iPad")>-1}})),matchInfoMap:u((function(e){var t=Ee.navigator.userAgent||"",n=Te.getMatchMap(t);for(var r in Ee.infoMap)for(var o=0;o<Ee.infoMap[r].length;o++){var i=Ee.infoMap[r][o];n[i]&&(e[r]=i)}})),getOS:u((function(){return Te.matchInfoMap(this),this.os||"Unknown"})),getOSVersion:u((function(){var e=this,t=Ee.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}})),getDeviceType:u((function(){var e=this;return e.device="PC",Te.matchInfoMap(e),e.device})),getNetwork:u((function(){var e=window.navigator.connection||window.navigator.mozConnection||window.navigator.webkitConnection,t="unknown",n=e?e.type||e.effectiveType:null;if(n&&"string"==typeof n)switch(n){case"bluetooth":case"cellular":case"slow-2g":case"2g":case"3g":t="cellular";break;case"none":t="none";break;case"ethernet":case"wifi":case"wimax":case"4g":t="wifi";break;case"other":case"unknown":t="unknown"}return t})),getLanguage:u((function(){var e;return this.language=((e=(Ee.navigator.browserLanguage||Ee.navigator.language||"").split("-"))[1]&&(e[1]=e[1].toUpperCase()),e.join("_")),this.language})),getTimeZone:u((function(){try{return(new Intl.DateTimeFormat).resolvedOptions().timeZone}catch(e){return}})),getBrowserInfo:u((function(){var e=this;Te.matchInfoMap(e);var t=Ee.navigator.userAgent||"",n=function(e,t){var n=Ee.navigator.mimeTypes;for(var r in n)if(n[r][e]==t)return!0;return!1},r=Te.getMatchMap(t),o=!1;if("undefined"!=typeof window&&window.chrome){var i=t.replace(/^.*Chrome\/([\d]+).*$/,"$1");i>36&&window.showModalDialog?o=!0:i>45&&(o=n("type","application/vnd.chromium.remoting-viewer"))}if(r.Baidu&&r.Opera&&(r.Baidu=!1),r.Mobile&&(r.Mobile=!(t.indexOf("iPad")>-1)),o&&(n("type","application/gameplugin")||Ee.navigator&&Ee.navigator.connection&&void 0===Ee.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:u((function(e){navigator&&navigator.geolocation&&navigator.geolocation.getCurrentPosition((function(t){e(t)}),(function(e){i.warn(e)}))}))},Ae={};"undefined"!=typeof window&&(Ae={os:Te.getOS(),osVersion:Te.getOSVersion().version,osVersionMajor:Te.getOSVersion().osMajor,browser:Te.getBrowserInfo().browser,browserVersion:Te.getBrowserInfo().browserVersion,browserVersionMajor:Te.getBrowserInfo().browserMajor,screenSize:window.screen.width+"*"+window.screen.height,networkType:Te.getNetwork(),device:Te.getDeviceType(),timeZone:Te.getTimeZone(),userAgent:Ee.navigator.userAgent||""});var Me=Ae,$e="beforeunload",Le="click",Pe="keydown",Re="scroll",Be="touchstart",je="visibilitychange",Ie="freeze",De="resume",Ue="securitypolicyviolation",qe="storage",Fe="action",We="error",Ne="long_task",Ve="view",He="resource",Qe="logger",ze={FETCH:"fetch",XHR:"xhr"},Ge="handled",Je="unhandled",Xe="Uncaught",Ke="Provided";function Ze(e){return Ze="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ze(e)}function Ye(e,t,n){if("object"!==Ze(e)||null===e)return JSON.stringify(e);var r=et(Object.prototype),o=et(Array.prototype),i=et(Object.getPrototypeOf(e)),a=et(e);try{return JSON.stringify(e,t,n)}catch(e){return"<error: unable to serialize object>"}finally{r(),o(),i(),a()}}function et(e){var t=e,n=t.toJSON;return n?(delete t.toJSON,function(){t.toJSON=n}):J}function tt(e){return tt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},tt(e)}var nt="?";function rt(e){var t=[],n=dt(e,"stack"),r=String(e);return n&&n.startsWith(r)&&(n=n.slice(r.length)),n&&T(n.split("\n"),(function(e){var n=function(e){var t=at.exec(e);if(!t)return;var n=t[2]&&0===t[2].indexOf("native"),r=t[2]&&0===t[2].indexOf("eval"),o=st.exec(t[2]);r&&o&&(t[2]=o[1],t[3]=o[2],t[4]=o[3]);return{args:n?[t[2]]:[],column:t[4]?+t[4]:void 0,func:t[1]||nt,line:t[3]?+t[3]:void 0,url:n?void 0:t[2]}}(e)||function(e){var t=ut.exec(e);if(!t)return;return{args:[],column:t[3]?+t[3]:void 0,func:nt,line:t[2]?+t[2]:void 0,url:t[1]}}(e)||function(e){var t=ct.exec(e);if(!t)return;return{args:[],column:t[4]?+t[4]:void 0,func:t[1]||nt,line:+t[3],url:t[2]}}(e)||function(e){var t=ft.exec(e);if(!t)return;var n=t[3]&&t[3].indexOf(" > eval")>-1,r=lt.exec(t[3]);n&&r&&(t[3]=r[1],t[4]=r[2],t[5]=void 0);return{args:t[2]?t[2].split(","):[],column:t[5]?+t[5]:void 0,func:t[1]||nt,line:t[4]?+t[4]:void 0,url:t[3]}}(e);n&&(!n.func&&n.line&&(n.func=nt),t.push(n))})),{message:dt(e,"message"),name:dt(e,"name"),stack:t}}var ot="((?:file|https?|blob|chrome-extension|electron|native|eval|webpack|<anonymous>|\\w+\\.|\\/).*?)",it="(?::(\\d+))",at=new RegExp("^\\s*at (.*?) ?\\("+ot+it+"?"+it+"?\\)?\\s*$","i"),st=new RegExp("\\((\\S*)"+it+it+"\\)");var ut=new RegExp("^\\s*at ?"+ot+it+"?"+it+"??\\s*$","i");var ct=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i;var ft=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|capacitor|\[native).*?|[^@]*bundle|\[wasm code\])(?::(\d+))?(?::(\d+))?\s*$/i,lt=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i;function dt(e,t){if("object"===tt(e)&&e&&t in e){var n=e[t];return"string"==typeof n?n:void 0}}var pt=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?([\s\S]*)$/;function vt(e){var t=function(e){return Bt(window,"onerror",(function(t){var n,r=t.parameters,o=r[0],i=r[1],a=r[2],s=r[3],u=r[4];if(u instanceof Error)n=rt(u);else{var c={url:i,column:s,line:a},f=function(e){var t,n;if("[object String]"==={}.toString.call(e)){var r=pt.exec(e);r&&(t=r[1],n=r[2])}return{name:t,message:n}}(o);n={name:f.name,message:f.message,stack:[c]}}e(n,_e(u,o))}))}(e),n=function(e){return Bt(window,"onunhandledrejection",(function(t){var n=t.parameters[0].reason||"Empty reason",r=rt(n);e(r,n)}))}(e);return{stop:function(){t.stop(),n.stop()}}}var gt=1024,yt=/[^\u0000-\u007F]/;function mt(e){return yt.test(e)?void 0!==window.TextEncoder?(new TextEncoder).encode(e).length:new Blob([e]).size:e.length}function ht(e){return ht="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ht(e)}function bt(e,t){void 0===t&&(t=225280);var n=et(Object.prototype),r=et(Array.prototype),o=[],i=new WeakMap,a=_t(e,"$",void 0,o,i),s=JSON.stringify(a)&&JSON.stringify(a).length||0;if(!(s>t)){for(;o.length>0&&s<t;){var u=o.shift(),c=0;if(Array.isArray(u.source))for(var f=0;f<u.source.length;f++){if(s+=void 0!==(l=_t(u.source[f],u.path,f,o,i))?JSON.stringify(l).length:4,s+=c,c=1,s>t){St(t,"truncated",e);break}u.target[f]=l}else for(var f in u.source)if(Object.prototype.hasOwnProperty.call(u.source,f)){var l;if(void 0!==(l=_t(u.source[f],u.path,f,o,i))&&(s+=JSON.stringify(l).length+c+f.length+3,c=1),s>t){St(t,"truncated",e);break}u.target[f]=l}}return n(),r(),a}St(t,"discarded",e)}function _t(e,t,n,r,o){var i=function(e){var t=e;if(t&&"function"==typeof t.toJSON)try{return t.toJSON()}catch(e){}return e}(e);if(!i||"object"!==ht(i))return function(e){if("bigint"==typeof e)return"[BigInt] "+e.toString();if("function"==typeof e)return"[Function] "+e.name||0;if("symbol"===ht(e))return"[Symbol] "+e.description||0;return e}(i);var a=wt(i);if("[Object]"!==a&&"[Array]"!==a&&"[Error]"!==a)return a;var s=e;if(o.has(s))return"[Reference seen at "+o.get(s)+"]";var u=void 0!==n?t+"."+n:t,c=Array.isArray(i)?[]:{};return o.set(s,u),r.push({source:i,target:c,path:u}),c}function wt(e){try{if(e instanceof Event)return{type:(n=e).type,isTrusted:n.isTrusted,currentTarget:n.currentTarget?wt(n.currentTarget):null,target:n.target?wt(n.target):null};if(e instanceof RegExp)return"[RegExp] ".concat(e.toString());var t=Object.prototype.toString.call(e).match(/\[object (.*)\]/);if(t&&t[1])return"["+t[1]+"]"}catch(e){}var n;return"[Unserializable]"}function St(e,t,n){i.warn("The data provided has been "+t+" as it is over the limit of "+e+" characters:",n)}var xt="No stack, consider using an instance of Error",Ot="agent",kt="console",Ct="network",Et="source",Tt="logger",At="report";function Mt(e){var t=e.stackTrace,n=e.originalError,r=e.handlingStack,o=e.startClocks,i=e.nonErrorPrefix,a=e.source,s=e.handling,u=n instanceof Error,c=function(e,t,n,r){return e&&e.message&&e&&e.name?e.message:t?"Empty message":n+" "+Ye(bt(r))}(t,u,i,n),f=function(e,t){if(void 0===t)return!1;if(e)return!0;return t.stack.length>0&&(t.stack.length>1||void 0!==t.stack[0].url)}(u,t)?Lt(t):xt,l=u?Rt(n,a):void 0;return{startClocks:o,source:a,handling:s,originalError:n,message:c,stack:f,handlingStack:r,type:t&&t.name,causes:l}}function $t(){var e,t=new Error;if(!t.stack)try{throw t}catch(e){}return c((function(){var n=rt(t);n.stack=n.stack.slice(2),e=Lt(n)})),e}function Lt(e){var t=Pt(e);return T(e.stack,(function(e){var n="?"===e.func?"<anonymous>":e.func,r=e.args&&e.args.length>0?"("+e.args.join(", ")+")":"",o=e.line?":"+e.line:"",i=e.line&&e.column?":"+e.column:"";t+="\n at "+n+r+" @ "+e.url+o+i})),t}function Pt(e){return(e.name||"Error")+": "+e.message}function Rt(e,t){for(var n=e,r=[];n&&n.cause instanceof Error&&r.length<10;){var o=rt(n.cause);r.push({message:n.cause.message,source:t,type:o&&o.name,stack:o&&Lt(o)}),n=n.cause}return r.length?r:void 0}function Bt(e,t,n,r){var o=r&&r.computeHandlingStack,i=e[t];if("function"!=typeof i){if(!we(t,"on"))return{stop:J};i=J}var a=!1,s=function(){if(a)return i.apply(this,arguments);var e,t=fe(arguments);c(n,null,[{target:this,parameters:t,onPostCall:function(t){e=t},handlingStack:o?$t():void 0}]);var r=i.apply(this,t);return e&&c(e,null,[r]),r};return e[t]=s,{stop:function(){a=!0,e[t]===s&&(e[t]=i)}}}var jt=function(e){this.observers=[],this.onLastUnsubscribe=void 0,this.onFirstSubscribe=e};jt.prototype={subscribe:function(e){this.observers.push(e),1===this.observers.length&&this.onFirstSubscribe&&(this.onLastUnsubscribe=this.onFirstSubscribe(this)||void 0);var t=this;return{unsubscribe:function(){t.observers=j(t.observers,(function(t){return e!==t})),!t.observers.length&&t.onLastUnsubscribe&&t.onLastUnsubscribe()}}},notify:function(e){T(this.observers,(function(t){t(e)}))}};var It=jt;function Dt(){var e=[].slice.call(arguments);return new It((function(t){var n=I(e,(function(e){return e.subscribe((function(e){return t.notify(e)}))}));return function(){return T(n,(function(e){return e.unsubscribe()}))}}))}var Ut={};function qt(t){var n=I(t,(function(t){return Ut[t]||(Ut[t]=function(t){return new It((function(n){var r=console[t];return console[t]=function(){var o=[].slice.call(arguments);r.apply(console,arguments);var i=$t();c((function(){n.notify(function(t,n,r){var o,i=I(t,(function(e){return function(e){if("string"==typeof e)return e;if(e instanceof Error)return Pt(rt(e));return Ye(e,void 0,2)}(e)})).join(" ");if(n===e.error){var a=function(e,t){for(var n=0;n<e.length;n+=1){var r=e[n];if(t(r,n,e))return r}}(t,(function(e){return e instanceof Error}));o={stack:a?Lt(rt(a)):void 0,causes:a?Rt(a,"console"):void 0,startClocks:te(),message:i,source:kt,handling:Ge,handlingStack:r}}return{api:n,message:i,error:o,handlingStack:r}}(o,t,i))}))},function(){console[t]=r}}))}(t)),Ut[t]}));return Dt.apply(this,n)}function Ft(e,t,n,r){return Wt(e,[t],n,r)}function Wt(e,t,n,r){var o=u(r&&r.once?function(e){i(),n(e)}:n);r=r&&r.passive?{capture:r.capture,passive:r.passive}:r&&r.capture,T(t,(function(t){Nt(e,"addEventListener",(function(n){return n.call(e,t,o,r)}))}));var i=function(){T(t,(function(t){Nt(e,"removeEventListener",(function(n){return n.call(e,t,o,r)}))}))};return{stop:i}}function Nt(e,t,n){var r=v(window.EventTarget&&e instanceof EventTarget?window.EventTarget.prototype:e,t);try{n(r)}catch(r){if(function(e,t){return e instanceof Error&&(e.message.includes("Illegal invocation")||e.message.includes("'".concat(t,"' called on an object that does not implement interface EventTarget."))||e.message.includes("Can only call EventTarget.".concat(t," on instances of EventTarget")))}(r,t))return n(e[t]);throw r}}var Vt={intervention:"intervention",deprecation:"deprecation",cspViolation:"csp_violation"};function Ht(e,t){var n=[];ce(t,Vt.cspViolation)&&n.push(new It((function(e){return Ft(document,Ue,(function(t){e.notify(function(e){var t="'"+e.blockedURI+"' blocked by '"+e.effectiveDirective+"' directive";return Qt({type:e.effectiveDirective,message:Vt.cspViolation+": "+t,originalError:e,csp:{disposition:e.disposition},stack:zt(e.effectiveDirective,e.originalPolicy?"".concat(t,' of the policy "').concat(ue(e.originalPolicy,100),'"'):"no policy",e.sourceFile,e.lineNumber,e.columnNumber)})}(t))})).stop})));var r=j(t,(function(e){return e!==Vt.cspViolation}));return r.length&&n.push(function(e){return new It((function(t){if(window.ReportingObserver){var n=u((function(e){T(e,(function(e){t.notify(function(e){var t=e.body,n=e.type;return Qt({type:t.id,message:n+": "+t.message,originalError:e,stack:zt(t.id,t.message,t.sourceFile,t.lineNumber,t.columnNumber)})}(e))}))})),r=new window.ReportingObserver(n,{types:e,buffered:!0});return r.observe(),function(){r.disconnect()}}}))}(r)),Dt.apply(this,n)}function Qt(e){return A({startClocks:te(),source:ErrorSource.REPORT,handling:ErrorHandling.UNHANDLED},e)}function zt(e,t,n,r,o){return n&&Lt({name:e,message:t,stack:[{func:"?",url:n,line:r,column:o}]})}var Gt=function(){this._events=[],this.pendingEvents=[]};Gt.prototype={emit:function(e){var t=[].slice.call(arguments,1);T(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 Gt;var Jt,Xt,Kt="RAW_LOG_COLLECTED",Zt="LOG_COLLECTED";function Yt(){this.callbacks={}}function en(e){return tn(e,function(e){if(e.origin&&"null"!==e.origin)return e.origin;var t=e.host.replace(/(:80|:443)$/,"");return e.protocol+"//"+t}(window.location)).href}function tn(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 o=(n=document.implementation.createHTMLDocument("")).createElement("base");o.href=t,n.head.appendChild(o),n.body.appendChild(r)}return r.href=e,r}Yt.prototype={notify:function(e,t){var n=this.callbacks[e];n&&T(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]=j(n.callbacks[e],(function(e){return e!==t}))}}}};var nn=(null===(Xt=navigator)||void 0===Xt||null===(Xt=Xt.userAgent)||void 0===Xt?void 0:Xt.toLowerCase())||"",rn=function(){return/iphone os/.test(nn)};var on,an=/^\s+|\s+$/g,sn={rum:"/rum",log:"/logging",sessionReplay:"/rum/replay"};function un(e,t){var n=sn[t];if(!n)return"";var r=e.datakitOrigin||e.datakitUrl||e.site;0===r.indexOf("/")&&(r=location.origin+cn(r));var o=r;return o=r.lastIndexOf("/")===r.length-1?cn(r)+"v1/write"+n:cn(r)+"/v1/write"+n,e.site&&e.clientToken&&(o=o+"?token="+e.clientToken+"&to_headless=true"),o}function cn(e){return e.replace(an,"")}function fn(e,t){return"".concat(e,"_").concat(t&&t.crossSite?"cs1":"cs0","_").concat(t&&t.domain?"d1":"d0","_").concat(t&&t.secure?"sec1":"sec0","_").concat(t&&t.partitioned?"part1":"part0")}function ln(e,t,n,r){var o=new Date;o.setTime(o.getTime()+n);var i="expires="+o.toUTCString(),a=r&&r.crossSite?"none":"strict",s=r&&r.domain?";domain="+r.domain:"",u=r&&r.secure?";secure":"",c=r&&r.partitioned?";partitioned":"";document.cookie=fn(e,r)+"="+t+";"+i+";path=/;samesite="+a+s+u+c}function dn(e,t){return function(e,t){for(ae.lastIndex=0;;){var n=ae.exec(e);if(!n)break;if(n[1]===t)return n[2]}}(document.cookie,fn(e,t))}function pn(e,t){ln(e,"",0,t)}var vn=144e5,gn=9e5,yn="_gc_s",mn="cookie",hn="local-storage";function bn(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],u=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);u=!0);}catch(e){c=!0,o=e}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return _n(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_n(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _n(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var wn=/^([a-zA-Z]+)=([a-z0-9-]+)$/,Sn="&";function xn(e){return q(e)}function On(e){return void 0!==e.isExpired||!((void 0===(t=e).created||re()-Number(t.created)<vn)&&(void 0===t.expire||re()<Number(t.expire)));var t}function kn(e){return I((t=e,n=[],T(t,(function(e,t){n.push([t,e])})),n),(function(e){return e[0]+"="+e[1]})).join("&");var t,n}function Cn(e){var t={};return function(e){return!!e&&(-1!==e.indexOf(Sn)||wn.test(e))}(e)&&e.split(Sn).forEach((function(e){var n=wn.exec(e);if(null!==n){var r=bn(n,3),o=r[1],i=r[2];t[o]=i}})),t}function En(e){var t=function(e){var t={};t.secure=!!e.useSecureSessionCookie||!!e.usePartitionedCrossSiteSessionCookie||!!e.useCrossSiteSessionCookie,t.crossSite=!!e.usePartitionedCrossSiteSessionCookie||!!e.useCrossSiteSessionCookie,t.partitioned=!!e.usePartitionedCrossSiteSessionCookie,e.trackSessionAcrossSubdomains&&(t.domain=function(){if(void 0===on){for(var e="gc_site_test_".concat(H()),t=window.location.hostname.split("."),n=t.pop();t.length&&!dn(e,{domain:n});)n="".concat(t.pop(),".").concat(n),ln(e,"test",K,{domain:n});pn(e,{domain:n}),on=n}return on}());return t}(e);return function(e){if(void 0===document.cookie||null===document.cookie)return!1;try{var t="gc_cookie_test_".concat(H()),n="test";ln(t,n,Z,e);var r=dn(t,e)===n;return pn(t,e),r}catch(e){return!1}}(t)?{type:mn,cookieOptions:t}:void 0}function Tn(e){var t;return{isLockEnabled:me()===ve,persistSession:(t=e,function(e){ln(yn,kn(e),gn,t)}),retrieveSession:An(e),expireSession:function(){return function(e){ln(yn,kn({isExpired:"1"}),vn,e)}(e)}}}function An(e){return function(){return Cn(dn(yn,e))}}function Mn(){try{var e=H(),t="".concat("_gc_test_").concat(e);localStorage.setItem(t,e);var n=localStorage.getItem(t);return localStorage.removeItem(t),e===n?{type:hn}:void 0}catch(e){return}}function $n(e){localStorage.setItem(yn,kn(e))}function Ln(){return Cn(localStorage.getItem(yn))}function Pn(){$n({isExpired:"1"})}function Rn(){var e,t=window.navigator;return{status:t.onLine?"connected":"not_connected",interfaces:t.connection&&t.connection.type?[t.connection.type]:void 0,effective_type:null===(e=t.connection)||void 0===e?void 0:e.effectiveType}}var Bn="log",jn="configuration",In="debug",Dn="error",Un=["https://static.guance.com","http://localhost","<anonymous>"],qn="browser-logs-sdk",Fn=xe(),Wn=function(e){Fn.add((function(){Wn(e)}))};function Nn(e,t){var n,o=new It,i=new Set,a=t.telemetryEnabled&&Y(t.telemetrySampleRate),s={is_local_file:"file:"===window.location.protocol,is_worker:"WorkerGlobalScope"in self};return Wn=function(r){var u=Ye(r);if(a&&i.size<t.maxTelemetryEventsPerPage&&!i.has(u)){var c=function(e,t,r){return $({type:"telemetry",date:ne(),service:e,version:"3.2.42",source:"browser",telemetry:$(t,{runtime_env:r,connectivity:Rn()})},void 0!==n?n():{})}(e,r,s);o.notify(c),i.add(u)}},r=Hn,{setContextProvider:function(e){n=e},observable:o,enabled:a}}function Vn(e,t){f(e,t),Wn(A({type:Bn,message:e,status:In},t))}function Hn(e,t){Wn(A({type:Bn,status:Dn},function(e){if(e instanceof Error){var t=rt(e);return{error:{kind:t.name,stack:Lt(Qn(t))},message:t.message}}return{error:{stack:xt},message:Xe+" "+Ye(e)}}(e),t))}function Qn(e){return e.stack=e.stack.filter((function(e){return!e.url||Un.some((function(t){return we(e.url,t)}))})),e}var zn=["lock"];function Gn(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],u=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);u=!0);}catch(e){c=!0,o=e}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Jn(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Jn(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Jn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var Xn,Kn="--",Zn=[];function Yn(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=t.isLockEnabled,o=t.persistSession,i=t.expireSession,a=function(e){return o(A({},e,{lock:u}))},s=function(){var e=t.retrieveSession(),n=e.lock;return{session:function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,zn),lock:n&&!nr(n)?n:void 0}};if(Xn||(Xn=e),e===Xn){if(r&&n>=100)return Vn("Aborted session operation after max lock retries",{currentStore:s()}),void tr(t);var u,c=s();if(r){if(c.lock)return void er(e,t,n);if(u=H()+Kn+ne(),a(c.session),(c=s()).lock!==u)return void er(e,t,n)}var f=e.process(c.session);if(r&&(c=s()).lock!==u)er(e,t,n);else{if(f&&(On(f)?i():(f.expire=String(re()+gn),r?a(f):o(f))),r&&(!f||!On(f))){if((c=s()).lock!==u)return void er(e,t,n);o(c.session),f=c.session}e.after&&e.after(f||c.session),tr(t)}}else Zn.push(e)}function er(e,t,n){g((function(){Yn(e,t,n+1)}),10)}function tr(e){Xn=void 0;var t=Zn.shift();t&&Yn(t,e)}function nr(e){var t=Gn(e.split(Kn),2)[1];return!t||oe(Number(t),ne())>1e3}var rr=K;function or(e){switch(e.sessionPersistence){case mn:return En(e);case hn:return Mn();case void 0:var t=En(e);return!t&&e.allowFallbackToLocalStorage&&(t=Mn()),t;default:i.error("Invalid session persistence '".concat(String(e.sessionPersistence),"'"))}}function ir(e,t,n){var r,o=new It,i=new It,a=new It,s=e.type===mn?Tn(e.cookieOptions):{isLockEnabled:!1,persistSession:$n,retrieveSession:Ln,expireSession:Pn},u=s.expireSession,c=m((function(){Yn({process:function(e){return On(e)?{isExpired:"1"}:void 0},after:p},s)}),rr);v();var f=V((function(){Yn({process:function(e){if(!xn(e)){var r=p(e);return function(e){if(xn(e))return!1;var r=n(e[t]),o=r.trackingType,i=r.isTracked;e[t]=o,delete e.isExpired,i&&!e.id&&(e.id=H(),e.created=String(re()))}(r),r}},after:function(e){xn(e)||g()||function(e){r=e,o.notify()}(e),r=e}},s)}),rr),l=f.throttled,d=f.cancel;function p(e){return On(e)&&(e={isExpired:"1"}),g()&&(!function(e){return r.id!==e.id||r[t]!==e[t]}(e)?(a.notify({previousState:r,newState:e}),r=e):(r={isExpired:"1"},i.notify())),e}function v(){Yn({process:function(e){if(xn(e))return{isExpired:"1"}},after:function(e){r=e}},s)}function g(){return void 0!==r[t]}return{expandOrRenewSession:l,expandSession:function(){Yn({process:function(e){return g()?p(e):void 0}},s)},getSession:function(){return r},renewObservable:o,expireObservable:i,sessionStateUpdateObservable:a,restartSession:v,expire:function(){d(),u(),p({isExpired:"1"})},stop:function(){h(c)},updateSessionState:function(e){Yn({process:function(t){return A({},t,e)},after:p},s)}}}function ar(e){if(void 0===e.sampleRate||le(e.sampleRate))if(void 0===e.sessionSampleRate||le(e.sessionSampleRate)){if(void 0===e.telemetrySampleRate||le(e.telemetrySampleRate)){var t=_e(e.sessionSampleRate,e.sampleRate);return A({beforeSend:e.beforeSend&&l(e.beforeSend,"beforeSend threw an error:"),sessionStoreStrategyType:or(e),isOpenWay:e.site&&e.clientToken,sessionSampleRate:_e(t,100),service:e.service,version:e.version,env:e.env,telemetrySampleRate:_e(e.telemetrySampleRate,100),telemetryEnabled:_e(e.telemetryEnabled,!1),silentMultipleInit:!!e.silentMultipleInit,batchBytesLimit:16384,eventRateLimiterThreshold:3e3,maxTelemetryEventsPerPage:15,flushTimeout:3e4,batchMessagesLimit:50,messageBytesLimit:262144,resourceUrlLimit:5120,storeContextsToLocal:!!e.storeContextsToLocal,storeContextsKey:e.storeContextsKey,sendContentTypeByJson:!!e.sendContentTypeByJson,retryMaxSize:_e(e.retryMaxSize,-1)},function(e){var t=function(e){return!1};"isIntakeUrl"in e&&P(e.isIntakeUrl)&&W(e.isIntakeUrl())&&(t=e.isIntakeUrl);var n=function(e){return!1};return"isServerError"in e&&P(e.isServerError)&&W(e.isServerError())&&(n=e.isServerError),{rumEndpoint:un(e,"rum"),logsEndpoint:un(e,"log"),sessionReplayEndPoint:un(e,"sessionReplay"),isIntakeUrl:t,isServerError:n}}(e))}i.error("Telemetry Sample Rate should be a number between 0 and 100")}else i.error("Sample Rate should be a number between 0 and 100");else i.error("Sample Rate should be a number between 0 and 100")}var sr,ur;function cr(){return sr||(sr=new It((function(e){if(window.fetch){var t=Bt(window,"fetch",(function(t){return function(e,t){var n=e.parameters,r=e.onPostCall,o=e.handlingStack,i=n[0],a=n[1],s=a&&a.method;void 0===s&&i instanceof Request&&(s=i.method);var c=void 0!==s?String(s).toUpperCase():"GET",f=i instanceof Request?i.url:en(String(i)),l=te(),d={state:"start",init:a,input:i,method:c,startClocks:l,url:f,handlingStack:o};t.notify(d),n[0]=d.input,n[1]=d.init,r((function(e){return function(e,t,n){var r=n,o=function(t){r.state="resolve",A(r,t),e.notify(r)};t.then(u((function(e){var t="";try{t=e.constructor===Response&&e.type||""}catch(e){t=""}o({response:e,responseType:t,status:e.status,isAborted:!1})})),u((function(e){o({status:0,isAborted:r.init&&r.init.signal&&r.init.signal.aborted||e instanceof DOMException&&e.code===DOMException.ABORT_ERR,error:e})})))}(t,e,d)}))}(t,e)}),{computeHandlingStack:!0});return t.stop}}))),sr}var fr=new WeakMap;function lr(){return ur||(ur=new It((function(e){var t=Bt(XMLHttpRequest.prototype,"open",dr),n=Bt(XMLHttpRequest.prototype,"send",(function(t){!function(e,t){var n=e.target,r=e.handlingStack,o=fr.get(n);if(o){var i=o;i.state="start",i.startClocks=te(),i.isAborted=!1,i.xhr=n,i.handlingStack=r;var a=!1,s=Bt(n,"onreadystatechange",(function(){n.readyState===XMLHttpRequest.DONE&&u()})).stop,u=function(){if(c(),s(),!a){a=!0;var e=o;e.state="complete",e.duration=oe(i.startClocks.timeStamp,ne()),e.status=n.status,t.notify(A({},e))}},c=Ft(n,"loadend",u).stop;t.notify(i)}}(t,e)}),{computeHandlingStack:!0}),r=Bt(XMLHttpRequest.prototype,"setRequestHeader",pr),o=Bt(XMLHttpRequest.prototype,"abort",vr);return function(){t.stop(),n.stop(),o.stop(),r.stop()}}))),ur}function dr(e){var t=e.target,n=e.parameters[0],r=e.parameters[1];fr.set(t,{state:"open",method:String(n).toUpperCase(),url:en(String(r))})}function pr(e){var t=e.target,n=e.parameters[0],r=e.parameters[1],o=fr.get(t);if(o&&n){var i=o.requestHeaderContexts||{};i[n]=r,o.requestHeaderContexts=i}}function vr(e){var t=e.target,n=fr.get(t);n&&(n.isAborted=!0)}var gr={HIDDEN:"visibility_hidden",UNLOADING:"before_unload",PAGEHIDE:"page_hide",FROZEN:"page_frozen"};var yr={sdk_name:"_gc.sdk_name",sdk_version:"_gc.sdk_version",app_id:"application.id",env:"env",service:"service",version:"version",source:"source",userid:"user.id",user_email:"user.email",user_name:"user.name",session_id:"session.id",session_type:"session.type",session_is_forced:"session.is_forced_session",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",time_zone:"device.time_zone",device:"device.device",user_agent:"device.user_agent",view_id:"view.id",view_referrer:"view.referrer",view_url:"view.url",view_host:"view.host",view_path:"view.path",view_name:"view.name",view_path_group:"view.path_group",view_path_name:"view.pathname"},mr={view_url_query:"view.url_query",action_id:"action.id",action_ids:"action.ids",view_in_foreground:"view.in_foreground",display:"display",session_has_replay:"session.has_replay",is_login:"user.is_login",page_states:"_gc.page_states",session_sample_rate:"_gc.configuration.session_sample_rate",session_replay_sample_rate:"_gc.configuration.session_replay_sample_rate",session_on_error_sample_rate:"_gc.configuration.session_on_error_sample_rate",session_replay_on_error_sample_rate:"_gc.configuration.session_replay_on_error_sample_rate",drift:"_gc.drift"},hr={view:{type:Ve,tags:{view_loading_type:"view.loading_type",view_apdex_level:"view.apdex_level",view_privacy_replay_level:"privacy.replay_level"},fields:{view_update_time:"_gc.view_update_time",sampled_for_replay:"session.sampled_for_replay",sampled_for_error_replay:"session.sampled_for_error_replay",sampled_for_error_session:"session.sampled_for_error_session",session_error_timestamp:"session.error_timestamp_for_session",is_active:"view.is_active",session_replay_stats:"_gc.replay_stats",session_is_active:"session.is_active",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",largest_contentful_paint_element_selector:"view.largest_contentful_paint_element_selector",cumulative_layout_shift:"view.cumulative_layout_shift",cumulative_layout_shift_time:"view.cumulative_layout_shift_time",cumulative_layout_shift_target_selector:"view.cumulative_layout_shift_target_selector",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_input_target_selector:"view.first_input_target_selector",first_paint_time:"view.fpt",interaction_to_next_paint:"view.interaction_to_next_paint",interaction_to_next_paint_target_selector:"view.interaction_to_next_paint_target_selector",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",first_byte:"view.first_byte",frustration_count:"view.frustration.count",custom_timings:"view.custom_timings"}},resource:{type:He,tags:{trace_id:"_gc.trace_id",span_id:"_gc.span_id",resource_id:"resource.id",resource_status:"resource.status",resource_status_group:"resource.status_group",resource_method:"resource.method"},fields:{duration:"resource.duration",resource_size:"resource.size",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_delivery_type:"resource.delivery_type",resource_type:"resource.type",resource_protocol:"resource.protocol",resource_encode_size:"resource.encoded_body_size",resource_decode_size:"resource.decoded_body_size",resource_transfer_size:"resource.transfer_size",resource_render_blocking_status:"resource.render_blocking_status",resource_dns:"resource.dns",resource_tcp:"resource.tcp",resource_ssl:"resource.ssl",resource_ttfb:"resource.ttfb",resource_trans:"resource.trans",resource_redirect:"resource.redirect",resource_first_byte:"resource.firstbyte",resource_dns_time:"resource.dns_time",resource_download_time:"resource.download_time",resource_first_byte_time:"resource.first_byte_time",resource_connect_time:"resource.connect_time",resource_ssl_time:"resource.ssl_time",resource_redirect_time:"resource.redirect_time"}},error:{type:We,tags:{error_id:"error.id",trace_id:"_gc.trace_id",span_id:"_gc.span_id",error_source:"error.source",error_type:"error.type",error_handling:"error.handling"},fields:{error_message:["string","error.message"],error_stack:["string","error.stack"],error_causes:["string","error.causes"],error_handling_stack:["string","error.handling_stack"]}},long_task:{type:Ne,tags:{long_task_id:"long_task.id"},fields:{duration:"long_task.duration",blocking_duration:"long_task.blocking_duration",first_ui_event_timestamp:"long_task.first_ui_event_timestamp",render_start:"long_task.render_start",style_and_layout_start:"long_task.style_and_layout_start",long_task_start_time:"long_task.start_time",scripts:["string","long_task.scripts"]}},action:{type:Fe,tags:{action_type:"action.type"},fields:{action_name:"action.target.name",duration:"action.loading_time",action_error_count:"action.error.count",action_resource_count:"action.resource.count",action_frustration_types:"action.frustration.type",action_long_task_count:"action.long_task.count",action_target:"_gc.action.target",action_position:"_gc.action.position"}},telemetry:{type:"telemetry",fields:{status:"telemetry.status",message:["string","telemetry.message"],type:"telemetry.type",error_stack:["string","telemetry.error.stack"],error_kind:["string","telemetry.error.kind"],connectivity:["string","telemetry.connectivity"],runtime_env:["string","telemetry.runtime_env"],usage:["string","telemetry.usage"],configuration:["string","telemetry.configuration"]}},browser_log:{type:Qe,tags:{error_source:"error.source",error_type:"error.type",error_resource_url:"http.url",error_resource_url_host:"http.url_host",error_resource_url_path:"http.url_path",error_resource_url_path_group:"http.url_path_group",error_resource_status:"http.status_code",error_resource_status_group:"http.status_group",error_resource_method:"http.method",action_id:"user_action.id",service:"service",status:"status"},fields:{message:["string","message"],error_message:["string","error.message"],error_stack:["string","error.stack"]}}},br=Z,_r=vn,wr=[];function Sr(e,t,n){var r=new It,o=new It,i=ir(e.sessionStoreStrategyType,t,n);wr.push((function(){return i.stop()}));var a,s=function(e){var t=e.expireDelay,n=e.maxEntries,r=[];function o(){for(var e=ee()-t;r.length>0&&r[r.length-1].endTime<e;)r.pop()}return ke&&(ke=m((function(){return o()}),6e4)),Ce.add(o),{add:function(e,t){var o={value:e,startTime:t,endTime:Oe,remove:function(){Se(r,o)},close:function(e){o.endTime=e}};return n&&r.length>=n&&r.pop(),r.unshift(o),o},find:function(e,t){void 0===e&&(e=Oe),void 0===t&&(t={returnInactive:!1});for(var n=0,o=r;n<o.length;n++){var i=o[n];if(i.startTime<=e){if(t.returnInactive||e<=i.endTime)return i.value;break}}},closeActive:function(e){var t=r[0];t&&t.endTime===Oe&&t.close(e)},findAll:function(e,t){void 0===e&&(e=Oe),void 0===t&&(t=0);var n=e+t;return r.filter((function(t){return t.startTime<=n&&e<=t.endTime})).map((function(e){return e.value}))},reset:function(){r=[]},stop:function(){Ce.delete(o),0===Ce.size&&ke&&(h(ke),ke=null)}}}({expireDelay:_r});function u(){var e=i.getSession();return e?{id:e.id,trackingType:e[t],hasError:!!e.hasError,isSessionForced:!!e.forcedSession}:{id:"invalid",trackingType:"0",isSessionForced:!1,hasError:!1}}return wr.push((function(){return s.stop()})),i.renewObservable.subscribe((function(){s.add(u(),ee()),r.notify()})),i.expireObservable.subscribe((function(){o.notify(),s.closeActive(ee())})),i.expandOrRenewSession(),s.add(u(),[0,ie()][0]),a=Wt(window,[Le,Be,Pe,Re],(function(){i.expandOrRenewSession()}),{capture:!0,passive:!0}).stop,wr.push(a),function(e){var t=function(){"visible"===document.visibilityState&&e()},n=Ft(document,je,t).stop;wr.push(n);var r=m(t,br);wr.push((function(){h(r)}))}((function(){return i.expandSession()})),function(e){var t=Ft(window,De,e,{capture:!0}).stop;wr.push(t)}((function(){i.restartSession()})),{findSession:function(e,t){return s.find(e,t)},renewObservable:r,expireObservable:o,sessionStateUpdateObservable:i.sessionStateUpdateObservable,expire:i.expire,updateSessionState:i.updateSessionState}}var xr=20971520,Or=K,kr=0,Cr=1,Er=2,Tr=0,Ar=1;function Mr(e,t,n,r,o){t.transportStatus===kr&&0===t.queuedPayloads.size()&&t.bandwidthMonitor.canHandle(e)?Lr(e,t,n,{onSuccess:function(){return Pr(Tr,t,n,r,o)},onFailure:function(){t.queuedPayloads.enqueue(e),$r(t,n,r,o)}}):t.queuedPayloads.enqueue(e)}function $r(e,t,n,r){e.transportStatus===Er&&g((function(){Lr(e.queuedPayloads.first(),e,t,{onSuccess:function(){e.queuedPayloads.dequeue(),e.currentBackoffTime=Or,Pr(Ar,e,t,n,r)},onFailure:function(){e.currentBackoffTime=Math.min(256e3,2*e.currentBackoffTime),$r(e,t,n,r)}})}),e.currentBackoffTime)}function Lr(e,t,n,r){var o=r.onSuccess,i=r.onFailure;t.bandwidthMonitor.add(e),n(e,(function(n){t.bandwidthMonitor.remove(e),!function(e,t,n){return!(t.retryMaxSize>-1&&n.retry&&n.retry.count>t.retryMaxSize)&&("opaque"!==e.type&&(0===e.status&&!navigator.onLine||408===e.status||429===e.status||e.status>=500))}(n,t,e)?(t.transportStatus=kr,o()):(t.transportStatus=t.bandwidthMonitor.ongoingRequestCount>0?Cr:Er,e.retry={count:e.retry?e.retry.count+1:1,lastFailureStatus:n.status},i())}))}function Pr(e,t,n,r,o){e===Tr&&t.queuedPayloads.isFull()&&!t.queueFullReported&&(o({message:"Reached max "+r+" events size queued for upload: 20MiB",source:Ot,startClocks:te()}),t.queueFullReported=!0);var i=t.queuedPayloads;for(t.queuedPayloads=Rr();i.size()>0;)Mr(i.dequeue(),t,n,r,o)}function Rr(){var e=[];return{bytesCount:0,enqueue:function(t){this.isFull()||(e.push(t),this.bytesCount+=t.bytesCount)},first:function(){return e[0]},dequeue:function(){var t=e.shift();return t&&(this.bytesCount-=t.bytesCount),t},size:function(){return e.length},isFull:function(){return this.bytesCount>=xr}}}function Br(e,t){return e?(e=e+(-1===e.indexOf("?")?"?":"&")+"precision=ms",t&&(e=e+"&encoding="+t),e):e}function jr(e,t,n,r){void 0===n&&(n=-1);var o=function(e){return{transportStatus:kr,currentBackoffTime:Or,bandwidthMonitor:{ongoingRequestCount:0,ongoingByteCount:0,canHandle:function(e){return 0===this.ongoingRequestCount||this.ongoingByteCount+e.bytesCount<=81920&&this.ongoingRequestCount<32},add:function(e){this.ongoingRequestCount+=1,this.ongoingByteCount+=e.bytesCount},remove:function(e){this.ongoingRequestCount-=1,this.ongoingByteCount-=e.bytesCount}},queuedPayloads:Rr(),queueFullReported:!1,retryMaxSize:e}}(n),i=function(n,r){return function(e,t,n,r){var o=n.data,i=n.bytesCount,a=Br(e,n.encoding),s=function(){try{return window.Request&&"keepalive"in new Request("http://a")}catch(e){return!1}}()&&i<t;if(s){var c={method:"POST",body:o,keepalive:!0,mode:"cors"},f={"x-client-timestamp":Date.now().toString()};n.type&&(f["Content-Type"]=n.type),c.headers=f,fetch(a,c).then(u((function(e){"function"==typeof r&&r({status:e.status,type:e.type})}))).catch(u((function(){!function(e,t,n){var r={method:"POST",body:t.data,keepalive:!0,mode:"cors"},o={"x-client-timestamp":Date.now().toString()};t.type&&(o["Content-Type"]=t.type);r.headers=o,fetch(e,r).then(u((function(e){"function"==typeof n&&n({status:e.status,type:e.type})}))).catch(u((function(){"function"==typeof n&&n({status:0})})))}(a,n,r)})))}else Dr(a,n,r)}(e,t,n,r)};return{send:function(t){Mr(t,o,i,e,r)},sendOnExit:function(n){!function(e,t,n){var r=n.data,o=n.bytesCount,i=Br(e,n.encoding),a=!!navigator.sendBeacon&&o<t;if(a)try{var s;if(s=n.type?new Blob([r],{type:n.type}):r,navigator.sendBeacon(i,s))return}catch(e){!function(e){Ir||(Ir=!0,Hn(e))}(e)}Dr(i,n)}(e,t,n)}}}var Ir=!1;function Dr(e,t,n){var r=t.data,o=new XMLHttpRequest;o.open("POST",e,!0),r instanceof Blob?o.setRequestHeader("Content-Type",r.type):t.type&&o.setRequestHeader("Content-Type",t.type),o.setRequestHeader("x-client-timestamp",Date.now().toString()),Ft(o,"loadend",(function(){"function"==typeof n&&n({status:o.status})}),{once:!0}),o.send(r)}function Ur(e){return Ur="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ur(e)}function qr(e){if("object"===Ur(e)&&e)e=Ye(e);else if(!F(e))return e;return String(e).replace(/[\s=,"]/g,(function(e){return"\\"+e}))}function Fr(e,t){return"object"===Ur(e)&&e?e=Ye(e):t&&(e=""+e),e}function Wr(e){return'"'+e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')+'"'}function Nr(e){return"object"===Ur(e)&&e?Wr(Ye(e)):F(e)?Wr(e):e}function Vr(e){return function(e){if(Array.isArray(e))return Hr(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return Hr(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Hr(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Hr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var Qr="custom_keys",zr=function(e){if(!e||!e.type)return{rowStr:"",rowData:void 0};var t={tags:{},fields:{}},n=!1,r="";return T(hr,(function(o,i){if(o.type===e.type){r+=i+",",t.measurement=i;var a=[],s=M({},yr,o.tags),u=["date","type",Qr];T(s,(function(n,r){var o=se(e,n);u.push(r),(o||N(o))&&(t.tags[r]=Fr(o,!0),a.push(qr(r)+"="+qr(o)))}));var c=[],f=M({},mr,o.fields);if(T(f,(function(n,r){if(L(n)&&2===n.length){var o=n[1],i=se(e,o);u.push(r),null!=i&&(t.fields[r]=Fr(i),c.push(qr(r)+"="+Nr(i)))}else if(F(n)){i=se(e,n);u.push(r),null!=i&&(t.fields[r]=Fr(i),c.push(qr(r)+"="+Nr(i)))}})),e.context&&U(e.context)&&!q(e.context)){var l=[];T(e.context,(function(e,n){u.indexOf(n)>-1||(u.push(n),null!=e&&(l.push(n),t.fields[n]=Fr(e),c.push(qr(n)+"="+Nr(e))))})),l.length&&(t.fields[Qr]=Fr(l),c.push(qr(Qr)+"="+Nr(l)))}e.type===Qe&&T(e,(function(e,n){-1===u.indexOf(n)&&null!=e&&(t.fields[n]=Fr(e),c.push(qr(n)+"="+Nr(e)))})),a.length&&(r+=a.join(",")),c.length&&(r+=" ",r+=c.join(","),n=!0),r=r+" "+e.date,t.time=e.date}})),{rowStr:n?r:"",rowData:n?t:void 0}};function Gr(e){var t=e.encoder,n=e.request,r=e.messageBytesLimit,o=e.sendContentTypeByJson,a=e.flushController,s={},u=a.flushObservable.subscribe((function(e){!function(e){var r=R(s).join(o?",":"\n");s={};var i=(u=e.reason,ce(R(gr),u)),a=i?n.sendOnExit:n.send;var u;if(i&&t.isAsync){var f=t.finishSync();f.outputBytesCount&&a(Jr(f,o));var l=[].concat(Vr(f.pendingData),[r]).filter(Boolean).join("\n");l&&a({data:l,bytesCount:mt(l)})}else{if(r){var d=c([r],t.isEmpty());o&&(d+="]"),t.write(d)}else o&&t.write("]");t.finish((function(e){a(Jr(e))}))}}(e)}));function c(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return o?t?"["+e.join(","):","+e.join(","):t?e.join("\n"):"\n"+e.join("\n")}function f(e,n){var u=function(e){return o?Ye(zr(e).rowData):zr(e).rowStr}(e),f=t.estimateEncodedBytesCount(u);f>=r?i.warn("Discarded a message whose size was bigger than the maximum allowed size ".concat(r,"KB.")):(function(e){return void 0!==e&&void 0!==s[e]}(n)&&function(e){var n=s[e];delete s[e];var r=t.estimateEncodedBytesCount(n);a.notifyAfterRemoveMessage(r)}(n),function(e,n,r){a.notifyBeforeAddMessage(n),void 0!==r?(s[r]=e,a.notifyAfterAddMessage()):t.write(c([e],t.isEmpty()),(function(e){a.notifyAfterAddMessage(e-n)}))}(u,f,n))}return{flushController:a,add:f,upsert:f,stop:u.unsubscribe}}function Jr(e,t){return{data:"string"==typeof e.output?e.output:new Blob([e.output],{type:"text/plain"}),type:t?"application/json;UTF-8":void 0,bytesCount:e.outputBytesCount,encoding:e.encoding}}function Xr(e){var t,n=e.messagesLimit,r=e.bytesLimit,o=e.durationLimit,i=e.pageExitObservable,a=e.sessionExpireObservable,s=i.subscribe((function(e){return d(e.reason)})),u=a.subscribe((function(){return d("session_expire")})),c=new It((function(){return function(){s.unsubscribe(),u.unsubscribe()}})),f=0,l=0;function d(e){if(0!==l){var t=l,n=f;l=0,f=0,p(),c.notify({reason:e,messagesCount:t,bytesCount:n})}}function p(){y(t),t=void 0}return{flushObservable:c,getMessagesCount:function(){return l},notifyBeforeAddMessage:function(e){f+e>=r&&d("bytes_limit"),l+=1,f+=e,void 0===t&&(t=g((function(){d("duration_limit")}),o))},notifyAfterAddMessage:function(e){void 0===e&&(e=0),f+=e,l>=n?d("messages_limit"):f>=r&&d("bytes_limit")},notifyAfterRemoveMessage:function(e){f-=e,0===(l-=1)&&p()}}}function Kr(e,t,n,r,o,i){void 0===i&&(i=Gr);var a=function(e,t){return i({encoder:t.encoder,request:jr(t.endpoint,e.batchBytesLimit,e.retryMaxSize,n),flushController:Xr({messagesLimit:e.batchMessagesLimit,bytesLimit:e.batchBytesLimit,durationLimit:e.flushTimeout,pageExitObservable:r,sessionExpireObservable:o}),messageBytesLimit:e.messageBytesLimit,sendContentTypeByJson:e.sendContentTypeByJson})}(e,t);return{flushObservable:a.flushController.flushObservable,add:function(e){a.add(e)},upsert:function(e,t){a.upsert(e,t)},stop:function(){a.stop()}}}function Zr(){return p().FTWebViewJavascriptBridge}function Yr(){var e=Zr();if(e)return{getCapabilities:function(){return JSON.parse(e.getCapabilities&&e.getCapabilities()||"[]")},getPrivacyLevel:function(){return e.getPrivacyLevel&&e.getPrivacyLevel()},getAllowedWebViewHosts:function(){return JSON.parse(e.getAllowedWebViewHosts&&e.getAllowedWebViewHosts()||"[]")},send:function(t,n,r){var o=r?{id:r}:void 0;e.sendEvent(JSON.stringify({name:t,data:n,view:o}))}}}function eo(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null===(e=p().location)||void 0===e?void 0:e.hostname,n=Zr();if(n&&void 0===n.getAllowedWebViewHosts)return!0;if(n&&n.getAllowedWebViewHosts&&(null===n.getAllowedWebViewHosts()||void 0===n.getAllowedWebViewHosts()))return!0;var r=Yr();return!!r&&r.getAllowedWebViewHosts().some((function(e){return t===e||t.endsWith(".".concat(e))}))}function to(e){return to="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},to(e)}function no(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],u=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);u=!0);}catch(e){c=!0,o=e}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return ro(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ro(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ro(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function oo(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function io(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=to(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=to(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==to(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ao(e,t,n){for(var r=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?oo(Object(n),!0).forEach((function(t){io(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):oo(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},e),o=0,a=Object.entries(t);o<a.length;o++){var s=no(a[o],2),u=s[0],c=s[1],f=c.required;"string"===c.type&&u in r&&(r[u]=String(r[u])),f&&!(u in e)&&i.warn("The property ".concat(u," of ").concat(n," context is required; context will not be sent to the intake."))}return r}function so(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.customerDataTracker,r=t.propertiesConfig,o=void 0===r?{}:r,i={},a=new It,s={getContext:function(){return G(i)},setContext:function(t){"object"===Q(t)?(i=bt(ao(t,o,e)),null==n||n.updateCustomerData(i)):s.clearContext(),a.notify()},setContextProperty:function(t,r){i[t]=bt(ao(io({},t,r),o,e)[t]),null==n||n.updateCustomerData(i),a.notify()},removeContextProperty:function(t){delete i[t],null==n||n.updateCustomerData(i),ao(i,o,e),a.notify()},clearContext:function(){i={},null==n||n.resetCustomerData(),a.notify()},changeObservable:a};return s}var uo="user",co="global context",fo="_gc_s",lo=[];function po(e,t,n,r){var o=function(e,t,n){return e.storeContextsKey&&F(e.storeContextsKey)?fo+"_"+t+"_"+n+"_"+e.storeContextsKey:fo+"_"+t+"_"+n}(e,n,r);function i(){var e=localStorage.getItem(o);return null!==e?JSON.parse(e):{}}return lo.push(Ft(window,qe,(function(e){o===e.key&&t.setContext(i())}))),t.changeObservable.subscribe((function(){localStorage.setItem(o,JSON.stringify(t.getContext()))})),t.setContext($(i(),t.getContext())),t}var vo=0,go=2;function yo(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:go,t=new Map,n=!1;function r(){if(!n&&e!==vo){var r=e===go?3072:16384,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;t.forEach((function(e){o+=e.getBytesCount()})),o>r&&(!function(e){i.warn("Customer data exceeds the recommended ".concat(e/gt,"KiB threshold."))}(r),n=!0)}}return{createDetachedTracker:function(){var e=mo((function(){return r(e.getBytesCount())}));return e},getOrCreateTracker:function(e){return t.has(e)||t.set(e,mo(r)),t.get(e)},setCompressionStatus:function(t){e===vo&&(e=t,r())},getCompressionStatus:function(){return e},stop:function(){t.forEach((function(e){return e.stop()})),t.clear()}}}function mo(e){var t=0,n=V((function(n){t=mt(Ye(n)),e()}),200),r=n.throttled,o=n.cancel,i=function(){o(),t=0};return{updateCustomerData:function(e){q(e)?i():r(e)},resetCustomerData:i,getBytesCount:function(){return t},stop:function(){o()}}}function ho(){var e="",t=0;return{isAsync:!1,isEmpty:function(){return!e},write:function(n,r){var o=mt(n);t+=o,e+=n,r&&r(o)},finish:function(e){e(this.finishSync())},finishSync:function(){var n={output:e,outputBytesCount:t,rawBytesCount:t,pendingData:[]};return e="",t=0,n},estimateEncodedBytesCount:function(e){return e.length}}}function bo(e){this.map=new WeakMap,e&&e.forEach((function(e){this.map.set(e,1)}))}function _o(e,t){t.silentMultipleInit||i.error(e+" is already initialized.")}bo.prototype.add=function(e){return this.map.set(e,1),this},bo.prototype.delete=function(e){return this.map.delete(e)},bo.prototype.has=function(e){return this.map.has(e)};var wo={ok:0,debug:1,info:2,notice:4,warn:5,error:6,critical:7,alert:8,emerg:9};function So(e){return{handleLog:function(t,r,o,i,a){var s=$(r.getContext(),t.context);if(xo(t.status,Co.console,r)&&function(e,t){var r=e.status,o=e.message;n[loggerToConsoleApiName[r]].call(globalConsole,o,t)}(t,s),xo(t.status,Co.http,r)){var u={rawLogsEvent:{date:a||ne(),message:t.message,status:t.status,origin:Tt},messageContext:s,savedCommonContext:i};o&&(u.domainContext={handlingStack:o}),e.notify(Kt,u)}}}}function xo(e,t,n){var r=n.getHandler(),o=L(r)?r:[r];return wo[e]>=wo[n.getLevel()]&&ce(o,t)}function Oo(e,t){void 0===t&&(t={});var n=t.includeMessage||!1;return{stack:e.stack,kind:e.type,message:n?e.message:void 0,causes:e.causes,handling:e.handling}}var ko={ok:"ok",debug:"debug",info:"info",notice:"notice",warn:"warn",error:"error",critical:"critical",alert:"alert",emerg:"emerg"},Co={console:"console",http:"http",silent:"silent"},Eo=B(ko);function To(e,t,n,r,o,i){void 0===r&&(r=Co.http),void 0===o&&(o=ko.debug),void 0===i&&(i={}),this.contextManager=so("logger",{customerDataTracker:t}),this.handleLogStrategy=e,this.handlerType=r,this.level=o,this.contextManager.setContext(i),n&&this.contextManager.setContextProperty("logger",{name:n})}function Ao(e){return function(t,n,r){var o;xo(e,Co.http,this)&&(o=$t()),this.logImplementation(t,n,e,r,o)}}To.prototype={logImplementation:u((function(e,t,n,r,o){void 0===n&&(n=ko.info);var i,a=bt(t);if(null!=r){var s=Mt({stackTrace:r instanceof Error?rt(r):void 0,originalError:r,nonErrorPrefix:Ke,source:Tt,handling:Ge,startClocks:te()});i=$({error:Oo(s,{includeMessage:!0})},a)}else i=a;this.handleLogStrategy({message:bt(e),context:i,status:n},this,o)})),log:function(e,t,n,r){var o;xo(n,Co.http,this)&&(o=$t()),this.logImplementation(e,t,n,r,o)},setContext:function(e){this.contextManager.setContext(e)},getContext:function(){return this.contextManager.getContext()},setContextProperty:function(e,t){this.contextManager.setContextProperty(e,t)},addContext:function(e,t){this.contextManager.setContextProperty(e,t)},removeContextProperty:function(e){this.contextManager.removeContextProperty(e)},removeContext:function(e){this.contextManager.removeContextProperty(e)},clearContext:function(){this.contextManager.clearContext()},setHandler:function(e){this.handlerType=e},getHandler:function(){return this.handlerType},setLevel:function(e){this.level=e},getLevel:function(){return this.level}},To.prototype.ok=Ao(ko.ok),To.prototype.debug=Ao(ko.debug),To.prototype.info=Ao(ko.info),To.prototype.notice=Ao(ko.notice),To.prototype.warn=Ao(ko.warn),To.prototype.error=Ao(ko.error),To.prototype.critical=Ao(ko.critical),To.prototype.alert=Ao(ko.alert),To.prototype.emerg=Ao(ko.emerg);var Mo={sdkVersion:"3.2.42",sdkName:"df_web_logs_sdk"};function $o(t){var n=function(e){return e.site||e.datakitOrigin||e.datakitUrl?!(e.site&&!e.clientToken&&(i.error("clientToken is not configured, no RUM data will be collected."),1)):(i.error("datakitOrigin or site is not configured, no RUM data will be collected."),!1)}(t);if(n){var r=ar(t),o=Lo(t.forwardConsoleLogs,R(e),"Forward Console Logs"),a=Lo(t.forwardReports,R(Vt),"Forward Reports");if(r&&o&&a)return t.forwardErrorsToLogs&&!ce(o,e.error)&&o.push(e.error),A({forwardErrorsToLogs:!1!==t.forwardErrorsToLogs,forwardConsoleLogs:o,forwardReports:a,requestErrorResponseLengthLimit:32768},r,Mo)}}function Lo(e,t,n){return void 0===e?[]:"all"===e||L(e)&&function(e,t,n){if(e.every)return e.every(t);for(var r=!0,o=0;o<e.length;o++)if(O.call(e,o)){var i=e[o];if(!t.call(n,i,o,e)){r=!1;break}}return r}(e,(function(e){return ce(t,e)}))?"all"===e?t:function(e){for(var t,n=[],r={},o=0;o<e.length;o++)(t=e[o])in r||(r[t]=!0,n.push(t));return n}(e):void i.error(n+' should be "all" or an array with allowed values "'+t.join('", "')+'"')}function Po(e,t){var n,r,o=xe();return{init:function(e){if(e)if(eo()&&(e=function(e){return A({},e,{clientToken:"empty"})}(e)),n=e,r)_o("DATAFLUX_LOGS",e);else{var a=$o(e);a&&(r=a,cr().subscribe(J),function(){if(r&&n){var e=t(n,r);o.drain(e)}}())}else i.error("Missing configuration")},getInitConfiguration:function(){return n},getInternalContext:J,handleLog:function(t,n,r,i,a){void 0===i&&(i=e()),void 0===a&&(a=ne()),o.add((function(e){e.handleLog(t,n,r,i,a)}))}}}var Ro="logs";var Bo="0",jo="1";function Io(e){var t=Sr(e,"logs",(function(t){return function(e,t){var n=function(e){return e===Bo||e===jo}(t)?t:Do(e);return{trackingType:n,isTracked:n===jo}}(e,t)}));return{findTrackedSession:function(e){var n=t.findSession(e);return n&&n.trackingType===jo?{id:n.id}:void 0},expireObservable:t.expireObservable}}function Do(e){return Y(e.sessionSampleRate)?jo:Bo}function Uo(e,t,n,r,o){var i=Eo.concat(["custom"]),a={};T(i,(function(e){var n,r,i,s,u;a[e]=(n=e,r=t.eventRateLimiterThreshold,i=o,s=0,u=!1,{isLimitReached:function(){if(0===s&&g((function(){s=0}),Z),(s+=1)<=r||u)return u=!1,!1;if(s===r+1){u=!0;try{i({message:"Reached max number of "+n+"s by minute: "+r,source:Ot,startClocks:te()})}finally{u=!1}}return!0}})})),n.subscribe(Kt,(function(o){var i=o.rawLogsEvent,s=o.messageContext||void 0,u=o.savedCommonContext||void 0,c=o.domainContext,f=i.date-ie(),l=e.findTrackedSession(f);if(l){var d=u||r(),p=$({service:t.service||"browser",env:t.env||"",version:t.version||"",_gc:{sdkName:t.sdkName,sdkVersion:t.sdkVersion},session:{id:l.id},view:d.view,user:q(d.user)?void 0:d.user,device:Me,type:Qe},d.context,qo(f),i,s);t.beforeSend&&!1===t.beforeSend(p,c)||p.origin!==Ot&&_e(a[p.status],a.custom).isLimitReached()||n.notify(Zt,he(p))}}))}function qo(e){return function(t){if(t&&t.getInternalContext)return t.getInternalContext(e)}(window.DATAFLUX_RUM)}function Fo(e){return Fo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Fo(e)}function Wo(e){var t=function(e,t){if("object"!=Fo(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Fo(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Fo(t)?t:t+""}function No(e,t,n){return(t=Wo(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Vo=No(No(No(No(No({},e.log,ko.info),e.debug,ko.debug),e.info,ko.info),e.warn,ko.warn),e.error,ko.error);function Ho(e,t){if(!e.forwardErrorsToLogs)return{stop:J};var n=lr().subscribe((function(e){"complete"===e.state&&o(ze.XHR,e)})),r=cr().subscribe((function(e){"resolve"===e.state&&o(ze.FETCH,e)}));function o(n,r){function o(e){var o,i,a,s,u,c={isAborted:r.isAborted,handlingStack:r.handlingStack},f=(o=r.url,i=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)},i.prototype.setUrl=function(e){this._parse(e)},i.prototype._initValues=function(){for(var e in this._fields)this._values[e]=""},i.prototype.addQueryString=function(e){if("object"!==b(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},i.prototype.getParse=function(){return this._values},i.prototype.getUrl=function(){var e="";return e+=this._values.Origin,(e+=this._values.Path)+(this._values.QueryString?"?"+this._values.QueryString:"")},i.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 i(o)).getParse();t.notify(Kt,{rawLogsEvent:{message:zo(n)+" error "+r.method+" "+r.url,date:r.startClocks.timeStamp,error:{stack:e||"Failed to load",handing:void 0},http:{method:r.method,status_code:r.status,url:r.url,statusGroup:(u=r.status,u?String(u).substr(0,1)+String(u).substr(1).replace(/\d*/g,"x"):0===u?void 0:u),urlHost:f.Host,urlPath:f.Path,urlPathGroup:(a=f.Path,s="",a&&(s=a.replace(/\/([^\/]*)\d([^\/]*)/g,"/?").replace(/\/$/g,"")),s||"/")},status:ko.error,origin:Ct},domainContext:c})}!function(e,t){var n=[t.rumEndpoint];return t.logsEndpoint&&n.push(t.logsEndpoint),t.sessionReplayEndPoint&&n.push(t.sessionReplayEndPoint),D(n,(function(t){return 0===e.indexOf(t)}))||t.isIntakeUrl(e)}(r.url,e)&&(function(e){return 0===e.status&&"opaque"!==e.responseType}(r)||function(e){return e.status>=500}(r)||e.isServerError(r))&&("xhr"in r?function(e,t,n){"string"==typeof e.response?n(Qo(e.response,t)):n(e.response)}(r.xhr,e,o):r.response?function(e,t,n){var r=function(e){try{return e.clone()}catch(e){return}}(e);r&&r.body?window.TextDecoder?function(e,t,n){!function(e,t,n){var r=e.getReader(),o=[],i=0;function a(){var e,a;if(r.cancel().catch(J),n.collectStreamBody){var s;if(1===o.length)s=o[0];else{s=new Uint8Array(i);var u=0;T(o,(function(e){s.set(e,u),u+=e.length}))}e=s.slice(0,n.bytesLimit),a=s.length>n.bytesLimit}t(void 0,e,a)}!function e(){r.read().then(u((function(t){t.done?a():(n.collectStreamBody&&o.push(t.value),(i+=t.value.length)>n.bytesLimit?a():e())})),u((function(e){t(e)})))}()}(e,(function(e,t,r){if(e)n(e);else{var o=(new TextDecoder).decode(t);r&&(o+="..."),n(void 0,o)}}),{bytesLimit:t,collectStreamBody:!0})}(r.body,t.requestErrorResponseLengthLimit,(function(e,t){n(e?"Unable to retrieve response: "+e:t)})):r.text().then(u((function(e){return n(Qo(e,t))})),u((function(e){return n("Unable to retrieve response: "+e)}))):n()}(r.response,e,o):r.error&&function(e,t,n){n(Qo(Lt(rt(e)),t))}(r.error,e,o))}return{stop:function(){n.unsubscribe(),r.unsubscribe()}}}function Qo(e,t){return e.length>t.requestErrorResponseLengthLimit?e.substring(0,t.requestErrorResponseLengthLimit)+"...":e}function zo(e){return ze.XHR===e?"XHR":"Fetch"}function Go(e,t){if(!e.forwardErrorsToLogs)return{stop:J};var n,r=new It,o=(n=r,vt((function(e,t){n.notify(Mt({stackTrace:e,originalError:t,startClocks:te(),nonErrorPrefix:Xe,source:Et,handling:Je}))}))),i=r.subscribe((function(e){t.notify(Kt,{rawLogsEvent:{message:e.message,date:e.startClocks.timeStamp,error:Oo(e),origin:Et,status:ko.error}})}));return{stop:function(){o.stop(),i.unsubscribe()}}}var Jo,Xo,Ko,Zo,Yo=function(e){var t=yo(),n=so("global",{customerDataTracker:t.getOrCreateTracker(co)}),r=so("user",{customerDataTracker:t.getOrCreateTracker(uo),propertiesConfig:{id:{type:"string"},name:{type:"string"},email:{type:"string"}}});function o(){return function(e,t){return{view:{referrer:document.referrer,url:window.location.href},context:e.getContext(),user:t.getContext()}}(n,r)}var a,c,f=Po(o,(function(t,i){t.storeContextsToLocal&&(po(i,n,Ro,co),po(i,r,Ro,uo));var a=e(t,i,o);return f=function(e,t){return A({init:function(e){_o("DATAFLUX_LOGS",e)},initConfiguration:e},t)}(t,a),a})),l={},d=new To((function(){var e;return(e=f).handleLog.apply(e,arguments)}),t.createDetachedTracker());return a={logger:d,init:u((function(e){return f.init(e)})),getGlobalContext:u((function(){return n.getContext()})),setGlobalContext:u((function(e){return n.setContext(e)})),setGlobalContextProperty:u((function(e,t){return n.setContextProperty(e,t)})),removeGlobalContextProperty:u((function(e){return n.removeContextProperty(e)})),clearGlobalContext:u((function(){return n.clearContext()})),createLogger:u((function(e,n){return void 0===n&&(n={}),l[e]=new To((function(){var e;return(e=f).handleLog.apply(e,arguments)}),t.createDetachedTracker(),sanitize(e),n.handler,n.level,sanitize(n.context)),l[e]})),getLogger:u((function(e){return l[e]})),getInitConfiguration:u((function(){return G(f.initConfiguration)})),getInternalContext:u((function(e){return f.getInternalContext(e)})),setUser:u((function(e){(function(e){var t="object"===Q(e);return t||i.error("Unsupported user:",e),t})(e)&&r.setContext(e)})),getUser:u((function(){return r.getContext()})),removeUserProperty:u((function(e){return r.removeContextProperty(e)})),setUserProperty:u((function(e,t){r.setContextProperty(e,t)})),clearUser:u((function(){return r.clearContext()}))},c=A({onReady:function(e){e()}},a),Object.defineProperty(c,"_setDebug",{get:function(){return s},enumerable:!1}),c}((function(e,t,n){var r=new Yt,o=[],i=function(e){return function(t){e.notify(Kt,{rawLogsEvent:{message:t.message,date:t.startClocks.timeStamp,origin:Ot,status:ko.error}}),Vn("Error reported to customer",{"error.message":t.message})}}(r),a=new It((function(e){var t=Wt(window,[je,Ie],(function(t){t.type===je&&"hidden"===document.visibilityState?e.notify({reason:gr.HIDDEN}):t.type===Ie&&e.notify({reason:gr.FROZEN})}),{capture:!0}),n=Ft(window,$e,(function(){e.notify({reason:gr.UNLOADING})}));return function(){t.stop(),n.stop()}})),s=!t.sessionStoreStrategyType||eo()||Boolean(window._GUANCE_SYNTHETICS_INJECTS_RUM||dn("guance-synthetics-injects-rum"))?function(e){var t=Do(e)===jo?{}:void 0;return{findTrackedSession:function(){return t},expireObservable:new It}}(t):Io(t),u=function(e,t,n,r,o){var i=Nn(qn,t);i.setContextProvider((function(){var e=qo();return{application:{id:e&&e.application&&e.application.id},session:{id:o.findTrackedSession()&&o.findTrackedSession().id},view:{id:e&&e.view&&e.view.id},action:{id:e&&e.userAction&&e.userAction.id}}}));var a=[];if(!eo()){var s=Kr(t,{endpoint:t.rumEndpoint,encoder:ho()},n,r,o.expireObservable);a.push((function(){s.stop()}));var u=i.observable.subscribe((function(e){s.add(e)}));a.push((function(){u.unsubscribe()}))}return function(){Fn.drain()}(),function(e){Wn({type:jn,configuration:e})}(G(e)),{telemetry:i,stop:function(){a.forEach((function(e){e()}))}}}(e,t,i,a,s);o.push((function(){u.stop()})),Ho(t,r),Go(t,r),function(e,t){var n=qt(e.forwardConsoleLogs).subscribe((function(e){t.notify(Kt,{rawLogsEvent:{date:ne(),message:e.message,origin:kt,error:e.error&&Oo(e.error),status:Vo[e.api]},domainContext:{handlingStack:e.handlingStack}})}))}(t,r),function(e,t){var n=Ht(0,e.forwardReports).subscribe((function(e){var n,r,o,i=e.message,a="deprecation"===e.originalError.type?ko.warn:ko.error;a===ko.error?n=Oo(e):report.stack&&(i+=" Found in "+(r=e.stack,(o=/@ (.+)/.exec(r))&&o[1])),t.notify(Kt,{rawLogsEvent:{date:ne(),message:i,origin:At,error:n,status:a}})}))}(t,r);var c=So(r);if(Uo(s,t,r,n,i),eo())!function(e){var t=Yr();e.subscribe(Zt,(function(e){t.send("log",e)}))}(r);else{var f=function(e,t,n,r,o){var i=Kr(e,{endpoint:e.logsEndpoint,encoder:ho()},n,r,o.expireObservable);return t.subscribe(Zt,(function(e){i.add(e)})),i}(t,r,i,a,s);o.push((function(){f.stop()}))}var l,d=(l=s,{get:function(e){var t=l.findTrackedSession(e);if(t)return{session:{id:t.id}}}});return{handleLog:c.handleLog,getInternalContext:d.get,stop:function(){o.forEach((function(e){e()}))}}}));Jo=p(),Ko=Yo,Zo=Jo[Xo="DATAFLUX_LOGS"],Jo[Xo]=Ko,Zo&&Zo.q&&T(Zo.q,(function(e){l(e,"onReady callback threw an error:")()}))}();
1
+ !function(){"use strict";var e={log:"log",debug:"debug",info:"info",warn:"warn",error:"error"},t=console,n={};Object.keys(e).forEach((function(e){n[e]=t[e]||J}));var r,o="GUANCE Browser SDK:",i={debug:n.debug.bind(t,o),log:n.log.bind(t,o),info:n.info.bind(t,o),warn:n.warn.bind(t,o),error:n.error.bind(t,o)},a=!1;function s(e){a=e}function u(e){return function(){return c(e,this,arguments)}}function c(e,t,n){try{return e.apply(t,n)}catch(e){if(f(e),r)try{r(e)}catch(e){f(e)}}}function f(){var e=[].slice.call(arguments);a&&i.error.apply(null,["[MONITOR]"].concat(e))}function l(e,t){return function(){var n=[].slice.call(arguments);try{return e.apply(this,n)}catch(e){i.error(t,e)}}}function d(e){return d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},d(e)}function p(){if("object"===("undefined"==typeof globalThis?"undefined":d(globalThis)))return globalThis;Object.defineProperty(Object.prototype,"_gc_temp_",{get:function(){return this},configurable:!0});var e=_gc_temp_;return delete Object.prototype._gc_temp_,"object"!==d(e)&&(e="object"===("undefined"==typeof self?"undefined":d(self))?self:"object"===("undefined"==typeof window?"undefined":d(window))?window:{}),e}function v(e,t){var n,r=p();return r.Zone&&"function"==typeof r.Zone.__symbol__&&(n=e[r.Zone.__symbol__(t)]),n||(n=e[t]),n}function g(e,t){return v(p(),"setTimeout")(u(e),t)}function y(e){v(p(),"clearTimeout")(e)}function m(e,t){return v(p(),"setInterval")(u(e),t)}function h(e){v(p(),"clearInterval")(e)}function b(e){return b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},b(e)}var _=Array.prototype,w=(Function.prototype,Object.prototype),S=_.slice,x=w.toString,O=w.hasOwnProperty,k=_.forEach,C=Array.isArray,E=!1,T=function(e,t,n){if(null===e)return!1;if(k&&e.forEach===k)e.forEach(t,n);else if(e.length===+e.length){for(var r=0,o=e.length;r<o;r++)if(r in e&&t.call(n,e[r],r,e)===E)return!1}else for(var i in e)if(O.call(e,i)&&t.call(n,e[i],i,e)===E)return!1};function A(e){return T(S.call(arguments,1),(function(t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})),e}var M=function(e){return T(S.call(arguments,1),(function(t){for(var n in t)void 0!==t[n]&&(e[n]=t[n])})),e},$=function(e){return T(S.call(arguments,1),(function(t){for(var n in t)void 0!==t[n]&&(U(t[n])&&U(e[n])?M(e[n],t[n]):e[n]=t[n])})),e},L=C||function(e){return"[object Array]"===x.call(e)},P=function(e){if(!e)return!1;try{return/^\s*\bfunction\b/.test(e)}catch(e){return!1}},R=function(e){var t=[];return null===e||T(e,(function(e){t[t.length]=e})),t},B=function(e){var t=[];return null===e||T(e,(function(e,n){t[t.length]=n})),t},j=function(e,t,n){if(e.filter)return e.filter(t);for(var r=[],o=0;o<e.length;o++)if(O.call(e,o)){var i=e[o];t.call(n,i,o,e)&&r.push(i)}return r},I=function(e,t,n){if(e.map)return e.map(t);for(var r=[],o=0;o<e.length;o++)if(O.call(e,o)){var i=e[o];r.push(t.call(n,i,o,e))}return r},D=function(e,t,n){if(e.some)return e.some(t);for(var r=!1,o=0;o<e.length;o++)if(O.call(e,o)){var i=e[o];if(t.call(n,i,o,e)){r=!0;break}}return r},U=function(e){return null!==e&&"[object Object]"===x.call(e)},q=function(e){if(U(e)){for(var t in e)if(O.call(e,t))return!1;return!0}return!1},F=function(e){return"[object String]"===x.call(e)},W=function(e){return"[object Boolean]"===x.call(e)},N=function(e){return"[object Number]"===x.call(e)&&/[\d\.]+/.test(String(e))},V=(Date.now,function(e,t,n){var r,o,i=!n||void 0===n.leading||n.leading,a=!n||void 0===n.trailing||n.trailing,s=!1,u=this;return{throttled:function(){s?r=arguments:(i?e.apply(u,arguments):r=arguments,s=!0,o=g((function(){a&&r&&e.apply(u,r),s=!1,r=void 0}),t))},cancel:function(){y(o),s=!1,r=void 0}}});function H(e){return e?(parseInt(e,10)^16*Math.random()>>parseInt(e,10)/4).toString(16):"".concat(1e7,"-",1e3,"-",4e3,"-",8e3,"-",1e11).replace(/[018]/g,H)}function Q(e){return null===e?"null":Array.isArray(e)?"array":b(e)}function z(e,t,n){if(void 0===n&&(n=function(){if("undefined"!=typeof WeakSet){var e=new WeakSet;return{hasAlreadyBeenSeen:function(t){var n=e.has(t);return n||e.add(t),n}}}var t=[];return{hasAlreadyBeenSeen:function(e){var n=t.indexOf(e)>=0;return n||t.push(e),n}}}()),void 0===t)return e;if("object"!==b(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 o=Array.isArray(e)?e:[],i=0;i<t.length;++i)o[i]=z(o[i],t[i],n);return o}o="object"===Q(e)?e:{};for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(o[a]=z(o[a],t[a],n));return o}}function G(e){return z(void 0,e)}function J(){}var X,K=1e3,Z=6e4;function Y(e){return 0!==e&&100*Math.random()<=e}function ee(){return performance.now()}function te(){return{relative:ee(),timeStamp:ne()}}function ne(){return re()}function re(){return(new Date).getTime()}function oe(e,t){return t-e}function ie(){return void 0===X&&(X=performance.timing.navigationStart),X}var ae=/([\w-]+)\s*=\s*([^;]+)/g;function se(e,t){for(var n=t.split(".");n.length;){var r=n.shift();if(!(e&&U(e)&&r in e&&O.call(e,r)))return;e=e[r]}return e}function ue(e,t){var n=e.charCodeAt(t-1);return n>=55296&&n<=56319?e.slice(0,t+1):e.slice(0,t)}function ce(e,t){return-1!==e.indexOf(t)}function fe(e){if(Array.from)return Array.from(e);var t=[];if(e instanceof Set)e.forEach((function(e){t.push(e)}));else for(var n=0;n<e.length;n++)t.push(e[n]);return t}function le(e){return N(e)&&e>=0&&e<=100}var de,pe=0,ve=1,ge=2,ye=3;function me(){return _e(de,de=function(e){var t,n;void 0===e&&(e=window||{});var r=(null===(t=e)||void 0===t||null===(t=t.navigator)||void 0===t?void 0:t.userAgent)||"";if(e.chrome||/HeadlessChrome/.test(r))return ve;if(0===(null===(n=e.navigator.vendor)||void 0===n?void 0:n.indexOf("Apple"))||/safari/i.test(r)&&!/chrome|android/i.test(r))return ge;if(e.document.documentMode)return pe;return ye}())}function he(e){var t={};return T(e,(function(e,n){var r;t[(r=n,r.replace(/[A-Z]/g,(function(e,t){return(0!==t?"_":"")+e.toLowerCase()})).replace(/-/g,"_"))]=be(e)})),t}function be(e){return L(e)?I(e,(function(e){return be(e)})):"object"===b(e)&&null!==e?he(e):e}function _e(e,t){return null!=e?e:t}function we(e,t){return e.slice(0,t.length)===t}function Se(e,t){var n=e.indexOf(t);n>=0&&e.splice(n,1)}function xe(){var e=[];return{add:function(t){e.push(t)>500&&e.splice(0,1)},remove:function(t){Se(e,t)},drain:function(t){e.forEach((function(e){e(t)})),e.length=0}}}var Oe=1/0,ke=null,Ce=new Set;var Ee={navigator:"undefined"!=typeof window&&void 0!==window.navigator?window.navigator:{},infoMap:{engine:["WebKit","Trident","Gecko","Presto"],browser:["Safari","Chrome","Edge","IE","IE 11","IE 10","IE 9","IE 8","IE 7","Firefox","Firefox Focus","Chromium","Opera","Vivaldi","Yandex","Arora","Lunascape","QupZilla","Coc Coc","Kindle","Iceweasel","Konqueror","Iceape","SeaMonkey","Epiphany","360","360SE","360EE","UC","QQBrowser","QQ","Baidu","Maxthon","Sogou","LBBROWSER","2345Explorer","TheWorld","XiaoMi","Quark","Qiyu","Wechat",,"WechatWork","Taobao","Alipay","Weibo","Douban","Suning","iQiYi"],os:["Windows","Linux","Mac OS","Android","Ubuntu","FreeBSD","Debian","iOS","Windows Phone","BlackBerry","MeeGo","Symbian","Chrome OS","WebOS"],device:["Mobile","Tablet","iPad"]}},Te={getMatchMap:u((function(e){return{Trident:e.indexOf("Trident")>-1||e.indexOf("NET CLR")>-1,Presto:e.indexOf("Presto")>-1,WebKit:e.indexOf("AppleWebKit")>-1,Gecko:e.indexOf("Gecko/")>-1,Safari:e.indexOf("Safari")>-1,Chrome:e.indexOf("Chrome")>-1||e.indexOf("CriOS")>-1,IE:e.indexOf("MSIE")>-1||e.indexOf("Trident")>-1,Edge:e.indexOf("Edge")>-1||e.indexOf("Edg")>-1,Firefox:e.indexOf("Firefox")>-1||e.indexOf("FxiOS")>-1,"Firefox Focus":e.indexOf("Focus")>-1,Chromium:e.indexOf("Chromium")>-1,Opera:e.indexOf("Opera")>-1||e.indexOf("OPR")>-1,Vivaldi:e.indexOf("Vivaldi")>-1,Yandex:e.indexOf("YaBrowser")>-1,Arora:e.indexOf("Arora")>-1,Lunascape:e.indexOf("Lunascape")>-1,QupZilla:e.indexOf("QupZilla")>-1,"Coc Coc":e.indexOf("coc_coc_browser")>-1,Kindle:e.indexOf("Kindle")>-1||e.indexOf("Silk/")>-1,Iceweasel:e.indexOf("Iceweasel")>-1,Konqueror:e.indexOf("Konqueror")>-1,Iceape:e.indexOf("Iceape")>-1,SeaMonkey:e.indexOf("SeaMonkey")>-1,Epiphany:e.indexOf("Epiphany")>-1,360:e.indexOf("QihooBrowser")>-1||e.indexOf("QHBrowser")>-1,"360EE":e.indexOf("360EE")>-1,"360SE":e.indexOf("360SE")>-1,UC:e.indexOf("UC")>-1||e.indexOf(" UBrowser")>-1,QQBrowser:e.indexOf("QQBrowser")>-1,QQ:e.indexOf("QQ/")>-1,Baidu:e.indexOf("Baidu")>-1||e.indexOf("BIDUBrowser")>-1,Maxthon:e.indexOf("Maxthon")>-1,Sogou:e.indexOf("MetaSr")>-1||e.indexOf("Sogou")>-1,LBBROWSER:e.indexOf("LBBROWSER")>-1,"2345Explorer":e.indexOf("2345Explorer")>-1,TheWorld:e.indexOf("TheWorld")>-1,XiaoMi:e.indexOf("MiuiBrowser")>-1,Quark:e.indexOf("Quark")>-1,Qiyu:e.indexOf("Qiyu")>-1,Wechat:e.indexOf("MicroMessenger")>-1,Taobao:e.indexOf("AliApp(TB")>-1,Alipay:e.indexOf("AliApp(AP")>-1,Weibo:e.indexOf("Weibo")>-1,Douban:e.indexOf("com.douban.frodo")>-1,Suning:e.indexOf("SNEBUY-APP")>-1,iQiYi:e.indexOf("IqiyiApp")>-1,Windows:e.indexOf("Windows")>-1,Linux:e.indexOf("Linux")>-1||e.indexOf("X11")>-1,"Mac OS":e.indexOf("Macintosh")>-1,Android:e.indexOf("Android")>-1||e.indexOf("Adr")>-1,Ubuntu:e.indexOf("Ubuntu")>-1,FreeBSD:e.indexOf("FreeBSD")>-1,Debian:e.indexOf("Debian")>-1,"Windows Phone":e.indexOf("IEMobile")>-1||e.indexOf("Windows Phone")>-1,BlackBerry:e.indexOf("BlackBerry")>-1||e.indexOf("RIM")>-1,MeeGo:e.indexOf("MeeGo")>-1,Symbian:e.indexOf("Symbian")>-1,iOS:e.indexOf("like Mac OS X")>-1,"Chrome OS":e.indexOf("CrOS")>-1,WebOS:e.indexOf("hpwOS")>-1,Mobile:e.indexOf("Mobi")>-1||e.indexOf("iPh")>-1||e.indexOf("480")>-1,Tablet:e.indexOf("Tablet")>-1||e.indexOf("Nexus 7")>-1,iPad:e.indexOf("iPad")>-1}})),matchInfoMap:u((function(e){var t=Ee.navigator.userAgent||"",n=Te.getMatchMap(t);for(var r in Ee.infoMap)for(var o=0;o<Ee.infoMap[r].length;o++){var i=Ee.infoMap[r][o];n[i]&&(e[r]=i)}})),getOS:u((function(){return Te.matchInfoMap(this),this.os||"Unknown"})),getOSVersion:u((function(){var e=this,t=Ee.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}})),getDeviceType:u((function(){var e=this;return e.device="PC",Te.matchInfoMap(e),e.device})),getNetwork:u((function(){var e=window.navigator.connection||window.navigator.mozConnection||window.navigator.webkitConnection,t="unknown",n=e?e.type||e.effectiveType:null;if(n&&"string"==typeof n)switch(n){case"bluetooth":case"cellular":case"slow-2g":case"2g":case"3g":t="cellular";break;case"none":t="none";break;case"ethernet":case"wifi":case"wimax":case"4g":t="wifi";break;case"other":case"unknown":t="unknown"}return t})),getLanguage:u((function(){var e;return this.language=((e=(Ee.navigator.browserLanguage||Ee.navigator.language||"").split("-"))[1]&&(e[1]=e[1].toUpperCase()),e.join("_")),this.language})),getTimeZone:u((function(){try{return(new Intl.DateTimeFormat).resolvedOptions().timeZone}catch(e){return}})),getBrowserInfo:u((function(){var e=this;Te.matchInfoMap(e);var t=Ee.navigator.userAgent||"",n=function(e,t){var n=Ee.navigator.mimeTypes;for(var r in n)if(n[r][e]==t)return!0;return!1},r=Te.getMatchMap(t),o=!1;if("undefined"!=typeof window&&window.chrome){var i=t.replace(/^.*Chrome\/([\d]+).*$/,"$1");i>36&&window.showModalDialog?o=!0:i>45&&(o=n("type","application/vnd.chromium.remoting-viewer"))}if(r.Baidu&&r.Opera&&(r.Baidu=!1),r.Mobile&&(r.Mobile=!(t.indexOf("iPad")>-1)),o&&(n("type","application/gameplugin")||Ee.navigator&&Ee.navigator.connection&&void 0===Ee.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:u((function(e){navigator&&navigator.geolocation&&navigator.geolocation.getCurrentPosition((function(t){e(t)}),(function(e){i.warn(e)}))}))},Ae={};"undefined"!=typeof window&&(Ae={os:Te.getOS(),osVersion:Te.getOSVersion().version,osVersionMajor:Te.getOSVersion().osMajor,browser:Te.getBrowserInfo().browser,browserVersion:Te.getBrowserInfo().browserVersion,browserVersionMajor:Te.getBrowserInfo().browserMajor,screenSize:window.screen.width+"*"+window.screen.height,networkType:Te.getNetwork(),device:Te.getDeviceType(),timeZone:Te.getTimeZone(),userAgent:Ee.navigator.userAgent||""});var Me=Ae,$e="beforeunload",Le="click",Pe="keydown",Re="scroll",Be="touchstart",je="visibilitychange",Ie="freeze",De="resume",Ue="securitypolicyviolation",qe="storage",Fe="action",We="error",Ne="long_task",Ve="view",He="resource",Qe="logger",ze={FETCH:"fetch",XHR:"xhr"},Ge="handled",Je="unhandled",Xe="Uncaught",Ke="Provided";function Ze(e){return Ze="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ze(e)}function Ye(e,t,n){if("object"!==Ze(e)||null===e)return JSON.stringify(e);var r=et(Object.prototype),o=et(Array.prototype),i=et(Object.getPrototypeOf(e)),a=et(e);try{return JSON.stringify(e,t,n)}catch(e){return"<error: unable to serialize object>"}finally{r(),o(),i(),a()}}function et(e){var t=e,n=t.toJSON;return n?(delete t.toJSON,function(){t.toJSON=n}):J}function tt(e){return tt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},tt(e)}var nt="?";function rt(e){var t=[],n=dt(e,"stack"),r=String(e);return n&&n.startsWith(r)&&(n=n.slice(r.length)),n&&T(n.split("\n"),(function(e){var n=function(e){var t=at.exec(e);if(!t)return;var n=t[2]&&0===t[2].indexOf("native"),r=t[2]&&0===t[2].indexOf("eval"),o=st.exec(t[2]);r&&o&&(t[2]=o[1],t[3]=o[2],t[4]=o[3]);return{args:n?[t[2]]:[],column:t[4]?+t[4]:void 0,func:t[1]||nt,line:t[3]?+t[3]:void 0,url:n?void 0:t[2]}}(e)||function(e){var t=ut.exec(e);if(!t)return;return{args:[],column:t[3]?+t[3]:void 0,func:nt,line:t[2]?+t[2]:void 0,url:t[1]}}(e)||function(e){var t=ct.exec(e);if(!t)return;return{args:[],column:t[4]?+t[4]:void 0,func:t[1]||nt,line:+t[3],url:t[2]}}(e)||function(e){var t=ft.exec(e);if(!t)return;var n=t[3]&&t[3].indexOf(" > eval")>-1,r=lt.exec(t[3]);n&&r&&(t[3]=r[1],t[4]=r[2],t[5]=void 0);return{args:t[2]?t[2].split(","):[],column:t[5]?+t[5]:void 0,func:t[1]||nt,line:t[4]?+t[4]:void 0,url:t[3]}}(e);n&&(!n.func&&n.line&&(n.func=nt),t.push(n))})),{message:dt(e,"message"),name:dt(e,"name"),stack:t}}var ot="((?:file|https?|blob|chrome-extension|electron|native|eval|webpack|<anonymous>|\\w+\\.|\\/).*?)",it="(?::(\\d+))",at=new RegExp("^\\s*at (.*?) ?\\("+ot+it+"?"+it+"?\\)?\\s*$","i"),st=new RegExp("\\((\\S*)"+it+it+"\\)");var ut=new RegExp("^\\s*at ?"+ot+it+"?"+it+"??\\s*$","i");var ct=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i;var ft=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|capacitor|\[native).*?|[^@]*bundle|\[wasm code\])(?::(\d+))?(?::(\d+))?\s*$/i,lt=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i;function dt(e,t){if("object"===tt(e)&&e&&t in e){var n=e[t];return"string"==typeof n?n:void 0}}var pt=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?([\s\S]*)$/;function vt(e){var t=function(e){return Bt(window,"onerror",(function(t){var n,r=t.parameters,o=r[0],i=r[1],a=r[2],s=r[3],u=r[4];if(u instanceof Error)n=rt(u);else{var c={url:i,column:s,line:a},f=function(e){var t,n;if("[object String]"==={}.toString.call(e)){var r=pt.exec(e);r&&(t=r[1],n=r[2])}return{name:t,message:n}}(o);n={name:f.name,message:f.message,stack:[c]}}e(n,_e(u,o))}))}(e),n=function(e){return Bt(window,"onunhandledrejection",(function(t){var n=t.parameters[0].reason||"Empty reason",r=rt(n);e(r,n)}))}(e);return{stop:function(){t.stop(),n.stop()}}}var gt=1024,yt=/[^\u0000-\u007F]/;function mt(e){return yt.test(e)?void 0!==window.TextEncoder?(new TextEncoder).encode(e).length:new Blob([e]).size:e.length}function ht(e){return ht="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ht(e)}function bt(e,t){void 0===t&&(t=225280);var n=et(Object.prototype),r=et(Array.prototype),o=[],i=new WeakMap,a=_t(e,"$",void 0,o,i),s=JSON.stringify(a)&&JSON.stringify(a).length||0;if(!(s>t)){for(;o.length>0&&s<t;){var u=o.shift(),c=0;if(Array.isArray(u.source))for(var f=0;f<u.source.length;f++){if(s+=void 0!==(l=_t(u.source[f],u.path,f,o,i))?JSON.stringify(l).length:4,s+=c,c=1,s>t){St(t,"truncated",e);break}u.target[f]=l}else for(var f in u.source)if(Object.prototype.hasOwnProperty.call(u.source,f)){var l;if(void 0!==(l=_t(u.source[f],u.path,f,o,i))&&(s+=JSON.stringify(l).length+c+f.length+3,c=1),s>t){St(t,"truncated",e);break}u.target[f]=l}}return n(),r(),a}St(t,"discarded",e)}function _t(e,t,n,r,o){var i=function(e){var t=e;if(t&&"function"==typeof t.toJSON)try{return t.toJSON()}catch(e){}return e}(e);if(!i||"object"!==ht(i))return function(e){if("bigint"==typeof e)return"[BigInt] "+e.toString();if("function"==typeof e)return"[Function] "+e.name||0;if("symbol"===ht(e))return"[Symbol] "+e.description||0;return e}(i);var a=wt(i);if("[Object]"!==a&&"[Array]"!==a&&"[Error]"!==a)return a;var s=e;if(o.has(s))return"[Reference seen at "+o.get(s)+"]";var u=void 0!==n?t+"."+n:t,c=Array.isArray(i)?[]:{};return o.set(s,u),r.push({source:i,target:c,path:u}),c}function wt(e){try{if(e instanceof Event)return{type:(n=e).type,isTrusted:n.isTrusted,currentTarget:n.currentTarget?wt(n.currentTarget):null,target:n.target?wt(n.target):null};if(e instanceof RegExp)return"[RegExp] ".concat(e.toString());var t=Object.prototype.toString.call(e).match(/\[object (.*)\]/);if(t&&t[1])return"["+t[1]+"]"}catch(e){}var n;return"[Unserializable]"}function St(e,t,n){i.warn("The data provided has been "+t+" as it is over the limit of "+e+" characters:",n)}var xt="No stack, consider using an instance of Error",Ot="agent",kt="console",Ct="network",Et="source",Tt="logger",At="report";function Mt(e){var t=e.stackTrace,n=e.originalError,r=e.handlingStack,o=e.startClocks,i=e.nonErrorPrefix,a=e.source,s=e.handling,u=n instanceof Error,c=function(e,t,n,r){return e&&e.message&&e&&e.name?e.message:t?"Empty message":n+" "+Ye(bt(r))}(t,u,i,n),f=function(e,t){if(void 0===t)return!1;if(e)return!0;return t.stack.length>0&&(t.stack.length>1||void 0!==t.stack[0].url)}(u,t)?Lt(t):xt,l=u?Rt(n,a):void 0;return{startClocks:o,source:a,handling:s,originalError:n,message:c,stack:f,handlingStack:r,type:t&&t.name,causes:l}}function $t(){var e,t=new Error;if(!t.stack)try{throw t}catch(e){}return c((function(){var n=rt(t);n.stack=n.stack.slice(2),e=Lt(n)})),e}function Lt(e){var t=Pt(e);return T(e.stack,(function(e){var n="?"===e.func?"<anonymous>":e.func,r=e.args&&e.args.length>0?"("+e.args.join(", ")+")":"",o=e.line?":"+e.line:"",i=e.line&&e.column?":"+e.column:"";t+="\n at "+n+r+" @ "+e.url+o+i})),t}function Pt(e){return(e.name||"Error")+": "+e.message}function Rt(e,t){for(var n=e,r=[];n&&n.cause instanceof Error&&r.length<10;){var o=rt(n.cause);r.push({message:n.cause.message,source:t,type:o&&o.name,stack:o&&Lt(o)}),n=n.cause}return r.length?r:void 0}function Bt(e,t,n,r){var o=r&&r.computeHandlingStack,i=e[t];if("function"!=typeof i){if(!we(t,"on"))return{stop:J};i=J}var a=!1,s=function(){if(a)return i.apply(this,arguments);var e,t=fe(arguments);c(n,null,[{target:this,parameters:t,onPostCall:function(t){e=t},handlingStack:o?$t():void 0}]);var r=i.apply(this,t);return e&&c(e,null,[r]),r};return e[t]=s,{stop:function(){a=!0,e[t]===s&&(e[t]=i)}}}var jt=function(e){this.observers=[],this.onLastUnsubscribe=void 0,this.onFirstSubscribe=e};jt.prototype={subscribe:function(e){this.observers.push(e),1===this.observers.length&&this.onFirstSubscribe&&(this.onLastUnsubscribe=this.onFirstSubscribe(this)||void 0);var t=this;return{unsubscribe:function(){t.observers=j(t.observers,(function(t){return e!==t})),!t.observers.length&&t.onLastUnsubscribe&&t.onLastUnsubscribe()}}},notify:function(e){T(this.observers,(function(t){t(e)}))}};var It=jt;function Dt(){var e=[].slice.call(arguments);return new It((function(t){var n=I(e,(function(e){return e.subscribe((function(e){return t.notify(e)}))}));return function(){return T(n,(function(e){return e.unsubscribe()}))}}))}var Ut={};function qt(t){var n=I(t,(function(t){return Ut[t]||(Ut[t]=function(t){return new It((function(n){var r=console[t];return console[t]=function(){var o=[].slice.call(arguments);r.apply(console,arguments);var i=$t();c((function(){n.notify(function(t,n,r){var o,i=I(t,(function(e){return function(e){if("string"==typeof e)return e;if(e instanceof Error)return Pt(rt(e));return Ye(e,void 0,2)}(e)})).join(" ");if(n===e.error){var a=function(e,t){for(var n=0;n<e.length;n+=1){var r=e[n];if(t(r,n,e))return r}}(t,(function(e){return e instanceof Error}));o={stack:a?Lt(rt(a)):void 0,causes:a?Rt(a,"console"):void 0,startClocks:te(),message:i,source:kt,handling:Ge,handlingStack:r}}return{api:n,message:i,error:o,handlingStack:r}}(o,t,i))}))},function(){console[t]=r}}))}(t)),Ut[t]}));return Dt.apply(this,n)}function Ft(e,t,n,r){return Wt(e,[t],n,r)}function Wt(e,t,n,r){var o=u(r&&r.once?function(e){i(),n(e)}:n);r=r&&r.passive?{capture:r.capture,passive:r.passive}:r&&r.capture,T(t,(function(t){Nt(e,"addEventListener",(function(n){return n.call(e,t,o,r)}))}));var i=function(){T(t,(function(t){Nt(e,"removeEventListener",(function(n){return n.call(e,t,o,r)}))}))};return{stop:i}}function Nt(e,t,n){var r=v(window.EventTarget&&e instanceof EventTarget?window.EventTarget.prototype:e,t);try{n(r)}catch(r){if(function(e,t){return e instanceof Error&&(e.message.includes("Illegal invocation")||e.message.includes("'".concat(t,"' called on an object that does not implement interface EventTarget."))||e.message.includes("Can only call EventTarget.".concat(t," on instances of EventTarget")))}(r,t))return n(e[t]);throw r}}var Vt={intervention:"intervention",deprecation:"deprecation",cspViolation:"csp_violation"};function Ht(e,t){var n=[];ce(t,Vt.cspViolation)&&n.push(new It((function(e){return Ft(document,Ue,(function(t){e.notify(function(e){var t="'"+e.blockedURI+"' blocked by '"+e.effectiveDirective+"' directive";return Qt({type:e.effectiveDirective,message:Vt.cspViolation+": "+t,originalError:e,csp:{disposition:e.disposition},stack:zt(e.effectiveDirective,e.originalPolicy?"".concat(t,' of the policy "').concat(ue(e.originalPolicy,100),'"'):"no policy",e.sourceFile,e.lineNumber,e.columnNumber)})}(t))})).stop})));var r=j(t,(function(e){return e!==Vt.cspViolation}));return r.length&&n.push(function(e){return new It((function(t){if(window.ReportingObserver){var n=u((function(e){T(e,(function(e){t.notify(function(e){var t=e.body,n=e.type;return Qt({type:t.id,message:n+": "+t.message,originalError:e,stack:zt(t.id,t.message,t.sourceFile,t.lineNumber,t.columnNumber)})}(e))}))})),r=new window.ReportingObserver(n,{types:e,buffered:!0});return r.observe(),function(){r.disconnect()}}}))}(r)),Dt.apply(this,n)}function Qt(e){return A({startClocks:te(),source:ErrorSource.REPORT,handling:ErrorHandling.UNHANDLED},e)}function zt(e,t,n,r,o){return n&&Lt({name:e,message:t,stack:[{func:"?",url:n,line:r,column:o}]})}var Gt=function(){this._events=[],this.pendingEvents=[]};Gt.prototype={emit:function(e){var t=[].slice.call(arguments,1);T(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 Gt;var Jt,Xt,Kt="RAW_LOG_COLLECTED",Zt="LOG_COLLECTED";function Yt(){this.callbacks={}}function en(e){return tn(e,function(e){if(e.origin&&"null"!==e.origin)return e.origin;var t=e.host.replace(/(:80|:443)$/,"");return e.protocol+"//"+t}(window.location)).href}function tn(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 o=(n=document.implementation.createHTMLDocument("")).createElement("base");o.href=t,n.head.appendChild(o),n.body.appendChild(r)}return r.href=e,r}Yt.prototype={notify:function(e,t){var n=this.callbacks[e];n&&T(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]=j(n.callbacks[e],(function(e){return e!==t}))}}}};var nn=(null===(Xt=navigator)||void 0===Xt||null===(Xt=Xt.userAgent)||void 0===Xt?void 0:Xt.toLowerCase())||"",rn=function(){return/iphone os/.test(nn)};var on,an=/^\s+|\s+$/g,sn={rum:"/rum",log:"/logging",sessionReplay:"/rum/replay"};function un(e,t){var n=sn[t];if(!n)return"";var r=e.datakitOrigin||e.datakitUrl||e.site;0===r.indexOf("/")&&(r=location.origin+cn(r));var o=r;return o=r.lastIndexOf("/")===r.length-1?cn(r)+"v1/write"+n:cn(r)+"/v1/write"+n,e.site&&e.clientToken&&(o=o+"?token="+e.clientToken+"&to_headless=true"),o}function cn(e){return e.replace(an,"")}function fn(e,t){return"".concat(e,"_").concat(t&&t.crossSite?"cs1":"cs0","_").concat(t&&t.domain?"d1":"d0","_").concat(t&&t.secure?"sec1":"sec0","_").concat(t&&t.partitioned?"part1":"part0")}function ln(e,t,n,r){var o=new Date;o.setTime(o.getTime()+n);var i="expires="+o.toUTCString(),a=r&&r.crossSite?"none":"strict",s=r&&r.domain?";domain="+r.domain:"",u=r&&r.secure?";secure":"",c=r&&r.partitioned?";partitioned":"";document.cookie=fn(e,r)+"="+t+";"+i+";path=/;samesite="+a+s+u+c}function dn(e,t){return function(e,t){for(ae.lastIndex=0;;){var n=ae.exec(e);if(!n)break;if(n[1]===t)return n[2]}}(document.cookie,fn(e,t))}function pn(e,t){ln(e,"",0,t)}var vn=144e5,gn=9e5,yn="_gc_s",mn="cookie",hn="local-storage";function bn(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],u=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);u=!0);}catch(e){c=!0,o=e}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return _n(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_n(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _n(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var wn=/^([a-zA-Z]+)=([a-z0-9-]+)$/,Sn="&";function xn(e){return q(e)}function On(e){return void 0!==e.isExpired||!((void 0===(t=e).created||re()-Number(t.created)<vn)&&(void 0===t.expire||re()<Number(t.expire)));var t}function kn(e){return I((t=e,n=[],T(t,(function(e,t){n.push([t,e])})),n),(function(e){return e[0]+"="+e[1]})).join("&");var t,n}function Cn(e){var t={};return function(e){return!!e&&(-1!==e.indexOf(Sn)||wn.test(e))}(e)&&e.split(Sn).forEach((function(e){var n=wn.exec(e);if(null!==n){var r=bn(n,3),o=r[1],i=r[2];t[o]=i}})),t}function En(e){var t=function(e){var t={};t.secure=!!e.useSecureSessionCookie||!!e.usePartitionedCrossSiteSessionCookie||!!e.useCrossSiteSessionCookie,t.crossSite=!!e.usePartitionedCrossSiteSessionCookie||!!e.useCrossSiteSessionCookie,t.partitioned=!!e.usePartitionedCrossSiteSessionCookie,e.trackSessionAcrossSubdomains&&(t.domain=function(){if(void 0===on){for(var e="gc_site_test_".concat(H()),t=window.location.hostname.split("."),n=t.pop();t.length&&!dn(e,{domain:n});)n="".concat(t.pop(),".").concat(n),ln(e,"test",K,{domain:n});pn(e,{domain:n}),on=n}return on}());return t}(e);return function(e){if(void 0===document.cookie||null===document.cookie)return!1;try{var t="gc_cookie_test_".concat(H()),n="test";ln(t,n,Z,e);var r=dn(t,e)===n;return pn(t,e),r}catch(e){return!1}}(t)?{type:mn,cookieOptions:t}:void 0}function Tn(e){var t;return{isLockEnabled:me()===ve,persistSession:(t=e,function(e){ln(yn,kn(e),gn,t)}),retrieveSession:An(e),expireSession:function(){return function(e){ln(yn,kn({isExpired:"1"}),vn,e)}(e)}}}function An(e){return function(){return Cn(dn(yn,e))}}function Mn(){try{var e=H(),t="".concat("_gc_test_").concat(e);localStorage.setItem(t,e);var n=localStorage.getItem(t);return localStorage.removeItem(t),e===n?{type:hn}:void 0}catch(e){return}}function $n(e){localStorage.setItem(yn,kn(e))}function Ln(){return Cn(localStorage.getItem(yn))}function Pn(){$n({isExpired:"1"})}function Rn(){var e,t=window.navigator;return{status:t.onLine?"connected":"not_connected",interfaces:t.connection&&t.connection.type?[t.connection.type]:void 0,effective_type:null===(e=t.connection)||void 0===e?void 0:e.effectiveType}}var Bn="log",jn="configuration",In="debug",Dn="error",Un=["https://static.guance.com","http://localhost","<anonymous>"],qn="browser-logs-sdk",Fn=xe(),Wn=function(e){Fn.add((function(){Wn(e)}))};function Nn(e,t){var n,o=new It,i=new Set,a=t.telemetryEnabled&&Y(t.telemetrySampleRate),s={is_local_file:"file:"===window.location.protocol,is_worker:"WorkerGlobalScope"in self};return Wn=function(r){var u=Ye(r);if(a&&i.size<t.maxTelemetryEventsPerPage&&!i.has(u)){var c=function(e,t,r){return $({type:"telemetry",date:ne(),service:e,version:"3.2.48",source:"browser",telemetry:$(t,{runtime_env:r,connectivity:Rn()})},void 0!==n?n():{})}(e,r,s);o.notify(c),i.add(u)}},r=Hn,{setContextProvider:function(e){n=e},observable:o,enabled:a}}function Vn(e,t){f(e,t),Wn(A({type:Bn,message:e,status:In},t))}function Hn(e,t){Wn(A({type:Bn,status:Dn},function(e){if(e instanceof Error){var t=rt(e);return{error:{kind:t.name,stack:Lt(Qn(t))},message:t.message}}return{error:{stack:xt},message:Xe+" "+Ye(e)}}(e),t))}function Qn(e){return e.stack=e.stack.filter((function(e){return!e.url||Un.some((function(t){return we(e.url,t)}))})),e}var zn=["lock"];function Gn(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],u=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);u=!0);}catch(e){c=!0,o=e}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Jn(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Jn(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Jn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var Xn,Kn="--",Zn=[];function Yn(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=t.isLockEnabled,o=t.persistSession,i=t.expireSession,a=function(e){return o(A({},e,{lock:u}))},s=function(){var e=t.retrieveSession(),n=e.lock;return{session:function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,zn),lock:n&&!nr(n)?n:void 0}};if(Xn||(Xn=e),e===Xn){if(r&&n>=100)return Vn("Aborted session operation after max lock retries",{currentStore:s()}),void tr(t);var u,c=s();if(r){if(c.lock)return void er(e,t,n);if(u=H()+Kn+ne(),a(c.session),(c=s()).lock!==u)return void er(e,t,n)}var f=e.process(c.session);if(r&&(c=s()).lock!==u)er(e,t,n);else{if(f&&(On(f)?i():(f.expire=String(re()+gn),r?a(f):o(f))),r&&(!f||!On(f))){if((c=s()).lock!==u)return void er(e,t,n);o(c.session),f=c.session}e.after&&e.after(f||c.session),tr(t)}}else Zn.push(e)}function er(e,t,n){g((function(){Yn(e,t,n+1)}),10)}function tr(e){Xn=void 0;var t=Zn.shift();t&&Yn(t,e)}function nr(e){var t=Gn(e.split(Kn),2)[1];return!t||oe(Number(t),ne())>1e3}var rr=K;function or(e){switch(e.sessionPersistence){case mn:return En(e);case hn:return Mn();case void 0:var t=En(e);return!t&&e.allowFallbackToLocalStorage&&(t=Mn()),t;default:i.error("Invalid session persistence '".concat(String(e.sessionPersistence),"'"))}}function ir(e,t,n){var r,o=new It,i=new It,a=new It,s=e.type===mn?Tn(e.cookieOptions):{isLockEnabled:!1,persistSession:$n,retrieveSession:Ln,expireSession:Pn},u=s.expireSession,c=m((function(){Yn({process:function(e){return On(e)?{isExpired:"1"}:void 0},after:p},s)}),rr);v();var f=V((function(){Yn({process:function(e){if(!xn(e)){var r=p(e);return function(e){if(xn(e))return!1;var r=n(e[t]),o=r.trackingType,i=r.isTracked;e[t]=o,delete e.isExpired,i&&!e.id&&(e.id=H(),e.created=String(re()))}(r),r}},after:function(e){xn(e)||g()||function(e){r=e,o.notify()}(e),r=e}},s)}),rr),l=f.throttled,d=f.cancel;function p(e){return On(e)&&(e={isExpired:"1"}),g()&&(!function(e){return r.id!==e.id||r[t]!==e[t]}(e)?(a.notify({previousState:r,newState:e}),r=e):(r={isExpired:"1"},i.notify())),e}function v(){Yn({process:function(e){if(xn(e))return{isExpired:"1"}},after:function(e){r=e}},s)}function g(){return void 0!==r[t]}return{expandOrRenewSession:l,expandSession:function(){Yn({process:function(e){return g()?p(e):void 0}},s)},getSession:function(){return r},renewObservable:o,expireObservable:i,sessionStateUpdateObservable:a,restartSession:v,expire:function(){d(),u(),p({isExpired:"1"})},stop:function(){h(c)},updateSessionState:function(e){Yn({process:function(t){return A({},t,e)},after:p},s)}}}function ar(e){if(void 0===e.sampleRate||le(e.sampleRate))if(void 0===e.sessionSampleRate||le(e.sessionSampleRate)){if(void 0===e.telemetrySampleRate||le(e.telemetrySampleRate)){var t=_e(e.sessionSampleRate,e.sampleRate);return A({beforeSend:e.beforeSend&&l(e.beforeSend,"beforeSend threw an error:"),sessionStoreStrategyType:or(e),isOpenWay:e.site&&e.clientToken,sessionSampleRate:_e(t,100),service:e.service,version:e.version,env:e.env,telemetrySampleRate:_e(e.telemetrySampleRate,100),telemetryEnabled:_e(e.telemetryEnabled,!1),silentMultipleInit:!!e.silentMultipleInit,batchBytesLimit:16384,eventRateLimiterThreshold:3e3,maxTelemetryEventsPerPage:15,flushTimeout:3e4,batchMessagesLimit:50,messageBytesLimit:262144,resourceUrlLimit:5120,storeContextsToLocal:!!e.storeContextsToLocal,storeContextsKey:e.storeContextsKey,sendContentTypeByJson:!!e.sendContentTypeByJson,retryMaxSize:_e(e.retryMaxSize,-1)},function(e){var t=function(e){return!1};"isIntakeUrl"in e&&P(e.isIntakeUrl)&&W(e.isIntakeUrl())&&(t=e.isIntakeUrl);var n=function(e){return!1};return"isServerError"in e&&P(e.isServerError)&&W(e.isServerError())&&(n=e.isServerError),{rumEndpoint:un(e,"rum"),logsEndpoint:un(e,"log"),sessionReplayEndPoint:un(e,"sessionReplay"),isIntakeUrl:t,isServerError:n}}(e))}i.error("Telemetry Sample Rate should be a number between 0 and 100")}else i.error("Sample Rate should be a number between 0 and 100");else i.error("Sample Rate should be a number between 0 and 100")}var sr,ur;function cr(){return sr||(sr=new It((function(e){if(window.fetch){var t=Bt(window,"fetch",(function(t){return function(e,t){var n=e.parameters,r=e.onPostCall,o=e.handlingStack,i=n[0],a=n[1],s=a&&a.method;void 0===s&&i instanceof Request&&(s=i.method);var c=void 0!==s?String(s).toUpperCase():"GET",f=i instanceof Request?i.url:en(String(i)),l=te(),d={state:"start",init:a,input:i,method:c,startClocks:l,url:f,handlingStack:o};t.notify(d),n[0]=d.input,n[1]=d.init,r((function(e){return function(e,t,n){var r=n,o=function(t){r.state="resolve",A(r,t),e.notify(r)};t.then(u((function(e){var t="";try{t=e.constructor===Response&&e.type||""}catch(e){t=""}o({response:e,responseType:t,status:e.status,isAborted:!1})})),u((function(e){o({status:0,isAborted:r.init&&r.init.signal&&r.init.signal.aborted||e instanceof DOMException&&e.code===DOMException.ABORT_ERR,error:e})})))}(t,e,d)}))}(t,e)}),{computeHandlingStack:!0});return t.stop}}))),sr}var fr=new WeakMap;function lr(){return ur||(ur=new It((function(e){var t=Bt(XMLHttpRequest.prototype,"open",dr),n=Bt(XMLHttpRequest.prototype,"send",(function(t){!function(e,t){var n=e.target,r=e.handlingStack,o=fr.get(n);if(o){var i=o;i.state="start",i.startClocks=te(),i.isAborted=!1,i.xhr=n,i.handlingStack=r;var a=!1,s=Bt(n,"onreadystatechange",(function(){n.readyState===XMLHttpRequest.DONE&&u()})).stop,u=function(){if(c(),s(),!a){a=!0;var e=o;e.state="complete",e.duration=oe(i.startClocks.timeStamp,ne()),e.status=n.status,t.notify(A({},e))}},c=Ft(n,"loadend",u).stop;t.notify(i)}}(t,e)}),{computeHandlingStack:!0}),r=Bt(XMLHttpRequest.prototype,"setRequestHeader",pr),o=Bt(XMLHttpRequest.prototype,"abort",vr);return function(){t.stop(),n.stop(),o.stop(),r.stop()}}))),ur}function dr(e){var t=e.target,n=e.parameters[0],r=e.parameters[1];fr.set(t,{state:"open",method:String(n).toUpperCase(),url:en(String(r))})}function pr(e){var t=e.target,n=e.parameters[0],r=e.parameters[1],o=fr.get(t);if(o&&n){var i=o.requestHeaderContexts||{};i[n]=r,o.requestHeaderContexts=i}}function vr(e){var t=e.target,n=fr.get(t);n&&(n.isAborted=!0)}var gr={HIDDEN:"visibility_hidden",UNLOADING:"before_unload",PAGEHIDE:"page_hide",FROZEN:"page_frozen"};var yr={sdk_name:"_gc.sdk_name",sdk_version:"_gc.sdk_version",app_id:"application.id",env:"env",service:"service",version:"version",source:"source",userid:"user.id",user_email:"user.email",user_name:"user.name",session_id:"session.id",session_type:"session.type",session_is_forced:"session.is_forced_session",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",time_zone:"device.time_zone",device:"device.device",user_agent:"device.user_agent",view_id:"view.id",view_referrer:"view.referrer",view_url:"view.url",view_host:"view.host",view_path:"view.path",view_name:"view.name",view_path_group:"view.path_group",view_path_name:"view.pathname"},mr={view_url_query:"view.url_query",action_id:"action.id",action_ids:"action.ids",view_in_foreground:"view.in_foreground",display:"display",session_has_replay:"session.has_replay",is_login:"user.is_login",page_states:"_gc.page_states",session_sample_rate:"_gc.configuration.session_sample_rate",session_replay_sample_rate:"_gc.configuration.session_replay_sample_rate",session_on_error_sample_rate:"_gc.configuration.session_on_error_sample_rate",session_replay_on_error_sample_rate:"_gc.configuration.session_replay_on_error_sample_rate",drift:"_gc.drift"},hr={view:{type:Ve,tags:{view_loading_type:"view.loading_type",view_apdex_level:"view.apdex_level",view_privacy_replay_level:"privacy.replay_level"},fields:{view_update_time:"_gc.view_update_time",sampled_for_replay:"session.sampled_for_replay",sampled_for_error_replay:"session.sampled_for_error_replay",sampled_for_error_session:"session.sampled_for_error_session",session_error_timestamp:"session.error_timestamp_for_session",is_active:"view.is_active",session_replay_stats:"_gc.replay_stats",session_is_active:"session.is_active",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",largest_contentful_paint_element_selector:"view.largest_contentful_paint_element_selector",cumulative_layout_shift:"view.cumulative_layout_shift",cumulative_layout_shift_time:"view.cumulative_layout_shift_time",cumulative_layout_shift_target_selector:"view.cumulative_layout_shift_target_selector",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_input_target_selector:"view.first_input_target_selector",first_paint_time:"view.fpt",interaction_to_next_paint:"view.interaction_to_next_paint",interaction_to_next_paint_target_selector:"view.interaction_to_next_paint_target_selector",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",first_byte:"view.first_byte",frustration_count:"view.frustration.count",custom_timings:"view.custom_timings"}},resource:{type:He,tags:{trace_id:"_gc.trace_id",span_id:"_gc.span_id",resource_id:"resource.id",resource_status:"resource.status",resource_status_group:"resource.status_group",resource_method:"resource.method"},fields:{duration:"resource.duration",resource_size:"resource.size",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_delivery_type:"resource.delivery_type",resource_type:"resource.type",resource_protocol:"resource.protocol",resource_encode_size:"resource.encoded_body_size",resource_decode_size:"resource.decoded_body_size",resource_transfer_size:"resource.transfer_size",resource_render_blocking_status:"resource.render_blocking_status",resource_dns:"resource.dns",resource_tcp:"resource.tcp",resource_ssl:"resource.ssl",resource_ttfb:"resource.ttfb",resource_trans:"resource.trans",resource_redirect:"resource.redirect",resource_first_byte:"resource.firstbyte",resource_dns_time:"resource.dns_time",resource_download_time:"resource.download_time",resource_first_byte_time:"resource.first_byte_time",resource_connect_time:"resource.connect_time",resource_ssl_time:"resource.ssl_time",resource_redirect_time:"resource.redirect_time"}},error:{type:We,tags:{error_id:"error.id",trace_id:"_gc.trace_id",span_id:"_gc.span_id",error_source:"error.source",error_type:"error.type",error_handling:"error.handling"},fields:{error_message:["string","error.message"],error_stack:["string","error.stack"],error_causes:["string","error.causes"],error_handling_stack:["string","error.handling_stack"]}},long_task:{type:Ne,tags:{long_task_id:"long_task.id"},fields:{duration:"long_task.duration",blocking_duration:"long_task.blocking_duration",first_ui_event_timestamp:"long_task.first_ui_event_timestamp",render_start:"long_task.render_start",style_and_layout_start:"long_task.style_and_layout_start",long_task_start_time:"long_task.start_time",scripts:["string","long_task.scripts"]}},action:{type:Fe,tags:{action_type:"action.type"},fields:{action_name:"action.target.name",duration:"action.loading_time",action_error_count:"action.error.count",action_resource_count:"action.resource.count",action_frustration_types:"action.frustration.type",action_long_task_count:"action.long_task.count",action_target:"_gc.action.target",action_position:"_gc.action.position"}},telemetry:{type:"telemetry",fields:{status:"telemetry.status",message:["string","telemetry.message"],type:"telemetry.type",error_stack:["string","telemetry.error.stack"],error_kind:["string","telemetry.error.kind"],connectivity:["string","telemetry.connectivity"],runtime_env:["string","telemetry.runtime_env"],usage:["string","telemetry.usage"],configuration:["string","telemetry.configuration"]}},browser_log:{type:Qe,tags:{error_source:"error.source",error_type:"error.type",error_resource_url:"http.url",error_resource_url_host:"http.url_host",error_resource_url_path:"http.url_path",error_resource_url_path_group:"http.url_path_group",error_resource_status:"http.status_code",error_resource_status_group:"http.status_group",error_resource_method:"http.method",action_id:"user_action.id",service:"service",status:"status"},fields:{message:["string","message"],error_message:["string","error.message"],error_stack:["string","error.stack"]}}},br=Z,_r=vn,wr=[];function Sr(e,t,n){var r=new It,o=new It,i=ir(e.sessionStoreStrategyType,t,n);wr.push((function(){return i.stop()}));var a,s=function(e){var t=e.expireDelay,n=e.maxEntries,r=[];function o(){for(var e=ee()-t;r.length>0&&r[r.length-1].endTime<e;)r.pop()}return ke&&(ke=m((function(){return o()}),6e4)),Ce.add(o),{add:function(e,t){var o={value:e,startTime:t,endTime:Oe,remove:function(){Se(r,o)},close:function(e){o.endTime=e}};return n&&r.length>=n&&r.pop(),r.unshift(o),o},find:function(e,t){void 0===e&&(e=Oe),void 0===t&&(t={returnInactive:!1});for(var n=0,o=r;n<o.length;n++){var i=o[n];if(i.startTime<=e){if(t.returnInactive||e<=i.endTime)return i.value;break}}},closeActive:function(e){var t=r[0];t&&t.endTime===Oe&&t.close(e)},findAll:function(e,t){void 0===e&&(e=Oe),void 0===t&&(t=0);var n=e+t;return r.filter((function(t){return t.startTime<=n&&e<=t.endTime})).map((function(e){return e.value}))},reset:function(){r=[]},stop:function(){Ce.delete(o),0===Ce.size&&ke&&(h(ke),ke=null)}}}({expireDelay:_r});function u(){var e=i.getSession();return e?{id:e.id,trackingType:e[t],hasError:!!e.hasError,isSessionForced:!!e.forcedSession}:{id:"invalid",trackingType:"0",isSessionForced:!1,hasError:!1}}return wr.push((function(){return s.stop()})),i.renewObservable.subscribe((function(){s.add(u(),ee()),r.notify()})),i.expireObservable.subscribe((function(){o.notify(),s.closeActive(ee())})),i.expandOrRenewSession(),s.add(u(),[0,ie()][0]),a=Wt(window,[Le,Be,Pe,Re],(function(){i.expandOrRenewSession()}),{capture:!0,passive:!0}).stop,wr.push(a),function(e){var t=function(){"visible"===document.visibilityState&&e()},n=Ft(document,je,t).stop;wr.push(n);var r=m(t,br);wr.push((function(){h(r)}))}((function(){return i.expandSession()})),function(e){var t=Ft(window,De,e,{capture:!0}).stop;wr.push(t)}((function(){i.restartSession()})),{findSession:function(e,t){return s.find(e,t)},renewObservable:r,expireObservable:o,sessionStateUpdateObservable:i.sessionStateUpdateObservable,expire:i.expire,updateSessionState:i.updateSessionState}}var xr=20971520,Or=K,kr=0,Cr=1,Er=2,Tr=0,Ar=1;function Mr(e,t,n,r,o){t.transportStatus===kr&&0===t.queuedPayloads.size()&&t.bandwidthMonitor.canHandle(e)?Lr(e,t,n,{onSuccess:function(){return Pr(Tr,t,n,r,o)},onFailure:function(){t.queuedPayloads.enqueue(e),$r(t,n,r,o)}}):t.queuedPayloads.enqueue(e)}function $r(e,t,n,r){e.transportStatus===Er&&g((function(){Lr(e.queuedPayloads.first(),e,t,{onSuccess:function(){e.queuedPayloads.dequeue(),e.currentBackoffTime=Or,Pr(Ar,e,t,n,r)},onFailure:function(){e.currentBackoffTime=Math.min(256e3,2*e.currentBackoffTime),$r(e,t,n,r)}})}),e.currentBackoffTime)}function Lr(e,t,n,r){var o=r.onSuccess,i=r.onFailure;t.bandwidthMonitor.add(e),n(e,(function(n){t.bandwidthMonitor.remove(e),!function(e,t,n){return!(t.retryMaxSize>-1&&n.retry&&n.retry.count>t.retryMaxSize)&&("opaque"!==e.type&&(0===e.status&&!navigator.onLine||408===e.status||429===e.status||e.status>=500))}(n,t,e)?(t.transportStatus=kr,o()):(t.transportStatus=t.bandwidthMonitor.ongoingRequestCount>0?Cr:Er,e.retry={count:e.retry?e.retry.count+1:1,lastFailureStatus:n.status},i())}))}function Pr(e,t,n,r,o){e===Tr&&t.queuedPayloads.isFull()&&!t.queueFullReported&&(o({message:"Reached max "+r+" events size queued for upload: 20MiB",source:Ot,startClocks:te()}),t.queueFullReported=!0);var i=t.queuedPayloads;for(t.queuedPayloads=Rr();i.size()>0;)Mr(i.dequeue(),t,n,r,o)}function Rr(){var e=[];return{bytesCount:0,enqueue:function(t){this.isFull()||(e.push(t),this.bytesCount+=t.bytesCount)},first:function(){return e[0]},dequeue:function(){var t=e.shift();return t&&(this.bytesCount-=t.bytesCount),t},size:function(){return e.length},isFull:function(){return this.bytesCount>=xr}}}function Br(e,t){return e?(e=e+(-1===e.indexOf("?")?"?":"&")+"precision=ms",t&&(e=e+"&encoding="+t),e):e}function jr(e,t,n,r){void 0===n&&(n=-1);var o=function(e){return{transportStatus:kr,currentBackoffTime:Or,bandwidthMonitor:{ongoingRequestCount:0,ongoingByteCount:0,canHandle:function(e){return 0===this.ongoingRequestCount||this.ongoingByteCount+e.bytesCount<=81920&&this.ongoingRequestCount<32},add:function(e){this.ongoingRequestCount+=1,this.ongoingByteCount+=e.bytesCount},remove:function(e){this.ongoingRequestCount-=1,this.ongoingByteCount-=e.bytesCount}},queuedPayloads:Rr(),queueFullReported:!1,retryMaxSize:e}}(n),i=function(n,r){return function(e,t,n,r){var o=n.data,i=n.bytesCount,a=Br(e,n.encoding),s=function(){try{return window.Request&&"keepalive"in new Request("http://a")}catch(e){return!1}}()&&i<t;if(s){var c={method:"POST",body:o,keepalive:!0,mode:"cors"},f={"x-client-timestamp":Date.now().toString()};n.type&&(f["Content-Type"]=n.type),c.headers=f,fetch(a,c).then(u((function(e){"function"==typeof r&&r({status:e.status,type:e.type})}))).catch(u((function(){!function(e,t,n){var r={method:"POST",body:t.data,keepalive:!0,mode:"cors"},o={"x-client-timestamp":Date.now().toString()};t.type&&(o["Content-Type"]=t.type);r.headers=o,fetch(e,r).then(u((function(e){"function"==typeof n&&n({status:e.status,type:e.type})}))).catch(u((function(){"function"==typeof n&&n({status:0})})))}(a,n,r)})))}else Dr(a,n,r)}(e,t,n,r)};return{send:function(t){Mr(t,o,i,e,r)},sendOnExit:function(n){!function(e,t,n){var r=n.data,o=n.bytesCount,i=Br(e,n.encoding),a=!!navigator.sendBeacon&&o<t;if(a)try{var s;if(s=n.type?new Blob([r],{type:n.type}):r,navigator.sendBeacon(i,s))return}catch(e){!function(e){Ir||(Ir=!0,Hn(e))}(e)}Dr(i,n)}(e,t,n)}}}var Ir=!1;function Dr(e,t,n){var r=t.data,o=new XMLHttpRequest;o.open("POST",e,!0),r instanceof Blob?o.setRequestHeader("Content-Type",r.type):t.type&&o.setRequestHeader("Content-Type",t.type),o.setRequestHeader("x-client-timestamp",Date.now().toString()),Ft(o,"loadend",(function(){"function"==typeof n&&n({status:o.status})}),{once:!0}),o.send(r)}function Ur(e){return Ur="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ur(e)}function qr(e){if("object"===Ur(e)&&e)e=Ye(e);else if(!F(e))return e;return String(e).replace(/[\s=,"]/g,(function(e){return"\\"+e}))}function Fr(e,t){return"object"===Ur(e)&&e?e=Ye(e):t&&(e=""+e),e}function Wr(e){return'"'+e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')+'"'}function Nr(e){return"object"===Ur(e)&&e?Wr(Ye(e)):F(e)?Wr(e):e}function Vr(e){return function(e){if(Array.isArray(e))return Hr(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return Hr(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Hr(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Hr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var Qr="custom_keys",zr=function(e){if(!e||!e.type)return{rowStr:"",rowData:void 0};var t={tags:{},fields:{}},n=!1,r="";return T(hr,(function(o,i){if(o.type===e.type){r+=i+",",t.measurement=i;var a=[],s=M({},yr,o.tags),u=["date","type",Qr];T(s,(function(n,r){var o=se(e,n);u.push(r),(o||N(o))&&(t.tags[r]=Fr(o,!0),a.push(qr(r)+"="+qr(o)))}));var c=[],f=M({},mr,o.fields);if(T(f,(function(n,r){if(L(n)&&2===n.length){var o=n[1],i=se(e,o);u.push(r),null!=i&&(t.fields[r]=Fr(i),c.push(qr(r)+"="+Nr(i)))}else if(F(n)){i=se(e,n);u.push(r),null!=i&&(t.fields[r]=Fr(i),c.push(qr(r)+"="+Nr(i)))}})),e.context&&U(e.context)&&!q(e.context)){var l=[];T(e.context,(function(e,n){u.indexOf(n)>-1||(u.push(n),null!=e&&(l.push(n),t.fields[n]=Fr(e),c.push(qr(n)+"="+Nr(e))))})),l.length&&(t.fields[Qr]=Fr(l),c.push(qr(Qr)+"="+Nr(l)))}e.type===Qe&&T(e,(function(e,n){-1===u.indexOf(n)&&null!=e&&(t.fields[n]=Fr(e),c.push(qr(n)+"="+Nr(e)))})),a.length&&(r+=a.join(",")),c.length&&(r+=" ",r+=c.join(","),n=!0),r=r+" "+e.date,t.time=e.date}})),{rowStr:n?r:"",rowData:n?t:void 0}};function Gr(e){var t=e.encoder,n=e.request,r=e.messageBytesLimit,o=e.sendContentTypeByJson,a=e.flushController,s={},u=a.flushObservable.subscribe((function(e){!function(e){var r=R(s).join(o?",":"\n");s={};var i=(u=e.reason,ce(R(gr),u)),a=i?n.sendOnExit:n.send;var u;if(i&&t.isAsync){var f=t.finishSync();f.outputBytesCount&&a(Jr(f,o));var l=[].concat(Vr(f.pendingData),[r]).filter(Boolean).join("\n");l&&a({data:l,bytesCount:mt(l)})}else{if(r){var d=c([r],t.isEmpty());o&&(d+="]"),t.write(d)}else o&&t.write("]");t.finish((function(e){a(Jr(e))}))}}(e)}));function c(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return o?t?"["+e.join(","):","+e.join(","):t?e.join("\n"):"\n"+e.join("\n")}function f(e,n){var u=function(e){return o?Ye(zr(e).rowData):zr(e).rowStr}(e),f=t.estimateEncodedBytesCount(u);f>=r?i.warn("Discarded a message whose size was bigger than the maximum allowed size ".concat(r,"KB.")):(function(e){return void 0!==e&&void 0!==s[e]}(n)&&function(e){var n=s[e];delete s[e];var r=t.estimateEncodedBytesCount(n);a.notifyAfterRemoveMessage(r)}(n),function(e,n,r){a.notifyBeforeAddMessage(n),void 0!==r?(s[r]=e,a.notifyAfterAddMessage()):t.write(c([e],t.isEmpty()),(function(e){a.notifyAfterAddMessage(e-n)}))}(u,f,n))}return{flushController:a,add:f,upsert:f,stop:u.unsubscribe}}function Jr(e,t){return{data:"string"==typeof e.output?e.output:new Blob([e.output],{type:"text/plain"}),type:t?"application/json;UTF-8":void 0,bytesCount:e.outputBytesCount,encoding:e.encoding}}function Xr(e){var t,n=e.messagesLimit,r=e.bytesLimit,o=e.durationLimit,i=e.pageExitObservable,a=e.sessionExpireObservable,s=i.subscribe((function(e){return d(e.reason)})),u=a.subscribe((function(){return d("session_expire")})),c=new It((function(){return function(){s.unsubscribe(),u.unsubscribe()}})),f=0,l=0;function d(e){if(0!==l){var t=l,n=f;l=0,f=0,p(),c.notify({reason:e,messagesCount:t,bytesCount:n})}}function p(){y(t),t=void 0}return{flushObservable:c,getMessagesCount:function(){return l},notifyBeforeAddMessage:function(e){f+e>=r&&d("bytes_limit"),l+=1,f+=e,void 0===t&&(t=g((function(){d("duration_limit")}),o))},notifyAfterAddMessage:function(e){void 0===e&&(e=0),f+=e,l>=n?d("messages_limit"):f>=r&&d("bytes_limit")},notifyAfterRemoveMessage:function(e){f-=e,0===(l-=1)&&p()}}}function Kr(e,t,n,r,o,i){void 0===i&&(i=Gr);var a=function(e,t){return i({encoder:t.encoder,request:jr(t.endpoint,e.batchBytesLimit,e.retryMaxSize,n),flushController:Xr({messagesLimit:e.batchMessagesLimit,bytesLimit:e.batchBytesLimit,durationLimit:e.flushTimeout,pageExitObservable:r,sessionExpireObservable:o}),messageBytesLimit:e.messageBytesLimit,sendContentTypeByJson:e.sendContentTypeByJson})}(e,t);return{flushObservable:a.flushController.flushObservable,add:function(e){a.add(e)},upsert:function(e,t){a.upsert(e,t)},stop:function(){a.stop()}}}function Zr(){return p().FTWebViewJavascriptBridge}function Yr(){var e=Zr();if(e)return{getCapabilities:function(){return JSON.parse(e.getCapabilities&&e.getCapabilities()||"[]")},getPrivacyLevel:function(){return e.getPrivacyLevel&&e.getPrivacyLevel()},getAllowedWebViewHosts:function(){return JSON.parse(e.getAllowedWebViewHosts&&e.getAllowedWebViewHosts()||"[]")},send:function(t,n,r){var o=r?{id:r}:void 0;try{e.sendEvent(JSON.stringify({name:t,data:n,view:o}))}catch(e){}}}}function eo(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null===(e=p().location)||void 0===e?void 0:e.hostname,n=Zr();if(n&&void 0===n.getAllowedWebViewHosts)return!0;if(n&&n.getAllowedWebViewHosts&&(null===n.getAllowedWebViewHosts()||void 0===n.getAllowedWebViewHosts()))return!0;var r=Yr();return!!r&&r.getAllowedWebViewHosts().some((function(e){return t===e||t.endsWith(".".concat(e))}))}function to(e){return to="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},to(e)}function no(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],u=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);u=!0);}catch(e){c=!0,o=e}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return ro(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ro(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ro(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function oo(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function io(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=to(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=to(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==to(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ao(e,t,n){for(var r=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?oo(Object(n),!0).forEach((function(t){io(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):oo(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},e),o=0,a=Object.entries(t);o<a.length;o++){var s=no(a[o],2),u=s[0],c=s[1],f=c.required;"string"===c.type&&u in r&&(r[u]=String(r[u])),f&&!(u in e)&&i.warn("The property ".concat(u," of ").concat(n," context is required; context will not be sent to the intake."))}return r}function so(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.customerDataTracker,r=t.propertiesConfig,o=void 0===r?{}:r,i={},a=new It,s={getContext:function(){return G(i)},setContext:function(t){"object"===Q(t)?(i=bt(ao(t,o,e)),null==n||n.updateCustomerData(i)):s.clearContext(),a.notify()},setContextProperty:function(t,r){i[t]=bt(ao(io({},t,r),o,e)[t]),null==n||n.updateCustomerData(i),a.notify()},removeContextProperty:function(t){delete i[t],null==n||n.updateCustomerData(i),ao(i,o,e),a.notify()},clearContext:function(){i={},null==n||n.resetCustomerData(),a.notify()},changeObservable:a};return s}var uo="user",co="global context",fo="_gc_s",lo=[];function po(e,t,n,r){var o=function(e,t,n){return e.storeContextsKey&&F(e.storeContextsKey)?fo+"_"+t+"_"+n+"_"+e.storeContextsKey:fo+"_"+t+"_"+n}(e,n,r);function i(){var e=localStorage.getItem(o);return null!==e?JSON.parse(e):{}}return lo.push(Ft(window,qe,(function(e){o===e.key&&t.setContext(i())}))),t.changeObservable.subscribe((function(){localStorage.setItem(o,JSON.stringify(t.getContext()))})),t.setContext($(i(),t.getContext())),t}var vo=0,go=2;function yo(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:go,t=new Map,n=!1;function r(){if(!n&&e!==vo){var r=e===go?3072:16384,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;t.forEach((function(e){o+=e.getBytesCount()})),o>r&&(!function(e){i.warn("Customer data exceeds the recommended ".concat(e/gt,"KiB threshold."))}(r),n=!0)}}return{createDetachedTracker:function(){var e=mo((function(){return r(e.getBytesCount())}));return e},getOrCreateTracker:function(e){return t.has(e)||t.set(e,mo(r)),t.get(e)},setCompressionStatus:function(t){e===vo&&(e=t,r())},getCompressionStatus:function(){return e},stop:function(){t.forEach((function(e){return e.stop()})),t.clear()}}}function mo(e){var t=0,n=V((function(n){t=mt(Ye(n)),e()}),200),r=n.throttled,o=n.cancel,i=function(){o(),t=0};return{updateCustomerData:function(e){q(e)?i():r(e)},resetCustomerData:i,getBytesCount:function(){return t},stop:function(){o()}}}function ho(){var e="",t=0;return{isAsync:!1,isEmpty:function(){return!e},write:function(n,r){var o=mt(n);t+=o,e+=n,r&&r(o)},finish:function(e){e(this.finishSync())},finishSync:function(){var n={output:e,outputBytesCount:t,rawBytesCount:t,pendingData:[]};return e="",t=0,n},estimateEncodedBytesCount:function(e){return e.length}}}function bo(e){this.map=new WeakMap,e&&e.forEach((function(e){this.map.set(e,1)}))}function _o(e,t){t.silentMultipleInit||i.error(e+" is already initialized.")}bo.prototype.add=function(e){return this.map.set(e,1),this},bo.prototype.delete=function(e){return this.map.delete(e)},bo.prototype.has=function(e){return this.map.has(e)};var wo={ok:0,debug:1,info:2,notice:4,warn:5,error:6,critical:7,alert:8,emerg:9};function So(e){return{handleLog:function(t,r,o,i,a){var s=$(r.getContext(),t.context);if(xo(t.status,Co.console,r)&&function(e,t){var r=e.status,o=e.message;n[loggerToConsoleApiName[r]].call(globalConsole,o,t)}(t,s),xo(t.status,Co.http,r)){var u={rawLogsEvent:{date:a||ne(),message:t.message,status:t.status,origin:Tt},messageContext:s,savedCommonContext:i};o&&(u.domainContext={handlingStack:o}),e.notify(Kt,u)}}}}function xo(e,t,n){var r=n.getHandler(),o=L(r)?r:[r];return wo[e]>=wo[n.getLevel()]&&ce(o,t)}function Oo(e,t){void 0===t&&(t={});var n=t.includeMessage||!1;return{stack:e.stack,kind:e.type,message:n?e.message:void 0,causes:e.causes,handling:e.handling}}var ko={ok:"ok",debug:"debug",info:"info",notice:"notice",warn:"warn",error:"error",critical:"critical",alert:"alert",emerg:"emerg"},Co={console:"console",http:"http",silent:"silent"},Eo=B(ko);function To(e,t,n,r,o,i){void 0===r&&(r=Co.http),void 0===o&&(o=ko.debug),void 0===i&&(i={}),this.contextManager=so("logger",{customerDataTracker:t}),this.handleLogStrategy=e,this.handlerType=r,this.level=o,this.contextManager.setContext(i),n&&this.contextManager.setContextProperty("logger",{name:n})}function Ao(e){return function(t,n,r){var o;xo(e,Co.http,this)&&(o=$t()),this.logImplementation(t,n,e,r,o)}}To.prototype={logImplementation:u((function(e,t,n,r,o){void 0===n&&(n=ko.info);var i,a=bt(t);if(null!=r){var s=Mt({stackTrace:r instanceof Error?rt(r):void 0,originalError:r,nonErrorPrefix:Ke,source:Tt,handling:Ge,startClocks:te()});i=$({error:Oo(s,{includeMessage:!0})},a)}else i=a;this.handleLogStrategy({message:bt(e),context:i,status:n},this,o)})),log:function(e,t,n,r){var o;xo(n,Co.http,this)&&(o=$t()),this.logImplementation(e,t,n,r,o)},setContext:function(e){this.contextManager.setContext(e)},getContext:function(){return this.contextManager.getContext()},setContextProperty:function(e,t){this.contextManager.setContextProperty(e,t)},addContext:function(e,t){this.contextManager.setContextProperty(e,t)},removeContextProperty:function(e){this.contextManager.removeContextProperty(e)},removeContext:function(e){this.contextManager.removeContextProperty(e)},clearContext:function(){this.contextManager.clearContext()},setHandler:function(e){this.handlerType=e},getHandler:function(){return this.handlerType},setLevel:function(e){this.level=e},getLevel:function(){return this.level}},To.prototype.ok=Ao(ko.ok),To.prototype.debug=Ao(ko.debug),To.prototype.info=Ao(ko.info),To.prototype.notice=Ao(ko.notice),To.prototype.warn=Ao(ko.warn),To.prototype.error=Ao(ko.error),To.prototype.critical=Ao(ko.critical),To.prototype.alert=Ao(ko.alert),To.prototype.emerg=Ao(ko.emerg);var Mo={sdkVersion:"3.2.48",sdkName:"df_web_logs_sdk"};function $o(t){var n=function(e){return e.site||e.datakitOrigin||e.datakitUrl?!(e.site&&!e.clientToken&&(i.error("clientToken is not configured, no RUM data will be collected."),1)):(i.error("datakitOrigin or site is not configured, no RUM data will be collected."),!1)}(t);if(n){var r=ar(t),o=Lo(t.forwardConsoleLogs,R(e),"Forward Console Logs"),a=Lo(t.forwardReports,R(Vt),"Forward Reports");if(r&&o&&a)return t.forwardErrorsToLogs&&!ce(o,e.error)&&o.push(e.error),A({forwardErrorsToLogs:!1!==t.forwardErrorsToLogs,forwardConsoleLogs:o,forwardReports:a,requestErrorResponseLengthLimit:32768},r,Mo)}}function Lo(e,t,n){return void 0===e?[]:"all"===e||L(e)&&function(e,t,n){if(e.every)return e.every(t);for(var r=!0,o=0;o<e.length;o++)if(O.call(e,o)){var i=e[o];if(!t.call(n,i,o,e)){r=!1;break}}return r}(e,(function(e){return ce(t,e)}))?"all"===e?t:function(e){for(var t,n=[],r={},o=0;o<e.length;o++)(t=e[o])in r||(r[t]=!0,n.push(t));return n}(e):void i.error(n+' should be "all" or an array with allowed values "'+t.join('", "')+'"')}function Po(e,t){var n,r,o=xe();return{init:function(e){if(e)if(eo()&&(e=function(e){return A({},e,{clientToken:"empty"})}(e)),n=e,r)_o("DATAFLUX_LOGS",e);else{var a=$o(e);a&&(r=a,cr().subscribe(J),function(){if(r&&n){var e=t(n,r);o.drain(e)}}())}else i.error("Missing configuration")},getInitConfiguration:function(){return n},getInternalContext:J,handleLog:function(t,n,r,i,a){void 0===i&&(i=e()),void 0===a&&(a=ne()),o.add((function(e){e.handleLog(t,n,r,i,a)}))}}}var Ro="logs";var Bo="0",jo="1";function Io(e){var t=Sr(e,"logs",(function(t){return function(e,t){var n=function(e){return e===Bo||e===jo}(t)?t:Do(e);return{trackingType:n,isTracked:n===jo}}(e,t)}));return{findTrackedSession:function(e){var n=t.findSession(e);return n&&n.trackingType===jo?{id:n.id}:void 0},expireObservable:t.expireObservable}}function Do(e){return Y(e.sessionSampleRate)?jo:Bo}function Uo(e,t,n,r,o){var i=Eo.concat(["custom"]),a={};T(i,(function(e){var n,r,i,s,u;a[e]=(n=e,r=t.eventRateLimiterThreshold,i=o,s=0,u=!1,{isLimitReached:function(){if(0===s&&g((function(){s=0}),Z),(s+=1)<=r||u)return u=!1,!1;if(s===r+1){u=!0;try{i({message:"Reached max number of "+n+"s by minute: "+r,source:Ot,startClocks:te()})}finally{u=!1}}return!0}})})),n.subscribe(Kt,(function(o){var i=o.rawLogsEvent,s=o.messageContext||void 0,u=o.savedCommonContext||void 0,c=o.domainContext,f=i.date-ie(),l=e.findTrackedSession(f);if(l){var d=u||r(),p=$({service:t.service||"browser",env:t.env||"",version:t.version||"",_gc:{sdkName:t.sdkName,sdkVersion:t.sdkVersion},session:{id:l.id},view:d.view,user:q(d.user)?void 0:d.user,device:Me,type:Qe},d.context,qo(f),i,s);t.beforeSend&&!1===t.beforeSend(p,c)||p.origin!==Ot&&_e(a[p.status],a.custom).isLimitReached()||n.notify(Zt,he(p))}}))}function qo(e){return function(t){if(t&&t.getInternalContext)return t.getInternalContext(e)}(window.DATAFLUX_RUM)}function Fo(e){return Fo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Fo(e)}function Wo(e){var t=function(e,t){if("object"!=Fo(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Fo(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Fo(t)?t:t+""}function No(e,t,n){return(t=Wo(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Vo=No(No(No(No(No({},e.log,ko.info),e.debug,ko.debug),e.info,ko.info),e.warn,ko.warn),e.error,ko.error);function Ho(e,t){if(!e.forwardErrorsToLogs)return{stop:J};var n=lr().subscribe((function(e){"complete"===e.state&&o(ze.XHR,e)})),r=cr().subscribe((function(e){"resolve"===e.state&&o(ze.FETCH,e)}));function o(n,r){function o(e){var o,i,a,s,u,c={isAborted:r.isAborted,handlingStack:r.handlingStack},f=(o=r.url,i=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)},i.prototype.setUrl=function(e){this._parse(e)},i.prototype._initValues=function(){for(var e in this._fields)this._values[e]=""},i.prototype.addQueryString=function(e){if("object"!==b(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},i.prototype.getParse=function(){return this._values},i.prototype.getUrl=function(){var e="";return e+=this._values.Origin,(e+=this._values.Path)+(this._values.QueryString?"?"+this._values.QueryString:"")},i.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 i(o)).getParse();t.notify(Kt,{rawLogsEvent:{message:zo(n)+" error "+r.method+" "+r.url,date:r.startClocks.timeStamp,error:{stack:e||"Failed to load",handing:void 0},http:{method:r.method,status_code:r.status,url:r.url,statusGroup:(u=r.status,u?String(u).substr(0,1)+String(u).substr(1).replace(/\d*/g,"x"):0===u?void 0:u),urlHost:f.Host,urlPath:f.Path,urlPathGroup:(a=f.Path,s="",a&&(s=a.replace(/\/([^\/]*)\d([^\/]*)/g,"/?").replace(/\/$/g,"")),s||"/")},status:ko.error,origin:Ct},domainContext:c})}!function(e,t){var n=[t.rumEndpoint];return t.logsEndpoint&&n.push(t.logsEndpoint),t.sessionReplayEndPoint&&n.push(t.sessionReplayEndPoint),D(n,(function(t){return 0===e.indexOf(t)}))||t.isIntakeUrl(e)}(r.url,e)&&(function(e){return 0===e.status&&"opaque"!==e.responseType}(r)||function(e){return e.status>=500}(r)||e.isServerError(r))&&("xhr"in r?function(e,t,n){"string"==typeof e.response?n(Qo(e.response,t)):n(e.response)}(r.xhr,e,o):r.response?function(e,t,n){var r=function(e){try{return e.clone()}catch(e){return}}(e);r&&r.body?window.TextDecoder?function(e,t,n){!function(e,t,n){var r=e.getReader(),o=[],i=0;function a(){var e,a;if(r.cancel().catch(J),n.collectStreamBody){var s;if(1===o.length)s=o[0];else{s=new Uint8Array(i);var u=0;T(o,(function(e){s.set(e,u),u+=e.length}))}e=s.slice(0,n.bytesLimit),a=s.length>n.bytesLimit}t(void 0,e,a)}!function e(){r.read().then(u((function(t){t.done?a():(n.collectStreamBody&&o.push(t.value),(i+=t.value.length)>n.bytesLimit?a():e())})),u((function(e){t(e)})))}()}(e,(function(e,t,r){if(e)n(e);else{var o=(new TextDecoder).decode(t);r&&(o+="..."),n(void 0,o)}}),{bytesLimit:t,collectStreamBody:!0})}(r.body,t.requestErrorResponseLengthLimit,(function(e,t){n(e?"Unable to retrieve response: "+e:t)})):r.text().then(u((function(e){return n(Qo(e,t))})),u((function(e){return n("Unable to retrieve response: "+e)}))):n()}(r.response,e,o):r.error&&function(e,t,n){n(Qo(Lt(rt(e)),t))}(r.error,e,o))}return{stop:function(){n.unsubscribe(),r.unsubscribe()}}}function Qo(e,t){return e.length>t.requestErrorResponseLengthLimit?e.substring(0,t.requestErrorResponseLengthLimit)+"...":e}function zo(e){return ze.XHR===e?"XHR":"Fetch"}function Go(e,t){if(!e.forwardErrorsToLogs)return{stop:J};var n,r=new It,o=(n=r,vt((function(e,t){n.notify(Mt({stackTrace:e,originalError:t,startClocks:te(),nonErrorPrefix:Xe,source:Et,handling:Je}))}))),i=r.subscribe((function(e){t.notify(Kt,{rawLogsEvent:{message:e.message,date:e.startClocks.timeStamp,error:Oo(e),origin:Et,status:ko.error}})}));return{stop:function(){o.stop(),i.unsubscribe()}}}var Jo,Xo,Ko,Zo,Yo=function(e){var t=yo(),n=so("global",{customerDataTracker:t.getOrCreateTracker(co)}),r=so("user",{customerDataTracker:t.getOrCreateTracker(uo),propertiesConfig:{id:{type:"string"},name:{type:"string"},email:{type:"string"}}});function o(){return function(e,t){return{view:{referrer:document.referrer,url:window.location.href},context:e.getContext(),user:t.getContext()}}(n,r)}var a,c,f=Po(o,(function(t,i){t.storeContextsToLocal&&(po(i,n,Ro,co),po(i,r,Ro,uo));var a=e(t,i,o);return f=function(e,t){return A({init:function(e){_o("DATAFLUX_LOGS",e)},initConfiguration:e},t)}(t,a),a})),l={},d=new To((function(){var e;return(e=f).handleLog.apply(e,arguments)}),t.createDetachedTracker());return a={logger:d,init:u((function(e){return f.init(e)})),getGlobalContext:u((function(){return n.getContext()})),setGlobalContext:u((function(e){return n.setContext(e)})),setGlobalContextProperty:u((function(e,t){return n.setContextProperty(e,t)})),removeGlobalContextProperty:u((function(e){return n.removeContextProperty(e)})),clearGlobalContext:u((function(){return n.clearContext()})),createLogger:u((function(e,n){return void 0===n&&(n={}),l[e]=new To((function(){var e;return(e=f).handleLog.apply(e,arguments)}),t.createDetachedTracker(),sanitize(e),n.handler,n.level,sanitize(n.context)),l[e]})),getLogger:u((function(e){return l[e]})),getInitConfiguration:u((function(){return G(f.initConfiguration)})),getInternalContext:u((function(e){return f.getInternalContext(e)})),setUser:u((function(e){(function(e){var t="object"===Q(e);return t||i.error("Unsupported user:",e),t})(e)&&r.setContext(e)})),getUser:u((function(){return r.getContext()})),removeUserProperty:u((function(e){return r.removeContextProperty(e)})),setUserProperty:u((function(e,t){r.setContextProperty(e,t)})),clearUser:u((function(){return r.clearContext()}))},c=A({onReady:function(e){e()}},a),Object.defineProperty(c,"_setDebug",{get:function(){return s},enumerable:!1}),c}((function(e,t,n){var r=new Yt,o=[],i=function(e){return function(t){e.notify(Kt,{rawLogsEvent:{message:t.message,date:t.startClocks.timeStamp,origin:Ot,status:ko.error}}),Vn("Error reported to customer",{"error.message":t.message})}}(r),a=new It((function(e){var t=Wt(window,[je,Ie],(function(t){t.type===je&&"hidden"===document.visibilityState?e.notify({reason:gr.HIDDEN}):t.type===Ie&&e.notify({reason:gr.FROZEN})}),{capture:!0}),n=Ft(window,$e,(function(){e.notify({reason:gr.UNLOADING})}));return function(){t.stop(),n.stop()}})),s=!t.sessionStoreStrategyType||eo()||Boolean(window._GUANCE_SYNTHETICS_INJECTS_RUM||dn("guance-synthetics-injects-rum"))?function(e){var t=Do(e)===jo?{}:void 0;return{findTrackedSession:function(){return t},expireObservable:new It}}(t):Io(t),u=function(e,t,n,r,o){var i=Nn(qn,t);i.setContextProvider((function(){var e=qo();return{application:{id:e&&e.application&&e.application.id},session:{id:o.findTrackedSession()&&o.findTrackedSession().id},view:{id:e&&e.view&&e.view.id},action:{id:e&&e.userAction&&e.userAction.id}}}));var a=[];if(!eo()){var s=Kr(t,{endpoint:t.rumEndpoint,encoder:ho()},n,r,o.expireObservable);a.push((function(){s.stop()}));var u=i.observable.subscribe((function(e){s.add(e)}));a.push((function(){u.unsubscribe()}))}return function(){Fn.drain()}(),function(e){Wn({type:jn,configuration:e})}(G(e)),{telemetry:i,stop:function(){a.forEach((function(e){e()}))}}}(e,t,i,a,s);o.push((function(){u.stop()})),Ho(t,r),Go(t,r),function(e,t){var n=qt(e.forwardConsoleLogs).subscribe((function(e){t.notify(Kt,{rawLogsEvent:{date:ne(),message:e.message,origin:kt,error:e.error&&Oo(e.error),status:Vo[e.api]},domainContext:{handlingStack:e.handlingStack}})}))}(t,r),function(e,t){var n=Ht(0,e.forwardReports).subscribe((function(e){var n,r,o,i=e.message,a="deprecation"===e.originalError.type?ko.warn:ko.error;a===ko.error?n=Oo(e):report.stack&&(i+=" Found in "+(r=e.stack,(o=/@ (.+)/.exec(r))&&o[1])),t.notify(Kt,{rawLogsEvent:{date:ne(),message:i,origin:At,error:n,status:a}})}))}(t,r);var c=So(r);if(Uo(s,t,r,n,i),eo())!function(e){var t=Yr();e.subscribe(Zt,(function(e){t.send("log",e)}))}(r);else{var f=function(e,t,n,r,o){var i=Kr(e,{endpoint:e.logsEndpoint,encoder:ho()},n,r,o.expireObservable);return t.subscribe(Zt,(function(e){i.add(e)})),i}(t,r,i,a,s);o.push((function(){f.stop()}))}var l,d=(l=s,{get:function(e){var t=l.findTrackedSession(e);if(t)return{session:{id:t.id}}}});return{handleLog:c.handleLog,getInternalContext:d.get,stop:function(){o.forEach((function(e){e()}))}}}));Jo=p(),Ko=Yo,Zo=Jo[Xo="DATAFLUX_LOGS"],Jo[Xo]=Ko,Zo&&Zo.q&&T(Zo.q,(function(e){l(e,"onReady callback threw an error:")()}))}();
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.buildEnv = void 0;
7
7
  var buildEnv = exports.buildEnv = {
8
- sdkVersion: "3.2.42",
8
+ sdkVersion: "3.2.48",
9
9
  sdkName: 'df_web_logs_sdk'
10
10
  };
11
11
  //# sourceMappingURL=buildEnv.js.map
@@ -1,5 +1,5 @@
1
1
  export var buildEnv = {
2
- sdkVersion: "3.2.42",
2
+ sdkVersion: "3.2.48",
3
3
  sdkName: 'df_web_logs_sdk'
4
4
  };
5
5
  //# sourceMappingURL=buildEnv.js.map
package/package.json CHANGED
@@ -2,10 +2,10 @@
2
2
  "name": "@cloudcare/browser-logs",
3
3
  "main": "cjs/index.js",
4
4
  "module": "esm/index.js",
5
- "version": "3.2.42",
5
+ "version": "3.2.48",
6
6
  "types": "types/index.d.ts",
7
7
  "dependencies": {
8
- "@cloudcare/browser-core": "3.2.42"
8
+ "@cloudcare/browser-core": "3.2.48"
9
9
  },
10
10
  "description": "Guance Browser SDK Logs Package",
11
11
  "scripts": {
@@ -29,7 +29,10 @@
29
29
  "type": "git",
30
30
  "directory": "packages/logs"
31
31
  },
32
+ "publishConfig": {
33
+ "access": "public"
34
+ },
32
35
  "author": "dataflux",
33
36
  "license": "MIT",
34
- "gitHead": "4bf491b0a02f6ad8d9458da6433380a3d308d380"
37
+ "gitHead": "24c6a541872274c0454f3bf281e0655a429651ba"
35
38
  }