@microsoft/applicationinsights-channel-js 2.8.0-beta.2203-02 → 2.8.0-beta.2203-03

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,6 +1,6 @@
1
1
  /*!
2
- * Application Insights JavaScript SDK - Channel, 2.8.0-beta.2203-02
2
+ * Application Insights JavaScript SDK - Channel, 2.8.0-beta.2203-03
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
- var e=this,n=function(_){"use strict";var N="function",A="object",R="undefined",o="prototype",F="hasOwnProperty",t=Object,E=t[o],L=t.assign,V=t.create,e=t.defineProperty,q=E[F],W=null;function H(e){return void 0===e&&(e=!0),W&&e||(typeof globalThis!==R&&globalThis&&(W=globalThis),typeof self!==R&&self&&(W=self),typeof window!==R&&window&&(W=window),typeof global!==R&&global&&(W=global)),W}function G(e){throw new TypeError(e)}(H()||{}).Symbol,(H()||{}).Reflect;var f=L||function(e){for(var n,t=1,r=arguments.length;t<r;t++)for(var i in n=arguments[t])E[F].call(n,i)&&(e[i]=n[i]);return e},X=function(e,n){return(X=t.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,n){e.__proto__=n}||function(e,n){for(var t in n)n[F](t)&&(e[t]=n[t])})(e,n)};function n(e,n){function t(){this.constructor=e}typeof n!==N&&null!==n&&G("Class extends value "+n+" is not a constructor or null"),X(e,n),e[o]=null===n?function(e){if(V)return V(e);if(null==e)return{};var n=typeof e;function t(){}return n!==A&&n!==N&&G("Object prototype may only be an Object:"+e),t[o]=e,new t}(n):(t[o]=n[o],new t)}var Y="constructor",g="prototype",J="function",Z="_dynInstFuncs",$="_isDynProxy",Q="_dynClass",ee="_dynInstChk",ne=ee,te="_dfOpts",re="_unknown_",ie="__proto__",oe="useBaseInst",ae="setInstFuncs",se=Object,ue=se.getPrototypeOf,le=0;function m(e,n){return e&&se[g].hasOwnProperty.call(e,n)}function ce(e){return e&&(e===se[g]||e===Array[g])}function fe(e){return ce(e)||e===Function[g]}function de(e){if(e){if(ue)return ue(e);e=e[ie]||e[g]||(e[Y]?e[Y][g]:null);if(e)return e}return null}function pe(e,n){var t=[],r=se.getOwnPropertyNames;if(r)t=r(e);else for(var i in e)"string"==typeof i&&m(e,i)&&t.push(i);if(t&&0<t.length)for(var o=0;o<t.length;o++)n(t[o])}function ge(e,n,t){return n!==Y&&typeof e[n]===J&&(t||m(e,n))}function me(e){throw new TypeError("DynamicProto: "+e)}function he(e,n){for(var t=e.length-1;0<=t;t--)if(e[t]===n)return 1}function ve(e,n){return m(e,g)?e.name||n||re:((e||{})[Y]||{}).name||n||re}function h(e,r,n,t){m(e,g)||me("theClass is an invalid class definition.");var i,o,a,s,u,l,c=e[g],f=(function(e){if(ue)for(var n=[],t=de(r);t&&!fe(t)&&!he(n,t);){if(t===e)return 1;n.push(t),t=de(t)}}(c)||me("["+ve(e)+"] is not in class hierarchy of ["+ve(r)+"]"),null),e=(m(c,Q)?f=c[Q]:(f="_dynCls$"+ve(e,"_")+"$"+le,le++,c[Q]=f),h[te]),d=!!e[oe],p=(d&&t&&t[oe]!==undefined&&(d=!!t[oe]),o={},pe(i=r,function(e){!o[e]&&ge(i,e,!1)&&(o[e]=i[e])}),o),d=(n(r,function(e,n,t,o){function r(e,n,t){var r,i=n[t];return i[$]&&o&&!1!==(r=e[Z]||{})[ne]&&(i=(r[n[Q]]||{})[t]||i),function(){return i.apply(e,arguments)}}for(var i={},a=(pe(t,function(e){i[e]=r(n,t,e)}),de(e)),s=[];a&&!fe(a)&&!he(s,a);)pe(a,function(e){!i[e]&&ge(a,e,!ue)&&(i[e]=r(n,a,e))}),s.push(a),a=de(a);return i}(c,r,p,d)),!!ue&&!!e[ae]);a=c,n=f,s=r,u=p,e=!1!==(d=d&&t?!!t[ae]:d),ce(a)||(c=s[Z]=s[Z]||{},l=c[n]=c[n]||{},!1!==c[ne]&&(c[ne]=!!e),pe(s,function(e){var t,r,i;ge(s,e,!1)&&s[e]!==u[e]&&(l[e]=s[e],delete s[e],m(a,e)&&(!a[e]||a[e][$])||(a[e]=(t=a,r=e,(i=function(){var e,n;return(function(e,n,t,r){var i=null;if(e&&m(t,Q)){var o=e[Z]||{};if((i=(o[t[Q]]||{})[n])||me("Missing ["+n+"] "+J),!i[ee]&&!1!==o[ne]){for(var a=!m(e,n),s=de(e),u=[];a&&s&&!fe(s)&&!he(u,s);){var l=s[n];if(l){a=l===r;break}u.push(s),s=de(s)}try{a&&(e[n]=i),i[ee]=1}catch(c){o[ne]=!1}}}return i}(this,r,t,i)||(typeof(n=(n=t[e=r])===i?de(t)[e]:n)!==J&&me("["+e+"] is not a "+J),n)).apply(this,arguments)})[$]=1,i)))}))}h[te]={setInstFuncs:!0,useBaseInst:!0};var M="",ye="isInitialized",Ie="teardown",Se="core",Ce="disabled",Te="_doTeardown",we="toISOString",xe="indexOf",be="trim",_e="toString",Ne="constructor",Ae=e,r=t.freeze,Re=t.keys,Fe=String[o][be],Ee=Date[o][we],Le=Array.isArray,Me=E[_e],De=q[_e],ke=De.call(t),Be=/-([a-z])/g,Pe=/([^\w\d_$])/g,Oe=/^(\d+[\w\d_$])/,Ue=Object.getPrototypeOf;function ze(e){return e===undefined||typeof e===R}function D(e){return null===e||ze(e)}function je(e){return!(!e||typeof e!==A)}function d(e){return!(!e||typeof e!==N)}function Ke(e){var n=e;return e&&v(e)?(n=(n=e.replace(Be,function(e,n){return n.toUpperCase()})).replace(Pe,"_")).replace(Oe,function(e,n){return"_"+n}):n}function k(e,n){if(e)for(var t in e)q.call(e,t)&&n.call(e,t,e[t])}function Ve(e,n){return!(!e||!n||!~e.indexOf(n))}var B=Le||function(e){return!(!e||"[object Array]"!==Me.call(e))};function qe(e){return e&&"[object Error]"===Me.call(e)}function v(e){return"string"==typeof e}function We(e){return e&&"object"==typeof e&&(!(e=(Ue||function(e){if(e){if(Ue)return Ue(e);e=e.__proto__||e[o]||e[Ne];if(e)return e}return null})(e))||typeof(e=e[Ne]&&q.call(e,Ne)?e[Ne]:e)===N&&De.call(e)===ke)}function He(e){if(e){if(Ee)return e[we]();var n;return e&&e.getUTCFullYear?(n=function(e){e=""+e;return 1===e.length?"0"+e:e},e.getUTCFullYear()+"-"+n(1+e.getUTCMonth())+"-"+n(e.getUTCDate())+"T"+n(e.getUTCHours())+":"+n(e.getUTCMinutes())+":"+n(e.getUTCSeconds())+"."+(e.getUTCMilliseconds()/1e3).toFixed(3).slice(2,5)+"Z"):void 0}}function P(e,n,t){var r=e.length;try{for(var i=0;i<r&&!(i in e&&-1===n.call(t||e,e[i],i,e));i++);}catch(o){}}function Ge(e,n,t){if(e){if(e.map)return e.map(n,t);var r=e.length,i=t||e,o=Array(r);try{for(var a=0;a<r;a++)a in e&&(o[a]=n.call(i,e[a],e))}catch(s){}}return o}function Xe(e){return e&&(Fe&&e[be]?e[be]():e.replace?e.replace(/^\s+|\s+$/g,""):e)}var Ye=!{toString:null}.propertyIsEnumerable("toString"),Je=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"];function Ze(e){var n=typeof e;if(n===N||n===A&&null!==e||G("objKeys called on non-object"),!Ye&&Re)return Re(e);var t,r=[];for(t in e)e&&q.call(e,t)&&r.push(t);if(Ye)for(var i=Je.length,o=0;o<i;o++)e&&q.call(e,Je[o])&&r.push(Je[o]);return r}var $e=r||function(e){return e};function Qe(){var e=Date;return e.now?e.now():(new e).getTime()}function O(e){return qe(e)?e.name:M}function en(e,n,t,r,i){var o=t;!e||(o=e[n])===t||i&&!i(o)||r&&!r(t)||(e[n]=o=t)}function nn(e){return!!e}function tn(e){throw Error(e)}function rn(e){var t={};return k(e,function(e,n){t[e]=n,ze(t[n])||tn("Value: ["+n+"] already exists for "+e),t[n]=e}),$e(t)}function on(e){return e&&L?t(L({},e)):e}var an="window",sn="navigator",un="JSON",ln="msie",cn="trident/",fn="XMLHttpRequest",dn=null,pn=null,gn=null,mn=null;function hn(e,n){var t,r=!1;if(e){try{(r=n in e)||(t=e[o])&&(r=n in t)}catch(i){}if(!r)try{r=!ze((new e)[n])}catch(i){}}return r}function l(e){var n=H();return n&&n[e]?n[e]:e===an&&vn()?window:null}function vn(){return typeof window===A&&window}function yn(){return vn()?window:l(an)}function In(){return typeof document===A&&document?document:l("document")}function Sn(){return!(typeof navigator!==A||!navigator)}function Cn(){return Sn()?navigator:l(sn)}function Tn(){return typeof JSON===A&&JSON||null!==l(un)}function U(){return Tn()?JSON||l(un):null}function z(e){var n=Object[o].toString.call(e),t=M;return"[object Error]"===n?t="{ stack: '"+e.stack+"', message: '"+e.message+"', name: '"+e.name+"'":Tn()&&(t=U().stringify(e)),n+t}function wn(){return mn=null===mn?Sn()&&!!Cn().sendBeacon:mn}function xn(e){var n=!1;try{var n=!!l("fetch"),t=l("Request");n&&e&&t&&(n=hn(t,"keepalive"))}catch(r){}return n}function bn(){return gn=null===gn&&(gn=typeof XDomainRequest!==R)&&_n()?gn&&!hn(l(fn),"withCredentials"):gn}function _n(){var e=!1;try{e=!!l(fn)}catch(n){}return e}var Nn=null;function An(e){return e?'"'+e.replace(/\"/g,M)+'"':M}function Rn(e,n){var t,r=typeof console!==R?console:l("console");r&&(t="log",d(r[t=r[e]?e:t])&&r[t](n))}En.dataType="MessageData";var Fn=En;function En(e,n,t,r){void 0===t&&(t=!1),this.messageId=e,this.message=(t?"AI: ":"AI (Internal): ")+e;t=M,Tn()&&(t=U().stringify(r)),e=(n?" message:"+An(n):M)+(r?" props:"+An(t):M);this.message+=e}function Ln(e,n){return(e||{}).logger||new Mn(n)}var Mn=function hi(i){this.identifier="DiagnosticLogger",this.queue=[];var s=0,u={};h(hi,this,function(o){function e(e,n){e=i[e];return D(e)?n:e}function a(e,n){var t,r=(t=(t=Nn)||!0===i.disableDbgExt?t:Nn||(r=l("Microsoft"),Nn=r?r.ApplicationInsights:Nn))?t.ChromeDbgExt:null;r&&r.diagLog&&r.diagLog(e,n)}D(i)&&(i={}),o.consoleLoggingLevel=function(){return e("loggingLevelConsole",0)},o.telemetryLoggingLevel=function(){return e("loggingLevelTelemetry",1)},o.maxInternalMessageLimit=function(){return e("maxMessageLimit",25)},o.enableDebugExceptions=function(){return e("enableDebugExceptions",!1)},o.throwInternal=function(e,n,t,r,i){n=new Fn(n,t,i=void 0!==i&&i,r);if(o.enableDebugExceptions())throw n;t=1===e?"errorToConsole":"warnToConsole";ze(n.message)?a("throw"+(1===e?"Critical":"Warning"),n):(r=o.consoleLoggingLevel(),i?(i=+n.messageId,!u[i]&&e<=r&&(o[t](n.message),u[i]=!0)):e<=r&&o[t](n.message),o.logInternalMessage(e,n))},o.warnToConsole=function(e){Rn("warn",e),a("warning",e)},o.errorToConsole=function(e){Rn("error",e),a("error",e)},o.resetInternalMessageCount=function(){s=0,u={}},o.logInternalMessage=function(e,n){var t,r;s>=o.maxInternalMessageLimit()||(r=!0,t="AITR_"+n.messageId,u[t]?r=!1:u[t]=!0,r&&(e<=o.telemetryLoggingLevel()&&(o.queue.push(n),s++,a(1===e?"error":"warn",n)),s===o.maxInternalMessageLimit()&&(r=new Fn(23,t="Internal events throttle limit per PageView reached for this app.",!1),o.queue.push(r),1===e?o.errorToConsole(t):o.warnToConsole(t))))}})},Dn=(s.ParentContextKey="parent",s.ChildrenContextKey="childEvts",s);function s(e,i,n){var r,o=this,a=!1;o.start=Qe(),o.name=e,o.isAsync=n,o.isChildEvt=function(){return!1},d(i)&&(a=function(e){if(Ae)try{var n={enumerable:!0,configurable:!0,get:function(){return!r&&d(i)&&(r=i(),i=null),r}};return Ae(e,"payload",n),!0}catch(t){}return!1}(o)),o.getCtx=function(e){return e?(e===s.ParentContextKey||e===s.ChildrenContextKey?o:o.ctx||{})[e]:null},o.setCtx=function(e,n){e&&(e===s.ParentContextKey?(o[e]||(o.isChildEvt=function(){return!0}),o[e]=n):e===s.ChildrenContextKey?o[e]=n:(o.ctx=o.ctx||{})[e]=n)},o.complete=function(){var e=0,n=o.getCtx(s.ChildrenContextKey);if(B(n))for(var t=0;t<n.length;t++){var r=n[t];r&&(e+=r.time)}o.time=Qe()-o.start,o.exTime=o.time-e,o.complete=function(){},!a&&d(i)&&(o.payload=i())}}var kn="CoreUtils.doPerf";function Bn(e,n,t,r,i){if(e)if(e=d(e.getPerfMgr)?e.getPerfMgr():e){var o,a=void 0,s=e.getCtx(kn);try{if(a=e.create(n(),r,i))return s&&a.setCtx&&(a.setCtx(Dn.ParentContextKey,s),s.getCtx&&s.setCtx&&((o=s.getCtx(Dn.ChildrenContextKey))||(o=[],s.setCtx(Dn.ChildrenContextKey,o)),o.push(a))),e.setCtx(kn,a),t(a)}catch(u){a&&a.setCtx&&a.setCtx("exception",u)}finally{a&&e.fire(a),e.setCtx(kn,s)}}t()}var Pn=4294967296,On=4294967295,Un=!1,zn=123456789,jn=987654321;function Kn(e){var n,t=0,r=l("crypto")||l("msCrypto");if(0===(t=r&&r.getRandomValues?r.getRandomValues(new Uint32Array(1))[0]&On:t)&&(!(r=Cn())||r.userAgent===pn&&null!==dn||(r=((pn=r.userAgent)||M).toLowerCase(),dn=Ve(r,ln)||Ve(r,cn)),dn)){if(!Un)try{var i=2147483647&Qe();(n=(Math.random()*Pn^i)+i)<0&&(n>>>=0),zn=123456789+n&On,jn=987654321-n&On,Un=!0}catch(o){}r=((jn=36969*(65535&jn)+(jn>>16)&On)<<16)+(65535&(zn=18e3*(65535&zn)+(zn>>16)&On))>>>0&On|0,t=(r>>>=0)&On}return 0===t&&(t=Math.floor(Pn*Math.random()|0)),e||(t>>>=0),t}var Vn=e,qn="2.7.3",Wn="."+function(e){void 0===e&&(e=22);for(var n=Kn()>>>0,t=0,r=M;r.length<e;)r+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[0|63&n]||"",n>>>=6,5==++t&&(n=(Kn()<<2&4294967295|3&n)>>>0,t=0);return r}(6),Hn=0;function Gn(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType}function Xn(e,n){return Ke(e+Hn+++((n=void 0!==n&&n)?"."+qn:"")+Wn)}function Yn(e){var o={id:Xn("_aiData-"+(e||"")+"."+qn),accept:Gn,get:function(e,n,t,r){var i=e[o.id];return i?i[Ke(n)]:(r&&((i=function(e,n){var t=n[e.id];if(!t){t={};try{Gn(n)&&!function(e,n,t){if(Vn)try{return Vn(e,n,{value:t,enumerable:!1,configurable:!0}),1}catch(r){}}(n,e.id,t)&&(n[e.id]=t)}catch(r){}}return t}(o,e))[Ke(n)]=t),t)},kill:function(e,n){if(e&&e[n])try{delete e[n]}catch(t){}}};return o}var Jn=Yn("plugin");function Zn(e){return Jn.get(e,"state",{},!0)}var $n="TelemetryPluginChain",Qn="_hasRun",et="_getTelCtx",nt=0;function tt(e,a,t,n){var r=n?function(e,n,t,r){for(;e;){if(e.getPlugin()===r)return e;e=e.getNext()}return it([r],n,t)}(e,a,t,n):e,i=[],o={_next:function(){var e,n=r;return r=n?n.getNext():null,n||(e=i)&&0<e.length&&(P(e,function(e){try{e.func.call(e.self,e.args)}catch(n){t.logger.throwInternal(2,73,"Unexpected Exception during onComplete - "+z(n))}}),i=[]),n},ctx:{core:function(){return t},diagLog:function(){return Ln(t,a)},getCfg:function(){return a},getExtCfg:s,getConfig:function(e,n,t){void 0===t&&(t=!1);var r,e=s(e,null);return e&&!D(e[n])?r=e[n]:a&&!D(a[n])&&(r=a[n]),D(r)?t:r},hasNext:function(){return!!r},getNext:function(){return r},setNext:function(e){r=e},iterate:function(e){for(;n=o._next();){var n=n.getPlugin();n&&e(n)}},onComplete:function(e,n){for(var t=[],r=2;r<arguments.length;r++)t[r-2]=arguments[r];e&&i.push({func:e,self:ze(n)?o.ctx:n,args:t})}}};function s(e,n,t){var r,i,o;return void 0===n&&(n={}),void 0===t&&(t=0),(r=a&&(i=a.extensionConfig)&&e?i[e]:r)?je(n)&&0!==t&&(o=function d(){var e=arguments,n=e[0]||{},t=e.length,r=!1,i=1;for(0<t&&"boolean"==typeof n&&(r=n,n=e[i]||{},i++),je(n)||(n={});i<t;i++){var o,a,s,u,l=e[i],c=B(l),f=je(l);for(o in l)(c&&o in l||f&&q.call(l,o))&&(a=l[o],s=void 0,r&&a&&((s=B(a))||We(a))&&(u=n[o],s?B(u)||(u=[]):We(u)||(u={}),a=d(r,u,a)),a!==undefined&&(n[o]=a))}return n}(!0,n,r),a&&2===t&&k(n,function(e){var n;D(o[e])&&!D(n=a[e])&&(o[e]=n)})):r=n,r}return o}function rt(e,t,r,n){var i=tt(e,t,r,n),o=i.ctx;return o.processNext=function(e){var n=i._next();return n&&n.processTelemetry(e,o),!n},o.createNew=function(e,n){return rt((e=B(e=void 0===e?null:e)?it(e,t,r,n):e)||o.getNext(),t,r,n)},o}function it(e,n,t,r){var i,o=null,a=!r;return B(e)&&0<e.length&&(i=null,P(e,function(e){(a=!a&&r===e||a)&&e&&d(e.processTelemetry)&&(e=ot(e,n,t),o=o||e,i&&i._setNext(e),i=e)})),r&&!o?it([r],n,t):o}function ot(u,r,i){var l=null,o=d(u.processTelemetry),a=d(u.setNextPlugin),c=u?u.identifier+"-"+u.priority+"-"+nt++:"Unknown-0-"+nt++,s={getPlugin:function(){return u},getNext:function(){return l},processTelemetry:function(t,e){var n;f(e=e||(n=(n=u&&d(u[et])?u[et]():n)||rt(s,r,i)),function(e){if(!u||!o)return!1;var n=Zn(u);return!n[Ie]&&!n[Ce]&&(a&&u.setNextPlugin(l),u.processTelemetry(t,e),!0)},"processTelemetry",function(){return{item:t}},!t.sync)||e.processNext(t)},unload:function(r,i){f(r,function(){var e,n,t=!1;return u&&(e=Zn(u),n=u[Se]||e.core,!u||n&&n!==r[Se]()||e[Ie]||(e[Se]=null,e[Ie]=!0,e[ye]=!1,u[Ie]&&!0===u[Ie](r,i)&&(t=!0))),t},"unload",function(){},i.isAsync)||r.processNext(i)},_id:c,_setNext:function(e){l=e}};function f(t,r,i,e,n){var o=!1,a=u?u.identifier:$n,s=(s=t[Qn])||(t[Qn]={});return t.setNext(l),u&&Bn(t[Se](),function(){return a+":"+i},function(){s[c]=!0;try{var e=l?l._id:M;e&&(s[e]=!1),o=r(t)}catch(n){e=!l||s[l._id];e&&(o=!0),l&&e||t.diagLog().throwInternal(1,73,"Plugin ["+u.identifier+"] failed during "+i+" - "+z(n)+", run flags: "+z(s))}},e,n),o}return $e(s)}var at="getPlugin",_e=function vi(){var o,a,l,c,s=this;function n(e){var n,e=e=void 0===e?null:e;return e||(n=a||rt(null,{},s.core),e=l&&l[at]?n.createNew(null,l[at]):n.createNew(null,l)),e}function f(){o=!1,s.core=null,l=a=null,c=[]}f(),h(vi,s,function(u){u.initialize=function(e,n,t,r){e&&en(e,"extensionConfig",[],null,D),!r&&n&&(r=n.getProcessTelContext().getNext());var i=l;l&&l[at]&&(i=l[at]()),s.core=n,a=rt(r,e,n,i),o=!0},u.teardown=function(e,n){var t,r,i,o;if(u.core&&(!e||u.core===e.core()))return r=!1,i=e||function s(e,t,r,n){var i=tt(e,t,r,n),o=i.ctx;return o.processNext=function(e){var n=i._next();return n&&n.unload(o,e),!n},o.createNew=function(e,n){return s((e=B(e=void 0===e?null:e)?it(e,t,r,n):e)||o.getNext(),t,r,n)},o}(null,{},u.core,l&&l[at]?l[at]():l),o=n||{reason:0,isAsync:!1},u[Te]&&!0===u[Te](i,o,a)?t=!0:a(),t;function a(){r||(r=!0,P(c,function(e){e.rm()}),c=[],!0===t&&i.processNext(o),f())}},u._addHook=function(e){e&&(B(e)?c=c.concat(e):c.push(e))}}),s.diagLog=function(e){return n(e).diagLog()},s[ye]=function(){return o},s.setInitialized=function(e){o=e},s.setNextPlugin=function(e){l=e},s.processNext=function(e,n){n?n.processNext(e):l&&d(l.processTelemetry)&&l.processTelemetry(e,null)},s._getTelCtx=n},st="attachEvent",ut="addEventListener",lt=(Xn("aiEvtPageHide"),Xn("aiEvtPageShow"),1),ct=Yn("events"),ft=/^([^.]*)(?:\.(.+)|)/;function dt(e){return e&&e.replace?e.replace(/^\s*\.*|\.*\s*$/g,""):e}function pt(e,n,t,r){r=r=void 0!==r&&r;void 0===r&&(r=!1);var i,o,a,s,u,l,c,f=!1;if(e)try{u=n,null&&(l="",B(null)?(l="",P(null,function(e){(e=dt(e))&&("."!==e[0]&&(e="."+e),l+=e)})):l=null,l&&(u=(u||"")+(l="."!==l[0]?"."+l:l)));var d,p={type:(c=ft.exec(u)||[])[1],ns:(c[2]||"").split(".").sort().join(".")},g=p,m=t,h=r,v=!1;(s=e)&&g&&g.type&&m&&(s[ut]?(s[ut](g.type,m,h),v=!0):s[st]&&(s[st]("on"+g.type,m),v=!0)),(f=v)&&ct.accept(e)&&(d={guid:lt++,evtName:p,handler:t,capture:r},i=p.type,((a=ct.get(e,"events",{},o=void 0===o||o))[i]||(a[i]=[])).push(d))}catch(y){}return f}var j=rn({CRITICAL:1,WARNING:2}),K=rn({BrowserDoesNotSupportLocalStorage:0,BrowserCannotReadLocalStorage:1,BrowserCannotReadSessionStorage:2,BrowserCannotWriteLocalStorage:3,BrowserCannotWriteSessionStorage:4,BrowserFailedRemovalFromLocalStorage:5,BrowserFailedRemovalFromSessionStorage:6,CannotSendEmptyTelemetry:7,ClientPerformanceMathError:8,ErrorParsingAISessionCookie:9,ErrorPVCalc:10,ExceptionWhileLoggingError:11,FailedAddingTelemetryToBuffer:12,FailedMonitorAjaxAbort:13,FailedMonitorAjaxDur:14,FailedMonitorAjaxOpen:15,FailedMonitorAjaxRSC:16,FailedMonitorAjaxSend:17,FailedMonitorAjaxGetCorrelationHeader:18,FailedToAddHandlerForOnBeforeUnload:19,FailedToSendQueuedTelemetry:20,FailedToReportDataLoss:21,FlushFailed:22,MessageLimitPerPVExceeded:23,MissingRequiredFieldSpecification:24,NavigationTimingNotSupported:25,OnError:26,SessionRenewalDateIsZero:27,SenderNotInitialized:28,StartTrackEventFailed:29,StopTrackEventFailed:30,StartTrackFailed:31,StopTrackFailed:32,TelemetrySampledAndNotSent:33,TrackEventFailed:34,TrackExceptionFailed:35,TrackMetricFailed:36,TrackPVFailed:37,TrackPVFailedCalc:38,TrackTraceFailed:39,TransmissionFailed:40,FailedToSetStorageBuffer:41,FailedToRestoreStorageBuffer:42,InvalidBackendResponse:43,FailedToFixDepricatedValues:44,InvalidDurationValue:45,TelemetryEnvelopeInvalid:46,CreateEnvelopeError:47,CannotSerializeObject:48,CannotSerializeObjectNonSerializable:49,CircularReferenceDetected:50,ClearAuthContextFailed:51,ExceptionTruncated:52,IllegalCharsInName:53,ItemNotInArray:54,MaxAjaxPerPVExceeded:55,MessageTruncated:56,NameTooLong:57,SampleRateOutOfRange:58,SetAuthContextFailed:59,SetAuthContextFailedAccountName:60,StringValueTooLong:61,StartCalledMoreThanOnce:62,StopCalledWithoutStart:63,TelemetryInitializerFailed:64,TrackArgumentsNotSpecified:65,UrlTooLong:66,SessionStorageBufferFull:67,CannotAccessCookie:68,IdTooLong:69,InvalidEvent:70,FailedMonitorAjaxSetRequestHeader:71,SendBrowserInfoOnUserInit:72,PluginException:73,NotificationException:74,SnippetScriptLoadFailure:99,InvalidInstrumentationKey:100,CannotParseAiBlobValue:101,InvalidContentBlob:102,TrackPageActionEventFailed:103,FailedAddingCustomDefinedRequestContext:104,InMemoryStorageBufferFull:105});function gt(e,n,t){var r,i,o=n.length,a=(e=e,(n=n)&&150<(n=Xe(n.toString())).length&&(i=n.substring(0,150),e&&e.throwInternal(2,K.NameTooLong,"name is too long. It has been truncated to 150 characters.",{name:n},!0)),i||n);if(a.length!==o){for(var s=0,u=a;t[u]!==undefined;)s++,u=a.substring(0,147)+(r=void 0,(r="00"+s).substr(r.length-3));a=u}return a}function y(e,n,t){var r;return void 0===t&&(t=1024),n&&(t=t||1024,(n=Xe(n)).toString().length>t&&(r=n.toString().substring(0,t),e&&e.throwInternal(2,K.StringValueTooLong,"string value is too long. It has been truncated to "+t+" characters.",{value:n},!0))),r||n}function mt(e,n){return It(e,n,2048,K.UrlTooLong)}function ht(e,n){var t;return n&&32768<n.length&&(t=n.substring(0,32768),e&&e.throwInternal(2,K.MessageTruncated,"message is too long, it has been truncated to 32768 characters.",{message:n},!0)),t||n}function vt(r,e){var i;return e&&(i={},k(e,function(e,n){if(je(n)&&Tn())try{n=U().stringify(n)}catch(t){r&&r.throwInternal(2,K.CannotSerializeObjectNonSerializable,"custom property is not valid",{exception:t},!0)}n=y(r,n,8192),e=gt(r,e,i),i[e]=n}),e=i),e}function yt(t,e){var r;return e&&(r={},k(e,function(e,n){e=gt(t,e,r),r[e]=n}),e=r),e}function It(e,n,t,r){var i;return n&&(n=Xe(n)).length>t&&(i=n.substring(0,t),e&&e.throwInternal(2,r,"input is too long, it has been truncated to "+t+" characters.",{data:n},!0)),i||n}var St="";function Ct(e){var n=St+Math.floor((e=Math.round(e=isNaN(e)||e<0?0:e))/1e3)%60,t=St+Math.floor(e/6e4)%60,r=St+Math.floor(e/36e5)%24,i=Math.floor(e/864e5),e=1===(e=St+e%1e3).length?"00"+e:2===e.length?"0"+e:e,n=n.length<2?"0"+n:n,t=t.length<2?"0"+t:t,r=r.length<2?"0"+r:r;return(0<i?i+".":St)+r+":"+t+":"+n+"."+e}var Tt="Microsoft_ApplicationInsights_BypassAjaxInstrumentation",wt="sampleRate",xt="ProcessLegacy",bt="http.method",p="not_specified",_t=rn({LocalStorage:0,SessionStorage:1}),Nt=(rn({AI:0,AI_AND_W3C:1,W3C:2}),undefined);function At(e){try{if(D(H()))return null;var n=new Date,t=l(e===_t.LocalStorage?"localStorage":"sessionStorage"),r=(t.setItem(n.toString(),n.toString()),t.getItem(n.toString())!==n.toString());if(t.removeItem(n.toString()),!r)return t}catch(i){}return null}function Rt(){return Ft()?At(_t.SessionStorage):null}function Ft(){return Nt=Nt===undefined?!!At(_t.SessionStorage):Nt}function Et(e,n){var t=Rt();if(null!==t)try{return t.getItem(n)}catch(r){Nt=!1,e.throwInternal(2,K.BrowserCannotReadSessionStorage,"Browser failed read of session storage. "+O(r),{exception:z(r)})}return null}function Lt(e,n,t){var r=Rt();if(null!==r)try{r.setItem(n,t)}catch(i){Nt=!1,e.throwInternal(2,K.BrowserCannotWriteSessionStorage,"Browser failed write to session storage. "+O(i),{exception:z(i)})}}var Mt=In()||{},Dt=0,kt=[null,null,null,null,null];var Bt=["https://dc.services.visualstudio.com/v2/track","https://breeze.aimon.applicationinsights.io/v2/track","https://dc-int.services.visualstudio.com/v2/track"];function Pt(e){return~Bt.indexOf(e.toLowerCase())}n(Ut,Ot=function(){});var Ot,Le=Ut;function Ut(){return Ot.call(this)||this}n(Kt,zt=function(){this.ver=1,this.sampleRate=100,this.tags={}});var zt,jt=Kt;function Kt(e,n,t){var r=zt.call(this)||this;return r.name=y(e,t)||p,r.data=n,r.time=He(new Date),r.aiDataContract={time:1,iKey:1,name:1,sampleRate:function(){return 100===r.sampleRate?4:1},tags:1,data:1},r}var Vt,r=function(){this.ver=2,this.properties={},this.measurements={}},qt=(n(Wt,Vt=r),Wt.envelopeType="Microsoft.ApplicationInsights.{0}.Event",Wt.dataType="EventData",Wt);function Wt(e,n,t,r){var i=Vt.call(this)||this;return i.aiDataContract={ver:1,name:1,properties:0,measurements:0},i.name=y(e,n)||p,i.properties=vt(e,t),i.measurements=yt(e,r),i}var Ht="error",u="stack",Gt="stackDetails",Xt="errorSrc",Yt="message",Jt="description";function Zt(e,n){var t=e;return t&&!v(t)&&(JSON&&JSON.stringify?(t=JSON.stringify(e),!n||t&&"{}"!==t||(t=d(e.toString)?e.toString():""+e)):t=e+" - (Missing JSON.stringify)"),t||""}function $t(e,n){var t=e;return e&&((t=t&&!v(t)&&(e[Yt]||e[Jt])||t)&&!v(t)&&(t=Zt(t,!0)),e.filename&&(t=t+" @"+(e.filename||"")+":"+(e.lineno||"?")+":"+(e.colno||"?"))),(n&&"String"!==n&&"Object"!==n&&"Error"!==n&&!~(t||"").indexOf(n)?n+": "+t:t)||""}function Qt(e){return e&&e.src&&v(e.src)&&e.obj&&B(e.obj)}function er(e){var e=e||"",n=(e=v(e)?e:v(e[u])?e[u]:""+e).split("\n");return{src:e,obj:n}}function nr(e){var n,t=null;if(e)try{e[u]?t=er(e[u]):e[Ht]&&e[Ht][u]?t=er(e[Ht][u]):e.exception&&e.exception[u]?t=er(e.exception[u]):Qt(e)?t=e:Qt(e[Gt])?t=e[Gt]:window&&window.opera&&e[Yt]?t=function(e){for(var n=[],t=e.split("\n"),r=0;r<t.length;r++){var i=t[r];t[r+1]&&(i+="@"+t[r+1],r++),n.push(i)}return{src:e,obj:n}}(e.message):v(e)?t=er(e):(n=e[Yt]||e[Jt]||"",v(e[Xt])&&(n&&(n+="\n"),n+=" from "+e[Xt]),n&&(t=er(n)))}catch(r){t=er(r)}return t||{src:"",obj:null}}function tr(e){var n="";if(e&&!(n=e.typeName||e.name||""))try{var t=/function (.{1,200})\(/.exec(e.constructor.toString()),n=t&&1<t.length?t[1]:""}catch(r){}return n}function rr(e){if(e)try{var n,t;if(!v(e))return n=tr(e),(t=Zt(e,!1))&&"{}"!==t||(e[Ht]&&(n=tr(e=e[Ht])),t=Zt(e,!0)),t.indexOf(n)&&"String"!==n?n+":"+t:t}catch(r){}return""+(e||"")}n(a,ir=function(){this.ver=2,this.exceptions=[],this.properties={},this.measurements={}}),a.CreateAutoException=function(e,n,t,r,i,o,a,s){var u=tr(i||o||e);return{message:$t(e,u),url:n,lineNumber:t,columnNumber:r,error:rr(i||o||e),evt:rr(o||e),typeName:u,stackDetails:nr(a||i||o),errorSrc:s}},a.CreateFromInterface=function(n,e,t,r){var i=e.exceptions&&Ge(e.exceptions,function(e){return sr.CreateFromInterface(n,e)});return new a(n,f(f({},e),{exceptions:i}),t,r)},a.prototype.toInterface=function(){var e=this,n=e.exceptions,t=e.properties,r=e.measurements,i=e.severityLevel,o=e.problemGroup,a=e.id,e=e.isManual;return{ver:"4.0",exceptions:n instanceof Array&&Ge(n,function(e){return e.toInterface()})||undefined,severityLevel:i,properties:t,measurements:r,problemGroup:o,id:a,isManual:e}},a.CreateSimpleException=function(e,n,t,r,i,o){return{exceptions:[{hasFullStack:!0,message:e,stack:i,typeName:n}]}},a.envelopeType="Microsoft.ApplicationInsights.{0}.Exception",a.dataType="ExceptionData",a.formatError=rr;var ir,or=a;function a(e,n,t,r,i,o){var a=ir.call(this)||this;return a.aiDataContract={ver:1,exceptions:1,severityLevel:0,properties:0,measurements:0},function(e){try{if(je(e))return"ver"in e&&"exceptions"in e&&"properties"in e}catch(n){}}(n)?(a.exceptions=n.exceptions,a.properties=n.properties,a.measurements=n.measurements,n.severityLevel&&(a.severityLevel=n.severityLevel),n.id&&(a.id=n.id),n.problemGroup&&(a.problemGroup=n.problemGroup),a.ver=2,D(n.isManual)||(a.isManual=n.isManual)):(a.exceptions=[new sr(e,n,t=t||{})],a.properties=vt(e,t),a.measurements=yt(e,r),i&&(a.severityLevel=i),o&&(a.id=o)),a}n(ur,ar=function(){this.hasFullStack=!0,this.parsedStack=[]}),ur.prototype.toInterface=function(){var e=this.parsedStack instanceof Array&&Ge(this.parsedStack,function(e){return e.toInterface()});return{id:this.id,outerId:this.outerId,typeName:this.typeName,message:this.message,hasFullStack:this.hasFullStack,stack:this[u],parsedStack:e||undefined}},ur.CreateFromInterface=function(e,n){var t=n.parsedStack instanceof Array&&Ge(n.parsedStack,function(e){return fr.CreateFromInterface(e)})||n.parsedStack;return new ur(e,f(f({},n),{parsedStack:t}))};var ar,sr=ur;function ur(e,n,t){var l,r,i,o,a,s=ar.call(this)||this;return s.aiDataContract={id:0,outerId:0,typeName:1,message:1,hasFullStack:0,stack:0,parsedStack:2},function(e){try{if(je(e))return"hasFullStack"in e&&"typeName"in e}catch(n){}}(n)?(s.typeName=n.typeName,s.message=n.message,s[u]=n[u],s.parsedStack=n.parsedStack,s.hasFullStack=n.hasFullStack):(r=(o=n)&&o.evt,qe(o)||(o=o[Ht]||r||o),s.typeName=y(e,tr(o))||p,s.message=ht(e,$t(n||o,s.typeName))||p,l=n[Gt]||nr(n),s.parsedStack=function(){var e=l.obj;if(e&&0<e.length){var n=[],t=0,r=0;if(P(e,function(e){var e=e.toString();fr.regex.test(e)&&(e=new fr(e,t++),r+=e.sizeInBytes,n.push(e))}),32768<r)for(var i=0,o=n.length-1,a=0,s=i,u=o;i<o;){if(32768<(a+=n[i].sizeInBytes+n[o].sizeInBytes)){n.splice(s,u-s+1);break}s=i,u=o,i++,o--}}return n}(),s[u]=(r=e,a="",(o=l)&&(o.obj?P(o.obj,function(e){a+=e+"\n"}):a=o.src||""),(n=a)&&32768<(e=""+n).length&&(i=e.substring(0,32768),r&&r.throwInternal(2,K.ExceptionTruncated,"exception is too long, it has been truncated to 32768 characters.",{exception:n},!0)),i||n),s.hasFullStack=B(s.parsedStack)&&0<s.parsedStack.length,t&&(t.typeName=t.typeName||s.typeName)),s}n(i,lr=function(){}),i.CreateFromInterface=function(e){return new i(e,null)},i.prototype.toInterface=function(){return{level:this.level,method:this.method,assembly:this.assembly,fileName:this.fileName,line:this.line}},i.regex=/^([\s]+at)?[\s]{0,50}([^\@\()]+?)[\s]{0,50}(\@|\()([^\(\n]+):([0-9]+):([0-9]+)(\)?)$/,i.baseSize=58;var lr,cr,fr=i;function i(e,n){var t,r=lr.call(this)||this;return r.sizeInBytes=0,r.aiDataContract={level:1,method:1,assembly:0,fileName:0,line:0},"string"==typeof e?(t=e,r.level=n,r.method="<no_method>",r.assembly=Xe(t),r.fileName="",r.line=0,(n=t.match(i.regex))&&5<=n.length&&(r.method=Xe(n[2])||r.method,r.fileName=Xe(n[4]),r.line=parseInt(n[5])||0)):(r.level=e.level,r.method=e.method,r.assembly=e.assembly,r.fileName=e.fileName,r.line=e.line,r.sizeInBytes=0),r.sizeInBytes+=r.method.length,r.sizeInBytes+=r.fileName.length,r.sizeInBytes+=r.assembly.length,r.sizeInBytes+=i.baseSize,r.sizeInBytes+=r.level.toString().length,r.sizeInBytes+=r.line.toString().length,r}cr=0,n(gr,dr=function(){this.kind=cr});var dr,pr=gr;function gr(){var e=null!==dr&&dr.apply(this,arguments)||this;return e.aiDataContract={name:1,kind:0,value:1,count:0,min:0,max:0,stdDev:0},e}n(vr,mr=function(){this.ver=2,this.metrics=[],this.properties={},this.measurements={}}),vr.envelopeType="Microsoft.ApplicationInsights.{0}.Metric",vr.dataType="MetricData";var mr,hr=vr;function vr(e,n,t,r,i,o,a,s,u){var l=mr.call(this)||this,c=(l.aiDataContract={ver:1,metrics:1,properties:0},new pr);return c.count=0<r?r:undefined,c.max=isNaN(o)||null===o?undefined:o,c.min=isNaN(i)||null===i?undefined:i,c.name=y(e,n)||p,c.value=t,c.stdDev=isNaN(a)||null===a?undefined:a,l.metrics=[c],l.properties=vt(e,s),l.measurements=yt(e,u),l}n(Ir,yr=r);var yr,e=Ir;function Ir(){var e=yr.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}n(Tr,Sr=e),Tr.envelopeType="Microsoft.ApplicationInsights.{0}.Pageview",Tr.dataType="PageviewData";var Sr,Cr=Tr;function Tr(e,n,t,r,i,o,a){var s=Sr.call(this)||this;return s.aiDataContract={ver:1,name:0,url:0,duration:0,properties:0,measurements:0,id:0},s.id=a&&It(e,a,128,K.IdTooLong).toString(),s.url=mt(e,t),s.name=y(e,n)||p,isNaN(r)||(s.duration=Ct(r)),s.properties=vt(e,i),s.measurements=yt(e,o),s}n(br,wr=function(){this.ver=2,this.success=!0,this.properties={},this.measurements={}}),br.envelopeType="Microsoft.ApplicationInsights.{0}.RemoteDependency",br.dataType="RemoteDependencyData";var wr,xr=br;function br(e,n,t,r,i,o,a,s,u,l,c,f){void 0===u&&(u="Ajax");var d,p,g,m=wr.call(this)||this,t=(m.aiDataContract={id:1,ver:1,name:0,resultCode:0,duration:0,success:0,data:0,target:0,type:0,properties:0,measurements:0,kind:0,value:0,count:0,min:0,max:0,stdDev:0,dependencyKind:0,dependencySource:0,commandName:0,dependencyTypeName:0},m.id=n,m.duration=Ct(i),m.success=o,m.resultCode=a+"",m.type=y(e,u),n=e,i=s,u=a=o=r,a=(s=t)&&0<s.length?(d=s,g=(t=kt)[p=Dt],Mt.createElement?t[p]||(g=t[p]=Mt.createElement("a")):g={host:function(){e=null,d&&null!=(t=d.match(/(\w*):\/\/(.[^/:]+)(\:[\d]+)?/i))&&2<t.length&&v(t[2])&&0<t[2].length&&(e=t[2]||"",2<t.length&&(n=(t[1]||"").toLowerCase(),t=t[3]||"",e+=t="http"==n&&":80"===t||"https"==n&&":443"===t?"":t));var e,n=e||"";if(n){var t=n.match(/(www[0-9]?\.)?(.[^/:]+)(\:[\d]+)?/i);if(null!=t&&3<t.length&&v(t[2])&&0<t[2].length)return t[2]+(t[3]||"")}return n}()},g.href=d,++p>=t.length&&(p=0),Dt=p,p=(t=g).host,a||(null!=t.pathname?("/"!=((g=0===t.pathname.length?"/":t.pathname)[0]||"")&&(g="/"+g),u=t.pathname,y(n,i?i+" "+g:g)):y(n,s))):p=o,{target:p,name:a,data:u});return m.data=mt(e,r)||t.data,m.target=y(e,t.target),l&&(m.target="".concat(m.target," | ").concat(l)),m.name=y(e,t.name),m.properties=vt(e,c),m.measurements=yt(e,f),m}n(Rr,_r=function(){this.ver=2,this.properties={},this.measurements={}}),Rr.envelopeType="Microsoft.ApplicationInsights.{0}.Message",Rr.dataType="MessageData";var _r,Nr,Ar=Rr;function Rr(e,n,t,r,i){var o=_r.call(this)||this;return o.aiDataContract={ver:1,message:1,severityLevel:0,properties:0},o.message=ht(e,n=n||p),o.properties=vt(e,r),o.measurements=yt(e,i),t&&(o.severityLevel=t),o}function Fr(){var e=Nr.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}n(Fr,Nr=e),n(Mr,Er=Fr),Mr.envelopeType="Microsoft.ApplicationInsights.{0}.PageviewPerformance",Mr.dataType="PageviewPerformanceData";var Er,Lr=Mr;function Mr(e,n,t,r,i,o,a){var s=Er.call(this)||this;return s.aiDataContract={ver:1,name:0,url:0,duration:0,perfTotal:0,networkConnect:0,sentRequest:0,receivedResponse:0,domProcessing:0,properties:0,measurements:0},s.url=mt(e,t),s.name=y(e,n)||p,s.properties=vt(e,i),s.measurements=yt(e,o),a&&(s.domProcessing=a.domProcessing,s.duration=a.duration,s.networkConnect=a.networkConnect,s.perfTotal=a.perfTotal,s.receivedResponse=a.receivedResponse,s.sentRequest=a.sentRequest),s}n(Br,Dr=Le);var Dr,kr=Br;function Br(e,n){var t=Dr.call(this)||this;return t.aiDataContract={baseType:1,baseData:1},t.baseType=e,t.baseData=n,t}function Pr(e){var n="ai."+e+".";return function(e){return n+e}}var Or,Ur,r=Pr("application"),e=Pr("device"),Le=Pr("location"),c=Pr("operation"),zr=Pr("session"),I=Pr("user"),S=Pr("cloud"),jr=Pr("internal"),Kr=(Ur={applicationVersion:r("ver"),applicationBuild:r("build"),applicationTypeId:r("typeId"),applicationId:r("applicationId"),applicationLayer:r("layer"),deviceId:e("id"),deviceIp:e("ip"),deviceLanguage:e("language"),deviceLocale:e("locale"),deviceModel:e("model"),deviceFriendlyName:e("friendlyName"),deviceNetwork:e("network"),deviceNetworkName:e("networkName"),deviceOEMName:e("oemName"),deviceOS:e("os"),deviceOSVersion:e("osVersion"),deviceRoleInstance:e("roleInstance"),deviceRoleName:e("roleName"),deviceScreenResolution:e("screenResolution"),deviceType:e("type"),deviceMachineName:e("machineName"),deviceVMName:e("vmName"),deviceBrowser:e("browser"),deviceBrowserVersion:e("browserVersion"),locationIp:Le("ip"),locationCountry:Le("country"),locationProvince:Le("province"),locationCity:Le("city"),operationId:c("id"),operationName:c("name"),operationParentId:c("parentId"),operationRootId:c("rootId"),operationSyntheticSource:c("syntheticSource"),operationCorrelationVector:c("correlationVector"),sessionId:zr("id"),sessionIsFirst:zr("isFirst"),sessionIsNew:zr("isNew"),userAccountAcquisitionDate:I("accountAcquisitionDate"),userAccountId:I("accountId"),userAgent:I("userAgent"),userId:I("id"),userStoreRegion:I("storeRegion"),userAuthUserId:I("authUserId"),userAnonymousUserAcquisitionDate:I("anonUserAcquisitionDate"),userAuthenticatedUserAcquisitionDate:I("authUserAcquisitionDate"),cloudName:S("name"),cloudRole:S("role"),cloudRoleVer:S("roleVer"),cloudRoleInstance:S("roleInstance"),cloudEnvironment:S("environment"),cloudLocation:S("location"),cloudDeploymentUnit:S("deploymentUnit"),internalNodeName:jr("nodeName"),internalSdkVersion:jr("sdkVersion"),internalAgentVersion:jr("agentVersion"),internalSnippet:jr("snippet"),internalSdkSrc:jr("sdkSrc")},n(Vr,Or=function(){var t=this;k(Ur,function(e,n){t[e]=n})}),Vr);function Vr(){return Or.call(this)||this}var qr,C=new Kr,r=function yi(t,r){var i=[],o=!1;this._get=function(){return i},this._set=function(e){return i=e},h(yi,this,function(n){n.enqueue=function(e){n.count()>=r.eventsLimitInMem()?o||(t.throwInternal(j.WARNING,K.InMemoryStorageBufferFull,"Maximum in-memory buffer size reached: "+n.count(),!0),o=!0):i.push(e)},n.count=function(){return i.length},n.size=function(){for(var e=i.length,n=0;n<i.length;n++)e+=i[n].length;return r.emitLineDelimitedJson()||(e+=2),e},n.clear=function(){o=!(i=[])},n.getItems=function(){return i.slice(0)},n.batchPayloads=function(e){return e&&0<e.length?r.emitLineDelimitedJson()?e.join("\n"):"["+e.join(",")+"]":null}})},Wr=(n(Hr,qr=r),Hr);function Hr(e,n){e=qr.call(this,e,n)||this;return h(Hr,e,function(e,n){e.markAsSent=function(e){n.clear()},e.clearSent=function(e){}}),e}n(T,Gr=r),T.BUFFER_KEY="AI_buffer",T.SENT_BUFFER_KEY="AI_sentBuffer",T.MAX_BUFFER_SIZE=2e3;var Gr,Xr=T;function T(s,u){var e=Gr.call(this,s,u)||this,l=!1;return h(T,e,function(t,n){var e=o(T.BUFFER_KEY),r=o(T.SENT_BUFFER_KEY),r=t._set(e.concat(r));function i(n,e){var t=[];return P(e,function(e){d(e)||-1!==function(e,n){if(e){if(e[xe])return e[xe](n,void 0);var t=e.length;try{for(var r=0;r<t;r++)if(r in e&&e[r]===n)return r}catch(i){}}return-1}(n,e)||t.push(e)}),t}function o(e){try{var e=u.namePrefix&&u.namePrefix()?u.namePrefix()+"_"+e:e,n=Et(s,e);if(n){var t=U().parse(n);if((t=v(t)?U().parse(t):t)&&B(t))return t}}catch(r){s.throwInternal(j.CRITICAL,K.FailedToRestoreStorageBuffer," storage key: "+e+", "+O(r),{exception:z(r)})}return[]}function a(e,n){try{var e=u.namePrefix&&u.namePrefix()?u.namePrefix()+"_"+e:e,t=JSON.stringify(n);Lt(s,e,t)}catch(r){Lt(s,e,JSON.stringify([])),s.throwInternal(j.WARNING,K.FailedToSetStorageBuffer," storage key: "+e+", "+O(r)+". Buffer cleared",{exception:z(r)})}}r.length>T.MAX_BUFFER_SIZE&&(r.length=T.MAX_BUFFER_SIZE),a(T.SENT_BUFFER_KEY,[]),a(T.BUFFER_KEY,r),t.enqueue=function(e){t.count()>=T.MAX_BUFFER_SIZE?l||(s.throwInternal(j.WARNING,K.SessionStorageBufferFull,"Maximum buffer size reached: "+t.count(),!0),l=!0):(n.enqueue(e),a(T.BUFFER_KEY,t._get()))},t.clear=function(){n.clear(),a(T.BUFFER_KEY,t._get()),a(T.SENT_BUFFER_KEY,[]),l=!1},t.markAsSent=function(e){a(T.BUFFER_KEY,t._set(i(e,t._get())));var n=o(T.SENT_BUFFER_KEY);n instanceof Array&&e instanceof Array&&((n=n.concat(e)).length>T.MAX_BUFFER_SIZE&&(s.throwInternal(j.CRITICAL,K.SessionStorageBufferFull,"Sent buffer reached its maximum size: "+n.length,!0),n.length=T.MAX_BUFFER_SIZE),a(T.SENT_BUFFER_KEY,n))},t.clearSent=function(e){e=i(e,o(T.SENT_BUFFER_KEY));a(T.SENT_BUFFER_KEY,e)}}),e}var Yr="baseType",w="baseData",x="properties",Jr="true";function b(e,n,t){en(e,n,t,nn)}function Zr(e,t,r){D(e)||k(e,function(e,n){"number"==typeof n?r[e]=n:v(n)?t[e]=n:Tn()&&(t[e]=U().stringify(n))})}function $r(t,r){D(t)||k(t,function(e,n){t[e]=n||r})}function Qr(e,n,t,r){for(var r=new jt(e,r,n),n=(b(r,"sampleRate",t[wt]),(t[w]||{}).startTime&&(r.time=He(t[w].startTime)),r.iKey=t.iKey,t.iKey.replace(/-/g,"")),n=(r.name=r.name.replace("{0}",n),e),e=t,i=r,o=i.tags=i.tags||{},a=e.ext=e.ext||{},s=e.tags=e.tags||[],u=a.user,u=(u&&(b(o,C.userAuthUserId,u.authId),b(o,C.userId,u.id||u.localId)),a.app),u=(u&&b(o,C.sessionId,u.sesId),a.device),u=(u&&(b(o,C.deviceId,u.id||u.localId),b(o,C.deviceType,u.deviceClass),b(o,C.deviceIp,u.ip),b(o,C.deviceModel,u.model),b(o,C.deviceType,u.deviceType)),e.ext.web),e=(u&&(b(o,C.deviceLanguage,u.browserLang),b(o,C.deviceBrowserVersion,u.browserVer),b(o,C.deviceBrowser,u.browser),b(e=(e=(e=i.data=i.data||{})[w]=e[w]||{})[x]=e[x]||{},"domain",u.domain),b(e,"isManual",u.isManual?Jr:null),b(e,"screenRes",u.screenRes),b(e,"userConsent",u.userConsent?Jr:null)),a.os),u=(e&&b(o,C.deviceOS,e.name),a.trace),l=(u&&(b(o,C.operationParentId,u.parentID),b(o,C.operationName,y(n,u.name)),b(o,C.operationId,u.traceID)),{}),c=s.length-1;0<=c;c--)k(s[c],function(e,n){l[e]=n}),s.splice(c,1);k(s,function(e,n){l[e]=n});e=f(f({},o),l);return e[C.internalSdkVersion]||(e[C.internalSdkVersion]="javascript:".concat(ni.Version)),i.tags=on(e),t.tags=t.tags||[],on(r)}function ei(e,n){D(n[w])&&e.throwInternal(j.CRITICAL,K.TelemetryEnvelopeInvalid,"telemetryItem.baseData cannot be null.")}var ni={Version:"2.8.0-beta.2203-02"};function ti(e,n,t){ei(e,n);var r={},i={},t=(n[Yr]!==qt.dataType&&(r.baseTypeSource=n[Yr]),n[Yr]===qt.dataType?(r=n[w][x]||{},i=n[w].measurements||{}):n[w]&&Zr(n[w],r,i),Zr(n.data,r,i),D(t)||$r(r,t),n[w].name),t=new qt(e,t,r,i),r=new kr(qt.dataType,t);return Qr(e,qt.envelopeType,n,r)}var ri=function Ii(f){h(Ii,this,function(e){function l(a,s){var e="__aiCircularRefCheck",u={};if(!a)return f.throwInternal(j.CRITICAL,K.CannotSerializeObject,"cannot serialize object because it is null or undefined",{name:s},!0),u;if(a[e])return f.throwInternal(j.WARNING,K.CircularReferenceDetected,"Circular reference detected while serializing object",{name:s},!0),u;if(a.aiDataContract)return a[e]=!0,k(a.aiDataContract,function(e,n){var t=d(n)?1&n():1&n,r=d(n)?4&n():4&n,n=2&n,i=a[e]!==undefined,o=je(a[e])&&null!==a[e];!t||i||n?r||(t=o?(n?c:l)(a[e],e):a[e])!==undefined&&(u[e]=t):f.throwInternal(j.CRITICAL,K.MissingRequiredFieldSpecification,"Missing required field specification. The field is required but not present on source",{field:e,name:s})}),delete a[e],u;if("measurements"===s)u=t(a,"number",s);else if("properties"===s)u=t(a,"string",s);else if("tags"===s)u=t(a,"string",s);else if(B(a))u=c(a,s);else{f.throwInternal(j.WARNING,K.CannotSerializeObjectNonSerializable,"Attempting to serialize an object which does not implement ISerializable",{name:s},!0);try{U().stringify(a),u=a}catch(n){f.throwInternal(j.CRITICAL,K.CannotSerializeObject,n&&d(n.toString)?n.toString():"Error serializing object",null,!0)}}return u}function c(e,n){if(e)if(B(e))for(var t=[],r=0;r<e.length;r++){var i=l(e[r],n+"["+r+"]");t.push(i)}else f.throwInternal(j.CRITICAL,K.ItemNotInArray,"This field was specified as an array in the contract but the item is not an array.\r\n",{name:n},!0);return t}function t(e,t,r){var i;return e&&(i={},k(e,function(e,n){"string"===t?n===undefined?i[e]="undefined":null===n?i[e]="null":n.toString?i[e]=n.toString():i[e]="invalid field: toString() is not defined.":"number"===t?n===undefined?i[e]="undefined":i[e]=null===n?"null":isNaN(n=parseFloat(n))?"NaN":n:(i[e]="invalid field: "+r+" is of unknown type.",f.throwInternal(j.CRITICAL,i[e],null,!0))})),i}e.serialize=function(e){e=l(e,"root");try{return U().stringify(e)}catch(n){f.throwInternal(j.CRITICAL,K.CannotSerializeObject,n&&d(n.toString)?n.toString():"Error serializing object",null,!0)}}})};function ii(){var a=yn(),s=In(),u=!1,l=!0;h(ii,this,function(e){try{var n,t;a&&pt(a,"online",r)&&(pt(a,"offline",i),u=!0),s&&!ze((n=s.body||s).ononline)&&(n.ononline=r,n.onoffline=i,u=!0),u&&(t=Cn())&&!D(t.onLine)&&(l=t.onLine)}catch(o){u=!1}function r(){l=!0}function i(){l=!1}e.isListening=u,e.isOnline=function(){var e=!0,n=Cn();return u?e=l:n&&!D(n.onLine)&&(e=n.onLine),e},e.isOffline=function(){return!e.isOnline()}})}var oi=ii.Offline=new ii,ai=(si.prototype.getHashCodeScore=function(e){return this.getHashCode(e)/si.INT_MAX_VALUE*100},si.prototype.getHashCode=function(e){if(""===e)return 0;for(;e.length<8;)e=e.concat(e);for(var n=5381,t=0;t<e.length;++t)n=(n<<5)+n+e.charCodeAt(t),n&=n;return Math.abs(n)},si.INT_MAX_VALUE=2147483647,si);function si(){}var ui=function(){var n=new ai,t=new Kr;this.getSamplingScore=function(e){return e.tags&&e.tags[t.userId]?n.getHashCodeScore(e.tags[t.userId]):e.ext&&e.ext.user&&e.ext.user.id?n.getHashCodeScore(e.ext.user.id):e.tags&&e.tags[t.operationId]?n.getHashCodeScore(e.tags[t.operationId]):e.ext&&e.ext.telemetryTrace&&e.ext.telemetryTrace.traceID?n.getHashCodeScore(e.ext.telemetryTrace.traceID):100*Math.random()}},li=(ci.prototype.isSampledIn=function(e){var n=this.sampleRate;return null===n||n===undefined||100<=n||e.baseType===hr.dataType||this.samplingScoreGenerator.getSamplingScore(e)<n},ci);function ci(e,n){this.INT_MAX_VALUE=2147483647;n=n||Ln(null);(100<e||e<0)&&(n.throwInternal(j.WARNING,K.SampleRateOutOfRange,"Sampling rate is out of range (0..100). Sampling will be disabled, you may be sending too much data which may affect your AI service level.",{samplingRate:e},!0),e=100),this.sampleRate=e,this.samplingScoreGenerator=new ui}function fi(e){try{return e.responseText}catch(n){}return null}function di(){return{endpointUrl:function(){return"https://dc.services.visualstudio.com/v2/track"},emitLineDelimitedJson:function(){return!1},maxBatchInterval:function(){return 15e3},maxBatchSizeInBytes:function(){return 102400},disableTelemetry:function(){return!1},enableSessionStorageBuffer:function(){return!0},isRetryDisabled:function(){return!1},isBeaconApiDisabled:function(){return!0},disableXhr:function(){return!1},onunloadDisableFetch:function(){return!1},onunloadDisableBeacon:function(){return!1},instrumentationKey:function(){return undefined},namePrefix:function(){return undefined},samplingPercentage:function(){return 100},customHeaders:function(){return undefined},convertUndefined:function(){return undefined},eventsLimitInMem:function(){return 1e4}}}(e={})[qt.dataType]=ti,e[Ar.dataType]=function(e,n,t){ei(e,n);var r=n[w].message,i=n[w].severityLevel,o=n[w][x]||{},a=n[w].measurements||{},t=(Zr(n.data,o,a),D(t)||$r(o,t),new Ar(e,r,i,o,a)),r=new kr(Ar.dataType,t);return Qr(e,Ar.envelopeType,n,r)},e[Cr.dataType]=function(e,n,t){ei(e,n);var r,i="duration",o=n[w],i=(D(o)||D(o[x])||D(o[x][i])?D(n.data)||D(n.data[i])||(r=n.data[i],delete n.data[i]):(r=o[x][i],delete o[x][i]),n[w]),o=(((n.ext||{}).trace||{}).traceID&&(a=n.ext.trace.traceID),i.id||a),a=i.name,s=i.uri,u=i[x]||{},l=i.measurements||{},i=(D(i.refUri)||(u.refUri=i.refUri),D(i.pageType)||(u.pageType=i.pageType),D(i.isLoggedIn)||(u.isLoggedIn=i.isLoggedIn.toString()),D(i[x])||k(i[x],function(e,n){u[e]=n}),Zr(n.data,u,l),D(t)||$r(u,t),new Cr(e,a,s,r,u,l,o)),t=new kr(Cr.dataType,i);return Qr(e,Cr.envelopeType,n,t)},e[Lr.dataType]=function(e,n,t){ei(e,n);var r=n[w],i=r.name,o=r.uri||r.url,a=r[x]||{},s=r.measurements||{},t=(Zr(n.data,a,s),D(t)||$r(a,t),new Lr(e,i,o,undefined,a,s,r)),i=new kr(Lr.dataType,t);return Qr(e,Lr.envelopeType,n,i)},e[or.dataType]=function(e,n,t){ei(e,n);var r=n[w].measurements||{},i=n[w][x]||{},t=(Zr(n.data,i,r),D(t)||$r(i,t),n[w]),t=or.CreateFromInterface(e,t,i,r),i=new kr(or.dataType,t);return Qr(e,or.envelopeType,n,i)},e[hr.dataType]=function(e,n,t){ei(e,n);var r=n[w],i=r[x]||{},o=r.measurements||{},t=(Zr(n.data,i,o),D(t)||$r(i,t),new hr(e,r.name,r.average,r.sampleCount,r.min,r.max,r.stdDev,i,o)),r=new kr(hr.dataType,t);return Qr(e,hr.envelopeType,n,r)},e[xr.dataType]=function(e,n,t){ei(e,n);var r=n[w].measurements||{},i=n[w][x]||{},t=(Zr(n.data,i,r),D(t)||$r(i,t),n[w]);if(D(t))return e.warnToConsole("Invalid input for dependency data"),null;var o=t[x]&&t[x][bt]?t[x][bt]:"GET",o=new xr(e,t.id,t.target,t.name,t.duration,t.success,t.responseCode,o,t.type,t.correlationContext,i,r),t=new kr(xr.dataType,o);return Qr(e,xr.envelopeType,n,t)};var pi,gi=e,Le=(n(mi,pi=_e),mi.constructEnvelope=function(e,n,t,r){e=n===e.iKey||D(n)?e:f(f({},e),{iKey:n});return(gi[e.baseType]||ti)(t,e,r)},mi);function mi(){var w,x,t,b,_,N,A,R=pi.call(this)||this,F=(R.priority=1001,!(R.identifier="AppInsightsChannelPlugin")),E={},L=0;return R._senderConfig=di(),h(mi,R,function(l,a){function c(e,n,t,r,i,o){var a=null;l._appId||(a=g(o))&&a.appId&&(l._appId=a.appId),(e<200||300<=e)&&0!==e?(301!==e&&307!==e&&308!==e||s(t))&&!l._senderConfig.isRetryDisabled()&&y(e)?(m(n),l.diagLog().throwInternal(j.WARNING,K.TransmissionFailed,". Response code "+e+". Will retry to send "+n.length+" items.")):l._onError(n,i):oi.isOffline()?l._senderConfig.isRetryDisabled()||(m(n,10),l.diagLog().throwInternal(j.WARNING,K.TransmissionFailed,". Offline - Response Code: ".concat(e,". Offline status: ").concat(oi.isOffline(),". Will retry to send ").concat(n.length," items."))):(s(t),206===e?(a=a||g(o))&&!l._senderConfig.isRetryDisabled()?l._onPartialSuccess(n,a):l._onError(n,i):(w=0,l._onSuccess(n,r)))}function s(e){return!(10<=_)&&!D(e)&&""!==e&&e!==l._senderConfig.endpointUrl()&&(l._senderConfig.endpointUrl=function(){return e},++_,1)}function n(e,n){A?A(e,!1):u(e)}function o(e){var n=Cn(),t=l._buffer,r=l._senderConfig.endpointUrl(),i=l._buffer.batchPayloads(e),i=new Blob([i],{type:"text/plain;charset=UTF-8"}),r=n.sendBeacon(r,i);return r&&(t.markAsSent(e),l._onSuccess(e,e.length)),r}function u(e,n){if(B(e)&&0<e.length&&!o(e)){for(var t=[],r=0;r<e.length;r++){var i=e[r];o([i])||t.push(i)}0<t.length&&(N(t,!0),l.diagLog().throwInternal(j.WARNING,K.TransmissionFailed,". Failed to send telemetry with Beacon API, retried with normal sender."))}}function f(n,e){var t=new XMLHttpRequest,r=l._senderConfig.endpointUrl();try{t[Tt]=!0}catch(i){}t.open("POST",r,e),t.setRequestHeader("Content-type","application/json"),Pt(r)&&t.setRequestHeader("Sdk-Context","appId"),P(Ze(E),function(e){t.setRequestHeader(e,E[e])}),t.onreadystatechange=function(){return l._xhrReadyStateChange(t,n,n.length)},t.onerror=function(e){return l._onError(n,I(t),e)};e=l._buffer.batchPayloads(n);t.send(e),l._buffer.markAsSent(n)}function d(e,n){if(B(e)){for(var t=e.length,r=0;r<e.length;r++)t+=e[r].length;L+t<=65e3?i(e,!1):wn()?u(e):(N&&N(e,!0),l.diagLog().throwInternal(j.WARNING,K.TransmissionFailed,". Failed to send telemetry with Beacon API, retried with xhrSender."))}}function p(e,n){i(e,!0)}function i(t,r){var e=l._senderConfig.endpointUrl(),n=l._buffer.batchPayloads(t),i=new Blob([n],{type:"application/json"}),o=new Headers,a=n.length,n=!1,s=!1,e=(Pt(e)&&o.append("Sdk-Context","appId"),P(Ze(E),function(e){o.append(e,E[e])}),(i={method:"POST",headers:o,body:i})[Tt]=!0,r||(n=i.keepalive=!0,L+=a),new Request(e,i));try{e[Tt]=!0}catch(u){}l._buffer.markAsSent(t);try{fetch(e).then(function(n){r||(L-=a,a=0),s||(s=!0,n.ok?n.text().then(function(e){c(n.status,t,n.url,t.length,n.statusText,e)}):l._onError(t,n.statusText))})["catch"](function(e){r||(L-=a,a=0),s||(s=!0,l._onError(t,e.message))})}catch(u){s||l._onError(t,z(u))}n&&!s&&(s=!0,l._onSuccess(t,t.length))}function g(e){try{if(e&&""!==e){var n=U().parse(e);if(n&&n.itemsReceived&&n.itemsReceived>=n.itemsAccepted&&n.itemsReceived-n.itemsAccepted===n.errors.length)return n}}catch(t){l.diagLog().throwInternal(j.CRITICAL,K.InvalidBackendResponse,"Cannot parse the response. "+O(t),{response:e})}return null}function m(e,n){if(void 0===n&&(n=1),e&&0!==e.length){var t=l._buffer;t.clearSent(e),w++;for(var r=0,i=e;r<i.length;r++){var o=i[r];t.enqueue(o)}n=w<=1?10:(e=1+Math.floor((Math.pow(2,w)-1)/2*Math.random()*10),Math.max(Math.min(e*=n,3600),10)),e=Qe()+1e3*n;x=e,h()}}function h(){var e;t||F||(e=x?Math.max(0,x-Qe()):0,e=Math.max(l._senderConfig.maxBatchInterval(),e),t=setTimeout(function(){t=null,l.triggerSend(!0,null,1)},e))}function v(){clearTimeout(t),x=t=null}function y(e){return 408===e||429===e||500===e||503===e}function I(e,n){return e?"XMLHttpRequest,Status:"+e.status+",Response:"+fi(e)||e.response||"":n}function S(n,e){var t=l._buffer,r=yn(),i=new XDomainRequest,r=(i.onload=function(){return l._xdrOnLoad(i,n)},i.onerror=function(e){return l._onError(n,C(i),e)},r&&r.location&&r.location.protocol||"");if(l._senderConfig.endpointUrl().lastIndexOf(r,0))return l.diagLog().throwInternal(j.WARNING,K.TransmissionFailed,". Cannot send XDomain request. The endpoint URL protocol doesn't match the hosting page protocol."),void t.clear();r=l._senderConfig.endpointUrl().replace(/^(https?:)/,""),i.open("POST",r),r=t.batchPayloads(n);i.send(r),t.markAsSent(n)}function C(e,n){return e?"XDomainRequest,Response:"+fi(e)||"":n}function T(e,n){var t="getNotifyMgr",t=l.core[t]?l.core[t]():l.core._notificationManager;if(t&&t.eventsSendRequest)try{t.eventsSendRequest(e,n)}catch(r){l.diagLog().throwInternal(j.CRITICAL,K.NotificationException,"send request notification failed: "+O(r),{exception:z(r)})}}l.pause=function(){v(),F=!0},l.resume=function(){F&&(F=!1,x=null,l._buffer.size()>l._senderConfig.maxBatchSizeInBytes()&&l.triggerSend(!0,null,10),h())},l.flush=function(e,n,t){if(void 0===e&&(e=!0),!F){v();try{l.triggerSend(e,null,t||1)}catch(r){l.diagLog().throwInternal(j.CRITICAL,K.FlushFailed,"flush failed, telemetry will not be collected: "+O(r),{exception:z(r)})}}},l.onunloadFlush=function(){if(!F)if(!1!==l._senderConfig.onunloadDisableBeacon()&&!1!==l._senderConfig.isBeaconApiDisabled()||!wn())l.flush();else try{l.triggerSend(!0,n,2)}catch(e){l.diagLog().throwInternal(j.CRITICAL,K.FailedToSendQueuedTelemetry,"failed to flush with beacon sender on page unload, telemetry will not be collected: "+O(e),{exception:z(e)})}},l.teardown=function(){tn("Method not implemented.")},l.addHeader=function(e,n){E[e]=n},l.initialize=function(e,n,t,r){a.initialize(e,n,t,r);var i=l._getTelCtx(),o=l.identifier,t=(b=new ri(n.logger),x=null,w=0,l._sender=null,_=0,l.diagLog()),r=(k(di(),function(e,n){l._senderConfig[e]=function(){return i.getConfig(o,e,n())}}),l._buffer=new(l._senderConfig.enableSessionStorageBuffer()&&Ft()?Xr:Wr)(t,l._senderConfig),l._sample=new li(l._senderConfig.samplingPercentage(),t),!D(e.disableInstrumentationKeyValidation)&&e.disableInstrumentationKeyValidation||/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/.test(e.instrumentationKey)||t.throwInternal(j.CRITICAL,K.InvalidInstrumentationKey,"Invalid Instrumentation key "+e.instrumentationKey),!Pt(l._senderConfig.endpointUrl())&&l._senderConfig.customHeaders()&&0<l._senderConfig.customHeaders().length&&P(l._senderConfig.customHeaders(),function(e){R.addHeader(e.header,e.value)}),l._senderConfig),n=null;!r.disableXhr()&&bn()?n=S:!r.disableXhr()&&_n()&&(n=f),!n&&xn()&&(n=p),N=n||f,!r.isBeaconApiDisabled()&&wn()&&(n=u),l._sender=n||f,A=!r.onunloadDisableFetch()&&xn(!0)?d:wn()?u:!r.disableXhr()&&bn()?S:!r.disableXhr()&&_n()?f:N},l.processTelemetry=function(e,t){t=l._getTelCtx(t);try{if(l._senderConfig.disableTelemetry())return;if(!e)return void t.diagLog().throwInternal(j.CRITICAL,K.CannotSendEmptyTelemetry,"Cannot send empty telemetry");if(e.baseData&&!e.baseType)return void t.diagLog().throwInternal(j.CRITICAL,K.InvalidEvent,"Cannot send telemetry without baseData and baseType");if(e.baseType||(e.baseType="EventData"),!l._sender)return void t.diagLog().throwInternal(j.CRITICAL,K.SenderNotInitialized,"Sender was not initialized");if(!l._sample.isSampledIn(e))return void t.diagLog().throwInternal(j.WARNING,K.TelemetrySampledAndNotSent,"Telemetry item was sampled out and not sent",{SampleRate:l._sample.sampleRate});e[wt]=l._sample.sampleRate;var n=l._senderConfig.convertUndefined()||undefined,r=e.iKey||l._senderConfig.instrumentationKey(),i=mi.constructEnvelope(e,r,t.diagLog(),n);if(!i)return void t.diagLog().throwInternal(j.CRITICAL,K.CreateEnvelopeError,"Unable to create an AppInsights envelope");var o=!1;if(e.tags&&e.tags[xt]&&(P(e.tags[xt],function(e){try{e&&!1===e(i)&&(o=!0,t.diagLog().warnToConsole("Telemetry processor check returns false"))}catch(n){t.diagLog().throwInternal(j.CRITICAL,K.TelemetryInitializerFailed,"One of telemetry initializers failed, telemetry item will not be sent: "+O(n),{exception:z(n)},!0)}}),delete e.tags[xt]),o)return;var a=b.serialize(i),s=l._buffer;s.size()+a.length>l._senderConfig.maxBatchSizeInBytes()&&l.triggerSend(!0,null,10),s.enqueue(a),h()}catch(u){t.diagLog().throwInternal(j.WARNING,K.FailedAddingTelemetryToBuffer,"Failed adding telemetry to the sender's buffer, some telemetry will be lost: "+O(u),{exception:z(u)})}l.processNext(e,t)},l._xhrReadyStateChange=function(e,n,t){4===e.readyState&&c(e.status,n,e.responseURL,t,I(e),fi(e)||e.response)},l.triggerSend=function(e,n,t){if(void 0===e&&(e=!0),!F)try{var r,i=l._buffer;l._senderConfig.disableTelemetry()?i.clear():0<i.count()&&(r=i.getItems(),T(t||0,e),n?n.call(R,r,e):l._sender(r,e)),v()}catch(o){i=function(e){var n=((e=(e=void 0===e?null:e)?e:(n=Cn()||{})?(n.userAgent||M).toLowerCase():M)||M).toLowerCase();if(Ve(n,ln))return e=In()||{},Math.max(parseInt(n.split(ln)[1]),e.documentMode||0);if(Ve(n,cn)){e=parseInt(n.split(cn)[1]);if(e)return e+4}return null}();(!i||9<i)&&l.diagLog().throwInternal(j.CRITICAL,K.TransmissionFailed,"Telemetry transmission failed, some telemetry will be lost: "+O(o),{exception:z(o)})}},l._onError=function(e,n,t){l.diagLog().throwInternal(j.WARNING,K.OnError,"Failed to send telemetry.",{message:n}),l._buffer.clearSent(e)},l._onPartialSuccess=function(e,n){for(var t=[],r=[],i=0,o=n.errors.reverse();i<o.length;i++){var a=o[i],s=e.splice(a.index,1)[0];(y(a.statusCode)?r:t).push(s)}0<e.length&&l._onSuccess(e,n.itemsAccepted),0<t.length&&l._onError(t,I(null,["partial success",n.itemsAccepted,"of",n.itemsReceived].join(" "))),0<r.length&&(m(r),l.diagLog().throwInternal(j.WARNING,K.TransmissionFailed,"Partial success. Delivered: "+e.length+", Failed: "+t.length+". Will retry to send "+r.length+" our of "+n.itemsReceived+" items"))},l._onSuccess=function(e,n){l._buffer.clearSent(e)},l._xdrOnLoad=function(e,n){var t=fi(e);!e||t+""!="200"&&""!==t?(t=g(t))&&t.itemsReceived&&t.itemsReceived>t.itemsAccepted&&!l._senderConfig.isRetryDisabled()?l._onPartialSuccess(n,t):l._onError(n,C(e)):(w=0,l._onSuccess(n,0))}}),R}_.Sender=Le;c=_,zr="__esModule",I={value:!0},S=Object.defineProperty;if(S)try{return void S(c,zr,I)}catch(Si){}typeof I.value!==undefined&&(c[zr]=I.value)};"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n(((e="undefined"!=typeof globalThis?globalThis:e||self).Microsoft=e.Microsoft||{},e.Microsoft.ApplicationInsights=e.Microsoft.ApplicationInsights||{}));
5
+ var e=this,n=function(_){"use strict";var N="function",A="object",R="undefined",o="prototype",F="hasOwnProperty",t=Object,L=t[o],E=t.assign,q=t.create,e=t.defineProperty,V=L[F],W=null;function H(e){return void 0===e&&(e=!0),W&&e||(typeof globalThis!==R&&globalThis&&(W=globalThis),typeof self!==R&&self&&(W=self),typeof window!==R&&window&&(W=window),typeof global!==R&&global&&(W=global)),W}function G(e){throw new TypeError(e)}(H()||{}).Symbol,(H()||{}).Reflect;var f=E||function(e){for(var n,t=1,r=arguments.length;t<r;t++)for(var i in n=arguments[t])L[F].call(n,i)&&(e[i]=n[i]);return e},X=function(e,n){return(X=t.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,n){e.__proto__=n}||function(e,n){for(var t in n)n[F](t)&&(e[t]=n[t])})(e,n)};function n(e,n){function t(){this.constructor=e}typeof n!==N&&null!==n&&G("Class extends value "+n+" is not a constructor or null"),X(e,n),e[o]=null===n?function(e){if(q)return q(e);if(null==e)return{};var n=typeof e;function t(){}return n!==A&&n!==N&&G("Object prototype may only be an Object:"+e),t[o]=e,new t}(n):(t[o]=n[o],new t)}var Y="constructor",g="prototype",J="function",Z="_dynInstFuncs",$="_isDynProxy",Q="_dynClass",ee="_dynInstChk",ne=ee,te="_dfOpts",re="_unknown_",ie="__proto__",oe="useBaseInst",ae="setInstFuncs",se=Object,ue=se.getPrototypeOf,le=0;function m(e,n){return e&&se[g].hasOwnProperty.call(e,n)}function ce(e){return e&&(e===se[g]||e===Array[g])}function fe(e){return ce(e)||e===Function[g]}function de(e){if(e){if(ue)return ue(e);e=e[ie]||e[g]||(e[Y]?e[Y][g]:null);if(e)return e}return null}function pe(e,n){var t=[],r=se.getOwnPropertyNames;if(r)t=r(e);else for(var i in e)"string"==typeof i&&m(e,i)&&t.push(i);if(t&&0<t.length)for(var o=0;o<t.length;o++)n(t[o])}function ge(e,n,t){return n!==Y&&typeof e[n]===J&&(t||m(e,n))}function me(e){throw new TypeError("DynamicProto: "+e)}function he(e,n){for(var t=e.length-1;0<=t;t--)if(e[t]===n)return 1}function ve(e,n){return m(e,g)?e.name||n||re:((e||{})[Y]||{}).name||n||re}function h(e,r,n,t){m(e,g)||me("theClass is an invalid class definition.");var i,o,a,s,u,l,c=e[g],f=(function(e){if(ue)for(var n=[],t=de(r);t&&!fe(t)&&!he(n,t);){if(t===e)return 1;n.push(t),t=de(t)}}(c)||me("["+ve(e)+"] is not in class hierarchy of ["+ve(r)+"]"),null),e=(m(c,Q)?f=c[Q]:(f="_dynCls$"+ve(e,"_")+"$"+le,le++,c[Q]=f),h[te]),d=!!e[oe],p=(d&&t&&t[oe]!==undefined&&(d=!!t[oe]),o={},pe(i=r,function(e){!o[e]&&ge(i,e,!1)&&(o[e]=i[e])}),o),d=(n(r,function(e,n,t,o){function r(e,n,t){var r,i=n[t];return i[$]&&o&&!1!==(r=e[Z]||{})[ne]&&(i=(r[n[Q]]||{})[t]||i),function(){return i.apply(e,arguments)}}for(var i={},a=(pe(t,function(e){i[e]=r(n,t,e)}),de(e)),s=[];a&&!fe(a)&&!he(s,a);)pe(a,function(e){!i[e]&&ge(a,e,!ue)&&(i[e]=r(n,a,e))}),s.push(a),a=de(a);return i}(c,r,p,d)),!!ue&&!!e[ae]);a=c,n=f,s=r,u=p,e=!1!==(d=d&&t?!!t[ae]:d),ce(a)||(c=s[Z]=s[Z]||{},l=c[n]=c[n]||{},!1!==c[ne]&&(c[ne]=!!e),pe(s,function(e){var t,r,i;ge(s,e,!1)&&s[e]!==u[e]&&(l[e]=s[e],delete s[e],m(a,e)&&(!a[e]||a[e][$])||(a[e]=(t=a,r=e,(i=function(){var e,n;return(function(e,n,t,r){var i=null;if(e&&m(t,Q)){var o=e[Z]||{};if((i=(o[t[Q]]||{})[n])||me("Missing ["+n+"] "+J),!i[ee]&&!1!==o[ne]){for(var a=!m(e,n),s=de(e),u=[];a&&s&&!fe(s)&&!he(u,s);){var l=s[n];if(l){a=l===r;break}u.push(s),s=de(s)}try{a&&(e[n]=i),i[ee]=1}catch(c){o[ne]=!1}}}return i}(this,r,t,i)||(typeof(n=(n=t[e=r])===i?de(t)[e]:n)!==J&&me("["+e+"] is not a "+J),n)).apply(this,arguments)})[$]=1,i)))}))}h[te]={setInstFuncs:!0,useBaseInst:!0};var M="",ye="isInitialized",Ie="teardown",Se="core",Ce="disabled",Te="_doTeardown",we="toISOString",xe="indexOf",be="trim",_e="toString",Ne="constructor",Ae=e,r=t.freeze,Re=t.keys,Fe=String[o][be],Le=Date[o][we],Ee=Array.isArray,Me=L[_e],De=V[_e],ke=De.call(t),Be=/-([a-z])/g,Pe=/([^\w\d_$])/g,Oe=/^(\d+[\w\d_$])/,Ue=Object.getPrototypeOf;function ze(e){return e===undefined||typeof e===R}function D(e){return null===e||ze(e)}function je(e){return!(!e||typeof e!==A)}function p(e){return!(!e||typeof e!==N)}function Ke(e){var n=e;return e&&v(e)?(n=(n=e.replace(Be,function(e,n){return n.toUpperCase()})).replace(Pe,"_")).replace(Oe,function(e,n){return"_"+n}):n}function k(e,n){if(e)for(var t in e)V.call(e,t)&&n.call(e,t,e[t])}function qe(e,n){return!(!e||!n||!~e.indexOf(n))}var B=Ee||function(e){return!(!e||"[object Array]"!==Me.call(e))};function Ve(e){return e&&"[object Error]"===Me.call(e)}function v(e){return"string"==typeof e}function We(e){return e&&"object"==typeof e&&(!(e=(Ue||function(e){if(e){if(Ue)return Ue(e);e=e.__proto__||e[o]||e[Ne];if(e)return e}return null})(e))||typeof(e=e[Ne]&&V.call(e,Ne)?e[Ne]:e)===N&&De.call(e)===ke)}function He(e){if(e){if(Le)return e[we]();var n;return e&&e.getUTCFullYear?(n=function(e){e=""+e;return 1===e.length?"0"+e:e},e.getUTCFullYear()+"-"+n(1+e.getUTCMonth())+"-"+n(e.getUTCDate())+"T"+n(e.getUTCHours())+":"+n(e.getUTCMinutes())+":"+n(e.getUTCSeconds())+"."+(e.getUTCMilliseconds()/1e3).toFixed(3).slice(2,5)+"Z"):void 0}}function P(e,n,t){var r=e.length;try{for(var i=0;i<r&&!(i in e&&-1===n.call(t||e,e[i],i,e));i++);}catch(o){}}function Ge(e,n,t){if(e){if(e.map)return e.map(n,t);var r=e.length,i=t||e,o=Array(r);try{for(var a=0;a<r;a++)a in e&&(o[a]=n.call(i,e[a],e))}catch(s){}}return o}function Xe(e){return e&&(Fe&&e[be]?e[be]():e.replace?e.replace(/^\s+|\s+$/g,""):e)}var Ye=!{toString:null}.propertyIsEnumerable("toString"),Je=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"];function Ze(e){var n=typeof e;if(n===N||n===A&&null!==e||G("objKeys called on non-object"),!Ye&&Re)return Re(e);var t,r=[];for(t in e)e&&V.call(e,t)&&r.push(t);if(Ye)for(var i=Je.length,o=0;o<i;o++)e&&V.call(e,Je[o])&&r.push(Je[o]);return r}var $e=r||function(e){return e};function Qe(){var e=Date;return e.now?e.now():(new e).getTime()}function O(e){return Ve(e)?e.name:M}function en(e,n,t,r,i){var o=t;!e||(o=e[n])===t||i&&!i(o)||r&&!r(t)||(e[n]=o=t)}function nn(e){return!!e}function tn(e){throw Error(e)}function rn(e){var t={};return k(e,function(e,n){t[e]=n,ze(t[n])||tn("["+n+"] exists for "+e),t[n]=e}),$e(t)}function on(e){return e&&E?t(E({},e)):e}var an="window",sn="navigator",un="JSON",ln="msie",cn="trident/",fn="XMLHttpRequest",dn=null,pn=null,gn=null,mn=null;function hn(e,n){var t,r=!1;if(e){try{(r=n in e)||(t=e[o])&&(r=n in t)}catch(i){}if(!r)try{r=!ze((new e)[n])}catch(i){}}return r}function l(e){var n=H();return n&&n[e]?n[e]:e===an&&vn()?window:null}function vn(){return typeof window===A&&window}function yn(){return vn()?window:l(an)}function In(){return typeof document===A&&document?document:l("document")}function Sn(){return!(typeof navigator!==A||!navigator)}function Cn(){return Sn()?navigator:l(sn)}function Tn(){return typeof JSON===A&&JSON||null!==l(un)}function U(){return Tn()?JSON||l(un):null}function z(e){var n=Object[o].toString.call(e),t=M;return"[object Error]"===n?t="{ stack: '"+e.stack+"', message: '"+e.message+"', name: '"+e.name+"'":Tn()&&(t=U().stringify(e)),n+t}function wn(){return mn=null===mn?Sn()&&!!Cn().sendBeacon:mn}function xn(e){var n=!1;try{var n=!!l("fetch"),t=l("Request");n&&e&&t&&(n=hn(t,"keepalive"))}catch(r){}return n}function bn(){return gn=null===gn&&(gn=typeof XDomainRequest!==R)&&_n()?gn&&!hn(l(fn),"withCredentials"):gn}function _n(){var e=!1;try{e=!!l(fn)}catch(n){}return e}var Nn=null;function An(e){return e?'"'+e.replace(/\"/g,M)+'"':M}function Rn(e,n){var t,r=typeof console!==R?console:l("console");r&&(t="log",p(r[t=r[e]?e:t])&&r[t](n))}Ln.dataType="MessageData";var Fn=Ln;function Ln(e,n,t,r){void 0===t&&(t=!1),this.messageId=e,this.message=(t?"AI: ":"AI (Internal): ")+e;t=M,Tn()&&(t=U().stringify(r)),e=(n?" message:"+An(n):M)+(r?" props:"+An(t):M);this.message+=e}function En(e,n){return(e||{}).logger||new Mn(n)}var Mn=function vi(i){this.identifier="DiagnosticLogger",this.queue=[];var s=0,u={};h(vi,this,function(o){function e(e,n){e=i[e];return D(e)?n:e}function a(e,n){var t,r=(t=(t=Nn)||!0===i.disableDbgExt?t:Nn||(r=l("Microsoft"),Nn=r?r.ApplicationInsights:Nn))?t.ChromeDbgExt:null;r&&r.diagLog&&r.diagLog(e,n)}D(i)&&(i={}),o.consoleLoggingLevel=function(){return e("loggingLevelConsole",0)},o.telemetryLoggingLevel=function(){return e("loggingLevelTelemetry",1)},o.maxInternalMessageLimit=function(){return e("maxMessageLimit",25)},o.enableDebugExceptions=function(){return e("enableDebugExceptions",!1)},o.throwInternal=function(e,n,t,r,i){n=new Fn(n,t,i=void 0!==i&&i,r);if(o.enableDebugExceptions())throw n;t=1===e?"errorToConsole":"warnToConsole";ze(n.message)?a("throw"+(1===e?"Critical":"Warning"),n):(r=o.consoleLoggingLevel(),i?(i=+n.messageId,!u[i]&&e<=r&&(o[t](n.message),u[i]=!0)):e<=r&&o[t](n.message),o.logInternalMessage(e,n))},o.warnToConsole=function(e){Rn("warn",e),a("warning",e)},o.errorToConsole=function(e){Rn("error",e),a("error",e)},o.resetInternalMessageCount=function(){s=0,u={}},o.logInternalMessage=function(e,n){var t,r;s>=o.maxInternalMessageLimit()||(r=!0,t="AITR_"+n.messageId,u[t]?r=!1:u[t]=!0,r&&(e<=o.telemetryLoggingLevel()&&(o.queue.push(n),s++,a(1===e?"error":"warn",n)),s===o.maxInternalMessageLimit()&&(r=new Fn(23,t="Internal events throttle limit per PageView reached for this app.",!1),o.queue.push(r),1===e?o.errorToConsole(t):o.warnToConsole(t))))}})},Dn=(s.ParentContextKey="parent",s.ChildrenContextKey="childEvts",s);function s(e,i,n){var r,o=this,a=!1;o.start=Qe(),o.name=e,o.isAsync=n,o.isChildEvt=function(){return!1},p(i)&&(a=function(e){if(Ae)try{var n={enumerable:!0,configurable:!0,get:function(){return!r&&p(i)&&(r=i(),i=null),r}};return Ae(e,"payload",n),!0}catch(t){}return!1}(o)),o.getCtx=function(e){return e?(e===s.ParentContextKey||e===s.ChildrenContextKey?o:o.ctx||{})[e]:null},o.setCtx=function(e,n){e&&(e===s.ParentContextKey?(o[e]||(o.isChildEvt=function(){return!0}),o[e]=n):e===s.ChildrenContextKey?o[e]=n:(o.ctx=o.ctx||{})[e]=n)},o.complete=function(){var e=0,n=o.getCtx(s.ChildrenContextKey);if(B(n))for(var t=0;t<n.length;t++){var r=n[t];r&&(e+=r.time)}o.time=Qe()-o.start,o.exTime=o.time-e,o.complete=function(){},!a&&p(i)&&(o.payload=i())}}var kn="CoreUtils.doPerf";function Bn(e,n,t,r,i){if(e)if(e=p(e.getPerfMgr)?e.getPerfMgr():e){var o,a=void 0,s=e.getCtx(kn);try{if(a=e.create(n(),r,i))return s&&a.setCtx&&(a.setCtx(Dn.ParentContextKey,s),s.getCtx&&s.setCtx&&((o=s.getCtx(Dn.ChildrenContextKey))||(o=[],s.setCtx(Dn.ChildrenContextKey,o)),o.push(a))),e.setCtx(kn,a),t(a)}catch(u){a&&a.setCtx&&a.setCtx("exception",u)}finally{a&&e.fire(a),e.setCtx(kn,s)}}t()}var Pn=4294967296,On=4294967295,Un=!1,zn=123456789,jn=987654321;function Kn(e){var n,t=0,r=l("crypto")||l("msCrypto");if(0===(t=r&&r.getRandomValues?r.getRandomValues(new Uint32Array(1))[0]&On:t)&&(!(r=Cn())||r.userAgent===pn&&null!==dn||(r=((pn=r.userAgent)||M).toLowerCase(),dn=qe(r,ln)||qe(r,cn)),dn)){if(!Un)try{var i=2147483647&Qe();(n=(Math.random()*Pn^i)+i)<0&&(n>>>=0),zn=123456789+n&On,jn=987654321-n&On,Un=!0}catch(o){}r=((jn=36969*(65535&jn)+(jn>>16)&On)<<16)+(65535&(zn=18e3*(65535&zn)+(zn>>16)&On))>>>0&On|0,t=(r>>>=0)&On}return 0===t&&(t=Math.floor(Pn*Math.random()|0)),e||(t>>>=0),t}var qn=e,Vn="2.7.3",Wn="."+function(e){void 0===e&&(e=22);for(var n=Kn()>>>0,t=0,r=M;r.length<e;)r+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[0|63&n]||"",n>>>=6,5==++t&&(n=(Kn()<<2&4294967295|3&n)>>>0,t=0);return r}(6),Hn=0;function Gn(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType}function Xn(e,n){return Ke(e+Hn+++((n=void 0!==n&&n)?"."+Vn:"")+Wn)}function Yn(e){var o={id:Xn("_aiData-"+(e||"")+"."+Vn),accept:Gn,get:function(e,n,t,r){var i=e[o.id];return i?i[Ke(n)]:(r&&((i=function(e,n){var t=n[e.id];if(!t){t={};try{Gn(n)&&!function(e,n,t){if(qn)try{return qn(e,n,{value:t,enumerable:!1,configurable:!0}),1}catch(r){}}(n,e.id,t)&&(n[e.id]=t)}catch(r){}}return t}(o,e))[Ke(n)]=t),t)},kill:function(e,n){if(e&&e[n])try{delete e[n]}catch(t){}}};return o}var Jn=Yn("plugin");function Zn(e){return Jn.get(e,"state",{},!0)}var $n="TelemetryPluginChain",Qn="_hasRun",et="_getTelCtx",nt=0;function tt(e,a,t,n){var r=null,i=[],o=(null!==n&&(r=n?function(e,n,t,r){for(;e;){if(e.getPlugin()===r)return e;e=e.getNext()}return it([r],n,t)}(e,a,t,n):e),{_next:function(){var e,n=r;return r=n?n.getNext():null,n||(e=i)&&0<e.length&&(P(e,function(e){try{e.func.call(e.self,e.args)}catch(n){t.logger.throwInternal(2,73,"Unexpected Exception during onComplete - "+z(n))}}),i=[]),n},ctx:{core:function(){return t},diagLog:function(){return En(t,a)},getCfg:function(){return a},getExtCfg:s,getConfig:function(e,n,t){void 0===t&&(t=!1);var r,e=s(e,null);return e&&!D(e[n])?r=e[n]:a&&!D(a[n])&&(r=a[n]),D(r)?t:r},hasNext:function(){return!!r},getNext:function(){return r},setNext:function(e){r=e},iterate:function(e){for(;n=o._next();){var n=n.getPlugin();n&&e(n)}},onComplete:function(e,n){for(var t=[],r=2;r<arguments.length;r++)t[r-2]=arguments[r];e&&i.push({func:e,self:ze(n)?o.ctx:n,args:t})}}});function s(e,n,t){var r,i,o;return void 0===n&&(n={}),void 0===t&&(t=0),(r=a&&(i=a.extensionConfig)&&e?i[e]:r)?je(n)&&0!==t&&(o=function d(){var e=arguments,n=e[0]||{},t=e.length,r=!1,i=1;for(0<t&&"boolean"==typeof n&&(r=n,n=e[i]||{},i++),je(n)||(n={});i<t;i++){var o,a,s,u,l=e[i],c=B(l),f=je(l);for(o in l)(c&&o in l||f&&V.call(l,o))&&(a=l[o],s=void 0,r&&a&&((s=B(a))||We(a))&&(u=n[o],s?B(u)||(u=[]):We(u)||(u={}),a=d(r,u,a)),a!==undefined&&(n[o]=a))}return n}(!0,n,r),a&&2===t&&k(n,function(e){var n;D(o[e])&&!D(n=a[e])&&(o[e]=n)})):r=n,r}return o}function rt(e,t,r,n){var i=tt(e,t,r,n),o=i.ctx;return o.processNext=function(e){var n=i._next();return n&&n.processTelemetry(e,o),!n},o.createNew=function(e,n){return rt((e=B(e=void 0===e?null:e)?it(e,t,r,n):e)||o.getNext(),t,r,n)},o}function it(e,n,t,r){var i,o=null,a=!r;return B(e)&&0<e.length&&(i=null,P(e,function(e){(a=!a&&r===e||a)&&e&&p(e.processTelemetry)&&(e=ot(e,n,t),o=o||e,i&&i._setNext(e),i=e)})),r&&!o?it([r],n,t):o}function ot(u,r,i){var l=null,o=p(u.processTelemetry),a=p(u.setNextPlugin),c=u?u.identifier+"-"+u.priority+"-"+nt++:"Unknown-0-"+nt++,s={getPlugin:function(){return u},getNext:function(){return l},processTelemetry:function(t,e){var n;f(e=e||(n=(n=u&&p(u[et])?u[et]():n)||rt(s,r,i)),function(e){if(!u||!o)return!1;var n=Zn(u);return!n[Ie]&&!n[Ce]&&(a&&u.setNextPlugin(l),u.processTelemetry(t,e),!0)},"processTelemetry",function(){return{item:t}},!t.sync)||e.processNext(t)},unload:function(r,i){f(r,function(){var e,n,t=!1;return u&&(e=Zn(u),n=u[Se]||e.core,!u||n&&n!==r[Se]()||e[Ie]||(e[Se]=null,e[Ie]=!0,e[ye]=!1,u[Ie]&&!0===u[Ie](r,i)&&(t=!0))),t},"unload",function(){},i.isAsync)||r.processNext(i)},_id:c,_setNext:function(e){l=e}};function f(t,r,i,e,n){var o=!1,a=u?u.identifier:$n,s=(s=t[Qn])||(t[Qn]={});return t.setNext(l),u&&Bn(t[Se](),function(){return a+":"+i},function(){s[c]=!0;try{var e=l?l._id:M;e&&(s[e]=!1),o=r(t)}catch(n){e=!l||s[l._id];e&&(o=!0),l&&e||t.diagLog().throwInternal(1,73,"Plugin ["+u.identifier+"] failed during "+i+" - "+z(n)+", run flags: "+z(s))}},e,n),o}return $e(s)}function at(){var n=[];return{add:function(e){e&&n.push(e)},run:function(t,r){P(n,function(e){try{e(t,r)}catch(n){t.diagLog().throwInternal(2,73,"Unexpected error calling unload handler - "+z(n))}}),n=[]}}}var st="getPlugin",_e=function yi(){var o,a,l,c,f,s=this;function n(e){var n,e=e=void 0===e?null:e;return e||(n=a||rt(null,{},s.core),e=l&&l[st]?n.createNew(null,l[st]):n.createNew(null,l)),e}function d(){o=!1,s.core=null,l=a=null,f=[],c=at()}d(),h(yi,s,function(u){var e,n,t,r,i;u.initialize=function(e,n,t,r){e&&en(e,"extensionConfig",[],null,D),!r&&n&&(r=n.getProcessTelContext().getNext());var i=l;l&&l[st]&&(i=l[st]()),s.core=n,a=rt(r,e,n,i),o=!0},u.teardown=function(e,n){var t,r,i,o;if(u.core&&(!e||u.core===e.core()))return r=!1,i=e||function s(e,t,r,n){var i=tt(e,t,r,n),o=i.ctx;return o.processNext=function(e){var n=i._next();return n&&n.unload(o,e),!n},o.createNew=function(e,n){return s((e=B(e=void 0===e?null:e)?it(e,t,r,n):e)||o.getNext(),t,r,n)},o}(null,{},u.core,l&&l[st]?l[st]():l),o=n||{reason:0,isAsync:!1},u[Te]&&!0===u[Te](i,o,a)?t=!0:a(),t;function a(){r||(r=!0,c.run(i,n),P(f,function(e){e.rm()}),f=[],!0===t&&i.processNext(o),d())}},u._addHook=function(e){e&&(B(e)?f=f.concat(e):f.push(e))},e="_addUnloadCb",n=function(){return c},void 0===t&&(t=!0),u&&n&&(t||ze(u[e]))&&(u[e]=(i=r=null,p(t=n)?r=t:i=t,function(){var e=arguments;if(i=r?r():i)return i.add.apply(i,e)}))}),s.diagLog=function(e){return n(e).diagLog()},s[ye]=function(){return o},s.setInitialized=function(e){o=e},s.setNextPlugin=function(e){l=e},s.processNext=function(e,n){n?n.processNext(e):l&&p(l.processTelemetry)&&l.processTelemetry(e,null)},s._getTelCtx=n},ut="attachEvent",lt="addEventListener",ct=(Xn("aiEvtPageHide"),Xn("aiEvtPageShow"),1),ft=Yn("events"),dt=/^([^.]*)(?:\.(.+)|)/;function pt(e){return e&&e.replace?e.replace(/^\s*\.*|\.*\s*$/g,""):e}function gt(e,n,t,r){r=r=void 0!==r&&r;void 0===r&&(r=!1);var i,o,a,s,u,l,c,f=!1;if(e)try{u=n,null&&(l="",B(null)?(l="",P(null,function(e){(e=pt(e))&&("."!==e[0]&&(e="."+e),l+=e)})):l=null,l&&(u=(u||"")+(l="."!==l[0]?"."+l:l)));var d,p={type:(c=dt.exec(u)||[])[1],ns:(c[2]||"").split(".").sort().join(".")},g=p,m=t,h=r,v=!1;(s=e)&&g&&g.type&&m&&(s[lt]?(s[lt](g.type,m,h),v=!0):s[ut]&&(s[ut]("on"+g.type,m),v=!0)),(f=v)&&ft.accept(e)&&(d={guid:ct++,evtName:p,handler:t,capture:r},i=p.type,((a=ft.get(e,"events",{},o=void 0===o||o))[i]||(a[i]=[])).push(d))}catch(y){}return f}var j=rn({CRITICAL:1,WARNING:2}),K=rn({BrowserDoesNotSupportLocalStorage:0,BrowserCannotReadLocalStorage:1,BrowserCannotReadSessionStorage:2,BrowserCannotWriteLocalStorage:3,BrowserCannotWriteSessionStorage:4,BrowserFailedRemovalFromLocalStorage:5,BrowserFailedRemovalFromSessionStorage:6,CannotSendEmptyTelemetry:7,ClientPerformanceMathError:8,ErrorParsingAISessionCookie:9,ErrorPVCalc:10,ExceptionWhileLoggingError:11,FailedAddingTelemetryToBuffer:12,FailedMonitorAjaxAbort:13,FailedMonitorAjaxDur:14,FailedMonitorAjaxOpen:15,FailedMonitorAjaxRSC:16,FailedMonitorAjaxSend:17,FailedMonitorAjaxGetCorrelationHeader:18,FailedToAddHandlerForOnBeforeUnload:19,FailedToSendQueuedTelemetry:20,FailedToReportDataLoss:21,FlushFailed:22,MessageLimitPerPVExceeded:23,MissingRequiredFieldSpecification:24,NavigationTimingNotSupported:25,OnError:26,SessionRenewalDateIsZero:27,SenderNotInitialized:28,StartTrackEventFailed:29,StopTrackEventFailed:30,StartTrackFailed:31,StopTrackFailed:32,TelemetrySampledAndNotSent:33,TrackEventFailed:34,TrackExceptionFailed:35,TrackMetricFailed:36,TrackPVFailed:37,TrackPVFailedCalc:38,TrackTraceFailed:39,TransmissionFailed:40,FailedToSetStorageBuffer:41,FailedToRestoreStorageBuffer:42,InvalidBackendResponse:43,FailedToFixDepricatedValues:44,InvalidDurationValue:45,TelemetryEnvelopeInvalid:46,CreateEnvelopeError:47,CannotSerializeObject:48,CannotSerializeObjectNonSerializable:49,CircularReferenceDetected:50,ClearAuthContextFailed:51,ExceptionTruncated:52,IllegalCharsInName:53,ItemNotInArray:54,MaxAjaxPerPVExceeded:55,MessageTruncated:56,NameTooLong:57,SampleRateOutOfRange:58,SetAuthContextFailed:59,SetAuthContextFailedAccountName:60,StringValueTooLong:61,StartCalledMoreThanOnce:62,StopCalledWithoutStart:63,TelemetryInitializerFailed:64,TrackArgumentsNotSpecified:65,UrlTooLong:66,SessionStorageBufferFull:67,CannotAccessCookie:68,IdTooLong:69,InvalidEvent:70,FailedMonitorAjaxSetRequestHeader:71,SendBrowserInfoOnUserInit:72,PluginException:73,NotificationException:74,SnippetScriptLoadFailure:99,InvalidInstrumentationKey:100,CannotParseAiBlobValue:101,InvalidContentBlob:102,TrackPageActionEventFailed:103,FailedAddingCustomDefinedRequestContext:104,InMemoryStorageBufferFull:105});function mt(e,n,t){var r,i,o=n.length,a=(e=e,(n=n)&&150<(n=Xe(n.toString())).length&&(i=n.substring(0,150),e&&e.throwInternal(2,K.NameTooLong,"name is too long. It has been truncated to 150 characters.",{name:n},!0)),i||n);if(a.length!==o){for(var s=0,u=a;t[u]!==undefined;)s++,u=a.substring(0,147)+(r=void 0,(r="00"+s).substr(r.length-3));a=u}return a}function y(e,n,t){var r;return void 0===t&&(t=1024),n&&(t=t||1024,(n=Xe(n)).toString().length>t&&(r=n.toString().substring(0,t),e&&e.throwInternal(2,K.StringValueTooLong,"string value is too long. It has been truncated to "+t+" characters.",{value:n},!0))),r||n}function ht(e,n){return St(e,n,2048,K.UrlTooLong)}function vt(e,n){var t;return n&&32768<n.length&&(t=n.substring(0,32768),e&&e.throwInternal(2,K.MessageTruncated,"message is too long, it has been truncated to 32768 characters.",{message:n},!0)),t||n}function yt(r,e){var i;return e&&(i={},k(e,function(e,n){if(je(n)&&Tn())try{n=U().stringify(n)}catch(t){r&&r.throwInternal(2,K.CannotSerializeObjectNonSerializable,"custom property is not valid",{exception:t},!0)}n=y(r,n,8192),e=mt(r,e,i),i[e]=n}),e=i),e}function It(t,e){var r;return e&&(r={},k(e,function(e,n){e=mt(t,e,r),r[e]=n}),e=r),e}function St(e,n,t,r){var i;return n&&(n=Xe(n)).length>t&&(i=n.substring(0,t),e&&e.throwInternal(2,r,"input is too long, it has been truncated to "+t+" characters.",{data:n},!0)),i||n}var Ct="";function Tt(e){var n=Ct+Math.floor((e=Math.round(e=isNaN(e)||e<0?0:e))/1e3)%60,t=Ct+Math.floor(e/6e4)%60,r=Ct+Math.floor(e/36e5)%24,i=Math.floor(e/864e5),e=1===(e=Ct+e%1e3).length?"00"+e:2===e.length?"0"+e:e,n=n.length<2?"0"+n:n,t=t.length<2?"0"+t:t,r=r.length<2?"0"+r:r;return(0<i?i+".":Ct)+r+":"+t+":"+n+"."+e}var wt="Microsoft_ApplicationInsights_BypassAjaxInstrumentation",xt="sampleRate",bt="ProcessLegacy",_t="http.method",d="not_specified",Nt=rn({LocalStorage:0,SessionStorage:1}),At=(rn({AI:0,AI_AND_W3C:1,W3C:2}),undefined);function Rt(e){try{if(D(H()))return null;var n=new Date,t=l(e===Nt.LocalStorage?"localStorage":"sessionStorage"),r=(t.setItem(n.toString(),n.toString()),t.getItem(n.toString())!==n.toString());if(t.removeItem(n.toString()),!r)return t}catch(i){}return null}function Ft(){return Lt()?Rt(Nt.SessionStorage):null}function Lt(){return At=At===undefined?!!Rt(Nt.SessionStorage):At}function Et(e,n){var t=Ft();if(null!==t)try{return t.getItem(n)}catch(r){At=!1,e.throwInternal(2,K.BrowserCannotReadSessionStorage,"Browser failed read of session storage. "+O(r),{exception:z(r)})}return null}function Mt(e,n,t){var r=Ft();if(null!==r)try{r.setItem(n,t)}catch(i){At=!1,e.throwInternal(2,K.BrowserCannotWriteSessionStorage,"Browser failed write to session storage. "+O(i),{exception:z(i)})}}var Dt=In()||{},kt=0,Bt=[null,null,null,null,null];var Pt=["https://dc.services.visualstudio.com/v2/track","https://breeze.aimon.applicationinsights.io/v2/track","https://dc-int.services.visualstudio.com/v2/track"];function Ot(e){return~Pt.indexOf(e.toLowerCase())}n(zt,Ut=function(){});var Ut,Ee=zt;function zt(){return Ut.call(this)||this}n(qt,jt=function(){this.ver=1,this.sampleRate=100,this.tags={}});var jt,Kt=qt;function qt(e,n,t){var r=jt.call(this)||this;return r.name=y(e,t)||d,r.data=n,r.time=He(new Date),r.aiDataContract={time:1,iKey:1,name:1,sampleRate:function(){return 100===r.sampleRate?4:1},tags:1,data:1},r}var Vt,r=function(){this.ver=2,this.properties={},this.measurements={}},Wt=(n(Ht,Vt=r),Ht.envelopeType="Microsoft.ApplicationInsights.{0}.Event",Ht.dataType="EventData",Ht);function Ht(e,n,t,r){var i=Vt.call(this)||this;return i.aiDataContract={ver:1,name:1,properties:0,measurements:0},i.name=y(e,n)||d,i.properties=yt(e,t),i.measurements=It(e,r),i}var Gt="error",u="stack",Xt="stackDetails",Yt="errorSrc",Jt="message",Zt="description";function $t(e,n){var t=e;return t&&!v(t)&&(JSON&&JSON.stringify?(t=JSON.stringify(e),!n||t&&"{}"!==t||(t=p(e.toString)?e.toString():""+e)):t=e+" - (Missing JSON.stringify)"),t||""}function Qt(e,n){var t=e;return e&&((t=t&&!v(t)&&(e[Jt]||e[Zt])||t)&&!v(t)&&(t=$t(t,!0)),e.filename&&(t=t+" @"+(e.filename||"")+":"+(e.lineno||"?")+":"+(e.colno||"?"))),(n&&"String"!==n&&"Object"!==n&&"Error"!==n&&!~(t||"").indexOf(n)?n+": "+t:t)||""}function er(e){return e&&e.src&&v(e.src)&&e.obj&&B(e.obj)}function nr(e){var e=e||"",n=(e=v(e)?e:v(e[u])?e[u]:""+e).split("\n");return{src:e,obj:n}}function tr(e){var n,t=null;if(e)try{e[u]?t=nr(e[u]):e[Gt]&&e[Gt][u]?t=nr(e[Gt][u]):e.exception&&e.exception[u]?t=nr(e.exception[u]):er(e)?t=e:er(e[Xt])?t=e[Xt]:window&&window.opera&&e[Jt]?t=function(e){for(var n=[],t=e.split("\n"),r=0;r<t.length;r++){var i=t[r];t[r+1]&&(i+="@"+t[r+1],r++),n.push(i)}return{src:e,obj:n}}(e.message):v(e)?t=nr(e):(n=e[Jt]||e[Zt]||"",v(e[Yt])&&(n&&(n+="\n"),n+=" from "+e[Yt]),n&&(t=nr(n)))}catch(r){t=nr(r)}return t||{src:"",obj:null}}function rr(e){var n="";if(e&&!(n=e.typeName||e.name||""))try{var t=/function (.{1,200})\(/.exec(e.constructor.toString()),n=t&&1<t.length?t[1]:""}catch(r){}return n}function ir(e){if(e)try{var n,t;if(!v(e))return n=rr(e),(t=$t(e,!1))&&"{}"!==t||(e[Gt]&&(n=rr(e=e[Gt])),t=$t(e,!0)),t.indexOf(n)&&"String"!==n?n+":"+t:t}catch(r){}return""+(e||"")}n(a,or=function(){this.ver=2,this.exceptions=[],this.properties={},this.measurements={}}),a.CreateAutoException=function(e,n,t,r,i,o,a,s){var u=rr(i||o||e);return{message:Qt(e,u),url:n,lineNumber:t,columnNumber:r,error:ir(i||o||e),evt:ir(o||e),typeName:u,stackDetails:tr(a||i||o),errorSrc:s}},a.CreateFromInterface=function(n,e,t,r){var i=e.exceptions&&Ge(e.exceptions,function(e){return ur.CreateFromInterface(n,e)});return new a(n,f(f({},e),{exceptions:i}),t,r)},a.prototype.toInterface=function(){var e=this,n=e.exceptions,t=e.properties,r=e.measurements,i=e.severityLevel,o=e.problemGroup,a=e.id,e=e.isManual;return{ver:"4.0",exceptions:n instanceof Array&&Ge(n,function(e){return e.toInterface()})||undefined,severityLevel:i,properties:t,measurements:r,problemGroup:o,id:a,isManual:e}},a.CreateSimpleException=function(e,n,t,r,i,o){return{exceptions:[{hasFullStack:!0,message:e,stack:i,typeName:n}]}},a.envelopeType="Microsoft.ApplicationInsights.{0}.Exception",a.dataType="ExceptionData",a.formatError=ir;var or,ar=a;function a(e,n,t,r,i,o){var a=or.call(this)||this;return a.aiDataContract={ver:1,exceptions:1,severityLevel:0,properties:0,measurements:0},function(e){try{if(je(e))return"ver"in e&&"exceptions"in e&&"properties"in e}catch(n){}}(n)?(a.exceptions=n.exceptions,a.properties=n.properties,a.measurements=n.measurements,n.severityLevel&&(a.severityLevel=n.severityLevel),n.id&&(a.id=n.id),n.problemGroup&&(a.problemGroup=n.problemGroup),a.ver=2,D(n.isManual)||(a.isManual=n.isManual)):(a.exceptions=[new ur(e,n,t=t||{})],a.properties=yt(e,t),a.measurements=It(e,r),i&&(a.severityLevel=i),o&&(a.id=o)),a}n(lr,sr=function(){this.hasFullStack=!0,this.parsedStack=[]}),lr.prototype.toInterface=function(){var e=this.parsedStack instanceof Array&&Ge(this.parsedStack,function(e){return e.toInterface()});return{id:this.id,outerId:this.outerId,typeName:this.typeName,message:this.message,hasFullStack:this.hasFullStack,stack:this[u],parsedStack:e||undefined}},lr.CreateFromInterface=function(e,n){var t=n.parsedStack instanceof Array&&Ge(n.parsedStack,function(e){return dr.CreateFromInterface(e)})||n.parsedStack;return new lr(e,f(f({},n),{parsedStack:t}))};var sr,ur=lr;function lr(e,n,t){var l,r,i,o,a,s=sr.call(this)||this;return s.aiDataContract={id:0,outerId:0,typeName:1,message:1,hasFullStack:0,stack:0,parsedStack:2},function(e){try{if(je(e))return"hasFullStack"in e&&"typeName"in e}catch(n){}}(n)?(s.typeName=n.typeName,s.message=n.message,s[u]=n[u],s.parsedStack=n.parsedStack,s.hasFullStack=n.hasFullStack):(r=(o=n)&&o.evt,Ve(o)||(o=o[Gt]||r||o),s.typeName=y(e,rr(o))||d,s.message=vt(e,Qt(n||o,s.typeName))||d,l=n[Xt]||tr(n),s.parsedStack=function(){var e=l.obj;if(e&&0<e.length){var n=[],t=0,r=0;if(P(e,function(e){var e=e.toString();dr.regex.test(e)&&(e=new dr(e,t++),r+=e.sizeInBytes,n.push(e))}),32768<r)for(var i=0,o=n.length-1,a=0,s=i,u=o;i<o;){if(32768<(a+=n[i].sizeInBytes+n[o].sizeInBytes)){n.splice(s,u-s+1);break}s=i,u=o,i++,o--}}return n}(),s[u]=(r=e,a="",(o=l)&&(o.obj?P(o.obj,function(e){a+=e+"\n"}):a=o.src||""),(n=a)&&32768<(e=""+n).length&&(i=e.substring(0,32768),r&&r.throwInternal(2,K.ExceptionTruncated,"exception is too long, it has been truncated to 32768 characters.",{exception:n},!0)),i||n),s.hasFullStack=B(s.parsedStack)&&0<s.parsedStack.length,t&&(t.typeName=t.typeName||s.typeName)),s}n(i,cr=function(){}),i.CreateFromInterface=function(e){return new i(e,null)},i.prototype.toInterface=function(){return{level:this.level,method:this.method,assembly:this.assembly,fileName:this.fileName,line:this.line}},i.regex=/^([\s]+at)?[\s]{0,50}([^\@\()]+?)[\s]{0,50}(\@|\()([^\(\n]+):([0-9]+):([0-9]+)(\)?)$/,i.baseSize=58;var cr,fr,dr=i;function i(e,n){var t,r=cr.call(this)||this;return r.sizeInBytes=0,r.aiDataContract={level:1,method:1,assembly:0,fileName:0,line:0},"string"==typeof e?(t=e,r.level=n,r.method="<no_method>",r.assembly=Xe(t),r.fileName="",r.line=0,(n=t.match(i.regex))&&5<=n.length&&(r.method=Xe(n[2])||r.method,r.fileName=Xe(n[4]),r.line=parseInt(n[5])||0)):(r.level=e.level,r.method=e.method,r.assembly=e.assembly,r.fileName=e.fileName,r.line=e.line,r.sizeInBytes=0),r.sizeInBytes+=r.method.length,r.sizeInBytes+=r.fileName.length,r.sizeInBytes+=r.assembly.length,r.sizeInBytes+=i.baseSize,r.sizeInBytes+=r.level.toString().length,r.sizeInBytes+=r.line.toString().length,r}fr=0,n(mr,pr=function(){this.kind=fr});var pr,gr=mr;function mr(){var e=null!==pr&&pr.apply(this,arguments)||this;return e.aiDataContract={name:1,kind:0,value:1,count:0,min:0,max:0,stdDev:0},e}n(yr,hr=function(){this.ver=2,this.metrics=[],this.properties={},this.measurements={}}),yr.envelopeType="Microsoft.ApplicationInsights.{0}.Metric",yr.dataType="MetricData";var hr,vr=yr;function yr(e,n,t,r,i,o,a,s,u){var l=hr.call(this)||this,c=(l.aiDataContract={ver:1,metrics:1,properties:0},new gr);return c.count=0<r?r:undefined,c.max=isNaN(o)||null===o?undefined:o,c.min=isNaN(i)||null===i?undefined:i,c.name=y(e,n)||d,c.value=t,c.stdDev=isNaN(a)||null===a?undefined:a,l.metrics=[c],l.properties=yt(e,s),l.measurements=It(e,u),l}n(Sr,Ir=r);var Ir,e=Sr;function Sr(){var e=Ir.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}n(wr,Cr=e),wr.envelopeType="Microsoft.ApplicationInsights.{0}.Pageview",wr.dataType="PageviewData";var Cr,Tr=wr;function wr(e,n,t,r,i,o,a){var s=Cr.call(this)||this;return s.aiDataContract={ver:1,name:0,url:0,duration:0,properties:0,measurements:0,id:0},s.id=a&&St(e,a,128,K.IdTooLong).toString(),s.url=ht(e,t),s.name=y(e,n)||d,isNaN(r)||(s.duration=Tt(r)),s.properties=yt(e,i),s.measurements=It(e,o),s}n(_r,xr=function(){this.ver=2,this.success=!0,this.properties={},this.measurements={}}),_r.envelopeType="Microsoft.ApplicationInsights.{0}.RemoteDependency",_r.dataType="RemoteDependencyData";var xr,br=_r;function _r(e,n,t,r,i,o,a,s,u,l,c,f){void 0===u&&(u="Ajax");var d,p,g,m=xr.call(this)||this,t=(m.aiDataContract={id:1,ver:1,name:0,resultCode:0,duration:0,success:0,data:0,target:0,type:0,properties:0,measurements:0,kind:0,value:0,count:0,min:0,max:0,stdDev:0,dependencyKind:0,dependencySource:0,commandName:0,dependencyTypeName:0},m.id=n,m.duration=Tt(i),m.success=o,m.resultCode=a+"",m.type=y(e,u),n=e,i=s,u=a=o=r,a=(s=t)&&0<s.length?(d=s,g=(t=Bt)[p=kt],Dt.createElement?t[p]||(g=t[p]=Dt.createElement("a")):g={host:function(){e=null,d&&null!=(t=d.match(/(\w*):\/\/(.[^/:]+)(\:[\d]+)?/i))&&2<t.length&&v(t[2])&&0<t[2].length&&(e=t[2]||"",2<t.length&&(n=(t[1]||"").toLowerCase(),t=t[3]||"",e+=t="http"==n&&":80"===t||"https"==n&&":443"===t?"":t));var e,n=e||"";if(n){var t=n.match(/(www[0-9]?\.)?(.[^/:]+)(\:[\d]+)?/i);if(null!=t&&3<t.length&&v(t[2])&&0<t[2].length)return t[2]+(t[3]||"")}return n}()},g.href=d,++p>=t.length&&(p=0),kt=p,p=(t=g).host,a||(null!=t.pathname?("/"!=((g=0===t.pathname.length?"/":t.pathname)[0]||"")&&(g="/"+g),u=t.pathname,y(n,i?i+" "+g:g)):y(n,s))):p=o,{target:p,name:a,data:u});return m.data=ht(e,r)||t.data,m.target=y(e,t.target),l&&(m.target="".concat(m.target," | ").concat(l)),m.name=y(e,t.name),m.properties=yt(e,c),m.measurements=It(e,f),m}n(Fr,Nr=function(){this.ver=2,this.properties={},this.measurements={}}),Fr.envelopeType="Microsoft.ApplicationInsights.{0}.Message",Fr.dataType="MessageData";var Nr,Ar,Rr=Fr;function Fr(e,n,t,r,i){var o=Nr.call(this)||this;return o.aiDataContract={ver:1,message:1,severityLevel:0,properties:0},o.message=vt(e,n=n||d),o.properties=yt(e,r),o.measurements=It(e,i),t&&(o.severityLevel=t),o}function Lr(){var e=Ar.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}n(Lr,Ar=e),n(Dr,Er=Lr),Dr.envelopeType="Microsoft.ApplicationInsights.{0}.PageviewPerformance",Dr.dataType="PageviewPerformanceData";var Er,Mr=Dr;function Dr(e,n,t,r,i,o,a){var s=Er.call(this)||this;return s.aiDataContract={ver:1,name:0,url:0,duration:0,perfTotal:0,networkConnect:0,sentRequest:0,receivedResponse:0,domProcessing:0,properties:0,measurements:0},s.url=ht(e,t),s.name=y(e,n)||d,s.properties=yt(e,i),s.measurements=It(e,o),a&&(s.domProcessing=a.domProcessing,s.duration=a.duration,s.networkConnect=a.networkConnect,s.perfTotal=a.perfTotal,s.receivedResponse=a.receivedResponse,s.sentRequest=a.sentRequest),s}n(Pr,kr=Ee);var kr,Br=Pr;function Pr(e,n){var t=kr.call(this)||this;return t.aiDataContract={baseType:1,baseData:1},t.baseType=e,t.baseData=n,t}function Or(e){var n="ai."+e+".";return function(e){return n+e}}var Ur,zr,r=Or("application"),e=Or("device"),Ee=Or("location"),c=Or("operation"),jr=Or("session"),I=Or("user"),S=Or("cloud"),Kr=Or("internal"),qr=(zr={applicationVersion:r("ver"),applicationBuild:r("build"),applicationTypeId:r("typeId"),applicationId:r("applicationId"),applicationLayer:r("layer"),deviceId:e("id"),deviceIp:e("ip"),deviceLanguage:e("language"),deviceLocale:e("locale"),deviceModel:e("model"),deviceFriendlyName:e("friendlyName"),deviceNetwork:e("network"),deviceNetworkName:e("networkName"),deviceOEMName:e("oemName"),deviceOS:e("os"),deviceOSVersion:e("osVersion"),deviceRoleInstance:e("roleInstance"),deviceRoleName:e("roleName"),deviceScreenResolution:e("screenResolution"),deviceType:e("type"),deviceMachineName:e("machineName"),deviceVMName:e("vmName"),deviceBrowser:e("browser"),deviceBrowserVersion:e("browserVersion"),locationIp:Ee("ip"),locationCountry:Ee("country"),locationProvince:Ee("province"),locationCity:Ee("city"),operationId:c("id"),operationName:c("name"),operationParentId:c("parentId"),operationRootId:c("rootId"),operationSyntheticSource:c("syntheticSource"),operationCorrelationVector:c("correlationVector"),sessionId:jr("id"),sessionIsFirst:jr("isFirst"),sessionIsNew:jr("isNew"),userAccountAcquisitionDate:I("accountAcquisitionDate"),userAccountId:I("accountId"),userAgent:I("userAgent"),userId:I("id"),userStoreRegion:I("storeRegion"),userAuthUserId:I("authUserId"),userAnonymousUserAcquisitionDate:I("anonUserAcquisitionDate"),userAuthenticatedUserAcquisitionDate:I("authUserAcquisitionDate"),cloudName:S("name"),cloudRole:S("role"),cloudRoleVer:S("roleVer"),cloudRoleInstance:S("roleInstance"),cloudEnvironment:S("environment"),cloudLocation:S("location"),cloudDeploymentUnit:S("deploymentUnit"),internalNodeName:Kr("nodeName"),internalSdkVersion:Kr("sdkVersion"),internalAgentVersion:Kr("agentVersion"),internalSnippet:Kr("snippet"),internalSdkSrc:Kr("sdkSrc")},n(Vr,Ur=function(){var t=this;k(zr,function(e,n){t[e]=n})}),Vr);function Vr(){return Ur.call(this)||this}var Wr,C=new qr,r=function Ii(t,r){var i=[],o=!1;this._get=function(){return i},this._set=function(e){return i=e},h(Ii,this,function(n){n.enqueue=function(e){n.count()>=r.eventsLimitInMem()?o||(t.throwInternal(j.WARNING,K.InMemoryStorageBufferFull,"Maximum in-memory buffer size reached: "+n.count(),!0),o=!0):i.push(e)},n.count=function(){return i.length},n.size=function(){for(var e=i.length,n=0;n<i.length;n++)e+=i[n].length;return r.emitLineDelimitedJson()||(e+=2),e},n.clear=function(){o=!(i=[])},n.getItems=function(){return i.slice(0)},n.batchPayloads=function(e){return e&&0<e.length?r.emitLineDelimitedJson()?e.join("\n"):"["+e.join(",")+"]":null}})},Hr=(n(Gr,Wr=r),Gr);function Gr(e,n){e=Wr.call(this,e,n)||this;return h(Gr,e,function(e,n){e.markAsSent=function(e){n.clear()},e.clearSent=function(e){}}),e}n(T,Xr=r),T.BUFFER_KEY="AI_buffer",T.SENT_BUFFER_KEY="AI_sentBuffer",T.MAX_BUFFER_SIZE=2e3;var Xr,Yr=T;function T(s,u){var e=Xr.call(this,s,u)||this,l=!1;return h(T,e,function(t,n){var e=o(T.BUFFER_KEY),r=o(T.SENT_BUFFER_KEY),r=t._set(e.concat(r));function i(n,e){var t=[];return P(e,function(e){p(e)||-1!==function(e,n){if(e){if(e[xe])return e[xe](n,void 0);var t=e.length;try{for(var r=0;r<t;r++)if(r in e&&e[r]===n)return r}catch(i){}}return-1}(n,e)||t.push(e)}),t}function o(e){try{var e=u.namePrefix&&u.namePrefix()?u.namePrefix()+"_"+e:e,n=Et(s,e);if(n){var t=U().parse(n);if((t=v(t)?U().parse(t):t)&&B(t))return t}}catch(r){s.throwInternal(j.CRITICAL,K.FailedToRestoreStorageBuffer," storage key: "+e+", "+O(r),{exception:z(r)})}return[]}function a(e,n){try{var e=u.namePrefix&&u.namePrefix()?u.namePrefix()+"_"+e:e,t=JSON.stringify(n);Mt(s,e,t)}catch(r){Mt(s,e,JSON.stringify([])),s.throwInternal(j.WARNING,K.FailedToSetStorageBuffer," storage key: "+e+", "+O(r)+". Buffer cleared",{exception:z(r)})}}r.length>T.MAX_BUFFER_SIZE&&(r.length=T.MAX_BUFFER_SIZE),a(T.SENT_BUFFER_KEY,[]),a(T.BUFFER_KEY,r),t.enqueue=function(e){t.count()>=T.MAX_BUFFER_SIZE?l||(s.throwInternal(j.WARNING,K.SessionStorageBufferFull,"Maximum buffer size reached: "+t.count(),!0),l=!0):(n.enqueue(e),a(T.BUFFER_KEY,t._get()))},t.clear=function(){n.clear(),a(T.BUFFER_KEY,t._get()),a(T.SENT_BUFFER_KEY,[]),l=!1},t.markAsSent=function(e){a(T.BUFFER_KEY,t._set(i(e,t._get())));var n=o(T.SENT_BUFFER_KEY);n instanceof Array&&e instanceof Array&&((n=n.concat(e)).length>T.MAX_BUFFER_SIZE&&(s.throwInternal(j.CRITICAL,K.SessionStorageBufferFull,"Sent buffer reached its maximum size: "+n.length,!0),n.length=T.MAX_BUFFER_SIZE),a(T.SENT_BUFFER_KEY,n))},t.clearSent=function(e){e=i(e,o(T.SENT_BUFFER_KEY));a(T.SENT_BUFFER_KEY,e)}}),e}var Jr="baseType",w="baseData",x="properties",Zr="true";function b(e,n,t){en(e,n,t,nn)}function $r(e,t,r){D(e)||k(e,function(e,n){"number"==typeof n?r[e]=n:v(n)?t[e]=n:Tn()&&(t[e]=U().stringify(n))})}function Qr(t,r){D(t)||k(t,function(e,n){t[e]=n||r})}function ei(e,n,t,r){for(var r=new Kt(e,r,n),n=(b(r,"sampleRate",t[xt]),(t[w]||{}).startTime&&(r.time=He(t[w].startTime)),r.iKey=t.iKey,t.iKey.replace(/-/g,"")),n=(r.name=r.name.replace("{0}",n),e),e=t,i=r,o=i.tags=i.tags||{},a=e.ext=e.ext||{},s=e.tags=e.tags||[],u=a.user,u=(u&&(b(o,C.userAuthUserId,u.authId),b(o,C.userId,u.id||u.localId)),a.app),u=(u&&b(o,C.sessionId,u.sesId),a.device),u=(u&&(b(o,C.deviceId,u.id||u.localId),b(o,C.deviceType,u.deviceClass),b(o,C.deviceIp,u.ip),b(o,C.deviceModel,u.model),b(o,C.deviceType,u.deviceType)),e.ext.web),e=(u&&(b(o,C.deviceLanguage,u.browserLang),b(o,C.deviceBrowserVersion,u.browserVer),b(o,C.deviceBrowser,u.browser),b(e=(e=(e=i.data=i.data||{})[w]=e[w]||{})[x]=e[x]||{},"domain",u.domain),b(e,"isManual",u.isManual?Zr:null),b(e,"screenRes",u.screenRes),b(e,"userConsent",u.userConsent?Zr:null)),a.os),u=(e&&b(o,C.deviceOS,e.name),a.trace),l=(u&&(b(o,C.operationParentId,u.parentID),b(o,C.operationName,y(n,u.name)),b(o,C.operationId,u.traceID)),{}),c=s.length-1;0<=c;c--)k(s[c],function(e,n){l[e]=n}),s.splice(c,1);k(s,function(e,n){l[e]=n});e=f(f({},o),l);return e[C.internalSdkVersion]||(e[C.internalSdkVersion]="javascript:".concat(ti.Version)),i.tags=on(e),t.tags=t.tags||[],on(r)}function ni(e,n){D(n[w])&&e.throwInternal(j.CRITICAL,K.TelemetryEnvelopeInvalid,"telemetryItem.baseData cannot be null.")}var ti={Version:"2.8.0-beta.2203-03"};function ri(e,n,t){ni(e,n);var r={},i={},t=(n[Jr]!==Wt.dataType&&(r.baseTypeSource=n[Jr]),n[Jr]===Wt.dataType?(r=n[w][x]||{},i=n[w].measurements||{}):n[w]&&$r(n[w],r,i),$r(n.data,r,i),D(t)||Qr(r,t),n[w].name),t=new Wt(e,t,r,i),r=new Br(Wt.dataType,t);return ei(e,Wt.envelopeType,n,r)}var ii=function Si(f){h(Si,this,function(e){function l(a,s){var e="__aiCircularRefCheck",u={};if(!a)return f.throwInternal(j.CRITICAL,K.CannotSerializeObject,"cannot serialize object because it is null or undefined",{name:s},!0),u;if(a[e])return f.throwInternal(j.WARNING,K.CircularReferenceDetected,"Circular reference detected while serializing object",{name:s},!0),u;if(a.aiDataContract)return a[e]=!0,k(a.aiDataContract,function(e,n){var t=p(n)?1&n():1&n,r=p(n)?4&n():4&n,n=2&n,i=a[e]!==undefined,o=je(a[e])&&null!==a[e];!t||i||n?r||(t=o?(n?c:l)(a[e],e):a[e])!==undefined&&(u[e]=t):f.throwInternal(j.CRITICAL,K.MissingRequiredFieldSpecification,"Missing required field specification. The field is required but not present on source",{field:e,name:s})}),delete a[e],u;if("measurements"===s)u=t(a,"number",s);else if("properties"===s)u=t(a,"string",s);else if("tags"===s)u=t(a,"string",s);else if(B(a))u=c(a,s);else{f.throwInternal(j.WARNING,K.CannotSerializeObjectNonSerializable,"Attempting to serialize an object which does not implement ISerializable",{name:s},!0);try{U().stringify(a),u=a}catch(n){f.throwInternal(j.CRITICAL,K.CannotSerializeObject,n&&p(n.toString)?n.toString():"Error serializing object",null,!0)}}return u}function c(e,n){if(e)if(B(e))for(var t=[],r=0;r<e.length;r++){var i=l(e[r],n+"["+r+"]");t.push(i)}else f.throwInternal(j.CRITICAL,K.ItemNotInArray,"This field was specified as an array in the contract but the item is not an array.\r\n",{name:n},!0);return t}function t(e,t,r){var i;return e&&(i={},k(e,function(e,n){"string"===t?n===undefined?i[e]="undefined":null===n?i[e]="null":n.toString?i[e]=n.toString():i[e]="invalid field: toString() is not defined.":"number"===t?n===undefined?i[e]="undefined":i[e]=null===n?"null":isNaN(n=parseFloat(n))?"NaN":n:(i[e]="invalid field: "+r+" is of unknown type.",f.throwInternal(j.CRITICAL,i[e],null,!0))})),i}e.serialize=function(e){e=l(e,"root");try{return U().stringify(e)}catch(n){f.throwInternal(j.CRITICAL,K.CannotSerializeObject,n&&p(n.toString)?n.toString():"Error serializing object",null,!0)}}})};function oi(){var a=yn(),s=In(),u=!1,l=!0;h(oi,this,function(e){try{var n,t;a&&gt(a,"online",r)&&(gt(a,"offline",i),u=!0),s&&!ze((n=s.body||s).ononline)&&(n.ononline=r,n.onoffline=i,u=!0),u&&(t=Cn())&&!D(t.onLine)&&(l=t.onLine)}catch(o){u=!1}function r(){l=!0}function i(){l=!1}e.isListening=u,e.isOnline=function(){var e=!0,n=Cn();return u?e=l:n&&!D(n.onLine)&&(e=n.onLine),e},e.isOffline=function(){return!e.isOnline()}})}var ai=oi.Offline=new oi,si=(ui.prototype.getHashCodeScore=function(e){return this.getHashCode(e)/ui.INT_MAX_VALUE*100},ui.prototype.getHashCode=function(e){if(""===e)return 0;for(;e.length<8;)e=e.concat(e);for(var n=5381,t=0;t<e.length;++t)n=(n<<5)+n+e.charCodeAt(t),n&=n;return Math.abs(n)},ui.INT_MAX_VALUE=2147483647,ui);function ui(){}var li=function(){var n=new si,t=new qr;this.getSamplingScore=function(e){return e.tags&&e.tags[t.userId]?n.getHashCodeScore(e.tags[t.userId]):e.ext&&e.ext.user&&e.ext.user.id?n.getHashCodeScore(e.ext.user.id):e.tags&&e.tags[t.operationId]?n.getHashCodeScore(e.tags[t.operationId]):e.ext&&e.ext.telemetryTrace&&e.ext.telemetryTrace.traceID?n.getHashCodeScore(e.ext.telemetryTrace.traceID):100*Math.random()}},ci=(fi.prototype.isSampledIn=function(e){var n=this.sampleRate;return null===n||n===undefined||100<=n||e.baseType===vr.dataType||this.samplingScoreGenerator.getSamplingScore(e)<n},fi);function fi(e,n){this.INT_MAX_VALUE=2147483647;n=n||En(null);(100<e||e<0)&&(n.throwInternal(j.WARNING,K.SampleRateOutOfRange,"Sampling rate is out of range (0..100). Sampling will be disabled, you may be sending too much data which may affect your AI service level.",{samplingRate:e},!0),e=100),this.sampleRate=e,this.samplingScoreGenerator=new li}function di(e){try{return e.responseText}catch(n){}return null}function pi(){return{endpointUrl:function(){return"https://dc.services.visualstudio.com/v2/track"},emitLineDelimitedJson:function(){return!1},maxBatchInterval:function(){return 15e3},maxBatchSizeInBytes:function(){return 102400},disableTelemetry:function(){return!1},enableSessionStorageBuffer:function(){return!0},isRetryDisabled:function(){return!1},isBeaconApiDisabled:function(){return!0},disableXhr:function(){return!1},onunloadDisableFetch:function(){return!1},onunloadDisableBeacon:function(){return!1},instrumentationKey:function(){return undefined},namePrefix:function(){return undefined},samplingPercentage:function(){return 100},customHeaders:function(){return undefined},convertUndefined:function(){return undefined},eventsLimitInMem:function(){return 1e4}}}(e={})[Wt.dataType]=ri,e[Rr.dataType]=function(e,n,t){ni(e,n);var r=n[w].message,i=n[w].severityLevel,o=n[w][x]||{},a=n[w].measurements||{},t=($r(n.data,o,a),D(t)||Qr(o,t),new Rr(e,r,i,o,a)),r=new Br(Rr.dataType,t);return ei(e,Rr.envelopeType,n,r)},e[Tr.dataType]=function(e,n,t){ni(e,n);var r,i="duration",o=n[w],i=(D(o)||D(o[x])||D(o[x][i])?D(n.data)||D(n.data[i])||(r=n.data[i],delete n.data[i]):(r=o[x][i],delete o[x][i]),n[w]),o=(((n.ext||{}).trace||{}).traceID&&(a=n.ext.trace.traceID),i.id||a),a=i.name,s=i.uri,u=i[x]||{},l=i.measurements||{},i=(D(i.refUri)||(u.refUri=i.refUri),D(i.pageType)||(u.pageType=i.pageType),D(i.isLoggedIn)||(u.isLoggedIn=i.isLoggedIn.toString()),D(i[x])||k(i[x],function(e,n){u[e]=n}),$r(n.data,u,l),D(t)||Qr(u,t),new Tr(e,a,s,r,u,l,o)),t=new Br(Tr.dataType,i);return ei(e,Tr.envelopeType,n,t)},e[Mr.dataType]=function(e,n,t){ni(e,n);var r=n[w],i=r.name,o=r.uri||r.url,a=r[x]||{},s=r.measurements||{},t=($r(n.data,a,s),D(t)||Qr(a,t),new Mr(e,i,o,undefined,a,s,r)),i=new Br(Mr.dataType,t);return ei(e,Mr.envelopeType,n,i)},e[ar.dataType]=function(e,n,t){ni(e,n);var r=n[w].measurements||{},i=n[w][x]||{},t=($r(n.data,i,r),D(t)||Qr(i,t),n[w]),t=ar.CreateFromInterface(e,t,i,r),i=new Br(ar.dataType,t);return ei(e,ar.envelopeType,n,i)},e[vr.dataType]=function(e,n,t){ni(e,n);var r=n[w],i=r[x]||{},o=r.measurements||{},t=($r(n.data,i,o),D(t)||Qr(i,t),new vr(e,r.name,r.average,r.sampleCount,r.min,r.max,r.stdDev,i,o)),r=new Br(vr.dataType,t);return ei(e,vr.envelopeType,n,r)},e[br.dataType]=function(e,n,t){ni(e,n);var r=n[w].measurements||{},i=n[w][x]||{},t=($r(n.data,i,r),D(t)||Qr(i,t),n[w]);if(D(t))return e.warnToConsole("Invalid input for dependency data"),null;var o=t[x]&&t[x][_t]?t[x][_t]:"GET",o=new br(e,t.id,t.target,t.name,t.duration,t.success,t.responseCode,o,t.type,t.correlationContext,i,r),t=new Br(br.dataType,o);return ei(e,br.envelopeType,n,t)};var gi,mi=e,Ee=(n(hi,gi=_e),hi.constructEnvelope=function(e,n,t,r){e=n===e.iKey||D(n)?e:f(f({},e),{iKey:n});return(mi[e.baseType]||ri)(t,e,r)},hi);function hi(){var w,x,t,b,_,N,A,R=gi.call(this)||this,F=(R.priority=1001,!(R.identifier="AppInsightsChannelPlugin")),L={},E=0;return R._senderConfig=pi(),h(hi,R,function(l,a){function c(e,n,t,r,i,o){var a=null;l._appId||(a=g(o))&&a.appId&&(l._appId=a.appId),(e<200||300<=e)&&0!==e?(301!==e&&307!==e&&308!==e||s(t))&&!l._senderConfig.isRetryDisabled()&&y(e)?(m(n),l.diagLog().throwInternal(j.WARNING,K.TransmissionFailed,". Response code "+e+". Will retry to send "+n.length+" items.")):l._onError(n,i):ai.isOffline()?l._senderConfig.isRetryDisabled()||(m(n,10),l.diagLog().throwInternal(j.WARNING,K.TransmissionFailed,". Offline - Response Code: ".concat(e,". Offline status: ").concat(ai.isOffline(),". Will retry to send ").concat(n.length," items."))):(s(t),206===e?(a=a||g(o))&&!l._senderConfig.isRetryDisabled()?l._onPartialSuccess(n,a):l._onError(n,i):(w=0,l._onSuccess(n,r)))}function s(e){return!(10<=_)&&!D(e)&&""!==e&&e!==l._senderConfig.endpointUrl()&&(l._senderConfig.endpointUrl=function(){return e},++_,1)}function n(e,n){A?A(e,!1):u(e)}function o(e){var n=Cn(),t=l._buffer,r=l._senderConfig.endpointUrl(),i=l._buffer.batchPayloads(e),i=new Blob([i],{type:"text/plain;charset=UTF-8"}),r=n.sendBeacon(r,i);return r&&(t.markAsSent(e),l._onSuccess(e,e.length)),r}function u(e,n){if(B(e)&&0<e.length&&!o(e)){for(var t=[],r=0;r<e.length;r++){var i=e[r];o([i])||t.push(i)}0<t.length&&(N(t,!0),l.diagLog().throwInternal(j.WARNING,K.TransmissionFailed,". Failed to send telemetry with Beacon API, retried with normal sender."))}}function f(n,e){var t=new XMLHttpRequest,r=l._senderConfig.endpointUrl();try{t[wt]=!0}catch(i){}t.open("POST",r,e),t.setRequestHeader("Content-type","application/json"),Ot(r)&&t.setRequestHeader("Sdk-Context","appId"),P(Ze(L),function(e){t.setRequestHeader(e,L[e])}),t.onreadystatechange=function(){return l._xhrReadyStateChange(t,n,n.length)},t.onerror=function(e){return l._onError(n,I(t),e)};e=l._buffer.batchPayloads(n);t.send(e),l._buffer.markAsSent(n)}function d(e,n){if(B(e)){for(var t=e.length,r=0;r<e.length;r++)t+=e[r].length;E+t<=65e3?i(e,!1):wn()?u(e):(N&&N(e,!0),l.diagLog().throwInternal(j.WARNING,K.TransmissionFailed,". Failed to send telemetry with Beacon API, retried with xhrSender."))}}function p(e,n){i(e,!0)}function i(t,r){var e=l._senderConfig.endpointUrl(),n=l._buffer.batchPayloads(t),i=new Blob([n],{type:"application/json"}),o=new Headers,a=n.length,n=!1,s=!1,e=(Ot(e)&&o.append("Sdk-Context","appId"),P(Ze(L),function(e){o.append(e,L[e])}),(i={method:"POST",headers:o,body:i})[wt]=!0,r||(n=i.keepalive=!0,E+=a),new Request(e,i));try{e[wt]=!0}catch(u){}l._buffer.markAsSent(t);try{fetch(e).then(function(n){r||(E-=a,a=0),s||(s=!0,n.ok?n.text().then(function(e){c(n.status,t,n.url,t.length,n.statusText,e)}):l._onError(t,n.statusText))})["catch"](function(e){r||(E-=a,a=0),s||(s=!0,l._onError(t,e.message))})}catch(u){s||l._onError(t,z(u))}n&&!s&&(s=!0,l._onSuccess(t,t.length))}function g(e){try{if(e&&""!==e){var n=U().parse(e);if(n&&n.itemsReceived&&n.itemsReceived>=n.itemsAccepted&&n.itemsReceived-n.itemsAccepted===n.errors.length)return n}}catch(t){l.diagLog().throwInternal(j.CRITICAL,K.InvalidBackendResponse,"Cannot parse the response. "+O(t),{response:e})}return null}function m(e,n){if(void 0===n&&(n=1),e&&0!==e.length){var t=l._buffer;t.clearSent(e),w++;for(var r=0,i=e;r<i.length;r++){var o=i[r];t.enqueue(o)}n=w<=1?10:(e=1+Math.floor((Math.pow(2,w)-1)/2*Math.random()*10),Math.max(Math.min(e*=n,3600),10)),e=Qe()+1e3*n;x=e,h()}}function h(){var e;t||F||(e=x?Math.max(0,x-Qe()):0,e=Math.max(l._senderConfig.maxBatchInterval(),e),t=setTimeout(function(){t=null,l.triggerSend(!0,null,1)},e))}function v(){clearTimeout(t),x=t=null}function y(e){return 408===e||429===e||500===e||503===e}function I(e,n){return e?"XMLHttpRequest,Status:"+e.status+",Response:"+di(e)||e.response||"":n}function S(n,e){var t=l._buffer,r=yn(),i=new XDomainRequest,r=(i.onload=function(){return l._xdrOnLoad(i,n)},i.onerror=function(e){return l._onError(n,C(i),e)},r&&r.location&&r.location.protocol||"");if(l._senderConfig.endpointUrl().lastIndexOf(r,0))return l.diagLog().throwInternal(j.WARNING,K.TransmissionFailed,". Cannot send XDomain request. The endpoint URL protocol doesn't match the hosting page protocol."),void t.clear();r=l._senderConfig.endpointUrl().replace(/^(https?:)/,""),i.open("POST",r),r=t.batchPayloads(n);i.send(r),t.markAsSent(n)}function C(e,n){return e?"XDomainRequest,Response:"+di(e)||"":n}function T(e,n){var t="getNotifyMgr",t=l.core[t]?l.core[t]():l.core._notificationManager;if(t&&t.eventsSendRequest)try{t.eventsSendRequest(e,n)}catch(r){l.diagLog().throwInternal(j.CRITICAL,K.NotificationException,"send request notification failed: "+O(r),{exception:z(r)})}}l.pause=function(){v(),F=!0},l.resume=function(){F&&(F=!1,x=null,l._buffer.size()>l._senderConfig.maxBatchSizeInBytes()&&l.triggerSend(!0,null,10),h())},l.flush=function(e,n,t){if(void 0===e&&(e=!0),!F){v();try{l.triggerSend(e,null,t||1)}catch(r){l.diagLog().throwInternal(j.CRITICAL,K.FlushFailed,"flush failed, telemetry will not be collected: "+O(r),{exception:z(r)})}}},l.onunloadFlush=function(){if(!F)if(!1!==l._senderConfig.onunloadDisableBeacon()&&!1!==l._senderConfig.isBeaconApiDisabled()||!wn())l.flush();else try{l.triggerSend(!0,n,2)}catch(e){l.diagLog().throwInternal(j.CRITICAL,K.FailedToSendQueuedTelemetry,"failed to flush with beacon sender on page unload, telemetry will not be collected: "+O(e),{exception:z(e)})}},l.teardown=function(){tn("Method not implemented.")},l.addHeader=function(e,n){L[e]=n},l.initialize=function(e,n,t,r){a.initialize(e,n,t,r);var i=l._getTelCtx(),o=l.identifier,t=(b=new ii(n.logger),x=null,w=0,l._sender=null,_=0,l.diagLog()),r=(k(pi(),function(e,n){l._senderConfig[e]=function(){return i.getConfig(o,e,n())}}),l._buffer=new(l._senderConfig.enableSessionStorageBuffer()&&Lt()?Yr:Hr)(t,l._senderConfig),l._sample=new ci(l._senderConfig.samplingPercentage(),t),!D(e.disableInstrumentationKeyValidation)&&e.disableInstrumentationKeyValidation||/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/.test(e.instrumentationKey)||t.throwInternal(j.CRITICAL,K.InvalidInstrumentationKey,"Invalid Instrumentation key "+e.instrumentationKey),!Ot(l._senderConfig.endpointUrl())&&l._senderConfig.customHeaders()&&0<l._senderConfig.customHeaders().length&&P(l._senderConfig.customHeaders(),function(e){R.addHeader(e.header,e.value)}),l._senderConfig),n=null;!r.disableXhr()&&bn()?n=S:!r.disableXhr()&&_n()&&(n=f),!n&&xn()&&(n=p),N=n||f,!r.isBeaconApiDisabled()&&wn()&&(n=u),l._sender=n||f,A=!r.onunloadDisableFetch()&&xn(!0)?d:wn()?u:!r.disableXhr()&&bn()?S:!r.disableXhr()&&_n()?f:N},l.processTelemetry=function(e,t){t=l._getTelCtx(t);try{if(l._senderConfig.disableTelemetry())return;if(!e)return void t.diagLog().throwInternal(j.CRITICAL,K.CannotSendEmptyTelemetry,"Cannot send empty telemetry");if(e.baseData&&!e.baseType)return void t.diagLog().throwInternal(j.CRITICAL,K.InvalidEvent,"Cannot send telemetry without baseData and baseType");if(e.baseType||(e.baseType="EventData"),!l._sender)return void t.diagLog().throwInternal(j.CRITICAL,K.SenderNotInitialized,"Sender was not initialized");if(!l._sample.isSampledIn(e))return void t.diagLog().throwInternal(j.WARNING,K.TelemetrySampledAndNotSent,"Telemetry item was sampled out and not sent",{SampleRate:l._sample.sampleRate});e[xt]=l._sample.sampleRate;var n=l._senderConfig.convertUndefined()||undefined,r=e.iKey||l._senderConfig.instrumentationKey(),i=hi.constructEnvelope(e,r,t.diagLog(),n);if(!i)return void t.diagLog().throwInternal(j.CRITICAL,K.CreateEnvelopeError,"Unable to create an AppInsights envelope");var o=!1;if(e.tags&&e.tags[bt]&&(P(e.tags[bt],function(e){try{e&&!1===e(i)&&(o=!0,t.diagLog().warnToConsole("Telemetry processor check returns false"))}catch(n){t.diagLog().throwInternal(j.CRITICAL,K.TelemetryInitializerFailed,"One of telemetry initializers failed, telemetry item will not be sent: "+O(n),{exception:z(n)},!0)}}),delete e.tags[bt]),o)return;var a=b.serialize(i),s=l._buffer;s.size()+a.length>l._senderConfig.maxBatchSizeInBytes()&&l.triggerSend(!0,null,10),s.enqueue(a),h()}catch(u){t.diagLog().throwInternal(j.WARNING,K.FailedAddingTelemetryToBuffer,"Failed adding telemetry to the sender's buffer, some telemetry will be lost: "+O(u),{exception:z(u)})}l.processNext(e,t)},l._xhrReadyStateChange=function(e,n,t){4===e.readyState&&c(e.status,n,e.responseURL,t,I(e),di(e)||e.response)},l.triggerSend=function(e,n,t){if(void 0===e&&(e=!0),!F)try{var r,i=l._buffer;l._senderConfig.disableTelemetry()?i.clear():0<i.count()&&(r=i.getItems(),T(t||0,e),n?n.call(R,r,e):l._sender(r,e)),v()}catch(o){i=function(e){var n=((e=(e=void 0===e?null:e)?e:(n=Cn()||{})?(n.userAgent||M).toLowerCase():M)||M).toLowerCase();if(qe(n,ln))return e=In()||{},Math.max(parseInt(n.split(ln)[1]),e.documentMode||0);if(qe(n,cn)){e=parseInt(n.split(cn)[1]);if(e)return e+4}return null}();(!i||9<i)&&l.diagLog().throwInternal(j.CRITICAL,K.TransmissionFailed,"Telemetry transmission failed, some telemetry will be lost: "+O(o),{exception:z(o)})}},l._onError=function(e,n,t){l.diagLog().throwInternal(j.WARNING,K.OnError,"Failed to send telemetry.",{message:n}),l._buffer.clearSent(e)},l._onPartialSuccess=function(e,n){for(var t=[],r=[],i=0,o=n.errors.reverse();i<o.length;i++){var a=o[i],s=e.splice(a.index,1)[0];(y(a.statusCode)?r:t).push(s)}0<e.length&&l._onSuccess(e,n.itemsAccepted),0<t.length&&l._onError(t,I(null,["partial success",n.itemsAccepted,"of",n.itemsReceived].join(" "))),0<r.length&&(m(r),l.diagLog().throwInternal(j.WARNING,K.TransmissionFailed,"Partial success. Delivered: "+e.length+", Failed: "+t.length+". Will retry to send "+r.length+" our of "+n.itemsReceived+" items"))},l._onSuccess=function(e,n){l._buffer.clearSent(e)},l._xdrOnLoad=function(e,n){var t=di(e);!e||t+""!="200"&&""!==t?(t=g(t))&&t.itemsReceived&&t.itemsReceived>t.itemsAccepted&&!l._senderConfig.isRetryDisabled()?l._onPartialSuccess(n,t):l._onError(n,C(e)):(w=0,l._onSuccess(n,0))}}),R}_.Sender=Ee;c=_,jr="__esModule",I={value:!0},S=Object.defineProperty;if(S)try{return void S(c,jr,I)}catch(Ci){}typeof I.value!==undefined&&(c[jr]=I.value)};"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n(((e="undefined"!=typeof globalThis?globalThis:e||self).Microsoft=e.Microsoft||{},e.Microsoft.ApplicationInsights=e.Microsoft.ApplicationInsights||{}));
6
6
  //# sourceMappingURL=applicationinsights-channel-js.min.js.map