@microsoft/applicationinsights-dependencies-js
Advanced tools
Comparing version 2.5.4 to 2.5.5
/*! | ||
* Application Insights JavaScript SDK - Dependencies Plugin, 2.5.4 | ||
* Application Insights JavaScript SDK - Dependencies Plugin, 2.5.5 | ||
* Copyright (c) Microsoft and contributors. All rights reserved. | ||
*/ | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e.Microsoft=e.Microsoft||{},e.Microsoft.ApplicationInsights={}))}(this,function(e){"use strict";var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function t(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?function(e){var t=Object.create;if(t)return t(e);if(null==e)return{};var n=typeof e;if("object"!=n&&"function"!=n)throw new TypeError("Object prototype may only be an Object:"+e);function r(){}return r.prototype=e,new r}(t):(n.prototype=t.prototype,new n)}var a,n,g,i,R,o,s=function(){return(s=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};(n=a=a||{})[n.LocalStorage=0]="LocalStorage",n[n.SessionStorage=1]="SessionStorage",(i=g=g||{})[i.Default=0]="Default",i[i.Required=1]="Required",i[i.Array=2]="Array",i[i.Hidden=4]="Hidden",(o=R=R||{})[o.AI=0]="AI",o[o.AI_AND_W3C=1]="AI_AND_W3C",o[o.W3C=2]="W3C";var u=2,k="undefined",l="object",F="prototype",c="function",f="window",d="location",p="performance",h="JSON";function O(){return typeof globalThis!==k&&globalThis?globalThis:typeof self!==k&&self?self:typeof window!==k&&window?window:typeof global!==k&&global?global:null}function m(e){var t=O();return t&&t[e]?t[e]:e===f&&v()?window:null}function v(){return Boolean(typeof window===l&&window)}function y(){return v()?window:m(f)}function x(){return function e(){return Boolean(typeof document===l&&document)}()?document:m("document")}function S(){return function e(){return Boolean(typeof navigator===l&&navigator)}()?navigator:m("navigator")}function H(){return typeof location===l&&location?location:m(d)}function j(){return m(p)}function C(){return Boolean(typeof JSON===l&&JSON||null!==m(h))}function I(){return C()?JSON||m(h):null}var T="attachEvent",b="addEventListener",N="detachEvent",A="removeEventListener";function M(e,t){return typeof e===t}function D(e){return M(e,k)||e===undefined}function w(e){return D(e)||null===e}function _(e,t){return e&&Object[F].hasOwnProperty.call(e,t)}function E(e){return M(e,l)}function L(e){return M(e,c)}function q(e,t,n,r){void 0===r&&(r=!1);var i=!1;if(!w(e))try{w(e[b])?w(e[T])||(e[T]("on"+t,n),i=!0):(e[b](t,n,r),i=!0)}catch(a){}return i}function U(e,t,n,r){if(void 0===r&&(r=!1),!w(e))try{w(e[A])?w(e[N])||e[N]("on"+t,n):e[A](t,n,r)}catch(i){}}var P=(z.isDate=function(e){return"[object Date]"===Object[F].toString.call(e)},z.isString=function(e){return M(e,"string")},z.isNumber=function(e){return M(e,"number")},z.isBoolean=function(e){return M(e,"boolean")},z.disableCookies=function(){z._canUseCookies=!1},z.newGuid=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(W,function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})},z.toISOString=function(e){if(z.isDate(e)){var t=function(e){var t=String(e);return 1===t.length&&(t="0"+t),t};return e.getUTCFullYear()+"-"+t(e.getUTCMonth()+1)+"-"+t(e.getUTCDate())+"T"+t(e.getUTCHours())+":"+t(e.getUTCMinutes())+":"+t(e.getUTCSeconds())+"."+String((e.getUTCMilliseconds()/1e3).toFixed(3)).slice(2,5)+"Z"}},z.arrForEach=function(e,t,n){for(var r=e.length,i=0;i<r;++i)i in e&&t.call(n||e,e[i],i,e)},z.arrIndexOf=function(e,t,n){for(var r=e.length,i=n||0,a=Math.max(0<=i?i:r-Math.abs(i),0);a<r;a++)if(a in e&&e[a]===t)return a;return-1},z.arrMap=function(e,t,n){for(var r=e.length,i=n||e,a=new Array(r),o=0;o<r;o++)o in e&&(a[o]=t.call(i,e[o],e));return a},z.arrReduce=function(e,t,n){var r,i=e.length,a=0;if(3<=arguments.length)r=n;else{for(;a<i&&!(a in e);)a++;r=e[a++]}for(;a<i;)a in e&&(r=t(r,e[a],a,e)),a++;return r},z.objCreate=function(e){if(null==e)return{};if(!E(e)&&!L(e))throw new TypeError("Object prototype may only be an Object: "+e);function t(){}return t[F]=e,new t},z.objKeys=function(e){var t=!{toString:null}.propertyIsEnumerable("toString");if(!(L(e)||E(e)&&null!==e))throw new TypeError("objKeys called on non-object");var n=[];for(var r in e)_(e,r)&&n.push(r);if(t)for(var i=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],a=i.length,o=0;o<a;o++)_(e,i[o])&&n.push(i[o]);return n},z.objDefineAccessors=function(e,t,n,r){var i=Object.defineProperty;if(i)try{var a={enumerable:!0,configurable:!0};return n&&(a.get=n),r&&(a.set=r),i(e,t,a),!0}catch(o){}return!1},z.addEventHandler=function(e,t){var n=!1,r=y();r&&(n=q(r,e,t),n=q(r.body,e,t)||n);var i=x();return i&&(n=X.Attach(i,e,t)||n),n},z.isTypeof=M,z.isUndefined=D,z.isNullOrUndefined=w,z.hasOwnProperty=_,z.isFunction=L,z.isObject=E,z);function z(){}var G,B,W=/[xy]/g,X=(V.Attach=q,V.AttachEvent=q,V.Detach=U,V.DetachEvent=U,V);function V(){}(B=G=G||{})[B.CRITICAL=1]="CRITICAL",B[B.WARNING=2]="WARNING";var K={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},Q=($.sanitizeDiagnosticText=function(e){return e?'"'+e.replace(/\"/g,"")+'"':""},$.dataType="MessageData",$.AiNonUserActionablePrefix="AI (Internal): ",$.AiUserActionablePrefix="AI: ",$);function $(e,t,n,r){void 0===n&&(n=!1),this.messageId=e,this.message=(n?$.AiUserActionablePrefix:$.AiNonUserActionablePrefix)+e;var i="";C()&&(i=I().stringify(r));var a=(t?" message:"+$.sanitizeDiagnosticText(t):"")+(r?" props:"+$.sanitizeDiagnosticText(i):"");this.message+=a}var J=(Y.prototype.throwInternal=function(e,t,n,r,i){void 0===i&&(i=!1);var a=new Q(t,n,i,r),o=this;if(o.enableDebugExceptions())throw a;if(!P.isUndefined(a)&&a&&!P.isUndefined(a.message)){if(i){var s=+a.messageId;!o._messageLogged[s]&&o.consoleLoggingLevel()>=G.WARNING&&(o.warnToConsole(a.message),o._messageLogged[s]=!0)}else o.consoleLoggingLevel()>=G.WARNING&&o.warnToConsole(a.message);o.logInternalMessage(e,a)}},Y.prototype.warnToConsole=function(e){!P.isUndefined(console)&&console&&(P.isFunction(console.warn)?console.warn(e):P.isFunction(console.log)&&console.log(e))},Y.prototype.resetInternalMessageCount=function(){this._messageCount=0,this._messageLogged={}},Y.prototype.logInternalMessage=function(e,t){var n=this;if(!n._areInternalMessagesThrottled()){var r=!0,i=n.AIInternalMessagePrefix+t.messageId;if(n._messageLogged[i]?r=!1:n._messageLogged[i]=!0,r&&(e<=n.telemetryLoggingLevel()&&(n.queue.push(t),n._messageCount++),n._messageCount===n.maxInternalMessageLimit())){var a="Internal events throttle limit per PageView reached for this app.",o=new Q(K.MessageLimitPerPVExceeded,a,!1);n.queue.push(o),n.warnToConsole(a)}}},Y.prototype._areInternalMessagesThrottled=function(){return this._messageCount>=this.maxInternalMessageLimit()},Y);function Y(e){this.queue=[],this.AIInternalMessagePrefix="AITR_",this._messageCount=0,this._messageLogged={},this.enableDebugExceptions=function(){return!1},this.consoleLoggingLevel=function(){return 0},this.telemetryLoggingLevel=function(){return 1},this.maxInternalMessageLimit=function(){return 25},P.isNullOrUndefined(e)||(P.isNullOrUndefined(e.loggingLevelConsole)||(this.consoleLoggingLevel=function(){return e.loggingLevelConsole}),P.isNullOrUndefined(e.loggingLevelTelemetry)||(this.telemetryLoggingLevel=function(){return e.loggingLevelTelemetry}),P.isNullOrUndefined(e.maxMessageLimit)||(this.maxInternalMessageLimit=function(){return e.maxMessageLimit}),P.isNullOrUndefined(e.enableDebugExceptions)||(this.enableDebugExceptions=function(){return e.enableDebugExceptions}))}var Z=P.isFunction,ee=function ir(i,a){var o=this,s=null,u=Z(i.processTelemetry),l=Z(i.setNextPlugin);o._hasRun=!1,o.getPlugin=function(){return i},o.getNext=function(){return s},o.setNext=function(e){s=e},o.processTelemetry=function(e,t){if(t=t||a,i&&u){o._hasRun=!0;try{t.setNext(s),l&&i.setNextPlugin(s),s&&(s._hasRun=!1),i.processTelemetry(e,t)}catch(r){var n=s&&s._hasRun;s&&n||t.diagLog().throwInternal(G.CRITICAL,K.PluginException,"Plugin ["+i.identifier+"] failed during processTelemetry - "+r),s&&!n&&s.processTelemetry(e,t)}}else s&&(o._hasRun=!0,s.processTelemetry(e,t))}},te=P.isNullOrUndefined;function ne(e,t){var n=[];if(e&&0<e.length)for(var r=null,i=0;i<e.length;i++){var a=e[i];if(a&&P.isFunction(a.processTelemetry)){var o=new ee(a,t);n.push(o),r&&r.setNext(o),r=o}}return 0<n.length?n[0]:null}var re=function ar(e,a,n,t){var o=this,r=null;null!==t&&(e&&P.isFunction(e.getPlugin)?r=function s(e,t,n){var r=[],i=!n;if(e)for(;e;){var a=e.getPlugin();!i&&a!==n||(i=!0,r.push(a)),e=e.getNext()}return i||r.push(n),ne(r,t)}(e,o,t||e.getPlugin()):t?r=function u(e,t,n){var r=e,i=!1;return n&&e&&(r=[],P.arrForEach(e,function(e){!i&&e!==n||(i=!0,r.push(e))})),n&&!i&&(r=r||[]).push(n),ne(r,t)}(e,o,t):P.isUndefined(t)&&(r=ne(e,o))),o.core=function(){return n},o.diagLog=function(){var e=(n||{}).logger;return e=e||new J(a||{})},o.getCfg=function(){return a},o.getExtCfg=function(e,t){var n;if(void 0===t&&(t={}),a){var r=a.extensionConfig;r&&e&&(n=r[e])}return n||t},o.getConfig=function(e,t,n){var r;void 0===n&&(n=!1);var i=o.getExtCfg(e,null);return i&&!te(i[t])?r=i[t]:a&&!te(a[t])&&(r=a[t]),te(r)?n:r},o.hasNext=function(){return null!=r},o.getNext=function(){return r},o.setNext=function(e){r=e},o.processNext=function(e){var t=r;t&&(r=t.getNext(),t.processTelemetry(e,o))},o.createNew=function(e,t){return void 0===e&&(e=null),new ar(e||r,a,n,t)}},ie=P.isFunction,ae="getPlugin",oe=(se.prototype.initialize=function(e,t,n,r){this._baseTelInit(e,t,n,r)},se);function se(){var a=this,o=!1,s=null,u=null;a.core=null,a.diagLog=function(e){return a._getTelCtx(e).diagLog()},a.isInitialized=function(){return o},a.setInitialized=function(e){o=e},a.setNextPlugin=function(e){u=e},a.processNext=function(e,t){t?t.processNext(e):u&&ie(u.processTelemetry)&&u.processTelemetry(e,null)},a._getTelCtx=function(e){void 0===e&&(e=null);var t=e;if(!t){var n=s||new re(null,{},a.core);t=u&&u[ae]?n.createNew(null,u[ae]):n.createNew(null,u)}return t},a._baseTelInit=function(e,t,n,r){e&&(e.extensionConfig=e.extensionConfig||[]),!r&&t&&(r=t.getProcessTelContext().getNext());var i=u;u&&u[ae]&&(i=u[ae]()),a.core=t,s=new re(r,e,t,i),o=!0}}var ue=P.isFunction,le="processTelemetry",ce="priority",fe="setNextPlugin",de="isInitialized";function pe(t,n){for(var e=[],r=null,i=t.getNext();i;){var a=i.getPlugin();a&&(r&&ue(r[fe])&&ue(a[le])&&r[fe](a),ue(a[de])&&a[de]()||e.push(a),r=a,i=i.getNext())}P.arrForEach(e,function(e){e.initialize(t.getCfg(),t.core(),n,t.getNext())})}function ge(e){return e.sort(function(e,t){var n=0,r=ue(t[le]);return ue(e[le])?n=r?e[ce]-t[ce]:1:r&&(n=-1),n})}var he=500,me="Channel has invalid priority",ve=P.arrForEach,ye=P.objDefineAccessors;function xe(e,t){t&&0<t.length&&(function n(e){ve(e,function(e){if(e.priority<he)throw Error(me+e.identifier)})}(t=t.sort(function(e,t){return e.priority-t.priority})),e.push(t))}var Se,Ce=(t(Ie,Se=oe),Ie.prototype.processTelemetry=function(t,n){var r=this;this._channelQueue&&ve(this._channelQueue,function(e){0<e.length&&r._getTelCtx(n).createNew(e).processNext(t)})},Ie.prototype.getChannelControls=function(){return this._channelQueue},Ie.prototype.initialize=function(t,n,r){if(!this.isInitialized()){Se.prototype.initialize.call(this,t,n,r),t.isCookieUseDisabled&&P.disableCookies();var e=this._channelQueue=function i(e,t){var n=[];if(e&&ve(e,function(e){return xe(n,e)}),t){var r=[];ve(t,function(e){e.priority>he&&r.push(e)}),xe(n,r)}return n}((t||{}).channels,r);ve(e,function(e){return pe(new re(e,t,n),r)})}},Ie._staticInit=(ye(Ie.prototype,"ChannelControls",Ie.prototype.getChannelControls),void ye(Ie.prototype,"channelQueue",Ie.prototype.getChannelControls)),Ie);function Ie(){var e=null!==Se&&Se.apply(this,arguments)||this;return e.identifier="ChannelControllerPlugin",e.priority=he,e}var Te=P.arrForEach,be=P.isNullOrUndefined,Ne=(Ae.prototype.initialize=function(e,t,r,n){var i=this;if(i.isInitialized())throw Error("Core should not be initialized more than once");if(!e||be(e.instrumentationKey))throw Error("Please provide instrumentation key");i.config=e;var a=i._channelController;n=n||P.objCreate({addNotificationListener:function(e){},removeNotificationListener:function(e){},eventsSent:function(e){},eventsDiscarded:function(e,t){}}),i._notificationManager=n,e.extensions=be(e.extensions)?[]:e.extensions,(e.extensionConfig=be(e.extensionConfig)?{}:e.extensionConfig).NotificationManager=n,r=r||P.objCreate({throwInternal:function(e,t,n,r,i){void 0===i&&(i=!1)},warnToConsole:function(e){},resetInternalMessageCount:function(){}}),i.logger=r;var o=[];o.push.apply(o,t.concat(e.extensions)),o=ge(o);var s=[],u={};if(Te(o,function(e){if(be(e)||be(e.initialize))throw Error("Extensions must provide callback to initialize");var t=e.priority,n=e.identifier;e&&t&&(be(u[t])?u[t]=n:r.warnToConsole("Two extensions have same priority #"+t+" - "+u[t]+", "+n)),(!t||t<a.priority)&&s.push(e)}),o.push(a),s.push(a),o=ge(o),i._extensions=o,pe(new re([a],e,i),o),pe(new re(s,e,i),o),i._extensions=s,0===i.getTransmissionControls().length)throw new Error("No channels available");i._setInit(!0)},Ae.prototype.getTransmissionControls=function(){return this._channelController.getChannelControls()},Ae.prototype.track=function(e){var t=this;e.iKey||(e.iKey=t.config.instrumentationKey),e.time||(e.time=P.toISOString(new Date)),be(e.ver)&&(e.ver="4.0"),t.isInitialized()?(0<t._eventQueue.length&&(Te(t._eventQueue,function(e){t.getProcessTelContext().processNext(e)}),t._eventQueue=[]),t.getProcessTelContext().processNext(e)):t._eventQueue.push(e)},Ae.prototype.getProcessTelContext=function(){var e=this._extensions,t=e;return e&&0!==e.length||(t=[this._channelController]),new re(t,this.config,this)},Ae);function Ae(){var t=!1,e=this;e._extensions=new Array,e._channelController=new Ce,e.isInitialized=function(){return t},e._setInit=function(e){t=e},e._eventQueue=[]}var Me=(De.prototype.addNotificationListener=function(e){this.listeners.push(e)},De.prototype.removeNotificationListener=function(e){for(var t=P.arrIndexOf(this.listeners,e);-1<t;)this.listeners.splice(t,1),t=P.arrIndexOf(this.listeners,e)},De.prototype.eventsSent=function(t){for(var n=this,e=function(e){r.listeners[e].eventsSent&&setTimeout(function(){return n.listeners[e].eventsSent(t)},0)},r=this,i=0;i<this.listeners.length;++i)e(i)},De.prototype.eventsDiscarded=function(t,n){for(var r=this,e=function(e){i.listeners[e].eventsDiscarded&&setTimeout(function(){return r.listeners[e].eventsDiscarded(t,n)},0)},i=this,a=0;a<this.listeners.length;++a)e(a)},De);function De(){this.listeners=[]}var we;t(_e,we=Ne),_e.prototype.initialize=function(e,t){var n=this;n._notificationManager=new Me,n.logger=new J(e),n.config=e,we.prototype.initialize.call(this,e,t,n.logger,n._notificationManager)},_e.prototype.getTransmissionControls=function(){return we.prototype.getTransmissionControls.call(this)},_e.prototype.track=function(e){if(null===e)throw this._notifyInvalidEvent(e),Error("Invalid telemetry item");this._validateTelemetryItem(e),we.prototype.track.call(this,e)},_e.prototype.addNotificationListener=function(e){this._notificationManager&&this._notificationManager.addNotificationListener(e)},_e.prototype.removeNotificationListener=function(e){this._notificationManager&&this._notificationManager.removeNotificationListener(e)},_e.prototype.pollInternalLogs=function(r){var t=this,e=this.config.diagnosticLogInterval;return e&&0<e||(e=1e4),setInterval(function(){var n=t,e=n.logger?n.logger.queue:[];P.arrForEach(e,function(e){var t={name:r||"InternalMessageId: "+e.messageId,iKey:n.config.instrumentationKey,time:P.toISOString(new Date),baseType:Q.dataType,baseData:{message:e.message}};n.track(t)}),e.length=0},e)},_e.prototype._validateTelemetryItem=function(e){if(P.isNullOrUndefined(e.name))throw this._notifyInvalidEvent(e),Error("telemetry name required")},_e.prototype._notifyInvalidEvent=function(e){this._notificationManager&&this._notificationManager.eventsDiscarded([e],u)};function _e(){return we.call(this)||this}var Ee="_aiHooks",Le=["req","rsp","hkErr","fnErr"];function qe(e,t){if(e)for(var n=0;n<e.length&&!t(e[n],n);n++);}function Re(e,u,l,c,f){0<=f&&f<=2&&qe(e,function(e,t){var n=e.cbks,r=n[Le[f]];if(r){u.ctx=function(){return c[t]=c[t]||{}};try{r.apply(u.inst,l)}catch(o){var i=u.err;try{var a=n[Le[2]];a&&(u.err=o,a.apply(u.inst,l))}catch(s){}finally{u.err=i}}}})}function ke(l){return function(){var n=arguments,e=l.h,r={name:l.n,inst:this,ctx:null,set:function s(e,t){(n=a([],n))[e]=t,i=a([r],n)}},t=[],i=a([r],n);function a(t,e){return qe(e,function(e){t.push(e)}),t}Re(e,r,i,t,0);var o=l.f;try{r.rslt=o.apply(this,n)}catch(u){throw r.err=u,Re(e,r,i,t,3),u}return Re(e,r,i,t,1),r.rslt}}function Fe(e,t,n,r){if(void 0===r&&(r=!0),e&&t&&n){var i=function l(e,t,n){var r=null;return e&&(P.hasOwnProperty(e,t)?r=e:n&&(r=l(e[F],t,!1))),r}(e,t,r),a=i[t];if(typeof a===c){var o=a[Ee];if(!o){var s=ke(o={i:0,n:t,f:a,h:[]});s[Ee]=o,i[t]=s}var u={id:o.i,cbks:n,rm:function(){var n=this.id;qe(o.h,function(e,t){return e.id===n&&(o.h.splice(t,1),1)})}};return o.i++,o.h.push(u),u}}return null}var Oe=(He.requestContextHeader="Request-Context",He.requestContextTargetKey="appId",He.requestContextAppIdFormat="appId=cid-v1:",He.requestIdHeader="Request-Id",He.traceParentHeader="traceparent",He.sdkContextHeader="Sdk-Context",He.sdkContextHeaderAppIdRequest="appId",He.requestContextHeaderLowerCase="request-context",He);function He(){}var je=(Ue.sanitizeKeyAndAddUniqueness=function(e,t,n){var r=t.length,i=Ue.sanitizeKey(e,t);if(i.length!==r){for(var a=0,o=i;n[o]!==undefined;)a++,o=i.substring(0,Ue.MAX_NAME_LENGTH-3)+Ue.padNumber(a);i=o}return i},Ue.sanitizeKey=function(e,t){var n;return t&&(t=Ue.trim(t.toString())).length>Ue.MAX_NAME_LENGTH&&(n=t.substring(0,Ue.MAX_NAME_LENGTH),e.throwInternal(G.WARNING,K.NameTooLong,"name is too long. It has been truncated to "+Ue.MAX_NAME_LENGTH+" characters.",{name:t},!0)),n||t},Ue.sanitizeString=function(e,t,n){var r;return void 0===n&&(n=Ue.MAX_STRING_LENGTH),t&&(n=n||Ue.MAX_STRING_LENGTH,(t=Ue.trim(t)).toString().length>n&&(r=t.toString().substring(0,n),e.throwInternal(G.WARNING,K.StringValueTooLong,"string value is too long. It has been truncated to "+n+" characters.",{value:t},!0))),r||t},Ue.sanitizeUrl=function(e,t){return Ue.sanitizeInput(e,t,Ue.MAX_URL_LENGTH,K.UrlTooLong)},Ue.sanitizeMessage=function(e,t){var n;return t&&t.length>Ue.MAX_MESSAGE_LENGTH&&(n=t.substring(0,Ue.MAX_MESSAGE_LENGTH),e.throwInternal(G.WARNING,K.MessageTruncated,"message is too long, it has been truncated to "+Ue.MAX_MESSAGE_LENGTH+" characters.",{message:t},!0)),n||t},Ue.sanitizeException=function(e,t){var n;return t&&t.length>Ue.MAX_EXCEPTION_LENGTH&&(n=t.substring(0,Ue.MAX_EXCEPTION_LENGTH),e.throwInternal(G.WARNING,K.ExceptionTruncated,"exception is too long, it has been truncated to "+Ue.MAX_EXCEPTION_LENGTH+" characters.",{exception:t},!0)),n||t},Ue.sanitizeProperties=function(e,t){if(t){var n={};for(var r in t){var i=t[r];if(P.isObject(i)&&C())try{i=I().stringify(i)}catch(a){e.throwInternal(G.WARNING,K.CannotSerializeObjectNonSerializable,"custom property is not valid",{exception:a},!0)}i=Ue.sanitizeString(e,i,Ue.MAX_PROPERTY_LENGTH),n[r=Ue.sanitizeKeyAndAddUniqueness(e,r,n)]=i}t=n}return t},Ue.sanitizeMeasurements=function(e,t){if(t){var n={};for(var r in t){var i=t[r];n[r=Ue.sanitizeKeyAndAddUniqueness(e,r,n)]=i}t=n}return t},Ue.sanitizeId=function(e,t){return t?Ue.sanitizeInput(e,t,Ue.MAX_ID_LENGTH,K.IdTooLong).toString():t},Ue.sanitizeInput=function(e,t,n,r){var i;return t&&(t=Ue.trim(t)).length>n&&(i=t.substring(0,n),e.throwInternal(G.WARNING,r,"input is too long, it has been truncated to "+n+" characters.",{data:t},!0)),i||t},Ue.padNumber=function(e){var t="00"+e;return t.substr(t.length-3)},Ue.trim=function(e){return P.isString(e)?e.replace(/^\s+|\s+$/g,""):e},Ue.MAX_NAME_LENGTH=150,Ue.MAX_ID_LENGTH=128,Ue.MAX_PROPERTY_LENGTH=8192,Ue.MAX_STRING_LENGTH=1024,Ue.MAX_URL_LENGTH=2048,Ue.MAX_MESSAGE_LENGTH=32768,Ue.MAX_EXCEPTION_LENGTH=32768,Ue);function Ue(){}var Pe=S(),ze=P.isString,Ge=null;var Be=(We.createDomEvent=function(e){var t=null;if(P.isFunction(Event))t=new Event(e);else{var n=x();n&&n.createEvent&&(t=n.createEvent("Event")).initEvent(e,!0,!0)}return t},We.disableStorage=function(){We._canUseLocalStorage=!1,We._canUseSessionStorage=!1},We._getLocalStorageObject=function(){return We.canUseLocalStorage()?We._getVerifiedStorageObject(a.LocalStorage):null},We._getVerifiedStorageObject=function(e){var t,n,r=null;try{if(P.isNullOrUndefined(O()))return null;n=new Date,(r=e===a.LocalStorage?m("localStorage"):m("sessionStorage")).setItem(n.toString(),n.toString()),t=r.getItem(n.toString())!==n.toString(),r.removeItem(n.toString()),t&&(r=null)}catch(i){r=null}return r},We.isInternalApplicationInsightsEndpoint=function(e){return-1!==We._internalEndpoints.indexOf(e.toLowerCase())},We.canUseLocalStorage=function(){return We._canUseLocalStorage===undefined&&(We._canUseLocalStorage=!!We._getVerifiedStorageObject(a.LocalStorage)),We._canUseLocalStorage},We.getStorage=function(e,t){var n=We._getLocalStorageObject();if(null!==n)try{return n.getItem(t)}catch(r){We._canUseLocalStorage=!1,e.throwInternal(G.WARNING,K.BrowserCannotReadLocalStorage,"Browser failed read of local storage. "+We.getExceptionName(r),{exception:We.dump(r)})}return null},We.setStorage=function(e,t,n){var r=We._getLocalStorageObject();if(null!==r)try{return r.setItem(t,n),!0}catch(i){We._canUseLocalStorage=!1,e.throwInternal(G.WARNING,K.BrowserCannotWriteLocalStorage,"Browser failed write to local storage. "+We.getExceptionName(i),{exception:We.dump(i)})}return!1},We.removeStorage=function(e,t){var n=We._getLocalStorageObject();if(null!==n)try{return n.removeItem(t),!0}catch(r){We._canUseLocalStorage=!1,e.throwInternal(G.WARNING,K.BrowserFailedRemovalFromLocalStorage,"Browser failed removal of local storage item. "+We.getExceptionName(r),{exception:We.dump(r)})}return!1},We._getSessionStorageObject=function(){return We.canUseSessionStorage()?We._getVerifiedStorageObject(a.SessionStorage):null},We.canUseSessionStorage=function(){return We._canUseSessionStorage===undefined&&(We._canUseSessionStorage=!!We._getVerifiedStorageObject(a.SessionStorage)),We._canUseSessionStorage},We.getSessionStorageKeys=function(){var e=[];if(We.canUseSessionStorage())for(var t in m("sessionStorage"))e.push(t);return e},We.getSessionStorage=function(e,t){var n=We._getSessionStorageObject();if(null!==n)try{return n.getItem(t)}catch(r){We._canUseSessionStorage=!1,e.throwInternal(G.WARNING,K.BrowserCannotReadSessionStorage,"Browser failed read of session storage. "+We.getExceptionName(r),{exception:We.dump(r)})}return null},We.setSessionStorage=function(e,t,n){var r=We._getSessionStorageObject();if(null!==r)try{return r.setItem(t,n),!0}catch(i){We._canUseSessionStorage=!1,e.throwInternal(G.WARNING,K.BrowserCannotWriteSessionStorage,"Browser failed write to session storage. "+We.getExceptionName(i),{exception:We.dump(i)})}return!1},We.removeSessionStorage=function(e,t){var n=We._getSessionStorageObject();if(null!==n)try{return n.removeItem(t),!0}catch(r){We._canUseSessionStorage=!1,e.throwInternal(G.WARNING,K.BrowserFailedRemovalFromSessionStorage,"Browser failed removal of session storage item. "+We.getExceptionName(r),{exception:We.dump(r)})}return!1},We.disableCookies=function(){P.disableCookies()},We.canUseCookies=function(e){if(P._canUseCookies===undefined){P._canUseCookies=!1;try{P._canUseCookies=We.document.cookie!==undefined}catch(t){e.throwInternal(G.WARNING,K.CannotAccessCookie,"Cannot access document.cookie - "+We.getExceptionName(t),{exception:We.dump(t)})}}return P._canUseCookies},We.disallowsSameSiteNone=function(e){return!!ze(e)&&(-1!==e.indexOf("CPU iPhone OS 12")||-1!==e.indexOf("iPad; CPU OS 12")||-1!==e.indexOf("Macintosh; Intel Mac OS X 10_14")&&-1!==e.indexOf("Version/")&&-1!==e.indexOf("Safari")||!(-1===e.indexOf("Macintosh; Intel Mac OS X 10_14")||!function i(e,t){var n=e.length,r=n-t.length;return e.substring(0<=r?r:0,n)===t}(e,"AppleWebKit/605.1.15 (KHTML, like Gecko)"))||-1!==e.indexOf("Chrome/5")||-1!==e.indexOf("Chrome/6")||-1!==e.indexOf("UnrealEngine")&&-1===e.indexOf("Chrome")||-1!==e.indexOf("UCBrowser/12")||-1!==e.indexOf("UCBrowser/11"))},We.setCookie=function(e,t,n,r){if(We.canUseCookies(e)){var i="",a="";r&&(i=";domain="+r);var o=H();o&&"https:"===o.protocol&&(a=";secure",null===Ge&&(Ge=We.disallowsSameSiteNone((S()||{}).userAgent)),Ge||(n+=";SameSite=None")),We.document.cookie=t+"="+n+i+";path=/"+a}},We.stringToBoolOrDefault=function(e,t){return void 0===t&&(t=!1),e===undefined||null===e?t:"true"===e.toString().toLowerCase()},We.getCookie=function(e,t){if(We.canUseCookies(e)){var n="";if(t&&t.length)for(var r=t+"=",i=We.document.cookie.split(";"),a=0;a<i.length;a++){var o=i[a];if((o=We.trim(o))&&0===o.indexOf(r)){n=o.substring(r.length,i[a].length);break}}return n}},We.deleteCookie=function(e,t){We.canUseCookies(e)&&(We.document.cookie=t+"=;path=/;expires=Thu, 01 Jan 1970 00:00:01 GMT;")},We.trim=function(e){return ze(e)?e.replace(/^\s+|\s+$/g,""):e},We.newId=function(){for(var e="",t=1073741824*Math.random();0<t;)e+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(t%64),t=Math.floor(t/64);return e},We.random32=function(){return 4294967296*Math.random()|0},We.generateW3CId=function(){for(var e,t=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"],n="",r=0;r<4;r++)n+=t[15&(e=We.random32())]+t[e>>4&15]+t[e>>8&15]+t[e>>12&15]+t[e>>16&15]+t[e>>20&15]+t[e>>24&15]+t[e>>28&15];var i=t[8+4*Math.random()|0];return n.substr(0,8)+n.substr(9,4)+"4"+n.substr(13,3)+i+n.substr(16,3)+n.substr(19,12)},We.isArray=function(e){return"[object Array]"===Object[F].toString.call(e)},We.isError=function(e){return"[object Error]"===Object[F].toString.call(e)},We.getIEVersion=function(e){void 0===e&&(e=null);var t=e?e.toLowerCase():Pe?(Pe.userAgent||"").toLowerCase():"";return-1!==t.indexOf("msie")?parseInt(t.split("msie")[1]):null},We.msToTimeSpan=function(e){(isNaN(e)||e<0)&&(e=0);var t=""+(e=Math.round(e))%1e3,n=""+Math.floor(e/1e3)%60,r=""+Math.floor(e/6e4)%60,i=""+Math.floor(e/36e5)%24,a=Math.floor(e/864e5);return t=1===t.length?"00"+t:2===t.length?"0"+t:t,n=n.length<2?"0"+n:n,r=r.length<2?"0"+r:r,(0<a?a+".":"")+(i=i.length<2?"0"+i:i)+":"+r+":"+n+"."+t},We.isCrossOriginError=function(e,t,n,r,i){return("Script error."===e||"Script error"===e)&&!i},We.dump=function(e){var t=Object[F].toString.call(e),n="";return"[object Error]"===t?n="{ stack: '"+e.stack+"', message: '"+e.message+"', name: '"+e.name+"'":C()&&(n=I().stringify(e)),t+n},We.getExceptionName=function(e){return"[object Error]"===Object[F].toString.call(e)?e.name:""},We.addEventHandler=function(e,t){return X.Attach(y(),e,t)},We.IsBeaconApiSupported=function(){return"sendBeacon"in Pe&&Pe.sendBeacon},We.getExtension=function(e,t){for(var n=null,r=0;!n&&r<e.length;)e[r]&&e[r].identifier===t&&(n=e[r]),r++;return n},We.document=x()||{},We._canUseLocalStorage=undefined,We._canUseSessionStorage=undefined,We._internalEndpoints=["https://dc.services.visualstudio.com/v2/track","https://breeze.aimon.applicationinsights.io/v2/track","https://dc-int.services.visualstudio.com/v2/track"],We.NotSpecified="not_specified",We.isDate=P.isDate,We.toISOStringForIE8=P.toISOString,We);function We(){}var Xe=(Ve.parseUrl=function(e){return Ve.htmlAnchorElement||(Ve.htmlAnchorElement=Ve.document.createElement?Ve.document.createElement("a"):{host:Ve.parseHost(e)}),Ve.htmlAnchorElement.href=e,Ve.htmlAnchorElement},Ve.getAbsoluteUrl=function(e){var t,n=Ve.parseUrl(e);return n&&(t=n.href),t},Ve.getPathName=function(e){var t,n=Ve.parseUrl(e);return n&&(t=n.pathname),t},Ve.getCompleteUrl=function(e,t){return e?e.toUpperCase()+" "+t:t},Ve.parseHost=function(e){if(e){var t=e.match(/:\/\/(www[0-9]?\.)?(.[^/:]+)/i);if(null!=t&&2<t.length&&ze(t[2])&&0<t[2].length)return t[2]}return null},Ve.document=x()||{},Ve);function Ve(){}var Ke=(Qe.canIncludeCorrelationHeader=function(e,t,n){if(e&&e.disableCorrelationHeaders)return!1;if(!t)return!1;var r=Xe.parseUrl(t).host.toLowerCase();if(!(e&&e.enableCorsCorrelation||r===n))return!1;var i,a=e&&e.correlationHeaderDomains;if(a&&(P.arrForEach(a,function(e){var t=new RegExp(e.toLowerCase().replace(/\./g,".").replace(/\*/g,".*"));i=i||t.test(r)}),!i))return!1;var o=e&&e.correlationHeaderExcludedDomains;if(!o||0===o.length)return!0;for(var s=0;s<o.length;s++)if(new RegExp(o[s].toLowerCase().replace(/\./g,".").replace(/\*/g,".*")).test(r))return!1;return r&&0<r.length},Qe.getCorrelationContext=function(e){if(e){var t=Qe.getCorrelationContextValue(e,Oe.requestContextTargetKey);if(t&&t!==Qe.correlationIdPrefix)return t}},Qe.getCorrelationContextValue=function(e,t){if(e)for(var n=e.split(","),r=0;r<n.length;++r){var i=n[r].split("=");if(2===i.length&&i[0]===t)return i[1]}},Qe.correlationIdPrefix="cid-v1:",Qe);function Qe(){}var $e=(Je.ParseDependencyPath=function(e,t,n,r){var i,a=r,o=r;if(t&&0<t.length){var s=Xe.parseUrl(t);if(i=s.host,!a)if(null!=s.pathname){var u=0===s.pathname.length?"/":s.pathname;"/"!==u.charAt(0)&&(u="/"+u),o=s.pathname,a=je.sanitizeString(e,n?n+" "+u:u)}else a=je.sanitizeString(e,t)}else a=i=r;return{target:i,name:a,data:o}},Je);function Je(){}var Ye=(Ze.Now=function(){var e=j();return e&&e.now&&e.timing?e.now()+e.timing.navigationStart:(new Date).getTime()},Ze.GetDuration=function(e,t){var n=null;return 0===e||0===t||P.isNullOrUndefined(e)||P.isNullOrUndefined(t)||(n=t-e),n},Ze);function Ze(){}var et,tt="Microsoft_ApplicationInsights_BypassAjaxInstrumentation",nt=(t(rt,et=function or(){}),rt);function rt(){return et.call(this)||this}var it;t(at,it=function sr(){this.ver=1,this.sampleRate=100,this.tags={}});function at(e,t,n){var r=it.call(this)||this;return r.name=je.sanitizeString(e,n)||Be.NotSpecified,r.data=t,r.time=P.toISOString(new Date),r.aiDataContract={time:g.Required,iKey:g.Required,name:g.Required,sampleRate:function(){return 100===r.sampleRate?g.Hidden:g.Required},tags:g.Required,data:g.Required},r}var ot,st=function ur(){},ut=(t(lt,ot=st),lt);function lt(){var e=ot.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}var ct;t(ft,ct=ut),ft.envelopeType="Microsoft.ApplicationInsights.{0}.Event",ft.dataType="EventData";function ft(e,t,n,r){var i=ct.call(this)||this;return i.aiDataContract={ver:g.Required,name:g.Required,properties:g.Default,measurements:g.Default},i.name=je.sanitizeString(e,t)||Be.NotSpecified,i.properties=je.sanitizeProperties(e,n),i.measurements=je.sanitizeMeasurements(e,r),i}var dt,pt=function lr(){},gt=(t(ht,dt=st),ht);function ht(){var e=dt.call(this)||this;return e.ver=2,e.exceptions=[],e.properties={},e.measurements={},e}var mt,vt=function cr(){this.hasFullStack=!0,this.parsedStack=[]};t(yt,mt=gt),yt.CreateFromInterface=function(t,e){var n=e.exceptions&&P.arrMap(e.exceptions,function(e){return St.CreateFromInterface(t,e)});return new yt(t,s({},e,{exceptions:n}))},yt.prototype.toInterface=function(){var e=this,t=e.exceptions,n=e.properties,r=e.measurements,i=e.severityLevel,a=(e.ver,e.problemGroup),o=e.id,s=e.isManual;return{ver:"4.0",exceptions:t instanceof Array&&P.arrMap(t,function(e){return e.toInterface()})||undefined,severityLevel:i,properties:n,measurements:r,problemGroup:a,id:o,isManual:s}},yt.CreateSimpleException=function(e,t,n,r,i,a){return{exceptions:[{hasFullStack:!0,message:e,stack:i,typeName:t}]}},yt.envelopeType="Microsoft.ApplicationInsights.{0}.Exception",yt.dataType="ExceptionData";function yt(e,t,n,r,i,a){var o=mt.call(this)||this;return o.aiDataContract={ver:g.Required,exceptions:g.Required,severityLevel:g.Default,properties:g.Default,measurements:g.Default},t instanceof Error?(o.exceptions=[new St(e,t)],o.properties=je.sanitizeProperties(e,n),o.measurements=je.sanitizeMeasurements(e,r),i&&(o.severityLevel=i),a&&(o.id=a)):(o.exceptions=t.exceptions,o.properties=t.properties,o.measurements=t.measurements,t.severityLevel&&(o.severityLevel=t.severityLevel),t.id&&(o.id=t.id),t.problemGroup&&(o.problemGroup=t.problemGroup),o.ver=2,P.isNullOrUndefined(t.isManual)||(o.isManual=t.isManual)),o}var xt,St=(t(Ct,xt=vt),Ct.prototype.toInterface=function(){var e=this.parsedStack instanceof Array&&P.arrMap(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.stack,parsedStack:e||undefined}},Ct.CreateFromInterface=function(e,t){var n=t.parsedStack instanceof Array&&P.arrMap(t.parsedStack,function(e){return Tt.CreateFromInterface(e)})||t.parsedStack;return new Ct(e,s({},t,{parsedStack:n}))},Ct.parseStack=function(e){var t;if(P.isString(e)){var n=e.split("\n");t=[];for(var r=0,i=0,a=0;a<=n.length;a++){var o=n[a];if(Tt.regex.test(o)){var s=new Tt(n[a],r++);i+=s.sizeInBytes,t.push(s)}}if(32768<i)for(var u=0,l=t.length-1,c=0,f=u,d=l;u<l;){if(32768<(c+=t[u].sizeInBytes+t[l].sizeInBytes)){var p=d-f+1;t.splice(f,p);break}f=u,d=l,u++,l--}}return t},Ct);function Ct(e,t){var n=xt.call(this)||this;if(n.aiDataContract={id:g.Default,outerId:g.Default,typeName:g.Required,message:g.Required,hasFullStack:g.Default,stack:g.Default,parsedStack:g.Array},t instanceof Error){n.typeName=je.sanitizeString(e,t.name)||Be.NotSpecified,n.message=je.sanitizeMessage(e,t.message)||Be.NotSpecified;var r=t.stack;n.parsedStack=Ct.parseStack(r),n.stack=je.sanitizeException(e,r),n.hasFullStack=Be.isArray(n.parsedStack)&&0<n.parsedStack.length}else n.typeName=t.typeName,n.message=t.message,n.stack=t.stack,n.parsedStack=t.parsedStack,n.hasFullStack=t.hasFullStack;return n}var It,Tt=(t(bt,It=pt),bt.CreateFromInterface=function(e){return new bt(e,null)},bt.prototype.toInterface=function(){return{level:this.level,method:this.method,assembly:this.assembly,fileName:this.fileName,line:this.line}},bt.regex=/^([\s]+at)?(.*?)(\@|\s\(|\s)([^\(\@\n]+):([0-9]+):([0-9]+)(\)?)$/,bt.baseSize=58,bt);function bt(e,t){var n=It.call(this)||this;if(n.sizeInBytes=0,n.aiDataContract={level:g.Required,method:g.Required,assembly:g.Default,fileName:g.Default,line:g.Default},"string"==typeof e){var r=e;n.level=t,n.method="<no_method>",n.assembly=Be.trim(r),n.fileName="",n.line=0;var i=r.match(bt.regex);i&&5<=i.length&&(n.method=Be.trim(i[2])||n.method,n.fileName=Be.trim(i[4]),n.line=parseInt(i[5])||0)}else n.level=e.level,n.method=e.method,n.assembly=e.assembly,n.fileName=e.fileName,n.line=e.line,n.sizeInBytes=0;return n.sizeInBytes+=n.method.length,n.sizeInBytes+=n.fileName.length,n.sizeInBytes+=n.assembly.length,n.sizeInBytes+=bt.baseSize,n.sizeInBytes+=n.level.toString().length,n.sizeInBytes+=n.line.toString().length,n}var Nt,At,Mt,Dt=(t(wt,Nt=st),wt);function wt(){var e=Nt.call(this)||this;return e.ver=2,e.metrics=[],e.properties={},e.measurements={},e}(Mt=At=At||{})[Mt.Measurement=0]="Measurement",Mt[Mt.Aggregation=1]="Aggregation";var _t,Et=(t(Lt,_t=function fr(){this.kind=At.Measurement}),Lt);function Lt(){var e=null!==_t&&_t.apply(this,arguments)||this;return e.aiDataContract={name:g.Required,kind:g.Default,value:g.Required,count:g.Default,min:g.Default,max:g.Default,stdDev:g.Default},e}var qt;t(Rt,qt=Dt),Rt.envelopeType="Microsoft.ApplicationInsights.{0}.Metric",Rt.dataType="MetricData";function Rt(e,t,n,r,i,a,o,s){var u=qt.call(this)||this;u.aiDataContract={ver:g.Required,metrics:g.Required,properties:g.Default};var l=new Et;return l.count=0<r?r:undefined,l.max=isNaN(a)||null===a?undefined:a,l.min=isNaN(i)||null===i?undefined:i,l.name=je.sanitizeString(e,t)||Be.NotSpecified,l.value=n,u.metrics=[l],u.properties=je.sanitizeProperties(e,o),u.measurements=je.sanitizeMeasurements(e,s),u}var kt,Ft=(t(Ot,kt=ut),Ot);function Ot(){var e=kt.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}var Ht;t(jt,Ht=Ft),jt.envelopeType="Microsoft.ApplicationInsights.{0}.Pageview",jt.dataType="PageviewData";function jt(e,t,n,r,i,a,o){var s=Ht.call(this)||this;return s.aiDataContract={ver:g.Required,name:g.Default,url:g.Default,duration:g.Default,properties:g.Default,measurements:g.Default,id:g.Default},s.id=je.sanitizeId(e,o),s.url=je.sanitizeUrl(e,n),s.name=je.sanitizeString(e,t)||Be.NotSpecified,isNaN(r)||(s.duration=Be.msToTimeSpan(r)),s.properties=je.sanitizeProperties(e,i),s.measurements=je.sanitizeMeasurements(e,a),s}var Ut,Pt=(t(zt,Ut=st),zt);function zt(){var e=Ut.call(this)||this;return e.ver=2,e.success=!0,e.properties={},e.measurements={},e}var Gt,Bt=(t(Wt,Gt=Pt),Wt.envelopeType="Microsoft.ApplicationInsights.{0}.RemoteDependency",Wt.dataType="RemoteDependencyData",Wt);function Wt(e,t,n,r,i,a,o,s,u,l,c,f){void 0===u&&(u="Ajax");var d=Gt.call(this)||this;d.aiDataContract={id:g.Required,ver:g.Required,name:g.Default,resultCode:g.Default,duration:g.Default,success:g.Default,data:g.Default,target:g.Default,type:g.Default,properties:g.Default,measurements:g.Default,kind:g.Default,value:g.Default,count:g.Default,min:g.Default,max:g.Default,stdDev:g.Default,dependencyKind:g.Default,dependencySource:g.Default,commandName:g.Default,dependencyTypeName:g.Default},d.id=t,d.duration=Be.msToTimeSpan(i),d.success=a,d.resultCode=o+"",d.type=je.sanitizeString(e,u);var p=$e.ParseDependencyPath(e,n,s,r);return d.data=je.sanitizeUrl(e,r)||p.data,d.target=je.sanitizeString(e,p.target),l&&(d.target=d.target+" | "+l),d.name=je.sanitizeString(e,p.name),d.properties=je.sanitizeProperties(e,c),d.measurements=je.sanitizeMeasurements(e,f),d}var Xt,Vt=(t(Kt,Xt=st),Kt);function Kt(){var e=Xt.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}var Qt;t($t,Qt=Vt),$t.envelopeType="Microsoft.ApplicationInsights.{0}.Message",$t.dataType="MessageData";function $t(e,t,n,r,i){var a=Qt.call(this)||this;return a.aiDataContract={ver:g.Required,message:g.Required,severityLevel:g.Default,properties:g.Default},t=t||Be.NotSpecified,a.message=je.sanitizeMessage(e,t),a.properties=je.sanitizeProperties(e,r),a.measurements=je.sanitizeMeasurements(e,i),n&&(a.severityLevel=n),a}var Jt,Yt=(t(Zt,Jt=Ft),Zt);function Zt(){var e=Jt.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}var en;t(tn,en=Yt),tn.envelopeType="Microsoft.ApplicationInsights.{0}.PageviewPerformance",tn.dataType="PageviewPerformanceData";function tn(e,t,n,r,i,a,o){var s=en.call(this)||this;return s.aiDataContract={ver:g.Required,name:g.Default,url:g.Default,duration:g.Default,perfTotal:g.Default,networkConnect:g.Default,sentRequest:g.Default,receivedResponse:g.Default,domProcessing:g.Default,properties:g.Default,measurements:g.Default},s.url=je.sanitizeUrl(e,n),s.name=je.sanitizeString(e,t)||Be.NotSpecified,s.properties=je.sanitizeProperties(e,i),s.measurements=je.sanitizeMeasurements(e,a),o&&(s.domProcessing=o.domProcessing,s.duration=o.duration,s.networkConnect=o.networkConnect,s.perfTotal=o.perfTotal,s.receivedResponse=o.receivedResponse,s.sentRequest=o.sentRequest),s}var nn,rn,an;t(on,nn=nt);function on(e,t){var n=nn.call(this)||this;return n.aiDataContract={baseType:g.Required,baseData:g.Required},n.baseType=e,n.baseData=t,n}(an=rn=rn||{})[an.Verbose=0]="Verbose",an[an.Information=1]="Information",an[an.Warning=2]="Warning",an[an.Error=3]="Error",an[an.Critical=4]="Critical";var sn=(un.create=function(e,t,n,r,i,a){if(n=je.sanitizeString(r,n)||Be.NotSpecified,P.isNullOrUndefined(e)||P.isNullOrUndefined(t)||P.isNullOrUndefined(n))throw Error("Input doesn't contain all required fields");var o={name:n,time:P.toISOString(new Date),iKey:"",ext:a||{},tags:[],data:{},baseType:t,baseData:e};if(!P.isNullOrUndefined(i))for(var s in i)i.hasOwnProperty(s)&&(o.data[s]=i[s]);return o},un);function un(){}var ln="constructor",cn="prototype",fn="function",dn="_dynInstFuncs",pn="_isDynProxy",gn="_dynClass",hn="_dynCls$",mn="_unknown_",vn="__proto__",yn=Object.getPrototypeOf,xn=0;function Sn(e,t){return e&&Object[cn].hasOwnProperty.call(e,t)}function Cn(e){return typeof e===fn}function In(e){return e&&(e===Object[cn]||e===Array[cn])}function Tn(e){return In(e)||e===Function[cn]}function bn(e){if(e){if(yn)return yn(e);var t=e[vn]||e[cn]||e[ln];if(t)return t}return null}function Nn(e,t,n){return t!==ln&&Cn(e[t])&&(n||Sn(e,t))}function An(e){throw new TypeError("DynamicProto: "+e)}function Mn(e,t){for(var n=e.length-1;0<=n;n--)if(e[n]===t)return 1}function Dn(e,t){return Sn(e,cn)?e.name||t||mn:((e||{})[ln]||{}).name||t||mn}function wn(e,t,n){Sn(e,cn)||An("theClass is an invalid class definition.");var r=e[cn];!function o(e,t){for(var n=bn(t);n&&!Tn(n);){if(n===e)return 1;n=bn(n)}}(r,t)&&An("["+Dn(e)+"] is not in class heirarchy of ["+Dn(t)+"]");var i=null;Sn(r,gn)?i=r[gn]:(i=hn+Dn(e,"_")+"$"+xn,xn++,r[gn]=i);var a=function s(e){var t={};for(var n in e)!t[n]&&Nn(e,n,!1)&&(t[n]=e[n]);return t}(t);n(t,function u(e,t,n){function r(e,t){return function(){return t.apply(e,arguments)}}var i={};for(var a in n)i[a]=r(t,n[a]);for(var o=bn(e),s=[];o&&!Tn(o)&&!Mn(s,o);){for(var a in o)!i[a]&&Nn(o,a,!yn)&&(i[a]=r(t,o[a]));s.push(o),o=bn(o)}return i}(r,t,a)),function l(e,t,n,r){function i(n,r){var i=function(){if(this&&Sn(n,gn)){var e=((this[dn]||{})[n[gn]]||{})[r];if(e)return e.apply(this,arguments);An("Missing ["+r+"] "+fn)}var t=n[r];return t===i&&(t=bn(n)[r]),Cn(t)||An("["+r+"] is not a "+fn),t.apply(this,arguments)};return i[pn]=1,i}if(!In(e)){var a=n[dn]=n[dn]||{},o=a[t]=a[t]||{};for(var s in n)Nn(n,s,!1)&&n[s]!==r[s]&&(o[s]=n[s],delete n[s],Sn(e,s)&&(!e[s]||e[s][pn])||(e[s]=i(e,s)))}}(r,i,t,a)}var _n="properties",En=P.objKeys,Ln=P.arrForEach;function qn(e,t,n){var r=0,i=e[t],a=e[n];return i&&a&&(r=Ye.GetDuration(i,a)),r}function Rn(e,t,n,r,i){var a=0,o=qn(n,r,i);return o&&(a=kn(e,t,Be.msToTimeSpan(o))),a}function kn(e,t,n){var r="ajaxPerf",i=0;e&&t&&n&&((e[r]=e[r]||{})[t]=n,i=1);return i}function Fn(e,t){var n=e.perfTiming,r=t[_n]||{},i=0,a=P.isString,o="Start",s="End",u="domainLookup",l="connect",c="redirect",f="request",d="response",p="duration",g="startTime",h=l+s,m=f+o,v=d+s,y=c+o,x=c=s,S="transferSize",C="encodedBodySize",I="decodedBodySize",T="serverTiming";if(n){i|=Rn(r,c,n,y,x),i|=Rn(r,u,n,"domainLookupStart","domainLookupEnd"),i|=Rn(r,l,n,"connectStart",h),i|=Rn(r,f,n,m,"requestEnd"),i|=Rn(r,d,n,"responseStart",v),i|=Rn(r,"networkConnect",n,g,h),i|=Rn(r,"sentRequest",n,m,v);var b=n[p];i|=kn(r,p,b=b||(qn(n,g,v)||0)),i|=kn(r,"perfTotal",b);var N=n[T];if(N){var A={};Ln(N,function(n,e){var t=function i(e){var t=e,n=/([^\w\d_$])/g;return n.test(e)&&(t=e.replace(n,"_")),t}(n.name||""+e),r=A[t]||{};Ln(En(n),function(e){var t=n[e];("name"!==e&&a(t)||P.isNumber(t))&&(r[e]&&(t=r[e]+";"+t),!t&&a(t)||(r[e]=t))}),A[t]=r}),i|=kn(r,T,A)}i|=kn(r,S,n[S]),i|=kn(r,C,n[C]),i|=kn(r,I,n[I])}else e.perfMark&&(i|=kn(r,"missing",e.perfAttempts));i&&(t[_n]=r)}var On=function dr(){var e=this;e.openDone=!1,e.setRequestHeaderDone=!1,e.sendDone=!1,e.abortDone=!1,e.stateChangeAttached=!1},Hn=function pr(e,t,n){var r=this,i=n,l="responseText";r.perfMark=null,r.completed=!1,r.requestHeadersSize=null,r.requestHeaders=null,r.responseReceivingDuration=null,r.callbackDuration=null,r.ajaxTotalDuration=null,r.aborted=0,r.pageUrl=null,r.requestUrl=null,r.requestSize=0,r.method=null,r.status=null,r.requestSentTime=null,r.responseStartedTime=null,r.responseFinishedTime=null,r.callbackFinishedTime=null,r.endTime=null,r.xhrMonitoringState=new On,r.clientFailure=0,r.traceID=e,r.spanID=t,wn(pr,r,function(u){u.getAbsoluteUrl=function(){return u.requestUrl?Xe.getAbsoluteUrl(u.requestUrl):null},u.getPathName=function(){return u.requestUrl?je.sanitizeUrl(i,Xe.getCompleteUrl(u.method,u.requestUrl)):null},u.CreateTrackItem=function(e,t,n){if(u.ajaxTotalDuration=Math.round(1e3*Ye.GetDuration(u.requestSentTime,u.responseFinishedTime))/1e3,u.ajaxTotalDuration<0)return null;var r,i=((r={id:"|"+u.traceID+"."+u.spanID,target:u.getAbsoluteUrl(),name:u.getPathName(),type:e,duration:u.ajaxTotalDuration,success:200<=+u.status&&+u.status<400,responseCode:+u.status,method:u.method})[_n]={HttpMethod:u.method},r);if(Fn(u,i),t&&0<En(u.requestHeaders).length&&(i[_n]=i[_n]||{},i[_n].requestHeaders=u.requestHeaders),n){var a=n();if(a){var o=a.correlationContext;if(o&&(i.correlationContext=o),a.headerMap&&0<En(a.headerMap).length&&(i[_n]=i[_n]||{},i[_n].responseHeaders=a.headerMap),400<=u.status){var s=a.type;i[_n]=i[_n]||{},""!==s&&"text"!==s||(i[_n][l]=a[l]?a.statusText+" - "+a[l]:a.statusText),"json"===s&&(i[_n][l]=a.response?a.statusText+" - "+JSON.stringify(a.response):a.statusText)}}}return i}})},jn=(Un.isValidTraceId=function(e){return e.match(/^[0-9a-f]{32}$/)&&"00000000000000000000000000000000"!==e},Un.isValidSpanId=function(e){return e.match(/^[0-9a-f]{16}$/)&&"0000000000000000"!==e},Un.prototype.toString=function(){return this.version+"-"+this.traceId+"-"+this.spanId+"-"+this.traceFlag},Un.DEFAULT_TRACE_FLAG="01",Un.DEFAULT_VERSION="00",Un);function Un(e,t){var n=this;n.traceFlag=Un.DEFAULT_TRACE_FLAG,n.version=Un.DEFAULT_VERSION,e&&Un.isValidTraceId(e)?n.traceId=e:n.traceId=Be.generateW3CId(),t&&Un.isValidSpanId(t)?n.spanId=t:n.spanId=Be.generateW3CId().substr(0,16)}var Pn="ai.ajxmn.",zn="diagLog",Gn="ajaxData",Bn="throwInternal",Wn="fetch",Xn=P.isNullOrUndefined,Vn=P.arrForEach,Kn=P.objKeys,Qn=0;function $n(e){var t="";try{Xn(e)||Xn(e[Gn])||Xn(e[Gn].requestUrl)||(t+="(url: '"+e[Gn].requestUrl+"')")}catch(n){}return t}function Jn(e,t,n,r,i){e[zn]()[Bn](G.CRITICAL,t,n,r,i)}function Yn(e,t,n,r,i){e[zn]()[Bn](G.WARNING,t,n,r,i)}function Zn(t,n,r){return function(e){Jn(t,n,r,{ajaxDiagnosticsMessage:$n(e.inst),exception:Be.dump(e.err)})}}function er(e,t){return e&&t?e.indexOf(t):-1}var tr,nr=(t(rr,tr=oe),rr.getDefaultConfig=function(){return{maxAjaxCallsPerView:500,disableAjaxTracking:!1,disableFetchTracking:!0,disableCorrelationHeaders:!1,distributedTracingMode:R.AI,correlationHeaderExcludedDomains:["*.blob.core.windows.net","*.blob.core.chinacloudapi.cn","*.blob.core.cloudapi.de","*.blob.core.usgovcloudapi.net"],correlationHeaderDomains:undefined,appId:undefined,enableCorsCorrelation:!1,enableRequestHeaderTracking:!1,enableResponseHeaderTracking:!1,enableAjaxErrorStatusText:!1,enableAjaxPerfTracking:!1,maxAjaxPerfLookupAttempts:3,ajaxPerfLookupDelay:25}},rr.getEmptyConfig=function(){var t=this.getDefaultConfig();return Vn(Kn(t),function(e){t[e]=undefined}),t},rr.prototype.processTelemetry=function(e,t){this.processNext(e,t)},rr.identifier="AjaxDependencyPlugin",rr);function rr(){var e=tr.call(this)||this;e.identifier=rr.identifier,e.priority=120;var C,I,T,b,N="trackDependencyDataInternal",t=H(),A=!1,M=!1,u=t&&t.host&&t.host.toLowerCase(),D=rr.getEmptyConfig(),w=!1,i=0,_=!1,E=0,L=!1,q=[],s={};return wn(rr,e,function(d,p){function g(e,t,n){q.push(function r(e,t,n){return e?Fe(e[F],t,n,!1):null}(e,t,n))}function h(e,t,n){var r=!1,i=((P.isString(t)?t:(t||{}).url||"")||"").toLowerCase(),a=er(i,"?"),o=er(i,"#");return(-1===a||-1!==o&&o<a)&&(a=o),-1!==a&&(i=i.substring(0,a)),Xn(e)?Xn(t)||(r="object"==typeof t&&!0===t[tt]||!!n&&!0===n[tt]):r=!0===e[tt]||!0===i[tt],r?s[i]||(s[i]=1):s[i]&&(r=!0),r}function m(e,t){var n=!0,r=M;return Xn(e)||(n=!0===t||!Xn(e[Gn])),r&&n}function v(e,t){if(t.requestUrl&&b&&_){var n=j();if(n&&P.isFunction(n.mark)){var r=b+e+"#"+ ++Qn;n.mark(r);var i=n.getEntriesByName(r);i&&1===i.length&&(t.perfMark=i[0])}}}function y(a,o,s,u){var l=o.perfMark,c=j(),f=D.maxAjaxPerfLookupAttempts,d=D.ajaxPerfLookupDelay,p=o.requestUrl,g=0;!function h(){try{if(c&&l){g++;for(var e=null,t=c.getEntries(),n=t.length-1;0<=n;n--){var r=t[n];if(r){if("resource"===r.entryType)r.initiatorType!==a||-1===er(r.name,p)&&-1===er(p,r.name)||(e=r);else if("mark"===r.entryType&&r.name===l.name){o.perfTiming=e;break}if(r.startTime<l.startTime-1e3)break}}}!l||o.perfTiming||f<=g||!1===o.async?(l&&P.isFunction(c.clearMarks)&&c.clearMarks(l.name),o.perfAttempts=g,s()):setTimeout(h,d)}catch(i){u(i)}}()}function x(e){var t="";try{Xn(e)||(t+="string"==typeof e?"(url: '"+e+"')":"(url: '"+e.url+"')")}catch(n){Jn(d,K.FailedMonitorAjaxOpen,"Failed to grab failed fetch diagnostics message",{exception:Be.dump(n)})}return t}function S(e,t,i,n,r){function a(e,t,n){var r=n||{};r.fetchDiagnosticsMessage=x(i),t&&(r.exception=Be.dump(t)),Yn(d,e,"Failed to calculate the duration of the fetch call, monitoring data for this fetch call won't be sent.",r)}n&&(n.responseFinishedTime=Ye.Now(),n.status=t,y("fetch",n,function(){var e=n.CreateTrackItem("Fetch",w,r);e?d[N](e):a(K.FailedMonitorAjaxDur,null,{requestSentTime:n.requestSentTime,responseFinishedTime:n.responseFinishedTime})},function(e){a(K.FailedMonitorAjaxGetCorrelationHeader,e,null)}))}d.initialize=function(e,t,n,r){if(!d.isInitialized()){p.initialize(e,t,n,r);var i=d._getTelCtx(),a=rr.getDefaultConfig();Vn(Kn(a),function(e){D[e]=i.getConfig(rr.identifier,e,a[e])});var o=D.distributedTracingMode;if(w=D.enableRequestHeaderTracking,_=D.enableAjaxPerfTracking,E=D.maxAjaxCallsPerView,L=D.enableResponseHeaderTracking,T=o===R.AI||o===R.AI_AND_W3C,I=o===R.AI_AND_W3C||o===R.W3C,_){var s=e.instrumentationKey||"unkwn";b=5<s.length?Pn+s.substring(s.length-5)+".":Pn+s+"."}if(!1===D.disableAjaxTracking&&!function c(){!function a(e){var t=!1;if(typeof XMLHttpRequest!==k&&!Xn(XMLHttpRequest)){var n=XMLHttpRequest[F];t=!(Xn(n)||Xn(n.open)||Xn(n.send)||Xn(n.abort))}if(t)try{(new XMLHttpRequest)[Gn]={};var r=XMLHttpRequest[F].open;XMLHttpRequest[F].open=r}catch(i){t=!1,Jn(e,K.FailedMonitorAjaxOpen,"Failed to enable XMLHttpRequest monitoring, extension is not supported",{exception:Be.dump(i)})}return t}(d)||M||(g(XMLHttpRequest,"open",{req:function(e,t,n,r){var i=e.inst,a=i[Gn];h(i,n)||!m(i,!0)||a&&a.xhrMonitoringState.openDone||!function u(e,t,n,r){var i=C&&C.telemetryTrace&&C.telemetryTrace.traceID||Be.generateW3CId(),a=Be.generateW3CId().substr(0,16),o=new Hn(i,a,d[zn]());o.method=t,o.requestUrl=n,o.xhrMonitoringState.openDone=!0,o.requestHeaders={},o.async=r,e[Gn]=o,function s(r){r[Gn].xhrMonitoringState.stateChangeAttached=X.Attach(r,"readystatechange",function(){try{r&&4===r.readyState&&m(r)&&!function t(o){var n=o[Gn];function r(e,t){var n=t||{};n.ajaxDiagnosticsMessage=$n(o),e&&(n.exception=Be.dump(e)),Yn(d,K.FailedMonitorAjaxDur,"Failed to calculate the duration of the ajax call, monitoring data for this ajax call won't be sent.",n)}n.responseFinishedTime=Ye.Now(),n.status=o.status,y("xmlhttprequest",n,function(){try{var e=n.CreateTrackItem("Ajax",w,function(){var e={statusText:o.statusText,headerMap:null,correlationContext:function a(e){try{var t=e.getAllResponseHeaders();if(null!==t)if(-1!==er(t.toLowerCase(),Oe.requestContextHeaderLowerCase)){var n=e.getResponseHeader(Oe.requestContextHeader);return Ke.getCorrelationContext(n)}}catch(r){Yn(d,K.FailedMonitorAjaxGetCorrelationHeader,"Failed to get Request-Context correlation header as it may be not included in the response or not accessible.",{ajaxDiagnosticsMessage:$n(e),exception:Be.dump(r)})}}(o),type:o.responseType,responseText:function r(e){try{var t=e.responseType;if(""===t||"text"===t)return e.responseText}catch(n){}return null}(o),response:o.response};if(L){var t=o.getAllResponseHeaders();if(t){var n=t.trim().split(/[\r\n]+/),i={};Vn(n,function(e){var t=e.split(": "),n=t.shift(),r=t.join(": ");i[n]=r}),e.headerMap=i}}return e});e?d[N](e):r(null,{requestSentTime:n.requestSentTime,responseFinishedTime:n.responseFinishedTime})}finally{try{o[Gn]=null}catch(t){}}},function(e){r(e,null)})}(r)}catch(n){var e=Be.dump(n);e&&-1!==er(e.toLowerCase(),"c00c023f")||Jn(d,K.FailedMonitorAjaxRSC,"Failed to monitor XMLHttpRequest 'readystatechange' event handler, monitoring data for this ajax call may be incorrect.",{ajaxDiagnosticsMessage:$n(r),exception:e})}})}(e)}(i,t,n,r)},hkErr:Zn(d,K.FailedMonitorAjaxOpen,"Failed to monitor XMLHttpRequest.open, monitoring data for this ajax call may be incorrect.")}),g(XMLHttpRequest,"send",{req:function(e,t){var n=e.inst,r=n[Gn];m(n)&&!r.xhrMonitoringState.sendDone&&(v("xhr",r),r.requestSentTime=Ye.Now(),n=d.includeCorrelationHeaders(r,undefined,undefined,n),r.xhrMonitoringState.sendDone=!0)},hkErr:Zn(d,K.FailedMonitorAjaxSend,"Failed to monitor XMLHttpRequest, monitoring data for this ajax call may be incorrect.")}),g(XMLHttpRequest,"abort",{req:function(e){var t=e.inst,n=t[Gn];m(t)&&!n.xhrMonitoringState.abortDone&&(n.aborted=1,n.xhrMonitoringState.abortDone=!0)},hkErr:Zn(d,K.FailedMonitorAjaxAbort,"Failed to monitor XMLHttpRequest.abort, monitoring data for this ajax call may be incorrect.")}),w&&g(XMLHttpRequest,"setRequestHeader",{req:function(e,t,n){var r=e.inst;m(r)&&(r[Gn].requestHeaders[t]=n)},hkErr:Zn(d,K.FailedMonitorAjaxSetRequestHeader,"Failed to monitor XMLHttpRequest.setRequestHeader, monitoring data for this ajax call may be incorrect.")}),M=!0)}(),function f(){var e=function n(){var e=O();return!e||Xn(e.Request)||Xn(e.Request[F])||Xn(e[Wn])?null:e[Wn]}();if(!e)return;var t=O(),o=e.polyfill;!1===D.disableFetchTracking?(q.push(Fe(t,Wn,{req:function(e,t,n){var r;if(A&&!h(null,t,n)&&(!o||!M)){var i=e.ctx();r=function s(e,t){var n=C&&C.telemetryTrace&&C.telemetryTrace.traceID||Be.generateW3CId(),r=Be.generateW3CId().substr(0,16),i=new Hn(n,r,d[zn]());i.requestSentTime=Ye.Now(),e instanceof Request?i.requestUrl=e?e.url:"":i.requestUrl=e;var a="GET";t&&t.method?a=t.method:e&&e instanceof Request&&(a=e.method);i.method=a;var o={};if(w){new Headers((t?t.headers:0)||e instanceof Request&&e.headers||{}).forEach(function(e,t){o[t]=e})}return i.requestHeaders=o,v("fetch",i),i}(t,n);var a=d.includeCorrelationHeaders(r,t,n);a!==n&&e.set(1,a),i.data=r}},rsp:function(e,t){var n=e.ctx().data;n&&(e.rslt=e.rslt.then(function(t){return S(0,(t||{}).status,t,n,function(){var e={statusText:t.statusText,headerMap:null,correlationContext:function r(e){if(e&&e.headers)try{var t=e.headers.get(Oe.requestContextHeader);return Ke.getCorrelationContext(t)}catch(n){Yn(d,K.FailedMonitorAjaxGetCorrelationHeader,"Failed to get Request-Context correlation header as it may be not included in the response or not accessible.",{fetchDiagnosticsMessage:x(e),exception:Be.dump(n)})}}(t)};if(L){var n={};t.headers.forEach(function(e,t){n[t]=e}),e.headerMap=n}return e}),t})["catch"](function(e){throw S(0,0,t,n,null,e.message),e}))},hkErr:Zn(d,K.FailedMonitorAjaxOpen,"Failed to monitor Window.fetch, monitoring data for this fetch call may be incorrect.")})),A=!0):o&&q.push(Fe(t,Wn,{req:function(e,t,n){h(null,t,n)}}));o&&(t[Wn].polyfill=o)}(),0<n.length&&n){for(var u=void 0,l=0;!u&&l<n.length;)n[l]&&"AppInsightsPropertiesPlugin"===n[l].identifier&&(u=n[l]),l++;u&&(C=u.context)}}},d.teardown=function(){Vn(q,function(e){e.rm()}),M=A=!(q=[]),d.setInitialized(!1)},d.trackDependencyData=function(e,t){d[N](e,t)},d.includeCorrelationHeaders=function(e,t,n,r){var i=d._currentWindowHost||u;if(t){if(Ke.canIncludeCorrelationHeader(D,e.getAbsoluteUrl(),i)){if((n=n||{}).headers=new Headers(n.headers||t instanceof Request&&t.headers||{}),T){var a="|"+e.traceID+"."+e.spanID;n.headers.set(Oe.requestIdHeader,a),w&&(e.requestHeaders[Oe.requestIdHeader]=a)}if((s=D.appId||C&&C.appId())&&(n.headers.set(Oe.requestContextHeader,Oe.requestContextAppIdFormat+s),w&&(e.requestHeaders[Oe.requestContextHeader]=Oe.requestContextAppIdFormat+s)),I){var o=new jn(e.traceID,e.spanID);n.headers.set(Oe.traceParentHeader,o.toString()),w&&(e.requestHeaders[Oe.traceParentHeader]=o.toString())}}return n}if(r){if(Ke.canIncludeCorrelationHeader(D,e.getAbsoluteUrl(),i)){if(T){a="|"+e.traceID+"."+e.spanID;r.setRequestHeader(Oe.requestIdHeader,a),w&&(e.requestHeaders[Oe.requestIdHeader]=a)}var s;if((s=D.appId||C&&C.appId())&&(r.setRequestHeader(Oe.requestContextHeader,Oe.requestContextAppIdFormat+s),w&&(e.requestHeaders[Oe.requestContextHeader]=Oe.requestContextAppIdFormat+s)),I){o=new jn(e.traceID,e.spanID);r.setRequestHeader(Oe.traceParentHeader,o.toString()),w&&(e.requestHeaders[Oe.traceParentHeader]=o.toString())}}return r}return undefined},d[N]=function(e,t,n){if(-1===E||i<E){D.distributedTracingMode!==R.W3C&&D.distributedTracingMode!==R.AI_AND_W3C||"string"!=typeof e.id||"."===e.id[e.id.length-1]||(e.id+=".");var r=sn.create(e,Bt.dataType,Bt.envelopeType,d[zn](),t,n);d.core.track(r)}else i===E&&Jn(d,K.MaxAjaxPerPVExceeded,"Maximum ajax per page view limit reached, ajax monitoring is paused until the next trackPageView(). In order to increase the limit set the maxAjaxCallsPerView configuration parameter.",!0);++i}}),e}e.AjaxPlugin=nr,e.ajaxRecord=Hn,function(e,t,n){var r=Object.defineProperty;if(r)try{return r(e,t,n)}catch(i){}typeof n.value!==undefined&&(e[t]=n.value)}(e,"__esModule",{value:!0})}); | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e.Microsoft=e.Microsoft||{},e.Microsoft.ApplicationInsights={}))}(this,function(e){"use strict";var i="function",a="object",t="undefined",o="prototype",s="hasOwnProperty";function n(){return typeof globalThis!==t&&globalThis?globalThis:typeof self!==t&&self?self:typeof window!==t&&window?window:typeof global!==t&&global?global:null}function r(e){var t=Object.create;if(t)return t(e);if(null==e)return{};var n=typeof e;if(n!==a&&n!==i)throw new TypeError("Object prototype may only be an Object:"+e);function r(){}return r[o]=e,new r}function u(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object[o][s].call(t,i)&&(e[i]=t[i]);return e}var l=function(e,t){return(l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t[s](n)&&(e[n]=t[n])})(e,t)};var c,d,f,p,g,h,L,m,v=n()||{};d=function(e,t){function n(){this.constructor=e}l(e,t),e[o]=null===t?r(t):(n[o]=t[o],new n)},(c=v).__assign=c.__assign||Object.assign||u,c.__extends=c.__extends||d,__assign=v.__assign,__extends=v.__extends,(p=f=f||{})[p.LocalStorage=0]="LocalStorage",p[p.SessionStorage=1]="SessionStorage",(h=g=g||{})[h.Default=0]="Default",h[h.Required=1]="Required",h[h.Array=2]="Array",h[h.Hidden=4]="Hidden",(m=L=L||{})[m.AI=0]="AI",m[m.AI_AND_W3C=1]="AI_AND_W3C",m[m.W3C=2]="W3C";var x=2,R=t,y=a,q=o,S=i,I="window",C="location",T="performance",_="JSON",b="crypto",k=n;function N(e){var t=k();return t&&t[e]?t[e]:e===I&&A()?window:null}function A(){return Boolean(typeof window===y&&window)}function M(){return A()?window:N(I)}function D(){return Boolean(typeof document===y&&document)?document:N("document")}function w(){return Boolean(typeof navigator===y&&navigator)?navigator:N("navigator")}function F(){return typeof location===y&&location?location:N(C)}function H(){return N(T)}function E(){return Boolean(typeof JSON===y&&JSON||null!==N(_))}function O(){return E()?JSON||N(_):null}var U="attachEvent",j="addEventListener",P="detachEvent",z="removeEventListener";function G(e,t){return typeof e===t}function B(e){return G(e,t)||e===undefined}function W(e){return B(e)||null===e}function X(e,t){return e&&Object[o].hasOwnProperty.call(e,t)}function V(e){return G(e,a)}function K(e){return G(e,i)}function Q(e,t,n,r){void 0===r&&(r=!1);var i=!1;if(!W(e))try{W(e[j])?W(e[U])||(e[U]("on"+t,n),i=!0):(e[j](t,n,r),i=!0)}catch(a){}return i}function $(e,t,n,r){if(void 0===r&&(r=!1),!W(e))try{W(e[z])?W(e[P])||e[P]("on"+t,n):e[z](t,n,r)}catch(i){}}var J=(Y.isDate=function(e){return"[object Date]"===Object[o].toString.call(e)},Y.isString=function(e){return G(e,"string")},Y.isNumber=function(e){return G(e,"number")},Y.isBoolean=function(e){return G(e,"boolean")},Y.disableCookies=function(){Y._canUseCookies=!1},Y.newGuid=function(){function n(){var e=N(b);return e?e.getRandomValues(new Uint8Array(1))[0]%16:16*Math.random()}return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(te,function(e){var t=0|n();return("x"===e?t:3&t|8).toString(16)})},Y.toISOString=function(e){if(Y.isDate(e)){var t=function(e){var t=String(e);return 1===t.length&&(t="0"+t),t};return e.getUTCFullYear()+"-"+t(e.getUTCMonth()+1)+"-"+t(e.getUTCDate())+"T"+t(e.getUTCHours())+":"+t(e.getUTCMinutes())+":"+t(e.getUTCSeconds())+"."+String((e.getUTCMilliseconds()/1e3).toFixed(3)).slice(2,5)+"Z"}},Y.arrForEach=function(e,t,n){for(var r=e.length,i=0;i<r;++i)i in e&&t.call(n||e,e[i],i,e)},Y.arrIndexOf=function(e,t,n){for(var r=e.length,i=n||0,a=Math.max(0<=i?i:r-Math.abs(i),0);a<r;a++)if(a in e&&e[a]===t)return a;return-1},Y.arrMap=function(e,t,n){for(var r=e.length,i=n||e,a=new Array(r),o=0;o<r;o++)o in e&&(a[o]=t.call(i,e[o],e));return a},Y.arrReduce=function(e,t,n){var r,i=e.length,a=0;if(3<=arguments.length)r=n;else{for(;a<i&&!(a in e);)a++;r=e[a++]}for(;a<i;)a in e&&(r=t(r,e[a],a,e)),a++;return r},Y.strTrim=function(e){return Y.isString(e)?e.replace(/^\s+|\s+$/g,""):e},Y.objKeys=function(e){var t=!{toString:null}.propertyIsEnumerable("toString");if(!(K(e)||V(e)&&null!==e))throw new TypeError("objKeys called on non-object");var n=[];for(var r in e)X(e,r)&&n.push(r);if(t)for(var i=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],a=i.length,o=0;o<a;o++)X(e,i[o])&&n.push(i[o]);return n},Y.objDefineAccessors=function(e,t,n,r){var i=Object.defineProperty;if(i)try{var a={enumerable:!0,configurable:!0};return n&&(a.get=n),r&&(a.set=r),i(e,t,a),!0}catch(o){}return!1},Y.addEventHandler=function(e,t){var n=!1,r=M();r&&(n=Q(r,e,t),n=Q(r.body,e,t)||n);var i=D();return i&&(n=ne.Attach(i,e,t)||n),n},Y.isTypeof=G,Y.isUndefined=B,Y.isNullOrUndefined=W,Y.hasOwnProperty=X,Y.isFunction=K,Y.isObject=V,Y.objCreate=r,Y);function Y(){}var Z,ee,te=/[xy]/g,ne=(re.Attach=Q,re.AttachEvent=Q,re.Detach=$,re.DetachEvent=$,re);function re(){}(ee=Z=Z||{})[ee.CRITICAL=1]="CRITICAL",ee[ee.WARNING=2]="WARNING";var ie={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},ae=(oe.sanitizeDiagnosticText=function(e){return e?'"'+e.replace(/\"/g,"")+'"':""},oe.dataType="MessageData",oe.AiNonUserActionablePrefix="AI (Internal): ",oe.AiUserActionablePrefix="AI: ",oe);function oe(e,t,n,r){void 0===n&&(n=!1),this.messageId=e,this.message=(n?oe.AiUserActionablePrefix:oe.AiNonUserActionablePrefix)+e;var i="";E()&&(i=O().stringify(r));var a=(t?" message:"+oe.sanitizeDiagnosticText(t):"")+(r?" props:"+oe.sanitizeDiagnosticText(i):"");this.message+=a}var se=(ue.prototype.throwInternal=function(e,t,n,r,i){void 0===i&&(i=!1);var a,o=new ae(t,n,i,r),s=this;if(s.enableDebugExceptions())throw o;!J.isUndefined(o)&&o&&(J.isUndefined(o.message)||(i?(a=+o.messageId,!s._messageLogged[a]&&s.consoleLoggingLevel()>=Z.WARNING&&(s.warnToConsole(o.message),s._messageLogged[a]=!0)):s.consoleLoggingLevel()>=Z.WARNING&&s.warnToConsole(o.message),s.logInternalMessage(e,o)))},ue.prototype.warnToConsole=function(e){!J.isUndefined(console)&&console&&(J.isFunction(console.warn)?console.warn(e):J.isFunction(console.log)&&console.log(e))},ue.prototype.resetInternalMessageCount=function(){this._messageCount=0,this._messageLogged={}},ue.prototype.logInternalMessage=function(e,t){var n,r,i,a,o=this;o._areInternalMessagesThrottled()||(n=!0,r=o.AIInternalMessagePrefix+t.messageId,o._messageLogged[r]?n=!1:o._messageLogged[r]=!0,n&&(e<=o.telemetryLoggingLevel()&&(o.queue.push(t),o._messageCount++),o._messageCount===o.maxInternalMessageLimit()&&(i="Internal events throttle limit per PageView reached for this app.",a=new ae(ie.MessageLimitPerPVExceeded,i,!1),o.queue.push(a),o.warnToConsole(i))))},ue.prototype._areInternalMessagesThrottled=function(){return this._messageCount>=this.maxInternalMessageLimit()},ue);function ue(e){this.queue=[],this.AIInternalMessagePrefix="AITR_",this._messageCount=0,this._messageLogged={},this.enableDebugExceptions=function(){return!1},this.consoleLoggingLevel=function(){return 0},this.telemetryLoggingLevel=function(){return 1},this.maxInternalMessageLimit=function(){return 25},J.isNullOrUndefined(e)||(J.isNullOrUndefined(e.loggingLevelConsole)||(this.consoleLoggingLevel=function(){return e.loggingLevelConsole}),J.isNullOrUndefined(e.loggingLevelTelemetry)||(this.telemetryLoggingLevel=function(){return e.loggingLevelTelemetry}),J.isNullOrUndefined(e.maxMessageLimit)||(this.maxInternalMessageLimit=function(){return e.maxMessageLimit}),J.isNullOrUndefined(e.enableDebugExceptions)||(this.enableDebugExceptions=function(){return e.enableDebugExceptions}))}var le=J.isFunction,ce=function(i,a){var o=this,s=null,u=le(i.processTelemetry),l=le(i.setNextPlugin);o._hasRun=!1,o.getPlugin=function(){return i},o.getNext=function(){return s},o.setNext=function(e){s=e},o.processTelemetry=function(e,t){if(t=t||a,i&&u){o._hasRun=!0;try{t.setNext(s),l&&i.setNextPlugin(s),s&&(s._hasRun=!1),i.processTelemetry(e,t)}catch(r){var n=s&&s._hasRun;s&&n||t.diagLog().throwInternal(Z.CRITICAL,ie.PluginException,"Plugin ["+i.identifier+"] failed during processTelemetry - "+r),s&&!n&&s.processTelemetry(e,t)}}else s&&(o._hasRun=!0,s.processTelemetry(e,t))}},de=J.isNullOrUndefined;function fe(e,t){var n=[];if(e&&0<e.length)for(var r=null,i=0;i<e.length;i++){var a,o=e[i];o&&J.isFunction(o.processTelemetry)&&(a=new ce(o,t),n.push(a),r&&r.setNext(a),r=a)}return 0<n.length?n[0]:null}var pe=function mr(e,a,n,t){var r,i,o,s,u,l=this,c=null;null!==t&&(e&&J.isFunction(e.getPlugin)?c=function(e,t,n){var r=[],i=!n;if(e)for(;e;){var a=e.getPlugin();!i&&a!==n||(i=!0,r.push(a)),e=e.getNext()}return i||r.push(n),fe(r,t)}(e,l,t||e.getPlugin()):t?(i=l,s=r=e,u=!1,(o=t)&&r&&(s=[],J.arrForEach(r,function(e){!u&&e!==o||(u=!0,s.push(e))})),o&&!u&&(s=s||[]).push(o),c=fe(s,i)):J.isUndefined(t)&&(c=fe(e,l))),l.core=function(){return n},l.diagLog=function(){return(n||{}).logger||new se(a||{})},l.getCfg=function(){return a},l.getExtCfg=function(e,t){var n,r;return void 0===t&&(t={}),!a||(r=a.extensionConfig)&&e&&(n=r[e]),n||t},l.getConfig=function(e,t,n){var r;void 0===n&&(n=!1);var i=l.getExtCfg(e,null);return i&&!de(i[t])?r=i[t]:a&&!de(a[t])&&(r=a[t]),de(r)?n:r},l.hasNext=function(){return null!=c},l.getNext=function(){return c},l.setNext=function(e){c=e},l.processNext=function(e){var t=c;t&&(c=t.getNext(),t.processTelemetry(e,l))},l.createNew=function(e,t){return void 0===e&&(e=null),new mr(e||c,a,n,t)}},ge=J.isFunction,he="getPlugin",me=(ve.prototype.initialize=function(e,t,n,r){this._baseTelInit(e,t,n,r)},ve);function ve(){var a=this,o=!1,s=null,u=null;a.core=null,a.diagLog=function(e){return a._getTelCtx(e).diagLog()},a.isInitialized=function(){return o},a.setInitialized=function(e){o=e},a.setNextPlugin=function(e){u=e},a.processNext=function(e,t){t?t.processNext(e):u&&ge(u.processTelemetry)&&u.processTelemetry(e,null)},a._getTelCtx=function(e){void 0===e&&(e=null);var t,n=e;return n||(t=s||new pe(null,{},a.core),n=u&&u[he]?t.createNew(null,u[he]):t.createNew(null,u)),n},a._baseTelInit=function(e,t,n,r){e&&(e.extensionConfig=e.extensionConfig||[]),!r&&t&&(r=t.getProcessTelContext().getNext());var i=u;u&&u[he]&&(i=u[he]()),a.core=t,s=new pe(r,e,t,i),o=!0}}var xe=J.isFunction,ye="processTelemetry",Se="priority",Ie="setNextPlugin",Ce="isInitialized";function Te(t,n){for(var e=[],r=null,i=t.getNext();i;){var a=i.getPlugin();a&&(r&&xe(r[Ie])&&xe(a[ye])&&r[Ie](a),xe(a[Ce])&&a[Ce]()||e.push(a),r=a,i=i.getNext())}J.arrForEach(e,function(e){e.initialize(t.getCfg(),t.core(),n,t.getNext())})}function _e(e){return e.sort(function(e,t){var n=0,r=xe(t[ye]);return xe(e[ye])?n=r?e[Se]-t[Se]:1:r&&(n=-1),n})}var be=500,Ne="Channel has invalid priority",Ae=J.arrForEach,Me=J.objDefineAccessors;function De(e,t){t&&0<t.length&&(t=t.sort(function(e,t){return e.priority-t.priority}),Ae(t,function(e){if(e.priority<be)throw Error(Ne+e.identifier)}),e.push(t))}var we,Ee=(we=me,__extends(Le,we),Le.prototype.processTelemetry=function(t,n){var r=this;this._channelQueue&&Ae(this._channelQueue,function(e){0<e.length&&r._getTelCtx(n).createNew(e).processNext(t)})},Le.prototype.getChannelControls=function(){return this._channelQueue},Le.prototype.initialize=function(t,n,r){var e,i,a,o,s;this.isInitialized()||(we.prototype.initialize.call(this,t,n,r),t.isCookieUseDisabled&&J.disableCookies(),e=this._channelQueue=(a=r,s=[],(i=(t||{}).channels)&&Ae(i,function(e){return De(s,e)}),a&&(o=[],Ae(a,function(e){e.priority>be&&o.push(e)}),De(s,o)),s),Ae(e,function(e){return Te(new pe(e,t,n),r)}))},Le._staticInit=(Me(Le.prototype,"ChannelControls",Le.prototype.getChannelControls),void Me(Le.prototype,"channelQueue",Le.prototype.getChannelControls)),Le);function Le(){var e=null!==we&&we.apply(this,arguments)||this;return e.identifier="ChannelControllerPlugin",e.priority=be,e}var Re=J.arrForEach,qe=J.isNullOrUndefined,ke=(Fe.prototype.initialize=function(e,t,r,n){var i=this;if(i.isInitialized())throw Error("Core should not be initialized more than once");if(!e||qe(e.instrumentationKey))throw Error("Please provide instrumentation key");i.config=e;var a=i._channelController;n=n||J.objCreate({addNotificationListener:function(e){},removeNotificationListener:function(e){},eventsSent:function(e){},eventsDiscarded:function(e,t){},eventsSendRequest:function(e,t){}}),i._notificationManager=n,e.extensions=qe(e.extensions)?[]:e.extensions,(e.extensionConfig=qe(e.extensionConfig)?{}:e.extensionConfig).NotificationManager=n,r=r||J.objCreate({throwInternal:function(e,t,n,r,i){void 0===i&&(i=!1)},warnToConsole:function(e){},resetInternalMessageCount:function(){}}),i.logger=r;var o=[];o.push.apply(o,t.concat(e.extensions)),o=_e(o);var s=[],u={};if(Re(o,function(e){if(qe(e)||qe(e.initialize))throw Error("Extensions must provide callback to initialize");var t=e.priority,n=e.identifier;e&&t&&(qe(u[t])?u[t]=n:r.warnToConsole("Two extensions have same priority #"+t+" - "+u[t]+", "+n)),(!t||t<a.priority)&&s.push(e)}),o.push(a),s.push(a),o=_e(o),i._extensions=o,Te(new pe([a],e,i),o),Te(new pe(s,e,i),o),i._extensions=s,0===i.getTransmissionControls().length)throw new Error("No channels available");i._setInit(!0)},Fe.prototype.getTransmissionControls=function(){return this._channelController.getChannelControls()},Fe.prototype.track=function(e){var t=this;e.iKey||(e.iKey=t.config.instrumentationKey),e.time||(e.time=J.toISOString(new Date)),qe(e.ver)&&(e.ver="4.0"),t.isInitialized()?(0<t._eventQueue.length&&(Re(t._eventQueue,function(e){t.getProcessTelContext().processNext(e)}),t._eventQueue=[]),t.getProcessTelContext().processNext(e)):t._eventQueue.push(e)},Fe.prototype.getProcessTelContext=function(){var e=this._extensions,t=e;return e&&0!==e.length||(t=[this._channelController]),new pe(t,this.config,this)},Fe);function Fe(){var t=!1,e=this;e._extensions=new Array,e._channelController=new Ee,e.isInitialized=function(){return t},e._setInit=function(e){t=e},e._eventQueue=[]}var He=(Oe.prototype.addNotificationListener=function(e){this.listeners.push(e)},Oe.prototype.removeNotificationListener=function(e){for(var t=J.arrIndexOf(this.listeners,e);-1<t;)this.listeners.splice(t,1),t=J.arrIndexOf(this.listeners,e)},Oe.prototype.eventsSent=function(t){for(var n=this,r=this,e=0;e<this.listeners.length;++e)!function(e){r.listeners[e].eventsSent&&setTimeout(function(){return n.listeners[e].eventsSent(t)},0)}(e)},Oe.prototype.eventsDiscarded=function(t,n){for(var r=this,i=this,e=0;e<this.listeners.length;++e)!function(e){i.listeners[e].eventsDiscarded&&setTimeout(function(){return r.listeners[e].eventsDiscarded(t,n)},0)}(e)},Oe.prototype.eventsSendRequest=function(n,r){for(var i=this,a=this,e=0;e<this.listeners.length;++e)!function(e){if(a.listeners[e].eventsSendRequest)if(r)setTimeout(function(){return i.listeners[e].eventsSendRequest(n,r)},0);else try{a.listeners[e].eventsSendRequest(n,r)}catch(t){}}(e)},Oe);function Oe(){this.listeners=[]}var Ue;Ue=ke,__extends(je,Ue),je.prototype.initialize=function(e,t){var n=this;n._notificationManager=new He,n.logger=new se(e),n.config=e,Ue.prototype.initialize.call(this,e,t,n.logger,n._notificationManager)},je.prototype.getTransmissionControls=function(){return Ue.prototype.getTransmissionControls.call(this)},je.prototype.track=function(e){if(null===e)throw this._notifyInvalidEvent(e),Error("Invalid telemetry item");this._validateTelemetryItem(e),Ue.prototype.track.call(this,e)},je.prototype.addNotificationListener=function(e){this._notificationManager&&this._notificationManager.addNotificationListener(e)},je.prototype.removeNotificationListener=function(e){this._notificationManager&&this._notificationManager.removeNotificationListener(e)},je.prototype.pollInternalLogs=function(r){var t=this,e=this.config.diagnosticLogInterval;return e&&0<e||(e=1e4),setInterval(function(){var n=t,e=n.logger?n.logger.queue:[];J.arrForEach(e,function(e){var t={name:r||"InternalMessageId: "+e.messageId,iKey:n.config.instrumentationKey,time:J.toISOString(new Date),baseType:ae.dataType,baseData:{message:e.message}};n.track(t)}),e.length=0},e)},je.prototype._validateTelemetryItem=function(e){if(J.isNullOrUndefined(e.name))throw this._notifyInvalidEvent(e),Error("telemetry name required")},je.prototype._notifyInvalidEvent=function(e){this._notificationManager&&this._notificationManager.eventsDiscarded([e],x)};function je(){return Ue.call(this)||this}var Pe="_aiHooks",ze=["req","rsp","hkErr","fnErr"];function Ge(e,t){if(e)for(var n=0;n<e.length&&!t(e[n],n);n++);}function Be(e,u,l,c,d){0<=d&&d<=2&&Ge(e,function(e,t){var n=e.cbks,r=n[ze[d]];if(r){u.ctx=function(){return c[t]=c[t]||{}};try{r.apply(u.inst,l)}catch(o){var i=u.err;try{var a=n[ze[2]];a&&(u.err=o,a.apply(u.inst,l))}catch(s){}finally{u.err=i}}}})}function We(u){return function(){var n=arguments,e=u.h,r={name:u.n,inst:this,ctx:null,set:function(e,t){(n=a([],n))[e]=t,i=a([r],n)}},t=[],i=a([r],n);function a(t,e){return Ge(e,function(e){t.push(e)}),t}Be(e,r,i,t,0);var o=u.f;try{r.rslt=o.apply(this,n)}catch(s){throw r.err=s,Be(e,r,i,t,3),s}return Be(e,r,i,t,1),r.rslt}}function Xe(e,t,n,r){if(void 0===r&&(r=!0),e&&t&&n){var i=function l(e,t,n){var r=null;return e&&(J.hasOwnProperty(e,t)?r=e:n&&(r=l(e[q],t,!1))),r}(e,t,r),a=i[t];if(typeof a===S){var o,s=a[Pe];s||((o=We(s={i:0,n:t,f:a,h:[]}))[Pe]=s,i[t]=o);var u={id:s.i,cbks:n,rm:function(){var n=this.id;Ge(s.h,function(e,t){return e.id===n&&(s.h.splice(t,1),1)})}};return s.i++,s.h.push(u),u}}return null}var Ve=(Ke.requestContextHeader="Request-Context",Ke.requestContextTargetKey="appId",Ke.requestContextAppIdFormat="appId=cid-v1:",Ke.requestIdHeader="Request-Id",Ke.traceParentHeader="traceparent",Ke.sdkContextHeader="Sdk-Context",Ke.sdkContextHeaderAppIdRequest="appId",Ke.requestContextHeaderLowerCase="request-context",Ke);function Ke(){}var Qe=($e.sanitizeKeyAndAddUniqueness=function(e,t,n){var r=t.length,i=$e.sanitizeKey(e,t);if(i.length!==r){for(var a=0,o=i;n[o]!==undefined;)a++,o=i.substring(0,$e.MAX_NAME_LENGTH-3)+$e.padNumber(a);i=o}return i},$e.sanitizeKey=function(e,t){var n;return t&&(t=$e.trim(t.toString())).length>$e.MAX_NAME_LENGTH&&(n=t.substring(0,$e.MAX_NAME_LENGTH),e.throwInternal(Z.WARNING,ie.NameTooLong,"name is too long. It has been truncated to "+$e.MAX_NAME_LENGTH+" characters.",{name:t},!0)),n||t},$e.sanitizeString=function(e,t,n){var r;return void 0===n&&(n=$e.MAX_STRING_LENGTH),t&&(n=n||$e.MAX_STRING_LENGTH,(t=$e.trim(t)).toString().length>n&&(r=t.toString().substring(0,n),e.throwInternal(Z.WARNING,ie.StringValueTooLong,"string value is too long. It has been truncated to "+n+" characters.",{value:t},!0))),r||t},$e.sanitizeUrl=function(e,t){return $e.sanitizeInput(e,t,$e.MAX_URL_LENGTH,ie.UrlTooLong)},$e.sanitizeMessage=function(e,t){var n;return t&&t.length>$e.MAX_MESSAGE_LENGTH&&(n=t.substring(0,$e.MAX_MESSAGE_LENGTH),e.throwInternal(Z.WARNING,ie.MessageTruncated,"message is too long, it has been truncated to "+$e.MAX_MESSAGE_LENGTH+" characters.",{message:t},!0)),n||t},$e.sanitizeException=function(e,t){var n;return t&&t.length>$e.MAX_EXCEPTION_LENGTH&&(n=t.substring(0,$e.MAX_EXCEPTION_LENGTH),e.throwInternal(Z.WARNING,ie.ExceptionTruncated,"exception is too long, it has been truncated to "+$e.MAX_EXCEPTION_LENGTH+" characters.",{exception:t},!0)),n||t},$e.sanitizeProperties=function(e,t){if(t){var n={};for(var r in t){var i=t[r];if(J.isObject(i)&&E())try{i=O().stringify(i)}catch(a){e.throwInternal(Z.WARNING,ie.CannotSerializeObjectNonSerializable,"custom property is not valid",{exception:a},!0)}i=$e.sanitizeString(e,i,$e.MAX_PROPERTY_LENGTH),n[r=$e.sanitizeKeyAndAddUniqueness(e,r,n)]=i}t=n}return t},$e.sanitizeMeasurements=function(e,t){if(t){var n={};for(var r in t){var i=t[r];n[r=$e.sanitizeKeyAndAddUniqueness(e,r,n)]=i}t=n}return t},$e.sanitizeId=function(e,t){return t?$e.sanitizeInput(e,t,$e.MAX_ID_LENGTH,ie.IdTooLong).toString():t},$e.sanitizeInput=function(e,t,n,r){var i;return t&&(t=$e.trim(t)).length>n&&(i=t.substring(0,n),e.throwInternal(Z.WARNING,r,"input is too long, it has been truncated to "+n+" characters.",{data:t},!0)),i||t},$e.padNumber=function(e){var t="00"+e;return t.substr(t.length-3)},$e.trim=function(e){return J.isString(e)?e.replace(/^\s+|\s+$/g,""):e},$e.MAX_NAME_LENGTH=150,$e.MAX_ID_LENGTH=128,$e.MAX_PROPERTY_LENGTH=8192,$e.MAX_STRING_LENGTH=1024,$e.MAX_URL_LENGTH=2048,$e.MAX_MESSAGE_LENGTH=32768,$e.MAX_EXCEPTION_LENGTH=32768,$e);function $e(){}var Je=w(),Ye=J.isString,Ze=null;var et=(tt.createDomEvent=function(e){var t,n=null;return J.isFunction(Event)?n=new Event(e):(t=D())&&t.createEvent&&(n=t.createEvent("Event")).initEvent(e,!0,!0),n},tt.disableStorage=function(){tt._canUseLocalStorage=!1,tt._canUseSessionStorage=!1},tt._getLocalStorageObject=function(){return tt.canUseLocalStorage()?tt._getVerifiedStorageObject(f.LocalStorage):null},tt._getVerifiedStorageObject=function(e){var t,n,r=null;try{if(J.isNullOrUndefined(k()))return null;n=new Date,(r=e===f.LocalStorage?N("localStorage"):N("sessionStorage")).setItem(n.toString(),n.toString()),t=r.getItem(n.toString())!==n.toString(),r.removeItem(n.toString()),t&&(r=null)}catch(i){r=null}return r},tt.isInternalApplicationInsightsEndpoint=function(e){return-1!==tt._internalEndpoints.indexOf(e.toLowerCase())},tt.canUseLocalStorage=function(){return tt._canUseLocalStorage===undefined&&(tt._canUseLocalStorage=!!tt._getVerifiedStorageObject(f.LocalStorage)),tt._canUseLocalStorage},tt.getStorage=function(e,t){var n=tt._getLocalStorageObject();if(null!==n)try{return n.getItem(t)}catch(r){tt._canUseLocalStorage=!1,e.throwInternal(Z.WARNING,ie.BrowserCannotReadLocalStorage,"Browser failed read of local storage. "+tt.getExceptionName(r),{exception:tt.dump(r)})}return null},tt.setStorage=function(e,t,n){var r=tt._getLocalStorageObject();if(null!==r)try{return r.setItem(t,n),!0}catch(i){tt._canUseLocalStorage=!1,e.throwInternal(Z.WARNING,ie.BrowserCannotWriteLocalStorage,"Browser failed write to local storage. "+tt.getExceptionName(i),{exception:tt.dump(i)})}return!1},tt.removeStorage=function(e,t){var n=tt._getLocalStorageObject();if(null!==n)try{return n.removeItem(t),!0}catch(r){tt._canUseLocalStorage=!1,e.throwInternal(Z.WARNING,ie.BrowserFailedRemovalFromLocalStorage,"Browser failed removal of local storage item. "+tt.getExceptionName(r),{exception:tt.dump(r)})}return!1},tt._getSessionStorageObject=function(){return tt.canUseSessionStorage()?tt._getVerifiedStorageObject(f.SessionStorage):null},tt.canUseSessionStorage=function(){return tt._canUseSessionStorage===undefined&&(tt._canUseSessionStorage=!!tt._getVerifiedStorageObject(f.SessionStorage)),tt._canUseSessionStorage},tt.getSessionStorageKeys=function(){var e=[];if(tt.canUseSessionStorage())for(var t in N("sessionStorage"))e.push(t);return e},tt.getSessionStorage=function(e,t){var n=tt._getSessionStorageObject();if(null!==n)try{return n.getItem(t)}catch(r){tt._canUseSessionStorage=!1,e.throwInternal(Z.WARNING,ie.BrowserCannotReadSessionStorage,"Browser failed read of session storage. "+tt.getExceptionName(r),{exception:tt.dump(r)})}return null},tt.setSessionStorage=function(e,t,n){var r=tt._getSessionStorageObject();if(null!==r)try{return r.setItem(t,n),!0}catch(i){tt._canUseSessionStorage=!1,e.throwInternal(Z.WARNING,ie.BrowserCannotWriteSessionStorage,"Browser failed write to session storage. "+tt.getExceptionName(i),{exception:tt.dump(i)})}return!1},tt.removeSessionStorage=function(e,t){var n=tt._getSessionStorageObject();if(null!==n)try{return n.removeItem(t),!0}catch(r){tt._canUseSessionStorage=!1,e.throwInternal(Z.WARNING,ie.BrowserFailedRemovalFromSessionStorage,"Browser failed removal of session storage item. "+tt.getExceptionName(r),{exception:tt.dump(r)})}return!1},tt.disableCookies=function(){J.disableCookies()},tt.canUseCookies=function(e){if(J._canUseCookies===undefined){J._canUseCookies=!1;try{J._canUseCookies=tt.document.cookie!==undefined}catch(t){e.throwInternal(Z.WARNING,ie.CannotAccessCookie,"Cannot access document.cookie - "+tt.getExceptionName(t),{exception:tt.dump(t)})}}return J._canUseCookies},tt.disallowsSameSiteNone=function(e){return!!Ye(e)&&(-1!==e.indexOf("CPU iPhone OS 12")||-1!==e.indexOf("iPad; CPU OS 12")||-1!==e.indexOf("Macintosh; Intel Mac OS X 10_14")&&-1!==e.indexOf("Version/")&&-1!==e.indexOf("Safari")||-1!==e.indexOf("Macintosh; Intel Mac OS X 10_14")&&(n="AppleWebKit/605.1.15 (KHTML, like Gecko)",r=(t=e).length,i=r-n.length,t.substring(0<=i?i:0,r)===n)||-1!==e.indexOf("Chrome/5")||-1!==e.indexOf("Chrome/6")||-1!==e.indexOf("UnrealEngine")&&-1===e.indexOf("Chrome")||-1!==e.indexOf("UCBrowser/12")||-1!==e.indexOf("UCBrowser/11"));var t,n,r,i},tt.setCookie=function(e,t,n,r){var i,a,o;tt.canUseCookies(e)&&(a=i="",r&&(i=";domain="+r),(o=F())&&"https:"===o.protocol&&(a=";secure",null===Ze&&(Ze=tt.disallowsSameSiteNone((w()||{}).userAgent)),Ze||(n+=";SameSite=None")),tt.document.cookie=t+"="+n+i+";path=/"+a)},tt.stringToBoolOrDefault=function(e,t){return void 0===t&&(t=!1),e===undefined||null===e?t:"true"===e.toString().toLowerCase()},tt.getCookie=function(e,t){if(tt.canUseCookies(e)){var n="";if(t&&t.length)for(var r=t+"=",i=tt.document.cookie.split(";"),a=0;a<i.length;a++){var o=i[a];if((o=tt.trim(o))&&0===o.indexOf(r)){n=o.substring(r.length,i[a].length);break}}return n}},tt.deleteCookie=function(e,t){tt.canUseCookies(e)&&(tt.document.cookie=t+"=;path=/;expires=Thu, 01 Jan 1970 00:00:01 GMT;")},tt.newId=function(){for(var e="",t=1073741824*Math.random();0<t;)e+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(t%64),t=Math.floor(t/64);return e},tt.random32=function(){return 4294967296*Math.random()|0},tt.generateW3CId=function(){for(var e,t=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"],n="",r=0;r<4;r++)n+=t[15&(e=tt.random32())]+t[e>>4&15]+t[e>>8&15]+t[e>>12&15]+t[e>>16&15]+t[e>>20&15]+t[e>>24&15]+t[e>>28&15];var i=t[8+4*Math.random()|0];return n.substr(0,8)+n.substr(9,4)+"4"+n.substr(13,3)+i+n.substr(16,3)+n.substr(19,12)},tt.isArray=function(e){return"[object Array]"===Object[q].toString.call(e)},tt.isError=function(e){return"[object Error]"===Object[q].toString.call(e)},tt.getIEVersion=function(e){void 0===e&&(e=null);var t=e?e.toLowerCase():Je?(Je.userAgent||"").toLowerCase():"";if(-1!==t.indexOf("msie"))return parseInt(t.split("msie")[1]);if(t.indexOf("trident/")){var n=parseInt(t.split("trident/")[1]);if(n)return n+4}return null},tt.msToTimeSpan=function(e){(isNaN(e)||e<0)&&(e=0);var t=""+(e=Math.round(e))%1e3,n=""+Math.floor(e/1e3)%60,r=""+Math.floor(e/6e4)%60,i=""+Math.floor(e/36e5)%24,a=Math.floor(e/864e5),t=1===t.length?"00"+t:2===t.length?"0"+t:t,n=n.length<2?"0"+n:n,r=r.length<2?"0"+r:r;return(0<a?a+".":"")+(i=i.length<2?"0"+i:i)+":"+r+":"+n+"."+t},tt.isCrossOriginError=function(e,t,n,r,i){return("Script error."===e||"Script error"===e)&&!i},tt.dump=function(e){var t=Object[q].toString.call(e),n="";return"[object Error]"===t?n="{ stack: '"+e.stack+"', message: '"+e.message+"', name: '"+e.name+"'":E()&&(n=O().stringify(e)),t+n},tt.getExceptionName=function(e){return"[object Error]"===Object[q].toString.call(e)?e.name:""},tt.addEventHandler=function(e,t){return ne.Attach(M(),e,t)},tt.IsBeaconApiSupported=function(){return"sendBeacon"in Je&&Je.sendBeacon},tt.getExtension=function(e,t){for(var n=null,r=0;!n&&r<e.length;)e[r]&&e[r].identifier===t&&(n=e[r]),r++;return n},tt.document=D()||{},tt._canUseLocalStorage=undefined,tt._canUseSessionStorage=undefined,tt._internalEndpoints=["https://dc.services.visualstudio.com/v2/track","https://breeze.aimon.applicationinsights.io/v2/track","https://dc-int.services.visualstudio.com/v2/track"],tt.NotSpecified="not_specified",tt.trim=J.strTrim,tt.isDate=J.isDate,tt.toISOStringForIE8=J.toISOString,tt);function tt(){}var nt=(rt.parseUrl=function(e){var t=rt._htmlAnchorIdx,n=rt._htmlAnchorElement,r=n[t];return rt.document.createElement?n[t]||(r=n[t]=rt.document.createElement("a")):r={host:rt.parseHost(e,!0)},r.href=e,++t>=n.length&&(t=0),rt._htmlAnchorIdx=t,r},rt.getAbsoluteUrl=function(e){var t,n=rt.parseUrl(e);return n&&(t=n.href),t},rt.getPathName=function(e){var t,n=rt.parseUrl(e);return n&&(t=n.pathname),t},rt.getCompleteUrl=function(e,t){return e?e.toUpperCase()+" "+t:t},rt.parseHost=function(e,t){var n=rt.parseFullHost(e,t);if(n){var r=n.match(/(www[0-9]?\.)?(.[^/:]+)(\:[\d]+)?/i);if(null!=r&&3<r.length&&Ye(r[2])&&0<r[2].length)return r[2]+(r[3]||"")}return n},rt.parseFullHost=function(e,t){var n,r,i,a=null;return!e||null!=(n=e.match(/(\w*):\/\/(.[^/:]+)(\:[\d]+)?/i))&&2<n.length&&Ye(n[2])&&0<n[2].length&&(a=n[2]||"",t&&2<n.length&&(r=(n[1]||"").toLowerCase(),i=n[3]||"",("http"===r&&":80"===i||"https"===r&&":443"===i)&&(i=""),a+=i)),a},rt.document=D()||{},rt._htmlAnchorIdx=0,rt._htmlAnchorElement=[null,null,null,null,null],rt);function rt(){}var it=(at.canIncludeCorrelationHeader=function(e,t,n){if(!t||e&&e.disableCorrelationHeaders)return!1;var r=nt.parseUrl(t).host.toLowerCase();if(!r||-1===r.indexOf(":443")&&-1===r.indexOf(":80")||(r=(nt.parseFullHost(t,!0)||"").toLowerCase()),!(e&&e.enableCorsCorrelation||r===n))return!1;var i,a=e&&e.correlationHeaderDomains;if(a&&(J.arrForEach(a,function(e){var t=new RegExp(e.toLowerCase().replace(/\./g,".").replace(/\*/g,".*"));i=i||t.test(r)}),!i))return!1;var o=e&&e.correlationHeaderExcludedDomains;if(!o||0===o.length)return!0;for(var s=0;s<o.length;s++)if(new RegExp(o[s].toLowerCase().replace(/\./g,".").replace(/\*/g,".*")).test(r))return!1;return r&&0<r.length},at.getCorrelationContext=function(e){if(e){var t=at.getCorrelationContextValue(e,Ve.requestContextTargetKey);if(t&&t!==at.correlationIdPrefix)return t}},at.getCorrelationContextValue=function(e,t){if(e)for(var n=e.split(","),r=0;r<n.length;++r){var i=n[r].split("=");if(2===i.length&&i[0]===t)return i[1]}},at.correlationIdPrefix="cid-v1:",at);function at(){}var ot=(st.ParseDependencyPath=function(e,t,n,r){var i,a,o,s=r,u=r;return s=t&&0<t.length?(o=(i=nt.parseUrl(t)).host,s||(null!=i.pathname?("/"!==(a=0===i.pathname.length?"/":i.pathname).charAt(0)&&(a="/"+a),u=i.pathname,Qe.sanitizeString(e,n?n+" "+a:a)):Qe.sanitizeString(e,t))):o=r,{target:o,name:s,data:u}},st);function st(){}var ut=(lt.Now=function(){var e=H();return e&&e.now&&e.timing?e.now()+e.timing.navigationStart:(new Date).getTime()},lt.GetDuration=function(e,t){var n=null;return 0===e||0===t||J.isNullOrUndefined(e)||J.isNullOrUndefined(t)||(n=t-e),n},lt);function lt(){}var ct,dt="Microsoft_ApplicationInsights_BypassAjaxInstrumentation",ft=(ct=function(){},__extends(pt,ct),pt);function pt(){return ct.call(this)||this}var gt;gt=function(){this.ver=1,this.sampleRate=100,this.tags={}},__extends(ht,gt);function ht(e,t,n){var r=gt.call(this)||this;return r.name=Qe.sanitizeString(e,n)||et.NotSpecified,r.data=t,r.time=J.toISOString(new Date),r.aiDataContract={time:g.Required,iKey:g.Required,name:g.Required,sampleRate:function(){return 100===r.sampleRate?g.Hidden:g.Required},tags:g.Required,data:g.Required},r}var mt,vt=function(){},xt=(mt=vt,__extends(yt,mt),yt);function yt(){var e=mt.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}var St;St=xt,__extends(It,St),It.envelopeType="Microsoft.ApplicationInsights.{0}.Event",It.dataType="EventData";function It(e,t,n,r){var i=St.call(this)||this;return i.aiDataContract={ver:g.Required,name:g.Required,properties:g.Default,measurements:g.Default},i.name=Qe.sanitizeString(e,t)||et.NotSpecified,i.properties=Qe.sanitizeProperties(e,n),i.measurements=Qe.sanitizeMeasurements(e,r),i}var Ct,Tt=function(){},_t=(Ct=vt,__extends(bt,Ct),bt);function bt(){var e=Ct.call(this)||this;return e.ver=2,e.exceptions=[],e.properties={},e.measurements={},e}var Nt,At=function(){this.hasFullStack=!0,this.parsedStack=[]};Nt=_t,__extends(Mt,Nt),Mt.CreateFromInterface=function(t,e){var n=e.exceptions&&J.arrMap(e.exceptions,function(e){return wt.CreateFromInterface(t,e)});return new Mt(t,__assign({},e,{exceptions:n}))},Mt.prototype.toInterface=function(){var e=this,t=e.exceptions,n=e.properties,r=e.measurements,i=e.severityLevel,a=(e.ver,e.problemGroup),o=e.id,s=e.isManual;return{ver:"4.0",exceptions:t instanceof Array&&J.arrMap(t,function(e){return e.toInterface()})||undefined,severityLevel:i,properties:n,measurements:r,problemGroup:a,id:o,isManual:s}},Mt.CreateSimpleException=function(e,t,n,r,i,a){return{exceptions:[{hasFullStack:!0,message:e,stack:i,typeName:t}]}},Mt.envelopeType="Microsoft.ApplicationInsights.{0}.Exception",Mt.dataType="ExceptionData";function Mt(e,t,n,r,i,a){var o=Nt.call(this)||this;return o.aiDataContract={ver:g.Required,exceptions:g.Required,severityLevel:g.Default,properties:g.Default,measurements:g.Default},t instanceof Error?(o.exceptions=[new wt(e,t)],o.properties=Qe.sanitizeProperties(e,n),o.measurements=Qe.sanitizeMeasurements(e,r),i&&(o.severityLevel=i),a&&(o.id=a)):(o.exceptions=t.exceptions,o.properties=t.properties,o.measurements=t.measurements,t.severityLevel&&(o.severityLevel=t.severityLevel),t.id&&(o.id=t.id),t.problemGroup&&(o.problemGroup=t.problemGroup),o.ver=2,J.isNullOrUndefined(t.isManual)||(o.isManual=t.isManual)),o}var Dt,wt=(Dt=At,__extends(Et,Dt),Et.prototype.toInterface=function(){var e=this.parsedStack instanceof Array&&J.arrMap(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.stack,parsedStack:e||undefined}},Et.CreateFromInterface=function(e,t){var n=t.parsedStack instanceof Array&&J.arrMap(t.parsedStack,function(e){return Rt.CreateFromInterface(e)})||t.parsedStack;return new Et(e,__assign({},t,{parsedStack:n}))},Et.parseStack=function(e){if(J.isString(e)){for(var t=e.split("\n"),n=[],r=0,i=0,a=0;a<=t.length;a++){var o,s=t[a];Rt.regex.test(s)&&(i+=(o=new Rt(t[a],r++)).sizeInBytes,n.push(o))}if(32768<i)for(var u=0,l=n.length-1,c=0,d=u,f=l;u<l;){if(32768<(c+=n[u].sizeInBytes+n[l].sizeInBytes)){var p=f-d+1;n.splice(d,p);break}d=u,f=l,u++,l--}}return n},Et);function Et(e,t){var n,r=Dt.call(this)||this;return r.aiDataContract={id:g.Default,outerId:g.Default,typeName:g.Required,message:g.Required,hasFullStack:g.Default,stack:g.Default,parsedStack:g.Array},t instanceof Error?(r.typeName=Qe.sanitizeString(e,t.name)||et.NotSpecified,r.message=Qe.sanitizeMessage(e,t.message)||et.NotSpecified,n=t.stack,r.parsedStack=Et.parseStack(n),r.stack=Qe.sanitizeException(e,n),r.hasFullStack=et.isArray(r.parsedStack)&&0<r.parsedStack.length):(r.typeName=t.typeName,r.message=t.message,r.stack=t.stack,r.parsedStack=t.parsedStack,r.hasFullStack=t.hasFullStack),r}var Lt,Rt=(Lt=Tt,__extends(qt,Lt),qt.CreateFromInterface=function(e){return new qt(e,null)},qt.prototype.toInterface=function(){return{level:this.level,method:this.method,assembly:this.assembly,fileName:this.fileName,line:this.line}},qt.regex=/^([\s]+at)?(.*?)(\@|\s\(|\s)([^\(\@\n]+):([0-9]+):([0-9]+)(\)?)$/,qt.baseSize=58,qt);function qt(e,t){var n,r,i=Lt.call(this)||this;return i.sizeInBytes=0,i.aiDataContract={level:g.Required,method:g.Required,assembly:g.Default,fileName:g.Default,line:g.Default},"string"==typeof e?(n=e,i.level=t,i.method="<no_method>",i.assembly=et.trim(n),i.fileName="",i.line=0,(r=n.match(qt.regex))&&5<=r.length&&(i.method=et.trim(r[2])||i.method,i.fileName=et.trim(r[4]),i.line=parseInt(r[5])||0)):(i.level=e.level,i.method=e.method,i.assembly=e.assembly,i.fileName=e.fileName,i.line=e.line,i.sizeInBytes=0),i.sizeInBytes+=i.method.length,i.sizeInBytes+=i.fileName.length,i.sizeInBytes+=i.assembly.length,i.sizeInBytes+=qt.baseSize,i.sizeInBytes+=i.level.toString().length,i.sizeInBytes+=i.line.toString().length,i}var kt,Ft,Ht,Ot=(kt=vt,__extends(Ut,kt),Ut);function Ut(){var e=kt.call(this)||this;return e.ver=2,e.metrics=[],e.properties={},e.measurements={},e}(Ht=Ft=Ft||{})[Ht.Measurement=0]="Measurement",Ht[Ht.Aggregation=1]="Aggregation";var jt,Pt=(jt=function(){this.kind=Ft.Measurement},__extends(zt,jt),zt);function zt(){var e=null!==jt&&jt.apply(this,arguments)||this;return e.aiDataContract={name:g.Required,kind:g.Default,value:g.Required,count:g.Default,min:g.Default,max:g.Default,stdDev:g.Default},e}var Gt;Gt=Ot,__extends(Bt,Gt),Bt.envelopeType="Microsoft.ApplicationInsights.{0}.Metric",Bt.dataType="MetricData";function Bt(e,t,n,r,i,a,o,s){var u=Gt.call(this)||this;u.aiDataContract={ver:g.Required,metrics:g.Required,properties:g.Default};var l=new Pt;return l.count=0<r?r:undefined,l.max=isNaN(a)||null===a?undefined:a,l.min=isNaN(i)||null===i?undefined:i,l.name=Qe.sanitizeString(e,t)||et.NotSpecified,l.value=n,u.metrics=[l],u.properties=Qe.sanitizeProperties(e,o),u.measurements=Qe.sanitizeMeasurements(e,s),u}var Wt,Xt=(Wt=xt,__extends(Vt,Wt),Vt);function Vt(){var e=Wt.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}var Kt;Kt=Xt,__extends(Qt,Kt),Qt.envelopeType="Microsoft.ApplicationInsights.{0}.Pageview",Qt.dataType="PageviewData";function Qt(e,t,n,r,i,a,o){var s=Kt.call(this)||this;return s.aiDataContract={ver:g.Required,name:g.Default,url:g.Default,duration:g.Default,properties:g.Default,measurements:g.Default,id:g.Default},s.id=Qe.sanitizeId(e,o),s.url=Qe.sanitizeUrl(e,n),s.name=Qe.sanitizeString(e,t)||et.NotSpecified,isNaN(r)||(s.duration=et.msToTimeSpan(r)),s.properties=Qe.sanitizeProperties(e,i),s.measurements=Qe.sanitizeMeasurements(e,a),s}var $t,Jt=($t=vt,__extends(Yt,$t),Yt);function Yt(){var e=$t.call(this)||this;return e.ver=2,e.success=!0,e.properties={},e.measurements={},e}var Zt,en=(Zt=Jt,__extends(tn,Zt),tn.envelopeType="Microsoft.ApplicationInsights.{0}.RemoteDependency",tn.dataType="RemoteDependencyData",tn);function tn(e,t,n,r,i,a,o,s,u,l,c,d){void 0===u&&(u="Ajax");var f=Zt.call(this)||this;f.aiDataContract={id:g.Required,ver:g.Required,name:g.Default,resultCode:g.Default,duration:g.Default,success:g.Default,data:g.Default,target:g.Default,type:g.Default,properties:g.Default,measurements:g.Default,kind:g.Default,value:g.Default,count:g.Default,min:g.Default,max:g.Default,stdDev:g.Default,dependencyKind:g.Default,dependencySource:g.Default,commandName:g.Default,dependencyTypeName:g.Default},f.id=t,f.duration=et.msToTimeSpan(i),f.success=a,f.resultCode=o+"",f.type=Qe.sanitizeString(e,u);var p=ot.ParseDependencyPath(e,n,s,r);return f.data=Qe.sanitizeUrl(e,r)||p.data,f.target=Qe.sanitizeString(e,p.target),l&&(f.target=f.target+" | "+l),f.name=Qe.sanitizeString(e,p.name),f.properties=Qe.sanitizeProperties(e,c),f.measurements=Qe.sanitizeMeasurements(e,d),f}var nn,rn=(nn=vt,__extends(an,nn),an);function an(){var e=nn.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}var on;on=rn,__extends(sn,on),sn.envelopeType="Microsoft.ApplicationInsights.{0}.Message",sn.dataType="MessageData";function sn(e,t,n,r,i){var a=on.call(this)||this;return a.aiDataContract={ver:g.Required,message:g.Required,severityLevel:g.Default,properties:g.Default},t=t||et.NotSpecified,a.message=Qe.sanitizeMessage(e,t),a.properties=Qe.sanitizeProperties(e,r),a.measurements=Qe.sanitizeMeasurements(e,i),n&&(a.severityLevel=n),a}var un,ln=(un=Xt,__extends(cn,un),cn);function cn(){var e=un.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}var dn;dn=ln,__extends(fn,dn),fn.envelopeType="Microsoft.ApplicationInsights.{0}.PageviewPerformance",fn.dataType="PageviewPerformanceData";function fn(e,t,n,r,i,a,o){var s=dn.call(this)||this;return s.aiDataContract={ver:g.Required,name:g.Default,url:g.Default,duration:g.Default,perfTotal:g.Default,networkConnect:g.Default,sentRequest:g.Default,receivedResponse:g.Default,domProcessing:g.Default,properties:g.Default,measurements:g.Default},s.url=Qe.sanitizeUrl(e,n),s.name=Qe.sanitizeString(e,t)||et.NotSpecified,s.properties=Qe.sanitizeProperties(e,i),s.measurements=Qe.sanitizeMeasurements(e,a),o&&(s.domProcessing=o.domProcessing,s.duration=o.duration,s.networkConnect=o.networkConnect,s.perfTotal=o.perfTotal,s.receivedResponse=o.receivedResponse,s.sentRequest=o.sentRequest),s}var pn,gn,hn;pn=ft,__extends(mn,pn);function mn(e,t){var n=pn.call(this)||this;return n.aiDataContract={baseType:g.Required,baseData:g.Required},n.baseType=e,n.baseData=t,n}(hn=gn=gn||{})[hn.Verbose=0]="Verbose",hn[hn.Information=1]="Information",hn[hn.Warning=2]="Warning",hn[hn.Error=3]="Error",hn[hn.Critical=4]="Critical";var vn=(xn.create=function(e,t,n,r,i,a){if(n=Qe.sanitizeString(r,n)||et.NotSpecified,J.isNullOrUndefined(e)||J.isNullOrUndefined(t)||J.isNullOrUndefined(n))throw Error("Input doesn't contain all required fields");var o={name:n,time:J.toISOString(new Date),iKey:"",ext:a||{},tags:[],data:{},baseType:t,baseData:e};if(!J.isNullOrUndefined(i))for(var s in i)i.hasOwnProperty(s)&&(o.data[s]=i[s]);return o},xn);function xn(){}var yn="AppInsightsPropertiesPlugin",Sn="constructor",In="prototype",Cn="function",Tn="_dynInstFuncs",_n="_isDynProxy",bn="_dynClass",Nn="_dynCls$",An="_unknown_",Mn="__proto__",Dn=Object.getPrototypeOf,wn=0;function En(e,t){return e&&Object[In].hasOwnProperty.call(e,t)}function Ln(e){return typeof e===Cn}function Rn(e){return e&&(e===Object[In]||e===Array[In])}function qn(e){return Rn(e)||e===Function[In]}function kn(e){if(e){if(Dn)return Dn(e);var t=e[Mn]||e[In]||e[Sn];if(t)return t}return null}function Fn(e,t,n){return t!==Sn&&Ln(e[t])&&(n||En(e,t))}function Hn(e){throw new TypeError("DynamicProto: "+e)}function On(e,t,n){function r(e,t){return function(){return t.apply(e,arguments)}}var i={};for(var a in n)i[a]=r(t,n[a]);for(var o=kn(e),s=[];o&&!qn(o)&&!function(e,t){for(var n=e.length-1;0<=n;n--)if(e[n]===t)return 1}(s,o);){for(var a in o)!i[a]&&Fn(o,a,!Dn)&&(i[a]=r(t,o[a]));s.push(o),o=kn(o)}return i}function Un(e,t,n,r){if(!Rn(e)){var i=n[Tn]=n[Tn]||{},a=i[t]=i[t]||{};for(var o in n)Fn(n,o,!1)&&n[o]!==r[o]&&(a[o]=n[o],delete n[o],En(e,o)&&(!e[o]||e[o][_n])||(e[o]=function(n,r){var i=function(){if(this&&En(n,bn)){var e=((this[Tn]||{})[n[bn]]||{})[r];if(e)return e.apply(this,arguments);Hn("Missing ["+r+"] "+Cn)}var t=n[r];return t===i&&(t=kn(n)[r]),Ln(t)||Hn("["+r+"] is not a "+Cn),t.apply(this,arguments)};return i[_n]=1,i}(e,o)))}}function jn(e,t){return En(e,In)?e.name||t||An:((e||{})[Sn]||{}).name||t||An}function Pn(e,t,n){En(e,In)||Hn("theClass is an invalid class definition.");var r=e[In];!function(e,t){for(var n=kn(t);n&&!qn(n);){if(n===e)return 1;n=kn(n)}}(r,t)&&Hn("["+jn(e)+"] is not in class heirarchy of ["+jn(t)+"]");var i=null;En(r,bn)?i=r[bn]:(i=Nn+jn(e,"_")+"$"+wn,wn++,r[bn]=i);var a=function(e){var t={};for(var n in e)!t[n]&&Fn(e,n,!1)&&(t[n]=e[n]);return t}(t);n(t,On(r,t,a)),Un(r,i,t,a)}var zn="properties",Gn=J.objKeys,Bn=J.arrForEach;function Wn(e,t,n){var r=0,i=e[t],a=e[n];return i&&a&&(r=ut.GetDuration(i,a)),r}function Xn(e,t,n,r,i){var a=0,o=Wn(n,r,i);return o&&(a=Vn(e,t,et.msToTimeSpan(o))),a}function Vn(e,t,n){var r="ajaxPerf",i=0;return e&&t&&n&&((e[r]=e[r]||{})[t]=n,i=1),i}function Kn(e,t){var n,r,s,i=e.perfTiming,a=t[zn]||{},o=0,u=J.isString,l="Start",c="End",d="domainLookup",f="connect",p="redirect",g="request",h="response",m="duration",v="startTime",x=f+c,y=g+l,S=h+c,I=p+l,C=(p=c,"transferSize"),T="encodedBodySize",_="decodedBodySize",b="serverTiming";i?(o|=Xn(a,p,i,I,"End"),o|=Xn(a,d,i,"domainLookupStart","domainLookupEnd"),o|=Xn(a,f,i,"connectStart",x),o|=Xn(a,g,i,y,"requestEnd"),o|=Xn(a,h,i,"responseStart",S),o|=Xn(a,"networkConnect",i,v,x),o|=Xn(a,"sentRequest",i,y,S),o|=Vn(a,m,n=(n=i[m])||(Wn(i,v,S)||0)),o|=Vn(a,"perfTotal",n),(r=i[b])&&(s={},Bn(r,function(n,e){var t,r,i,a=(t=n.name||""+e,(i=/([^\w\d_$])/g).test(r=t)&&(r=t.replace(i,"_")),r),o=s[a]||{};Bn(Gn(n),function(e){var t=n[e];("name"!==e&&u(t)||J.isNumber(t))&&(o[e]&&(t=o[e]+";"+t),!t&&u(t)||(o[e]=t))}),s[a]=o}),o|=Vn(a,b,s)),o|=Vn(a,C,i[C]),o|=Vn(a,T,i[T]),o|=Vn(a,_,i[_])):e.perfMark&&(o|=Vn(a,"missing",e.perfAttempts)),o&&(t[zn]=a)}var Qn=function(){var e=this;e.openDone=!1,e.setRequestHeaderDone=!1,e.sendDone=!1,e.abortDone=!1,e.stateChangeAttached=!1},$n=function vr(e,t,n){var r=this,i=n,l="responseText";r.perfMark=null,r.completed=!1,r.requestHeadersSize=null,r.requestHeaders=null,r.responseReceivingDuration=null,r.callbackDuration=null,r.ajaxTotalDuration=null,r.aborted=0,r.pageUrl=null,r.requestUrl=null,r.requestSize=0,r.method=null,r.status=null,r.requestSentTime=null,r.responseStartedTime=null,r.responseFinishedTime=null,r.callbackFinishedTime=null,r.endTime=null,r.xhrMonitoringState=new Qn,r.clientFailure=0,r.traceID=e,r.spanID=t,Pn(vr,r,function(u){u.getAbsoluteUrl=function(){return u.requestUrl?nt.getAbsoluteUrl(u.requestUrl):null},u.getPathName=function(){return u.requestUrl?Qe.sanitizeUrl(i,nt.getCompleteUrl(u.method,u.requestUrl)):null},u.CreateTrackItem=function(e,t,n){if(u.ajaxTotalDuration=Math.round(1e3*ut.GetDuration(u.requestSentTime,u.responseFinishedTime))/1e3,u.ajaxTotalDuration<0)return null;var r,i,a,o,s=((o={id:"|"+u.traceID+"."+u.spanID,target:u.getAbsoluteUrl(),name:u.getPathName(),type:e,duration:u.ajaxTotalDuration,success:200<=+u.status&&+u.status<400,responseCode:+u.status,method:u.method})[zn]={HttpMethod:u.method},o);return Kn(u,s),t&&0<Gn(u.requestHeaders).length&&(s[zn]=s[zn]||{},s[zn].requestHeaders=u.requestHeaders),!n||(r=n())&&((i=r.correlationContext)&&(s.correlationContext=i),r.headerMap&&0<Gn(r.headerMap).length&&(s[zn]=s[zn]||{},s[zn].responseHeaders=r.headerMap),400<=u.status&&(a=r.type,s[zn]=s[zn]||{},""!==a&&"text"!==a||(s[zn][l]=r[l]?r.statusText+" - "+r[l]:r.statusText),"json"===a&&(s[zn][l]=r.response?r.statusText+" - "+JSON.stringify(r.response):r.statusText))),s}})},Jn=(Yn.isValidTraceId=function(e){return e.match(/^[0-9a-f]{32}$/)&&"00000000000000000000000000000000"!==e},Yn.isValidSpanId=function(e){return e.match(/^[0-9a-f]{16}$/)&&"0000000000000000"!==e},Yn.prototype.toString=function(){return this.version+"-"+this.traceId+"-"+this.spanId+"-"+this.traceFlag},Yn.DEFAULT_TRACE_FLAG="01",Yn.DEFAULT_VERSION="00",Yn);function Yn(e,t){var n=this;n.traceFlag=Yn.DEFAULT_TRACE_FLAG,n.version=Yn.DEFAULT_VERSION,e&&Yn.isValidTraceId(e)?n.traceId=e:n.traceId=et.generateW3CId(),t&&Yn.isValidSpanId(t)?n.spanId=t:n.spanId=et.generateW3CId().substr(0,16)}var Zn="ai.ajxmn.",er="diagLog",tr="ajaxData",nr="throwInternal",rr="fetch",ir=J.isNullOrUndefined,ar=J.arrForEach,or=J.objKeys,sr=0;function ur(e){var t="";try{ir(e)||ir(e[tr])||ir(e[tr].requestUrl)||(t+="(url: '"+e[tr].requestUrl+"')")}catch(n){}return t}function lr(e,t,n,r,i){e[er]()[nr](Z.CRITICAL,t,n,r,i)}function cr(e,t,n,r,i){e[er]()[nr](Z.WARNING,t,n,r,i)}function dr(t,n,r){return function(e){lr(t,n,r,{ajaxDiagnosticsMessage:ur(e.inst),exception:et.dump(e.err)})}}function fr(e,t){return e&&t?e.indexOf(t):-1}var pr,gr=(pr=me,__extends(hr,pr),hr.getDefaultConfig=function(){return{maxAjaxCallsPerView:500,disableAjaxTracking:!1,disableFetchTracking:!0,disableCorrelationHeaders:!1,distributedTracingMode:L.AI,correlationHeaderExcludedDomains:["*.blob.core.windows.net","*.blob.core.chinacloudapi.cn","*.blob.core.cloudapi.de","*.blob.core.usgovcloudapi.net"],correlationHeaderDomains:undefined,appId:undefined,enableCorsCorrelation:!1,enableRequestHeaderTracking:!1,enableResponseHeaderTracking:!1,enableAjaxErrorStatusText:!1,enableAjaxPerfTracking:!1,maxAjaxPerfLookupAttempts:3,ajaxPerfLookupDelay:25}},hr.getEmptyConfig=function(){var t=this.getDefaultConfig();return ar(or(t),function(e){t[e]=undefined}),t},hr.prototype.processTelemetry=function(e,t){this.processNext(e,t)},hr.identifier="AjaxDependencyPlugin",hr);function hr(){var e=pr.call(this)||this;e.identifier=hr.identifier,e.priority=120;var y,S,I,C,T="trackDependencyDataInternal",t=F(),_=!1,b=!1,u=t&&t.host&&t.host.toLowerCase(),N=hr.getEmptyConfig(),A=!1,i=0,M=!1,D=0,w=!1,E=[],s={};return Pn(hr,e,function(p,c){function d(e,t,n){var r,i,a;E.push((i=t,a=n,(r=e)?Xe(r[q],i,a,!1):null))}function g(e,t,n){var r=!1,i=((J.isString(t)?t:(t||{}).url||"")||"").toLowerCase(),a=fr(i,"?"),o=fr(i,"#");return(-1===a||-1!==o&&o<a)&&(a=o),-1!==a&&(i=i.substring(0,a)),ir(e)?ir(t)||(r="object"==typeof t&&!0===t[dt]||!!n&&!0===n[dt]):r=!0===e[dt]||!0===i[dt],r?s[i]||(s[i]=1):s[i]&&(r=!0),r}function h(e,t){var n=!0,r=b;return ir(e)||(n=!0===t||!ir(e[tr])),r&&n}function f(e,t){var n,r,i;t.requestUrl&&C&&M&&((n=H())&&J.isFunction(n.mark)&&(r=C+e+"#"+ ++sr,n.mark(r),(i=n.getEntriesByName(r))&&1===i.length&&(t.perfMark=i[0])))}function m(a,o,s,u){var l=o.perfMark,c=H(),d=N.maxAjaxPerfLookupAttempts,f=N.ajaxPerfLookupDelay,p=o.requestUrl,g=0;!function h(){try{if(c&&l){g++;for(var e=null,t=c.getEntries(),n=t.length-1;0<=n;n--){var r=t[n];if(r){if("resource"===r.entryType)r.initiatorType!==a||-1===fr(r.name,p)&&-1===fr(p,r.name)||(e=r);else if("mark"===r.entryType&&r.name===l.name){o.perfTiming=e;break}if(r.startTime<l.startTime-1e3)break}}}!l||o.perfTiming||d<=g||!1===o.async?(l&&J.isFunction(c.clearMarks)&&c.clearMarks(l.name),o.perfAttempts=g,s()):setTimeout(h,f)}catch(i){u(i)}}()}function v(e){var t="";try{ir(e)||(t+="string"==typeof e?"(url: '"+e+"')":"(url: '"+e.url+"')")}catch(n){lr(p,ie.FailedMonitorAjaxOpen,"Failed to grab failed fetch diagnostics message",{exception:et.dump(n)})}return t}function x(e,t,i,n,r){function a(e,t,n){var r=n||{};r.fetchDiagnosticsMessage=v(i),t&&(r.exception=et.dump(t)),cr(p,e,"Failed to calculate the duration of the fetch call, monitoring data for this fetch call won't be sent.",r)}n&&(n.responseFinishedTime=ut.Now(),n.status=t,m("fetch",n,function(){var e=n.CreateTrackItem("Fetch",A,r);e?p[T](e):a(ie.FailedMonitorAjaxDur,null,{requestSentTime:n.requestSentTime,responseFinishedTime:n.responseFinishedTime})},function(e){a(ie.FailedMonitorAjaxGetCorrelationHeader,e,null)}))}p.initialize=function(e,t,n,r){if(!p.isInitialized()){c.initialize(e,t,n,r);var i=p._getTelCtx(),a=hr.getDefaultConfig();ar(or(a),function(e){N[e]=i.getConfig(hr.identifier,e,a[e])});var o,s=N.distributedTracingMode;if(A=N.enableRequestHeaderTracking,M=N.enableAjaxPerfTracking,D=N.maxAjaxCallsPerView,w=N.enableResponseHeaderTracking,I=s===L.AI||s===L.AI_AND_W3C,S=s===L.AI_AND_W3C||s===L.W3C,M&&(o=e.instrumentationKey||"unkwn",C=5<o.length?Zn+o.substring(o.length-5)+".":Zn+o+"."),!1===N.disableAjaxTracking&&(!function(e){var t,n=!1;typeof XMLHttpRequest===R||ir(XMLHttpRequest)||(t=XMLHttpRequest[q],n=!(ir(t)||ir(t.open)||ir(t.send)||ir(t.abort)));var r=et.getIEVersion();if(r&&r<9&&(n=!1),n)try{(new XMLHttpRequest)[tr]={};var i=XMLHttpRequest[q].open;XMLHttpRequest[q].open=i}catch(a){n=!1,lr(e,ie.FailedMonitorAjaxOpen,"Failed to enable XMLHttpRequest monitoring, extension is not supported",{exception:et.dump(a)})}return n}(p)||b||(d(XMLHttpRequest,"open",{req:function(e,t,n,r){var i,a,o,s,u,l,c,d=e.inst,f=d[tr];g(d,n)||!h(d,!0)||f&&f.xhrMonitoringState.openDone||(i=d,a=t,o=n,s=r,u=y&&y.telemetryTrace&&y.telemetryTrace.traceID||et.generateW3CId(),l=et.generateW3CId().substr(0,16),(c=new $n(u,l,p[er]())).method=a,c.requestUrl=o,c.xhrMonitoringState.openDone=!0,c.requestHeaders={},c.async=s,i[tr]=c,function(a){a[tr].xhrMonitoringState.stateChangeAttached=ne.Attach(a,"readystatechange",function(){try{a&&4===a.readyState&&h(a)&&((i=(r=a)[tr]).responseFinishedTime=ut.Now(),i.status=r.status,m("xmlhttprequest",i,function(){try{var e=i.CreateTrackItem("Ajax",A,function(){var e,t,i,n={statusText:r.statusText,headerMap:null,correlationContext:function(e){try{var t=e.getAllResponseHeaders();if(null!==t)if(-1!==fr(t.toLowerCase(),Ve.requestContextHeaderLowerCase)){var n=e.getResponseHeader(Ve.requestContextHeader);return it.getCorrelationContext(n)}}catch(r){cr(p,ie.FailedMonitorAjaxGetCorrelationHeader,"Failed to get Request-Context correlation header as it may be not included in the response or not accessible.",{ajaxDiagnosticsMessage:ur(e),exception:et.dump(r)})}}(r),type:r.responseType,responseText:function(e){try{var t=e.responseType;if(""===t||"text"===t)return e.responseText}catch(n){}return null}(r),response:r.response};return!w||(e=r.getAllResponseHeaders())&&(t=J.strTrim(e).split(/[\r\n]+/),i={},ar(t,function(e){var t=e.split(": "),n=t.shift(),r=t.join(": ");i[n]=r}),n.headerMap=i),n});e?p[T](e):n(null,{requestSentTime:i.requestSentTime,responseFinishedTime:i.responseFinishedTime})}finally{try{r[tr]=null}catch(t){}}},function(e){n(e,null)}))}catch(t){var e=et.dump(t);e&&-1!==fr(e.toLowerCase(),"c00c023f")||lr(p,ie.FailedMonitorAjaxRSC,"Failed to monitor XMLHttpRequest 'readystatechange' event handler, monitoring data for this ajax call may be incorrect.",{ajaxDiagnosticsMessage:ur(a),exception:e})}function n(e,t){var n=t||{};n.ajaxDiagnosticsMessage=ur(r),e&&(n.exception=et.dump(e)),cr(p,ie.FailedMonitorAjaxDur,"Failed to calculate the duration of the ajax call, monitoring data for this ajax call won't be sent.",n)}var r,i})}(i))},hkErr:dr(p,ie.FailedMonitorAjaxOpen,"Failed to monitor XMLHttpRequest.open, monitoring data for this ajax call may be incorrect.")}),d(XMLHttpRequest,"send",{req:function(e,t){var n=e.inst,r=n[tr];h(n)&&!r.xhrMonitoringState.sendDone&&(f("xhr",r),r.requestSentTime=ut.Now(),n=p.includeCorrelationHeaders(r,undefined,undefined,n),r.xhrMonitoringState.sendDone=!0)},hkErr:dr(p,ie.FailedMonitorAjaxSend,"Failed to monitor XMLHttpRequest, monitoring data for this ajax call may be incorrect.")}),d(XMLHttpRequest,"abort",{req:function(e){var t=e.inst,n=t[tr];h(t)&&!n.xhrMonitoringState.abortDone&&(n.aborted=1,n.xhrMonitoringState.abortDone=!0)},hkErr:dr(p,ie.FailedMonitorAjaxAbort,"Failed to monitor XMLHttpRequest.abort, monitoring data for this ajax call may be incorrect.")}),A&&d(XMLHttpRequest,"setRequestHeader",{req:function(e,t,n){var r=e.inst;h(r)&&(r[tr].requestHeaders[t]=n)},hkErr:dr(p,ie.FailedMonitorAjaxSetRequestHeader,"Failed to monitor XMLHttpRequest.setRequestHeader, monitoring data for this ajax call may be incorrect.")}),b=!0)),function(){var e=function(){var e=k();return!e||ir(e.Request)||ir(e.Request[q])||ir(e[rr])?null:e[rr]}();if(!e)return;var t=k(),o=e.polyfill;!1===N.disableFetchTracking?(E.push(Xe(t,rr,{req:function(e,t,n){var r,i,a;!_||g(null,t,n)||o&&b||(r=e.ctx(),i=function(e,t){var n=y&&y.telemetryTrace&&y.telemetryTrace.traceID||et.generateW3CId(),r=et.generateW3CId().substr(0,16),i=new $n(n,r,p[er]());i.requestSentTime=ut.Now(),e instanceof Request?i.requestUrl=e?e.url:"":i.requestUrl=e;var a="GET";t&&t.method?a=t.method:e&&e instanceof Request&&(a=e.method);i.method=a;var o={};{A&&new Headers((t?t.headers:0)||e instanceof Request&&e.headers||{}).forEach(function(e,t){o[t]=e})}return i.requestHeaders=o,f("fetch",i),i}(t,n),(a=p.includeCorrelationHeaders(i,t,n))!==n&&e.set(1,a),r.data=i)},rsp:function(e,t){var n=e.ctx().data;n&&(e.rslt=e.rslt.then(function(t){return x(0,(t||{}).status,t,n,function(){var n,e={statusText:t.statusText,headerMap:null,correlationContext:function(e){if(e&&e.headers)try{var t=e.headers.get(Ve.requestContextHeader);return it.getCorrelationContext(t)}catch(n){cr(p,ie.FailedMonitorAjaxGetCorrelationHeader,"Failed to get Request-Context correlation header as it may be not included in the response or not accessible.",{fetchDiagnosticsMessage:v(e),exception:et.dump(n)})}}(t)};return w&&(n={},t.headers.forEach(function(e,t){n[t]=e}),e.headerMap=n),e}),t})["catch"](function(e){throw x(0,0,t,n,null,e.message),e}))},hkErr:dr(p,ie.FailedMonitorAjaxOpen,"Failed to monitor Window.fetch, monitoring data for this fetch call may be incorrect.")})),_=!0):o&&E.push(Xe(t,rr,{req:function(e,t,n){g(null,t,n)}}));o&&(t[rr].polyfill=o)}(),0<n.length&&n){for(var u=void 0,l=0;!u&&l<n.length;)n[l]&&n[l].identifier===yn&&(u=n[l]),l++;u&&(y=u.context)}}},p.teardown=function(){ar(E,function(e){e.rm()}),b=_=!(E=[]),p.setInitialized(!1)},p.trackDependencyData=function(e,t){p[T](e,t)},p.includeCorrelationHeaders=function(e,t,n,r){var i,a,o,s=p._currentWindowHost||u;return t?(it.canIncludeCorrelationHeader(N,e.getAbsoluteUrl(),s)&&((n=n||{}).headers=new Headers(n.headers||t instanceof Request&&t.headers||{}),I&&(i="|"+e.traceID+"."+e.spanID,n.headers.set(Ve.requestIdHeader,i),A&&(e.requestHeaders[Ve.requestIdHeader]=i)),(a=N.appId||y&&y.appId())&&(n.headers.set(Ve.requestContextHeader,Ve.requestContextAppIdFormat+a),A&&(e.requestHeaders[Ve.requestContextHeader]=Ve.requestContextAppIdFormat+a)),S&&(o=new Jn(e.traceID,e.spanID),n.headers.set(Ve.traceParentHeader,o.toString()),A&&(e.requestHeaders[Ve.traceParentHeader]=o.toString()))),n):r?(it.canIncludeCorrelationHeader(N,e.getAbsoluteUrl(),s)&&(I&&(i="|"+e.traceID+"."+e.spanID,r.setRequestHeader(Ve.requestIdHeader,i),A&&(e.requestHeaders[Ve.requestIdHeader]=i)),(a=N.appId||y&&y.appId())&&(r.setRequestHeader(Ve.requestContextHeader,Ve.requestContextAppIdFormat+a),A&&(e.requestHeaders[Ve.requestContextHeader]=Ve.requestContextAppIdFormat+a)),S&&(o=new Jn(e.traceID,e.spanID),r.setRequestHeader(Ve.traceParentHeader,o.toString()),A&&(e.requestHeaders[Ve.traceParentHeader]=o.toString()))),r):undefined},p[T]=function(e,t,n){var r;-1===D||i<D?(N.distributedTracingMode!==L.W3C&&N.distributedTracingMode!==L.AI_AND_W3C||"string"!=typeof e.id||"."===e.id[e.id.length-1]||(e.id+="."),r=vn.create(e,en.dataType,en.envelopeType,p[er](),t,n),p.core.track(r)):i===D&&lr(p,ie.MaxAjaxPerPVExceeded,"Maximum ajax per page view limit reached, ajax monitoring is paused until the next trackPageView(). In order to increase the limit set the maxAjaxCallsPerView configuration parameter.",!0),++i}}),e}e.AjaxPlugin=gr,e.ajaxRecord=$n,function(e,t,n){var r=Object.defineProperty;if(r)try{return r(e,t,n)}catch(i){}typeof n.value!==undefined&&(e[t]=n.value)}(e,"__esModule",{value:!0})}); | ||
//# sourceMappingURL=applicationinsights-dependencies-js.min.js.map |
/*! | ||
* Application Insights JavaScript SDK - Dependencies Plugin, 2.5.4 | ||
* Application Insights JavaScript SDK - Dependencies Plugin, 2.5.5 | ||
* Copyright (c) Microsoft and contributors. All rights reserved. | ||
@@ -7,3 +7,2 @@ */ | ||
import * as tslib_1 from "tslib"; | ||
import { RequestHeaders, Util, CorrelationIdHelper, TelemetryItemCreator, RemoteDependencyData, DateTimeUtils, DisabledPropertyName, PropertiesPluginIdentifier, DistributedTracingModes } from '@microsoft/applicationinsights-common'; | ||
@@ -50,7 +49,4 @@ import { CoreUtils, LoggingSeverity, _InternalMessageId, BaseTelemetryPlugin, getLocation, getGlobal, strUndefined, strPrototype, InstrumentFunc, InstrumentProto, getPerformance } from '@microsoft/applicationinsights-core-js'; | ||
} | ||
// disable in IE8 or older (https://www.w3schools.com/jsref/jsref_trim_string.asp) | ||
try { | ||
" a ".trim(); | ||
} | ||
catch (ex) { | ||
var ieVer = Util.getIEVersion(); | ||
if (ieVer && ieVer < 9) { | ||
result = false; | ||
@@ -115,3 +111,3 @@ } | ||
var AjaxMonitor = /** @class */ (function (_super) { | ||
tslib_1.__extends(AjaxMonitor, _super); | ||
__extends(AjaxMonitor, _super); | ||
function AjaxMonitor() { | ||
@@ -534,3 +530,3 @@ var _this = _super.call(this) || this; | ||
// the regex converts the header string into an array of individual headers | ||
var arr = headers.trim().split(/[\r\n]+/); | ||
var arr = CoreUtils.strTrim(headers).split(/[\r\n]+/); | ||
var responseHeaderMap_2 = {}; | ||
@@ -537,0 +533,0 @@ _arrForEach(arr, function (line) { |
/*! | ||
* Application Insights JavaScript SDK - Dependencies Plugin, 2.5.4 | ||
* Application Insights JavaScript SDK - Dependencies Plugin, 2.5.5 | ||
* Copyright (c) Microsoft and contributors. All rights reserved. | ||
@@ -4,0 +4,0 @@ */ |
/*! | ||
* Application Insights JavaScript SDK - Dependencies Plugin, 2.5.4 | ||
* Application Insights JavaScript SDK - Dependencies Plugin, 2.5.5 | ||
* Copyright (c) Microsoft and contributors. All rights reserved. | ||
@@ -4,0 +4,0 @@ */ |
/*! | ||
* Application Insights JavaScript SDK - Dependencies Plugin, 2.5.4 | ||
* Application Insights JavaScript SDK - Dependencies Plugin, 2.5.5 | ||
* Copyright (c) Microsoft and contributors. All rights reserved. | ||
@@ -7,4 +7,5 @@ */ | ||
import '@microsoft/applicationinsights-shims'; | ||
export { AjaxMonitor as AjaxPlugin } from "./ajax"; | ||
export { ajaxRecord } from "./ajaxRecord"; | ||
//# sourceMappingURL=applicationinsights-dependencies-js.js.map |
/*! | ||
* Application Insights JavaScript SDK - Dependencies Plugin, 2.5.4 | ||
* Application Insights JavaScript SDK - Dependencies Plugin, 2.5.5 | ||
* Copyright (c) Microsoft and contributors. All rights reserved. | ||
@@ -4,0 +4,0 @@ */ |
/*! | ||
* Application Insights JavaScript SDK - Dependencies Plugin, 2.5.4 | ||
* Application Insights JavaScript SDK - Dependencies Plugin, 2.5.5 | ||
* Copyright (c) Microsoft and contributors. All rights reserved. | ||
*/ | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e.Microsoft=e.Microsoft||{},e.Microsoft.ApplicationInsights={}))}(this,function(e){"use strict";var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function t(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?function(e){var t=Object.create;if(t)return t(e);if(null==e)return{};var n=typeof e;if("object"!=n&&"function"!=n)throw new TypeError("Object prototype may only be an Object:"+e);function r(){}return r.prototype=e,new r}(t):(n.prototype=t.prototype,new n)}var a,n,g,i,R,o,s=function(){return(s=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};(n=a=a||{})[n.LocalStorage=0]="LocalStorage",n[n.SessionStorage=1]="SessionStorage",(i=g=g||{})[i.Default=0]="Default",i[i.Required=1]="Required",i[i.Array=2]="Array",i[i.Hidden=4]="Hidden",(o=R=R||{})[o.AI=0]="AI",o[o.AI_AND_W3C=1]="AI_AND_W3C",o[o.W3C=2]="W3C";var u=2,k="undefined",l="object",F="prototype",c="function",f="window",d="location",p="performance",h="JSON";function O(){return typeof globalThis!==k&&globalThis?globalThis:typeof self!==k&&self?self:typeof window!==k&&window?window:typeof global!==k&&global?global:null}function m(e){var t=O();return t&&t[e]?t[e]:e===f&&v()?window:null}function v(){return Boolean(typeof window===l&&window)}function y(){return v()?window:m(f)}function x(){return function e(){return Boolean(typeof document===l&&document)}()?document:m("document")}function S(){return function e(){return Boolean(typeof navigator===l&&navigator)}()?navigator:m("navigator")}function H(){return typeof location===l&&location?location:m(d)}function j(){return m(p)}function C(){return Boolean(typeof JSON===l&&JSON||null!==m(h))}function I(){return C()?JSON||m(h):null}var T="attachEvent",b="addEventListener",N="detachEvent",A="removeEventListener";function M(e,t){return typeof e===t}function D(e){return M(e,k)||e===undefined}function w(e){return D(e)||null===e}function _(e,t){return e&&Object[F].hasOwnProperty.call(e,t)}function E(e){return M(e,l)}function L(e){return M(e,c)}function q(e,t,n,r){void 0===r&&(r=!1);var i=!1;if(!w(e))try{w(e[b])?w(e[T])||(e[T]("on"+t,n),i=!0):(e[b](t,n,r),i=!0)}catch(a){}return i}function U(e,t,n,r){if(void 0===r&&(r=!1),!w(e))try{w(e[A])?w(e[N])||e[N]("on"+t,n):e[A](t,n,r)}catch(i){}}var P=(z.isDate=function(e){return"[object Date]"===Object[F].toString.call(e)},z.isString=function(e){return M(e,"string")},z.isNumber=function(e){return M(e,"number")},z.isBoolean=function(e){return M(e,"boolean")},z.disableCookies=function(){z._canUseCookies=!1},z.newGuid=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(W,function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})},z.toISOString=function(e){if(z.isDate(e)){var t=function(e){var t=String(e);return 1===t.length&&(t="0"+t),t};return e.getUTCFullYear()+"-"+t(e.getUTCMonth()+1)+"-"+t(e.getUTCDate())+"T"+t(e.getUTCHours())+":"+t(e.getUTCMinutes())+":"+t(e.getUTCSeconds())+"."+String((e.getUTCMilliseconds()/1e3).toFixed(3)).slice(2,5)+"Z"}},z.arrForEach=function(e,t,n){for(var r=e.length,i=0;i<r;++i)i in e&&t.call(n||e,e[i],i,e)},z.arrIndexOf=function(e,t,n){for(var r=e.length,i=n||0,a=Math.max(0<=i?i:r-Math.abs(i),0);a<r;a++)if(a in e&&e[a]===t)return a;return-1},z.arrMap=function(e,t,n){for(var r=e.length,i=n||e,a=new Array(r),o=0;o<r;o++)o in e&&(a[o]=t.call(i,e[o],e));return a},z.arrReduce=function(e,t,n){var r,i=e.length,a=0;if(3<=arguments.length)r=n;else{for(;a<i&&!(a in e);)a++;r=e[a++]}for(;a<i;)a in e&&(r=t(r,e[a],a,e)),a++;return r},z.objCreate=function(e){if(null==e)return{};if(!E(e)&&!L(e))throw new TypeError("Object prototype may only be an Object: "+e);function t(){}return t[F]=e,new t},z.objKeys=function(e){var t=!{toString:null}.propertyIsEnumerable("toString");if(!(L(e)||E(e)&&null!==e))throw new TypeError("objKeys called on non-object");var n=[];for(var r in e)_(e,r)&&n.push(r);if(t)for(var i=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],a=i.length,o=0;o<a;o++)_(e,i[o])&&n.push(i[o]);return n},z.objDefineAccessors=function(e,t,n,r){var i=Object.defineProperty;if(i)try{var a={enumerable:!0,configurable:!0};return n&&(a.get=n),r&&(a.set=r),i(e,t,a),!0}catch(o){}return!1},z.addEventHandler=function(e,t){var n=!1,r=y();r&&(n=q(r,e,t),n=q(r.body,e,t)||n);var i=x();return i&&(n=X.Attach(i,e,t)||n),n},z.isTypeof=M,z.isUndefined=D,z.isNullOrUndefined=w,z.hasOwnProperty=_,z.isFunction=L,z.isObject=E,z);function z(){}var G,B,W=/[xy]/g,X=(V.Attach=q,V.AttachEvent=q,V.Detach=U,V.DetachEvent=U,V);function V(){}(B=G=G||{})[B.CRITICAL=1]="CRITICAL",B[B.WARNING=2]="WARNING";var K={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},Q=($.sanitizeDiagnosticText=function(e){return e?'"'+e.replace(/\"/g,"")+'"':""},$.dataType="MessageData",$.AiNonUserActionablePrefix="AI (Internal): ",$.AiUserActionablePrefix="AI: ",$);function $(e,t,n,r){void 0===n&&(n=!1),this.messageId=e,this.message=(n?$.AiUserActionablePrefix:$.AiNonUserActionablePrefix)+e;var i="";C()&&(i=I().stringify(r));var a=(t?" message:"+$.sanitizeDiagnosticText(t):"")+(r?" props:"+$.sanitizeDiagnosticText(i):"");this.message+=a}var J=(Y.prototype.throwInternal=function(e,t,n,r,i){void 0===i&&(i=!1);var a=new Q(t,n,i,r),o=this;if(o.enableDebugExceptions())throw a;if(!P.isUndefined(a)&&a&&!P.isUndefined(a.message)){if(i){var s=+a.messageId;!o._messageLogged[s]&&o.consoleLoggingLevel()>=G.WARNING&&(o.warnToConsole(a.message),o._messageLogged[s]=!0)}else o.consoleLoggingLevel()>=G.WARNING&&o.warnToConsole(a.message);o.logInternalMessage(e,a)}},Y.prototype.warnToConsole=function(e){!P.isUndefined(console)&&console&&(P.isFunction(console.warn)?console.warn(e):P.isFunction(console.log)&&console.log(e))},Y.prototype.resetInternalMessageCount=function(){this._messageCount=0,this._messageLogged={}},Y.prototype.logInternalMessage=function(e,t){var n=this;if(!n._areInternalMessagesThrottled()){var r=!0,i=n.AIInternalMessagePrefix+t.messageId;if(n._messageLogged[i]?r=!1:n._messageLogged[i]=!0,r&&(e<=n.telemetryLoggingLevel()&&(n.queue.push(t),n._messageCount++),n._messageCount===n.maxInternalMessageLimit())){var a="Internal events throttle limit per PageView reached for this app.",o=new Q(K.MessageLimitPerPVExceeded,a,!1);n.queue.push(o),n.warnToConsole(a)}}},Y.prototype._areInternalMessagesThrottled=function(){return this._messageCount>=this.maxInternalMessageLimit()},Y);function Y(e){this.queue=[],this.AIInternalMessagePrefix="AITR_",this._messageCount=0,this._messageLogged={},this.enableDebugExceptions=function(){return!1},this.consoleLoggingLevel=function(){return 0},this.telemetryLoggingLevel=function(){return 1},this.maxInternalMessageLimit=function(){return 25},P.isNullOrUndefined(e)||(P.isNullOrUndefined(e.loggingLevelConsole)||(this.consoleLoggingLevel=function(){return e.loggingLevelConsole}),P.isNullOrUndefined(e.loggingLevelTelemetry)||(this.telemetryLoggingLevel=function(){return e.loggingLevelTelemetry}),P.isNullOrUndefined(e.maxMessageLimit)||(this.maxInternalMessageLimit=function(){return e.maxMessageLimit}),P.isNullOrUndefined(e.enableDebugExceptions)||(this.enableDebugExceptions=function(){return e.enableDebugExceptions}))}var Z=P.isFunction,ee=function ir(i,a){var o=this,s=null,u=Z(i.processTelemetry),l=Z(i.setNextPlugin);o._hasRun=!1,o.getPlugin=function(){return i},o.getNext=function(){return s},o.setNext=function(e){s=e},o.processTelemetry=function(e,t){if(t=t||a,i&&u){o._hasRun=!0;try{t.setNext(s),l&&i.setNextPlugin(s),s&&(s._hasRun=!1),i.processTelemetry(e,t)}catch(r){var n=s&&s._hasRun;s&&n||t.diagLog().throwInternal(G.CRITICAL,K.PluginException,"Plugin ["+i.identifier+"] failed during processTelemetry - "+r),s&&!n&&s.processTelemetry(e,t)}}else s&&(o._hasRun=!0,s.processTelemetry(e,t))}},te=P.isNullOrUndefined;function ne(e,t){var n=[];if(e&&0<e.length)for(var r=null,i=0;i<e.length;i++){var a=e[i];if(a&&P.isFunction(a.processTelemetry)){var o=new ee(a,t);n.push(o),r&&r.setNext(o),r=o}}return 0<n.length?n[0]:null}var re=function ar(e,a,n,t){var o=this,r=null;null!==t&&(e&&P.isFunction(e.getPlugin)?r=function s(e,t,n){var r=[],i=!n;if(e)for(;e;){var a=e.getPlugin();!i&&a!==n||(i=!0,r.push(a)),e=e.getNext()}return i||r.push(n),ne(r,t)}(e,o,t||e.getPlugin()):t?r=function u(e,t,n){var r=e,i=!1;return n&&e&&(r=[],P.arrForEach(e,function(e){!i&&e!==n||(i=!0,r.push(e))})),n&&!i&&(r=r||[]).push(n),ne(r,t)}(e,o,t):P.isUndefined(t)&&(r=ne(e,o))),o.core=function(){return n},o.diagLog=function(){var e=(n||{}).logger;return e=e||new J(a||{})},o.getCfg=function(){return a},o.getExtCfg=function(e,t){var n;if(void 0===t&&(t={}),a){var r=a.extensionConfig;r&&e&&(n=r[e])}return n||t},o.getConfig=function(e,t,n){var r;void 0===n&&(n=!1);var i=o.getExtCfg(e,null);return i&&!te(i[t])?r=i[t]:a&&!te(a[t])&&(r=a[t]),te(r)?n:r},o.hasNext=function(){return null!=r},o.getNext=function(){return r},o.setNext=function(e){r=e},o.processNext=function(e){var t=r;t&&(r=t.getNext(),t.processTelemetry(e,o))},o.createNew=function(e,t){return void 0===e&&(e=null),new ar(e||r,a,n,t)}},ie=P.isFunction,ae="getPlugin",oe=(se.prototype.initialize=function(e,t,n,r){this._baseTelInit(e,t,n,r)},se);function se(){var a=this,o=!1,s=null,u=null;a.core=null,a.diagLog=function(e){return a._getTelCtx(e).diagLog()},a.isInitialized=function(){return o},a.setInitialized=function(e){o=e},a.setNextPlugin=function(e){u=e},a.processNext=function(e,t){t?t.processNext(e):u&&ie(u.processTelemetry)&&u.processTelemetry(e,null)},a._getTelCtx=function(e){void 0===e&&(e=null);var t=e;if(!t){var n=s||new re(null,{},a.core);t=u&&u[ae]?n.createNew(null,u[ae]):n.createNew(null,u)}return t},a._baseTelInit=function(e,t,n,r){e&&(e.extensionConfig=e.extensionConfig||[]),!r&&t&&(r=t.getProcessTelContext().getNext());var i=u;u&&u[ae]&&(i=u[ae]()),a.core=t,s=new re(r,e,t,i),o=!0}}var ue=P.isFunction,le="processTelemetry",ce="priority",fe="setNextPlugin",de="isInitialized";function pe(t,n){for(var e=[],r=null,i=t.getNext();i;){var a=i.getPlugin();a&&(r&&ue(r[fe])&&ue(a[le])&&r[fe](a),ue(a[de])&&a[de]()||e.push(a),r=a,i=i.getNext())}P.arrForEach(e,function(e){e.initialize(t.getCfg(),t.core(),n,t.getNext())})}function ge(e){return e.sort(function(e,t){var n=0,r=ue(t[le]);return ue(e[le])?n=r?e[ce]-t[ce]:1:r&&(n=-1),n})}var he=500,me="Channel has invalid priority",ve=P.arrForEach,ye=P.objDefineAccessors;function xe(e,t){t&&0<t.length&&(function n(e){ve(e,function(e){if(e.priority<he)throw Error(me+e.identifier)})}(t=t.sort(function(e,t){return e.priority-t.priority})),e.push(t))}var Se,Ce=(t(Ie,Se=oe),Ie.prototype.processTelemetry=function(t,n){var r=this;this._channelQueue&&ve(this._channelQueue,function(e){0<e.length&&r._getTelCtx(n).createNew(e).processNext(t)})},Ie.prototype.getChannelControls=function(){return this._channelQueue},Ie.prototype.initialize=function(t,n,r){if(!this.isInitialized()){Se.prototype.initialize.call(this,t,n,r),t.isCookieUseDisabled&&P.disableCookies();var e=this._channelQueue=function i(e,t){var n=[];if(e&&ve(e,function(e){return xe(n,e)}),t){var r=[];ve(t,function(e){e.priority>he&&r.push(e)}),xe(n,r)}return n}((t||{}).channels,r);ve(e,function(e){return pe(new re(e,t,n),r)})}},Ie._staticInit=(ye(Ie.prototype,"ChannelControls",Ie.prototype.getChannelControls),void ye(Ie.prototype,"channelQueue",Ie.prototype.getChannelControls)),Ie);function Ie(){var e=null!==Se&&Se.apply(this,arguments)||this;return e.identifier="ChannelControllerPlugin",e.priority=he,e}var Te=P.arrForEach,be=P.isNullOrUndefined,Ne=(Ae.prototype.initialize=function(e,t,r,n){var i=this;if(i.isInitialized())throw Error("Core should not be initialized more than once");if(!e||be(e.instrumentationKey))throw Error("Please provide instrumentation key");i.config=e;var a=i._channelController;n=n||P.objCreate({addNotificationListener:function(e){},removeNotificationListener:function(e){},eventsSent:function(e){},eventsDiscarded:function(e,t){}}),i._notificationManager=n,e.extensions=be(e.extensions)?[]:e.extensions,(e.extensionConfig=be(e.extensionConfig)?{}:e.extensionConfig).NotificationManager=n,r=r||P.objCreate({throwInternal:function(e,t,n,r,i){void 0===i&&(i=!1)},warnToConsole:function(e){},resetInternalMessageCount:function(){}}),i.logger=r;var o=[];o.push.apply(o,t.concat(e.extensions)),o=ge(o);var s=[],u={};if(Te(o,function(e){if(be(e)||be(e.initialize))throw Error("Extensions must provide callback to initialize");var t=e.priority,n=e.identifier;e&&t&&(be(u[t])?u[t]=n:r.warnToConsole("Two extensions have same priority #"+t+" - "+u[t]+", "+n)),(!t||t<a.priority)&&s.push(e)}),o.push(a),s.push(a),o=ge(o),i._extensions=o,pe(new re([a],e,i),o),pe(new re(s,e,i),o),i._extensions=s,0===i.getTransmissionControls().length)throw new Error("No channels available");i._setInit(!0)},Ae.prototype.getTransmissionControls=function(){return this._channelController.getChannelControls()},Ae.prototype.track=function(e){var t=this;e.iKey||(e.iKey=t.config.instrumentationKey),e.time||(e.time=P.toISOString(new Date)),be(e.ver)&&(e.ver="4.0"),t.isInitialized()?(0<t._eventQueue.length&&(Te(t._eventQueue,function(e){t.getProcessTelContext().processNext(e)}),t._eventQueue=[]),t.getProcessTelContext().processNext(e)):t._eventQueue.push(e)},Ae.prototype.getProcessTelContext=function(){var e=this._extensions,t=e;return e&&0!==e.length||(t=[this._channelController]),new re(t,this.config,this)},Ae);function Ae(){var t=!1,e=this;e._extensions=new Array,e._channelController=new Ce,e.isInitialized=function(){return t},e._setInit=function(e){t=e},e._eventQueue=[]}var Me=(De.prototype.addNotificationListener=function(e){this.listeners.push(e)},De.prototype.removeNotificationListener=function(e){for(var t=P.arrIndexOf(this.listeners,e);-1<t;)this.listeners.splice(t,1),t=P.arrIndexOf(this.listeners,e)},De.prototype.eventsSent=function(t){for(var n=this,e=function(e){r.listeners[e].eventsSent&&setTimeout(function(){return n.listeners[e].eventsSent(t)},0)},r=this,i=0;i<this.listeners.length;++i)e(i)},De.prototype.eventsDiscarded=function(t,n){for(var r=this,e=function(e){i.listeners[e].eventsDiscarded&&setTimeout(function(){return r.listeners[e].eventsDiscarded(t,n)},0)},i=this,a=0;a<this.listeners.length;++a)e(a)},De);function De(){this.listeners=[]}var we;t(_e,we=Ne),_e.prototype.initialize=function(e,t){var n=this;n._notificationManager=new Me,n.logger=new J(e),n.config=e,we.prototype.initialize.call(this,e,t,n.logger,n._notificationManager)},_e.prototype.getTransmissionControls=function(){return we.prototype.getTransmissionControls.call(this)},_e.prototype.track=function(e){if(null===e)throw this._notifyInvalidEvent(e),Error("Invalid telemetry item");this._validateTelemetryItem(e),we.prototype.track.call(this,e)},_e.prototype.addNotificationListener=function(e){this._notificationManager&&this._notificationManager.addNotificationListener(e)},_e.prototype.removeNotificationListener=function(e){this._notificationManager&&this._notificationManager.removeNotificationListener(e)},_e.prototype.pollInternalLogs=function(r){var t=this,e=this.config.diagnosticLogInterval;return e&&0<e||(e=1e4),setInterval(function(){var n=t,e=n.logger?n.logger.queue:[];P.arrForEach(e,function(e){var t={name:r||"InternalMessageId: "+e.messageId,iKey:n.config.instrumentationKey,time:P.toISOString(new Date),baseType:Q.dataType,baseData:{message:e.message}};n.track(t)}),e.length=0},e)},_e.prototype._validateTelemetryItem=function(e){if(P.isNullOrUndefined(e.name))throw this._notifyInvalidEvent(e),Error("telemetry name required")},_e.prototype._notifyInvalidEvent=function(e){this._notificationManager&&this._notificationManager.eventsDiscarded([e],u)};function _e(){return we.call(this)||this}var Ee="_aiHooks",Le=["req","rsp","hkErr","fnErr"];function qe(e,t){if(e)for(var n=0;n<e.length&&!t(e[n],n);n++);}function Re(e,u,l,c,f){0<=f&&f<=2&&qe(e,function(e,t){var n=e.cbks,r=n[Le[f]];if(r){u.ctx=function(){return c[t]=c[t]||{}};try{r.apply(u.inst,l)}catch(o){var i=u.err;try{var a=n[Le[2]];a&&(u.err=o,a.apply(u.inst,l))}catch(s){}finally{u.err=i}}}})}function ke(l){return function(){var n=arguments,e=l.h,r={name:l.n,inst:this,ctx:null,set:function s(e,t){(n=a([],n))[e]=t,i=a([r],n)}},t=[],i=a([r],n);function a(t,e){return qe(e,function(e){t.push(e)}),t}Re(e,r,i,t,0);var o=l.f;try{r.rslt=o.apply(this,n)}catch(u){throw r.err=u,Re(e,r,i,t,3),u}return Re(e,r,i,t,1),r.rslt}}function Fe(e,t,n,r){if(void 0===r&&(r=!0),e&&t&&n){var i=function l(e,t,n){var r=null;return e&&(P.hasOwnProperty(e,t)?r=e:n&&(r=l(e[F],t,!1))),r}(e,t,r),a=i[t];if(typeof a===c){var o=a[Ee];if(!o){var s=ke(o={i:0,n:t,f:a,h:[]});s[Ee]=o,i[t]=s}var u={id:o.i,cbks:n,rm:function(){var n=this.id;qe(o.h,function(e,t){return e.id===n&&(o.h.splice(t,1),1)})}};return o.i++,o.h.push(u),u}}return null}var Oe=(He.requestContextHeader="Request-Context",He.requestContextTargetKey="appId",He.requestContextAppIdFormat="appId=cid-v1:",He.requestIdHeader="Request-Id",He.traceParentHeader="traceparent",He.sdkContextHeader="Sdk-Context",He.sdkContextHeaderAppIdRequest="appId",He.requestContextHeaderLowerCase="request-context",He);function He(){}var je=(Ue.sanitizeKeyAndAddUniqueness=function(e,t,n){var r=t.length,i=Ue.sanitizeKey(e,t);if(i.length!==r){for(var a=0,o=i;n[o]!==undefined;)a++,o=i.substring(0,Ue.MAX_NAME_LENGTH-3)+Ue.padNumber(a);i=o}return i},Ue.sanitizeKey=function(e,t){var n;return t&&(t=Ue.trim(t.toString())).length>Ue.MAX_NAME_LENGTH&&(n=t.substring(0,Ue.MAX_NAME_LENGTH),e.throwInternal(G.WARNING,K.NameTooLong,"name is too long. It has been truncated to "+Ue.MAX_NAME_LENGTH+" characters.",{name:t},!0)),n||t},Ue.sanitizeString=function(e,t,n){var r;return void 0===n&&(n=Ue.MAX_STRING_LENGTH),t&&(n=n||Ue.MAX_STRING_LENGTH,(t=Ue.trim(t)).toString().length>n&&(r=t.toString().substring(0,n),e.throwInternal(G.WARNING,K.StringValueTooLong,"string value is too long. It has been truncated to "+n+" characters.",{value:t},!0))),r||t},Ue.sanitizeUrl=function(e,t){return Ue.sanitizeInput(e,t,Ue.MAX_URL_LENGTH,K.UrlTooLong)},Ue.sanitizeMessage=function(e,t){var n;return t&&t.length>Ue.MAX_MESSAGE_LENGTH&&(n=t.substring(0,Ue.MAX_MESSAGE_LENGTH),e.throwInternal(G.WARNING,K.MessageTruncated,"message is too long, it has been truncated to "+Ue.MAX_MESSAGE_LENGTH+" characters.",{message:t},!0)),n||t},Ue.sanitizeException=function(e,t){var n;return t&&t.length>Ue.MAX_EXCEPTION_LENGTH&&(n=t.substring(0,Ue.MAX_EXCEPTION_LENGTH),e.throwInternal(G.WARNING,K.ExceptionTruncated,"exception is too long, it has been truncated to "+Ue.MAX_EXCEPTION_LENGTH+" characters.",{exception:t},!0)),n||t},Ue.sanitizeProperties=function(e,t){if(t){var n={};for(var r in t){var i=t[r];if(P.isObject(i)&&C())try{i=I().stringify(i)}catch(a){e.throwInternal(G.WARNING,K.CannotSerializeObjectNonSerializable,"custom property is not valid",{exception:a},!0)}i=Ue.sanitizeString(e,i,Ue.MAX_PROPERTY_LENGTH),n[r=Ue.sanitizeKeyAndAddUniqueness(e,r,n)]=i}t=n}return t},Ue.sanitizeMeasurements=function(e,t){if(t){var n={};for(var r in t){var i=t[r];n[r=Ue.sanitizeKeyAndAddUniqueness(e,r,n)]=i}t=n}return t},Ue.sanitizeId=function(e,t){return t?Ue.sanitizeInput(e,t,Ue.MAX_ID_LENGTH,K.IdTooLong).toString():t},Ue.sanitizeInput=function(e,t,n,r){var i;return t&&(t=Ue.trim(t)).length>n&&(i=t.substring(0,n),e.throwInternal(G.WARNING,r,"input is too long, it has been truncated to "+n+" characters.",{data:t},!0)),i||t},Ue.padNumber=function(e){var t="00"+e;return t.substr(t.length-3)},Ue.trim=function(e){return P.isString(e)?e.replace(/^\s+|\s+$/g,""):e},Ue.MAX_NAME_LENGTH=150,Ue.MAX_ID_LENGTH=128,Ue.MAX_PROPERTY_LENGTH=8192,Ue.MAX_STRING_LENGTH=1024,Ue.MAX_URL_LENGTH=2048,Ue.MAX_MESSAGE_LENGTH=32768,Ue.MAX_EXCEPTION_LENGTH=32768,Ue);function Ue(){}var Pe=S(),ze=P.isString,Ge=null;var Be=(We.createDomEvent=function(e){var t=null;if(P.isFunction(Event))t=new Event(e);else{var n=x();n&&n.createEvent&&(t=n.createEvent("Event")).initEvent(e,!0,!0)}return t},We.disableStorage=function(){We._canUseLocalStorage=!1,We._canUseSessionStorage=!1},We._getLocalStorageObject=function(){return We.canUseLocalStorage()?We._getVerifiedStorageObject(a.LocalStorage):null},We._getVerifiedStorageObject=function(e){var t,n,r=null;try{if(P.isNullOrUndefined(O()))return null;n=new Date,(r=e===a.LocalStorage?m("localStorage"):m("sessionStorage")).setItem(n.toString(),n.toString()),t=r.getItem(n.toString())!==n.toString(),r.removeItem(n.toString()),t&&(r=null)}catch(i){r=null}return r},We.isInternalApplicationInsightsEndpoint=function(e){return-1!==We._internalEndpoints.indexOf(e.toLowerCase())},We.canUseLocalStorage=function(){return We._canUseLocalStorage===undefined&&(We._canUseLocalStorage=!!We._getVerifiedStorageObject(a.LocalStorage)),We._canUseLocalStorage},We.getStorage=function(e,t){var n=We._getLocalStorageObject();if(null!==n)try{return n.getItem(t)}catch(r){We._canUseLocalStorage=!1,e.throwInternal(G.WARNING,K.BrowserCannotReadLocalStorage,"Browser failed read of local storage. "+We.getExceptionName(r),{exception:We.dump(r)})}return null},We.setStorage=function(e,t,n){var r=We._getLocalStorageObject();if(null!==r)try{return r.setItem(t,n),!0}catch(i){We._canUseLocalStorage=!1,e.throwInternal(G.WARNING,K.BrowserCannotWriteLocalStorage,"Browser failed write to local storage. "+We.getExceptionName(i),{exception:We.dump(i)})}return!1},We.removeStorage=function(e,t){var n=We._getLocalStorageObject();if(null!==n)try{return n.removeItem(t),!0}catch(r){We._canUseLocalStorage=!1,e.throwInternal(G.WARNING,K.BrowserFailedRemovalFromLocalStorage,"Browser failed removal of local storage item. "+We.getExceptionName(r),{exception:We.dump(r)})}return!1},We._getSessionStorageObject=function(){return We.canUseSessionStorage()?We._getVerifiedStorageObject(a.SessionStorage):null},We.canUseSessionStorage=function(){return We._canUseSessionStorage===undefined&&(We._canUseSessionStorage=!!We._getVerifiedStorageObject(a.SessionStorage)),We._canUseSessionStorage},We.getSessionStorageKeys=function(){var e=[];if(We.canUseSessionStorage())for(var t in m("sessionStorage"))e.push(t);return e},We.getSessionStorage=function(e,t){var n=We._getSessionStorageObject();if(null!==n)try{return n.getItem(t)}catch(r){We._canUseSessionStorage=!1,e.throwInternal(G.WARNING,K.BrowserCannotReadSessionStorage,"Browser failed read of session storage. "+We.getExceptionName(r),{exception:We.dump(r)})}return null},We.setSessionStorage=function(e,t,n){var r=We._getSessionStorageObject();if(null!==r)try{return r.setItem(t,n),!0}catch(i){We._canUseSessionStorage=!1,e.throwInternal(G.WARNING,K.BrowserCannotWriteSessionStorage,"Browser failed write to session storage. "+We.getExceptionName(i),{exception:We.dump(i)})}return!1},We.removeSessionStorage=function(e,t){var n=We._getSessionStorageObject();if(null!==n)try{return n.removeItem(t),!0}catch(r){We._canUseSessionStorage=!1,e.throwInternal(G.WARNING,K.BrowserFailedRemovalFromSessionStorage,"Browser failed removal of session storage item. "+We.getExceptionName(r),{exception:We.dump(r)})}return!1},We.disableCookies=function(){P.disableCookies()},We.canUseCookies=function(e){if(P._canUseCookies===undefined){P._canUseCookies=!1;try{P._canUseCookies=We.document.cookie!==undefined}catch(t){e.throwInternal(G.WARNING,K.CannotAccessCookie,"Cannot access document.cookie - "+We.getExceptionName(t),{exception:We.dump(t)})}}return P._canUseCookies},We.disallowsSameSiteNone=function(e){return!!ze(e)&&(-1!==e.indexOf("CPU iPhone OS 12")||-1!==e.indexOf("iPad; CPU OS 12")||-1!==e.indexOf("Macintosh; Intel Mac OS X 10_14")&&-1!==e.indexOf("Version/")&&-1!==e.indexOf("Safari")||!(-1===e.indexOf("Macintosh; Intel Mac OS X 10_14")||!function i(e,t){var n=e.length,r=n-t.length;return e.substring(0<=r?r:0,n)===t}(e,"AppleWebKit/605.1.15 (KHTML, like Gecko)"))||-1!==e.indexOf("Chrome/5")||-1!==e.indexOf("Chrome/6")||-1!==e.indexOf("UnrealEngine")&&-1===e.indexOf("Chrome")||-1!==e.indexOf("UCBrowser/12")||-1!==e.indexOf("UCBrowser/11"))},We.setCookie=function(e,t,n,r){if(We.canUseCookies(e)){var i="",a="";r&&(i=";domain="+r);var o=H();o&&"https:"===o.protocol&&(a=";secure",null===Ge&&(Ge=We.disallowsSameSiteNone((S()||{}).userAgent)),Ge||(n+=";SameSite=None")),We.document.cookie=t+"="+n+i+";path=/"+a}},We.stringToBoolOrDefault=function(e,t){return void 0===t&&(t=!1),e===undefined||null===e?t:"true"===e.toString().toLowerCase()},We.getCookie=function(e,t){if(We.canUseCookies(e)){var n="";if(t&&t.length)for(var r=t+"=",i=We.document.cookie.split(";"),a=0;a<i.length;a++){var o=i[a];if((o=We.trim(o))&&0===o.indexOf(r)){n=o.substring(r.length,i[a].length);break}}return n}},We.deleteCookie=function(e,t){We.canUseCookies(e)&&(We.document.cookie=t+"=;path=/;expires=Thu, 01 Jan 1970 00:00:01 GMT;")},We.trim=function(e){return ze(e)?e.replace(/^\s+|\s+$/g,""):e},We.newId=function(){for(var e="",t=1073741824*Math.random();0<t;)e+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(t%64),t=Math.floor(t/64);return e},We.random32=function(){return 4294967296*Math.random()|0},We.generateW3CId=function(){for(var e,t=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"],n="",r=0;r<4;r++)n+=t[15&(e=We.random32())]+t[e>>4&15]+t[e>>8&15]+t[e>>12&15]+t[e>>16&15]+t[e>>20&15]+t[e>>24&15]+t[e>>28&15];var i=t[8+4*Math.random()|0];return n.substr(0,8)+n.substr(9,4)+"4"+n.substr(13,3)+i+n.substr(16,3)+n.substr(19,12)},We.isArray=function(e){return"[object Array]"===Object[F].toString.call(e)},We.isError=function(e){return"[object Error]"===Object[F].toString.call(e)},We.getIEVersion=function(e){void 0===e&&(e=null);var t=e?e.toLowerCase():Pe?(Pe.userAgent||"").toLowerCase():"";return-1!==t.indexOf("msie")?parseInt(t.split("msie")[1]):null},We.msToTimeSpan=function(e){(isNaN(e)||e<0)&&(e=0);var t=""+(e=Math.round(e))%1e3,n=""+Math.floor(e/1e3)%60,r=""+Math.floor(e/6e4)%60,i=""+Math.floor(e/36e5)%24,a=Math.floor(e/864e5);return t=1===t.length?"00"+t:2===t.length?"0"+t:t,n=n.length<2?"0"+n:n,r=r.length<2?"0"+r:r,(0<a?a+".":"")+(i=i.length<2?"0"+i:i)+":"+r+":"+n+"."+t},We.isCrossOriginError=function(e,t,n,r,i){return("Script error."===e||"Script error"===e)&&!i},We.dump=function(e){var t=Object[F].toString.call(e),n="";return"[object Error]"===t?n="{ stack: '"+e.stack+"', message: '"+e.message+"', name: '"+e.name+"'":C()&&(n=I().stringify(e)),t+n},We.getExceptionName=function(e){return"[object Error]"===Object[F].toString.call(e)?e.name:""},We.addEventHandler=function(e,t){return X.Attach(y(),e,t)},We.IsBeaconApiSupported=function(){return"sendBeacon"in Pe&&Pe.sendBeacon},We.getExtension=function(e,t){for(var n=null,r=0;!n&&r<e.length;)e[r]&&e[r].identifier===t&&(n=e[r]),r++;return n},We.document=x()||{},We._canUseLocalStorage=undefined,We._canUseSessionStorage=undefined,We._internalEndpoints=["https://dc.services.visualstudio.com/v2/track","https://breeze.aimon.applicationinsights.io/v2/track","https://dc-int.services.visualstudio.com/v2/track"],We.NotSpecified="not_specified",We.isDate=P.isDate,We.toISOStringForIE8=P.toISOString,We);function We(){}var Xe=(Ve.parseUrl=function(e){return Ve.htmlAnchorElement||(Ve.htmlAnchorElement=Ve.document.createElement?Ve.document.createElement("a"):{host:Ve.parseHost(e)}),Ve.htmlAnchorElement.href=e,Ve.htmlAnchorElement},Ve.getAbsoluteUrl=function(e){var t,n=Ve.parseUrl(e);return n&&(t=n.href),t},Ve.getPathName=function(e){var t,n=Ve.parseUrl(e);return n&&(t=n.pathname),t},Ve.getCompleteUrl=function(e,t){return e?e.toUpperCase()+" "+t:t},Ve.parseHost=function(e){if(e){var t=e.match(/:\/\/(www[0-9]?\.)?(.[^/:]+)/i);if(null!=t&&2<t.length&&ze(t[2])&&0<t[2].length)return t[2]}return null},Ve.document=x()||{},Ve);function Ve(){}var Ke=(Qe.canIncludeCorrelationHeader=function(e,t,n){if(e&&e.disableCorrelationHeaders)return!1;if(!t)return!1;var r=Xe.parseUrl(t).host.toLowerCase();if(!(e&&e.enableCorsCorrelation||r===n))return!1;var i,a=e&&e.correlationHeaderDomains;if(a&&(P.arrForEach(a,function(e){var t=new RegExp(e.toLowerCase().replace(/\./g,".").replace(/\*/g,".*"));i=i||t.test(r)}),!i))return!1;var o=e&&e.correlationHeaderExcludedDomains;if(!o||0===o.length)return!0;for(var s=0;s<o.length;s++)if(new RegExp(o[s].toLowerCase().replace(/\./g,".").replace(/\*/g,".*")).test(r))return!1;return r&&0<r.length},Qe.getCorrelationContext=function(e){if(e){var t=Qe.getCorrelationContextValue(e,Oe.requestContextTargetKey);if(t&&t!==Qe.correlationIdPrefix)return t}},Qe.getCorrelationContextValue=function(e,t){if(e)for(var n=e.split(","),r=0;r<n.length;++r){var i=n[r].split("=");if(2===i.length&&i[0]===t)return i[1]}},Qe.correlationIdPrefix="cid-v1:",Qe);function Qe(){}var $e=(Je.ParseDependencyPath=function(e,t,n,r){var i,a=r,o=r;if(t&&0<t.length){var s=Xe.parseUrl(t);if(i=s.host,!a)if(null!=s.pathname){var u=0===s.pathname.length?"/":s.pathname;"/"!==u.charAt(0)&&(u="/"+u),o=s.pathname,a=je.sanitizeString(e,n?n+" "+u:u)}else a=je.sanitizeString(e,t)}else a=i=r;return{target:i,name:a,data:o}},Je);function Je(){}var Ye=(Ze.Now=function(){var e=j();return e&&e.now&&e.timing?e.now()+e.timing.navigationStart:(new Date).getTime()},Ze.GetDuration=function(e,t){var n=null;return 0===e||0===t||P.isNullOrUndefined(e)||P.isNullOrUndefined(t)||(n=t-e),n},Ze);function Ze(){}var et,tt="Microsoft_ApplicationInsights_BypassAjaxInstrumentation",nt=(t(rt,et=function or(){}),rt);function rt(){return et.call(this)||this}var it;t(at,it=function sr(){this.ver=1,this.sampleRate=100,this.tags={}});function at(e,t,n){var r=it.call(this)||this;return r.name=je.sanitizeString(e,n)||Be.NotSpecified,r.data=t,r.time=P.toISOString(new Date),r.aiDataContract={time:g.Required,iKey:g.Required,name:g.Required,sampleRate:function(){return 100===r.sampleRate?g.Hidden:g.Required},tags:g.Required,data:g.Required},r}var ot,st=function ur(){},ut=(t(lt,ot=st),lt);function lt(){var e=ot.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}var ct;t(ft,ct=ut),ft.envelopeType="Microsoft.ApplicationInsights.{0}.Event",ft.dataType="EventData";function ft(e,t,n,r){var i=ct.call(this)||this;return i.aiDataContract={ver:g.Required,name:g.Required,properties:g.Default,measurements:g.Default},i.name=je.sanitizeString(e,t)||Be.NotSpecified,i.properties=je.sanitizeProperties(e,n),i.measurements=je.sanitizeMeasurements(e,r),i}var dt,pt=function lr(){},gt=(t(ht,dt=st),ht);function ht(){var e=dt.call(this)||this;return e.ver=2,e.exceptions=[],e.properties={},e.measurements={},e}var mt,vt=function cr(){this.hasFullStack=!0,this.parsedStack=[]};t(yt,mt=gt),yt.CreateFromInterface=function(t,e){var n=e.exceptions&&P.arrMap(e.exceptions,function(e){return St.CreateFromInterface(t,e)});return new yt(t,s({},e,{exceptions:n}))},yt.prototype.toInterface=function(){var e=this,t=e.exceptions,n=e.properties,r=e.measurements,i=e.severityLevel,a=(e.ver,e.problemGroup),o=e.id,s=e.isManual;return{ver:"4.0",exceptions:t instanceof Array&&P.arrMap(t,function(e){return e.toInterface()})||undefined,severityLevel:i,properties:n,measurements:r,problemGroup:a,id:o,isManual:s}},yt.CreateSimpleException=function(e,t,n,r,i,a){return{exceptions:[{hasFullStack:!0,message:e,stack:i,typeName:t}]}},yt.envelopeType="Microsoft.ApplicationInsights.{0}.Exception",yt.dataType="ExceptionData";function yt(e,t,n,r,i,a){var o=mt.call(this)||this;return o.aiDataContract={ver:g.Required,exceptions:g.Required,severityLevel:g.Default,properties:g.Default,measurements:g.Default},t instanceof Error?(o.exceptions=[new St(e,t)],o.properties=je.sanitizeProperties(e,n),o.measurements=je.sanitizeMeasurements(e,r),i&&(o.severityLevel=i),a&&(o.id=a)):(o.exceptions=t.exceptions,o.properties=t.properties,o.measurements=t.measurements,t.severityLevel&&(o.severityLevel=t.severityLevel),t.id&&(o.id=t.id),t.problemGroup&&(o.problemGroup=t.problemGroup),o.ver=2,P.isNullOrUndefined(t.isManual)||(o.isManual=t.isManual)),o}var xt,St=(t(Ct,xt=vt),Ct.prototype.toInterface=function(){var e=this.parsedStack instanceof Array&&P.arrMap(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.stack,parsedStack:e||undefined}},Ct.CreateFromInterface=function(e,t){var n=t.parsedStack instanceof Array&&P.arrMap(t.parsedStack,function(e){return Tt.CreateFromInterface(e)})||t.parsedStack;return new Ct(e,s({},t,{parsedStack:n}))},Ct.parseStack=function(e){var t;if(P.isString(e)){var n=e.split("\n");t=[];for(var r=0,i=0,a=0;a<=n.length;a++){var o=n[a];if(Tt.regex.test(o)){var s=new Tt(n[a],r++);i+=s.sizeInBytes,t.push(s)}}if(32768<i)for(var u=0,l=t.length-1,c=0,f=u,d=l;u<l;){if(32768<(c+=t[u].sizeInBytes+t[l].sizeInBytes)){var p=d-f+1;t.splice(f,p);break}f=u,d=l,u++,l--}}return t},Ct);function Ct(e,t){var n=xt.call(this)||this;if(n.aiDataContract={id:g.Default,outerId:g.Default,typeName:g.Required,message:g.Required,hasFullStack:g.Default,stack:g.Default,parsedStack:g.Array},t instanceof Error){n.typeName=je.sanitizeString(e,t.name)||Be.NotSpecified,n.message=je.sanitizeMessage(e,t.message)||Be.NotSpecified;var r=t.stack;n.parsedStack=Ct.parseStack(r),n.stack=je.sanitizeException(e,r),n.hasFullStack=Be.isArray(n.parsedStack)&&0<n.parsedStack.length}else n.typeName=t.typeName,n.message=t.message,n.stack=t.stack,n.parsedStack=t.parsedStack,n.hasFullStack=t.hasFullStack;return n}var It,Tt=(t(bt,It=pt),bt.CreateFromInterface=function(e){return new bt(e,null)},bt.prototype.toInterface=function(){return{level:this.level,method:this.method,assembly:this.assembly,fileName:this.fileName,line:this.line}},bt.regex=/^([\s]+at)?(.*?)(\@|\s\(|\s)([^\(\@\n]+):([0-9]+):([0-9]+)(\)?)$/,bt.baseSize=58,bt);function bt(e,t){var n=It.call(this)||this;if(n.sizeInBytes=0,n.aiDataContract={level:g.Required,method:g.Required,assembly:g.Default,fileName:g.Default,line:g.Default},"string"==typeof e){var r=e;n.level=t,n.method="<no_method>",n.assembly=Be.trim(r),n.fileName="",n.line=0;var i=r.match(bt.regex);i&&5<=i.length&&(n.method=Be.trim(i[2])||n.method,n.fileName=Be.trim(i[4]),n.line=parseInt(i[5])||0)}else n.level=e.level,n.method=e.method,n.assembly=e.assembly,n.fileName=e.fileName,n.line=e.line,n.sizeInBytes=0;return n.sizeInBytes+=n.method.length,n.sizeInBytes+=n.fileName.length,n.sizeInBytes+=n.assembly.length,n.sizeInBytes+=bt.baseSize,n.sizeInBytes+=n.level.toString().length,n.sizeInBytes+=n.line.toString().length,n}var Nt,At,Mt,Dt=(t(wt,Nt=st),wt);function wt(){var e=Nt.call(this)||this;return e.ver=2,e.metrics=[],e.properties={},e.measurements={},e}(Mt=At=At||{})[Mt.Measurement=0]="Measurement",Mt[Mt.Aggregation=1]="Aggregation";var _t,Et=(t(Lt,_t=function fr(){this.kind=At.Measurement}),Lt);function Lt(){var e=null!==_t&&_t.apply(this,arguments)||this;return e.aiDataContract={name:g.Required,kind:g.Default,value:g.Required,count:g.Default,min:g.Default,max:g.Default,stdDev:g.Default},e}var qt;t(Rt,qt=Dt),Rt.envelopeType="Microsoft.ApplicationInsights.{0}.Metric",Rt.dataType="MetricData";function Rt(e,t,n,r,i,a,o,s){var u=qt.call(this)||this;u.aiDataContract={ver:g.Required,metrics:g.Required,properties:g.Default};var l=new Et;return l.count=0<r?r:undefined,l.max=isNaN(a)||null===a?undefined:a,l.min=isNaN(i)||null===i?undefined:i,l.name=je.sanitizeString(e,t)||Be.NotSpecified,l.value=n,u.metrics=[l],u.properties=je.sanitizeProperties(e,o),u.measurements=je.sanitizeMeasurements(e,s),u}var kt,Ft=(t(Ot,kt=ut),Ot);function Ot(){var e=kt.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}var Ht;t(jt,Ht=Ft),jt.envelopeType="Microsoft.ApplicationInsights.{0}.Pageview",jt.dataType="PageviewData";function jt(e,t,n,r,i,a,o){var s=Ht.call(this)||this;return s.aiDataContract={ver:g.Required,name:g.Default,url:g.Default,duration:g.Default,properties:g.Default,measurements:g.Default,id:g.Default},s.id=je.sanitizeId(e,o),s.url=je.sanitizeUrl(e,n),s.name=je.sanitizeString(e,t)||Be.NotSpecified,isNaN(r)||(s.duration=Be.msToTimeSpan(r)),s.properties=je.sanitizeProperties(e,i),s.measurements=je.sanitizeMeasurements(e,a),s}var Ut,Pt=(t(zt,Ut=st),zt);function zt(){var e=Ut.call(this)||this;return e.ver=2,e.success=!0,e.properties={},e.measurements={},e}var Gt,Bt=(t(Wt,Gt=Pt),Wt.envelopeType="Microsoft.ApplicationInsights.{0}.RemoteDependency",Wt.dataType="RemoteDependencyData",Wt);function Wt(e,t,n,r,i,a,o,s,u,l,c,f){void 0===u&&(u="Ajax");var d=Gt.call(this)||this;d.aiDataContract={id:g.Required,ver:g.Required,name:g.Default,resultCode:g.Default,duration:g.Default,success:g.Default,data:g.Default,target:g.Default,type:g.Default,properties:g.Default,measurements:g.Default,kind:g.Default,value:g.Default,count:g.Default,min:g.Default,max:g.Default,stdDev:g.Default,dependencyKind:g.Default,dependencySource:g.Default,commandName:g.Default,dependencyTypeName:g.Default},d.id=t,d.duration=Be.msToTimeSpan(i),d.success=a,d.resultCode=o+"",d.type=je.sanitizeString(e,u);var p=$e.ParseDependencyPath(e,n,s,r);return d.data=je.sanitizeUrl(e,r)||p.data,d.target=je.sanitizeString(e,p.target),l&&(d.target=d.target+" | "+l),d.name=je.sanitizeString(e,p.name),d.properties=je.sanitizeProperties(e,c),d.measurements=je.sanitizeMeasurements(e,f),d}var Xt,Vt=(t(Kt,Xt=st),Kt);function Kt(){var e=Xt.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}var Qt;t($t,Qt=Vt),$t.envelopeType="Microsoft.ApplicationInsights.{0}.Message",$t.dataType="MessageData";function $t(e,t,n,r,i){var a=Qt.call(this)||this;return a.aiDataContract={ver:g.Required,message:g.Required,severityLevel:g.Default,properties:g.Default},t=t||Be.NotSpecified,a.message=je.sanitizeMessage(e,t),a.properties=je.sanitizeProperties(e,r),a.measurements=je.sanitizeMeasurements(e,i),n&&(a.severityLevel=n),a}var Jt,Yt=(t(Zt,Jt=Ft),Zt);function Zt(){var e=Jt.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}var en;t(tn,en=Yt),tn.envelopeType="Microsoft.ApplicationInsights.{0}.PageviewPerformance",tn.dataType="PageviewPerformanceData";function tn(e,t,n,r,i,a,o){var s=en.call(this)||this;return s.aiDataContract={ver:g.Required,name:g.Default,url:g.Default,duration:g.Default,perfTotal:g.Default,networkConnect:g.Default,sentRequest:g.Default,receivedResponse:g.Default,domProcessing:g.Default,properties:g.Default,measurements:g.Default},s.url=je.sanitizeUrl(e,n),s.name=je.sanitizeString(e,t)||Be.NotSpecified,s.properties=je.sanitizeProperties(e,i),s.measurements=je.sanitizeMeasurements(e,a),o&&(s.domProcessing=o.domProcessing,s.duration=o.duration,s.networkConnect=o.networkConnect,s.perfTotal=o.perfTotal,s.receivedResponse=o.receivedResponse,s.sentRequest=o.sentRequest),s}var nn,rn,an;t(on,nn=nt);function on(e,t){var n=nn.call(this)||this;return n.aiDataContract={baseType:g.Required,baseData:g.Required},n.baseType=e,n.baseData=t,n}(an=rn=rn||{})[an.Verbose=0]="Verbose",an[an.Information=1]="Information",an[an.Warning=2]="Warning",an[an.Error=3]="Error",an[an.Critical=4]="Critical";var sn=(un.create=function(e,t,n,r,i,a){if(n=je.sanitizeString(r,n)||Be.NotSpecified,P.isNullOrUndefined(e)||P.isNullOrUndefined(t)||P.isNullOrUndefined(n))throw Error("Input doesn't contain all required fields");var o={name:n,time:P.toISOString(new Date),iKey:"",ext:a||{},tags:[],data:{},baseType:t,baseData:e};if(!P.isNullOrUndefined(i))for(var s in i)i.hasOwnProperty(s)&&(o.data[s]=i[s]);return o},un);function un(){}var ln="constructor",cn="prototype",fn="function",dn="_dynInstFuncs",pn="_isDynProxy",gn="_dynClass",hn="_dynCls$",mn="_unknown_",vn="__proto__",yn=Object.getPrototypeOf,xn=0;function Sn(e,t){return e&&Object[cn].hasOwnProperty.call(e,t)}function Cn(e){return typeof e===fn}function In(e){return e&&(e===Object[cn]||e===Array[cn])}function Tn(e){return In(e)||e===Function[cn]}function bn(e){if(e){if(yn)return yn(e);var t=e[vn]||e[cn]||e[ln];if(t)return t}return null}function Nn(e,t,n){return t!==ln&&Cn(e[t])&&(n||Sn(e,t))}function An(e){throw new TypeError("DynamicProto: "+e)}function Mn(e,t){for(var n=e.length-1;0<=n;n--)if(e[n]===t)return 1}function Dn(e,t){return Sn(e,cn)?e.name||t||mn:((e||{})[ln]||{}).name||t||mn}function wn(e,t,n){Sn(e,cn)||An("theClass is an invalid class definition.");var r=e[cn];!function o(e,t){for(var n=bn(t);n&&!Tn(n);){if(n===e)return 1;n=bn(n)}}(r,t)&&An("["+Dn(e)+"] is not in class heirarchy of ["+Dn(t)+"]");var i=null;Sn(r,gn)?i=r[gn]:(i=hn+Dn(e,"_")+"$"+xn,xn++,r[gn]=i);var a=function s(e){var t={};for(var n in e)!t[n]&&Nn(e,n,!1)&&(t[n]=e[n]);return t}(t);n(t,function u(e,t,n){function r(e,t){return function(){return t.apply(e,arguments)}}var i={};for(var a in n)i[a]=r(t,n[a]);for(var o=bn(e),s=[];o&&!Tn(o)&&!Mn(s,o);){for(var a in o)!i[a]&&Nn(o,a,!yn)&&(i[a]=r(t,o[a]));s.push(o),o=bn(o)}return i}(r,t,a)),function l(e,t,n,r){function i(n,r){var i=function(){if(this&&Sn(n,gn)){var e=((this[dn]||{})[n[gn]]||{})[r];if(e)return e.apply(this,arguments);An("Missing ["+r+"] "+fn)}var t=n[r];return t===i&&(t=bn(n)[r]),Cn(t)||An("["+r+"] is not a "+fn),t.apply(this,arguments)};return i[pn]=1,i}if(!In(e)){var a=n[dn]=n[dn]||{},o=a[t]=a[t]||{};for(var s in n)Nn(n,s,!1)&&n[s]!==r[s]&&(o[s]=n[s],delete n[s],Sn(e,s)&&(!e[s]||e[s][pn])||(e[s]=i(e,s)))}}(r,i,t,a)}var _n="properties",En=P.objKeys,Ln=P.arrForEach;function qn(e,t,n){var r=0,i=e[t],a=e[n];return i&&a&&(r=Ye.GetDuration(i,a)),r}function Rn(e,t,n,r,i){var a=0,o=qn(n,r,i);return o&&(a=kn(e,t,Be.msToTimeSpan(o))),a}function kn(e,t,n){var r="ajaxPerf",i=0;e&&t&&n&&((e[r]=e[r]||{})[t]=n,i=1);return i}function Fn(e,t){var n=e.perfTiming,r=t[_n]||{},i=0,a=P.isString,o="Start",s="End",u="domainLookup",l="connect",c="redirect",f="request",d="response",p="duration",g="startTime",h=l+s,m=f+o,v=d+s,y=c+o,x=c=s,S="transferSize",C="encodedBodySize",I="decodedBodySize",T="serverTiming";if(n){i|=Rn(r,c,n,y,x),i|=Rn(r,u,n,"domainLookupStart","domainLookupEnd"),i|=Rn(r,l,n,"connectStart",h),i|=Rn(r,f,n,m,"requestEnd"),i|=Rn(r,d,n,"responseStart",v),i|=Rn(r,"networkConnect",n,g,h),i|=Rn(r,"sentRequest",n,m,v);var b=n[p];i|=kn(r,p,b=b||(qn(n,g,v)||0)),i|=kn(r,"perfTotal",b);var N=n[T];if(N){var A={};Ln(N,function(n,e){var t=function i(e){var t=e,n=/([^\w\d_$])/g;return n.test(e)&&(t=e.replace(n,"_")),t}(n.name||""+e),r=A[t]||{};Ln(En(n),function(e){var t=n[e];("name"!==e&&a(t)||P.isNumber(t))&&(r[e]&&(t=r[e]+";"+t),!t&&a(t)||(r[e]=t))}),A[t]=r}),i|=kn(r,T,A)}i|=kn(r,S,n[S]),i|=kn(r,C,n[C]),i|=kn(r,I,n[I])}else e.perfMark&&(i|=kn(r,"missing",e.perfAttempts));i&&(t[_n]=r)}var On=function dr(){var e=this;e.openDone=!1,e.setRequestHeaderDone=!1,e.sendDone=!1,e.abortDone=!1,e.stateChangeAttached=!1},Hn=function pr(e,t,n){var r=this,i=n,l="responseText";r.perfMark=null,r.completed=!1,r.requestHeadersSize=null,r.requestHeaders=null,r.responseReceivingDuration=null,r.callbackDuration=null,r.ajaxTotalDuration=null,r.aborted=0,r.pageUrl=null,r.requestUrl=null,r.requestSize=0,r.method=null,r.status=null,r.requestSentTime=null,r.responseStartedTime=null,r.responseFinishedTime=null,r.callbackFinishedTime=null,r.endTime=null,r.xhrMonitoringState=new On,r.clientFailure=0,r.traceID=e,r.spanID=t,wn(pr,r,function(u){u.getAbsoluteUrl=function(){return u.requestUrl?Xe.getAbsoluteUrl(u.requestUrl):null},u.getPathName=function(){return u.requestUrl?je.sanitizeUrl(i,Xe.getCompleteUrl(u.method,u.requestUrl)):null},u.CreateTrackItem=function(e,t,n){if(u.ajaxTotalDuration=Math.round(1e3*Ye.GetDuration(u.requestSentTime,u.responseFinishedTime))/1e3,u.ajaxTotalDuration<0)return null;var r,i=((r={id:"|"+u.traceID+"."+u.spanID,target:u.getAbsoluteUrl(),name:u.getPathName(),type:e,duration:u.ajaxTotalDuration,success:200<=+u.status&&+u.status<400,responseCode:+u.status,method:u.method})[_n]={HttpMethod:u.method},r);if(Fn(u,i),t&&0<En(u.requestHeaders).length&&(i[_n]=i[_n]||{},i[_n].requestHeaders=u.requestHeaders),n){var a=n();if(a){var o=a.correlationContext;if(o&&(i.correlationContext=o),a.headerMap&&0<En(a.headerMap).length&&(i[_n]=i[_n]||{},i[_n].responseHeaders=a.headerMap),400<=u.status){var s=a.type;i[_n]=i[_n]||{},""!==s&&"text"!==s||(i[_n][l]=a[l]?a.statusText+" - "+a[l]:a.statusText),"json"===s&&(i[_n][l]=a.response?a.statusText+" - "+JSON.stringify(a.response):a.statusText)}}}return i}})},jn=(Un.isValidTraceId=function(e){return e.match(/^[0-9a-f]{32}$/)&&"00000000000000000000000000000000"!==e},Un.isValidSpanId=function(e){return e.match(/^[0-9a-f]{16}$/)&&"0000000000000000"!==e},Un.prototype.toString=function(){return this.version+"-"+this.traceId+"-"+this.spanId+"-"+this.traceFlag},Un.DEFAULT_TRACE_FLAG="01",Un.DEFAULT_VERSION="00",Un);function Un(e,t){var n=this;n.traceFlag=Un.DEFAULT_TRACE_FLAG,n.version=Un.DEFAULT_VERSION,e&&Un.isValidTraceId(e)?n.traceId=e:n.traceId=Be.generateW3CId(),t&&Un.isValidSpanId(t)?n.spanId=t:n.spanId=Be.generateW3CId().substr(0,16)}var Pn="ai.ajxmn.",zn="diagLog",Gn="ajaxData",Bn="throwInternal",Wn="fetch",Xn=P.isNullOrUndefined,Vn=P.arrForEach,Kn=P.objKeys,Qn=0;function $n(e){var t="";try{Xn(e)||Xn(e[Gn])||Xn(e[Gn].requestUrl)||(t+="(url: '"+e[Gn].requestUrl+"')")}catch(n){}return t}function Jn(e,t,n,r,i){e[zn]()[Bn](G.CRITICAL,t,n,r,i)}function Yn(e,t,n,r,i){e[zn]()[Bn](G.WARNING,t,n,r,i)}function Zn(t,n,r){return function(e){Jn(t,n,r,{ajaxDiagnosticsMessage:$n(e.inst),exception:Be.dump(e.err)})}}function er(e,t){return e&&t?e.indexOf(t):-1}var tr,nr=(t(rr,tr=oe),rr.getDefaultConfig=function(){return{maxAjaxCallsPerView:500,disableAjaxTracking:!1,disableFetchTracking:!0,disableCorrelationHeaders:!1,distributedTracingMode:R.AI,correlationHeaderExcludedDomains:["*.blob.core.windows.net","*.blob.core.chinacloudapi.cn","*.blob.core.cloudapi.de","*.blob.core.usgovcloudapi.net"],correlationHeaderDomains:undefined,appId:undefined,enableCorsCorrelation:!1,enableRequestHeaderTracking:!1,enableResponseHeaderTracking:!1,enableAjaxErrorStatusText:!1,enableAjaxPerfTracking:!1,maxAjaxPerfLookupAttempts:3,ajaxPerfLookupDelay:25}},rr.getEmptyConfig=function(){var t=this.getDefaultConfig();return Vn(Kn(t),function(e){t[e]=undefined}),t},rr.prototype.processTelemetry=function(e,t){this.processNext(e,t)},rr.identifier="AjaxDependencyPlugin",rr);function rr(){var e=tr.call(this)||this;e.identifier=rr.identifier,e.priority=120;var C,I,T,b,N="trackDependencyDataInternal",t=H(),A=!1,M=!1,u=t&&t.host&&t.host.toLowerCase(),D=rr.getEmptyConfig(),w=!1,i=0,_=!1,E=0,L=!1,q=[],s={};return wn(rr,e,function(d,p){function g(e,t,n){q.push(function r(e,t,n){return e?Fe(e[F],t,n,!1):null}(e,t,n))}function h(e,t,n){var r=!1,i=((P.isString(t)?t:(t||{}).url||"")||"").toLowerCase(),a=er(i,"?"),o=er(i,"#");return(-1===a||-1!==o&&o<a)&&(a=o),-1!==a&&(i=i.substring(0,a)),Xn(e)?Xn(t)||(r="object"==typeof t&&!0===t[tt]||!!n&&!0===n[tt]):r=!0===e[tt]||!0===i[tt],r?s[i]||(s[i]=1):s[i]&&(r=!0),r}function m(e,t){var n=!0,r=M;return Xn(e)||(n=!0===t||!Xn(e[Gn])),r&&n}function v(e,t){if(t.requestUrl&&b&&_){var n=j();if(n&&P.isFunction(n.mark)){var r=b+e+"#"+ ++Qn;n.mark(r);var i=n.getEntriesByName(r);i&&1===i.length&&(t.perfMark=i[0])}}}function y(a,o,s,u){var l=o.perfMark,c=j(),f=D.maxAjaxPerfLookupAttempts,d=D.ajaxPerfLookupDelay,p=o.requestUrl,g=0;!function h(){try{if(c&&l){g++;for(var e=null,t=c.getEntries(),n=t.length-1;0<=n;n--){var r=t[n];if(r){if("resource"===r.entryType)r.initiatorType!==a||-1===er(r.name,p)&&-1===er(p,r.name)||(e=r);else if("mark"===r.entryType&&r.name===l.name){o.perfTiming=e;break}if(r.startTime<l.startTime-1e3)break}}}!l||o.perfTiming||f<=g||!1===o.async?(l&&P.isFunction(c.clearMarks)&&c.clearMarks(l.name),o.perfAttempts=g,s()):setTimeout(h,d)}catch(i){u(i)}}()}function x(e){var t="";try{Xn(e)||(t+="string"==typeof e?"(url: '"+e+"')":"(url: '"+e.url+"')")}catch(n){Jn(d,K.FailedMonitorAjaxOpen,"Failed to grab failed fetch diagnostics message",{exception:Be.dump(n)})}return t}function S(e,t,i,n,r){function a(e,t,n){var r=n||{};r.fetchDiagnosticsMessage=x(i),t&&(r.exception=Be.dump(t)),Yn(d,e,"Failed to calculate the duration of the fetch call, monitoring data for this fetch call won't be sent.",r)}n&&(n.responseFinishedTime=Ye.Now(),n.status=t,y("fetch",n,function(){var e=n.CreateTrackItem("Fetch",w,r);e?d[N](e):a(K.FailedMonitorAjaxDur,null,{requestSentTime:n.requestSentTime,responseFinishedTime:n.responseFinishedTime})},function(e){a(K.FailedMonitorAjaxGetCorrelationHeader,e,null)}))}d.initialize=function(e,t,n,r){if(!d.isInitialized()){p.initialize(e,t,n,r);var i=d._getTelCtx(),a=rr.getDefaultConfig();Vn(Kn(a),function(e){D[e]=i.getConfig(rr.identifier,e,a[e])});var o=D.distributedTracingMode;if(w=D.enableRequestHeaderTracking,_=D.enableAjaxPerfTracking,E=D.maxAjaxCallsPerView,L=D.enableResponseHeaderTracking,T=o===R.AI||o===R.AI_AND_W3C,I=o===R.AI_AND_W3C||o===R.W3C,_){var s=e.instrumentationKey||"unkwn";b=5<s.length?Pn+s.substring(s.length-5)+".":Pn+s+"."}if(!1===D.disableAjaxTracking&&!function c(){!function a(e){var t=!1;if(typeof XMLHttpRequest!==k&&!Xn(XMLHttpRequest)){var n=XMLHttpRequest[F];t=!(Xn(n)||Xn(n.open)||Xn(n.send)||Xn(n.abort))}if(t)try{(new XMLHttpRequest)[Gn]={};var r=XMLHttpRequest[F].open;XMLHttpRequest[F].open=r}catch(i){t=!1,Jn(e,K.FailedMonitorAjaxOpen,"Failed to enable XMLHttpRequest monitoring, extension is not supported",{exception:Be.dump(i)})}return t}(d)||M||(g(XMLHttpRequest,"open",{req:function(e,t,n,r){var i=e.inst,a=i[Gn];h(i,n)||!m(i,!0)||a&&a.xhrMonitoringState.openDone||!function u(e,t,n,r){var i=C&&C.telemetryTrace&&C.telemetryTrace.traceID||Be.generateW3CId(),a=Be.generateW3CId().substr(0,16),o=new Hn(i,a,d[zn]());o.method=t,o.requestUrl=n,o.xhrMonitoringState.openDone=!0,o.requestHeaders={},o.async=r,e[Gn]=o,function s(r){r[Gn].xhrMonitoringState.stateChangeAttached=X.Attach(r,"readystatechange",function(){try{r&&4===r.readyState&&m(r)&&!function t(o){var n=o[Gn];function r(e,t){var n=t||{};n.ajaxDiagnosticsMessage=$n(o),e&&(n.exception=Be.dump(e)),Yn(d,K.FailedMonitorAjaxDur,"Failed to calculate the duration of the ajax call, monitoring data for this ajax call won't be sent.",n)}n.responseFinishedTime=Ye.Now(),n.status=o.status,y("xmlhttprequest",n,function(){try{var e=n.CreateTrackItem("Ajax",w,function(){var e={statusText:o.statusText,headerMap:null,correlationContext:function a(e){try{var t=e.getAllResponseHeaders();if(null!==t)if(-1!==er(t.toLowerCase(),Oe.requestContextHeaderLowerCase)){var n=e.getResponseHeader(Oe.requestContextHeader);return Ke.getCorrelationContext(n)}}catch(r){Yn(d,K.FailedMonitorAjaxGetCorrelationHeader,"Failed to get Request-Context correlation header as it may be not included in the response or not accessible.",{ajaxDiagnosticsMessage:$n(e),exception:Be.dump(r)})}}(o),type:o.responseType,responseText:function r(e){try{var t=e.responseType;if(""===t||"text"===t)return e.responseText}catch(n){}return null}(o),response:o.response};if(L){var t=o.getAllResponseHeaders();if(t){var n=t.trim().split(/[\r\n]+/),i={};Vn(n,function(e){var t=e.split(": "),n=t.shift(),r=t.join(": ");i[n]=r}),e.headerMap=i}}return e});e?d[N](e):r(null,{requestSentTime:n.requestSentTime,responseFinishedTime:n.responseFinishedTime})}finally{try{o[Gn]=null}catch(t){}}},function(e){r(e,null)})}(r)}catch(n){var e=Be.dump(n);e&&-1!==er(e.toLowerCase(),"c00c023f")||Jn(d,K.FailedMonitorAjaxRSC,"Failed to monitor XMLHttpRequest 'readystatechange' event handler, monitoring data for this ajax call may be incorrect.",{ajaxDiagnosticsMessage:$n(r),exception:e})}})}(e)}(i,t,n,r)},hkErr:Zn(d,K.FailedMonitorAjaxOpen,"Failed to monitor XMLHttpRequest.open, monitoring data for this ajax call may be incorrect.")}),g(XMLHttpRequest,"send",{req:function(e,t){var n=e.inst,r=n[Gn];m(n)&&!r.xhrMonitoringState.sendDone&&(v("xhr",r),r.requestSentTime=Ye.Now(),n=d.includeCorrelationHeaders(r,undefined,undefined,n),r.xhrMonitoringState.sendDone=!0)},hkErr:Zn(d,K.FailedMonitorAjaxSend,"Failed to monitor XMLHttpRequest, monitoring data for this ajax call may be incorrect.")}),g(XMLHttpRequest,"abort",{req:function(e){var t=e.inst,n=t[Gn];m(t)&&!n.xhrMonitoringState.abortDone&&(n.aborted=1,n.xhrMonitoringState.abortDone=!0)},hkErr:Zn(d,K.FailedMonitorAjaxAbort,"Failed to monitor XMLHttpRequest.abort, monitoring data for this ajax call may be incorrect.")}),w&&g(XMLHttpRequest,"setRequestHeader",{req:function(e,t,n){var r=e.inst;m(r)&&(r[Gn].requestHeaders[t]=n)},hkErr:Zn(d,K.FailedMonitorAjaxSetRequestHeader,"Failed to monitor XMLHttpRequest.setRequestHeader, monitoring data for this ajax call may be incorrect.")}),M=!0)}(),function f(){var e=function n(){var e=O();return!e||Xn(e.Request)||Xn(e.Request[F])||Xn(e[Wn])?null:e[Wn]}();if(!e)return;var t=O(),o=e.polyfill;!1===D.disableFetchTracking?(q.push(Fe(t,Wn,{req:function(e,t,n){var r;if(A&&!h(null,t,n)&&(!o||!M)){var i=e.ctx();r=function s(e,t){var n=C&&C.telemetryTrace&&C.telemetryTrace.traceID||Be.generateW3CId(),r=Be.generateW3CId().substr(0,16),i=new Hn(n,r,d[zn]());i.requestSentTime=Ye.Now(),e instanceof Request?i.requestUrl=e?e.url:"":i.requestUrl=e;var a="GET";t&&t.method?a=t.method:e&&e instanceof Request&&(a=e.method);i.method=a;var o={};if(w){new Headers((t?t.headers:0)||e instanceof Request&&e.headers||{}).forEach(function(e,t){o[t]=e})}return i.requestHeaders=o,v("fetch",i),i}(t,n);var a=d.includeCorrelationHeaders(r,t,n);a!==n&&e.set(1,a),i.data=r}},rsp:function(e,t){var n=e.ctx().data;n&&(e.rslt=e.rslt.then(function(t){return S(0,(t||{}).status,t,n,function(){var e={statusText:t.statusText,headerMap:null,correlationContext:function r(e){if(e&&e.headers)try{var t=e.headers.get(Oe.requestContextHeader);return Ke.getCorrelationContext(t)}catch(n){Yn(d,K.FailedMonitorAjaxGetCorrelationHeader,"Failed to get Request-Context correlation header as it may be not included in the response or not accessible.",{fetchDiagnosticsMessage:x(e),exception:Be.dump(n)})}}(t)};if(L){var n={};t.headers.forEach(function(e,t){n[t]=e}),e.headerMap=n}return e}),t})["catch"](function(e){throw S(0,0,t,n,null,e.message),e}))},hkErr:Zn(d,K.FailedMonitorAjaxOpen,"Failed to monitor Window.fetch, monitoring data for this fetch call may be incorrect.")})),A=!0):o&&q.push(Fe(t,Wn,{req:function(e,t,n){h(null,t,n)}}));o&&(t[Wn].polyfill=o)}(),0<n.length&&n){for(var u=void 0,l=0;!u&&l<n.length;)n[l]&&"AppInsightsPropertiesPlugin"===n[l].identifier&&(u=n[l]),l++;u&&(C=u.context)}}},d.teardown=function(){Vn(q,function(e){e.rm()}),M=A=!(q=[]),d.setInitialized(!1)},d.trackDependencyData=function(e,t){d[N](e,t)},d.includeCorrelationHeaders=function(e,t,n,r){var i=d._currentWindowHost||u;if(t){if(Ke.canIncludeCorrelationHeader(D,e.getAbsoluteUrl(),i)){if((n=n||{}).headers=new Headers(n.headers||t instanceof Request&&t.headers||{}),T){var a="|"+e.traceID+"."+e.spanID;n.headers.set(Oe.requestIdHeader,a),w&&(e.requestHeaders[Oe.requestIdHeader]=a)}if((s=D.appId||C&&C.appId())&&(n.headers.set(Oe.requestContextHeader,Oe.requestContextAppIdFormat+s),w&&(e.requestHeaders[Oe.requestContextHeader]=Oe.requestContextAppIdFormat+s)),I){var o=new jn(e.traceID,e.spanID);n.headers.set(Oe.traceParentHeader,o.toString()),w&&(e.requestHeaders[Oe.traceParentHeader]=o.toString())}}return n}if(r){if(Ke.canIncludeCorrelationHeader(D,e.getAbsoluteUrl(),i)){if(T){a="|"+e.traceID+"."+e.spanID;r.setRequestHeader(Oe.requestIdHeader,a),w&&(e.requestHeaders[Oe.requestIdHeader]=a)}var s;if((s=D.appId||C&&C.appId())&&(r.setRequestHeader(Oe.requestContextHeader,Oe.requestContextAppIdFormat+s),w&&(e.requestHeaders[Oe.requestContextHeader]=Oe.requestContextAppIdFormat+s)),I){o=new jn(e.traceID,e.spanID);r.setRequestHeader(Oe.traceParentHeader,o.toString()),w&&(e.requestHeaders[Oe.traceParentHeader]=o.toString())}}return r}return undefined},d[N]=function(e,t,n){if(-1===E||i<E){D.distributedTracingMode!==R.W3C&&D.distributedTracingMode!==R.AI_AND_W3C||"string"!=typeof e.id||"."===e.id[e.id.length-1]||(e.id+=".");var r=sn.create(e,Bt.dataType,Bt.envelopeType,d[zn](),t,n);d.core.track(r)}else i===E&&Jn(d,K.MaxAjaxPerPVExceeded,"Maximum ajax per page view limit reached, ajax monitoring is paused until the next trackPageView(). In order to increase the limit set the maxAjaxCallsPerView configuration parameter.",!0);++i}}),e}e.AjaxPlugin=nr,e.ajaxRecord=Hn,function(e,t,n){var r=Object.defineProperty;if(r)try{return r(e,t,n)}catch(i){}typeof n.value!==undefined&&(e[t]=n.value)}(e,"__esModule",{value:!0})}); | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e.Microsoft=e.Microsoft||{},e.Microsoft.ApplicationInsights={}))}(this,function(e){"use strict";var i="function",a="object",t="undefined",o="prototype",s="hasOwnProperty";function n(){return typeof globalThis!==t&&globalThis?globalThis:typeof self!==t&&self?self:typeof window!==t&&window?window:typeof global!==t&&global?global:null}function r(e){var t=Object.create;if(t)return t(e);if(null==e)return{};var n=typeof e;if(n!==a&&n!==i)throw new TypeError("Object prototype may only be an Object:"+e);function r(){}return r[o]=e,new r}function u(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object[o][s].call(t,i)&&(e[i]=t[i]);return e}var l=function(e,t){return(l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t[s](n)&&(e[n]=t[n])})(e,t)};var c,d,f,p,g,h,L,m,v=n()||{};d=function(e,t){function n(){this.constructor=e}l(e,t),e[o]=null===t?r(t):(n[o]=t[o],new n)},(c=v).__assign=c.__assign||Object.assign||u,c.__extends=c.__extends||d,__assign=v.__assign,__extends=v.__extends,(p=f=f||{})[p.LocalStorage=0]="LocalStorage",p[p.SessionStorage=1]="SessionStorage",(h=g=g||{})[h.Default=0]="Default",h[h.Required=1]="Required",h[h.Array=2]="Array",h[h.Hidden=4]="Hidden",(m=L=L||{})[m.AI=0]="AI",m[m.AI_AND_W3C=1]="AI_AND_W3C",m[m.W3C=2]="W3C";var x=2,R=t,y=a,q=o,S=i,I="window",C="location",T="performance",_="JSON",b="crypto",k=n;function N(e){var t=k();return t&&t[e]?t[e]:e===I&&A()?window:null}function A(){return Boolean(typeof window===y&&window)}function M(){return A()?window:N(I)}function D(){return Boolean(typeof document===y&&document)?document:N("document")}function w(){return Boolean(typeof navigator===y&&navigator)?navigator:N("navigator")}function F(){return typeof location===y&&location?location:N(C)}function H(){return N(T)}function E(){return Boolean(typeof JSON===y&&JSON||null!==N(_))}function O(){return E()?JSON||N(_):null}var U="attachEvent",j="addEventListener",P="detachEvent",z="removeEventListener";function G(e,t){return typeof e===t}function B(e){return G(e,t)||e===undefined}function W(e){return B(e)||null===e}function X(e,t){return e&&Object[o].hasOwnProperty.call(e,t)}function V(e){return G(e,a)}function K(e){return G(e,i)}function Q(e,t,n,r){void 0===r&&(r=!1);var i=!1;if(!W(e))try{W(e[j])?W(e[U])||(e[U]("on"+t,n),i=!0):(e[j](t,n,r),i=!0)}catch(a){}return i}function $(e,t,n,r){if(void 0===r&&(r=!1),!W(e))try{W(e[z])?W(e[P])||e[P]("on"+t,n):e[z](t,n,r)}catch(i){}}var J=(Y.isDate=function(e){return"[object Date]"===Object[o].toString.call(e)},Y.isString=function(e){return G(e,"string")},Y.isNumber=function(e){return G(e,"number")},Y.isBoolean=function(e){return G(e,"boolean")},Y.disableCookies=function(){Y._canUseCookies=!1},Y.newGuid=function(){function n(){var e=N(b);return e?e.getRandomValues(new Uint8Array(1))[0]%16:16*Math.random()}return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(te,function(e){var t=0|n();return("x"===e?t:3&t|8).toString(16)})},Y.toISOString=function(e){if(Y.isDate(e)){var t=function(e){var t=String(e);return 1===t.length&&(t="0"+t),t};return e.getUTCFullYear()+"-"+t(e.getUTCMonth()+1)+"-"+t(e.getUTCDate())+"T"+t(e.getUTCHours())+":"+t(e.getUTCMinutes())+":"+t(e.getUTCSeconds())+"."+String((e.getUTCMilliseconds()/1e3).toFixed(3)).slice(2,5)+"Z"}},Y.arrForEach=function(e,t,n){for(var r=e.length,i=0;i<r;++i)i in e&&t.call(n||e,e[i],i,e)},Y.arrIndexOf=function(e,t,n){for(var r=e.length,i=n||0,a=Math.max(0<=i?i:r-Math.abs(i),0);a<r;a++)if(a in e&&e[a]===t)return a;return-1},Y.arrMap=function(e,t,n){for(var r=e.length,i=n||e,a=new Array(r),o=0;o<r;o++)o in e&&(a[o]=t.call(i,e[o],e));return a},Y.arrReduce=function(e,t,n){var r,i=e.length,a=0;if(3<=arguments.length)r=n;else{for(;a<i&&!(a in e);)a++;r=e[a++]}for(;a<i;)a in e&&(r=t(r,e[a],a,e)),a++;return r},Y.strTrim=function(e){return Y.isString(e)?e.replace(/^\s+|\s+$/g,""):e},Y.objKeys=function(e){var t=!{toString:null}.propertyIsEnumerable("toString");if(!(K(e)||V(e)&&null!==e))throw new TypeError("objKeys called on non-object");var n=[];for(var r in e)X(e,r)&&n.push(r);if(t)for(var i=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],a=i.length,o=0;o<a;o++)X(e,i[o])&&n.push(i[o]);return n},Y.objDefineAccessors=function(e,t,n,r){var i=Object.defineProperty;if(i)try{var a={enumerable:!0,configurable:!0};return n&&(a.get=n),r&&(a.set=r),i(e,t,a),!0}catch(o){}return!1},Y.addEventHandler=function(e,t){var n=!1,r=M();r&&(n=Q(r,e,t),n=Q(r.body,e,t)||n);var i=D();return i&&(n=ne.Attach(i,e,t)||n),n},Y.isTypeof=G,Y.isUndefined=B,Y.isNullOrUndefined=W,Y.hasOwnProperty=X,Y.isFunction=K,Y.isObject=V,Y.objCreate=r,Y);function Y(){}var Z,ee,te=/[xy]/g,ne=(re.Attach=Q,re.AttachEvent=Q,re.Detach=$,re.DetachEvent=$,re);function re(){}(ee=Z=Z||{})[ee.CRITICAL=1]="CRITICAL",ee[ee.WARNING=2]="WARNING";var ie={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},ae=(oe.sanitizeDiagnosticText=function(e){return e?'"'+e.replace(/\"/g,"")+'"':""},oe.dataType="MessageData",oe.AiNonUserActionablePrefix="AI (Internal): ",oe.AiUserActionablePrefix="AI: ",oe);function oe(e,t,n,r){void 0===n&&(n=!1),this.messageId=e,this.message=(n?oe.AiUserActionablePrefix:oe.AiNonUserActionablePrefix)+e;var i="";E()&&(i=O().stringify(r));var a=(t?" message:"+oe.sanitizeDiagnosticText(t):"")+(r?" props:"+oe.sanitizeDiagnosticText(i):"");this.message+=a}var se=(ue.prototype.throwInternal=function(e,t,n,r,i){void 0===i&&(i=!1);var a,o=new ae(t,n,i,r),s=this;if(s.enableDebugExceptions())throw o;!J.isUndefined(o)&&o&&(J.isUndefined(o.message)||(i?(a=+o.messageId,!s._messageLogged[a]&&s.consoleLoggingLevel()>=Z.WARNING&&(s.warnToConsole(o.message),s._messageLogged[a]=!0)):s.consoleLoggingLevel()>=Z.WARNING&&s.warnToConsole(o.message),s.logInternalMessage(e,o)))},ue.prototype.warnToConsole=function(e){!J.isUndefined(console)&&console&&(J.isFunction(console.warn)?console.warn(e):J.isFunction(console.log)&&console.log(e))},ue.prototype.resetInternalMessageCount=function(){this._messageCount=0,this._messageLogged={}},ue.prototype.logInternalMessage=function(e,t){var n,r,i,a,o=this;o._areInternalMessagesThrottled()||(n=!0,r=o.AIInternalMessagePrefix+t.messageId,o._messageLogged[r]?n=!1:o._messageLogged[r]=!0,n&&(e<=o.telemetryLoggingLevel()&&(o.queue.push(t),o._messageCount++),o._messageCount===o.maxInternalMessageLimit()&&(i="Internal events throttle limit per PageView reached for this app.",a=new ae(ie.MessageLimitPerPVExceeded,i,!1),o.queue.push(a),o.warnToConsole(i))))},ue.prototype._areInternalMessagesThrottled=function(){return this._messageCount>=this.maxInternalMessageLimit()},ue);function ue(e){this.queue=[],this.AIInternalMessagePrefix="AITR_",this._messageCount=0,this._messageLogged={},this.enableDebugExceptions=function(){return!1},this.consoleLoggingLevel=function(){return 0},this.telemetryLoggingLevel=function(){return 1},this.maxInternalMessageLimit=function(){return 25},J.isNullOrUndefined(e)||(J.isNullOrUndefined(e.loggingLevelConsole)||(this.consoleLoggingLevel=function(){return e.loggingLevelConsole}),J.isNullOrUndefined(e.loggingLevelTelemetry)||(this.telemetryLoggingLevel=function(){return e.loggingLevelTelemetry}),J.isNullOrUndefined(e.maxMessageLimit)||(this.maxInternalMessageLimit=function(){return e.maxMessageLimit}),J.isNullOrUndefined(e.enableDebugExceptions)||(this.enableDebugExceptions=function(){return e.enableDebugExceptions}))}var le=J.isFunction,ce=function(i,a){var o=this,s=null,u=le(i.processTelemetry),l=le(i.setNextPlugin);o._hasRun=!1,o.getPlugin=function(){return i},o.getNext=function(){return s},o.setNext=function(e){s=e},o.processTelemetry=function(e,t){if(t=t||a,i&&u){o._hasRun=!0;try{t.setNext(s),l&&i.setNextPlugin(s),s&&(s._hasRun=!1),i.processTelemetry(e,t)}catch(r){var n=s&&s._hasRun;s&&n||t.diagLog().throwInternal(Z.CRITICAL,ie.PluginException,"Plugin ["+i.identifier+"] failed during processTelemetry - "+r),s&&!n&&s.processTelemetry(e,t)}}else s&&(o._hasRun=!0,s.processTelemetry(e,t))}},de=J.isNullOrUndefined;function fe(e,t){var n=[];if(e&&0<e.length)for(var r=null,i=0;i<e.length;i++){var a,o=e[i];o&&J.isFunction(o.processTelemetry)&&(a=new ce(o,t),n.push(a),r&&r.setNext(a),r=a)}return 0<n.length?n[0]:null}var pe=function mr(e,a,n,t){var r,i,o,s,u,l=this,c=null;null!==t&&(e&&J.isFunction(e.getPlugin)?c=function(e,t,n){var r=[],i=!n;if(e)for(;e;){var a=e.getPlugin();!i&&a!==n||(i=!0,r.push(a)),e=e.getNext()}return i||r.push(n),fe(r,t)}(e,l,t||e.getPlugin()):t?(i=l,s=r=e,u=!1,(o=t)&&r&&(s=[],J.arrForEach(r,function(e){!u&&e!==o||(u=!0,s.push(e))})),o&&!u&&(s=s||[]).push(o),c=fe(s,i)):J.isUndefined(t)&&(c=fe(e,l))),l.core=function(){return n},l.diagLog=function(){return(n||{}).logger||new se(a||{})},l.getCfg=function(){return a},l.getExtCfg=function(e,t){var n,r;return void 0===t&&(t={}),!a||(r=a.extensionConfig)&&e&&(n=r[e]),n||t},l.getConfig=function(e,t,n){var r;void 0===n&&(n=!1);var i=l.getExtCfg(e,null);return i&&!de(i[t])?r=i[t]:a&&!de(a[t])&&(r=a[t]),de(r)?n:r},l.hasNext=function(){return null!=c},l.getNext=function(){return c},l.setNext=function(e){c=e},l.processNext=function(e){var t=c;t&&(c=t.getNext(),t.processTelemetry(e,l))},l.createNew=function(e,t){return void 0===e&&(e=null),new mr(e||c,a,n,t)}},ge=J.isFunction,he="getPlugin",me=(ve.prototype.initialize=function(e,t,n,r){this._baseTelInit(e,t,n,r)},ve);function ve(){var a=this,o=!1,s=null,u=null;a.core=null,a.diagLog=function(e){return a._getTelCtx(e).diagLog()},a.isInitialized=function(){return o},a.setInitialized=function(e){o=e},a.setNextPlugin=function(e){u=e},a.processNext=function(e,t){t?t.processNext(e):u&&ge(u.processTelemetry)&&u.processTelemetry(e,null)},a._getTelCtx=function(e){void 0===e&&(e=null);var t,n=e;return n||(t=s||new pe(null,{},a.core),n=u&&u[he]?t.createNew(null,u[he]):t.createNew(null,u)),n},a._baseTelInit=function(e,t,n,r){e&&(e.extensionConfig=e.extensionConfig||[]),!r&&t&&(r=t.getProcessTelContext().getNext());var i=u;u&&u[he]&&(i=u[he]()),a.core=t,s=new pe(r,e,t,i),o=!0}}var xe=J.isFunction,ye="processTelemetry",Se="priority",Ie="setNextPlugin",Ce="isInitialized";function Te(t,n){for(var e=[],r=null,i=t.getNext();i;){var a=i.getPlugin();a&&(r&&xe(r[Ie])&&xe(a[ye])&&r[Ie](a),xe(a[Ce])&&a[Ce]()||e.push(a),r=a,i=i.getNext())}J.arrForEach(e,function(e){e.initialize(t.getCfg(),t.core(),n,t.getNext())})}function _e(e){return e.sort(function(e,t){var n=0,r=xe(t[ye]);return xe(e[ye])?n=r?e[Se]-t[Se]:1:r&&(n=-1),n})}var be=500,Ne="Channel has invalid priority",Ae=J.arrForEach,Me=J.objDefineAccessors;function De(e,t){t&&0<t.length&&(t=t.sort(function(e,t){return e.priority-t.priority}),Ae(t,function(e){if(e.priority<be)throw Error(Ne+e.identifier)}),e.push(t))}var we,Ee=(we=me,__extends(Le,we),Le.prototype.processTelemetry=function(t,n){var r=this;this._channelQueue&&Ae(this._channelQueue,function(e){0<e.length&&r._getTelCtx(n).createNew(e).processNext(t)})},Le.prototype.getChannelControls=function(){return this._channelQueue},Le.prototype.initialize=function(t,n,r){var e,i,a,o,s;this.isInitialized()||(we.prototype.initialize.call(this,t,n,r),t.isCookieUseDisabled&&J.disableCookies(),e=this._channelQueue=(a=r,s=[],(i=(t||{}).channels)&&Ae(i,function(e){return De(s,e)}),a&&(o=[],Ae(a,function(e){e.priority>be&&o.push(e)}),De(s,o)),s),Ae(e,function(e){return Te(new pe(e,t,n),r)}))},Le._staticInit=(Me(Le.prototype,"ChannelControls",Le.prototype.getChannelControls),void Me(Le.prototype,"channelQueue",Le.prototype.getChannelControls)),Le);function Le(){var e=null!==we&&we.apply(this,arguments)||this;return e.identifier="ChannelControllerPlugin",e.priority=be,e}var Re=J.arrForEach,qe=J.isNullOrUndefined,ke=(Fe.prototype.initialize=function(e,t,r,n){var i=this;if(i.isInitialized())throw Error("Core should not be initialized more than once");if(!e||qe(e.instrumentationKey))throw Error("Please provide instrumentation key");i.config=e;var a=i._channelController;n=n||J.objCreate({addNotificationListener:function(e){},removeNotificationListener:function(e){},eventsSent:function(e){},eventsDiscarded:function(e,t){},eventsSendRequest:function(e,t){}}),i._notificationManager=n,e.extensions=qe(e.extensions)?[]:e.extensions,(e.extensionConfig=qe(e.extensionConfig)?{}:e.extensionConfig).NotificationManager=n,r=r||J.objCreate({throwInternal:function(e,t,n,r,i){void 0===i&&(i=!1)},warnToConsole:function(e){},resetInternalMessageCount:function(){}}),i.logger=r;var o=[];o.push.apply(o,t.concat(e.extensions)),o=_e(o);var s=[],u={};if(Re(o,function(e){if(qe(e)||qe(e.initialize))throw Error("Extensions must provide callback to initialize");var t=e.priority,n=e.identifier;e&&t&&(qe(u[t])?u[t]=n:r.warnToConsole("Two extensions have same priority #"+t+" - "+u[t]+", "+n)),(!t||t<a.priority)&&s.push(e)}),o.push(a),s.push(a),o=_e(o),i._extensions=o,Te(new pe([a],e,i),o),Te(new pe(s,e,i),o),i._extensions=s,0===i.getTransmissionControls().length)throw new Error("No channels available");i._setInit(!0)},Fe.prototype.getTransmissionControls=function(){return this._channelController.getChannelControls()},Fe.prototype.track=function(e){var t=this;e.iKey||(e.iKey=t.config.instrumentationKey),e.time||(e.time=J.toISOString(new Date)),qe(e.ver)&&(e.ver="4.0"),t.isInitialized()?(0<t._eventQueue.length&&(Re(t._eventQueue,function(e){t.getProcessTelContext().processNext(e)}),t._eventQueue=[]),t.getProcessTelContext().processNext(e)):t._eventQueue.push(e)},Fe.prototype.getProcessTelContext=function(){var e=this._extensions,t=e;return e&&0!==e.length||(t=[this._channelController]),new pe(t,this.config,this)},Fe);function Fe(){var t=!1,e=this;e._extensions=new Array,e._channelController=new Ee,e.isInitialized=function(){return t},e._setInit=function(e){t=e},e._eventQueue=[]}var He=(Oe.prototype.addNotificationListener=function(e){this.listeners.push(e)},Oe.prototype.removeNotificationListener=function(e){for(var t=J.arrIndexOf(this.listeners,e);-1<t;)this.listeners.splice(t,1),t=J.arrIndexOf(this.listeners,e)},Oe.prototype.eventsSent=function(t){for(var n=this,r=this,e=0;e<this.listeners.length;++e)!function(e){r.listeners[e].eventsSent&&setTimeout(function(){return n.listeners[e].eventsSent(t)},0)}(e)},Oe.prototype.eventsDiscarded=function(t,n){for(var r=this,i=this,e=0;e<this.listeners.length;++e)!function(e){i.listeners[e].eventsDiscarded&&setTimeout(function(){return r.listeners[e].eventsDiscarded(t,n)},0)}(e)},Oe.prototype.eventsSendRequest=function(n,r){for(var i=this,a=this,e=0;e<this.listeners.length;++e)!function(e){if(a.listeners[e].eventsSendRequest)if(r)setTimeout(function(){return i.listeners[e].eventsSendRequest(n,r)},0);else try{a.listeners[e].eventsSendRequest(n,r)}catch(t){}}(e)},Oe);function Oe(){this.listeners=[]}var Ue;Ue=ke,__extends(je,Ue),je.prototype.initialize=function(e,t){var n=this;n._notificationManager=new He,n.logger=new se(e),n.config=e,Ue.prototype.initialize.call(this,e,t,n.logger,n._notificationManager)},je.prototype.getTransmissionControls=function(){return Ue.prototype.getTransmissionControls.call(this)},je.prototype.track=function(e){if(null===e)throw this._notifyInvalidEvent(e),Error("Invalid telemetry item");this._validateTelemetryItem(e),Ue.prototype.track.call(this,e)},je.prototype.addNotificationListener=function(e){this._notificationManager&&this._notificationManager.addNotificationListener(e)},je.prototype.removeNotificationListener=function(e){this._notificationManager&&this._notificationManager.removeNotificationListener(e)},je.prototype.pollInternalLogs=function(r){var t=this,e=this.config.diagnosticLogInterval;return e&&0<e||(e=1e4),setInterval(function(){var n=t,e=n.logger?n.logger.queue:[];J.arrForEach(e,function(e){var t={name:r||"InternalMessageId: "+e.messageId,iKey:n.config.instrumentationKey,time:J.toISOString(new Date),baseType:ae.dataType,baseData:{message:e.message}};n.track(t)}),e.length=0},e)},je.prototype._validateTelemetryItem=function(e){if(J.isNullOrUndefined(e.name))throw this._notifyInvalidEvent(e),Error("telemetry name required")},je.prototype._notifyInvalidEvent=function(e){this._notificationManager&&this._notificationManager.eventsDiscarded([e],x)};function je(){return Ue.call(this)||this}var Pe="_aiHooks",ze=["req","rsp","hkErr","fnErr"];function Ge(e,t){if(e)for(var n=0;n<e.length&&!t(e[n],n);n++);}function Be(e,u,l,c,d){0<=d&&d<=2&&Ge(e,function(e,t){var n=e.cbks,r=n[ze[d]];if(r){u.ctx=function(){return c[t]=c[t]||{}};try{r.apply(u.inst,l)}catch(o){var i=u.err;try{var a=n[ze[2]];a&&(u.err=o,a.apply(u.inst,l))}catch(s){}finally{u.err=i}}}})}function We(u){return function(){var n=arguments,e=u.h,r={name:u.n,inst:this,ctx:null,set:function(e,t){(n=a([],n))[e]=t,i=a([r],n)}},t=[],i=a([r],n);function a(t,e){return Ge(e,function(e){t.push(e)}),t}Be(e,r,i,t,0);var o=u.f;try{r.rslt=o.apply(this,n)}catch(s){throw r.err=s,Be(e,r,i,t,3),s}return Be(e,r,i,t,1),r.rslt}}function Xe(e,t,n,r){if(void 0===r&&(r=!0),e&&t&&n){var i=function l(e,t,n){var r=null;return e&&(J.hasOwnProperty(e,t)?r=e:n&&(r=l(e[q],t,!1))),r}(e,t,r),a=i[t];if(typeof a===S){var o,s=a[Pe];s||((o=We(s={i:0,n:t,f:a,h:[]}))[Pe]=s,i[t]=o);var u={id:s.i,cbks:n,rm:function(){var n=this.id;Ge(s.h,function(e,t){return e.id===n&&(s.h.splice(t,1),1)})}};return s.i++,s.h.push(u),u}}return null}var Ve=(Ke.requestContextHeader="Request-Context",Ke.requestContextTargetKey="appId",Ke.requestContextAppIdFormat="appId=cid-v1:",Ke.requestIdHeader="Request-Id",Ke.traceParentHeader="traceparent",Ke.sdkContextHeader="Sdk-Context",Ke.sdkContextHeaderAppIdRequest="appId",Ke.requestContextHeaderLowerCase="request-context",Ke);function Ke(){}var Qe=($e.sanitizeKeyAndAddUniqueness=function(e,t,n){var r=t.length,i=$e.sanitizeKey(e,t);if(i.length!==r){for(var a=0,o=i;n[o]!==undefined;)a++,o=i.substring(0,$e.MAX_NAME_LENGTH-3)+$e.padNumber(a);i=o}return i},$e.sanitizeKey=function(e,t){var n;return t&&(t=$e.trim(t.toString())).length>$e.MAX_NAME_LENGTH&&(n=t.substring(0,$e.MAX_NAME_LENGTH),e.throwInternal(Z.WARNING,ie.NameTooLong,"name is too long. It has been truncated to "+$e.MAX_NAME_LENGTH+" characters.",{name:t},!0)),n||t},$e.sanitizeString=function(e,t,n){var r;return void 0===n&&(n=$e.MAX_STRING_LENGTH),t&&(n=n||$e.MAX_STRING_LENGTH,(t=$e.trim(t)).toString().length>n&&(r=t.toString().substring(0,n),e.throwInternal(Z.WARNING,ie.StringValueTooLong,"string value is too long. It has been truncated to "+n+" characters.",{value:t},!0))),r||t},$e.sanitizeUrl=function(e,t){return $e.sanitizeInput(e,t,$e.MAX_URL_LENGTH,ie.UrlTooLong)},$e.sanitizeMessage=function(e,t){var n;return t&&t.length>$e.MAX_MESSAGE_LENGTH&&(n=t.substring(0,$e.MAX_MESSAGE_LENGTH),e.throwInternal(Z.WARNING,ie.MessageTruncated,"message is too long, it has been truncated to "+$e.MAX_MESSAGE_LENGTH+" characters.",{message:t},!0)),n||t},$e.sanitizeException=function(e,t){var n;return t&&t.length>$e.MAX_EXCEPTION_LENGTH&&(n=t.substring(0,$e.MAX_EXCEPTION_LENGTH),e.throwInternal(Z.WARNING,ie.ExceptionTruncated,"exception is too long, it has been truncated to "+$e.MAX_EXCEPTION_LENGTH+" characters.",{exception:t},!0)),n||t},$e.sanitizeProperties=function(e,t){if(t){var n={};for(var r in t){var i=t[r];if(J.isObject(i)&&E())try{i=O().stringify(i)}catch(a){e.throwInternal(Z.WARNING,ie.CannotSerializeObjectNonSerializable,"custom property is not valid",{exception:a},!0)}i=$e.sanitizeString(e,i,$e.MAX_PROPERTY_LENGTH),n[r=$e.sanitizeKeyAndAddUniqueness(e,r,n)]=i}t=n}return t},$e.sanitizeMeasurements=function(e,t){if(t){var n={};for(var r in t){var i=t[r];n[r=$e.sanitizeKeyAndAddUniqueness(e,r,n)]=i}t=n}return t},$e.sanitizeId=function(e,t){return t?$e.sanitizeInput(e,t,$e.MAX_ID_LENGTH,ie.IdTooLong).toString():t},$e.sanitizeInput=function(e,t,n,r){var i;return t&&(t=$e.trim(t)).length>n&&(i=t.substring(0,n),e.throwInternal(Z.WARNING,r,"input is too long, it has been truncated to "+n+" characters.",{data:t},!0)),i||t},$e.padNumber=function(e){var t="00"+e;return t.substr(t.length-3)},$e.trim=function(e){return J.isString(e)?e.replace(/^\s+|\s+$/g,""):e},$e.MAX_NAME_LENGTH=150,$e.MAX_ID_LENGTH=128,$e.MAX_PROPERTY_LENGTH=8192,$e.MAX_STRING_LENGTH=1024,$e.MAX_URL_LENGTH=2048,$e.MAX_MESSAGE_LENGTH=32768,$e.MAX_EXCEPTION_LENGTH=32768,$e);function $e(){}var Je=w(),Ye=J.isString,Ze=null;var et=(tt.createDomEvent=function(e){var t,n=null;return J.isFunction(Event)?n=new Event(e):(t=D())&&t.createEvent&&(n=t.createEvent("Event")).initEvent(e,!0,!0),n},tt.disableStorage=function(){tt._canUseLocalStorage=!1,tt._canUseSessionStorage=!1},tt._getLocalStorageObject=function(){return tt.canUseLocalStorage()?tt._getVerifiedStorageObject(f.LocalStorage):null},tt._getVerifiedStorageObject=function(e){var t,n,r=null;try{if(J.isNullOrUndefined(k()))return null;n=new Date,(r=e===f.LocalStorage?N("localStorage"):N("sessionStorage")).setItem(n.toString(),n.toString()),t=r.getItem(n.toString())!==n.toString(),r.removeItem(n.toString()),t&&(r=null)}catch(i){r=null}return r},tt.isInternalApplicationInsightsEndpoint=function(e){return-1!==tt._internalEndpoints.indexOf(e.toLowerCase())},tt.canUseLocalStorage=function(){return tt._canUseLocalStorage===undefined&&(tt._canUseLocalStorage=!!tt._getVerifiedStorageObject(f.LocalStorage)),tt._canUseLocalStorage},tt.getStorage=function(e,t){var n=tt._getLocalStorageObject();if(null!==n)try{return n.getItem(t)}catch(r){tt._canUseLocalStorage=!1,e.throwInternal(Z.WARNING,ie.BrowserCannotReadLocalStorage,"Browser failed read of local storage. "+tt.getExceptionName(r),{exception:tt.dump(r)})}return null},tt.setStorage=function(e,t,n){var r=tt._getLocalStorageObject();if(null!==r)try{return r.setItem(t,n),!0}catch(i){tt._canUseLocalStorage=!1,e.throwInternal(Z.WARNING,ie.BrowserCannotWriteLocalStorage,"Browser failed write to local storage. "+tt.getExceptionName(i),{exception:tt.dump(i)})}return!1},tt.removeStorage=function(e,t){var n=tt._getLocalStorageObject();if(null!==n)try{return n.removeItem(t),!0}catch(r){tt._canUseLocalStorage=!1,e.throwInternal(Z.WARNING,ie.BrowserFailedRemovalFromLocalStorage,"Browser failed removal of local storage item. "+tt.getExceptionName(r),{exception:tt.dump(r)})}return!1},tt._getSessionStorageObject=function(){return tt.canUseSessionStorage()?tt._getVerifiedStorageObject(f.SessionStorage):null},tt.canUseSessionStorage=function(){return tt._canUseSessionStorage===undefined&&(tt._canUseSessionStorage=!!tt._getVerifiedStorageObject(f.SessionStorage)),tt._canUseSessionStorage},tt.getSessionStorageKeys=function(){var e=[];if(tt.canUseSessionStorage())for(var t in N("sessionStorage"))e.push(t);return e},tt.getSessionStorage=function(e,t){var n=tt._getSessionStorageObject();if(null!==n)try{return n.getItem(t)}catch(r){tt._canUseSessionStorage=!1,e.throwInternal(Z.WARNING,ie.BrowserCannotReadSessionStorage,"Browser failed read of session storage. "+tt.getExceptionName(r),{exception:tt.dump(r)})}return null},tt.setSessionStorage=function(e,t,n){var r=tt._getSessionStorageObject();if(null!==r)try{return r.setItem(t,n),!0}catch(i){tt._canUseSessionStorage=!1,e.throwInternal(Z.WARNING,ie.BrowserCannotWriteSessionStorage,"Browser failed write to session storage. "+tt.getExceptionName(i),{exception:tt.dump(i)})}return!1},tt.removeSessionStorage=function(e,t){var n=tt._getSessionStorageObject();if(null!==n)try{return n.removeItem(t),!0}catch(r){tt._canUseSessionStorage=!1,e.throwInternal(Z.WARNING,ie.BrowserFailedRemovalFromSessionStorage,"Browser failed removal of session storage item. "+tt.getExceptionName(r),{exception:tt.dump(r)})}return!1},tt.disableCookies=function(){J.disableCookies()},tt.canUseCookies=function(e){if(J._canUseCookies===undefined){J._canUseCookies=!1;try{J._canUseCookies=tt.document.cookie!==undefined}catch(t){e.throwInternal(Z.WARNING,ie.CannotAccessCookie,"Cannot access document.cookie - "+tt.getExceptionName(t),{exception:tt.dump(t)})}}return J._canUseCookies},tt.disallowsSameSiteNone=function(e){return!!Ye(e)&&(-1!==e.indexOf("CPU iPhone OS 12")||-1!==e.indexOf("iPad; CPU OS 12")||-1!==e.indexOf("Macintosh; Intel Mac OS X 10_14")&&-1!==e.indexOf("Version/")&&-1!==e.indexOf("Safari")||-1!==e.indexOf("Macintosh; Intel Mac OS X 10_14")&&(n="AppleWebKit/605.1.15 (KHTML, like Gecko)",r=(t=e).length,i=r-n.length,t.substring(0<=i?i:0,r)===n)||-1!==e.indexOf("Chrome/5")||-1!==e.indexOf("Chrome/6")||-1!==e.indexOf("UnrealEngine")&&-1===e.indexOf("Chrome")||-1!==e.indexOf("UCBrowser/12")||-1!==e.indexOf("UCBrowser/11"));var t,n,r,i},tt.setCookie=function(e,t,n,r){var i,a,o;tt.canUseCookies(e)&&(a=i="",r&&(i=";domain="+r),(o=F())&&"https:"===o.protocol&&(a=";secure",null===Ze&&(Ze=tt.disallowsSameSiteNone((w()||{}).userAgent)),Ze||(n+=";SameSite=None")),tt.document.cookie=t+"="+n+i+";path=/"+a)},tt.stringToBoolOrDefault=function(e,t){return void 0===t&&(t=!1),e===undefined||null===e?t:"true"===e.toString().toLowerCase()},tt.getCookie=function(e,t){if(tt.canUseCookies(e)){var n="";if(t&&t.length)for(var r=t+"=",i=tt.document.cookie.split(";"),a=0;a<i.length;a++){var o=i[a];if((o=tt.trim(o))&&0===o.indexOf(r)){n=o.substring(r.length,i[a].length);break}}return n}},tt.deleteCookie=function(e,t){tt.canUseCookies(e)&&(tt.document.cookie=t+"=;path=/;expires=Thu, 01 Jan 1970 00:00:01 GMT;")},tt.newId=function(){for(var e="",t=1073741824*Math.random();0<t;)e+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(t%64),t=Math.floor(t/64);return e},tt.random32=function(){return 4294967296*Math.random()|0},tt.generateW3CId=function(){for(var e,t=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"],n="",r=0;r<4;r++)n+=t[15&(e=tt.random32())]+t[e>>4&15]+t[e>>8&15]+t[e>>12&15]+t[e>>16&15]+t[e>>20&15]+t[e>>24&15]+t[e>>28&15];var i=t[8+4*Math.random()|0];return n.substr(0,8)+n.substr(9,4)+"4"+n.substr(13,3)+i+n.substr(16,3)+n.substr(19,12)},tt.isArray=function(e){return"[object Array]"===Object[q].toString.call(e)},tt.isError=function(e){return"[object Error]"===Object[q].toString.call(e)},tt.getIEVersion=function(e){void 0===e&&(e=null);var t=e?e.toLowerCase():Je?(Je.userAgent||"").toLowerCase():"";if(-1!==t.indexOf("msie"))return parseInt(t.split("msie")[1]);if(t.indexOf("trident/")){var n=parseInt(t.split("trident/")[1]);if(n)return n+4}return null},tt.msToTimeSpan=function(e){(isNaN(e)||e<0)&&(e=0);var t=""+(e=Math.round(e))%1e3,n=""+Math.floor(e/1e3)%60,r=""+Math.floor(e/6e4)%60,i=""+Math.floor(e/36e5)%24,a=Math.floor(e/864e5),t=1===t.length?"00"+t:2===t.length?"0"+t:t,n=n.length<2?"0"+n:n,r=r.length<2?"0"+r:r;return(0<a?a+".":"")+(i=i.length<2?"0"+i:i)+":"+r+":"+n+"."+t},tt.isCrossOriginError=function(e,t,n,r,i){return("Script error."===e||"Script error"===e)&&!i},tt.dump=function(e){var t=Object[q].toString.call(e),n="";return"[object Error]"===t?n="{ stack: '"+e.stack+"', message: '"+e.message+"', name: '"+e.name+"'":E()&&(n=O().stringify(e)),t+n},tt.getExceptionName=function(e){return"[object Error]"===Object[q].toString.call(e)?e.name:""},tt.addEventHandler=function(e,t){return ne.Attach(M(),e,t)},tt.IsBeaconApiSupported=function(){return"sendBeacon"in Je&&Je.sendBeacon},tt.getExtension=function(e,t){for(var n=null,r=0;!n&&r<e.length;)e[r]&&e[r].identifier===t&&(n=e[r]),r++;return n},tt.document=D()||{},tt._canUseLocalStorage=undefined,tt._canUseSessionStorage=undefined,tt._internalEndpoints=["https://dc.services.visualstudio.com/v2/track","https://breeze.aimon.applicationinsights.io/v2/track","https://dc-int.services.visualstudio.com/v2/track"],tt.NotSpecified="not_specified",tt.trim=J.strTrim,tt.isDate=J.isDate,tt.toISOStringForIE8=J.toISOString,tt);function tt(){}var nt=(rt.parseUrl=function(e){var t=rt._htmlAnchorIdx,n=rt._htmlAnchorElement,r=n[t];return rt.document.createElement?n[t]||(r=n[t]=rt.document.createElement("a")):r={host:rt.parseHost(e,!0)},r.href=e,++t>=n.length&&(t=0),rt._htmlAnchorIdx=t,r},rt.getAbsoluteUrl=function(e){var t,n=rt.parseUrl(e);return n&&(t=n.href),t},rt.getPathName=function(e){var t,n=rt.parseUrl(e);return n&&(t=n.pathname),t},rt.getCompleteUrl=function(e,t){return e?e.toUpperCase()+" "+t:t},rt.parseHost=function(e,t){var n=rt.parseFullHost(e,t);if(n){var r=n.match(/(www[0-9]?\.)?(.[^/:]+)(\:[\d]+)?/i);if(null!=r&&3<r.length&&Ye(r[2])&&0<r[2].length)return r[2]+(r[3]||"")}return n},rt.parseFullHost=function(e,t){var n,r,i,a=null;return!e||null!=(n=e.match(/(\w*):\/\/(.[^/:]+)(\:[\d]+)?/i))&&2<n.length&&Ye(n[2])&&0<n[2].length&&(a=n[2]||"",t&&2<n.length&&(r=(n[1]||"").toLowerCase(),i=n[3]||"",("http"===r&&":80"===i||"https"===r&&":443"===i)&&(i=""),a+=i)),a},rt.document=D()||{},rt._htmlAnchorIdx=0,rt._htmlAnchorElement=[null,null,null,null,null],rt);function rt(){}var it=(at.canIncludeCorrelationHeader=function(e,t,n){if(!t||e&&e.disableCorrelationHeaders)return!1;var r=nt.parseUrl(t).host.toLowerCase();if(!r||-1===r.indexOf(":443")&&-1===r.indexOf(":80")||(r=(nt.parseFullHost(t,!0)||"").toLowerCase()),!(e&&e.enableCorsCorrelation||r===n))return!1;var i,a=e&&e.correlationHeaderDomains;if(a&&(J.arrForEach(a,function(e){var t=new RegExp(e.toLowerCase().replace(/\./g,".").replace(/\*/g,".*"));i=i||t.test(r)}),!i))return!1;var o=e&&e.correlationHeaderExcludedDomains;if(!o||0===o.length)return!0;for(var s=0;s<o.length;s++)if(new RegExp(o[s].toLowerCase().replace(/\./g,".").replace(/\*/g,".*")).test(r))return!1;return r&&0<r.length},at.getCorrelationContext=function(e){if(e){var t=at.getCorrelationContextValue(e,Ve.requestContextTargetKey);if(t&&t!==at.correlationIdPrefix)return t}},at.getCorrelationContextValue=function(e,t){if(e)for(var n=e.split(","),r=0;r<n.length;++r){var i=n[r].split("=");if(2===i.length&&i[0]===t)return i[1]}},at.correlationIdPrefix="cid-v1:",at);function at(){}var ot=(st.ParseDependencyPath=function(e,t,n,r){var i,a,o,s=r,u=r;return s=t&&0<t.length?(o=(i=nt.parseUrl(t)).host,s||(null!=i.pathname?("/"!==(a=0===i.pathname.length?"/":i.pathname).charAt(0)&&(a="/"+a),u=i.pathname,Qe.sanitizeString(e,n?n+" "+a:a)):Qe.sanitizeString(e,t))):o=r,{target:o,name:s,data:u}},st);function st(){}var ut=(lt.Now=function(){var e=H();return e&&e.now&&e.timing?e.now()+e.timing.navigationStart:(new Date).getTime()},lt.GetDuration=function(e,t){var n=null;return 0===e||0===t||J.isNullOrUndefined(e)||J.isNullOrUndefined(t)||(n=t-e),n},lt);function lt(){}var ct,dt="Microsoft_ApplicationInsights_BypassAjaxInstrumentation",ft=(ct=function(){},__extends(pt,ct),pt);function pt(){return ct.call(this)||this}var gt;gt=function(){this.ver=1,this.sampleRate=100,this.tags={}},__extends(ht,gt);function ht(e,t,n){var r=gt.call(this)||this;return r.name=Qe.sanitizeString(e,n)||et.NotSpecified,r.data=t,r.time=J.toISOString(new Date),r.aiDataContract={time:g.Required,iKey:g.Required,name:g.Required,sampleRate:function(){return 100===r.sampleRate?g.Hidden:g.Required},tags:g.Required,data:g.Required},r}var mt,vt=function(){},xt=(mt=vt,__extends(yt,mt),yt);function yt(){var e=mt.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}var St;St=xt,__extends(It,St),It.envelopeType="Microsoft.ApplicationInsights.{0}.Event",It.dataType="EventData";function It(e,t,n,r){var i=St.call(this)||this;return i.aiDataContract={ver:g.Required,name:g.Required,properties:g.Default,measurements:g.Default},i.name=Qe.sanitizeString(e,t)||et.NotSpecified,i.properties=Qe.sanitizeProperties(e,n),i.measurements=Qe.sanitizeMeasurements(e,r),i}var Ct,Tt=function(){},_t=(Ct=vt,__extends(bt,Ct),bt);function bt(){var e=Ct.call(this)||this;return e.ver=2,e.exceptions=[],e.properties={},e.measurements={},e}var Nt,At=function(){this.hasFullStack=!0,this.parsedStack=[]};Nt=_t,__extends(Mt,Nt),Mt.CreateFromInterface=function(t,e){var n=e.exceptions&&J.arrMap(e.exceptions,function(e){return wt.CreateFromInterface(t,e)});return new Mt(t,__assign({},e,{exceptions:n}))},Mt.prototype.toInterface=function(){var e=this,t=e.exceptions,n=e.properties,r=e.measurements,i=e.severityLevel,a=(e.ver,e.problemGroup),o=e.id,s=e.isManual;return{ver:"4.0",exceptions:t instanceof Array&&J.arrMap(t,function(e){return e.toInterface()})||undefined,severityLevel:i,properties:n,measurements:r,problemGroup:a,id:o,isManual:s}},Mt.CreateSimpleException=function(e,t,n,r,i,a){return{exceptions:[{hasFullStack:!0,message:e,stack:i,typeName:t}]}},Mt.envelopeType="Microsoft.ApplicationInsights.{0}.Exception",Mt.dataType="ExceptionData";function Mt(e,t,n,r,i,a){var o=Nt.call(this)||this;return o.aiDataContract={ver:g.Required,exceptions:g.Required,severityLevel:g.Default,properties:g.Default,measurements:g.Default},t instanceof Error?(o.exceptions=[new wt(e,t)],o.properties=Qe.sanitizeProperties(e,n),o.measurements=Qe.sanitizeMeasurements(e,r),i&&(o.severityLevel=i),a&&(o.id=a)):(o.exceptions=t.exceptions,o.properties=t.properties,o.measurements=t.measurements,t.severityLevel&&(o.severityLevel=t.severityLevel),t.id&&(o.id=t.id),t.problemGroup&&(o.problemGroup=t.problemGroup),o.ver=2,J.isNullOrUndefined(t.isManual)||(o.isManual=t.isManual)),o}var Dt,wt=(Dt=At,__extends(Et,Dt),Et.prototype.toInterface=function(){var e=this.parsedStack instanceof Array&&J.arrMap(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.stack,parsedStack:e||undefined}},Et.CreateFromInterface=function(e,t){var n=t.parsedStack instanceof Array&&J.arrMap(t.parsedStack,function(e){return Rt.CreateFromInterface(e)})||t.parsedStack;return new Et(e,__assign({},t,{parsedStack:n}))},Et.parseStack=function(e){if(J.isString(e)){for(var t=e.split("\n"),n=[],r=0,i=0,a=0;a<=t.length;a++){var o,s=t[a];Rt.regex.test(s)&&(i+=(o=new Rt(t[a],r++)).sizeInBytes,n.push(o))}if(32768<i)for(var u=0,l=n.length-1,c=0,d=u,f=l;u<l;){if(32768<(c+=n[u].sizeInBytes+n[l].sizeInBytes)){var p=f-d+1;n.splice(d,p);break}d=u,f=l,u++,l--}}return n},Et);function Et(e,t){var n,r=Dt.call(this)||this;return r.aiDataContract={id:g.Default,outerId:g.Default,typeName:g.Required,message:g.Required,hasFullStack:g.Default,stack:g.Default,parsedStack:g.Array},t instanceof Error?(r.typeName=Qe.sanitizeString(e,t.name)||et.NotSpecified,r.message=Qe.sanitizeMessage(e,t.message)||et.NotSpecified,n=t.stack,r.parsedStack=Et.parseStack(n),r.stack=Qe.sanitizeException(e,n),r.hasFullStack=et.isArray(r.parsedStack)&&0<r.parsedStack.length):(r.typeName=t.typeName,r.message=t.message,r.stack=t.stack,r.parsedStack=t.parsedStack,r.hasFullStack=t.hasFullStack),r}var Lt,Rt=(Lt=Tt,__extends(qt,Lt),qt.CreateFromInterface=function(e){return new qt(e,null)},qt.prototype.toInterface=function(){return{level:this.level,method:this.method,assembly:this.assembly,fileName:this.fileName,line:this.line}},qt.regex=/^([\s]+at)?(.*?)(\@|\s\(|\s)([^\(\@\n]+):([0-9]+):([0-9]+)(\)?)$/,qt.baseSize=58,qt);function qt(e,t){var n,r,i=Lt.call(this)||this;return i.sizeInBytes=0,i.aiDataContract={level:g.Required,method:g.Required,assembly:g.Default,fileName:g.Default,line:g.Default},"string"==typeof e?(n=e,i.level=t,i.method="<no_method>",i.assembly=et.trim(n),i.fileName="",i.line=0,(r=n.match(qt.regex))&&5<=r.length&&(i.method=et.trim(r[2])||i.method,i.fileName=et.trim(r[4]),i.line=parseInt(r[5])||0)):(i.level=e.level,i.method=e.method,i.assembly=e.assembly,i.fileName=e.fileName,i.line=e.line,i.sizeInBytes=0),i.sizeInBytes+=i.method.length,i.sizeInBytes+=i.fileName.length,i.sizeInBytes+=i.assembly.length,i.sizeInBytes+=qt.baseSize,i.sizeInBytes+=i.level.toString().length,i.sizeInBytes+=i.line.toString().length,i}var kt,Ft,Ht,Ot=(kt=vt,__extends(Ut,kt),Ut);function Ut(){var e=kt.call(this)||this;return e.ver=2,e.metrics=[],e.properties={},e.measurements={},e}(Ht=Ft=Ft||{})[Ht.Measurement=0]="Measurement",Ht[Ht.Aggregation=1]="Aggregation";var jt,Pt=(jt=function(){this.kind=Ft.Measurement},__extends(zt,jt),zt);function zt(){var e=null!==jt&&jt.apply(this,arguments)||this;return e.aiDataContract={name:g.Required,kind:g.Default,value:g.Required,count:g.Default,min:g.Default,max:g.Default,stdDev:g.Default},e}var Gt;Gt=Ot,__extends(Bt,Gt),Bt.envelopeType="Microsoft.ApplicationInsights.{0}.Metric",Bt.dataType="MetricData";function Bt(e,t,n,r,i,a,o,s){var u=Gt.call(this)||this;u.aiDataContract={ver:g.Required,metrics:g.Required,properties:g.Default};var l=new Pt;return l.count=0<r?r:undefined,l.max=isNaN(a)||null===a?undefined:a,l.min=isNaN(i)||null===i?undefined:i,l.name=Qe.sanitizeString(e,t)||et.NotSpecified,l.value=n,u.metrics=[l],u.properties=Qe.sanitizeProperties(e,o),u.measurements=Qe.sanitizeMeasurements(e,s),u}var Wt,Xt=(Wt=xt,__extends(Vt,Wt),Vt);function Vt(){var e=Wt.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}var Kt;Kt=Xt,__extends(Qt,Kt),Qt.envelopeType="Microsoft.ApplicationInsights.{0}.Pageview",Qt.dataType="PageviewData";function Qt(e,t,n,r,i,a,o){var s=Kt.call(this)||this;return s.aiDataContract={ver:g.Required,name:g.Default,url:g.Default,duration:g.Default,properties:g.Default,measurements:g.Default,id:g.Default},s.id=Qe.sanitizeId(e,o),s.url=Qe.sanitizeUrl(e,n),s.name=Qe.sanitizeString(e,t)||et.NotSpecified,isNaN(r)||(s.duration=et.msToTimeSpan(r)),s.properties=Qe.sanitizeProperties(e,i),s.measurements=Qe.sanitizeMeasurements(e,a),s}var $t,Jt=($t=vt,__extends(Yt,$t),Yt);function Yt(){var e=$t.call(this)||this;return e.ver=2,e.success=!0,e.properties={},e.measurements={},e}var Zt,en=(Zt=Jt,__extends(tn,Zt),tn.envelopeType="Microsoft.ApplicationInsights.{0}.RemoteDependency",tn.dataType="RemoteDependencyData",tn);function tn(e,t,n,r,i,a,o,s,u,l,c,d){void 0===u&&(u="Ajax");var f=Zt.call(this)||this;f.aiDataContract={id:g.Required,ver:g.Required,name:g.Default,resultCode:g.Default,duration:g.Default,success:g.Default,data:g.Default,target:g.Default,type:g.Default,properties:g.Default,measurements:g.Default,kind:g.Default,value:g.Default,count:g.Default,min:g.Default,max:g.Default,stdDev:g.Default,dependencyKind:g.Default,dependencySource:g.Default,commandName:g.Default,dependencyTypeName:g.Default},f.id=t,f.duration=et.msToTimeSpan(i),f.success=a,f.resultCode=o+"",f.type=Qe.sanitizeString(e,u);var p=ot.ParseDependencyPath(e,n,s,r);return f.data=Qe.sanitizeUrl(e,r)||p.data,f.target=Qe.sanitizeString(e,p.target),l&&(f.target=f.target+" | "+l),f.name=Qe.sanitizeString(e,p.name),f.properties=Qe.sanitizeProperties(e,c),f.measurements=Qe.sanitizeMeasurements(e,d),f}var nn,rn=(nn=vt,__extends(an,nn),an);function an(){var e=nn.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}var on;on=rn,__extends(sn,on),sn.envelopeType="Microsoft.ApplicationInsights.{0}.Message",sn.dataType="MessageData";function sn(e,t,n,r,i){var a=on.call(this)||this;return a.aiDataContract={ver:g.Required,message:g.Required,severityLevel:g.Default,properties:g.Default},t=t||et.NotSpecified,a.message=Qe.sanitizeMessage(e,t),a.properties=Qe.sanitizeProperties(e,r),a.measurements=Qe.sanitizeMeasurements(e,i),n&&(a.severityLevel=n),a}var un,ln=(un=Xt,__extends(cn,un),cn);function cn(){var e=un.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}var dn;dn=ln,__extends(fn,dn),fn.envelopeType="Microsoft.ApplicationInsights.{0}.PageviewPerformance",fn.dataType="PageviewPerformanceData";function fn(e,t,n,r,i,a,o){var s=dn.call(this)||this;return s.aiDataContract={ver:g.Required,name:g.Default,url:g.Default,duration:g.Default,perfTotal:g.Default,networkConnect:g.Default,sentRequest:g.Default,receivedResponse:g.Default,domProcessing:g.Default,properties:g.Default,measurements:g.Default},s.url=Qe.sanitizeUrl(e,n),s.name=Qe.sanitizeString(e,t)||et.NotSpecified,s.properties=Qe.sanitizeProperties(e,i),s.measurements=Qe.sanitizeMeasurements(e,a),o&&(s.domProcessing=o.domProcessing,s.duration=o.duration,s.networkConnect=o.networkConnect,s.perfTotal=o.perfTotal,s.receivedResponse=o.receivedResponse,s.sentRequest=o.sentRequest),s}var pn,gn,hn;pn=ft,__extends(mn,pn);function mn(e,t){var n=pn.call(this)||this;return n.aiDataContract={baseType:g.Required,baseData:g.Required},n.baseType=e,n.baseData=t,n}(hn=gn=gn||{})[hn.Verbose=0]="Verbose",hn[hn.Information=1]="Information",hn[hn.Warning=2]="Warning",hn[hn.Error=3]="Error",hn[hn.Critical=4]="Critical";var vn=(xn.create=function(e,t,n,r,i,a){if(n=Qe.sanitizeString(r,n)||et.NotSpecified,J.isNullOrUndefined(e)||J.isNullOrUndefined(t)||J.isNullOrUndefined(n))throw Error("Input doesn't contain all required fields");var o={name:n,time:J.toISOString(new Date),iKey:"",ext:a||{},tags:[],data:{},baseType:t,baseData:e};if(!J.isNullOrUndefined(i))for(var s in i)i.hasOwnProperty(s)&&(o.data[s]=i[s]);return o},xn);function xn(){}var yn="AppInsightsPropertiesPlugin",Sn="constructor",In="prototype",Cn="function",Tn="_dynInstFuncs",_n="_isDynProxy",bn="_dynClass",Nn="_dynCls$",An="_unknown_",Mn="__proto__",Dn=Object.getPrototypeOf,wn=0;function En(e,t){return e&&Object[In].hasOwnProperty.call(e,t)}function Ln(e){return typeof e===Cn}function Rn(e){return e&&(e===Object[In]||e===Array[In])}function qn(e){return Rn(e)||e===Function[In]}function kn(e){if(e){if(Dn)return Dn(e);var t=e[Mn]||e[In]||e[Sn];if(t)return t}return null}function Fn(e,t,n){return t!==Sn&&Ln(e[t])&&(n||En(e,t))}function Hn(e){throw new TypeError("DynamicProto: "+e)}function On(e,t,n){function r(e,t){return function(){return t.apply(e,arguments)}}var i={};for(var a in n)i[a]=r(t,n[a]);for(var o=kn(e),s=[];o&&!qn(o)&&!function(e,t){for(var n=e.length-1;0<=n;n--)if(e[n]===t)return 1}(s,o);){for(var a in o)!i[a]&&Fn(o,a,!Dn)&&(i[a]=r(t,o[a]));s.push(o),o=kn(o)}return i}function Un(e,t,n,r){if(!Rn(e)){var i=n[Tn]=n[Tn]||{},a=i[t]=i[t]||{};for(var o in n)Fn(n,o,!1)&&n[o]!==r[o]&&(a[o]=n[o],delete n[o],En(e,o)&&(!e[o]||e[o][_n])||(e[o]=function(n,r){var i=function(){if(this&&En(n,bn)){var e=((this[Tn]||{})[n[bn]]||{})[r];if(e)return e.apply(this,arguments);Hn("Missing ["+r+"] "+Cn)}var t=n[r];return t===i&&(t=kn(n)[r]),Ln(t)||Hn("["+r+"] is not a "+Cn),t.apply(this,arguments)};return i[_n]=1,i}(e,o)))}}function jn(e,t){return En(e,In)?e.name||t||An:((e||{})[Sn]||{}).name||t||An}function Pn(e,t,n){En(e,In)||Hn("theClass is an invalid class definition.");var r=e[In];!function(e,t){for(var n=kn(t);n&&!qn(n);){if(n===e)return 1;n=kn(n)}}(r,t)&&Hn("["+jn(e)+"] is not in class heirarchy of ["+jn(t)+"]");var i=null;En(r,bn)?i=r[bn]:(i=Nn+jn(e,"_")+"$"+wn,wn++,r[bn]=i);var a=function(e){var t={};for(var n in e)!t[n]&&Fn(e,n,!1)&&(t[n]=e[n]);return t}(t);n(t,On(r,t,a)),Un(r,i,t,a)}var zn="properties",Gn=J.objKeys,Bn=J.arrForEach;function Wn(e,t,n){var r=0,i=e[t],a=e[n];return i&&a&&(r=ut.GetDuration(i,a)),r}function Xn(e,t,n,r,i){var a=0,o=Wn(n,r,i);return o&&(a=Vn(e,t,et.msToTimeSpan(o))),a}function Vn(e,t,n){var r="ajaxPerf",i=0;return e&&t&&n&&((e[r]=e[r]||{})[t]=n,i=1),i}function Kn(e,t){var n,r,s,i=e.perfTiming,a=t[zn]||{},o=0,u=J.isString,l="Start",c="End",d="domainLookup",f="connect",p="redirect",g="request",h="response",m="duration",v="startTime",x=f+c,y=g+l,S=h+c,I=p+l,C=(p=c,"transferSize"),T="encodedBodySize",_="decodedBodySize",b="serverTiming";i?(o|=Xn(a,p,i,I,"End"),o|=Xn(a,d,i,"domainLookupStart","domainLookupEnd"),o|=Xn(a,f,i,"connectStart",x),o|=Xn(a,g,i,y,"requestEnd"),o|=Xn(a,h,i,"responseStart",S),o|=Xn(a,"networkConnect",i,v,x),o|=Xn(a,"sentRequest",i,y,S),o|=Vn(a,m,n=(n=i[m])||(Wn(i,v,S)||0)),o|=Vn(a,"perfTotal",n),(r=i[b])&&(s={},Bn(r,function(n,e){var t,r,i,a=(t=n.name||""+e,(i=/([^\w\d_$])/g).test(r=t)&&(r=t.replace(i,"_")),r),o=s[a]||{};Bn(Gn(n),function(e){var t=n[e];("name"!==e&&u(t)||J.isNumber(t))&&(o[e]&&(t=o[e]+";"+t),!t&&u(t)||(o[e]=t))}),s[a]=o}),o|=Vn(a,b,s)),o|=Vn(a,C,i[C]),o|=Vn(a,T,i[T]),o|=Vn(a,_,i[_])):e.perfMark&&(o|=Vn(a,"missing",e.perfAttempts)),o&&(t[zn]=a)}var Qn=function(){var e=this;e.openDone=!1,e.setRequestHeaderDone=!1,e.sendDone=!1,e.abortDone=!1,e.stateChangeAttached=!1},$n=function vr(e,t,n){var r=this,i=n,l="responseText";r.perfMark=null,r.completed=!1,r.requestHeadersSize=null,r.requestHeaders=null,r.responseReceivingDuration=null,r.callbackDuration=null,r.ajaxTotalDuration=null,r.aborted=0,r.pageUrl=null,r.requestUrl=null,r.requestSize=0,r.method=null,r.status=null,r.requestSentTime=null,r.responseStartedTime=null,r.responseFinishedTime=null,r.callbackFinishedTime=null,r.endTime=null,r.xhrMonitoringState=new Qn,r.clientFailure=0,r.traceID=e,r.spanID=t,Pn(vr,r,function(u){u.getAbsoluteUrl=function(){return u.requestUrl?nt.getAbsoluteUrl(u.requestUrl):null},u.getPathName=function(){return u.requestUrl?Qe.sanitizeUrl(i,nt.getCompleteUrl(u.method,u.requestUrl)):null},u.CreateTrackItem=function(e,t,n){if(u.ajaxTotalDuration=Math.round(1e3*ut.GetDuration(u.requestSentTime,u.responseFinishedTime))/1e3,u.ajaxTotalDuration<0)return null;var r,i,a,o,s=((o={id:"|"+u.traceID+"."+u.spanID,target:u.getAbsoluteUrl(),name:u.getPathName(),type:e,duration:u.ajaxTotalDuration,success:200<=+u.status&&+u.status<400,responseCode:+u.status,method:u.method})[zn]={HttpMethod:u.method},o);return Kn(u,s),t&&0<Gn(u.requestHeaders).length&&(s[zn]=s[zn]||{},s[zn].requestHeaders=u.requestHeaders),!n||(r=n())&&((i=r.correlationContext)&&(s.correlationContext=i),r.headerMap&&0<Gn(r.headerMap).length&&(s[zn]=s[zn]||{},s[zn].responseHeaders=r.headerMap),400<=u.status&&(a=r.type,s[zn]=s[zn]||{},""!==a&&"text"!==a||(s[zn][l]=r[l]?r.statusText+" - "+r[l]:r.statusText),"json"===a&&(s[zn][l]=r.response?r.statusText+" - "+JSON.stringify(r.response):r.statusText))),s}})},Jn=(Yn.isValidTraceId=function(e){return e.match(/^[0-9a-f]{32}$/)&&"00000000000000000000000000000000"!==e},Yn.isValidSpanId=function(e){return e.match(/^[0-9a-f]{16}$/)&&"0000000000000000"!==e},Yn.prototype.toString=function(){return this.version+"-"+this.traceId+"-"+this.spanId+"-"+this.traceFlag},Yn.DEFAULT_TRACE_FLAG="01",Yn.DEFAULT_VERSION="00",Yn);function Yn(e,t){var n=this;n.traceFlag=Yn.DEFAULT_TRACE_FLAG,n.version=Yn.DEFAULT_VERSION,e&&Yn.isValidTraceId(e)?n.traceId=e:n.traceId=et.generateW3CId(),t&&Yn.isValidSpanId(t)?n.spanId=t:n.spanId=et.generateW3CId().substr(0,16)}var Zn="ai.ajxmn.",er="diagLog",tr="ajaxData",nr="throwInternal",rr="fetch",ir=J.isNullOrUndefined,ar=J.arrForEach,or=J.objKeys,sr=0;function ur(e){var t="";try{ir(e)||ir(e[tr])||ir(e[tr].requestUrl)||(t+="(url: '"+e[tr].requestUrl+"')")}catch(n){}return t}function lr(e,t,n,r,i){e[er]()[nr](Z.CRITICAL,t,n,r,i)}function cr(e,t,n,r,i){e[er]()[nr](Z.WARNING,t,n,r,i)}function dr(t,n,r){return function(e){lr(t,n,r,{ajaxDiagnosticsMessage:ur(e.inst),exception:et.dump(e.err)})}}function fr(e,t){return e&&t?e.indexOf(t):-1}var pr,gr=(pr=me,__extends(hr,pr),hr.getDefaultConfig=function(){return{maxAjaxCallsPerView:500,disableAjaxTracking:!1,disableFetchTracking:!0,disableCorrelationHeaders:!1,distributedTracingMode:L.AI,correlationHeaderExcludedDomains:["*.blob.core.windows.net","*.blob.core.chinacloudapi.cn","*.blob.core.cloudapi.de","*.blob.core.usgovcloudapi.net"],correlationHeaderDomains:undefined,appId:undefined,enableCorsCorrelation:!1,enableRequestHeaderTracking:!1,enableResponseHeaderTracking:!1,enableAjaxErrorStatusText:!1,enableAjaxPerfTracking:!1,maxAjaxPerfLookupAttempts:3,ajaxPerfLookupDelay:25}},hr.getEmptyConfig=function(){var t=this.getDefaultConfig();return ar(or(t),function(e){t[e]=undefined}),t},hr.prototype.processTelemetry=function(e,t){this.processNext(e,t)},hr.identifier="AjaxDependencyPlugin",hr);function hr(){var e=pr.call(this)||this;e.identifier=hr.identifier,e.priority=120;var y,S,I,C,T="trackDependencyDataInternal",t=F(),_=!1,b=!1,u=t&&t.host&&t.host.toLowerCase(),N=hr.getEmptyConfig(),A=!1,i=0,M=!1,D=0,w=!1,E=[],s={};return Pn(hr,e,function(p,c){function d(e,t,n){var r,i,a;E.push((i=t,a=n,(r=e)?Xe(r[q],i,a,!1):null))}function g(e,t,n){var r=!1,i=((J.isString(t)?t:(t||{}).url||"")||"").toLowerCase(),a=fr(i,"?"),o=fr(i,"#");return(-1===a||-1!==o&&o<a)&&(a=o),-1!==a&&(i=i.substring(0,a)),ir(e)?ir(t)||(r="object"==typeof t&&!0===t[dt]||!!n&&!0===n[dt]):r=!0===e[dt]||!0===i[dt],r?s[i]||(s[i]=1):s[i]&&(r=!0),r}function h(e,t){var n=!0,r=b;return ir(e)||(n=!0===t||!ir(e[tr])),r&&n}function f(e,t){var n,r,i;t.requestUrl&&C&&M&&((n=H())&&J.isFunction(n.mark)&&(r=C+e+"#"+ ++sr,n.mark(r),(i=n.getEntriesByName(r))&&1===i.length&&(t.perfMark=i[0])))}function m(a,o,s,u){var l=o.perfMark,c=H(),d=N.maxAjaxPerfLookupAttempts,f=N.ajaxPerfLookupDelay,p=o.requestUrl,g=0;!function h(){try{if(c&&l){g++;for(var e=null,t=c.getEntries(),n=t.length-1;0<=n;n--){var r=t[n];if(r){if("resource"===r.entryType)r.initiatorType!==a||-1===fr(r.name,p)&&-1===fr(p,r.name)||(e=r);else if("mark"===r.entryType&&r.name===l.name){o.perfTiming=e;break}if(r.startTime<l.startTime-1e3)break}}}!l||o.perfTiming||d<=g||!1===o.async?(l&&J.isFunction(c.clearMarks)&&c.clearMarks(l.name),o.perfAttempts=g,s()):setTimeout(h,f)}catch(i){u(i)}}()}function v(e){var t="";try{ir(e)||(t+="string"==typeof e?"(url: '"+e+"')":"(url: '"+e.url+"')")}catch(n){lr(p,ie.FailedMonitorAjaxOpen,"Failed to grab failed fetch diagnostics message",{exception:et.dump(n)})}return t}function x(e,t,i,n,r){function a(e,t,n){var r=n||{};r.fetchDiagnosticsMessage=v(i),t&&(r.exception=et.dump(t)),cr(p,e,"Failed to calculate the duration of the fetch call, monitoring data for this fetch call won't be sent.",r)}n&&(n.responseFinishedTime=ut.Now(),n.status=t,m("fetch",n,function(){var e=n.CreateTrackItem("Fetch",A,r);e?p[T](e):a(ie.FailedMonitorAjaxDur,null,{requestSentTime:n.requestSentTime,responseFinishedTime:n.responseFinishedTime})},function(e){a(ie.FailedMonitorAjaxGetCorrelationHeader,e,null)}))}p.initialize=function(e,t,n,r){if(!p.isInitialized()){c.initialize(e,t,n,r);var i=p._getTelCtx(),a=hr.getDefaultConfig();ar(or(a),function(e){N[e]=i.getConfig(hr.identifier,e,a[e])});var o,s=N.distributedTracingMode;if(A=N.enableRequestHeaderTracking,M=N.enableAjaxPerfTracking,D=N.maxAjaxCallsPerView,w=N.enableResponseHeaderTracking,I=s===L.AI||s===L.AI_AND_W3C,S=s===L.AI_AND_W3C||s===L.W3C,M&&(o=e.instrumentationKey||"unkwn",C=5<o.length?Zn+o.substring(o.length-5)+".":Zn+o+"."),!1===N.disableAjaxTracking&&(!function(e){var t,n=!1;typeof XMLHttpRequest===R||ir(XMLHttpRequest)||(t=XMLHttpRequest[q],n=!(ir(t)||ir(t.open)||ir(t.send)||ir(t.abort)));var r=et.getIEVersion();if(r&&r<9&&(n=!1),n)try{(new XMLHttpRequest)[tr]={};var i=XMLHttpRequest[q].open;XMLHttpRequest[q].open=i}catch(a){n=!1,lr(e,ie.FailedMonitorAjaxOpen,"Failed to enable XMLHttpRequest monitoring, extension is not supported",{exception:et.dump(a)})}return n}(p)||b||(d(XMLHttpRequest,"open",{req:function(e,t,n,r){var i,a,o,s,u,l,c,d=e.inst,f=d[tr];g(d,n)||!h(d,!0)||f&&f.xhrMonitoringState.openDone||(i=d,a=t,o=n,s=r,u=y&&y.telemetryTrace&&y.telemetryTrace.traceID||et.generateW3CId(),l=et.generateW3CId().substr(0,16),(c=new $n(u,l,p[er]())).method=a,c.requestUrl=o,c.xhrMonitoringState.openDone=!0,c.requestHeaders={},c.async=s,i[tr]=c,function(a){a[tr].xhrMonitoringState.stateChangeAttached=ne.Attach(a,"readystatechange",function(){try{a&&4===a.readyState&&h(a)&&((i=(r=a)[tr]).responseFinishedTime=ut.Now(),i.status=r.status,m("xmlhttprequest",i,function(){try{var e=i.CreateTrackItem("Ajax",A,function(){var e,t,i,n={statusText:r.statusText,headerMap:null,correlationContext:function(e){try{var t=e.getAllResponseHeaders();if(null!==t)if(-1!==fr(t.toLowerCase(),Ve.requestContextHeaderLowerCase)){var n=e.getResponseHeader(Ve.requestContextHeader);return it.getCorrelationContext(n)}}catch(r){cr(p,ie.FailedMonitorAjaxGetCorrelationHeader,"Failed to get Request-Context correlation header as it may be not included in the response or not accessible.",{ajaxDiagnosticsMessage:ur(e),exception:et.dump(r)})}}(r),type:r.responseType,responseText:function(e){try{var t=e.responseType;if(""===t||"text"===t)return e.responseText}catch(n){}return null}(r),response:r.response};return!w||(e=r.getAllResponseHeaders())&&(t=J.strTrim(e).split(/[\r\n]+/),i={},ar(t,function(e){var t=e.split(": "),n=t.shift(),r=t.join(": ");i[n]=r}),n.headerMap=i),n});e?p[T](e):n(null,{requestSentTime:i.requestSentTime,responseFinishedTime:i.responseFinishedTime})}finally{try{r[tr]=null}catch(t){}}},function(e){n(e,null)}))}catch(t){var e=et.dump(t);e&&-1!==fr(e.toLowerCase(),"c00c023f")||lr(p,ie.FailedMonitorAjaxRSC,"Failed to monitor XMLHttpRequest 'readystatechange' event handler, monitoring data for this ajax call may be incorrect.",{ajaxDiagnosticsMessage:ur(a),exception:e})}function n(e,t){var n=t||{};n.ajaxDiagnosticsMessage=ur(r),e&&(n.exception=et.dump(e)),cr(p,ie.FailedMonitorAjaxDur,"Failed to calculate the duration of the ajax call, monitoring data for this ajax call won't be sent.",n)}var r,i})}(i))},hkErr:dr(p,ie.FailedMonitorAjaxOpen,"Failed to monitor XMLHttpRequest.open, monitoring data for this ajax call may be incorrect.")}),d(XMLHttpRequest,"send",{req:function(e,t){var n=e.inst,r=n[tr];h(n)&&!r.xhrMonitoringState.sendDone&&(f("xhr",r),r.requestSentTime=ut.Now(),n=p.includeCorrelationHeaders(r,undefined,undefined,n),r.xhrMonitoringState.sendDone=!0)},hkErr:dr(p,ie.FailedMonitorAjaxSend,"Failed to monitor XMLHttpRequest, monitoring data for this ajax call may be incorrect.")}),d(XMLHttpRequest,"abort",{req:function(e){var t=e.inst,n=t[tr];h(t)&&!n.xhrMonitoringState.abortDone&&(n.aborted=1,n.xhrMonitoringState.abortDone=!0)},hkErr:dr(p,ie.FailedMonitorAjaxAbort,"Failed to monitor XMLHttpRequest.abort, monitoring data for this ajax call may be incorrect.")}),A&&d(XMLHttpRequest,"setRequestHeader",{req:function(e,t,n){var r=e.inst;h(r)&&(r[tr].requestHeaders[t]=n)},hkErr:dr(p,ie.FailedMonitorAjaxSetRequestHeader,"Failed to monitor XMLHttpRequest.setRequestHeader, monitoring data for this ajax call may be incorrect.")}),b=!0)),function(){var e=function(){var e=k();return!e||ir(e.Request)||ir(e.Request[q])||ir(e[rr])?null:e[rr]}();if(!e)return;var t=k(),o=e.polyfill;!1===N.disableFetchTracking?(E.push(Xe(t,rr,{req:function(e,t,n){var r,i,a;!_||g(null,t,n)||o&&b||(r=e.ctx(),i=function(e,t){var n=y&&y.telemetryTrace&&y.telemetryTrace.traceID||et.generateW3CId(),r=et.generateW3CId().substr(0,16),i=new $n(n,r,p[er]());i.requestSentTime=ut.Now(),e instanceof Request?i.requestUrl=e?e.url:"":i.requestUrl=e;var a="GET";t&&t.method?a=t.method:e&&e instanceof Request&&(a=e.method);i.method=a;var o={};{A&&new Headers((t?t.headers:0)||e instanceof Request&&e.headers||{}).forEach(function(e,t){o[t]=e})}return i.requestHeaders=o,f("fetch",i),i}(t,n),(a=p.includeCorrelationHeaders(i,t,n))!==n&&e.set(1,a),r.data=i)},rsp:function(e,t){var n=e.ctx().data;n&&(e.rslt=e.rslt.then(function(t){return x(0,(t||{}).status,t,n,function(){var n,e={statusText:t.statusText,headerMap:null,correlationContext:function(e){if(e&&e.headers)try{var t=e.headers.get(Ve.requestContextHeader);return it.getCorrelationContext(t)}catch(n){cr(p,ie.FailedMonitorAjaxGetCorrelationHeader,"Failed to get Request-Context correlation header as it may be not included in the response or not accessible.",{fetchDiagnosticsMessage:v(e),exception:et.dump(n)})}}(t)};return w&&(n={},t.headers.forEach(function(e,t){n[t]=e}),e.headerMap=n),e}),t})["catch"](function(e){throw x(0,0,t,n,null,e.message),e}))},hkErr:dr(p,ie.FailedMonitorAjaxOpen,"Failed to monitor Window.fetch, monitoring data for this fetch call may be incorrect.")})),_=!0):o&&E.push(Xe(t,rr,{req:function(e,t,n){g(null,t,n)}}));o&&(t[rr].polyfill=o)}(),0<n.length&&n){for(var u=void 0,l=0;!u&&l<n.length;)n[l]&&n[l].identifier===yn&&(u=n[l]),l++;u&&(y=u.context)}}},p.teardown=function(){ar(E,function(e){e.rm()}),b=_=!(E=[]),p.setInitialized(!1)},p.trackDependencyData=function(e,t){p[T](e,t)},p.includeCorrelationHeaders=function(e,t,n,r){var i,a,o,s=p._currentWindowHost||u;return t?(it.canIncludeCorrelationHeader(N,e.getAbsoluteUrl(),s)&&((n=n||{}).headers=new Headers(n.headers||t instanceof Request&&t.headers||{}),I&&(i="|"+e.traceID+"."+e.spanID,n.headers.set(Ve.requestIdHeader,i),A&&(e.requestHeaders[Ve.requestIdHeader]=i)),(a=N.appId||y&&y.appId())&&(n.headers.set(Ve.requestContextHeader,Ve.requestContextAppIdFormat+a),A&&(e.requestHeaders[Ve.requestContextHeader]=Ve.requestContextAppIdFormat+a)),S&&(o=new Jn(e.traceID,e.spanID),n.headers.set(Ve.traceParentHeader,o.toString()),A&&(e.requestHeaders[Ve.traceParentHeader]=o.toString()))),n):r?(it.canIncludeCorrelationHeader(N,e.getAbsoluteUrl(),s)&&(I&&(i="|"+e.traceID+"."+e.spanID,r.setRequestHeader(Ve.requestIdHeader,i),A&&(e.requestHeaders[Ve.requestIdHeader]=i)),(a=N.appId||y&&y.appId())&&(r.setRequestHeader(Ve.requestContextHeader,Ve.requestContextAppIdFormat+a),A&&(e.requestHeaders[Ve.requestContextHeader]=Ve.requestContextAppIdFormat+a)),S&&(o=new Jn(e.traceID,e.spanID),r.setRequestHeader(Ve.traceParentHeader,o.toString()),A&&(e.requestHeaders[Ve.traceParentHeader]=o.toString()))),r):undefined},p[T]=function(e,t,n){var r;-1===D||i<D?(N.distributedTracingMode!==L.W3C&&N.distributedTracingMode!==L.AI_AND_W3C||"string"!=typeof e.id||"."===e.id[e.id.length-1]||(e.id+="."),r=vn.create(e,en.dataType,en.envelopeType,p[er](),t,n),p.core.track(r)):i===D&&lr(p,ie.MaxAjaxPerPVExceeded,"Maximum ajax per page view limit reached, ajax monitoring is paused until the next trackPageView(). In order to increase the limit set the maxAjaxCallsPerView configuration parameter.",!0),++i}}),e}e.AjaxPlugin=gr,e.ajaxRecord=$n,function(e,t,n){var r=Object.defineProperty;if(r)try{return r(e,t,n)}catch(i){}typeof n.value!==undefined&&(e[t]=n.value)}(e,"__esModule",{value:!0})}); | ||
//# sourceMappingURL=applicationinsights-dependencies-js.min.js.map |
{ | ||
"name": "@microsoft/applicationinsights-dependencies-js", | ||
"version": "2.5.4", | ||
"version": "2.5.5", | ||
"description": "Microsoft Application Insights XHR dependencies plugin", | ||
@@ -37,7 +37,7 @@ "main": "dist/applicationinsights-dependencies-js.js", | ||
"@microsoft/dynamicproto-js": "^0.5.2", | ||
"@microsoft/applicationinsights-core-js": "2.5.4", | ||
"@microsoft/applicationinsights-common": "2.5.4", | ||
"tslib": "^1.11.1" | ||
"@microsoft/applicationinsights-shims" : "1.0.0", | ||
"@microsoft/applicationinsights-core-js": "2.5.5", | ||
"@microsoft/applicationinsights-common": "2.5.5" | ||
}, | ||
"license": "MIT" | ||
} |
@@ -62,6 +62,4 @@ // Copyright (c) Microsoft Corporation. All rights reserved. | ||
// disable in IE8 or older (https://www.w3schools.com/jsref/jsref_trim_string.asp) | ||
try { | ||
" a ".trim(); | ||
} catch (ex) { | ||
let ieVer = Util.getIEVersion(); | ||
if (ieVer && ieVer < 9) { | ||
result = false; | ||
@@ -675,3 +673,3 @@ } | ||
// the regex converts the header string into an array of individual headers | ||
const arr = headers.trim().split(/[\r\n]+/); | ||
const arr = CoreUtils.strTrim(headers).split(/[\r\n]+/); | ||
const responseHeaderMap = {}; | ||
@@ -678,0 +676,0 @@ _arrForEach(arr, (line) => { |
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT License. | ||
import '@microsoft/applicationinsights-shims'; | ||
export { AjaxMonitor as AjaxPlugin, IDependenciesPlugin, XMLHttpRequestInstrumented, IInstrumentationRequirements } from "./ajax"; | ||
export { ajaxRecord } from "./ajaxRecord"; |
@@ -12,3 +12,3 @@ { | ||
"allowSyntheticDefaultImports": true, | ||
"importHelpers": true, | ||
"importHelpers": false, | ||
"noEmitHelpers": true, | ||
@@ -15,0 +15,0 @@ "forceConsistentCasingInFileNames": true, |
@@ -0,2 +1,3 @@ | ||
import '@microsoft/applicationinsights-shims'; | ||
export { AjaxMonitor as AjaxPlugin, IDependenciesPlugin, XMLHttpRequestInstrumented, IInstrumentationRequirements } from "./ajax"; | ||
export { ajaxRecord } from "./ajaxRecord"; |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Mixed license
License(Experimental) Package contains multiple licenses.
Found 1 instance in 1 package
2364577
0
13160
+ Added@microsoft/applicationinsights-common@2.5.5(transitive)
+ Added@microsoft/applicationinsights-core-js@2.5.5(transitive)
+ Added@microsoft/applicationinsights-shims@1.0.0(transitive)
- Removedtslib@^1.11.1
- Removed@microsoft/applicationinsights-common@2.5.4(transitive)
- Removed@microsoft/applicationinsights-core-js@2.5.4(transitive)
- Removedtslib@1.14.1(transitive)