@microsoft/applicationinsights-dependencies-js
Advanced tools
Comparing version 2.5.6 to 2.5.7
/*! | ||
* Application Insights JavaScript SDK - Dependencies Plugin, 2.5.6 | ||
* Application Insights JavaScript SDK - Dependencies Plugin, 2.5.7 | ||
* Copyright (c) Microsoft and contributors. All rights reserved. | ||
*/ | ||
var e=this,t=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}var u,l,g,c,F,d,f=function(e,t){return(f=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)},p=n()||{};__assign=p.__assign=p.__assign||Object.assign||function(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},__extends=p.__extends=p.__extends||function(e,t){function n(){this.constructor=e}f(e,t),e[o]=null===t?r(t):(n[o]=t[o],new n)},(l=u={})[l.LocalStorage=0]="LocalStorage",l[l.SessionStorage=1]="SessionStorage",(c=g=g||{})[c.Default=0]="Default",c[c.Required=1]="Required",c[c.Array=2]="Array",c[c.Hidden=4]="Hidden",(d=F=F||{})[d.AI=0]="AI",d[d.AI_AND_W3C=1]="AI_AND_W3C",d[d.W3C=2]="W3C";var H=t,h=a,O=o,m=i,v="window",x="location",y="performance",S="JSON",U=n;function I(e){var t=U();return t&&t[e]?t[e]:e===v&&C()?window:null}function C(){return typeof window===h&&window}function T(){return C()?window:I(v)}function _(){return typeof document===h&&document?document:I("document")}function b(){return typeof navigator===h&&navigator?navigator:I("navigator")}function j(){return typeof location===h&&location?location:I(x)}function P(){return I(y)}function N(){return typeof JSON===h&&JSON||null!==I(S)}function A(){return N()?JSON||I(S):null}var M="attachEvent",D="addEventListener",E="detachEvent",w="removeEventListener";function L(e,t){return typeof e===t}function q(e){return L(e,t)||e===undefined}function R(e){return q(e)||null===e}function k(e,t){return e&&Object[o].hasOwnProperty.call(e,t)}function z(e){return L(e,a)}function G(e){return L(e,i)}function B(e,t,n,r){void 0===r&&(r=!1);var i=!1;if(!R(e))try{R(e[D])?R(e[M])||(e[M]("on"+t,n),i=!0):(e[D](t,n,r),i=!0)}catch(a){}return i}function W(e,t,n,r){if(void 0===r&&(r=!1),!R(e))try{R(e[w])?R(e[E])||e[E]("on"+t,n):e[w](t,n,r)}catch(i){}}var X=(V.isDate=function(e){return"[object Date]"===Object[o].toString.call(e)},V.isString=function(e){return L(e,"string")},V.isNumber=function(e){return L(e,"number")},V.isBoolean=function(e){return L(e,"boolean")},V.disableCookies=function(){V._canUseCookies=!1},V.newGuid=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace($,function(e){var t,n=0|((t=I("crypto"))?t.getRandomValues(new Uint8Array(1))[0]%16:16*Math.random());return("x"===e?n:3&n|8).toString(16)})},V.toISOString=function(e){if(V.isDate(e)){var t=function(e){var t=e+"";return 1===t.length&&(t="0"+t),t};return e.getUTCFullYear()+"-"+t(1+e.getUTCMonth())+"-"+t(e.getUTCDate())+"T"+t(e.getUTCHours())+":"+t(e.getUTCMinutes())+":"+t(e.getUTCSeconds())+"."+((e.getUTCMilliseconds()/1e3).toFixed(3)+"").slice(2,5)+"Z"}},V.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)},V.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},V.arrMap=function(e,t,n){for(var r=e.length,i=n||e,a=Array(r),o=0;o<r;o++)o in e&&(a[o]=t.call(i,e[o],e));return a},V.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},V.strTrim=function(e){return V.isString(e)?e.replace(/^\s+|\s+$/g,""):e},V.objKeys=function(e){var t=!{toString:null}.propertyIsEnumerable("toString");if(!(G(e)||z(e)&&null!==e))throw new TypeError("objKeys called on non-object");var n=[];for(var r in e)k(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++)k(e,i[o])&&n.push(i[o]);return n},V.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},V.addEventHandler=function(e,t){var n=!1,r=T();r&&(n=B(r,e,t),n=B(r.body,e,t)||n);var i=_();return i&&(n=J.Attach(i,e,t)||n),n},V.isTypeof=L,V.isUndefined=q,V.isNullOrUndefined=R,V.hasOwnProperty=k,V.isFunction=G,V.isObject=z,V.objCreate=r,V);function V(){}var K,Q,$=/[xy]/g,J=(Y.Attach=B,Y.AttachEvent=B,Y.Detach=W,Y.DetachEvent=W,Y);function Y(){}(Q=K=K||{})[Q.CRITICAL=1]="CRITICAL",Q[Q.WARNING=2]="WARNING";var Z={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},ee=(te.sanitizeDiagnosticText=function(e){return e?'"'+e.replace(/\"/g,"")+'"':""},te.dataType="MessageData",te.AiNonUserActionablePrefix="AI (Internal): ",te.AiUserActionablePrefix="AI: ",te);function te(e,t,n,r){void 0===n&&(n=!1),this.messageId=e,this.message=(n?te.AiUserActionablePrefix:te.AiNonUserActionablePrefix)+e;var i="";N()&&(i=A().stringify(r));var a=(t?" message:"+te.sanitizeDiagnosticText(t):"")+(r?" props:"+te.sanitizeDiagnosticText(i):"");this.message+=a}var ne=(re.prototype.throwInternal=function(e,t,n,r,i){void 0===i&&(i=!1);var a,o=new ee(t,n,i,r),s=this;if(s.enableDebugExceptions())throw o;!X.isUndefined(o)&&o&&(X.isUndefined(o.message)||(i?(a=+o.messageId,!s._messageLogged[a]&&s.consoleLoggingLevel()>=K.WARNING&&(s.warnToConsole(o.message),s._messageLogged[a]=!0)):s.consoleLoggingLevel()>=K.WARNING&&s.warnToConsole(o.message),s.logInternalMessage(e,o)))},re.prototype.warnToConsole=function(e){!X.isUndefined(console)&&console&&(X.isFunction(console.warn)?console.warn(e):X.isFunction(console.log)&&console.log(e))},re.prototype.resetInternalMessageCount=function(){this._messageCount=0,this._messageLogged={}},re.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 ee(Z.MessageLimitPerPVExceeded,i,!1),o.queue.push(a),o.warnToConsole(i))))},re.prototype._areInternalMessagesThrottled=function(){return this._messageCount>=this.maxInternalMessageLimit()},re);function re(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},X.isNullOrUndefined(e)||(X.isNullOrUndefined(e.loggingLevelConsole)||(this.consoleLoggingLevel=function(){return e.loggingLevelConsole}),X.isNullOrUndefined(e.loggingLevelTelemetry)||(this.telemetryLoggingLevel=function(){return e.loggingLevelTelemetry}),X.isNullOrUndefined(e.maxMessageLimit)||(this.maxInternalMessageLimit=function(){return e.maxMessageLimit}),X.isNullOrUndefined(e.enableDebugExceptions)||(this.enableDebugExceptions=function(){return e.enableDebugExceptions}))}var ie=X.isFunction,ae=function(i,a){var o=this,s=null,u=ie(i.processTelemetry),l=ie(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(K.CRITICAL,Z.PluginException,"Plugin ["+i.identifier+"] failed during processTelemetry - "+r),s&&!n&&s.processTelemetry(e,t)}}else s&&(o._hasRun=!0,s.processTelemetry(e,t))}},oe=X.isNullOrUndefined;function se(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&&X.isFunction(o.processTelemetry)&&(a=new ae(o,t),n.push(a),r&&r.setNext(a),r=a)}return 0<n.length?n[0]:null}var ue=function er(e,a,n,t){var r,i,o,s,u=this,l=null;null!==t&&(e&&X.isFunction(e.getPlugin)?l=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),se(r,t)}(e,u,t||e.getPlugin()):t?(r=u,o=e,s=!1,(i=t)&&e&&(o=[],X.arrForEach(e,function(e){!s&&e!==i||(s=!0,o.push(e))})),i&&!s&&(o=o||[]).push(i),l=se(o,r)):X.isUndefined(t)&&(l=se(e,u))),u.core=function(){return n},u.diagLog=function(){return(n||{}).logger||new ne(a||{})},u.getCfg=function(){return a},u.getExtCfg=function(e,t){var n,r;return void 0===t&&(t={}),!a||(r=a.extensionConfig)&&e&&(n=r[e]),n||t},u.getConfig=function(e,t,n){var r;void 0===n&&(n=!1);var i=u.getExtCfg(e,null);return i&&!oe(i[t])?r=i[t]:a&&!oe(a[t])&&(r=a[t]),oe(r)?n:r},u.hasNext=function(){return null!=l},u.getNext=function(){return l},u.setNext=function(e){l=e},u.processNext=function(e){var t=l;t&&(l=t.getNext(),t.processTelemetry(e,u))},u.createNew=function(e,t){return void 0===e&&(e=null),new er(e||l,a,n,t)}},le=X.isFunction,ce="getPlugin",de=(fe.prototype.initialize=function(e,t,n,r){this._baseTelInit(e,t,n,r)},fe);function fe(){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&&le(u.processTelemetry)&&u.processTelemetry(e,null)},a._getTelCtx=function(e){void 0===e&&(e=null);var t,n=e;return n||(t=s||new ue(null,{},a.core),n=u&&u[ce]?t.createNew(null,u[ce]):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[ce]&&(i=u[ce]()),a.core=t,s=new ue(r,e,t,i),o=!0}}var pe=X.isFunction,ge="processTelemetry",he="priority",me="setNextPlugin",ve="isInitialized";function xe(t,n){for(var e=[],r=null,i=t.getNext();i;){var a=i.getPlugin();a&&(r&&pe(r[me])&&pe(a[ge])&&r[me](a),pe(a[ve])&&a[ve]()||e.push(a),r=a,i=i.getNext())}X.arrForEach(e,function(e){e.initialize(t.getCfg(),t.core(),n,t.getNext())})}function ye(e){return e.sort(function(e,t){var n=0,r=pe(t[ge]);return pe(e[ge])?n=r?e[he]-t[he]:1:r&&(n=-1),n})}var Se=X.arrForEach,Ie=X.objDefineAccessors;function Ce(e,t){t&&0<t.length&&(t=t.sort(function(e,t){return e.priority-t.priority}),Se(t,function(e){if(e.priority<500)throw Error("Channel has invalid priority"+e.identifier)}),e.push(t))}var Te,_e=(Te=de,__extends(be,Te),be.prototype.processTelemetry=function(t,n){var r=this;this._channelQueue&&Se(this._channelQueue,function(e){0<e.length&&r._getTelCtx(n).createNew(e).processNext(t)})},be.prototype.getChannelControls=function(){return this._channelQueue},be.prototype.initialize=function(t,n,r){var e,i,a,o,s;this.isInitialized()||(Te.prototype.initialize.call(this,t,n,r),t.isCookieUseDisabled&&X.disableCookies(),e=this._channelQueue=(a=r,s=[],(i=(t||{}).channels)&&Se(i,function(e){return Ce(s,e)}),a&&(o=[],Se(a,function(e){500<e.priority&&o.push(e)}),Ce(s,o)),s),Se(e,function(e){return xe(new ue(e,t,n),r)}))},be._staticInit=(Ie(be.prototype,"ChannelControls",be.prototype.getChannelControls),void Ie(be.prototype,"channelQueue",be.prototype.getChannelControls)),be);function be(){var e=null!==Te&&Te.apply(this,arguments)||this;return e.identifier="ChannelControllerPlugin",e.priority=500,e}var Ne=X.arrForEach,Ae=X.isNullOrUndefined,Me=(De.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||Ae(e.instrumentationKey))throw Error("Please provide instrumentation key");i.config=e;var a=i._channelController;n=n||X.objCreate({addNotificationListener:function(e){},removeNotificationListener:function(e){},eventsSent:function(e){},eventsDiscarded:function(e,t){},eventsSendRequest:function(e,t){}}),i._notificationManager=n,e.extensions=Ae(e.extensions)?[]:e.extensions,(e.extensionConfig=Ae(e.extensionConfig)?{}:e.extensionConfig).NotificationManager=n,r=r||X.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=ye(o);var s=[],u={};if(Ne(o,function(e){if(Ae(e)||Ae(e.initialize))throw Error("Extensions must provide callback to initialize");var t=e.priority,n=e.identifier;e&&t&&(Ae(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=ye(o),i._extensions=o,xe(new ue([a],e,i),o),xe(new ue(s,e,i),o),i._extensions=s,0===i.getTransmissionControls().length)throw Error("No channels available");i._setInit(!0),i.releaseQueue()},De.prototype.getTransmissionControls=function(){return this._channelController.getChannelControls()},De.prototype.track=function(e){e.iKey||(e.iKey=this.config.instrumentationKey),e.time||(e.time=X.toISOString(new Date)),Ae(e.ver)&&(e.ver="4.0"),this.isInitialized()?this.getProcessTelContext().processNext(e):this._eventQueue.push(e)},De.prototype.getProcessTelContext=function(){var e=this._extensions,t=e;return e&&0!==e.length||(t=[this._channelController]),new ue(t,this.config,this)},De.prototype.releaseQueue=function(){var t=this;0<t._eventQueue.length&&(Ne(t._eventQueue,function(e){t.getProcessTelContext().processNext(e)}),t._eventQueue=[])},De);function De(){var t=!1,e=this;e._extensions=[],e._channelController=new _e,e.isInitialized=function(){return t},e._setInit=function(e){t=e},e._eventQueue=[]}var Ee,we=(Le.prototype.addNotificationListener=function(e){this.listeners.push(e)},Le.prototype.removeNotificationListener=function(e){for(var t=X.arrIndexOf(this.listeners,e);-1<t;)this.listeners.splice(t,1),t=X.arrIndexOf(this.listeners,e)},Le.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)},Le.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)},Le.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)},Le);function Le(){this.listeners=[]}function qe(){return Ee.call(this)||this}Ee=Me,__extends(qe,Ee),qe.prototype.initialize=function(e,t){var n=this;n._notificationManager=new we,n.logger=new ne(e),n.config=e,Ee.prototype.initialize.call(this,e,t,n.logger,n._notificationManager)},qe.prototype.getTransmissionControls=function(){return Ee.prototype.getTransmissionControls.call(this)},qe.prototype.track=function(e){if(null===e)throw this._notifyInvalidEvent(e),Error("Invalid telemetry item");this._validateTelemetryItem(e),Ee.prototype.track.call(this,e)},qe.prototype.addNotificationListener=function(e){this._notificationManager&&this._notificationManager.addNotificationListener(e)},qe.prototype.removeNotificationListener=function(e){this._notificationManager&&this._notificationManager.removeNotificationListener(e)},qe.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:[];X.arrForEach(e,function(e){var t={name:r||"InternalMessageId: "+e.messageId,iKey:n.config.instrumentationKey,time:X.toISOString(new Date),baseType:ee.dataType,baseData:{message:e.message}};n.track(t)}),e.length=0},e)},qe.prototype._validateTelemetryItem=function(e){if(X.isNullOrUndefined(e.name))throw this._notifyInvalidEvent(e),Error("telemetry name required")},qe.prototype._notifyInvalidEvent=function(e){this._notificationManager&&this._notificationManager.eventsDiscarded([e],2)};var Re="_aiHooks",ke=["req","rsp","hkErr","fnErr"];function Fe(e,t){if(e)for(var n=0;n<e.length&&!t(e[n],n);n++);}function He(e,u,l,c,d){0<=d&&d<=2&&Fe(e,function(e,t){var n=e.cbks,r=n[ke[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[ke[2]];a&&(u.err=o,a.apply(u.inst,l))}catch(s){}finally{u.err=i}}}})}function Oe(e,t,n,r){if(void 0===r&&(r=!0),e&&t&&n){var i=function c(e,t,n){var r=null;return e&&(X.hasOwnProperty(e,t)?r=e:n&&(r=c(e[O],t,!1))),r}(e,t,r),a=i[t];if(typeof a===m){var o,s=a[Re];s||(l=s={i:0,n:t,f:a,h:[]},(o=function(){var n=arguments,e=l.h,r={name:l.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 Fe(e,function(e){t.push(e)}),t}He(e,r,i,t,0);var o=l.f;try{r.rslt=o.apply(this,n)}catch(s){throw r.err=s,He(e,r,i,t,3),s}return He(e,r,i,t,1),r.rslt})[Re]=s,i[t]=o);var u={id:s.i,cbks:n,rm:function(){var n=this.id;Fe(s.h,function(e,t){return e.id===n&&(s.h.splice(t,1),1)})}};return s.i++,s.h.push(u),u}}var l;return null}var Ue=(je.requestContextHeader="Request-Context",je.requestContextTargetKey="appId",je.requestContextAppIdFormat="appId=cid-v1:",je.requestIdHeader="Request-Id",je.traceParentHeader="traceparent",je.sdkContextHeader="Sdk-Context",je.sdkContextHeaderAppIdRequest="appId",je.requestContextHeaderLowerCase="request-context",je);function je(){}var Pe=(ze.sanitizeKeyAndAddUniqueness=function(e,t,n){var r=t.length,i=ze.sanitizeKey(e,t);if(i.length!==r){for(var a=0,o=i;n[o]!==undefined;)a++,o=i.substring(0,ze.MAX_NAME_LENGTH-3)+ze.padNumber(a);i=o}return i},ze.sanitizeKey=function(e,t){var n;return t&&(t=ze.trim(t.toString())).length>ze.MAX_NAME_LENGTH&&(n=t.substring(0,ze.MAX_NAME_LENGTH),e.throwInternal(K.WARNING,Z.NameTooLong,"name is too long. It has been truncated to "+ze.MAX_NAME_LENGTH+" characters.",{name:t},!0)),n||t},ze.sanitizeString=function(e,t,n){var r;return void 0===n&&(n=ze.MAX_STRING_LENGTH),t&&(n=n||ze.MAX_STRING_LENGTH,(t=ze.trim(t)).toString().length>n&&(r=t.toString().substring(0,n),e.throwInternal(K.WARNING,Z.StringValueTooLong,"string value is too long. It has been truncated to "+n+" characters.",{value:t},!0))),r||t},ze.sanitizeUrl=function(e,t){return ze.sanitizeInput(e,t,ze.MAX_URL_LENGTH,Z.UrlTooLong)},ze.sanitizeMessage=function(e,t){var n;return t&&t.length>ze.MAX_MESSAGE_LENGTH&&(n=t.substring(0,ze.MAX_MESSAGE_LENGTH),e.throwInternal(K.WARNING,Z.MessageTruncated,"message is too long, it has been truncated to "+ze.MAX_MESSAGE_LENGTH+" characters.",{message:t},!0)),n||t},ze.sanitizeException=function(e,t){var n;return t&&t.length>ze.MAX_EXCEPTION_LENGTH&&(n=t.substring(0,ze.MAX_EXCEPTION_LENGTH),e.throwInternal(K.WARNING,Z.ExceptionTruncated,"exception is too long, it has been truncated to "+ze.MAX_EXCEPTION_LENGTH+" characters.",{exception:t},!0)),n||t},ze.sanitizeProperties=function(e,t){if(t){var n={};for(var r in t){var i=t[r];if(X.isObject(i)&&N())try{i=A().stringify(i)}catch(a){e.throwInternal(K.WARNING,Z.CannotSerializeObjectNonSerializable,"custom property is not valid",{exception:a},!0)}i=ze.sanitizeString(e,i,ze.MAX_PROPERTY_LENGTH),n[r=ze.sanitizeKeyAndAddUniqueness(e,r,n)]=i}t=n}return t},ze.sanitizeMeasurements=function(e,t){if(t){var n={};for(var r in t){var i=t[r];n[r=ze.sanitizeKeyAndAddUniqueness(e,r,n)]=i}t=n}return t},ze.sanitizeId=function(e,t){return t?ze.sanitizeInput(e,t,ze.MAX_ID_LENGTH,Z.IdTooLong).toString():t},ze.sanitizeInput=function(e,t,n,r){var i;return t&&(t=ze.trim(t)).length>n&&(i=t.substring(0,n),e.throwInternal(K.WARNING,r,"input is too long, it has been truncated to "+n+" characters.",{data:t},!0)),i||t},ze.padNumber=function(e){var t="00"+e;return t.substr(t.length-3)},ze.trim=function(e){return X.isString(e)?e.replace(/^\s+|\s+$/g,""):e},ze.MAX_NAME_LENGTH=150,ze.MAX_ID_LENGTH=128,ze.MAX_PROPERTY_LENGTH=8192,ze.MAX_STRING_LENGTH=1024,ze.MAX_URL_LENGTH=2048,ze.MAX_MESSAGE_LENGTH=32768,ze.MAX_EXCEPTION_LENGTH=32768,ze);function ze(){}var Ge=b(),Be=X.isString,We=null,Xe=(Ve.createDomEvent=function(e){var t,n=null;return X.isFunction(Event)?n=new Event(e):(t=_())&&t.createEvent&&(n=t.createEvent("Event")).initEvent(e,!0,!0),n},Ve.disableStorage=function(){Ve._canUseLocalStorage=!1,Ve._canUseSessionStorage=!1},Ve._getLocalStorageObject=function(){return Ve.canUseLocalStorage()?Ve._getVerifiedStorageObject(u.LocalStorage):null},Ve._getVerifiedStorageObject=function(e){var t,n,r=null;try{if(X.isNullOrUndefined(U()))return null;n=new Date,(r=I(e===u.LocalStorage?"localStorage":"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},Ve.isInternalApplicationInsightsEndpoint=function(e){return!!~Ve._internalEndpoints.indexOf(e.toLowerCase())},Ve.canUseLocalStorage=function(){return Ve._canUseLocalStorage===undefined&&(Ve._canUseLocalStorage=!!Ve._getVerifiedStorageObject(u.LocalStorage)),Ve._canUseLocalStorage},Ve.getStorage=function(e,t){var n=Ve._getLocalStorageObject();if(null!==n)try{return n.getItem(t)}catch(r){Ve._canUseLocalStorage=!1,e.throwInternal(K.WARNING,Z.BrowserCannotReadLocalStorage,"Browser failed read of local storage. "+Ve.getExceptionName(r),{exception:Ve.dump(r)})}return null},Ve.setStorage=function(e,t,n){var r=Ve._getLocalStorageObject();if(null!==r)try{return r.setItem(t,n),!0}catch(i){Ve._canUseLocalStorage=!1,e.throwInternal(K.WARNING,Z.BrowserCannotWriteLocalStorage,"Browser failed write to local storage. "+Ve.getExceptionName(i),{exception:Ve.dump(i)})}return!1},Ve.removeStorage=function(e,t){var n=Ve._getLocalStorageObject();if(null!==n)try{return n.removeItem(t),!0}catch(r){Ve._canUseLocalStorage=!1,e.throwInternal(K.WARNING,Z.BrowserFailedRemovalFromLocalStorage,"Browser failed removal of local storage item. "+Ve.getExceptionName(r),{exception:Ve.dump(r)})}return!1},Ve._getSessionStorageObject=function(){return Ve.canUseSessionStorage()?Ve._getVerifiedStorageObject(u.SessionStorage):null},Ve.canUseSessionStorage=function(){return Ve._canUseSessionStorage===undefined&&(Ve._canUseSessionStorage=!!Ve._getVerifiedStorageObject(u.SessionStorage)),Ve._canUseSessionStorage},Ve.getSessionStorageKeys=function(){var e=[];if(Ve.canUseSessionStorage())for(var t in I("sessionStorage"))e.push(t);return e},Ve.getSessionStorage=function(e,t){var n=Ve._getSessionStorageObject();if(null!==n)try{return n.getItem(t)}catch(r){Ve._canUseSessionStorage=!1,e.throwInternal(K.WARNING,Z.BrowserCannotReadSessionStorage,"Browser failed read of session storage. "+Ve.getExceptionName(r),{exception:Ve.dump(r)})}return null},Ve.setSessionStorage=function(e,t,n){var r=Ve._getSessionStorageObject();if(null!==r)try{return r.setItem(t,n),!0}catch(i){Ve._canUseSessionStorage=!1,e.throwInternal(K.WARNING,Z.BrowserCannotWriteSessionStorage,"Browser failed write to session storage. "+Ve.getExceptionName(i),{exception:Ve.dump(i)})}return!1},Ve.removeSessionStorage=function(e,t){var n=Ve._getSessionStorageObject();if(null!==n)try{return n.removeItem(t),!0}catch(r){Ve._canUseSessionStorage=!1,e.throwInternal(K.WARNING,Z.BrowserFailedRemovalFromSessionStorage,"Browser failed removal of session storage item. "+Ve.getExceptionName(r),{exception:Ve.dump(r)})}return!1},Ve.disableCookies=function(){X.disableCookies()},Ve.canUseCookies=function(e){if(X._canUseCookies===undefined){X._canUseCookies=!1;try{X._canUseCookies=Ve.document.cookie!==undefined}catch(t){e.throwInternal(K.WARNING,Z.CannotAccessCookie,"Cannot access document.cookie - "+Ve.getExceptionName(t),{exception:Ve.dump(t)})}}return X._canUseCookies},Ve.disallowsSameSiteNone=function(e){return!(!Be(e)||!~e.indexOf("CPU iPhone OS 12")&&!~e.indexOf("iPad; CPU OS 12")&&!(~e.indexOf("Macintosh; Intel Mac OS X 10_14")&&~e.indexOf("Version/")&&~e.indexOf("Safari"))&&(!~e.indexOf("Macintosh; Intel Mac OS X 10_14")||(n=(t=e.length)-40,"AppleWebKit/605.1.15 (KHTML, like Gecko)"!=e.substring(0<=n?n:0,t)))&&!~e.indexOf("Chrome/5")&&!~e.indexOf("Chrome/6")&&(!~e.indexOf("UnrealEngine")||~e.indexOf("Chrome"))&&!~e.indexOf("UCBrowser/12")&&!~e.indexOf("UCBrowser/11"));var t,n},Ve.setCookie=function(e,t,n,r){var i,a,o;Ve.canUseCookies(e)&&(a=i="",r&&(i=";domain="+r),(o=j())&&"https:"===o.protocol&&(a=";secure",null===We&&(We=Ve.disallowsSameSiteNone((b()||{}).userAgent)),We||(n+=";SameSite=None")),Ve.document.cookie=t+"="+n+i+";path=/"+a)},Ve.stringToBoolOrDefault=function(e,t){return void 0===t&&(t=!1),e===undefined||null===e?t:"true"==e.toString().toLowerCase()},Ve.getCookie=function(e,t){if(Ve.canUseCookies(e)){var n="";if(t&&t.length)for(var r=t+"=",i=Ve.document.cookie.split(";"),a=0;a<i.length;a++){var o=i[a];if((o=Ve.trim(o))&&!o.indexOf(r)){n=o.substring(r.length,i[a].length);break}}return n}},Ve.deleteCookie=function(e,t){Ve.canUseCookies(e)&&(Ve.document.cookie=t+"=;path=/;expires=Thu, 01 Jan 1970 00:00:01 GMT;")},Ve.newId=function(){for(var e="",t=1073741824*Math.random();0<t;)e+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[0|t%64],t=Math.floor(t/64);return e},Ve.random32=function(){return 4294967296*Math.random()|0},Ve.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=Ve.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)},Ve.isArray=function(e){return"[object Array]"===Object[O].toString.call(e)},Ve.isError=function(e){return"[object Error]"===Object[O].toString.call(e)},Ve.getIEVersion=function(e){void 0===e&&(e=null);var t=e?e.toLowerCase():Ge?(Ge.userAgent||"").toLowerCase():"";if(~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},Ve.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},Ve.isCrossOriginError=function(e,t,n,r,i){return("Script error."===e||"Script error"===e)&&!i},Ve.dump=function(e){var t=Object[O].toString.call(e),n="";return"[object Error]"===t?n="{ stack: '"+e.stack+"', message: '"+e.message+"', name: '"+e.name+"'":N()&&(n=A().stringify(e)),t+n},Ve.getExceptionName=function(e){return"[object Error]"===Object[O].toString.call(e)?e.name:""},Ve.addEventHandler=function(e,t){return J.Attach(T(),e,t)},Ve.IsBeaconApiSupported=function(){return"sendBeacon"in Ge&&Ge.sendBeacon},Ve.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},Ve.document=_()||{},Ve._canUseLocalStorage=undefined,Ve._canUseSessionStorage=undefined,Ve._internalEndpoints=["https://dc.services.visualstudio.com/v2/track","https://breeze.aimon.applicationinsights.io/v2/track","https://dc-int.services.visualstudio.com/v2/track"],Ve.NotSpecified="not_specified",Ve.trim=X.strTrim,Ve.isDate=X.isDate,Ve.toISOStringForIE8=X.toISOString,Ve);function Ve(){}var Ke=(Qe.parseUrl=function(e){var t=Qe._htmlAnchorIdx,n=Qe._htmlAnchorElement,r=n[t];return Qe.document.createElement?n[t]||(r=n[t]=Qe.document.createElement("a")):r={host:Qe.parseHost(e,!0)},r.href=e,++t>=n.length&&(t=0),Qe._htmlAnchorIdx=t,r},Qe.getAbsoluteUrl=function(e){var t,n=Qe.parseUrl(e);return n&&(t=n.href),t},Qe.getPathName=function(e){var t,n=Qe.parseUrl(e);return n&&(t=n.pathname),t},Qe.getCompleteUrl=function(e,t){return e?e.toUpperCase()+" "+t:t},Qe.parseHost=function(e,t){var n=Qe.parseFullHost(e,t);if(n){var r=n.match(/(www[0-9]?\.)?(.[^/:]+)(\:[\d]+)?/i);if(null!=r&&3<r.length&&Be(r[2])&&0<r[2].length)return r[2]+(r[3]||"")}return n},Qe.parseFullHost=function(e,t){var n,r,i,a=null;return!e||null!=(n=e.match(/(\w*):\/\/(.[^/:]+)(\:[\d]+)?/i))&&2<n.length&&Be(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},Qe.document=_()||{},Qe._htmlAnchorIdx=0,Qe._htmlAnchorElement=[null,null,null,null,null],Qe);function Qe(){}var $e=(Je.canIncludeCorrelationHeader=function(e,t,n){if(!t||e&&e.disableCorrelationHeaders)return!1;if(e&&e.correlationHeaderExcludePatterns)for(var r=0;r<e.correlationHeaderExcludePatterns.length;r++)if(e.correlationHeaderExcludePatterns[r].test(t))return!1;var i=Ke.parseUrl(t).host.toLowerCase();if(i&&(~i.indexOf(":443")||~i.indexOf(":80"))&&(i=(Ke.parseFullHost(t,!0)||"").toLowerCase()),!(e&&e.enableCorsCorrelation||i===n))return!1;var a,o=e&&e.correlationHeaderDomains;if(o&&(X.arrForEach(o,function(e){var t=RegExp(e.toLowerCase().replace(/\./g,".").replace(/\*/g,".*"));a=a||t.test(i)}),!a))return!1;var s=e&&e.correlationHeaderExcludedDomains;if(!s||0===s.length)return!0;for(r=0;r<s.length;r++)if(RegExp(s[r].toLowerCase().replace(/\./g,".").replace(/\*/g,".*")).test(i))return!1;return i&&0<i.length},Je.getCorrelationContext=function(e){if(e){var t=Je.getCorrelationContextValue(e,Ue.requestContextTargetKey);if(t&&t!==Je.correlationIdPrefix)return t}},Je.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]}},Je.correlationIdPrefix="cid-v1:",Je);function Je(){}var Ye=(Ze.ParseDependencyPath=function(e,t,n,r){var i,a,o,s=r,u=r,s=t&&0<t.length?(o=(i=Ke.parseUrl(t)).host,s||(null!=i.pathname?("/"!=(a=0===i.pathname.length?"/":i.pathname)[0]&&(a="/"+a),u=i.pathname,Pe.sanitizeString(e,n?n+" "+a:a)):Pe.sanitizeString(e,t))):o=r;return{target:o,name:s,data:u}},Ze);function Ze(){}var et=(tt.Now=function(){var e=P();return e&&e.now&&e.timing?e.now()+e.timing.navigationStart:(new Date).getTime()},tt.GetDuration=function(e,t){var n=null;return 0===e||0===t||X.isNullOrUndefined(e)||X.isNullOrUndefined(t)||(n=t-e),n},tt);function tt(){}var nt,rt="Microsoft_ApplicationInsights_BypassAjaxInstrumentation",it=(__extends(at,function(){}),at);function at(){return this}nt=function(){this.ver=1,this.sampleRate=100,this.tags={}},__extends(function(e,t,n){var r=nt.call(this)||this;return r.name=Pe.sanitizeString(e,n)||Xe.NotSpecified,r.data=t,r.time=X.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},nt);var ot,st,ut=function(){},lt=(ot=ut,__extends(ct,ot),ct);function ct(){var e=ot.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}function dt(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=Pe.sanitizeString(e,t)||Xe.NotSpecified,i.properties=Pe.sanitizeProperties(e,n),i.measurements=Pe.sanitizeMeasurements(e,r),i}st=lt,__extends(dt,st),dt.envelopeType="Microsoft.ApplicationInsights.{0}.Event",dt.dataType="EventData";var ft,pt=(ft=ut,__extends(gt,ft),gt);function gt(){var e=ft.call(this)||this;return e.ver=2,e.exceptions=[],e.properties={},e.measurements={},e}var ht,mt="error";function vt(e,t,n,r,i,a){var o,s=ht.call(this)||this;return s.aiDataContract={ver:g.Required,exceptions:g.Required,severityLevel:g.Default,properties:g.Default,measurements:g.Default},"ver"in(o=t)&&"exceptions"in o&&"properties"in o?(s.exceptions=t.exceptions,s.properties=t.properties,s.measurements=t.measurements,t.severityLevel&&(s.severityLevel=t.severityLevel),t.id&&(s.id=t.id),t.problemGroup&&(s.problemGroup=t.problemGroup),s.ver=2,X.isNullOrUndefined(t.isManual)||(s.isManual=t.isManual)):(s.exceptions=[new yt(e,t)],s.properties=Pe.sanitizeProperties(e,n)||{},s.measurements=Pe.sanitizeMeasurements(e,r),i&&(s.severityLevel=i),a&&(s.id=a)),s}ht=pt,__extends(vt,ht),vt.CreateFromInterface=function(t,e,n,r){var i=e.exceptions&&X.arrMap(e.exceptions,function(e){return yt.CreateFromInterface(t,e)});return new vt(t,__assign({},e,{exceptions:i}),n,r)},vt.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&&X.arrMap(t,function(e){return e.toInterface()})||undefined,severityLevel:i,properties:n,measurements:r,problemGroup:a,id:o,isManual:s}},vt.CreateSimpleException=function(e,t,n,r,i,a){return{exceptions:[{hasFullStack:!0,message:e,stack:i,typeName:t}]}},vt.envelopeType="Microsoft.ApplicationInsights.{0}.Exception",vt.dataType="ExceptionData";var xt,yt=(xt=function(){this.hasFullStack=!0,this.parsedStack=[]},__extends(St,xt),St.prototype.toInterface=function(){var e=this.parsedStack instanceof Array&&X.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}},St.CreateFromInterface=function(e,t){var n=t.parsedStack instanceof Array&&X.arrMap(t.parsedStack,function(e){return Ct.CreateFromInterface(e)})||t.parsedStack;return new St(e,__assign({},t,{parsedStack:n}))},St.parseStack=function(e){if(X.isString(e)){for(var t=e.split("\n"),n=[],r=0,i=0,a=0;a<=t.length;a++){var o,s=t[a];Ct.regex.test(s)&&(i+=(o=new Ct(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},St);function St(e,t){var n,r,i=xt.call(this)||this;return i.aiDataContract={id:g.Default,outerId:g.Default,typeName:g.Required,message:g.Required,hasFullStack:g.Default,stack:g.Default,parsedStack:g.Array},"hasFullStack"in t&&"typeName"in t?(i.typeName=t.typeName,i.message=t.message,i.stack=t.stack,i.parsedStack=t.parsedStack,i.hasFullStack=t.hasFullStack):(n=t,Xe.isError(n)||(n=n[mt]||n.evt||n),i.typeName=Pe.sanitizeString(e,function(e){var t="";if(e&&!(t=e.typeName||e.name||""))try{var n=/function (.{1,})\(/.exec(e.constructor.toString()),t=n&&1<n.length?n[1]:""}catch(r){}return t}(n))||Xe.NotSpecified,i.message=Pe.sanitizeMessage(e,t.message)||Xe.NotSpecified,r=t.stack,i.parsedStack=St.parseStack(r),i.stack=Pe.sanitizeException(e,r),i.hasFullStack=Xe.isArray(i.parsedStack)&&0<i.parsedStack.length),i}var It,Ct=(It=function(){},__extends(Tt,It),Tt.CreateFromInterface=function(e){return new Tt(e,null)},Tt.prototype.toInterface=function(){return{level:this.level,method:this.method,assembly:this.assembly,fileName:this.fileName,line:this.line}},Tt.regex=/^([\s]+at)?(.*?)(\@|\s\(|\s)([^\(\@\n]+):([0-9]+):([0-9]+)(\)?)$/,Tt.baseSize=58,Tt);function Tt(e,t){var n,r,i=It.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=Xe.trim(n),i.fileName="",i.line=0,(r=n.match(Tt.regex))&&5<=r.length&&(i.method=Xe.trim(r[2])||i.method,i.fileName=Xe.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+=Tt.baseSize,i.sizeInBytes+=i.level.toString().length,i.sizeInBytes+=i.line.toString().length,i}var _t,bt,Nt,At=(_t=ut,__extends(Mt,_t),Mt);function Mt(){var e=_t.call(this)||this;return e.ver=2,e.metrics=[],e.properties={},e.measurements={},e}(Nt=bt={})[Nt.Measurement=0]="Measurement",Nt[Nt.Aggregation=1]="Aggregation";var Dt,Et,wt=(Dt=function(){this.kind=bt.Measurement},__extends(Lt,Dt),Lt);function Lt(){var e=Dt.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}function qt(e,t,n,r,i,a,o,s){var u=Et.call(this)||this;u.aiDataContract={ver:g.Required,metrics:g.Required,properties:g.Default};var l=new wt;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=Pe.sanitizeString(e,t)||Xe.NotSpecified,l.value=n,u.metrics=[l],u.properties=Pe.sanitizeProperties(e,o),u.measurements=Pe.sanitizeMeasurements(e,s),u}Et=At,__extends(qt,Et),qt.envelopeType="Microsoft.ApplicationInsights.{0}.Metric",qt.dataType="MetricData";var Rt,kt,Ft=(Rt=lt,__extends(Ht,Rt),Ht);function Ht(){var e=Rt.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}function Ot(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=Pe.sanitizeId(e,o),s.url=Pe.sanitizeUrl(e,n),s.name=Pe.sanitizeString(e,t)||Xe.NotSpecified,isNaN(r)||(s.duration=Xe.msToTimeSpan(r)),s.properties=Pe.sanitizeProperties(e,i),s.measurements=Pe.sanitizeMeasurements(e,a),s}kt=Ft,__extends(Ot,kt),Ot.envelopeType="Microsoft.ApplicationInsights.{0}.Pageview",Ot.dataType="PageviewData";var Ut,jt=(Ut=ut,__extends(Pt,Ut),Pt);function Pt(){var e=Ut.call(this)||this;return e.ver=2,e.success=!0,e.properties={},e.measurements={},e}var zt,Gt=(zt=jt,__extends(Bt,zt),Bt.envelopeType="Microsoft.ApplicationInsights.{0}.RemoteDependency",Bt.dataType="RemoteDependencyData",Bt);function Bt(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=Xe.msToTimeSpan(i),f.success=a,f.resultCode=o+"",f.type=Pe.sanitizeString(e,u);var p=Ye.ParseDependencyPath(e,n,s,r);return f.data=Pe.sanitizeUrl(e,r)||p.data,f.target=Pe.sanitizeString(e,p.target),l&&(f.target=f.target+" | "+l),f.name=Pe.sanitizeString(e,p.name),f.properties=Pe.sanitizeProperties(e,c),f.measurements=Pe.sanitizeMeasurements(e,d),f}var Wt,Xt,Vt=(Wt=ut,__extends(Kt,Wt),Kt);function Kt(){var e=Wt.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}function Qt(e,t,n,r,i){var a=Xt.call(this)||this;return a.aiDataContract={ver:g.Required,message:g.Required,severityLevel:g.Default,properties:g.Default},t=t||Xe.NotSpecified,a.message=Pe.sanitizeMessage(e,t),a.properties=Pe.sanitizeProperties(e,r),a.measurements=Pe.sanitizeMeasurements(e,i),n&&(a.severityLevel=n),a}Xt=Vt,__extends(Qt,Xt),Qt.envelopeType="Microsoft.ApplicationInsights.{0}.Message",Qt.dataType="MessageData";var $t,Jt,Yt,Zt,en=($t=Ft,__extends(tn,$t),tn);function tn(){var e=$t.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}function nn(e,t,n,r,i,a,o){var s=Jt.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=Pe.sanitizeUrl(e,n),s.name=Pe.sanitizeString(e,t)||Xe.NotSpecified,s.properties=Pe.sanitizeProperties(e,i),s.measurements=Pe.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}Jt=en,__extends(nn,Jt),nn.envelopeType="Microsoft.ApplicationInsights.{0}.PageviewPerformance",nn.dataType="PageviewPerformanceData",Yt=it,__extends(function(e,t){var n=Yt.call(this)||this;return n.aiDataContract={baseType:g.Required,baseData:g.Required},n.baseType=e,n.baseData=t,n},Yt),(Zt={})[Zt.Verbose=0]="Verbose",Zt[Zt.Information=1]="Information",Zt[Zt.Warning=2]="Warning",Zt[Zt.Error=3]="Error",Zt[Zt.Critical=4]="Critical";var rn=(an.create=function(e,t,n,r,i,a){if(n=Pe.sanitizeString(r,n)||Xe.NotSpecified,X.isNullOrUndefined(e)||X.isNullOrUndefined(t)||X.isNullOrUndefined(n))throw Error("Input doesn't contain all required fields");var o={name:n,time:X.toISOString(new Date),iKey:"",ext:a||{},tags:[],data:{},baseType:t,baseData:e};if(!X.isNullOrUndefined(i))for(var s in i)i.hasOwnProperty(s)&&(o.data[s]=i[s]);return o},an);function an(){}var on="AppInsightsPropertiesPlugin",sn="constructor",un="prototype",ln="function",cn="_dynInstFuncs",dn="_isDynProxy",fn="_dynClass",pn="_dynCls$",gn="_unknown_",hn="__proto__",mn=Object.getPrototypeOf,vn=0;function xn(e,t){return e&&Object[un].hasOwnProperty.call(e,t)}function yn(e){return typeof e===ln}function Sn(e){return e&&(e===Object[un]||e===Array[un])}function In(e){return Sn(e)||e===Function[un]}function Cn(e){if(e){if(mn)return mn(e);var t=e[hn]||e[un]||e[sn];if(t)return t}return null}function Tn(e,t,n){return t!==sn&&yn(e[t])&&(n||xn(e,t))}function _n(e){throw new TypeError("DynamicProto: "+e)}function bn(e,t){return xn(e,un)?e.name||t||gn:((e||{})[sn]||{}).name||t||gn}function Nn(e,n,t){xn(e,un)||_n("theClass is an invalid class definition.");var r=e[un];!function(e){for(var t=Cn(n);t&&!In(t);){if(t===e)return 1;t=Cn(t)}}(r)&&_n("["+bn(e)+"] is not in class heirarchy of ["+bn(n)+"]");var i=null;xn(r,fn)?i=r[fn]:(i=pn+bn(e,"_")+"$"+vn,vn++,r[fn]=i);var a=function(e){var t={};for(var n in e)!t[n]&&Tn(e,n,!1)&&(t[n]=e[n]);return t}(n);t(n,function(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=Cn(e),s=[];o&&!In(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]&&Tn(o,a,!mn)&&(i[a]=r(t,o[a]));s.push(o),o=Cn(o)}return i}(r,n,a)),function(e,t,n,r){if(!Sn(e)){var i=n[cn]=n[cn]||{},a=i[t]=i[t]||{};for(var o in n)Tn(n,o,!1)&&n[o]!==r[o]&&(a[o]=n[o],delete n[o],xn(e,o)&&(!e[o]||e[o][dn])||(e[o]=function(n,r){var i=function(){if(this&&xn(n,fn)){var e=((this[cn]||{})[n[fn]]||{})[r];if(e)return e.apply(this,arguments);_n("Missing ["+r+"] "+ln)}var t=n[r];return t===i&&(t=Cn(n)[r]),yn(t)||_n("["+r+"] is not a "+ln),t.apply(this,arguments)};return i[dn]=1,i}(e,o)))}}(r,i,n,a)}var An="properties",Mn=X.objKeys,Dn=X.arrForEach;function En(e,t,n){var r=0,i=e[t],a=e[n];return i&&a&&(r=et.GetDuration(i,a)),r}function wn(e,t,n,r,i){var a=0,o=En(n,r,i);return o&&(a=Ln(e,t,Xe.msToTimeSpan(o))),a}function Ln(e,t,n){var r="ajaxPerf",i=0;return e&&t&&n&&((e[r]=e[r]||{})[t]=n,i=1),i}var qn=function(){var e=this;e.openDone=!1,e.setRequestHeaderDone=!1,e.sendDone=!1,e.abortDone=!1,e.stateChangeAttached=!1},Rn=function tr(e,t,n){var r=this,i=n,A="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,Nn(tr,r,function(N){N.getAbsoluteUrl=function(){return N.requestUrl?Ke.getAbsoluteUrl(N.requestUrl):null},N.getPathName=function(){return N.requestUrl?Pe.sanitizeUrl(i,Ke.getCompleteUrl(N.method,N.requestUrl)):null},N.CreateTrackItem=function(e,t,n){if(N.ajaxTotalDuration=Math.round(1e3*et.GetDuration(N.requestSentTime,N.responseFinishedTime))/1e3,N.ajaxTotalDuration<0)return null;var r,i,a,o,s,u,l,c,d=((o={id:"|"+N.traceID+"."+N.spanID,target:N.getAbsoluteUrl(),name:N.getPathName(),type:e,duration:N.ajaxTotalDuration,success:200<=+N.status&&+N.status<400,responseCode:+N.status,method:N.method})[An]={HttpMethod:N.method},o),f=d,p=(s=N).perfTiming,g=f[An]||{},h=0,m=X.isString,v="duration",x="startTime",y="connect"+"End",S="request"+"Start",I="response"+"End",C="transferSize",T="encodedBodySize",_="decodedBodySize",b="serverTiming";return p?(h|=wn(g,"End",p,"redirectStart","End"),h|=wn(g,"domainLookup",p,"domainLookupStart","domainLookupEnd"),h|=wn(g,"connect",p,"connectStart",y),h|=wn(g,"request",p,S,"requestEnd"),h|=wn(g,"response",p,"responseStart",I),h|=wn(g,"networkConnect",p,x,y),h|=wn(g,"sentRequest",p,S,I),h|=Ln(g,v,u=p[v]||En(p,x,I)||0),h|=Ln(g,"perfTotal",u),(l=p[b])&&(c={},Dn(l,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=c[a]||{};Dn(Mn(n),function(e){var t=n[e];("name"!==e&&m(t)||X.isNumber(t))&&(o[e]&&(t=o[e]+";"+t),!t&&m(t)||(o[e]=t))}),c[a]=o}),h|=Ln(g,b,c)),h|=Ln(g,C,p[C]),h|=Ln(g,T,p[T]),h|=Ln(g,_,p[_])):s.perfMark&&(h|=Ln(g,"missing",s.perfAttempts)),h&&(f[An]=g),t&&0<Mn(N.requestHeaders).length&&(d[An]=d[An]||{},d[An].requestHeaders=N.requestHeaders),!n||(r=n())&&((i=r.correlationContext)&&(d.correlationContext=i),r.headerMap&&0<Mn(r.headerMap).length&&(d[An]=d[An]||{},d[An].responseHeaders=r.headerMap),400<=N.status&&(a=r.type,d[An]=d[An]||{},""!==a&&"text"!==a||(d[An][A]=r[A]?r.statusText+" - "+r[A]:r.statusText),"json"===a&&(d[An][A]=r.response?r.statusText+" - "+JSON.stringify(r.response):r.statusText))),d}})},kn=(Fn.isValidTraceId=function(e){return e.match(/^[0-9a-f]{32}$/)&&"00000000000000000000000000000000"!==e},Fn.isValidSpanId=function(e){return e.match(/^[0-9a-f]{16}$/)&&"0000000000000000"!==e},Fn.prototype.toString=function(){return this.version+"-"+this.traceId+"-"+this.spanId+"-"+this.traceFlag},Fn.DEFAULT_TRACE_FLAG="01",Fn.DEFAULT_VERSION="00",Fn);function Fn(e,t){var n=this;n.traceFlag=Fn.DEFAULT_TRACE_FLAG,n.version=Fn.DEFAULT_VERSION,e&&Fn.isValidTraceId(e)?n.traceId=e:n.traceId=Xe.generateW3CId(),t&&Fn.isValidSpanId(t)?n.spanId=t:n.spanId=Xe.generateW3CId().substr(0,16)}var Hn="ai.ajxmn.",On="diagLog",Un="ajaxData",jn="throwInternal",Pn="fetch",zn=X.isNullOrUndefined,Gn=X.arrForEach,Bn=X.objKeys,Wn=0;function Xn(e){var t="";try{zn(e)||zn(e[Un])||zn(e[Un].requestUrl)||(t+="(url: '"+e[Un].requestUrl+"')")}catch(n){}return t}function Vn(e,t,n,r,i){e[On]()[jn](K.CRITICAL,t,n,r,i)}function Kn(e,t,n,r,i){e[On]()[jn](K.WARNING,t,n,r,i)}function Qn(t,n,r){return function(e){Vn(t,n,r,{ajaxDiagnosticsMessage:Xn(e.inst),exception:Xe.dump(e.err)})}}function $n(e,t){return e&&t?e.indexOf(t):-1}var Jn,Yn=(Jn=de,__extends(Zn,Jn),Zn.getDefaultConfig=function(){return{maxAjaxCallsPerView:500,disableAjaxTracking:!1,disableFetchTracking:!0,disableCorrelationHeaders:!1,distributedTracingMode:F.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}},Zn.getEmptyConfig=function(){var t=this.getDefaultConfig();return Gn(Bn(t),function(e){t[e]=undefined}),t},Zn.prototype.processTelemetry=function(e,t){this.processNext(e,t)},Zn.identifier="AjaxDependencyPlugin",Zn);function Zn(){var e=Jn.call(this)||this;e.identifier=Zn.identifier,e.priority=120;var T,_,b,N,A,M,D="trackDependencyDataInternal",t=j(),E=!1,w=!1,u=t&&t.host&&t.host.toLowerCase(),L=Zn.getEmptyConfig(),q=!1,i=0,R=0,k=[],s={};return Nn(Zn,e,function(g,h){function m(e,t,n){k.push(e?Oe(e[O],t,n,!1):null)}function v(e,t,n){var r=!1,i=((X.isString(t)?t:(t||{}).url||"")||"").toLowerCase(),a=$n(i,"?"),o=$n(i,"#");return(-1===a||-1!==o&&o<a)&&(a=o),-1!==a&&(i=i.substring(0,a)),zn(e)?zn(t)||(r="object"==typeof t&&!0===t[rt]||!!n&&!0===n[rt]):r=!0===e[rt]||!0===i[rt],r?s[i]||(s[i]=1):s[i]&&(r=!0),r}function x(e,t){var n=!0,r=w;return zn(e)||(n=!0===t||!zn(e[Un])),r&&n}function y(e,t){var n,r,i;t.requestUrl&&N&&A&&(n=P())&&X.isFunction(n.mark)&&(r=N+e+"#"+ ++Wn,n.mark(r),(i=n.getEntriesByName(r))&&1===i.length&&(t.perfMark=i[0]))}function S(a,o,s,u){var l=o.perfMark,c=P(),d=L.maxAjaxPerfLookupAttempts,f=L.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===$n(r.name,p)&&-1===$n(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&&X.isFunction(c.clearMarks)&&c.clearMarks(l.name),o.perfAttempts=g,s()):setTimeout(h,f)}catch(i){u(i)}}()}function I(e){var t="";try{zn(e)||(t+="string"==typeof e?"(url: '"+e+"')":"(url: '"+e.url+"')")}catch(n){Vn(g,Z.FailedMonitorAjaxOpen,"Failed to grab failed fetch diagnostics message",{exception:Xe.dump(n)})}return t}function C(e,t,i,n,r){function a(e,t,n){var r=n||{};r.fetchDiagnosticsMessage=I(i),t&&(r.exception=Xe.dump(t)),Kn(g,e,"Failed to calculate the duration of the fetch call, monitoring data for this fetch call won't be sent.",r)}n&&(n.responseFinishedTime=et.Now(),n.status=t,S("fetch",n,function(){var e=n.CreateTrackItem("Fetch",q,r);e?g[D](e):a(Z.FailedMonitorAjaxDur,null,{requestSentTime:n.requestSentTime,responseFinishedTime:n.responseFinishedTime})},function(e){a(Z.FailedMonitorAjaxGetCorrelationHeader,e,null)}))}g.initialize=function(e,t,n,r){if(!g.isInitialized()){h.initialize(e,t,n,r);var i=g._getTelCtx(),a=Zn.getDefaultConfig();Gn(Bn(a),function(e){L[e]=i.getConfig(Zn.identifier,e,a[e])});var o,s=L.distributedTracingMode;if(q=L.enableRequestHeaderTracking,A=L.enableAjaxPerfTracking,R=L.maxAjaxCallsPerView,M=L.enableResponseHeaderTracking,b=s===F.AI||s===F.AI_AND_W3C,_=s===F.AI_AND_W3C||s===F.W3C,A&&(o=e.instrumentationKey||"unkwn",N=5<o.length?Hn+o.substring(o.length-5)+".":Hn+o+"."),!1===L.disableAjaxTracking&&(!function(e){var t,n=!1;typeof XMLHttpRequest===H||zn(XMLHttpRequest)||(t=XMLHttpRequest[O],n=!(zn(t)||zn(t.open)||zn(t.send)||zn(t.abort)));var r=Xe.getIEVersion();if(r&&r<9&&(n=!1),n)try{(new XMLHttpRequest)[Un]={};var i=XMLHttpRequest[O].open;XMLHttpRequest[O].open=i}catch(a){n=!1,Vn(e,Z.FailedMonitorAjaxOpen,"Failed to enable XMLHttpRequest monitoring, extension is not supported",{exception:Xe.dump(a)})}return n}(g)||w||(m(XMLHttpRequest,"open",{req:function(e,t,n,r){var i,a,o,s,u,l,c,d,f=e.inst,p=f[Un];v(f,n)||!x(f,!0)||p&&p.xhrMonitoringState.openDone||(i=f,a=t,o=n,s=r,u=T&&T.telemetryTrace&&T.telemetryTrace.traceID||Xe.generateW3CId(),l=Xe.generateW3CId().substr(0,16),(c=new Rn(u,l,g[On]())).method=a,c.requestUrl=o,c.xhrMonitoringState.openDone=!0,c.requestHeaders={},c.async=s,i[Un]=c,(d=i)[Un].xhrMonitoringState.stateChangeAttached=J.Attach(d,"readystatechange",function(){try{d&&4===d.readyState&&x(d)&&((i=(r=d)[Un]).responseFinishedTime=et.Now(),i.status=r.status,S("xmlhttprequest",i,function(){try{var e=i.CreateTrackItem("Ajax",q,function(){var e,t,i,n={statusText:r.statusText,headerMap:null,correlationContext:function(e){try{var t=e.getAllResponseHeaders();if(null!==t&&-1!==$n(t.toLowerCase(),Ue.requestContextHeaderLowerCase)){var n=e.getResponseHeader(Ue.requestContextHeader);return $e.getCorrelationContext(n)}}catch(r){Kn(g,Z.FailedMonitorAjaxGetCorrelationHeader,"Failed to get Request-Context correlation header as it may be not included in the response or not accessible.",{ajaxDiagnosticsMessage:Xn(e),exception:Xe.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!M||(e=r.getAllResponseHeaders())&&(t=X.strTrim(e).split(/[\r\n]+/),i={},Gn(t,function(e){var t=e.split(": "),n=t.shift(),r=t.join(": ");i[n]=r}),n.headerMap=i),n});e?g[D](e):n(null,{requestSentTime:i.requestSentTime,responseFinishedTime:i.responseFinishedTime})}finally{try{r[Un]=null}catch(t){}}},function(e){n(e,null)}))}catch(t){var e=Xe.dump(t);e&&-1!==$n(e.toLowerCase(),"c00c023f")||Vn(g,Z.FailedMonitorAjaxRSC,"Failed to monitor XMLHttpRequest 'readystatechange' event handler, monitoring data for this ajax call may be incorrect.",{ajaxDiagnosticsMessage:Xn(d),exception:e})}function n(e,t){var n=t||{};n.ajaxDiagnosticsMessage=Xn(r),e&&(n.exception=Xe.dump(e)),Kn(g,Z.FailedMonitorAjaxDur,"Failed to calculate the duration of the ajax call, monitoring data for this ajax call won't be sent.",n)}var r,i}))},hkErr:Qn(g,Z.FailedMonitorAjaxOpen,"Failed to monitor XMLHttpRequest.open, monitoring data for this ajax call may be incorrect.")}),m(XMLHttpRequest,"send",{req:function(e,t){var n=e.inst,r=n[Un];x(n)&&!r.xhrMonitoringState.sendDone&&(y("xhr",r),r.requestSentTime=et.Now(),g.includeCorrelationHeaders(r,undefined,undefined,n),r.xhrMonitoringState.sendDone=!0)},hkErr:Qn(g,Z.FailedMonitorAjaxSend,"Failed to monitor XMLHttpRequest, monitoring data for this ajax call may be incorrect.")}),m(XMLHttpRequest,"abort",{req:function(e){var t=e.inst,n=t[Un];x(t)&&!n.xhrMonitoringState.abortDone&&(n.aborted=1,n.xhrMonitoringState.abortDone=!0)},hkErr:Qn(g,Z.FailedMonitorAjaxAbort,"Failed to monitor XMLHttpRequest.abort, monitoring data for this ajax call may be incorrect.")}),q&&m(XMLHttpRequest,"setRequestHeader",{req:function(e,t,n){var r=e.inst;x(r)&&(r[Un].requestHeaders[t]=n)},hkErr:Qn(g,Z.FailedMonitorAjaxSetRequestHeader,"Failed to monitor XMLHttpRequest.setRequestHeader, monitoring data for this ajax call may be incorrect.")}),w=!0)),(p=!(c=U())||zn(c.Request)||zn(c.Request[O])||zn(c[Pn])?null:c[Pn])&&(d=U(),f=p.polyfill,!1===L.disableFetchTracking?(k.push(Oe(d,Pn,{req:function(e,t,n){var r,i,a;!E||v(null,t,n)||f&&w||(r=e.ctx(),i=function(e,t){var n=T&&T.telemetryTrace&&T.telemetryTrace.traceID||Xe.generateW3CId(),r=Xe.generateW3CId().substr(0,16),i=new Rn(n,r,g[On]());i.requestSentTime=et.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={};return q&&new Headers((t?t.headers:0)||e instanceof Request&&e.headers||{}).forEach(function(e,t){o[t]=e}),i.requestHeaders=o,y("fetch",i),i}(t,n),(a=g.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 C(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(Ue.requestContextHeader);return $e.getCorrelationContext(t)}catch(n){Kn(g,Z.FailedMonitorAjaxGetCorrelationHeader,"Failed to get Request-Context correlation header as it may be not included in the response or not accessible.",{fetchDiagnosticsMessage:I(e),exception:Xe.dump(n)})}}(t)};return M&&(n={},t.headers.forEach(function(e,t){n[t]=e}),e.headerMap=n),e}),t})["catch"](function(e){throw C(0,0,t,n,null,e.message),e}))},hkErr:Qn(g,Z.FailedMonitorAjaxOpen,"Failed to monitor Window.fetch, monitoring data for this fetch call may be incorrect.")})),E=!0):f&&k.push(Oe(d,Pn,{req:function(e,t,n){v(null,t,n)}})),f&&(d[Pn].polyfill=f)),0<n.length&&n){for(var u=void 0,l=0;!u&&l<n.length;)n[l]&&n[l].identifier===on&&(u=n[l]),l++;u&&(T=u.context)}}var c,d,f,p},g.teardown=function(){Gn(k,function(e){e.rm()}),w=E=!(k=[]),g.setInitialized(!1)},g.trackDependencyData=function(e,t){g[D](e,t)},g.includeCorrelationHeaders=function(e,t,n,r){var i,a,o,s=g._currentWindowHost||u;return t?($e.canIncludeCorrelationHeader(L,e.getAbsoluteUrl(),s)&&((n=n||{}).headers=new Headers(n.headers||t instanceof Request&&t.headers||{}),b&&(i="|"+e.traceID+"."+e.spanID,n.headers.set(Ue.requestIdHeader,i),q&&(e.requestHeaders[Ue.requestIdHeader]=i)),(a=L.appId||T&&T.appId())&&(n.headers.set(Ue.requestContextHeader,Ue.requestContextAppIdFormat+a),q&&(e.requestHeaders[Ue.requestContextHeader]=Ue.requestContextAppIdFormat+a)),_&&(o=new kn(e.traceID,e.spanID),n.headers.set(Ue.traceParentHeader,o.toString()),q&&(e.requestHeaders[Ue.traceParentHeader]=o.toString()))),n):r?($e.canIncludeCorrelationHeader(L,e.getAbsoluteUrl(),s)&&(b&&(i="|"+e.traceID+"."+e.spanID,r.setRequestHeader(Ue.requestIdHeader,i),q&&(e.requestHeaders[Ue.requestIdHeader]=i)),(a=L.appId||T&&T.appId())&&(r.setRequestHeader(Ue.requestContextHeader,Ue.requestContextAppIdFormat+a),q&&(e.requestHeaders[Ue.requestContextHeader]=Ue.requestContextAppIdFormat+a)),_&&(o=new kn(e.traceID,e.spanID),r.setRequestHeader(Ue.traceParentHeader,o.toString()),q&&(e.requestHeaders[Ue.traceParentHeader]=o.toString()))),r):undefined},g[D]=function(e,t,n){var r;-1===R||i<R?(L.distributedTracingMode!==F.W3C&&L.distributedTracingMode!==F.AI_AND_W3C||"string"!=typeof e.id||"."===e.id[e.id.length-1]||(e.id+="."),r=rn.create(e,Gt.dataType,Gt.envelopeType,g[On](),t,n),g.core.track(r)):i===R&&Vn(g,Z.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=Yn,e.ajaxRecord=Rn,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})};"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e.Microsoft=e.Microsoft||{},e.Microsoft.ApplicationInsights=e.Microsoft.ApplicationInsights||{})); | ||
var e=this,t=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}var u,c,g,l,F,f,d=function(e,t){return(d=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)},p=n()||{};__assign=p.__assign=p.__assign||Object.assign||function(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},__extends=p.__extends=p.__extends||function(e,t){function n(){this.constructor=e}d(e,t),e[o]=null===t?r(t):(n[o]=t[o],new n)},(c=u={})[c.LocalStorage=0]="LocalStorage",c[c.SessionStorage=1]="SessionStorage",(l=g=g||{})[l.Default=0]="Default",l[l.Required=1]="Required",l[l.Array=2]="Array",l[l.Hidden=4]="Hidden",(f=F=F||{})[f.AI=0]="AI",f[f.AI_AND_W3C=1]="AI_AND_W3C",f[f.W3C=2]="W3C";var h=2,H=t,m=a,O=o,v=i,x="window",y="location",S="performance",C="JSON",P=n;function I(e){var t=P();return t&&t[e]?t[e]:e===x&&T()?window:null}function T(){return typeof window===m&&window}function N(){return T()?window:I(x)}function _(){return typeof document===m&&document?document:I("document")}function b(){return typeof navigator===m&&navigator?navigator:I("navigator")}function j(){return typeof location===m&&location?location:I(y)}function U(){return I(S)}function A(){return typeof JSON===m&&JSON||null!==I(C)}function M(){return A()?JSON||I(C):null}var E="constructor",D="prototype",w="function",L="_dynInstFuncs",q="_isDynProxy",R="_dynClass",k="_dynCls$",z="_unknown_",G="__proto__",B=Object.getPrototypeOf,W=0;function X(e,t){return e&&Object[D].hasOwnProperty.call(e,t)}function V(e){return typeof e===w}function K(e){return e&&(e===Object[D]||e===Array[D])}function $(e){return K(e)||e===Function[D]}function J(e){if(e){if(B)return B(e);var t=e[G]||e[D]||e[E];if(t)return t}return null}function Q(e,t,n){return t!==E&&V(e[t])&&(n||X(e,t))}function Y(e){throw new TypeError("DynamicProto: "+e)}function Z(e,t){return X(e,D)?e.name||t||z:((e||{})[E]||{}).name||t||z}function ee(e,n,t){X(e,D)||Y("theClass is an invalid class definition.");var r=e[D];!function(e){for(var t=J(n);t&&!$(t);){if(t===e)return 1;t=J(t)}}(r)&&Y("["+Z(e)+"] is not in class heirarchy of ["+Z(n)+"]");var i=null;X(r,R)?i=r[R]:(i=k+Z(e,"_")+"$"+W,W++,r[R]=i);var a=function(e){var t={};for(var n in e)!t[n]&&Q(e,n,!1)&&(t[n]=e[n]);return t}(n);t(n,function(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=J(e),s=[];o&&!$(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]&&Q(o,a,!B)&&(i[a]=r(t,o[a]));s.push(o),o=J(o)}return i}(r,n,a)),function(e,t,n,r){if(!K(e)){var i=n[L]=n[L]||{},a=i[t]=i[t]||{};for(var o in n)Q(n,o,!1)&&n[o]!==r[o]&&(a[o]=n[o],delete n[o],X(e,o)&&(!e[o]||e[o][q])||(e[o]=function(n,r){var i=function(){if(this&&X(n,R)){var e=((this[L]||{})[n[R]]||{})[r];if(e)return e.apply(this,arguments);Y("Missing ["+r+"] "+w)}var t=n[r];return t===i&&(t=J(n)[r]),V(t)||Y("["+r+"] is not a "+w),t.apply(this,arguments)};return i[q]=1,i}(e,o)))}}(r,i,n,a)}var te="ctx",ne=(re.ParentContextKey="parent",re.ChildrenContextKey="childEvts",re);function re(e,i,t){var n,a=this,o=!1;a.start=Date.now(),a.name=e,a.isAsync=t,a.isChildEvt=function(){return!1},ve.isFunction(i)&&(o=ve.objDefineAccessors(a,"payload",function(){return!n&&ve.isFunction(i)&&(n=i(),i=null),n})),a.getCtx=function(e){return e?e===re.ParentContextKey||e===re.ChildrenContextKey?a[e]:(a[te]||{})[e]:null},a.setCtx=function(e,t){e&&(e===re.ParentContextKey?(a[e]||(a.isChildEvt=function(){return!0}),a[e]=t):e===re.ChildrenContextKey?a[e]=t:(a[te]=a[te]||{})[e]=t)},a.complete=function(){var e=0,t=a.getCtx(re.ChildrenContextKey);if(ve.isArray(t))for(var n=0;n<t.length;n++){var r=t[n];r&&(e+=r.time)}a.time=Date.now()-a.start,a.exTime=a.time-e,a.complete=function(){},!o&&ve.isFunction(i)&&(a.payload=i())}}var ie=function sr(t){this.ctx={},ee(sr,this,function(n){n.create=function(e,t,n){return new ne(e,t,n)},n.fire=function(e){e&&e.complete(),t&&t.perfEvent(e)},n.setCtx=function(e,t){e&&((n[te]=n[te]||{})[e]=t)},n.getCtx=function(e){return(n[te]||{})[e]}})},ae="attachEvent",oe="addEventListener",se="detachEvent",ue="removeEventListener";function ce(e,t){return typeof e===t}function le(e){return ce(e,t)||e===undefined}function fe(e){return le(e)||null===e}function de(e,t){return e&&Object[o].hasOwnProperty.call(e,t)}function pe(e){return ce(e,a)}function ge(e){return ce(e,i)}function he(e,t,n,r){void 0===r&&(r=!1);var i=!1;if(!fe(e))try{fe(e[oe])?fe(e[ae])||(e[ae]("on"+t,n),i=!0):(e[oe](t,n,r),i=!0)}catch(a){}return i}function me(e,t,n,r){if(void 0===r&&(r=!1),!fe(e))try{fe(e[ue])?fe(e[se])||e[se]("on"+t,n):e[ue](t,n,r)}catch(i){}}var ve=(xe.isDate=function(e){return"[object Date]"===Object[o].toString.call(e)},xe.isArray=function(e){return"[object Array]"===Object[o].toString.call(e)},xe.isError=function(e){return"[object Error]"===Object[o].toString.call(e)},xe.isString=function(e){return ce(e,"string")},xe.isNumber=function(e){return ce(e,"number")},xe.isBoolean=function(e){return ce(e,"boolean")},xe.disableCookies=function(){xe._canUseCookies=!1},xe.newGuid=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(ye,function(e){var t,n=0|((t=I("crypto"))?t.getRandomValues(new Uint8Array(1))[0]%16:16*Math.random());return("x"===e?n:3&n|8).toString(16)})},xe.toISOString=function(e){if(xe.isDate(e)){var t=function(e){var t=e+"";return 1===t.length&&(t="0"+t),t};return e.getUTCFullYear()+"-"+t(1+e.getUTCMonth())+"-"+t(e.getUTCDate())+"T"+t(e.getUTCHours())+":"+t(e.getUTCMinutes())+":"+t(e.getUTCSeconds())+"."+((e.getUTCMilliseconds()/1e3).toFixed(3)+"").slice(2,5)+"Z"}},xe.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)},xe.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},xe.arrMap=function(e,t,n){for(var r=e.length,i=n||e,a=Array(r),o=0;o<r;o++)o in e&&(a[o]=t.call(i,e[o],e));return a},xe.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},xe.strTrim=function(e){return xe.isString(e)?e.replace(/^\s+|\s+$/g,""):e},xe.objKeys=function(e){var t=!{toString:null}.propertyIsEnumerable("toString");if(!(ge(e)||pe(e)&&null!==e))throw new TypeError("objKeys called on non-object");var n=[];for(var r in e)de(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++)de(e,i[o])&&n.push(i[o]);return n},xe.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},xe.addEventHandler=function(e,t){var n=!1,r=N();r&&(n=he(r,e,t),n=he(r.body,e,t)||n);var i=_();return i&&(n=Se.Attach(i,e,t)||n),n},xe.isTypeof=ce,xe.isUndefined=le,xe.isNullOrUndefined=fe,xe.hasOwnProperty=de,xe.isFunction=ge,xe.isObject=pe,xe.objCreate=r,xe);function xe(){}var ye=/[xy]/g,Se=(Ce.Attach=he,Ce.AttachEvent=he,Ce.Detach=me,Ce.DetachEvent=me,Ce);function Ce(){}var Ie,Te,Ne="CoreUtils.doPerf";function _e(e,t,n,r,i){if(e){var a=e;if(a&&ve.isFunction(a.getPerfMgr)&&(a=a.getPerfMgr()),a){var o,s=void 0,u=a.getCtx(Ne);try{if(s=a.create(t(),r,i))return u&&s.setCtx&&(s.setCtx(ne.ParentContextKey,u),u.getCtx&&u.setCtx&&((o=u.getCtx(ne.ChildrenContextKey))||(o=[],u.setCtx(ne.ChildrenContextKey,o)),o.push(s))),a.setCtx(Ne,s),n(s)}catch(c){s&&s.setCtx&&s.setCtx("exception",c)}finally{s&&a.fire(s),a.setCtx(Ne,u)}}}return n()}(Te=Ie=Ie||{})[Te.CRITICAL=1]="CRITICAL",Te[Te.WARNING=2]="WARNING";var be={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};function Ae(e){return e?'"'+e.replace(/\"/g,"")+'"':""}var Me=(Ee.dataType="MessageData",Ee);function Ee(e,t,n,r){void 0===n&&(n=!1),this.messageId=e,this.message=(n?"AI: ":"AI (Internal): ")+e;var i="";A()&&(i=M().stringify(r));var a=(t?" message:"+Ae(t):"")+(r?" props:"+Ae(i):"");this.message+=a}var De=function ur(a){this.identifier="DiagnosticLogger",this.queue=[];var o=0,c={};ee(ur,this,function(s){var r=ve.isNullOrUndefined,u=ve.isUndefined,i=ve.isFunction;function e(e,t){var n=a[e];return r(n)?t:n}r(a)&&(a={}),s.consoleLoggingLevel=function(){return e("loggingLevelConsole",0)},s.telemetryLoggingLevel=function(){return e("loggingLevelTelemetry",1)},s.maxInternalMessageLimit=function(){return e("maxMessageLimit",25)},s.enableDebugExceptions=function(){return e("enableDebugExceptions",!1)},s.throwInternal=function(e,t,n,r,i){void 0===i&&(i=!1);var a,o=new Me(t,n,i,r);if(s.enableDebugExceptions())throw o;!u(o)&&o&&(u(o.message)||(i?(a=+o.messageId,!c[a]&&s.consoleLoggingLevel()>=Ie.WARNING&&(s.warnToConsole(o.message),c[a]=!0)):s.consoleLoggingLevel()>=Ie.WARNING&&s.warnToConsole(o.message),s.logInternalMessage(e,o)))},s.warnToConsole=function(e){var t,n=typeof console!==H?console:I("console");n&&(t="log",n.warn&&(t="warn"),i(n[t])&&n[t](e))},s.resetInternalMessageCount=function(){o=0,c={}},s.logInternalMessage=function(e,t){var n,r,i,a;o>=s.maxInternalMessageLimit()||(n=!0,r="AITR_"+t.messageId,c[r]?n=!1:c[r]=!0,n&&(e<=s.telemetryLoggingLevel()&&(s.queue.push(t),o++),o===s.maxInternalMessageLimit()&&(i="Internal events throttle limit per PageView reached for this app.",a=new Me(be.MessageLimitPerPVExceeded,i,!1),s.queue.push(a),s.warnToConsole(i))))}})},we=ve.isFunction,Le=function(i,t){var a=this,o=null,s=we(i.processTelemetry),u=we(i.setNextPlugin);a._hasRun=!1,a.getPlugin=function(){return i},a.getNext=function(){return o},a.setNext=function(e){o=e},a.processTelemetry=function(n,r){r=r||t;var e=i?i.identifier:"TelemetryPluginChain";_e(r?r.core():null,function(){return e+":processTelemetry"},function(){if(i&&s){a._hasRun=!0;try{r.setNext(o),u&&i.setNextPlugin(o),o&&(o._hasRun=!1),i.processTelemetry(n,r)}catch(t){var e=o&&o._hasRun;o&&e||r.diagLog().throwInternal(Ie.CRITICAL,be.PluginException,"Plugin ["+i.identifier+"] failed during processTelemetry - "+t),o&&!e&&o.processTelemetry(n,r)}}else o&&(a._hasRun=!0,o.processTelemetry(n,r))},function(){return{item:n}},!n.sync)}},qe=ve.isNullOrUndefined;function Re(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&&ve.isFunction(o.processTelemetry)&&(a=new Le(o,t),n.push(a),r&&r.setNext(a),r=a)}return 0<n.length?n[0]:null}var ke=function cr(e,a,n,t){var r,i,o,s,u=this,c=null;null!==t&&(e&&ve.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),Re(r,t)}(e,u,t||e.getPlugin()):t?(r=u,o=e,s=!1,(i=t)&&e&&(o=[],ve.arrForEach(e,function(e){!s&&e!==i||(s=!0,o.push(e))})),i&&!s&&(o=o||[]).push(i),c=Re(o,r)):ve.isUndefined(t)&&(c=Re(e,u))),u.core=function(){return n},u.diagLog=function(){return(n||{}).logger||new De(a||{})},u.getCfg=function(){return a},u.getExtCfg=function(e,t){var n,r;return void 0===t&&(t={}),!a||(r=a.extensionConfig)&&e&&(n=r[e]),n||t},u.getConfig=function(e,t,n){var r;void 0===n&&(n=!1);var i=u.getExtCfg(e,null);return i&&!qe(i[t])?r=i[t]:a&&!qe(a[t])&&(r=a[t]),qe(r)?n:r},u.hasNext=function(){return null!=c},u.getNext=function(){return c},u.setNext=function(e){c=e},u.processNext=function(e){var t=c;t&&(c=t.getNext(),t.processTelemetry(e,u))},u.createNew=function(e,t){return void 0===e&&(e=null),new cr(e||c,a,n,t)}},Fe=ve.isFunction,He="getPlugin",Oe=(Pe.prototype.initialize=function(e,t,n,r){this._baseTelInit(e,t,n,r)},Pe);function Pe(){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&&Fe(u.processTelemetry)&&u.processTelemetry(e,null)},a._getTelCtx=function(e){void 0===e&&(e=null);var t,n=e;return n||(t=s||new ke(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 ke(r,e,t,i),o=!0}}var je=ve.isFunction,Ue="processTelemetry",ze="priority",Ge="setNextPlugin",Be="isInitialized";function We(t,n){for(var e=[],r=null,i=t.getNext();i;){var a=i.getPlugin();a&&(r&&je(r[Ge])&&je(a[Ue])&&r[Ge](a),je(a[Be])&&a[Be]()||e.push(a),r=a,i=i.getNext())}ve.arrForEach(e,function(e){e.initialize(t.getCfg(),t.core(),n,t.getNext())})}function Xe(e){return e.sort(function(e,t){var n=0,r=je(t[Ue]);return je(e[Ue])?n=r?e[ze]-t[ze]:1:r&&(n=-1),n})}var Ve,Ke=500,$e="Channel has invalid priority",Je=ve.objDefineAccessors,Qe=(Ve=Oe,__extends(Ye,Ve),Ye._staticInit=(Je(Ye.prototype,"ChannelControls",Ye.prototype.getChannelControls),void Je(Ye.prototype,"channelQueue",Ye.prototype.getChannelControls)),Ye);function Ye(){var r=Ve.call(this)||this;r.identifier="ChannelControllerPlugin",r.priority=Ke;var u,c=ve.arrForEach;function l(e){e&&0<e.length&&(e=e.sort(function(e,t){return e.priority-t.priority}),c(e,function(e){if(e.priority<Ke)throw Error($e+e.identifier)}),u.push(e))}return ee(Ye,r,function(o,s){o.setNextPlugin=function(e){},o.processTelemetry=function(t,n){u&&c(u,function(e){0<e.length&&r._getTelCtx(n).createNew(e).processNext(t)})},o.getChannelControls=function(){return u},o.initialize=function(t,n,r){var e,i,a;o.isInitialized()||(s.initialize(t,n,r),t.isCookieUseDisabled&&ve.disableCookies(),i=r,u=[],(e=(t||{}).channels)&&c(e,l),i&&(a=[],c(i,function(e){e.priority>Ke&&a.push(e)}),l(a)),c(u,function(e){return We(new ke(e,t,n),r)}))}}),r}var Ze=ve.arrForEach,et=ve.isNullOrUndefined,tt="_notificationManager",nt=function lr(e){this.listeners=[];var a=ve.arrForEach,t=!!(e||{}).perfEvtsSendAll;ee(lr,this,function(i){i.addNotificationListener=function(e){i.listeners.push(e)},i.removeNotificationListener=function(e){for(var t=ve.arrIndexOf(i.listeners,e);-1<t;)i.listeners.splice(t,1),t=ve.arrIndexOf(i.listeners,e)},i.eventsSent=function(t){a(i.listeners,function(e){e&&e.eventsSent&&setTimeout(function(){return e.eventsSent(t)},0)})},i.eventsDiscarded=function(t,n){a(i.listeners,function(e){e&&e.eventsDiscarded&&setTimeout(function(){return e.eventsDiscarded(t,n)},0)})},i.eventsSendRequest=function(n,r){a(i.listeners,function(e){if(e&&e.eventsSendRequest)if(r)setTimeout(function(){return e.eventsSendRequest(n,r)},0);else try{e.eventsSendRequest(n,r)}catch(t){}})},i.perfEvent=function(n){n&&(!t&&n.isChildEvt()||a(i.listeners,function(e){if(e&&e.perfEvent)if(n.isAsync)setTimeout(function(){return e.perfEvent(n)},0);else try{e.perfEvent(n)}catch(t){}}))}})},rt=function fr(){var t,u,c,n,l=!1;ee(fr,this,function(s){s._extensions=[],u=new Qe,t=[],s.isInitialized=function(){return l},s.initialize=function(e,t,r,n){if(s.isInitialized())throw Error("Core should not be initialized more than once");if(!e||et(e.instrumentationKey))throw Error("Please provide instrumentation key");c=n,s[tt]=n,s.config=e||{},e.extensions=et(e.extensions)?[]:e.extensions,(e.extensionConfig=et(e.extensionConfig)?{}:e.extensionConfig).NotificationManager=n,r=r||ve.objCreate({throwInternal:function(e,t,n,r,i){void 0===i&&(i=!1)},warnToConsole:function(e){},resetInternalMessageCount:function(){}}),s.logger=r;var i=[];i.push.apply(i,t.concat(e.extensions)),i=Xe(i);var a=[],o={};if(Ze(i,function(e){if(et(e)||et(e.initialize))throw Error("Extensions must provide callback to initialize");var t=e.priority,n=e.identifier;e&&t&&(et(o[t])?o[t]=n:r.warnToConsole("Two extensions have same priority #"+t+" - "+o[t]+", "+n)),(!t||t<u.priority)&&a.push(e)}),i.push(u),a.push(u),i=Xe(i),s._extensions=i,We(new ke([u],e,s),i),We(new ke(a,e,s),i),s._extensions=a,0===s.getTransmissionControls().length)throw Error("No channels available");l=!0,s.releaseQueue()},s.getTransmissionControls=function(){return u.getChannelControls()},s.track=function(e){e.iKey||(e.iKey=s.config.instrumentationKey),e.time||(e.time=ve.toISOString(new Date)),et(e.ver)&&(e.ver="4.0"),s.isInitialized()?s.getProcessTelContext().processNext(e):t.push(e)},s.getProcessTelContext=function(){var e=s._extensions,t=e;return e&&0!==e.length||(t=[u]),new ke(t,s.config,s)},s.getNotifyMgr=function(){return c||(c=ve.objCreate({addNotificationListener:function(e){},removeNotificationListener:function(e){},eventsSent:function(e){},eventsDiscarded:function(e,t){},eventsSendRequest:function(e,t){}}),s[tt]=c),c},s.getPerfMgr=function(){return n||s.config&&s.config.enablePerfMgr&&(n=new ie(s.getNotifyMgr())),n},s.setPerfMgr=function(e){n=e},s.eventCnt=function(){return t.length},s.releaseQueue=function(){0<t.length&&(Ze(t,function(e){s.getProcessTelContext().processNext(e)}),t=[])}})};__extends(function dr(){var e=rt.call(this)||this;return ee(dr,e,function(r,i){function t(e){var t=r.getNotifyMgr();t&&t.eventsDiscarded([e],h)}r.initialize=function(e,t,n,r){i.initialize(e,t,n||new De(e),r||new nt(e))},r.track=function(e){_e(r.getPerfMgr(),function(){return"AppInsightsCore:track"},function(){if(null===e)throw t(e),Error("Invalid telemetry item");!function(e){if(ve.isNullOrUndefined(e.name))throw t(e),Error("telemetry name required")}(e),i.track(e)},function(){return{item:e}},!e.sync)},r.addNotificationListener=function(e){var t=r.getNotifyMgr();t&&t.addNotificationListener(e)},r.removeNotificationListener=function(e){var t=r.getNotifyMgr();t&&t.removeNotificationListener(e)},r.pollInternalLogs=function(n){var e=r.config.diagnosticLogInterval;return e&&0<e||(e=1e4),setInterval(function(){var e=r.logger?r.logger.queue:[];ve.arrForEach(e,function(e){var t={name:n||"InternalMessageId: "+e.messageId,iKey:r.config.instrumentationKey,time:ve.toISOString(new Date),baseType:Me.dataType,baseData:{message:e.message}};r.track(t)}),e.length=0},e)}}),e},rt);var it="_aiHooks",at=["req","rsp","hkErr","fnErr"],ot="__proto__",st="constructor";function ut(e,t){if(e)for(var n=0;n<e.length&&!t(e[n],n);n++);}function ct(e,u,c,l,f){0<=f&&f<=2&&ut(e,function(e,t){var n=e.cbks,r=n[at[f]];if(r){u.ctx=function(){return l[t]=l[t]||{}};try{r.apply(u.inst,c)}catch(o){var i=u.err;try{var a=n[at[2]];a&&(u.err=o,a.apply(u.inst,c))}catch(s){}finally{u.err=i}}}})}var lt=Object.getPrototypeOf;function ft(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&&(ve.hasOwnProperty(e,t)?r=e:n&&(r=l(function(e){if(e){if(lt)return lt(e);var t=e[ot]||e[O]||e[st];if(t)return t}return null}(e),t,!1))),r}(e,t,r);if(i){var a=i[t];if(typeof a===v){var o,s=a[it];s||(c=s={i:0,n:t,f:a,h:[]},(o=function(){var n=arguments,e=c.h,r={name:c.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 ut(e,function(e){t.push(e)}),t}ct(e,r,i,t,0);var o=c.f;try{r.rslt=o.apply(this,n)}catch(s){throw r.err=s,ct(e,r,i,t,3),s}return ct(e,r,i,t,1),r.rslt})[it]=s,i[t]=o);var u={id:s.i,cbks:n,rm:function(){var n=this.id;ut(s.h,function(e,t){return e.id===n&&(s.h.splice(t,1),1)})}};return s.i++,s.h.push(u),u}}}var c;return null}var dt=(pt.requestContextHeader="Request-Context",pt.requestContextTargetKey="appId",pt.requestContextAppIdFormat="appId=cid-v1:",pt.requestIdHeader="Request-Id",pt.traceParentHeader="traceparent",pt.sdkContextHeader="Sdk-Context",pt.sdkContextHeaderAppIdRequest="appId",pt.requestContextHeaderLowerCase="request-context",pt);function pt(){}var gt=(ht.sanitizeKeyAndAddUniqueness=function(e,t,n){var r=t.length,i=ht.sanitizeKey(e,t);if(i.length!==r){for(var a=0,o=i;n[o]!==undefined;)a++,o=i.substring(0,ht.MAX_NAME_LENGTH-3)+ht.padNumber(a);i=o}return i},ht.sanitizeKey=function(e,t){var n;return t&&(t=ht.trim(t.toString())).length>ht.MAX_NAME_LENGTH&&(n=t.substring(0,ht.MAX_NAME_LENGTH),e.throwInternal(Ie.WARNING,be.NameTooLong,"name is too long. It has been truncated to "+ht.MAX_NAME_LENGTH+" characters.",{name:t},!0)),n||t},ht.sanitizeString=function(e,t,n){var r;return void 0===n&&(n=ht.MAX_STRING_LENGTH),t&&(n=n||ht.MAX_STRING_LENGTH,(t=ht.trim(t)).toString().length>n&&(r=t.toString().substring(0,n),e.throwInternal(Ie.WARNING,be.StringValueTooLong,"string value is too long. It has been truncated to "+n+" characters.",{value:t},!0))),r||t},ht.sanitizeUrl=function(e,t){return ht.sanitizeInput(e,t,ht.MAX_URL_LENGTH,be.UrlTooLong)},ht.sanitizeMessage=function(e,t){var n;return t&&t.length>ht.MAX_MESSAGE_LENGTH&&(n=t.substring(0,ht.MAX_MESSAGE_LENGTH),e.throwInternal(Ie.WARNING,be.MessageTruncated,"message is too long, it has been truncated to "+ht.MAX_MESSAGE_LENGTH+" characters.",{message:t},!0)),n||t},ht.sanitizeException=function(e,t){var n;return t&&t.length>ht.MAX_EXCEPTION_LENGTH&&(n=t.substring(0,ht.MAX_EXCEPTION_LENGTH),e.throwInternal(Ie.WARNING,be.ExceptionTruncated,"exception is too long, it has been truncated to "+ht.MAX_EXCEPTION_LENGTH+" characters.",{exception:t},!0)),n||t},ht.sanitizeProperties=function(e,t){if(t){var n={};for(var r in t){var i=t[r];if(ve.isObject(i)&&A())try{i=M().stringify(i)}catch(a){e.throwInternal(Ie.WARNING,be.CannotSerializeObjectNonSerializable,"custom property is not valid",{exception:a},!0)}i=ht.sanitizeString(e,i,ht.MAX_PROPERTY_LENGTH),n[r=ht.sanitizeKeyAndAddUniqueness(e,r,n)]=i}t=n}return t},ht.sanitizeMeasurements=function(e,t){if(t){var n={};for(var r in t){var i=t[r];n[r=ht.sanitizeKeyAndAddUniqueness(e,r,n)]=i}t=n}return t},ht.sanitizeId=function(e,t){return t?ht.sanitizeInput(e,t,ht.MAX_ID_LENGTH,be.IdTooLong).toString():t},ht.sanitizeInput=function(e,t,n,r){var i;return t&&(t=ht.trim(t)).length>n&&(i=t.substring(0,n),e.throwInternal(Ie.WARNING,r,"input is too long, it has been truncated to "+n+" characters.",{data:t},!0)),i||t},ht.padNumber=function(e){var t="00"+e;return t.substr(t.length-3)},ht.trim=function(e){return ve.isString(e)?e.replace(/^\s+|\s+$/g,""):e},ht.MAX_NAME_LENGTH=150,ht.MAX_ID_LENGTH=128,ht.MAX_PROPERTY_LENGTH=8192,ht.MAX_STRING_LENGTH=1024,ht.MAX_URL_LENGTH=2048,ht.MAX_MESSAGE_LENGTH=32768,ht.MAX_EXCEPTION_LENGTH=32768,ht);function ht(){}var mt=b(),vt=ve.isString,xt=null,yt=(St.createDomEvent=function(e){var t,n=null;return ve.isFunction(Event)?n=new Event(e):(t=_())&&t.createEvent&&(n=t.createEvent("Event")).initEvent(e,!0,!0),n},St.disableStorage=function(){St._canUseLocalStorage=!1,St._canUseSessionStorage=!1},St._getLocalStorageObject=function(){return St.canUseLocalStorage()?St._getVerifiedStorageObject(u.LocalStorage):null},St._getVerifiedStorageObject=function(e){var t,n,r=null;try{if(ve.isNullOrUndefined(P()))return null;n=new Date,(r=I(e===u.LocalStorage?"localStorage":"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},St.isInternalApplicationInsightsEndpoint=function(e){return!!~St._internalEndpoints.indexOf(e.toLowerCase())},St.canUseLocalStorage=function(){return St._canUseLocalStorage===undefined&&(St._canUseLocalStorage=!!St._getVerifiedStorageObject(u.LocalStorage)),St._canUseLocalStorage},St.getStorage=function(e,t){var n=St._getLocalStorageObject();if(null!==n)try{return n.getItem(t)}catch(r){St._canUseLocalStorage=!1,e.throwInternal(Ie.WARNING,be.BrowserCannotReadLocalStorage,"Browser failed read of local storage. "+St.getExceptionName(r),{exception:St.dump(r)})}return null},St.setStorage=function(e,t,n){var r=St._getLocalStorageObject();if(null!==r)try{return r.setItem(t,n),!0}catch(i){St._canUseLocalStorage=!1,e.throwInternal(Ie.WARNING,be.BrowserCannotWriteLocalStorage,"Browser failed write to local storage. "+St.getExceptionName(i),{exception:St.dump(i)})}return!1},St.removeStorage=function(e,t){var n=St._getLocalStorageObject();if(null!==n)try{return n.removeItem(t),!0}catch(r){St._canUseLocalStorage=!1,e.throwInternal(Ie.WARNING,be.BrowserFailedRemovalFromLocalStorage,"Browser failed removal of local storage item. "+St.getExceptionName(r),{exception:St.dump(r)})}return!1},St._getSessionStorageObject=function(){return St.canUseSessionStorage()?St._getVerifiedStorageObject(u.SessionStorage):null},St.canUseSessionStorage=function(){return St._canUseSessionStorage===undefined&&(St._canUseSessionStorage=!!St._getVerifiedStorageObject(u.SessionStorage)),St._canUseSessionStorage},St.getSessionStorageKeys=function(){var e=[];if(St.canUseSessionStorage())for(var t in I("sessionStorage"))e.push(t);return e},St.getSessionStorage=function(e,t){var n=St._getSessionStorageObject();if(null!==n)try{return n.getItem(t)}catch(r){St._canUseSessionStorage=!1,e.throwInternal(Ie.WARNING,be.BrowserCannotReadSessionStorage,"Browser failed read of session storage. "+St.getExceptionName(r),{exception:St.dump(r)})}return null},St.setSessionStorage=function(e,t,n){var r=St._getSessionStorageObject();if(null!==r)try{return r.setItem(t,n),!0}catch(i){St._canUseSessionStorage=!1,e.throwInternal(Ie.WARNING,be.BrowserCannotWriteSessionStorage,"Browser failed write to session storage. "+St.getExceptionName(i),{exception:St.dump(i)})}return!1},St.removeSessionStorage=function(e,t){var n=St._getSessionStorageObject();if(null!==n)try{return n.removeItem(t),!0}catch(r){St._canUseSessionStorage=!1,e.throwInternal(Ie.WARNING,be.BrowserFailedRemovalFromSessionStorage,"Browser failed removal of session storage item. "+St.getExceptionName(r),{exception:St.dump(r)})}return!1},St.disableCookies=function(){ve.disableCookies()},St.canUseCookies=function(e){if(ve._canUseCookies===undefined){ve._canUseCookies=!1;try{ve._canUseCookies=St.document.cookie!==undefined}catch(t){e.throwInternal(Ie.WARNING,be.CannotAccessCookie,"Cannot access document.cookie - "+St.getExceptionName(t),{exception:St.dump(t)})}}return ve._canUseCookies},St.disallowsSameSiteNone=function(e){return!(!vt(e)||!~e.indexOf("CPU iPhone OS 12")&&!~e.indexOf("iPad; CPU OS 12")&&!(~e.indexOf("Macintosh; Intel Mac OS X 10_14")&&~e.indexOf("Version/")&&~e.indexOf("Safari"))&&(!~e.indexOf("Macintosh; Intel Mac OS X 10_14")||(n=(t=e.length)-40,"AppleWebKit/605.1.15 (KHTML, like Gecko)"!=e.substring(0<=n?n:0,t)))&&!~e.indexOf("Chrome/5")&&!~e.indexOf("Chrome/6")&&(!~e.indexOf("UnrealEngine")||~e.indexOf("Chrome"))&&!~e.indexOf("UCBrowser/12")&&!~e.indexOf("UCBrowser/11"));var t,n},St.setCookie=function(e,t,n,r){var i,a,o;St.canUseCookies(e)&&(a=i="",r&&(i=";domain="+r),(o=j())&&"https:"===o.protocol&&(a=";secure",null===xt&&(xt=St.disallowsSameSiteNone((b()||{}).userAgent)),xt||(n+=";SameSite=None")),St.document.cookie=t+"="+n+i+";path=/"+a)},St.stringToBoolOrDefault=function(e,t){return void 0===t&&(t=!1),e===undefined||null===e?t:"true"==e.toString().toLowerCase()},St.getCookie=function(e,t){if(St.canUseCookies(e)){var n="";if(t&&t.length)for(var r=t+"=",i=St.document.cookie.split(";"),a=0;a<i.length;a++){var o=i[a];if((o=St.trim(o))&&!o.indexOf(r)){n=o.substring(r.length,i[a].length);break}}return n}},St.deleteCookie=function(e,t){St.canUseCookies(e)&&(St.document.cookie=t+"=;path=/;expires=Thu, 01 Jan 1970 00:00:01 GMT;")},St.newId=function(){for(var e="",t=1073741824*Math.random();0<t;)e+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[0|t%64],t=Math.floor(t/64);return e},St.random32=function(){return 4294967296*Math.random()|0},St.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=St.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)},St.getIEVersion=function(e){void 0===e&&(e=null);var t=e?e.toLowerCase():mt?(mt.userAgent||"").toLowerCase():"";if(~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},St.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},St.isCrossOriginError=function(e,t,n,r,i){return("Script error."===e||"Script error"===e)&&!i},St.dump=function(e){var t=Object[O].toString.call(e),n="";return"[object Error]"===t?n="{ stack: '"+e.stack+"', message: '"+e.message+"', name: '"+e.name+"'":A()&&(n=M().stringify(e)),t+n},St.getExceptionName=function(e){return"[object Error]"===Object[O].toString.call(e)?e.name:""},St.addEventHandler=function(e,t){return Se.Attach(N(),e,t)},St.IsBeaconApiSupported=function(){return"sendBeacon"in mt&&mt.sendBeacon},St.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},St.document=_()||{},St._canUseLocalStorage=undefined,St._canUseSessionStorage=undefined,St._internalEndpoints=["https://dc.services.visualstudio.com/v2/track","https://breeze.aimon.applicationinsights.io/v2/track","https://dc-int.services.visualstudio.com/v2/track"],St.NotSpecified="not_specified",St.trim=ve.strTrim,St.isArray=ve.isArray,St.isError=ve.isError,St.isDate=ve.isDate,St.toISOStringForIE8=ve.toISOString,St);function St(){}var Ct=(It.parseUrl=function(e){var t=It._htmlAnchorIdx,n=It._htmlAnchorElement,r=n[t];return It.document.createElement?n[t]||(r=n[t]=It.document.createElement("a")):r={host:It.parseHost(e,!0)},r.href=e,++t>=n.length&&(t=0),It._htmlAnchorIdx=t,r},It.getAbsoluteUrl=function(e){var t,n=It.parseUrl(e);return n&&(t=n.href),t},It.getPathName=function(e){var t,n=It.parseUrl(e);return n&&(t=n.pathname),t},It.getCompleteUrl=function(e,t){return e?e.toUpperCase()+" "+t:t},It.parseHost=function(e,t){var n=It.parseFullHost(e,t);if(n){var r=n.match(/(www[0-9]?\.)?(.[^/:]+)(\:[\d]+)?/i);if(null!=r&&3<r.length&&vt(r[2])&&0<r[2].length)return r[2]+(r[3]||"")}return n},It.parseFullHost=function(e,t){var n,r,i,a=null;return!e||null!=(n=e.match(/(\w*):\/\/(.[^/:]+)(\:[\d]+)?/i))&&2<n.length&&vt(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},It.document=_()||{},It._htmlAnchorIdx=0,It._htmlAnchorElement=[null,null,null,null,null],It);function It(){}var Tt=(Nt.canIncludeCorrelationHeader=function(e,t,n){if(!t||e&&e.disableCorrelationHeaders)return!1;if(e&&e.correlationHeaderExcludePatterns)for(var r=0;r<e.correlationHeaderExcludePatterns.length;r++)if(e.correlationHeaderExcludePatterns[r].test(t))return!1;var i=Ct.parseUrl(t).host.toLowerCase();if(i&&(~i.indexOf(":443")||~i.indexOf(":80"))&&(i=(Ct.parseFullHost(t,!0)||"").toLowerCase()),!(e&&e.enableCorsCorrelation||i===n))return!1;var a,o=e&&e.correlationHeaderDomains;if(o&&(ve.arrForEach(o,function(e){var t=RegExp(e.toLowerCase().replace(/\./g,".").replace(/\*/g,".*"));a=a||t.test(i)}),!a))return!1;var s=e&&e.correlationHeaderExcludedDomains;if(!s||0===s.length)return!0;for(r=0;r<s.length;r++)if(RegExp(s[r].toLowerCase().replace(/\./g,".").replace(/\*/g,".*")).test(i))return!1;return i&&0<i.length},Nt.getCorrelationContext=function(e){if(e){var t=Nt.getCorrelationContextValue(e,dt.requestContextTargetKey);if(t&&t!==Nt.correlationIdPrefix)return t}},Nt.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]}},Nt.correlationIdPrefix="cid-v1:",Nt);function Nt(){}var _t=(bt.ParseDependencyPath=function(e,t,n,r){var i,a,o,s=r,u=r,s=t&&0<t.length?(o=(i=Ct.parseUrl(t)).host,s||(null!=i.pathname?("/"!=(a=0===i.pathname.length?"/":i.pathname)[0]&&(a="/"+a),u=i.pathname,gt.sanitizeString(e,n?n+" "+a:a)):gt.sanitizeString(e,t))):o=r;return{target:o,name:s,data:u}},bt);function bt(){}var At=(Mt.Now=function(){var e=U();return e&&e.now&&e.timing?e.now()+e.timing.navigationStart:(new Date).getTime()},Mt.GetDuration=function(e,t){var n=null;return 0===e||0===t||ve.isNullOrUndefined(e)||ve.isNullOrUndefined(t)||(n=t-e),n},Mt);function Mt(){}var Et,Dt="Microsoft_ApplicationInsights_BypassAjaxInstrumentation",wt=(__extends(Lt,function(){}),Lt);function Lt(){return this}Et=function(){this.ver=1,this.sampleRate=100,this.tags={}},__extends(function(e,t,n){var r=Et.call(this)||this;return r.name=gt.sanitizeString(e,n)||yt.NotSpecified,r.data=t,r.time=ve.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},Et);var qt,Rt,kt=function(){},Ft=(qt=kt,__extends(Ht,qt),Ht);function Ht(){var e=qt.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}function Ot(e,t,n,r){var i=Rt.call(this)||this;return i.aiDataContract={ver:g.Required,name:g.Required,properties:g.Default,measurements:g.Default},i.name=gt.sanitizeString(e,t)||yt.NotSpecified,i.properties=gt.sanitizeProperties(e,n),i.measurements=gt.sanitizeMeasurements(e,r),i}Rt=Ft,__extends(Ot,Rt),Ot.envelopeType="Microsoft.ApplicationInsights.{0}.Event",Ot.dataType="EventData";var Pt,jt=(Pt=kt,__extends(Ut,Pt),Ut);function Ut(){var e=Pt.call(this)||this;return e.ver=2,e.exceptions=[],e.properties={},e.measurements={},e}var zt,Gt="error";function Bt(e,t,n,r,i,a){var o,s=zt.call(this)||this;return s.aiDataContract={ver:g.Required,exceptions:g.Required,severityLevel:g.Default,properties:g.Default,measurements:g.Default},"ver"in(o=t)&&"exceptions"in o&&"properties"in o?(s.exceptions=t.exceptions,s.properties=t.properties,s.measurements=t.measurements,t.severityLevel&&(s.severityLevel=t.severityLevel),t.id&&(s.id=t.id),t.problemGroup&&(s.problemGroup=t.problemGroup),s.ver=2,ve.isNullOrUndefined(t.isManual)||(s.isManual=t.isManual)):(s.exceptions=[new Xt(e,t)],s.properties=gt.sanitizeProperties(e,n)||{},s.measurements=gt.sanitizeMeasurements(e,r),i&&(s.severityLevel=i),a&&(s.id=a)),s}zt=jt,__extends(Bt,zt),Bt.CreateFromInterface=function(t,e,n,r){var i=e.exceptions&&ve.arrMap(e.exceptions,function(e){return Xt.CreateFromInterface(t,e)});return new Bt(t,__assign({},e,{exceptions:i}),n,r)},Bt.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&&ve.arrMap(t,function(e){return e.toInterface()})||undefined,severityLevel:i,properties:n,measurements:r,problemGroup:a,id:o,isManual:s}},Bt.CreateSimpleException=function(e,t,n,r,i,a){return{exceptions:[{hasFullStack:!0,message:e,stack:i,typeName:t}]}},Bt.envelopeType="Microsoft.ApplicationInsights.{0}.Exception",Bt.dataType="ExceptionData";var Wt,Xt=(Wt=function(){this.hasFullStack=!0,this.parsedStack=[]},__extends(Vt,Wt),Vt.prototype.toInterface=function(){var e=this.parsedStack instanceof Array&&ve.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}},Vt.CreateFromInterface=function(e,t){var n=t.parsedStack instanceof Array&&ve.arrMap(t.parsedStack,function(e){return $t.CreateFromInterface(e)})||t.parsedStack;return new Vt(e,__assign({},t,{parsedStack:n}))},Vt.parseStack=function(e){if(ve.isString(e)){for(var t=e.split("\n"),n=[],r=0,i=0,a=0;a<=t.length;a++){var o,s=t[a];$t.regex.test(s)&&(i+=(o=new $t(t[a],r++)).sizeInBytes,n.push(o))}if(32768<i)for(var u=0,c=n.length-1,l=0,f=u,d=c;u<c;){if(32768<(l+=n[u].sizeInBytes+n[c].sizeInBytes)){var p=d-f+1;n.splice(f,p);break}f=u,d=c,u++,c--}}return n},Vt);function Vt(e,t){var n,r,i=Wt.call(this)||this;return i.aiDataContract={id:g.Default,outerId:g.Default,typeName:g.Required,message:g.Required,hasFullStack:g.Default,stack:g.Default,parsedStack:g.Array},"hasFullStack"in t&&"typeName"in t?(i.typeName=t.typeName,i.message=t.message,i.stack=t.stack,i.parsedStack=t.parsedStack,i.hasFullStack=t.hasFullStack):(n=t,yt.isError(n)||(n=n[Gt]||n.evt||n),i.typeName=gt.sanitizeString(e,function(e){var t="";if(e&&!(t=e.typeName||e.name||""))try{var n=/function (.{1,})\(/.exec(e.constructor.toString()),t=n&&1<n.length?n[1]:""}catch(r){}return t}(n))||yt.NotSpecified,i.message=gt.sanitizeMessage(e,t.message)||yt.NotSpecified,r=t.stack,i.parsedStack=Vt.parseStack(r),i.stack=gt.sanitizeException(e,r),i.hasFullStack=yt.isArray(i.parsedStack)&&0<i.parsedStack.length),i}var Kt,$t=(Kt=function(){},__extends(Jt,Kt),Jt.CreateFromInterface=function(e){return new Jt(e,null)},Jt.prototype.toInterface=function(){return{level:this.level,method:this.method,assembly:this.assembly,fileName:this.fileName,line:this.line}},Jt.regex=/^([\s]+at)?(.*?)(\@|\s\(|\s)([^\(\@\n]+):([0-9]+):([0-9]+)(\)?)$/,Jt.baseSize=58,Jt);function Jt(e,t){var n,r,i=Kt.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=yt.trim(n),i.fileName="",i.line=0,(r=n.match(Jt.regex))&&5<=r.length&&(i.method=yt.trim(r[2])||i.method,i.fileName=yt.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+=Jt.baseSize,i.sizeInBytes+=i.level.toString().length,i.sizeInBytes+=i.line.toString().length,i}var Qt,Yt,Zt,en=(Qt=kt,__extends(tn,Qt),tn);function tn(){var e=Qt.call(this)||this;return e.ver=2,e.metrics=[],e.properties={},e.measurements={},e}(Zt=Yt={})[Zt.Measurement=0]="Measurement",Zt[Zt.Aggregation=1]="Aggregation";var nn,rn,an=(nn=function(){this.kind=Yt.Measurement},__extends(on,nn),on);function on(){var e=nn.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}function sn(e,t,n,r,i,a,o,s){var u=rn.call(this)||this;u.aiDataContract={ver:g.Required,metrics:g.Required,properties:g.Default};var c=new an;return c.count=0<r?r:undefined,c.max=isNaN(a)||null===a?undefined:a,c.min=isNaN(i)||null===i?undefined:i,c.name=gt.sanitizeString(e,t)||yt.NotSpecified,c.value=n,u.metrics=[c],u.properties=gt.sanitizeProperties(e,o),u.measurements=gt.sanitizeMeasurements(e,s),u}rn=en,__extends(sn,rn),sn.envelopeType="Microsoft.ApplicationInsights.{0}.Metric",sn.dataType="MetricData";var un,cn,ln=(un=Ft,__extends(fn,un),fn);function fn(){var e=un.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}function dn(e,t,n,r,i,a,o){var s=cn.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=gt.sanitizeId(e,o),s.url=gt.sanitizeUrl(e,n),s.name=gt.sanitizeString(e,t)||yt.NotSpecified,isNaN(r)||(s.duration=yt.msToTimeSpan(r)),s.properties=gt.sanitizeProperties(e,i),s.measurements=gt.sanitizeMeasurements(e,a),s}cn=ln,__extends(dn,cn),dn.envelopeType="Microsoft.ApplicationInsights.{0}.Pageview",dn.dataType="PageviewData";var pn,gn=(pn=kt,__extends(hn,pn),hn);function hn(){var e=pn.call(this)||this;return e.ver=2,e.success=!0,e.properties={},e.measurements={},e}var mn,vn=(mn=gn,__extends(xn,mn),xn.envelopeType="Microsoft.ApplicationInsights.{0}.RemoteDependency",xn.dataType="RemoteDependencyData",xn);function xn(e,t,n,r,i,a,o,s,u,c,l,f){void 0===u&&(u="Ajax");var d=mn.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=yt.msToTimeSpan(i),d.success=a,d.resultCode=o+"",d.type=gt.sanitizeString(e,u);var p=_t.ParseDependencyPath(e,n,s,r);return d.data=gt.sanitizeUrl(e,r)||p.data,d.target=gt.sanitizeString(e,p.target),c&&(d.target=d.target+" | "+c),d.name=gt.sanitizeString(e,p.name),d.properties=gt.sanitizeProperties(e,l),d.measurements=gt.sanitizeMeasurements(e,f),d}var yn,Sn,Cn=(yn=kt,__extends(In,yn),In);function In(){var e=yn.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}function Tn(e,t,n,r,i){var a=Sn.call(this)||this;return a.aiDataContract={ver:g.Required,message:g.Required,severityLevel:g.Default,properties:g.Default},t=t||yt.NotSpecified,a.message=gt.sanitizeMessage(e,t),a.properties=gt.sanitizeProperties(e,r),a.measurements=gt.sanitizeMeasurements(e,i),n&&(a.severityLevel=n),a}Sn=Cn,__extends(Tn,Sn),Tn.envelopeType="Microsoft.ApplicationInsights.{0}.Message",Tn.dataType="MessageData";var Nn,_n,bn,An,Mn=(Nn=ln,__extends(En,Nn),En);function En(){var e=Nn.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}function Dn(e,t,n,r,i,a,o){var s=_n.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=gt.sanitizeUrl(e,n),s.name=gt.sanitizeString(e,t)||yt.NotSpecified,s.properties=gt.sanitizeProperties(e,i),s.measurements=gt.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}_n=Mn,__extends(Dn,_n),Dn.envelopeType="Microsoft.ApplicationInsights.{0}.PageviewPerformance",Dn.dataType="PageviewPerformanceData",bn=wt,__extends(function(e,t){var n=bn.call(this)||this;return n.aiDataContract={baseType:g.Required,baseData:g.Required},n.baseType=e,n.baseData=t,n},bn),(An={})[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 wn=(Ln.create=function(e,t,n,r,i,a){if(n=gt.sanitizeString(r,n)||yt.NotSpecified,ve.isNullOrUndefined(e)||ve.isNullOrUndefined(t)||ve.isNullOrUndefined(n))throw Error("Input doesn't contain all required fields");var o={name:n,time:ve.toISOString(new Date),iKey:"",ext:a||{},tags:[],data:{},baseType:t,baseData:e};if(!ve.isNullOrUndefined(i))for(var s in i)i.hasOwnProperty(s)&&(o.data[s]=i[s]);return o},Ln);function Ln(){}var qn="AppInsightsPropertiesPlugin",Rn="properties",kn=ve.objKeys,Fn=ve.arrForEach;function Hn(e,t,n){var r=0,i=e[t],a=e[n];return i&&a&&(r=At.GetDuration(i,a)),r}function On(e,t,n,r,i){var a=0,o=Hn(n,r,i);return o&&(a=Pn(e,t,yt.msToTimeSpan(o))),a}function Pn(e,t,n){var r="ajaxPerf",i=0;return e&&t&&n&&((e[r]=e[r]||{})[t]=n,i=1),i}var jn=function(){var e=this;e.openDone=!1,e.setRequestHeaderDone=!1,e.sendDone=!1,e.abortDone=!1,e.stateChangeAttached=!1},Un=function pr(e,t,n){var r=this,i=n,A="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 jn,r.clientFailure=0,r.traceID=e,r.spanID=t,ee(pr,r,function(b){b.getAbsoluteUrl=function(){return b.requestUrl?Ct.getAbsoluteUrl(b.requestUrl):null},b.getPathName=function(){return b.requestUrl?gt.sanitizeUrl(i,Ct.getCompleteUrl(b.method,b.requestUrl)):null},b.CreateTrackItem=function(e,t,n){if(b.ajaxTotalDuration=Math.round(1e3*At.GetDuration(b.requestSentTime,b.responseFinishedTime))/1e3,b.ajaxTotalDuration<0)return null;var r,i,a,o,s,u,c,l,f=((o={id:"|"+b.traceID+"."+b.spanID,target:b.getAbsoluteUrl(),name:b.getPathName(),type:e,duration:b.ajaxTotalDuration,success:200<=+b.status&&+b.status<400,responseCode:+b.status,method:b.method})[Rn]={HttpMethod:b.method},o),d=f,p=(s=b).perfTiming,g=d[Rn]||{},h=0,m=ve.isString,v="duration",x="startTime",y="connect"+"End",S="request"+"Start",C="response"+"End",I="transferSize",T="encodedBodySize",N="decodedBodySize",_="serverTiming";return p?(h|=On(g,"End",p,"redirectStart","End"),h|=On(g,"domainLookup",p,"domainLookupStart","domainLookupEnd"),h|=On(g,"connect",p,"connectStart",y),h|=On(g,"request",p,S,"requestEnd"),h|=On(g,"response",p,"responseStart",C),h|=On(g,"networkConnect",p,x,y),h|=On(g,"sentRequest",p,S,C),h|=Pn(g,v,u=p[v]||Hn(p,x,C)||0),h|=Pn(g,"perfTotal",u),(c=p[_])&&(l={},Fn(c,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=l[a]||{};Fn(kn(n),function(e){var t=n[e];("name"!==e&&m(t)||ve.isNumber(t))&&(o[e]&&(t=o[e]+";"+t),!t&&m(t)||(o[e]=t))}),l[a]=o}),h|=Pn(g,_,l)),h|=Pn(g,I,p[I]),h|=Pn(g,T,p[T]),h|=Pn(g,N,p[N])):s.perfMark&&(h|=Pn(g,"missing",s.perfAttempts)),h&&(d[Rn]=g),t&&0<kn(b.requestHeaders).length&&(f[Rn]=f[Rn]||{},f[Rn].requestHeaders=b.requestHeaders),!n||(r=n())&&((i=r.correlationContext)&&(f.correlationContext=i),r.headerMap&&0<kn(r.headerMap).length&&(f[Rn]=f[Rn]||{},f[Rn].responseHeaders=r.headerMap),400<=b.status&&(a=r.type,f[Rn]=f[Rn]||{},""!==a&&"text"!==a||(f[Rn][A]=r[A]?r.statusText+" - "+r[A]:r.statusText),"json"===a&&(f[Rn][A]=r.response?r.statusText+" - "+JSON.stringify(r.response):r.statusText))),f}})},zn=(Gn.isValidTraceId=function(e){return e.match(/^[0-9a-f]{32}$/)&&"00000000000000000000000000000000"!==e},Gn.isValidSpanId=function(e){return e.match(/^[0-9a-f]{16}$/)&&"0000000000000000"!==e},Gn.prototype.toString=function(){return this.version+"-"+this.traceId+"-"+this.spanId+"-"+this.traceFlag},Gn.DEFAULT_TRACE_FLAG="01",Gn.DEFAULT_VERSION="00",Gn);function Gn(e,t){var n=this;n.traceFlag=Gn.DEFAULT_TRACE_FLAG,n.version=Gn.DEFAULT_VERSION,e&&Gn.isValidTraceId(e)?n.traceId=e:n.traceId=yt.generateW3CId(),t&&Gn.isValidSpanId(t)?n.spanId=t:n.spanId=yt.generateW3CId().substr(0,16)}var Bn="ai.ajxmn.",Wn="diagLog",Xn="ajaxData",Vn="throwInternal",Kn="fetch",$n=ve.isNullOrUndefined,Jn=ve.arrForEach,Qn=ve.objKeys,Yn=0;function Zn(e){var t="";try{$n(e)||$n(e[Xn])||$n(e[Xn].requestUrl)||(t+="(url: '"+e[Xn].requestUrl+"')")}catch(n){}return t}function er(e,t,n,r,i){e[Wn]()[Vn](Ie.CRITICAL,t,n,r,i)}function tr(e,t,n,r,i){e[Wn]()[Vn](Ie.WARNING,t,n,r,i)}function nr(t,n,r){return function(e){er(t,n,r,{ajaxDiagnosticsMessage:Zn(e.inst),exception:yt.dump(e.err)})}}function rr(e,t){return e&&t?e.indexOf(t):-1}var ir,ar=(ir=Oe,__extends(or,ir),or.getDefaultConfig=function(){return{maxAjaxCallsPerView:500,disableAjaxTracking:!1,disableFetchTracking:!0,disableCorrelationHeaders:!1,distributedTracingMode:F.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}},or.getEmptyConfig=function(){var t=this.getDefaultConfig();return Jn(Qn(t),function(e){t[e]=undefined}),t},or.prototype.processTelemetry=function(e,t){this.processNext(e,t)},or.identifier="AjaxDependencyPlugin",or);function or(){var e=ir.call(this)||this;e.identifier=or.identifier,e.priority=120;var T,N,_,b,A,M,E="trackDependencyDataInternal",t=j(),D=!1,w=!1,u=t&&t.host&&t.host.toLowerCase(),L=or.getEmptyConfig(),q=!1,i=0,R=0,k=[],s={};return ee(or,e,function(g,h){function m(e,t,n){k.push(e?ft(e[O],t,n,!1):null)}function v(e,t,n){var r=!1,i=((ve.isString(t)?t:(t||{}).url||"")||"").toLowerCase(),a=rr(i,"?"),o=rr(i,"#");return(-1===a||-1!==o&&o<a)&&(a=o),-1!==a&&(i=i.substring(0,a)),$n(e)?$n(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 x(e,t){var n=!0,r=w;return $n(e)||(n=!0===t||!$n(e[Xn])),r&&n}function y(e,t){var n,r,i;t.requestUrl&&b&&A&&(n=U())&&ve.isFunction(n.mark)&&(r=b+e+"#"+ ++Yn,n.mark(r),(i=n.getEntriesByName(r))&&1===i.length&&(t.perfMark=i[0]))}function S(a,o,s,u){var c=o.perfMark,l=U(),f=L.maxAjaxPerfLookupAttempts,d=L.ajaxPerfLookupDelay,p=o.requestUrl,g=0;!function h(){try{if(l&&c){g++;for(var e=null,t=l.getEntries(),n=t.length-1;0<=n;n--){var r=t[n];if(r){if("resource"===r.entryType)r.initiatorType!==a||-1===rr(r.name,p)&&-1===rr(p,r.name)||(e=r);else if("mark"===r.entryType&&r.name===c.name){o.perfTiming=e;break}if(r.startTime<c.startTime-1e3)break}}}!c||o.perfTiming||f<=g||!1===o.async?(c&&ve.isFunction(l.clearMarks)&&l.clearMarks(c.name),o.perfAttempts=g,s()):setTimeout(h,d)}catch(i){u(i)}}()}function C(e){var t="";try{$n(e)||(t+="string"==typeof e?"(url: '"+e+"')":"(url: '"+e.url+"')")}catch(n){er(g,be.FailedMonitorAjaxOpen,"Failed to grab failed fetch diagnostics message",{exception:yt.dump(n)})}return t}function I(e,t,i,n,r){function a(e,t,n){var r=n||{};r.fetchDiagnosticsMessage=C(i),t&&(r.exception=yt.dump(t)),tr(g,e,"Failed to calculate the duration of the fetch call, monitoring data for this fetch call won't be sent.",r)}n&&(n.responseFinishedTime=At.Now(),n.status=t,S("fetch",n,function(){var e=n.CreateTrackItem("Fetch",q,r);e?g[E](e):a(be.FailedMonitorAjaxDur,null,{requestSentTime:n.requestSentTime,responseFinishedTime:n.responseFinishedTime})},function(e){a(be.FailedMonitorAjaxGetCorrelationHeader,e,null)}))}g.initialize=function(e,t,n,r){if(!g.isInitialized()){h.initialize(e,t,n,r);var i=g._getTelCtx(),a=or.getDefaultConfig();Jn(Qn(a),function(e){L[e]=i.getConfig(or.identifier,e,a[e])});var o,s=L.distributedTracingMode;if(q=L.enableRequestHeaderTracking,A=L.enableAjaxPerfTracking,R=L.maxAjaxCallsPerView,M=L.enableResponseHeaderTracking,_=s===F.AI||s===F.AI_AND_W3C,N=s===F.AI_AND_W3C||s===F.W3C,A&&(o=e.instrumentationKey||"unkwn",b=5<o.length?Bn+o.substring(o.length-5)+".":Bn+o+"."),!1===L.disableAjaxTracking&&(!function(e){var t,n=!1;typeof XMLHttpRequest===H||$n(XMLHttpRequest)||(t=XMLHttpRequest[O],n=!($n(t)||$n(t.open)||$n(t.send)||$n(t.abort)));var r=yt.getIEVersion();if(r&&r<9&&(n=!1),n)try{(new XMLHttpRequest)[Xn]={};var i=XMLHttpRequest[O].open;XMLHttpRequest[O].open=i}catch(a){n=!1,er(e,be.FailedMonitorAjaxOpen,"Failed to enable XMLHttpRequest monitoring, extension is not supported",{exception:yt.dump(a)})}return n}(g)||w||(m(XMLHttpRequest,"open",{req:function(e,t,n,r){var i,a,o,s,u,c,l,f,d=e.inst,p=d[Xn];v(d,n)||!x(d,!0)||p&&p.xhrMonitoringState.openDone||(i=d,a=t,o=n,s=r,u=T&&T.telemetryTrace&&T.telemetryTrace.traceID||yt.generateW3CId(),c=yt.generateW3CId().substr(0,16),(l=new Un(u,c,g[Wn]())).method=a,l.requestUrl=o,l.xhrMonitoringState.openDone=!0,l.requestHeaders={},l.async=s,i[Xn]=l,(f=i)[Xn].xhrMonitoringState.stateChangeAttached=Se.Attach(f,"readystatechange",function(){try{f&&4===f.readyState&&x(f)&&((i=(r=f)[Xn]).responseFinishedTime=At.Now(),i.status=r.status,S("xmlhttprequest",i,function(){try{var e=i.CreateTrackItem("Ajax",q,function(){var e,t,i,n={statusText:r.statusText,headerMap:null,correlationContext:function(e){try{var t=e.getAllResponseHeaders();if(null!==t&&-1!==rr(t.toLowerCase(),dt.requestContextHeaderLowerCase)){var n=e.getResponseHeader(dt.requestContextHeader);return Tt.getCorrelationContext(n)}}catch(r){tr(g,be.FailedMonitorAjaxGetCorrelationHeader,"Failed to get Request-Context correlation header as it may be not included in the response or not accessible.",{ajaxDiagnosticsMessage:Zn(e),exception:yt.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!M||(e=r.getAllResponseHeaders())&&(t=ve.strTrim(e).split(/[\r\n]+/),i={},Jn(t,function(e){var t=e.split(": "),n=t.shift(),r=t.join(": ");i[n]=r}),n.headerMap=i),n});e?g[E](e):n(null,{requestSentTime:i.requestSentTime,responseFinishedTime:i.responseFinishedTime})}finally{try{r[Xn]=null}catch(t){}}},function(e){n(e,null)}))}catch(t){var e=yt.dump(t);e&&-1!==rr(e.toLowerCase(),"c00c023f")||er(g,be.FailedMonitorAjaxRSC,"Failed to monitor XMLHttpRequest 'readystatechange' event handler, monitoring data for this ajax call may be incorrect.",{ajaxDiagnosticsMessage:Zn(f),exception:e})}function n(e,t){var n=t||{};n.ajaxDiagnosticsMessage=Zn(r),e&&(n.exception=yt.dump(e)),tr(g,be.FailedMonitorAjaxDur,"Failed to calculate the duration of the ajax call, monitoring data for this ajax call won't be sent.",n)}var r,i}))},hkErr:nr(g,be.FailedMonitorAjaxOpen,"Failed to monitor XMLHttpRequest.open, monitoring data for this ajax call may be incorrect.")}),m(XMLHttpRequest,"send",{req:function(e,t){var n=e.inst,r=n[Xn];x(n)&&!r.xhrMonitoringState.sendDone&&(y("xhr",r),r.requestSentTime=At.Now(),g.includeCorrelationHeaders(r,undefined,undefined,n),r.xhrMonitoringState.sendDone=!0)},hkErr:nr(g,be.FailedMonitorAjaxSend,"Failed to monitor XMLHttpRequest, monitoring data for this ajax call may be incorrect.")}),m(XMLHttpRequest,"abort",{req:function(e){var t=e.inst,n=t[Xn];x(t)&&!n.xhrMonitoringState.abortDone&&(n.aborted=1,n.xhrMonitoringState.abortDone=!0)},hkErr:nr(g,be.FailedMonitorAjaxAbort,"Failed to monitor XMLHttpRequest.abort, monitoring data for this ajax call may be incorrect.")}),q&&m(XMLHttpRequest,"setRequestHeader",{req:function(e,t,n){var r=e.inst;x(r)&&(r[Xn].requestHeaders[t]=n)},hkErr:nr(g,be.FailedMonitorAjaxSetRequestHeader,"Failed to monitor XMLHttpRequest.setRequestHeader, monitoring data for this ajax call may be incorrect.")}),w=!0)),(p=!(l=P())||$n(l.Request)||$n(l.Request[O])||$n(l[Kn])?null:l[Kn])&&(f=P(),d=p.polyfill,!1===L.disableFetchTracking?(k.push(ft(f,Kn,{req:function(e,t,n){var r,i,a;!D||v(null,t,n)||d&&w||(r=e.ctx(),i=function(e,t){var n=T&&T.telemetryTrace&&T.telemetryTrace.traceID||yt.generateW3CId(),r=yt.generateW3CId().substr(0,16),i=new Un(n,r,g[Wn]());i.requestSentTime=At.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={};return q&&new Headers((t?t.headers:0)||e instanceof Request&&e.headers||{}).forEach(function(e,t){o[t]=e}),i.requestHeaders=o,y("fetch",i),i}(t,n),(a=g.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 I(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(dt.requestContextHeader);return Tt.getCorrelationContext(t)}catch(n){tr(g,be.FailedMonitorAjaxGetCorrelationHeader,"Failed to get Request-Context correlation header as it may be not included in the response or not accessible.",{fetchDiagnosticsMessage:C(e),exception:yt.dump(n)})}}(t)};return M&&(n={},t.headers.forEach(function(e,t){n[t]=e}),e.headerMap=n),e}),t})["catch"](function(e){throw I(0,0,t,n,null,e.message),e}))},hkErr:nr(g,be.FailedMonitorAjaxOpen,"Failed to monitor Window.fetch, monitoring data for this fetch call may be incorrect.")})),D=!0):d&&k.push(ft(f,Kn,{req:function(e,t,n){v(null,t,n)}})),d&&(f[Kn].polyfill=d)),0<n.length&&n){for(var u=void 0,c=0;!u&&c<n.length;)n[c]&&n[c].identifier===qn&&(u=n[c]),c++;u&&(T=u.context)}}var l,f,d,p},g.teardown=function(){Jn(k,function(e){e.rm()}),w=D=!(k=[]),g.setInitialized(!1)},g.trackDependencyData=function(e,t){g[E](e,t)},g.includeCorrelationHeaders=function(e,t,n,r){var i,a,o,s=g._currentWindowHost||u;return t?(Tt.canIncludeCorrelationHeader(L,e.getAbsoluteUrl(),s)&&((n=n||{}).headers=new Headers(n.headers||t instanceof Request&&t.headers||{}),_&&(i="|"+e.traceID+"."+e.spanID,n.headers.set(dt.requestIdHeader,i),q&&(e.requestHeaders[dt.requestIdHeader]=i)),(a=L.appId||T&&T.appId())&&(n.headers.set(dt.requestContextHeader,dt.requestContextAppIdFormat+a),q&&(e.requestHeaders[dt.requestContextHeader]=dt.requestContextAppIdFormat+a)),N&&(o=new zn(e.traceID,e.spanID),n.headers.set(dt.traceParentHeader,o.toString()),q&&(e.requestHeaders[dt.traceParentHeader]=o.toString()))),n):r?(Tt.canIncludeCorrelationHeader(L,e.getAbsoluteUrl(),s)&&(_&&(i="|"+e.traceID+"."+e.spanID,r.setRequestHeader(dt.requestIdHeader,i),q&&(e.requestHeaders[dt.requestIdHeader]=i)),(a=L.appId||T&&T.appId())&&(r.setRequestHeader(dt.requestContextHeader,dt.requestContextAppIdFormat+a),q&&(e.requestHeaders[dt.requestContextHeader]=dt.requestContextAppIdFormat+a)),N&&(o=new zn(e.traceID,e.spanID),r.setRequestHeader(dt.traceParentHeader,o.toString()),q&&(e.requestHeaders[dt.traceParentHeader]=o.toString()))),r):undefined},g[E]=function(e,t,n){var r;-1===R||i<R?(L.distributedTracingMode!==F.W3C&&L.distributedTracingMode!==F.AI_AND_W3C||"string"!=typeof e.id||"."===e.id[e.id.length-1]||(e.id+="."),ve.isNullOrUndefined(e.startTime)&&(e.startTime=new Date),r=wn.create(e,vn.dataType,vn.envelopeType,g[Wn](),t,n),g.core.track(r)):i===R&&er(g,be.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=ar,e.ajaxRecord=Un,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})};"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e.Microsoft=e.Microsoft||{},e.Microsoft.ApplicationInsights=e.Microsoft.ApplicationInsights||{})); | ||
//# sourceMappingURL=applicationinsights-dependencies-js.min.js.map |
/*! | ||
* Application Insights JavaScript SDK - Dependencies Plugin, 2.5.6 | ||
* Application Insights JavaScript SDK - Dependencies Plugin, 2.5.7 | ||
* Copyright (c) Microsoft and contributors. All rights reserved. | ||
@@ -255,3 +255,3 @@ */ | ||
// Non-w3c format is |abc.def | ||
// @todo Remove if better solution is available, e.g. handle in portal | ||
// @todo Remove if better solution is available, e.g. handle in portal | ||
if ((_config.distributedTracingMode === DistributedTracingModes.W3C | ||
@@ -262,2 +262,5 @@ || _config.distributedTracingMode === DistributedTracingModes.AI_AND_W3C) | ||
} | ||
if (CoreUtils.isNullOrUndefined(dependency.startTime)) { | ||
dependency.startTime = new Date(); | ||
} | ||
var item = TelemetryItemCreator.create(dependency, RemoteDependencyData.dataType, RemoteDependencyData.envelopeType, _self[strDiagLog](), properties, systemProperties); | ||
@@ -632,3 +635,3 @@ _self.core.track(item); | ||
if (!perfMark || // - we don't have a perfMark or | ||
ajaxData.perfTiming || // - we have not found the perf entry or | ||
ajaxData.perfTiming || // - we have not found the perf entry or | ||
attempt >= maxAttempts || // - we have tried too many attempts or | ||
@@ -646,3 +649,3 @@ ajaxData.async === false) { | ||
// We need to wait for the browser to populate the window.performance entry | ||
// This needs to be at least 1ms as waiting <= 1 (on firefox) is not enough time for fetch or xhr, | ||
// This needs to be at least 1ms as waiting <= 1 (on firefox) is not enough time for fetch or xhr, | ||
// this is a scheduling issue for the browser implementation | ||
@@ -649,0 +652,0 @@ setTimeout(locateResourceTiming, retryDelay); |
/*! | ||
* Application Insights JavaScript SDK - Dependencies Plugin, 2.5.6 | ||
* Application Insights JavaScript SDK - Dependencies Plugin, 2.5.7 | ||
* Copyright (c) Microsoft and contributors. All rights reserved. | ||
@@ -4,0 +4,0 @@ */ |
/*! | ||
* Application Insights JavaScript SDK - Dependencies Plugin, 2.5.6 | ||
* Application Insights JavaScript SDK - Dependencies Plugin, 2.5.7 | ||
* Copyright (c) Microsoft and contributors. All rights reserved. | ||
@@ -4,0 +4,0 @@ */ |
/*! | ||
* Application Insights JavaScript SDK - Dependencies Plugin, 2.5.6 | ||
* Application Insights JavaScript SDK - Dependencies Plugin, 2.5.7 | ||
* Copyright (c) Microsoft and contributors. All rights reserved. | ||
@@ -4,0 +4,0 @@ */ |
/*! | ||
* Application Insights JavaScript SDK - Dependencies Plugin, 2.5.6 | ||
* Application Insights JavaScript SDK - Dependencies Plugin, 2.5.7 | ||
* Copyright (c) Microsoft and contributors. All rights reserved. | ||
@@ -4,0 +4,0 @@ */ |
/*! | ||
* Application Insights JavaScript SDK - Dependencies Plugin, 2.5.6 | ||
* Application Insights JavaScript SDK - Dependencies Plugin, 2.5.7 | ||
* Copyright (c) Microsoft and contributors. All rights reserved. | ||
*/ | ||
var e=this,t=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}var u,l,g,c,F,d,f=function(e,t){return(f=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)},p=n()||{};__assign=p.__assign=p.__assign||Object.assign||function(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},__extends=p.__extends=p.__extends||function(e,t){function n(){this.constructor=e}f(e,t),e[o]=null===t?r(t):(n[o]=t[o],new n)},(l=u={})[l.LocalStorage=0]="LocalStorage",l[l.SessionStorage=1]="SessionStorage",(c=g=g||{})[c.Default=0]="Default",c[c.Required=1]="Required",c[c.Array=2]="Array",c[c.Hidden=4]="Hidden",(d=F=F||{})[d.AI=0]="AI",d[d.AI_AND_W3C=1]="AI_AND_W3C",d[d.W3C=2]="W3C";var H=t,h=a,O=o,m=i,v="window",x="location",y="performance",S="JSON",U=n;function I(e){var t=U();return t&&t[e]?t[e]:e===v&&C()?window:null}function C(){return typeof window===h&&window}function T(){return C()?window:I(v)}function _(){return typeof document===h&&document?document:I("document")}function b(){return typeof navigator===h&&navigator?navigator:I("navigator")}function j(){return typeof location===h&&location?location:I(x)}function P(){return I(y)}function N(){return typeof JSON===h&&JSON||null!==I(S)}function A(){return N()?JSON||I(S):null}var M="attachEvent",D="addEventListener",E="detachEvent",w="removeEventListener";function L(e,t){return typeof e===t}function q(e){return L(e,t)||e===undefined}function R(e){return q(e)||null===e}function k(e,t){return e&&Object[o].hasOwnProperty.call(e,t)}function z(e){return L(e,a)}function G(e){return L(e,i)}function B(e,t,n,r){void 0===r&&(r=!1);var i=!1;if(!R(e))try{R(e[D])?R(e[M])||(e[M]("on"+t,n),i=!0):(e[D](t,n,r),i=!0)}catch(a){}return i}function W(e,t,n,r){if(void 0===r&&(r=!1),!R(e))try{R(e[w])?R(e[E])||e[E]("on"+t,n):e[w](t,n,r)}catch(i){}}var X=(V.isDate=function(e){return"[object Date]"===Object[o].toString.call(e)},V.isString=function(e){return L(e,"string")},V.isNumber=function(e){return L(e,"number")},V.isBoolean=function(e){return L(e,"boolean")},V.disableCookies=function(){V._canUseCookies=!1},V.newGuid=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace($,function(e){var t,n=0|((t=I("crypto"))?t.getRandomValues(new Uint8Array(1))[0]%16:16*Math.random());return("x"===e?n:3&n|8).toString(16)})},V.toISOString=function(e){if(V.isDate(e)){var t=function(e){var t=e+"";return 1===t.length&&(t="0"+t),t};return e.getUTCFullYear()+"-"+t(1+e.getUTCMonth())+"-"+t(e.getUTCDate())+"T"+t(e.getUTCHours())+":"+t(e.getUTCMinutes())+":"+t(e.getUTCSeconds())+"."+((e.getUTCMilliseconds()/1e3).toFixed(3)+"").slice(2,5)+"Z"}},V.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)},V.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},V.arrMap=function(e,t,n){for(var r=e.length,i=n||e,a=Array(r),o=0;o<r;o++)o in e&&(a[o]=t.call(i,e[o],e));return a},V.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},V.strTrim=function(e){return V.isString(e)?e.replace(/^\s+|\s+$/g,""):e},V.objKeys=function(e){var t=!{toString:null}.propertyIsEnumerable("toString");if(!(G(e)||z(e)&&null!==e))throw new TypeError("objKeys called on non-object");var n=[];for(var r in e)k(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++)k(e,i[o])&&n.push(i[o]);return n},V.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},V.addEventHandler=function(e,t){var n=!1,r=T();r&&(n=B(r,e,t),n=B(r.body,e,t)||n);var i=_();return i&&(n=J.Attach(i,e,t)||n),n},V.isTypeof=L,V.isUndefined=q,V.isNullOrUndefined=R,V.hasOwnProperty=k,V.isFunction=G,V.isObject=z,V.objCreate=r,V);function V(){}var K,Q,$=/[xy]/g,J=(Y.Attach=B,Y.AttachEvent=B,Y.Detach=W,Y.DetachEvent=W,Y);function Y(){}(Q=K=K||{})[Q.CRITICAL=1]="CRITICAL",Q[Q.WARNING=2]="WARNING";var Z={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},ee=(te.sanitizeDiagnosticText=function(e){return e?'"'+e.replace(/\"/g,"")+'"':""},te.dataType="MessageData",te.AiNonUserActionablePrefix="AI (Internal): ",te.AiUserActionablePrefix="AI: ",te);function te(e,t,n,r){void 0===n&&(n=!1),this.messageId=e,this.message=(n?te.AiUserActionablePrefix:te.AiNonUserActionablePrefix)+e;var i="";N()&&(i=A().stringify(r));var a=(t?" message:"+te.sanitizeDiagnosticText(t):"")+(r?" props:"+te.sanitizeDiagnosticText(i):"");this.message+=a}var ne=(re.prototype.throwInternal=function(e,t,n,r,i){void 0===i&&(i=!1);var a,o=new ee(t,n,i,r),s=this;if(s.enableDebugExceptions())throw o;!X.isUndefined(o)&&o&&(X.isUndefined(o.message)||(i?(a=+o.messageId,!s._messageLogged[a]&&s.consoleLoggingLevel()>=K.WARNING&&(s.warnToConsole(o.message),s._messageLogged[a]=!0)):s.consoleLoggingLevel()>=K.WARNING&&s.warnToConsole(o.message),s.logInternalMessage(e,o)))},re.prototype.warnToConsole=function(e){!X.isUndefined(console)&&console&&(X.isFunction(console.warn)?console.warn(e):X.isFunction(console.log)&&console.log(e))},re.prototype.resetInternalMessageCount=function(){this._messageCount=0,this._messageLogged={}},re.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 ee(Z.MessageLimitPerPVExceeded,i,!1),o.queue.push(a),o.warnToConsole(i))))},re.prototype._areInternalMessagesThrottled=function(){return this._messageCount>=this.maxInternalMessageLimit()},re);function re(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},X.isNullOrUndefined(e)||(X.isNullOrUndefined(e.loggingLevelConsole)||(this.consoleLoggingLevel=function(){return e.loggingLevelConsole}),X.isNullOrUndefined(e.loggingLevelTelemetry)||(this.telemetryLoggingLevel=function(){return e.loggingLevelTelemetry}),X.isNullOrUndefined(e.maxMessageLimit)||(this.maxInternalMessageLimit=function(){return e.maxMessageLimit}),X.isNullOrUndefined(e.enableDebugExceptions)||(this.enableDebugExceptions=function(){return e.enableDebugExceptions}))}var ie=X.isFunction,ae=function(i,a){var o=this,s=null,u=ie(i.processTelemetry),l=ie(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(K.CRITICAL,Z.PluginException,"Plugin ["+i.identifier+"] failed during processTelemetry - "+r),s&&!n&&s.processTelemetry(e,t)}}else s&&(o._hasRun=!0,s.processTelemetry(e,t))}},oe=X.isNullOrUndefined;function se(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&&X.isFunction(o.processTelemetry)&&(a=new ae(o,t),n.push(a),r&&r.setNext(a),r=a)}return 0<n.length?n[0]:null}var ue=function er(e,a,n,t){var r,i,o,s,u=this,l=null;null!==t&&(e&&X.isFunction(e.getPlugin)?l=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),se(r,t)}(e,u,t||e.getPlugin()):t?(r=u,o=e,s=!1,(i=t)&&e&&(o=[],X.arrForEach(e,function(e){!s&&e!==i||(s=!0,o.push(e))})),i&&!s&&(o=o||[]).push(i),l=se(o,r)):X.isUndefined(t)&&(l=se(e,u))),u.core=function(){return n},u.diagLog=function(){return(n||{}).logger||new ne(a||{})},u.getCfg=function(){return a},u.getExtCfg=function(e,t){var n,r;return void 0===t&&(t={}),!a||(r=a.extensionConfig)&&e&&(n=r[e]),n||t},u.getConfig=function(e,t,n){var r;void 0===n&&(n=!1);var i=u.getExtCfg(e,null);return i&&!oe(i[t])?r=i[t]:a&&!oe(a[t])&&(r=a[t]),oe(r)?n:r},u.hasNext=function(){return null!=l},u.getNext=function(){return l},u.setNext=function(e){l=e},u.processNext=function(e){var t=l;t&&(l=t.getNext(),t.processTelemetry(e,u))},u.createNew=function(e,t){return void 0===e&&(e=null),new er(e||l,a,n,t)}},le=X.isFunction,ce="getPlugin",de=(fe.prototype.initialize=function(e,t,n,r){this._baseTelInit(e,t,n,r)},fe);function fe(){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&&le(u.processTelemetry)&&u.processTelemetry(e,null)},a._getTelCtx=function(e){void 0===e&&(e=null);var t,n=e;return n||(t=s||new ue(null,{},a.core),n=u&&u[ce]?t.createNew(null,u[ce]):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[ce]&&(i=u[ce]()),a.core=t,s=new ue(r,e,t,i),o=!0}}var pe=X.isFunction,ge="processTelemetry",he="priority",me="setNextPlugin",ve="isInitialized";function xe(t,n){for(var e=[],r=null,i=t.getNext();i;){var a=i.getPlugin();a&&(r&&pe(r[me])&&pe(a[ge])&&r[me](a),pe(a[ve])&&a[ve]()||e.push(a),r=a,i=i.getNext())}X.arrForEach(e,function(e){e.initialize(t.getCfg(),t.core(),n,t.getNext())})}function ye(e){return e.sort(function(e,t){var n=0,r=pe(t[ge]);return pe(e[ge])?n=r?e[he]-t[he]:1:r&&(n=-1),n})}var Se=X.arrForEach,Ie=X.objDefineAccessors;function Ce(e,t){t&&0<t.length&&(t=t.sort(function(e,t){return e.priority-t.priority}),Se(t,function(e){if(e.priority<500)throw Error("Channel has invalid priority"+e.identifier)}),e.push(t))}var Te,_e=(Te=de,__extends(be,Te),be.prototype.processTelemetry=function(t,n){var r=this;this._channelQueue&&Se(this._channelQueue,function(e){0<e.length&&r._getTelCtx(n).createNew(e).processNext(t)})},be.prototype.getChannelControls=function(){return this._channelQueue},be.prototype.initialize=function(t,n,r){var e,i,a,o,s;this.isInitialized()||(Te.prototype.initialize.call(this,t,n,r),t.isCookieUseDisabled&&X.disableCookies(),e=this._channelQueue=(a=r,s=[],(i=(t||{}).channels)&&Se(i,function(e){return Ce(s,e)}),a&&(o=[],Se(a,function(e){500<e.priority&&o.push(e)}),Ce(s,o)),s),Se(e,function(e){return xe(new ue(e,t,n),r)}))},be._staticInit=(Ie(be.prototype,"ChannelControls",be.prototype.getChannelControls),void Ie(be.prototype,"channelQueue",be.prototype.getChannelControls)),be);function be(){var e=null!==Te&&Te.apply(this,arguments)||this;return e.identifier="ChannelControllerPlugin",e.priority=500,e}var Ne=X.arrForEach,Ae=X.isNullOrUndefined,Me=(De.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||Ae(e.instrumentationKey))throw Error("Please provide instrumentation key");i.config=e;var a=i._channelController;n=n||X.objCreate({addNotificationListener:function(e){},removeNotificationListener:function(e){},eventsSent:function(e){},eventsDiscarded:function(e,t){},eventsSendRequest:function(e,t){}}),i._notificationManager=n,e.extensions=Ae(e.extensions)?[]:e.extensions,(e.extensionConfig=Ae(e.extensionConfig)?{}:e.extensionConfig).NotificationManager=n,r=r||X.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=ye(o);var s=[],u={};if(Ne(o,function(e){if(Ae(e)||Ae(e.initialize))throw Error("Extensions must provide callback to initialize");var t=e.priority,n=e.identifier;e&&t&&(Ae(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=ye(o),i._extensions=o,xe(new ue([a],e,i),o),xe(new ue(s,e,i),o),i._extensions=s,0===i.getTransmissionControls().length)throw Error("No channels available");i._setInit(!0),i.releaseQueue()},De.prototype.getTransmissionControls=function(){return this._channelController.getChannelControls()},De.prototype.track=function(e){e.iKey||(e.iKey=this.config.instrumentationKey),e.time||(e.time=X.toISOString(new Date)),Ae(e.ver)&&(e.ver="4.0"),this.isInitialized()?this.getProcessTelContext().processNext(e):this._eventQueue.push(e)},De.prototype.getProcessTelContext=function(){var e=this._extensions,t=e;return e&&0!==e.length||(t=[this._channelController]),new ue(t,this.config,this)},De.prototype.releaseQueue=function(){var t=this;0<t._eventQueue.length&&(Ne(t._eventQueue,function(e){t.getProcessTelContext().processNext(e)}),t._eventQueue=[])},De);function De(){var t=!1,e=this;e._extensions=[],e._channelController=new _e,e.isInitialized=function(){return t},e._setInit=function(e){t=e},e._eventQueue=[]}var Ee,we=(Le.prototype.addNotificationListener=function(e){this.listeners.push(e)},Le.prototype.removeNotificationListener=function(e){for(var t=X.arrIndexOf(this.listeners,e);-1<t;)this.listeners.splice(t,1),t=X.arrIndexOf(this.listeners,e)},Le.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)},Le.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)},Le.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)},Le);function Le(){this.listeners=[]}function qe(){return Ee.call(this)||this}Ee=Me,__extends(qe,Ee),qe.prototype.initialize=function(e,t){var n=this;n._notificationManager=new we,n.logger=new ne(e),n.config=e,Ee.prototype.initialize.call(this,e,t,n.logger,n._notificationManager)},qe.prototype.getTransmissionControls=function(){return Ee.prototype.getTransmissionControls.call(this)},qe.prototype.track=function(e){if(null===e)throw this._notifyInvalidEvent(e),Error("Invalid telemetry item");this._validateTelemetryItem(e),Ee.prototype.track.call(this,e)},qe.prototype.addNotificationListener=function(e){this._notificationManager&&this._notificationManager.addNotificationListener(e)},qe.prototype.removeNotificationListener=function(e){this._notificationManager&&this._notificationManager.removeNotificationListener(e)},qe.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:[];X.arrForEach(e,function(e){var t={name:r||"InternalMessageId: "+e.messageId,iKey:n.config.instrumentationKey,time:X.toISOString(new Date),baseType:ee.dataType,baseData:{message:e.message}};n.track(t)}),e.length=0},e)},qe.prototype._validateTelemetryItem=function(e){if(X.isNullOrUndefined(e.name))throw this._notifyInvalidEvent(e),Error("telemetry name required")},qe.prototype._notifyInvalidEvent=function(e){this._notificationManager&&this._notificationManager.eventsDiscarded([e],2)};var Re="_aiHooks",ke=["req","rsp","hkErr","fnErr"];function Fe(e,t){if(e)for(var n=0;n<e.length&&!t(e[n],n);n++);}function He(e,u,l,c,d){0<=d&&d<=2&&Fe(e,function(e,t){var n=e.cbks,r=n[ke[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[ke[2]];a&&(u.err=o,a.apply(u.inst,l))}catch(s){}finally{u.err=i}}}})}function Oe(e,t,n,r){if(void 0===r&&(r=!0),e&&t&&n){var i=function c(e,t,n){var r=null;return e&&(X.hasOwnProperty(e,t)?r=e:n&&(r=c(e[O],t,!1))),r}(e,t,r),a=i[t];if(typeof a===m){var o,s=a[Re];s||(l=s={i:0,n:t,f:a,h:[]},(o=function(){var n=arguments,e=l.h,r={name:l.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 Fe(e,function(e){t.push(e)}),t}He(e,r,i,t,0);var o=l.f;try{r.rslt=o.apply(this,n)}catch(s){throw r.err=s,He(e,r,i,t,3),s}return He(e,r,i,t,1),r.rslt})[Re]=s,i[t]=o);var u={id:s.i,cbks:n,rm:function(){var n=this.id;Fe(s.h,function(e,t){return e.id===n&&(s.h.splice(t,1),1)})}};return s.i++,s.h.push(u),u}}var l;return null}var Ue=(je.requestContextHeader="Request-Context",je.requestContextTargetKey="appId",je.requestContextAppIdFormat="appId=cid-v1:",je.requestIdHeader="Request-Id",je.traceParentHeader="traceparent",je.sdkContextHeader="Sdk-Context",je.sdkContextHeaderAppIdRequest="appId",je.requestContextHeaderLowerCase="request-context",je);function je(){}var Pe=(ze.sanitizeKeyAndAddUniqueness=function(e,t,n){var r=t.length,i=ze.sanitizeKey(e,t);if(i.length!==r){for(var a=0,o=i;n[o]!==undefined;)a++,o=i.substring(0,ze.MAX_NAME_LENGTH-3)+ze.padNumber(a);i=o}return i},ze.sanitizeKey=function(e,t){var n;return t&&(t=ze.trim(t.toString())).length>ze.MAX_NAME_LENGTH&&(n=t.substring(0,ze.MAX_NAME_LENGTH),e.throwInternal(K.WARNING,Z.NameTooLong,"name is too long. It has been truncated to "+ze.MAX_NAME_LENGTH+" characters.",{name:t},!0)),n||t},ze.sanitizeString=function(e,t,n){var r;return void 0===n&&(n=ze.MAX_STRING_LENGTH),t&&(n=n||ze.MAX_STRING_LENGTH,(t=ze.trim(t)).toString().length>n&&(r=t.toString().substring(0,n),e.throwInternal(K.WARNING,Z.StringValueTooLong,"string value is too long. It has been truncated to "+n+" characters.",{value:t},!0))),r||t},ze.sanitizeUrl=function(e,t){return ze.sanitizeInput(e,t,ze.MAX_URL_LENGTH,Z.UrlTooLong)},ze.sanitizeMessage=function(e,t){var n;return t&&t.length>ze.MAX_MESSAGE_LENGTH&&(n=t.substring(0,ze.MAX_MESSAGE_LENGTH),e.throwInternal(K.WARNING,Z.MessageTruncated,"message is too long, it has been truncated to "+ze.MAX_MESSAGE_LENGTH+" characters.",{message:t},!0)),n||t},ze.sanitizeException=function(e,t){var n;return t&&t.length>ze.MAX_EXCEPTION_LENGTH&&(n=t.substring(0,ze.MAX_EXCEPTION_LENGTH),e.throwInternal(K.WARNING,Z.ExceptionTruncated,"exception is too long, it has been truncated to "+ze.MAX_EXCEPTION_LENGTH+" characters.",{exception:t},!0)),n||t},ze.sanitizeProperties=function(e,t){if(t){var n={};for(var r in t){var i=t[r];if(X.isObject(i)&&N())try{i=A().stringify(i)}catch(a){e.throwInternal(K.WARNING,Z.CannotSerializeObjectNonSerializable,"custom property is not valid",{exception:a},!0)}i=ze.sanitizeString(e,i,ze.MAX_PROPERTY_LENGTH),n[r=ze.sanitizeKeyAndAddUniqueness(e,r,n)]=i}t=n}return t},ze.sanitizeMeasurements=function(e,t){if(t){var n={};for(var r in t){var i=t[r];n[r=ze.sanitizeKeyAndAddUniqueness(e,r,n)]=i}t=n}return t},ze.sanitizeId=function(e,t){return t?ze.sanitizeInput(e,t,ze.MAX_ID_LENGTH,Z.IdTooLong).toString():t},ze.sanitizeInput=function(e,t,n,r){var i;return t&&(t=ze.trim(t)).length>n&&(i=t.substring(0,n),e.throwInternal(K.WARNING,r,"input is too long, it has been truncated to "+n+" characters.",{data:t},!0)),i||t},ze.padNumber=function(e){var t="00"+e;return t.substr(t.length-3)},ze.trim=function(e){return X.isString(e)?e.replace(/^\s+|\s+$/g,""):e},ze.MAX_NAME_LENGTH=150,ze.MAX_ID_LENGTH=128,ze.MAX_PROPERTY_LENGTH=8192,ze.MAX_STRING_LENGTH=1024,ze.MAX_URL_LENGTH=2048,ze.MAX_MESSAGE_LENGTH=32768,ze.MAX_EXCEPTION_LENGTH=32768,ze);function ze(){}var Ge=b(),Be=X.isString,We=null,Xe=(Ve.createDomEvent=function(e){var t,n=null;return X.isFunction(Event)?n=new Event(e):(t=_())&&t.createEvent&&(n=t.createEvent("Event")).initEvent(e,!0,!0),n},Ve.disableStorage=function(){Ve._canUseLocalStorage=!1,Ve._canUseSessionStorage=!1},Ve._getLocalStorageObject=function(){return Ve.canUseLocalStorage()?Ve._getVerifiedStorageObject(u.LocalStorage):null},Ve._getVerifiedStorageObject=function(e){var t,n,r=null;try{if(X.isNullOrUndefined(U()))return null;n=new Date,(r=I(e===u.LocalStorage?"localStorage":"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},Ve.isInternalApplicationInsightsEndpoint=function(e){return!!~Ve._internalEndpoints.indexOf(e.toLowerCase())},Ve.canUseLocalStorage=function(){return Ve._canUseLocalStorage===undefined&&(Ve._canUseLocalStorage=!!Ve._getVerifiedStorageObject(u.LocalStorage)),Ve._canUseLocalStorage},Ve.getStorage=function(e,t){var n=Ve._getLocalStorageObject();if(null!==n)try{return n.getItem(t)}catch(r){Ve._canUseLocalStorage=!1,e.throwInternal(K.WARNING,Z.BrowserCannotReadLocalStorage,"Browser failed read of local storage. "+Ve.getExceptionName(r),{exception:Ve.dump(r)})}return null},Ve.setStorage=function(e,t,n){var r=Ve._getLocalStorageObject();if(null!==r)try{return r.setItem(t,n),!0}catch(i){Ve._canUseLocalStorage=!1,e.throwInternal(K.WARNING,Z.BrowserCannotWriteLocalStorage,"Browser failed write to local storage. "+Ve.getExceptionName(i),{exception:Ve.dump(i)})}return!1},Ve.removeStorage=function(e,t){var n=Ve._getLocalStorageObject();if(null!==n)try{return n.removeItem(t),!0}catch(r){Ve._canUseLocalStorage=!1,e.throwInternal(K.WARNING,Z.BrowserFailedRemovalFromLocalStorage,"Browser failed removal of local storage item. "+Ve.getExceptionName(r),{exception:Ve.dump(r)})}return!1},Ve._getSessionStorageObject=function(){return Ve.canUseSessionStorage()?Ve._getVerifiedStorageObject(u.SessionStorage):null},Ve.canUseSessionStorage=function(){return Ve._canUseSessionStorage===undefined&&(Ve._canUseSessionStorage=!!Ve._getVerifiedStorageObject(u.SessionStorage)),Ve._canUseSessionStorage},Ve.getSessionStorageKeys=function(){var e=[];if(Ve.canUseSessionStorage())for(var t in I("sessionStorage"))e.push(t);return e},Ve.getSessionStorage=function(e,t){var n=Ve._getSessionStorageObject();if(null!==n)try{return n.getItem(t)}catch(r){Ve._canUseSessionStorage=!1,e.throwInternal(K.WARNING,Z.BrowserCannotReadSessionStorage,"Browser failed read of session storage. "+Ve.getExceptionName(r),{exception:Ve.dump(r)})}return null},Ve.setSessionStorage=function(e,t,n){var r=Ve._getSessionStorageObject();if(null!==r)try{return r.setItem(t,n),!0}catch(i){Ve._canUseSessionStorage=!1,e.throwInternal(K.WARNING,Z.BrowserCannotWriteSessionStorage,"Browser failed write to session storage. "+Ve.getExceptionName(i),{exception:Ve.dump(i)})}return!1},Ve.removeSessionStorage=function(e,t){var n=Ve._getSessionStorageObject();if(null!==n)try{return n.removeItem(t),!0}catch(r){Ve._canUseSessionStorage=!1,e.throwInternal(K.WARNING,Z.BrowserFailedRemovalFromSessionStorage,"Browser failed removal of session storage item. "+Ve.getExceptionName(r),{exception:Ve.dump(r)})}return!1},Ve.disableCookies=function(){X.disableCookies()},Ve.canUseCookies=function(e){if(X._canUseCookies===undefined){X._canUseCookies=!1;try{X._canUseCookies=Ve.document.cookie!==undefined}catch(t){e.throwInternal(K.WARNING,Z.CannotAccessCookie,"Cannot access document.cookie - "+Ve.getExceptionName(t),{exception:Ve.dump(t)})}}return X._canUseCookies},Ve.disallowsSameSiteNone=function(e){return!(!Be(e)||!~e.indexOf("CPU iPhone OS 12")&&!~e.indexOf("iPad; CPU OS 12")&&!(~e.indexOf("Macintosh; Intel Mac OS X 10_14")&&~e.indexOf("Version/")&&~e.indexOf("Safari"))&&(!~e.indexOf("Macintosh; Intel Mac OS X 10_14")||(n=(t=e.length)-40,"AppleWebKit/605.1.15 (KHTML, like Gecko)"!=e.substring(0<=n?n:0,t)))&&!~e.indexOf("Chrome/5")&&!~e.indexOf("Chrome/6")&&(!~e.indexOf("UnrealEngine")||~e.indexOf("Chrome"))&&!~e.indexOf("UCBrowser/12")&&!~e.indexOf("UCBrowser/11"));var t,n},Ve.setCookie=function(e,t,n,r){var i,a,o;Ve.canUseCookies(e)&&(a=i="",r&&(i=";domain="+r),(o=j())&&"https:"===o.protocol&&(a=";secure",null===We&&(We=Ve.disallowsSameSiteNone((b()||{}).userAgent)),We||(n+=";SameSite=None")),Ve.document.cookie=t+"="+n+i+";path=/"+a)},Ve.stringToBoolOrDefault=function(e,t){return void 0===t&&(t=!1),e===undefined||null===e?t:"true"==e.toString().toLowerCase()},Ve.getCookie=function(e,t){if(Ve.canUseCookies(e)){var n="";if(t&&t.length)for(var r=t+"=",i=Ve.document.cookie.split(";"),a=0;a<i.length;a++){var o=i[a];if((o=Ve.trim(o))&&!o.indexOf(r)){n=o.substring(r.length,i[a].length);break}}return n}},Ve.deleteCookie=function(e,t){Ve.canUseCookies(e)&&(Ve.document.cookie=t+"=;path=/;expires=Thu, 01 Jan 1970 00:00:01 GMT;")},Ve.newId=function(){for(var e="",t=1073741824*Math.random();0<t;)e+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[0|t%64],t=Math.floor(t/64);return e},Ve.random32=function(){return 4294967296*Math.random()|0},Ve.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=Ve.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)},Ve.isArray=function(e){return"[object Array]"===Object[O].toString.call(e)},Ve.isError=function(e){return"[object Error]"===Object[O].toString.call(e)},Ve.getIEVersion=function(e){void 0===e&&(e=null);var t=e?e.toLowerCase():Ge?(Ge.userAgent||"").toLowerCase():"";if(~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},Ve.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},Ve.isCrossOriginError=function(e,t,n,r,i){return("Script error."===e||"Script error"===e)&&!i},Ve.dump=function(e){var t=Object[O].toString.call(e),n="";return"[object Error]"===t?n="{ stack: '"+e.stack+"', message: '"+e.message+"', name: '"+e.name+"'":N()&&(n=A().stringify(e)),t+n},Ve.getExceptionName=function(e){return"[object Error]"===Object[O].toString.call(e)?e.name:""},Ve.addEventHandler=function(e,t){return J.Attach(T(),e,t)},Ve.IsBeaconApiSupported=function(){return"sendBeacon"in Ge&&Ge.sendBeacon},Ve.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},Ve.document=_()||{},Ve._canUseLocalStorage=undefined,Ve._canUseSessionStorage=undefined,Ve._internalEndpoints=["https://dc.services.visualstudio.com/v2/track","https://breeze.aimon.applicationinsights.io/v2/track","https://dc-int.services.visualstudio.com/v2/track"],Ve.NotSpecified="not_specified",Ve.trim=X.strTrim,Ve.isDate=X.isDate,Ve.toISOStringForIE8=X.toISOString,Ve);function Ve(){}var Ke=(Qe.parseUrl=function(e){var t=Qe._htmlAnchorIdx,n=Qe._htmlAnchorElement,r=n[t];return Qe.document.createElement?n[t]||(r=n[t]=Qe.document.createElement("a")):r={host:Qe.parseHost(e,!0)},r.href=e,++t>=n.length&&(t=0),Qe._htmlAnchorIdx=t,r},Qe.getAbsoluteUrl=function(e){var t,n=Qe.parseUrl(e);return n&&(t=n.href),t},Qe.getPathName=function(e){var t,n=Qe.parseUrl(e);return n&&(t=n.pathname),t},Qe.getCompleteUrl=function(e,t){return e?e.toUpperCase()+" "+t:t},Qe.parseHost=function(e,t){var n=Qe.parseFullHost(e,t);if(n){var r=n.match(/(www[0-9]?\.)?(.[^/:]+)(\:[\d]+)?/i);if(null!=r&&3<r.length&&Be(r[2])&&0<r[2].length)return r[2]+(r[3]||"")}return n},Qe.parseFullHost=function(e,t){var n,r,i,a=null;return!e||null!=(n=e.match(/(\w*):\/\/(.[^/:]+)(\:[\d]+)?/i))&&2<n.length&&Be(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},Qe.document=_()||{},Qe._htmlAnchorIdx=0,Qe._htmlAnchorElement=[null,null,null,null,null],Qe);function Qe(){}var $e=(Je.canIncludeCorrelationHeader=function(e,t,n){if(!t||e&&e.disableCorrelationHeaders)return!1;if(e&&e.correlationHeaderExcludePatterns)for(var r=0;r<e.correlationHeaderExcludePatterns.length;r++)if(e.correlationHeaderExcludePatterns[r].test(t))return!1;var i=Ke.parseUrl(t).host.toLowerCase();if(i&&(~i.indexOf(":443")||~i.indexOf(":80"))&&(i=(Ke.parseFullHost(t,!0)||"").toLowerCase()),!(e&&e.enableCorsCorrelation||i===n))return!1;var a,o=e&&e.correlationHeaderDomains;if(o&&(X.arrForEach(o,function(e){var t=RegExp(e.toLowerCase().replace(/\./g,".").replace(/\*/g,".*"));a=a||t.test(i)}),!a))return!1;var s=e&&e.correlationHeaderExcludedDomains;if(!s||0===s.length)return!0;for(r=0;r<s.length;r++)if(RegExp(s[r].toLowerCase().replace(/\./g,".").replace(/\*/g,".*")).test(i))return!1;return i&&0<i.length},Je.getCorrelationContext=function(e){if(e){var t=Je.getCorrelationContextValue(e,Ue.requestContextTargetKey);if(t&&t!==Je.correlationIdPrefix)return t}},Je.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]}},Je.correlationIdPrefix="cid-v1:",Je);function Je(){}var Ye=(Ze.ParseDependencyPath=function(e,t,n,r){var i,a,o,s=r,u=r,s=t&&0<t.length?(o=(i=Ke.parseUrl(t)).host,s||(null!=i.pathname?("/"!=(a=0===i.pathname.length?"/":i.pathname)[0]&&(a="/"+a),u=i.pathname,Pe.sanitizeString(e,n?n+" "+a:a)):Pe.sanitizeString(e,t))):o=r;return{target:o,name:s,data:u}},Ze);function Ze(){}var et=(tt.Now=function(){var e=P();return e&&e.now&&e.timing?e.now()+e.timing.navigationStart:(new Date).getTime()},tt.GetDuration=function(e,t){var n=null;return 0===e||0===t||X.isNullOrUndefined(e)||X.isNullOrUndefined(t)||(n=t-e),n},tt);function tt(){}var nt,rt="Microsoft_ApplicationInsights_BypassAjaxInstrumentation",it=(__extends(at,function(){}),at);function at(){return this}nt=function(){this.ver=1,this.sampleRate=100,this.tags={}},__extends(function(e,t,n){var r=nt.call(this)||this;return r.name=Pe.sanitizeString(e,n)||Xe.NotSpecified,r.data=t,r.time=X.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},nt);var ot,st,ut=function(){},lt=(ot=ut,__extends(ct,ot),ct);function ct(){var e=ot.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}function dt(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=Pe.sanitizeString(e,t)||Xe.NotSpecified,i.properties=Pe.sanitizeProperties(e,n),i.measurements=Pe.sanitizeMeasurements(e,r),i}st=lt,__extends(dt,st),dt.envelopeType="Microsoft.ApplicationInsights.{0}.Event",dt.dataType="EventData";var ft,pt=(ft=ut,__extends(gt,ft),gt);function gt(){var e=ft.call(this)||this;return e.ver=2,e.exceptions=[],e.properties={},e.measurements={},e}var ht,mt="error";function vt(e,t,n,r,i,a){var o,s=ht.call(this)||this;return s.aiDataContract={ver:g.Required,exceptions:g.Required,severityLevel:g.Default,properties:g.Default,measurements:g.Default},"ver"in(o=t)&&"exceptions"in o&&"properties"in o?(s.exceptions=t.exceptions,s.properties=t.properties,s.measurements=t.measurements,t.severityLevel&&(s.severityLevel=t.severityLevel),t.id&&(s.id=t.id),t.problemGroup&&(s.problemGroup=t.problemGroup),s.ver=2,X.isNullOrUndefined(t.isManual)||(s.isManual=t.isManual)):(s.exceptions=[new yt(e,t)],s.properties=Pe.sanitizeProperties(e,n)||{},s.measurements=Pe.sanitizeMeasurements(e,r),i&&(s.severityLevel=i),a&&(s.id=a)),s}ht=pt,__extends(vt,ht),vt.CreateFromInterface=function(t,e,n,r){var i=e.exceptions&&X.arrMap(e.exceptions,function(e){return yt.CreateFromInterface(t,e)});return new vt(t,__assign({},e,{exceptions:i}),n,r)},vt.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&&X.arrMap(t,function(e){return e.toInterface()})||undefined,severityLevel:i,properties:n,measurements:r,problemGroup:a,id:o,isManual:s}},vt.CreateSimpleException=function(e,t,n,r,i,a){return{exceptions:[{hasFullStack:!0,message:e,stack:i,typeName:t}]}},vt.envelopeType="Microsoft.ApplicationInsights.{0}.Exception",vt.dataType="ExceptionData";var xt,yt=(xt=function(){this.hasFullStack=!0,this.parsedStack=[]},__extends(St,xt),St.prototype.toInterface=function(){var e=this.parsedStack instanceof Array&&X.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}},St.CreateFromInterface=function(e,t){var n=t.parsedStack instanceof Array&&X.arrMap(t.parsedStack,function(e){return Ct.CreateFromInterface(e)})||t.parsedStack;return new St(e,__assign({},t,{parsedStack:n}))},St.parseStack=function(e){if(X.isString(e)){for(var t=e.split("\n"),n=[],r=0,i=0,a=0;a<=t.length;a++){var o,s=t[a];Ct.regex.test(s)&&(i+=(o=new Ct(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},St);function St(e,t){var n,r,i=xt.call(this)||this;return i.aiDataContract={id:g.Default,outerId:g.Default,typeName:g.Required,message:g.Required,hasFullStack:g.Default,stack:g.Default,parsedStack:g.Array},"hasFullStack"in t&&"typeName"in t?(i.typeName=t.typeName,i.message=t.message,i.stack=t.stack,i.parsedStack=t.parsedStack,i.hasFullStack=t.hasFullStack):(n=t,Xe.isError(n)||(n=n[mt]||n.evt||n),i.typeName=Pe.sanitizeString(e,function(e){var t="";if(e&&!(t=e.typeName||e.name||""))try{var n=/function (.{1,})\(/.exec(e.constructor.toString()),t=n&&1<n.length?n[1]:""}catch(r){}return t}(n))||Xe.NotSpecified,i.message=Pe.sanitizeMessage(e,t.message)||Xe.NotSpecified,r=t.stack,i.parsedStack=St.parseStack(r),i.stack=Pe.sanitizeException(e,r),i.hasFullStack=Xe.isArray(i.parsedStack)&&0<i.parsedStack.length),i}var It,Ct=(It=function(){},__extends(Tt,It),Tt.CreateFromInterface=function(e){return new Tt(e,null)},Tt.prototype.toInterface=function(){return{level:this.level,method:this.method,assembly:this.assembly,fileName:this.fileName,line:this.line}},Tt.regex=/^([\s]+at)?(.*?)(\@|\s\(|\s)([^\(\@\n]+):([0-9]+):([0-9]+)(\)?)$/,Tt.baseSize=58,Tt);function Tt(e,t){var n,r,i=It.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=Xe.trim(n),i.fileName="",i.line=0,(r=n.match(Tt.regex))&&5<=r.length&&(i.method=Xe.trim(r[2])||i.method,i.fileName=Xe.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+=Tt.baseSize,i.sizeInBytes+=i.level.toString().length,i.sizeInBytes+=i.line.toString().length,i}var _t,bt,Nt,At=(_t=ut,__extends(Mt,_t),Mt);function Mt(){var e=_t.call(this)||this;return e.ver=2,e.metrics=[],e.properties={},e.measurements={},e}(Nt=bt={})[Nt.Measurement=0]="Measurement",Nt[Nt.Aggregation=1]="Aggregation";var Dt,Et,wt=(Dt=function(){this.kind=bt.Measurement},__extends(Lt,Dt),Lt);function Lt(){var e=Dt.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}function qt(e,t,n,r,i,a,o,s){var u=Et.call(this)||this;u.aiDataContract={ver:g.Required,metrics:g.Required,properties:g.Default};var l=new wt;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=Pe.sanitizeString(e,t)||Xe.NotSpecified,l.value=n,u.metrics=[l],u.properties=Pe.sanitizeProperties(e,o),u.measurements=Pe.sanitizeMeasurements(e,s),u}Et=At,__extends(qt,Et),qt.envelopeType="Microsoft.ApplicationInsights.{0}.Metric",qt.dataType="MetricData";var Rt,kt,Ft=(Rt=lt,__extends(Ht,Rt),Ht);function Ht(){var e=Rt.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}function Ot(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=Pe.sanitizeId(e,o),s.url=Pe.sanitizeUrl(e,n),s.name=Pe.sanitizeString(e,t)||Xe.NotSpecified,isNaN(r)||(s.duration=Xe.msToTimeSpan(r)),s.properties=Pe.sanitizeProperties(e,i),s.measurements=Pe.sanitizeMeasurements(e,a),s}kt=Ft,__extends(Ot,kt),Ot.envelopeType="Microsoft.ApplicationInsights.{0}.Pageview",Ot.dataType="PageviewData";var Ut,jt=(Ut=ut,__extends(Pt,Ut),Pt);function Pt(){var e=Ut.call(this)||this;return e.ver=2,e.success=!0,e.properties={},e.measurements={},e}var zt,Gt=(zt=jt,__extends(Bt,zt),Bt.envelopeType="Microsoft.ApplicationInsights.{0}.RemoteDependency",Bt.dataType="RemoteDependencyData",Bt);function Bt(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=Xe.msToTimeSpan(i),f.success=a,f.resultCode=o+"",f.type=Pe.sanitizeString(e,u);var p=Ye.ParseDependencyPath(e,n,s,r);return f.data=Pe.sanitizeUrl(e,r)||p.data,f.target=Pe.sanitizeString(e,p.target),l&&(f.target=f.target+" | "+l),f.name=Pe.sanitizeString(e,p.name),f.properties=Pe.sanitizeProperties(e,c),f.measurements=Pe.sanitizeMeasurements(e,d),f}var Wt,Xt,Vt=(Wt=ut,__extends(Kt,Wt),Kt);function Kt(){var e=Wt.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}function Qt(e,t,n,r,i){var a=Xt.call(this)||this;return a.aiDataContract={ver:g.Required,message:g.Required,severityLevel:g.Default,properties:g.Default},t=t||Xe.NotSpecified,a.message=Pe.sanitizeMessage(e,t),a.properties=Pe.sanitizeProperties(e,r),a.measurements=Pe.sanitizeMeasurements(e,i),n&&(a.severityLevel=n),a}Xt=Vt,__extends(Qt,Xt),Qt.envelopeType="Microsoft.ApplicationInsights.{0}.Message",Qt.dataType="MessageData";var $t,Jt,Yt,Zt,en=($t=Ft,__extends(tn,$t),tn);function tn(){var e=$t.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}function nn(e,t,n,r,i,a,o){var s=Jt.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=Pe.sanitizeUrl(e,n),s.name=Pe.sanitizeString(e,t)||Xe.NotSpecified,s.properties=Pe.sanitizeProperties(e,i),s.measurements=Pe.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}Jt=en,__extends(nn,Jt),nn.envelopeType="Microsoft.ApplicationInsights.{0}.PageviewPerformance",nn.dataType="PageviewPerformanceData",Yt=it,__extends(function(e,t){var n=Yt.call(this)||this;return n.aiDataContract={baseType:g.Required,baseData:g.Required},n.baseType=e,n.baseData=t,n},Yt),(Zt={})[Zt.Verbose=0]="Verbose",Zt[Zt.Information=1]="Information",Zt[Zt.Warning=2]="Warning",Zt[Zt.Error=3]="Error",Zt[Zt.Critical=4]="Critical";var rn=(an.create=function(e,t,n,r,i,a){if(n=Pe.sanitizeString(r,n)||Xe.NotSpecified,X.isNullOrUndefined(e)||X.isNullOrUndefined(t)||X.isNullOrUndefined(n))throw Error("Input doesn't contain all required fields");var o={name:n,time:X.toISOString(new Date),iKey:"",ext:a||{},tags:[],data:{},baseType:t,baseData:e};if(!X.isNullOrUndefined(i))for(var s in i)i.hasOwnProperty(s)&&(o.data[s]=i[s]);return o},an);function an(){}var on="AppInsightsPropertiesPlugin",sn="constructor",un="prototype",ln="function",cn="_dynInstFuncs",dn="_isDynProxy",fn="_dynClass",pn="_dynCls$",gn="_unknown_",hn="__proto__",mn=Object.getPrototypeOf,vn=0;function xn(e,t){return e&&Object[un].hasOwnProperty.call(e,t)}function yn(e){return typeof e===ln}function Sn(e){return e&&(e===Object[un]||e===Array[un])}function In(e){return Sn(e)||e===Function[un]}function Cn(e){if(e){if(mn)return mn(e);var t=e[hn]||e[un]||e[sn];if(t)return t}return null}function Tn(e,t,n){return t!==sn&&yn(e[t])&&(n||xn(e,t))}function _n(e){throw new TypeError("DynamicProto: "+e)}function bn(e,t){return xn(e,un)?e.name||t||gn:((e||{})[sn]||{}).name||t||gn}function Nn(e,n,t){xn(e,un)||_n("theClass is an invalid class definition.");var r=e[un];!function(e){for(var t=Cn(n);t&&!In(t);){if(t===e)return 1;t=Cn(t)}}(r)&&_n("["+bn(e)+"] is not in class heirarchy of ["+bn(n)+"]");var i=null;xn(r,fn)?i=r[fn]:(i=pn+bn(e,"_")+"$"+vn,vn++,r[fn]=i);var a=function(e){var t={};for(var n in e)!t[n]&&Tn(e,n,!1)&&(t[n]=e[n]);return t}(n);t(n,function(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=Cn(e),s=[];o&&!In(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]&&Tn(o,a,!mn)&&(i[a]=r(t,o[a]));s.push(o),o=Cn(o)}return i}(r,n,a)),function(e,t,n,r){if(!Sn(e)){var i=n[cn]=n[cn]||{},a=i[t]=i[t]||{};for(var o in n)Tn(n,o,!1)&&n[o]!==r[o]&&(a[o]=n[o],delete n[o],xn(e,o)&&(!e[o]||e[o][dn])||(e[o]=function(n,r){var i=function(){if(this&&xn(n,fn)){var e=((this[cn]||{})[n[fn]]||{})[r];if(e)return e.apply(this,arguments);_n("Missing ["+r+"] "+ln)}var t=n[r];return t===i&&(t=Cn(n)[r]),yn(t)||_n("["+r+"] is not a "+ln),t.apply(this,arguments)};return i[dn]=1,i}(e,o)))}}(r,i,n,a)}var An="properties",Mn=X.objKeys,Dn=X.arrForEach;function En(e,t,n){var r=0,i=e[t],a=e[n];return i&&a&&(r=et.GetDuration(i,a)),r}function wn(e,t,n,r,i){var a=0,o=En(n,r,i);return o&&(a=Ln(e,t,Xe.msToTimeSpan(o))),a}function Ln(e,t,n){var r="ajaxPerf",i=0;return e&&t&&n&&((e[r]=e[r]||{})[t]=n,i=1),i}var qn=function(){var e=this;e.openDone=!1,e.setRequestHeaderDone=!1,e.sendDone=!1,e.abortDone=!1,e.stateChangeAttached=!1},Rn=function tr(e,t,n){var r=this,i=n,A="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,Nn(tr,r,function(N){N.getAbsoluteUrl=function(){return N.requestUrl?Ke.getAbsoluteUrl(N.requestUrl):null},N.getPathName=function(){return N.requestUrl?Pe.sanitizeUrl(i,Ke.getCompleteUrl(N.method,N.requestUrl)):null},N.CreateTrackItem=function(e,t,n){if(N.ajaxTotalDuration=Math.round(1e3*et.GetDuration(N.requestSentTime,N.responseFinishedTime))/1e3,N.ajaxTotalDuration<0)return null;var r,i,a,o,s,u,l,c,d=((o={id:"|"+N.traceID+"."+N.spanID,target:N.getAbsoluteUrl(),name:N.getPathName(),type:e,duration:N.ajaxTotalDuration,success:200<=+N.status&&+N.status<400,responseCode:+N.status,method:N.method})[An]={HttpMethod:N.method},o),f=d,p=(s=N).perfTiming,g=f[An]||{},h=0,m=X.isString,v="duration",x="startTime",y="connect"+"End",S="request"+"Start",I="response"+"End",C="transferSize",T="encodedBodySize",_="decodedBodySize",b="serverTiming";return p?(h|=wn(g,"End",p,"redirectStart","End"),h|=wn(g,"domainLookup",p,"domainLookupStart","domainLookupEnd"),h|=wn(g,"connect",p,"connectStart",y),h|=wn(g,"request",p,S,"requestEnd"),h|=wn(g,"response",p,"responseStart",I),h|=wn(g,"networkConnect",p,x,y),h|=wn(g,"sentRequest",p,S,I),h|=Ln(g,v,u=p[v]||En(p,x,I)||0),h|=Ln(g,"perfTotal",u),(l=p[b])&&(c={},Dn(l,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=c[a]||{};Dn(Mn(n),function(e){var t=n[e];("name"!==e&&m(t)||X.isNumber(t))&&(o[e]&&(t=o[e]+";"+t),!t&&m(t)||(o[e]=t))}),c[a]=o}),h|=Ln(g,b,c)),h|=Ln(g,C,p[C]),h|=Ln(g,T,p[T]),h|=Ln(g,_,p[_])):s.perfMark&&(h|=Ln(g,"missing",s.perfAttempts)),h&&(f[An]=g),t&&0<Mn(N.requestHeaders).length&&(d[An]=d[An]||{},d[An].requestHeaders=N.requestHeaders),!n||(r=n())&&((i=r.correlationContext)&&(d.correlationContext=i),r.headerMap&&0<Mn(r.headerMap).length&&(d[An]=d[An]||{},d[An].responseHeaders=r.headerMap),400<=N.status&&(a=r.type,d[An]=d[An]||{},""!==a&&"text"!==a||(d[An][A]=r[A]?r.statusText+" - "+r[A]:r.statusText),"json"===a&&(d[An][A]=r.response?r.statusText+" - "+JSON.stringify(r.response):r.statusText))),d}})},kn=(Fn.isValidTraceId=function(e){return e.match(/^[0-9a-f]{32}$/)&&"00000000000000000000000000000000"!==e},Fn.isValidSpanId=function(e){return e.match(/^[0-9a-f]{16}$/)&&"0000000000000000"!==e},Fn.prototype.toString=function(){return this.version+"-"+this.traceId+"-"+this.spanId+"-"+this.traceFlag},Fn.DEFAULT_TRACE_FLAG="01",Fn.DEFAULT_VERSION="00",Fn);function Fn(e,t){var n=this;n.traceFlag=Fn.DEFAULT_TRACE_FLAG,n.version=Fn.DEFAULT_VERSION,e&&Fn.isValidTraceId(e)?n.traceId=e:n.traceId=Xe.generateW3CId(),t&&Fn.isValidSpanId(t)?n.spanId=t:n.spanId=Xe.generateW3CId().substr(0,16)}var Hn="ai.ajxmn.",On="diagLog",Un="ajaxData",jn="throwInternal",Pn="fetch",zn=X.isNullOrUndefined,Gn=X.arrForEach,Bn=X.objKeys,Wn=0;function Xn(e){var t="";try{zn(e)||zn(e[Un])||zn(e[Un].requestUrl)||(t+="(url: '"+e[Un].requestUrl+"')")}catch(n){}return t}function Vn(e,t,n,r,i){e[On]()[jn](K.CRITICAL,t,n,r,i)}function Kn(e,t,n,r,i){e[On]()[jn](K.WARNING,t,n,r,i)}function Qn(t,n,r){return function(e){Vn(t,n,r,{ajaxDiagnosticsMessage:Xn(e.inst),exception:Xe.dump(e.err)})}}function $n(e,t){return e&&t?e.indexOf(t):-1}var Jn,Yn=(Jn=de,__extends(Zn,Jn),Zn.getDefaultConfig=function(){return{maxAjaxCallsPerView:500,disableAjaxTracking:!1,disableFetchTracking:!0,disableCorrelationHeaders:!1,distributedTracingMode:F.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}},Zn.getEmptyConfig=function(){var t=this.getDefaultConfig();return Gn(Bn(t),function(e){t[e]=undefined}),t},Zn.prototype.processTelemetry=function(e,t){this.processNext(e,t)},Zn.identifier="AjaxDependencyPlugin",Zn);function Zn(){var e=Jn.call(this)||this;e.identifier=Zn.identifier,e.priority=120;var T,_,b,N,A,M,D="trackDependencyDataInternal",t=j(),E=!1,w=!1,u=t&&t.host&&t.host.toLowerCase(),L=Zn.getEmptyConfig(),q=!1,i=0,R=0,k=[],s={};return Nn(Zn,e,function(g,h){function m(e,t,n){k.push(e?Oe(e[O],t,n,!1):null)}function v(e,t,n){var r=!1,i=((X.isString(t)?t:(t||{}).url||"")||"").toLowerCase(),a=$n(i,"?"),o=$n(i,"#");return(-1===a||-1!==o&&o<a)&&(a=o),-1!==a&&(i=i.substring(0,a)),zn(e)?zn(t)||(r="object"==typeof t&&!0===t[rt]||!!n&&!0===n[rt]):r=!0===e[rt]||!0===i[rt],r?s[i]||(s[i]=1):s[i]&&(r=!0),r}function x(e,t){var n=!0,r=w;return zn(e)||(n=!0===t||!zn(e[Un])),r&&n}function y(e,t){var n,r,i;t.requestUrl&&N&&A&&(n=P())&&X.isFunction(n.mark)&&(r=N+e+"#"+ ++Wn,n.mark(r),(i=n.getEntriesByName(r))&&1===i.length&&(t.perfMark=i[0]))}function S(a,o,s,u){var l=o.perfMark,c=P(),d=L.maxAjaxPerfLookupAttempts,f=L.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===$n(r.name,p)&&-1===$n(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&&X.isFunction(c.clearMarks)&&c.clearMarks(l.name),o.perfAttempts=g,s()):setTimeout(h,f)}catch(i){u(i)}}()}function I(e){var t="";try{zn(e)||(t+="string"==typeof e?"(url: '"+e+"')":"(url: '"+e.url+"')")}catch(n){Vn(g,Z.FailedMonitorAjaxOpen,"Failed to grab failed fetch diagnostics message",{exception:Xe.dump(n)})}return t}function C(e,t,i,n,r){function a(e,t,n){var r=n||{};r.fetchDiagnosticsMessage=I(i),t&&(r.exception=Xe.dump(t)),Kn(g,e,"Failed to calculate the duration of the fetch call, monitoring data for this fetch call won't be sent.",r)}n&&(n.responseFinishedTime=et.Now(),n.status=t,S("fetch",n,function(){var e=n.CreateTrackItem("Fetch",q,r);e?g[D](e):a(Z.FailedMonitorAjaxDur,null,{requestSentTime:n.requestSentTime,responseFinishedTime:n.responseFinishedTime})},function(e){a(Z.FailedMonitorAjaxGetCorrelationHeader,e,null)}))}g.initialize=function(e,t,n,r){if(!g.isInitialized()){h.initialize(e,t,n,r);var i=g._getTelCtx(),a=Zn.getDefaultConfig();Gn(Bn(a),function(e){L[e]=i.getConfig(Zn.identifier,e,a[e])});var o,s=L.distributedTracingMode;if(q=L.enableRequestHeaderTracking,A=L.enableAjaxPerfTracking,R=L.maxAjaxCallsPerView,M=L.enableResponseHeaderTracking,b=s===F.AI||s===F.AI_AND_W3C,_=s===F.AI_AND_W3C||s===F.W3C,A&&(o=e.instrumentationKey||"unkwn",N=5<o.length?Hn+o.substring(o.length-5)+".":Hn+o+"."),!1===L.disableAjaxTracking&&(!function(e){var t,n=!1;typeof XMLHttpRequest===H||zn(XMLHttpRequest)||(t=XMLHttpRequest[O],n=!(zn(t)||zn(t.open)||zn(t.send)||zn(t.abort)));var r=Xe.getIEVersion();if(r&&r<9&&(n=!1),n)try{(new XMLHttpRequest)[Un]={};var i=XMLHttpRequest[O].open;XMLHttpRequest[O].open=i}catch(a){n=!1,Vn(e,Z.FailedMonitorAjaxOpen,"Failed to enable XMLHttpRequest monitoring, extension is not supported",{exception:Xe.dump(a)})}return n}(g)||w||(m(XMLHttpRequest,"open",{req:function(e,t,n,r){var i,a,o,s,u,l,c,d,f=e.inst,p=f[Un];v(f,n)||!x(f,!0)||p&&p.xhrMonitoringState.openDone||(i=f,a=t,o=n,s=r,u=T&&T.telemetryTrace&&T.telemetryTrace.traceID||Xe.generateW3CId(),l=Xe.generateW3CId().substr(0,16),(c=new Rn(u,l,g[On]())).method=a,c.requestUrl=o,c.xhrMonitoringState.openDone=!0,c.requestHeaders={},c.async=s,i[Un]=c,(d=i)[Un].xhrMonitoringState.stateChangeAttached=J.Attach(d,"readystatechange",function(){try{d&&4===d.readyState&&x(d)&&((i=(r=d)[Un]).responseFinishedTime=et.Now(),i.status=r.status,S("xmlhttprequest",i,function(){try{var e=i.CreateTrackItem("Ajax",q,function(){var e,t,i,n={statusText:r.statusText,headerMap:null,correlationContext:function(e){try{var t=e.getAllResponseHeaders();if(null!==t&&-1!==$n(t.toLowerCase(),Ue.requestContextHeaderLowerCase)){var n=e.getResponseHeader(Ue.requestContextHeader);return $e.getCorrelationContext(n)}}catch(r){Kn(g,Z.FailedMonitorAjaxGetCorrelationHeader,"Failed to get Request-Context correlation header as it may be not included in the response or not accessible.",{ajaxDiagnosticsMessage:Xn(e),exception:Xe.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!M||(e=r.getAllResponseHeaders())&&(t=X.strTrim(e).split(/[\r\n]+/),i={},Gn(t,function(e){var t=e.split(": "),n=t.shift(),r=t.join(": ");i[n]=r}),n.headerMap=i),n});e?g[D](e):n(null,{requestSentTime:i.requestSentTime,responseFinishedTime:i.responseFinishedTime})}finally{try{r[Un]=null}catch(t){}}},function(e){n(e,null)}))}catch(t){var e=Xe.dump(t);e&&-1!==$n(e.toLowerCase(),"c00c023f")||Vn(g,Z.FailedMonitorAjaxRSC,"Failed to monitor XMLHttpRequest 'readystatechange' event handler, monitoring data for this ajax call may be incorrect.",{ajaxDiagnosticsMessage:Xn(d),exception:e})}function n(e,t){var n=t||{};n.ajaxDiagnosticsMessage=Xn(r),e&&(n.exception=Xe.dump(e)),Kn(g,Z.FailedMonitorAjaxDur,"Failed to calculate the duration of the ajax call, monitoring data for this ajax call won't be sent.",n)}var r,i}))},hkErr:Qn(g,Z.FailedMonitorAjaxOpen,"Failed to monitor XMLHttpRequest.open, monitoring data for this ajax call may be incorrect.")}),m(XMLHttpRequest,"send",{req:function(e,t){var n=e.inst,r=n[Un];x(n)&&!r.xhrMonitoringState.sendDone&&(y("xhr",r),r.requestSentTime=et.Now(),g.includeCorrelationHeaders(r,undefined,undefined,n),r.xhrMonitoringState.sendDone=!0)},hkErr:Qn(g,Z.FailedMonitorAjaxSend,"Failed to monitor XMLHttpRequest, monitoring data for this ajax call may be incorrect.")}),m(XMLHttpRequest,"abort",{req:function(e){var t=e.inst,n=t[Un];x(t)&&!n.xhrMonitoringState.abortDone&&(n.aborted=1,n.xhrMonitoringState.abortDone=!0)},hkErr:Qn(g,Z.FailedMonitorAjaxAbort,"Failed to monitor XMLHttpRequest.abort, monitoring data for this ajax call may be incorrect.")}),q&&m(XMLHttpRequest,"setRequestHeader",{req:function(e,t,n){var r=e.inst;x(r)&&(r[Un].requestHeaders[t]=n)},hkErr:Qn(g,Z.FailedMonitorAjaxSetRequestHeader,"Failed to monitor XMLHttpRequest.setRequestHeader, monitoring data for this ajax call may be incorrect.")}),w=!0)),(p=!(c=U())||zn(c.Request)||zn(c.Request[O])||zn(c[Pn])?null:c[Pn])&&(d=U(),f=p.polyfill,!1===L.disableFetchTracking?(k.push(Oe(d,Pn,{req:function(e,t,n){var r,i,a;!E||v(null,t,n)||f&&w||(r=e.ctx(),i=function(e,t){var n=T&&T.telemetryTrace&&T.telemetryTrace.traceID||Xe.generateW3CId(),r=Xe.generateW3CId().substr(0,16),i=new Rn(n,r,g[On]());i.requestSentTime=et.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={};return q&&new Headers((t?t.headers:0)||e instanceof Request&&e.headers||{}).forEach(function(e,t){o[t]=e}),i.requestHeaders=o,y("fetch",i),i}(t,n),(a=g.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 C(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(Ue.requestContextHeader);return $e.getCorrelationContext(t)}catch(n){Kn(g,Z.FailedMonitorAjaxGetCorrelationHeader,"Failed to get Request-Context correlation header as it may be not included in the response or not accessible.",{fetchDiagnosticsMessage:I(e),exception:Xe.dump(n)})}}(t)};return M&&(n={},t.headers.forEach(function(e,t){n[t]=e}),e.headerMap=n),e}),t})["catch"](function(e){throw C(0,0,t,n,null,e.message),e}))},hkErr:Qn(g,Z.FailedMonitorAjaxOpen,"Failed to monitor Window.fetch, monitoring data for this fetch call may be incorrect.")})),E=!0):f&&k.push(Oe(d,Pn,{req:function(e,t,n){v(null,t,n)}})),f&&(d[Pn].polyfill=f)),0<n.length&&n){for(var u=void 0,l=0;!u&&l<n.length;)n[l]&&n[l].identifier===on&&(u=n[l]),l++;u&&(T=u.context)}}var c,d,f,p},g.teardown=function(){Gn(k,function(e){e.rm()}),w=E=!(k=[]),g.setInitialized(!1)},g.trackDependencyData=function(e,t){g[D](e,t)},g.includeCorrelationHeaders=function(e,t,n,r){var i,a,o,s=g._currentWindowHost||u;return t?($e.canIncludeCorrelationHeader(L,e.getAbsoluteUrl(),s)&&((n=n||{}).headers=new Headers(n.headers||t instanceof Request&&t.headers||{}),b&&(i="|"+e.traceID+"."+e.spanID,n.headers.set(Ue.requestIdHeader,i),q&&(e.requestHeaders[Ue.requestIdHeader]=i)),(a=L.appId||T&&T.appId())&&(n.headers.set(Ue.requestContextHeader,Ue.requestContextAppIdFormat+a),q&&(e.requestHeaders[Ue.requestContextHeader]=Ue.requestContextAppIdFormat+a)),_&&(o=new kn(e.traceID,e.spanID),n.headers.set(Ue.traceParentHeader,o.toString()),q&&(e.requestHeaders[Ue.traceParentHeader]=o.toString()))),n):r?($e.canIncludeCorrelationHeader(L,e.getAbsoluteUrl(),s)&&(b&&(i="|"+e.traceID+"."+e.spanID,r.setRequestHeader(Ue.requestIdHeader,i),q&&(e.requestHeaders[Ue.requestIdHeader]=i)),(a=L.appId||T&&T.appId())&&(r.setRequestHeader(Ue.requestContextHeader,Ue.requestContextAppIdFormat+a),q&&(e.requestHeaders[Ue.requestContextHeader]=Ue.requestContextAppIdFormat+a)),_&&(o=new kn(e.traceID,e.spanID),r.setRequestHeader(Ue.traceParentHeader,o.toString()),q&&(e.requestHeaders[Ue.traceParentHeader]=o.toString()))),r):undefined},g[D]=function(e,t,n){var r;-1===R||i<R?(L.distributedTracingMode!==F.W3C&&L.distributedTracingMode!==F.AI_AND_W3C||"string"!=typeof e.id||"."===e.id[e.id.length-1]||(e.id+="."),r=rn.create(e,Gt.dataType,Gt.envelopeType,g[On](),t,n),g.core.track(r)):i===R&&Vn(g,Z.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=Yn,e.ajaxRecord=Rn,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})};"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e.Microsoft=e.Microsoft||{},e.Microsoft.ApplicationInsights=e.Microsoft.ApplicationInsights||{})); | ||
var e=this,t=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}var u,c,g,l,F,f,d=function(e,t){return(d=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)},p=n()||{};__assign=p.__assign=p.__assign||Object.assign||function(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},__extends=p.__extends=p.__extends||function(e,t){function n(){this.constructor=e}d(e,t),e[o]=null===t?r(t):(n[o]=t[o],new n)},(c=u={})[c.LocalStorage=0]="LocalStorage",c[c.SessionStorage=1]="SessionStorage",(l=g=g||{})[l.Default=0]="Default",l[l.Required=1]="Required",l[l.Array=2]="Array",l[l.Hidden=4]="Hidden",(f=F=F||{})[f.AI=0]="AI",f[f.AI_AND_W3C=1]="AI_AND_W3C",f[f.W3C=2]="W3C";var h=2,H=t,m=a,O=o,v=i,x="window",y="location",S="performance",C="JSON",P=n;function I(e){var t=P();return t&&t[e]?t[e]:e===x&&T()?window:null}function T(){return typeof window===m&&window}function N(){return T()?window:I(x)}function _(){return typeof document===m&&document?document:I("document")}function b(){return typeof navigator===m&&navigator?navigator:I("navigator")}function j(){return typeof location===m&&location?location:I(y)}function U(){return I(S)}function A(){return typeof JSON===m&&JSON||null!==I(C)}function M(){return A()?JSON||I(C):null}var E="constructor",D="prototype",w="function",L="_dynInstFuncs",q="_isDynProxy",R="_dynClass",k="_dynCls$",z="_unknown_",G="__proto__",B=Object.getPrototypeOf,W=0;function X(e,t){return e&&Object[D].hasOwnProperty.call(e,t)}function V(e){return typeof e===w}function K(e){return e&&(e===Object[D]||e===Array[D])}function $(e){return K(e)||e===Function[D]}function J(e){if(e){if(B)return B(e);var t=e[G]||e[D]||e[E];if(t)return t}return null}function Q(e,t,n){return t!==E&&V(e[t])&&(n||X(e,t))}function Y(e){throw new TypeError("DynamicProto: "+e)}function Z(e,t){return X(e,D)?e.name||t||z:((e||{})[E]||{}).name||t||z}function ee(e,n,t){X(e,D)||Y("theClass is an invalid class definition.");var r=e[D];!function(e){for(var t=J(n);t&&!$(t);){if(t===e)return 1;t=J(t)}}(r)&&Y("["+Z(e)+"] is not in class heirarchy of ["+Z(n)+"]");var i=null;X(r,R)?i=r[R]:(i=k+Z(e,"_")+"$"+W,W++,r[R]=i);var a=function(e){var t={};for(var n in e)!t[n]&&Q(e,n,!1)&&(t[n]=e[n]);return t}(n);t(n,function(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=J(e),s=[];o&&!$(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]&&Q(o,a,!B)&&(i[a]=r(t,o[a]));s.push(o),o=J(o)}return i}(r,n,a)),function(e,t,n,r){if(!K(e)){var i=n[L]=n[L]||{},a=i[t]=i[t]||{};for(var o in n)Q(n,o,!1)&&n[o]!==r[o]&&(a[o]=n[o],delete n[o],X(e,o)&&(!e[o]||e[o][q])||(e[o]=function(n,r){var i=function(){if(this&&X(n,R)){var e=((this[L]||{})[n[R]]||{})[r];if(e)return e.apply(this,arguments);Y("Missing ["+r+"] "+w)}var t=n[r];return t===i&&(t=J(n)[r]),V(t)||Y("["+r+"] is not a "+w),t.apply(this,arguments)};return i[q]=1,i}(e,o)))}}(r,i,n,a)}var te="ctx",ne=(re.ParentContextKey="parent",re.ChildrenContextKey="childEvts",re);function re(e,i,t){var n,a=this,o=!1;a.start=Date.now(),a.name=e,a.isAsync=t,a.isChildEvt=function(){return!1},ve.isFunction(i)&&(o=ve.objDefineAccessors(a,"payload",function(){return!n&&ve.isFunction(i)&&(n=i(),i=null),n})),a.getCtx=function(e){return e?e===re.ParentContextKey||e===re.ChildrenContextKey?a[e]:(a[te]||{})[e]:null},a.setCtx=function(e,t){e&&(e===re.ParentContextKey?(a[e]||(a.isChildEvt=function(){return!0}),a[e]=t):e===re.ChildrenContextKey?a[e]=t:(a[te]=a[te]||{})[e]=t)},a.complete=function(){var e=0,t=a.getCtx(re.ChildrenContextKey);if(ve.isArray(t))for(var n=0;n<t.length;n++){var r=t[n];r&&(e+=r.time)}a.time=Date.now()-a.start,a.exTime=a.time-e,a.complete=function(){},!o&&ve.isFunction(i)&&(a.payload=i())}}var ie=function sr(t){this.ctx={},ee(sr,this,function(n){n.create=function(e,t,n){return new ne(e,t,n)},n.fire=function(e){e&&e.complete(),t&&t.perfEvent(e)},n.setCtx=function(e,t){e&&((n[te]=n[te]||{})[e]=t)},n.getCtx=function(e){return(n[te]||{})[e]}})},ae="attachEvent",oe="addEventListener",se="detachEvent",ue="removeEventListener";function ce(e,t){return typeof e===t}function le(e){return ce(e,t)||e===undefined}function fe(e){return le(e)||null===e}function de(e,t){return e&&Object[o].hasOwnProperty.call(e,t)}function pe(e){return ce(e,a)}function ge(e){return ce(e,i)}function he(e,t,n,r){void 0===r&&(r=!1);var i=!1;if(!fe(e))try{fe(e[oe])?fe(e[ae])||(e[ae]("on"+t,n),i=!0):(e[oe](t,n,r),i=!0)}catch(a){}return i}function me(e,t,n,r){if(void 0===r&&(r=!1),!fe(e))try{fe(e[ue])?fe(e[se])||e[se]("on"+t,n):e[ue](t,n,r)}catch(i){}}var ve=(xe.isDate=function(e){return"[object Date]"===Object[o].toString.call(e)},xe.isArray=function(e){return"[object Array]"===Object[o].toString.call(e)},xe.isError=function(e){return"[object Error]"===Object[o].toString.call(e)},xe.isString=function(e){return ce(e,"string")},xe.isNumber=function(e){return ce(e,"number")},xe.isBoolean=function(e){return ce(e,"boolean")},xe.disableCookies=function(){xe._canUseCookies=!1},xe.newGuid=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(ye,function(e){var t,n=0|((t=I("crypto"))?t.getRandomValues(new Uint8Array(1))[0]%16:16*Math.random());return("x"===e?n:3&n|8).toString(16)})},xe.toISOString=function(e){if(xe.isDate(e)){var t=function(e){var t=e+"";return 1===t.length&&(t="0"+t),t};return e.getUTCFullYear()+"-"+t(1+e.getUTCMonth())+"-"+t(e.getUTCDate())+"T"+t(e.getUTCHours())+":"+t(e.getUTCMinutes())+":"+t(e.getUTCSeconds())+"."+((e.getUTCMilliseconds()/1e3).toFixed(3)+"").slice(2,5)+"Z"}},xe.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)},xe.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},xe.arrMap=function(e,t,n){for(var r=e.length,i=n||e,a=Array(r),o=0;o<r;o++)o in e&&(a[o]=t.call(i,e[o],e));return a},xe.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},xe.strTrim=function(e){return xe.isString(e)?e.replace(/^\s+|\s+$/g,""):e},xe.objKeys=function(e){var t=!{toString:null}.propertyIsEnumerable("toString");if(!(ge(e)||pe(e)&&null!==e))throw new TypeError("objKeys called on non-object");var n=[];for(var r in e)de(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++)de(e,i[o])&&n.push(i[o]);return n},xe.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},xe.addEventHandler=function(e,t){var n=!1,r=N();r&&(n=he(r,e,t),n=he(r.body,e,t)||n);var i=_();return i&&(n=Se.Attach(i,e,t)||n),n},xe.isTypeof=ce,xe.isUndefined=le,xe.isNullOrUndefined=fe,xe.hasOwnProperty=de,xe.isFunction=ge,xe.isObject=pe,xe.objCreate=r,xe);function xe(){}var ye=/[xy]/g,Se=(Ce.Attach=he,Ce.AttachEvent=he,Ce.Detach=me,Ce.DetachEvent=me,Ce);function Ce(){}var Ie,Te,Ne="CoreUtils.doPerf";function _e(e,t,n,r,i){if(e){var a=e;if(a&&ve.isFunction(a.getPerfMgr)&&(a=a.getPerfMgr()),a){var o,s=void 0,u=a.getCtx(Ne);try{if(s=a.create(t(),r,i))return u&&s.setCtx&&(s.setCtx(ne.ParentContextKey,u),u.getCtx&&u.setCtx&&((o=u.getCtx(ne.ChildrenContextKey))||(o=[],u.setCtx(ne.ChildrenContextKey,o)),o.push(s))),a.setCtx(Ne,s),n(s)}catch(c){s&&s.setCtx&&s.setCtx("exception",c)}finally{s&&a.fire(s),a.setCtx(Ne,u)}}}return n()}(Te=Ie=Ie||{})[Te.CRITICAL=1]="CRITICAL",Te[Te.WARNING=2]="WARNING";var be={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};function Ae(e){return e?'"'+e.replace(/\"/g,"")+'"':""}var Me=(Ee.dataType="MessageData",Ee);function Ee(e,t,n,r){void 0===n&&(n=!1),this.messageId=e,this.message=(n?"AI: ":"AI (Internal): ")+e;var i="";A()&&(i=M().stringify(r));var a=(t?" message:"+Ae(t):"")+(r?" props:"+Ae(i):"");this.message+=a}var De=function ur(a){this.identifier="DiagnosticLogger",this.queue=[];var o=0,c={};ee(ur,this,function(s){var r=ve.isNullOrUndefined,u=ve.isUndefined,i=ve.isFunction;function e(e,t){var n=a[e];return r(n)?t:n}r(a)&&(a={}),s.consoleLoggingLevel=function(){return e("loggingLevelConsole",0)},s.telemetryLoggingLevel=function(){return e("loggingLevelTelemetry",1)},s.maxInternalMessageLimit=function(){return e("maxMessageLimit",25)},s.enableDebugExceptions=function(){return e("enableDebugExceptions",!1)},s.throwInternal=function(e,t,n,r,i){void 0===i&&(i=!1);var a,o=new Me(t,n,i,r);if(s.enableDebugExceptions())throw o;!u(o)&&o&&(u(o.message)||(i?(a=+o.messageId,!c[a]&&s.consoleLoggingLevel()>=Ie.WARNING&&(s.warnToConsole(o.message),c[a]=!0)):s.consoleLoggingLevel()>=Ie.WARNING&&s.warnToConsole(o.message),s.logInternalMessage(e,o)))},s.warnToConsole=function(e){var t,n=typeof console!==H?console:I("console");n&&(t="log",n.warn&&(t="warn"),i(n[t])&&n[t](e))},s.resetInternalMessageCount=function(){o=0,c={}},s.logInternalMessage=function(e,t){var n,r,i,a;o>=s.maxInternalMessageLimit()||(n=!0,r="AITR_"+t.messageId,c[r]?n=!1:c[r]=!0,n&&(e<=s.telemetryLoggingLevel()&&(s.queue.push(t),o++),o===s.maxInternalMessageLimit()&&(i="Internal events throttle limit per PageView reached for this app.",a=new Me(be.MessageLimitPerPVExceeded,i,!1),s.queue.push(a),s.warnToConsole(i))))}})},we=ve.isFunction,Le=function(i,t){var a=this,o=null,s=we(i.processTelemetry),u=we(i.setNextPlugin);a._hasRun=!1,a.getPlugin=function(){return i},a.getNext=function(){return o},a.setNext=function(e){o=e},a.processTelemetry=function(n,r){r=r||t;var e=i?i.identifier:"TelemetryPluginChain";_e(r?r.core():null,function(){return e+":processTelemetry"},function(){if(i&&s){a._hasRun=!0;try{r.setNext(o),u&&i.setNextPlugin(o),o&&(o._hasRun=!1),i.processTelemetry(n,r)}catch(t){var e=o&&o._hasRun;o&&e||r.diagLog().throwInternal(Ie.CRITICAL,be.PluginException,"Plugin ["+i.identifier+"] failed during processTelemetry - "+t),o&&!e&&o.processTelemetry(n,r)}}else o&&(a._hasRun=!0,o.processTelemetry(n,r))},function(){return{item:n}},!n.sync)}},qe=ve.isNullOrUndefined;function Re(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&&ve.isFunction(o.processTelemetry)&&(a=new Le(o,t),n.push(a),r&&r.setNext(a),r=a)}return 0<n.length?n[0]:null}var ke=function cr(e,a,n,t){var r,i,o,s,u=this,c=null;null!==t&&(e&&ve.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),Re(r,t)}(e,u,t||e.getPlugin()):t?(r=u,o=e,s=!1,(i=t)&&e&&(o=[],ve.arrForEach(e,function(e){!s&&e!==i||(s=!0,o.push(e))})),i&&!s&&(o=o||[]).push(i),c=Re(o,r)):ve.isUndefined(t)&&(c=Re(e,u))),u.core=function(){return n},u.diagLog=function(){return(n||{}).logger||new De(a||{})},u.getCfg=function(){return a},u.getExtCfg=function(e,t){var n,r;return void 0===t&&(t={}),!a||(r=a.extensionConfig)&&e&&(n=r[e]),n||t},u.getConfig=function(e,t,n){var r;void 0===n&&(n=!1);var i=u.getExtCfg(e,null);return i&&!qe(i[t])?r=i[t]:a&&!qe(a[t])&&(r=a[t]),qe(r)?n:r},u.hasNext=function(){return null!=c},u.getNext=function(){return c},u.setNext=function(e){c=e},u.processNext=function(e){var t=c;t&&(c=t.getNext(),t.processTelemetry(e,u))},u.createNew=function(e,t){return void 0===e&&(e=null),new cr(e||c,a,n,t)}},Fe=ve.isFunction,He="getPlugin",Oe=(Pe.prototype.initialize=function(e,t,n,r){this._baseTelInit(e,t,n,r)},Pe);function Pe(){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&&Fe(u.processTelemetry)&&u.processTelemetry(e,null)},a._getTelCtx=function(e){void 0===e&&(e=null);var t,n=e;return n||(t=s||new ke(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 ke(r,e,t,i),o=!0}}var je=ve.isFunction,Ue="processTelemetry",ze="priority",Ge="setNextPlugin",Be="isInitialized";function We(t,n){for(var e=[],r=null,i=t.getNext();i;){var a=i.getPlugin();a&&(r&&je(r[Ge])&&je(a[Ue])&&r[Ge](a),je(a[Be])&&a[Be]()||e.push(a),r=a,i=i.getNext())}ve.arrForEach(e,function(e){e.initialize(t.getCfg(),t.core(),n,t.getNext())})}function Xe(e){return e.sort(function(e,t){var n=0,r=je(t[Ue]);return je(e[Ue])?n=r?e[ze]-t[ze]:1:r&&(n=-1),n})}var Ve,Ke=500,$e="Channel has invalid priority",Je=ve.objDefineAccessors,Qe=(Ve=Oe,__extends(Ye,Ve),Ye._staticInit=(Je(Ye.prototype,"ChannelControls",Ye.prototype.getChannelControls),void Je(Ye.prototype,"channelQueue",Ye.prototype.getChannelControls)),Ye);function Ye(){var r=Ve.call(this)||this;r.identifier="ChannelControllerPlugin",r.priority=Ke;var u,c=ve.arrForEach;function l(e){e&&0<e.length&&(e=e.sort(function(e,t){return e.priority-t.priority}),c(e,function(e){if(e.priority<Ke)throw Error($e+e.identifier)}),u.push(e))}return ee(Ye,r,function(o,s){o.setNextPlugin=function(e){},o.processTelemetry=function(t,n){u&&c(u,function(e){0<e.length&&r._getTelCtx(n).createNew(e).processNext(t)})},o.getChannelControls=function(){return u},o.initialize=function(t,n,r){var e,i,a;o.isInitialized()||(s.initialize(t,n,r),t.isCookieUseDisabled&&ve.disableCookies(),i=r,u=[],(e=(t||{}).channels)&&c(e,l),i&&(a=[],c(i,function(e){e.priority>Ke&&a.push(e)}),l(a)),c(u,function(e){return We(new ke(e,t,n),r)}))}}),r}var Ze=ve.arrForEach,et=ve.isNullOrUndefined,tt="_notificationManager",nt=function lr(e){this.listeners=[];var a=ve.arrForEach,t=!!(e||{}).perfEvtsSendAll;ee(lr,this,function(i){i.addNotificationListener=function(e){i.listeners.push(e)},i.removeNotificationListener=function(e){for(var t=ve.arrIndexOf(i.listeners,e);-1<t;)i.listeners.splice(t,1),t=ve.arrIndexOf(i.listeners,e)},i.eventsSent=function(t){a(i.listeners,function(e){e&&e.eventsSent&&setTimeout(function(){return e.eventsSent(t)},0)})},i.eventsDiscarded=function(t,n){a(i.listeners,function(e){e&&e.eventsDiscarded&&setTimeout(function(){return e.eventsDiscarded(t,n)},0)})},i.eventsSendRequest=function(n,r){a(i.listeners,function(e){if(e&&e.eventsSendRequest)if(r)setTimeout(function(){return e.eventsSendRequest(n,r)},0);else try{e.eventsSendRequest(n,r)}catch(t){}})},i.perfEvent=function(n){n&&(!t&&n.isChildEvt()||a(i.listeners,function(e){if(e&&e.perfEvent)if(n.isAsync)setTimeout(function(){return e.perfEvent(n)},0);else try{e.perfEvent(n)}catch(t){}}))}})},rt=function fr(){var t,u,c,n,l=!1;ee(fr,this,function(s){s._extensions=[],u=new Qe,t=[],s.isInitialized=function(){return l},s.initialize=function(e,t,r,n){if(s.isInitialized())throw Error("Core should not be initialized more than once");if(!e||et(e.instrumentationKey))throw Error("Please provide instrumentation key");c=n,s[tt]=n,s.config=e||{},e.extensions=et(e.extensions)?[]:e.extensions,(e.extensionConfig=et(e.extensionConfig)?{}:e.extensionConfig).NotificationManager=n,r=r||ve.objCreate({throwInternal:function(e,t,n,r,i){void 0===i&&(i=!1)},warnToConsole:function(e){},resetInternalMessageCount:function(){}}),s.logger=r;var i=[];i.push.apply(i,t.concat(e.extensions)),i=Xe(i);var a=[],o={};if(Ze(i,function(e){if(et(e)||et(e.initialize))throw Error("Extensions must provide callback to initialize");var t=e.priority,n=e.identifier;e&&t&&(et(o[t])?o[t]=n:r.warnToConsole("Two extensions have same priority #"+t+" - "+o[t]+", "+n)),(!t||t<u.priority)&&a.push(e)}),i.push(u),a.push(u),i=Xe(i),s._extensions=i,We(new ke([u],e,s),i),We(new ke(a,e,s),i),s._extensions=a,0===s.getTransmissionControls().length)throw Error("No channels available");l=!0,s.releaseQueue()},s.getTransmissionControls=function(){return u.getChannelControls()},s.track=function(e){e.iKey||(e.iKey=s.config.instrumentationKey),e.time||(e.time=ve.toISOString(new Date)),et(e.ver)&&(e.ver="4.0"),s.isInitialized()?s.getProcessTelContext().processNext(e):t.push(e)},s.getProcessTelContext=function(){var e=s._extensions,t=e;return e&&0!==e.length||(t=[u]),new ke(t,s.config,s)},s.getNotifyMgr=function(){return c||(c=ve.objCreate({addNotificationListener:function(e){},removeNotificationListener:function(e){},eventsSent:function(e){},eventsDiscarded:function(e,t){},eventsSendRequest:function(e,t){}}),s[tt]=c),c},s.getPerfMgr=function(){return n||s.config&&s.config.enablePerfMgr&&(n=new ie(s.getNotifyMgr())),n},s.setPerfMgr=function(e){n=e},s.eventCnt=function(){return t.length},s.releaseQueue=function(){0<t.length&&(Ze(t,function(e){s.getProcessTelContext().processNext(e)}),t=[])}})};__extends(function dr(){var e=rt.call(this)||this;return ee(dr,e,function(r,i){function t(e){var t=r.getNotifyMgr();t&&t.eventsDiscarded([e],h)}r.initialize=function(e,t,n,r){i.initialize(e,t,n||new De(e),r||new nt(e))},r.track=function(e){_e(r.getPerfMgr(),function(){return"AppInsightsCore:track"},function(){if(null===e)throw t(e),Error("Invalid telemetry item");!function(e){if(ve.isNullOrUndefined(e.name))throw t(e),Error("telemetry name required")}(e),i.track(e)},function(){return{item:e}},!e.sync)},r.addNotificationListener=function(e){var t=r.getNotifyMgr();t&&t.addNotificationListener(e)},r.removeNotificationListener=function(e){var t=r.getNotifyMgr();t&&t.removeNotificationListener(e)},r.pollInternalLogs=function(n){var e=r.config.diagnosticLogInterval;return e&&0<e||(e=1e4),setInterval(function(){var e=r.logger?r.logger.queue:[];ve.arrForEach(e,function(e){var t={name:n||"InternalMessageId: "+e.messageId,iKey:r.config.instrumentationKey,time:ve.toISOString(new Date),baseType:Me.dataType,baseData:{message:e.message}};r.track(t)}),e.length=0},e)}}),e},rt);var it="_aiHooks",at=["req","rsp","hkErr","fnErr"],ot="__proto__",st="constructor";function ut(e,t){if(e)for(var n=0;n<e.length&&!t(e[n],n);n++);}function ct(e,u,c,l,f){0<=f&&f<=2&&ut(e,function(e,t){var n=e.cbks,r=n[at[f]];if(r){u.ctx=function(){return l[t]=l[t]||{}};try{r.apply(u.inst,c)}catch(o){var i=u.err;try{var a=n[at[2]];a&&(u.err=o,a.apply(u.inst,c))}catch(s){}finally{u.err=i}}}})}var lt=Object.getPrototypeOf;function ft(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&&(ve.hasOwnProperty(e,t)?r=e:n&&(r=l(function(e){if(e){if(lt)return lt(e);var t=e[ot]||e[O]||e[st];if(t)return t}return null}(e),t,!1))),r}(e,t,r);if(i){var a=i[t];if(typeof a===v){var o,s=a[it];s||(c=s={i:0,n:t,f:a,h:[]},(o=function(){var n=arguments,e=c.h,r={name:c.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 ut(e,function(e){t.push(e)}),t}ct(e,r,i,t,0);var o=c.f;try{r.rslt=o.apply(this,n)}catch(s){throw r.err=s,ct(e,r,i,t,3),s}return ct(e,r,i,t,1),r.rslt})[it]=s,i[t]=o);var u={id:s.i,cbks:n,rm:function(){var n=this.id;ut(s.h,function(e,t){return e.id===n&&(s.h.splice(t,1),1)})}};return s.i++,s.h.push(u),u}}}var c;return null}var dt=(pt.requestContextHeader="Request-Context",pt.requestContextTargetKey="appId",pt.requestContextAppIdFormat="appId=cid-v1:",pt.requestIdHeader="Request-Id",pt.traceParentHeader="traceparent",pt.sdkContextHeader="Sdk-Context",pt.sdkContextHeaderAppIdRequest="appId",pt.requestContextHeaderLowerCase="request-context",pt);function pt(){}var gt=(ht.sanitizeKeyAndAddUniqueness=function(e,t,n){var r=t.length,i=ht.sanitizeKey(e,t);if(i.length!==r){for(var a=0,o=i;n[o]!==undefined;)a++,o=i.substring(0,ht.MAX_NAME_LENGTH-3)+ht.padNumber(a);i=o}return i},ht.sanitizeKey=function(e,t){var n;return t&&(t=ht.trim(t.toString())).length>ht.MAX_NAME_LENGTH&&(n=t.substring(0,ht.MAX_NAME_LENGTH),e.throwInternal(Ie.WARNING,be.NameTooLong,"name is too long. It has been truncated to "+ht.MAX_NAME_LENGTH+" characters.",{name:t},!0)),n||t},ht.sanitizeString=function(e,t,n){var r;return void 0===n&&(n=ht.MAX_STRING_LENGTH),t&&(n=n||ht.MAX_STRING_LENGTH,(t=ht.trim(t)).toString().length>n&&(r=t.toString().substring(0,n),e.throwInternal(Ie.WARNING,be.StringValueTooLong,"string value is too long. It has been truncated to "+n+" characters.",{value:t},!0))),r||t},ht.sanitizeUrl=function(e,t){return ht.sanitizeInput(e,t,ht.MAX_URL_LENGTH,be.UrlTooLong)},ht.sanitizeMessage=function(e,t){var n;return t&&t.length>ht.MAX_MESSAGE_LENGTH&&(n=t.substring(0,ht.MAX_MESSAGE_LENGTH),e.throwInternal(Ie.WARNING,be.MessageTruncated,"message is too long, it has been truncated to "+ht.MAX_MESSAGE_LENGTH+" characters.",{message:t},!0)),n||t},ht.sanitizeException=function(e,t){var n;return t&&t.length>ht.MAX_EXCEPTION_LENGTH&&(n=t.substring(0,ht.MAX_EXCEPTION_LENGTH),e.throwInternal(Ie.WARNING,be.ExceptionTruncated,"exception is too long, it has been truncated to "+ht.MAX_EXCEPTION_LENGTH+" characters.",{exception:t},!0)),n||t},ht.sanitizeProperties=function(e,t){if(t){var n={};for(var r in t){var i=t[r];if(ve.isObject(i)&&A())try{i=M().stringify(i)}catch(a){e.throwInternal(Ie.WARNING,be.CannotSerializeObjectNonSerializable,"custom property is not valid",{exception:a},!0)}i=ht.sanitizeString(e,i,ht.MAX_PROPERTY_LENGTH),n[r=ht.sanitizeKeyAndAddUniqueness(e,r,n)]=i}t=n}return t},ht.sanitizeMeasurements=function(e,t){if(t){var n={};for(var r in t){var i=t[r];n[r=ht.sanitizeKeyAndAddUniqueness(e,r,n)]=i}t=n}return t},ht.sanitizeId=function(e,t){return t?ht.sanitizeInput(e,t,ht.MAX_ID_LENGTH,be.IdTooLong).toString():t},ht.sanitizeInput=function(e,t,n,r){var i;return t&&(t=ht.trim(t)).length>n&&(i=t.substring(0,n),e.throwInternal(Ie.WARNING,r,"input is too long, it has been truncated to "+n+" characters.",{data:t},!0)),i||t},ht.padNumber=function(e){var t="00"+e;return t.substr(t.length-3)},ht.trim=function(e){return ve.isString(e)?e.replace(/^\s+|\s+$/g,""):e},ht.MAX_NAME_LENGTH=150,ht.MAX_ID_LENGTH=128,ht.MAX_PROPERTY_LENGTH=8192,ht.MAX_STRING_LENGTH=1024,ht.MAX_URL_LENGTH=2048,ht.MAX_MESSAGE_LENGTH=32768,ht.MAX_EXCEPTION_LENGTH=32768,ht);function ht(){}var mt=b(),vt=ve.isString,xt=null,yt=(St.createDomEvent=function(e){var t,n=null;return ve.isFunction(Event)?n=new Event(e):(t=_())&&t.createEvent&&(n=t.createEvent("Event")).initEvent(e,!0,!0),n},St.disableStorage=function(){St._canUseLocalStorage=!1,St._canUseSessionStorage=!1},St._getLocalStorageObject=function(){return St.canUseLocalStorage()?St._getVerifiedStorageObject(u.LocalStorage):null},St._getVerifiedStorageObject=function(e){var t,n,r=null;try{if(ve.isNullOrUndefined(P()))return null;n=new Date,(r=I(e===u.LocalStorage?"localStorage":"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},St.isInternalApplicationInsightsEndpoint=function(e){return!!~St._internalEndpoints.indexOf(e.toLowerCase())},St.canUseLocalStorage=function(){return St._canUseLocalStorage===undefined&&(St._canUseLocalStorage=!!St._getVerifiedStorageObject(u.LocalStorage)),St._canUseLocalStorage},St.getStorage=function(e,t){var n=St._getLocalStorageObject();if(null!==n)try{return n.getItem(t)}catch(r){St._canUseLocalStorage=!1,e.throwInternal(Ie.WARNING,be.BrowserCannotReadLocalStorage,"Browser failed read of local storage. "+St.getExceptionName(r),{exception:St.dump(r)})}return null},St.setStorage=function(e,t,n){var r=St._getLocalStorageObject();if(null!==r)try{return r.setItem(t,n),!0}catch(i){St._canUseLocalStorage=!1,e.throwInternal(Ie.WARNING,be.BrowserCannotWriteLocalStorage,"Browser failed write to local storage. "+St.getExceptionName(i),{exception:St.dump(i)})}return!1},St.removeStorage=function(e,t){var n=St._getLocalStorageObject();if(null!==n)try{return n.removeItem(t),!0}catch(r){St._canUseLocalStorage=!1,e.throwInternal(Ie.WARNING,be.BrowserFailedRemovalFromLocalStorage,"Browser failed removal of local storage item. "+St.getExceptionName(r),{exception:St.dump(r)})}return!1},St._getSessionStorageObject=function(){return St.canUseSessionStorage()?St._getVerifiedStorageObject(u.SessionStorage):null},St.canUseSessionStorage=function(){return St._canUseSessionStorage===undefined&&(St._canUseSessionStorage=!!St._getVerifiedStorageObject(u.SessionStorage)),St._canUseSessionStorage},St.getSessionStorageKeys=function(){var e=[];if(St.canUseSessionStorage())for(var t in I("sessionStorage"))e.push(t);return e},St.getSessionStorage=function(e,t){var n=St._getSessionStorageObject();if(null!==n)try{return n.getItem(t)}catch(r){St._canUseSessionStorage=!1,e.throwInternal(Ie.WARNING,be.BrowserCannotReadSessionStorage,"Browser failed read of session storage. "+St.getExceptionName(r),{exception:St.dump(r)})}return null},St.setSessionStorage=function(e,t,n){var r=St._getSessionStorageObject();if(null!==r)try{return r.setItem(t,n),!0}catch(i){St._canUseSessionStorage=!1,e.throwInternal(Ie.WARNING,be.BrowserCannotWriteSessionStorage,"Browser failed write to session storage. "+St.getExceptionName(i),{exception:St.dump(i)})}return!1},St.removeSessionStorage=function(e,t){var n=St._getSessionStorageObject();if(null!==n)try{return n.removeItem(t),!0}catch(r){St._canUseSessionStorage=!1,e.throwInternal(Ie.WARNING,be.BrowserFailedRemovalFromSessionStorage,"Browser failed removal of session storage item. "+St.getExceptionName(r),{exception:St.dump(r)})}return!1},St.disableCookies=function(){ve.disableCookies()},St.canUseCookies=function(e){if(ve._canUseCookies===undefined){ve._canUseCookies=!1;try{ve._canUseCookies=St.document.cookie!==undefined}catch(t){e.throwInternal(Ie.WARNING,be.CannotAccessCookie,"Cannot access document.cookie - "+St.getExceptionName(t),{exception:St.dump(t)})}}return ve._canUseCookies},St.disallowsSameSiteNone=function(e){return!(!vt(e)||!~e.indexOf("CPU iPhone OS 12")&&!~e.indexOf("iPad; CPU OS 12")&&!(~e.indexOf("Macintosh; Intel Mac OS X 10_14")&&~e.indexOf("Version/")&&~e.indexOf("Safari"))&&(!~e.indexOf("Macintosh; Intel Mac OS X 10_14")||(n=(t=e.length)-40,"AppleWebKit/605.1.15 (KHTML, like Gecko)"!=e.substring(0<=n?n:0,t)))&&!~e.indexOf("Chrome/5")&&!~e.indexOf("Chrome/6")&&(!~e.indexOf("UnrealEngine")||~e.indexOf("Chrome"))&&!~e.indexOf("UCBrowser/12")&&!~e.indexOf("UCBrowser/11"));var t,n},St.setCookie=function(e,t,n,r){var i,a,o;St.canUseCookies(e)&&(a=i="",r&&(i=";domain="+r),(o=j())&&"https:"===o.protocol&&(a=";secure",null===xt&&(xt=St.disallowsSameSiteNone((b()||{}).userAgent)),xt||(n+=";SameSite=None")),St.document.cookie=t+"="+n+i+";path=/"+a)},St.stringToBoolOrDefault=function(e,t){return void 0===t&&(t=!1),e===undefined||null===e?t:"true"==e.toString().toLowerCase()},St.getCookie=function(e,t){if(St.canUseCookies(e)){var n="";if(t&&t.length)for(var r=t+"=",i=St.document.cookie.split(";"),a=0;a<i.length;a++){var o=i[a];if((o=St.trim(o))&&!o.indexOf(r)){n=o.substring(r.length,i[a].length);break}}return n}},St.deleteCookie=function(e,t){St.canUseCookies(e)&&(St.document.cookie=t+"=;path=/;expires=Thu, 01 Jan 1970 00:00:01 GMT;")},St.newId=function(){for(var e="",t=1073741824*Math.random();0<t;)e+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[0|t%64],t=Math.floor(t/64);return e},St.random32=function(){return 4294967296*Math.random()|0},St.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=St.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)},St.getIEVersion=function(e){void 0===e&&(e=null);var t=e?e.toLowerCase():mt?(mt.userAgent||"").toLowerCase():"";if(~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},St.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},St.isCrossOriginError=function(e,t,n,r,i){return("Script error."===e||"Script error"===e)&&!i},St.dump=function(e){var t=Object[O].toString.call(e),n="";return"[object Error]"===t?n="{ stack: '"+e.stack+"', message: '"+e.message+"', name: '"+e.name+"'":A()&&(n=M().stringify(e)),t+n},St.getExceptionName=function(e){return"[object Error]"===Object[O].toString.call(e)?e.name:""},St.addEventHandler=function(e,t){return Se.Attach(N(),e,t)},St.IsBeaconApiSupported=function(){return"sendBeacon"in mt&&mt.sendBeacon},St.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},St.document=_()||{},St._canUseLocalStorage=undefined,St._canUseSessionStorage=undefined,St._internalEndpoints=["https://dc.services.visualstudio.com/v2/track","https://breeze.aimon.applicationinsights.io/v2/track","https://dc-int.services.visualstudio.com/v2/track"],St.NotSpecified="not_specified",St.trim=ve.strTrim,St.isArray=ve.isArray,St.isError=ve.isError,St.isDate=ve.isDate,St.toISOStringForIE8=ve.toISOString,St);function St(){}var Ct=(It.parseUrl=function(e){var t=It._htmlAnchorIdx,n=It._htmlAnchorElement,r=n[t];return It.document.createElement?n[t]||(r=n[t]=It.document.createElement("a")):r={host:It.parseHost(e,!0)},r.href=e,++t>=n.length&&(t=0),It._htmlAnchorIdx=t,r},It.getAbsoluteUrl=function(e){var t,n=It.parseUrl(e);return n&&(t=n.href),t},It.getPathName=function(e){var t,n=It.parseUrl(e);return n&&(t=n.pathname),t},It.getCompleteUrl=function(e,t){return e?e.toUpperCase()+" "+t:t},It.parseHost=function(e,t){var n=It.parseFullHost(e,t);if(n){var r=n.match(/(www[0-9]?\.)?(.[^/:]+)(\:[\d]+)?/i);if(null!=r&&3<r.length&&vt(r[2])&&0<r[2].length)return r[2]+(r[3]||"")}return n},It.parseFullHost=function(e,t){var n,r,i,a=null;return!e||null!=(n=e.match(/(\w*):\/\/(.[^/:]+)(\:[\d]+)?/i))&&2<n.length&&vt(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},It.document=_()||{},It._htmlAnchorIdx=0,It._htmlAnchorElement=[null,null,null,null,null],It);function It(){}var Tt=(Nt.canIncludeCorrelationHeader=function(e,t,n){if(!t||e&&e.disableCorrelationHeaders)return!1;if(e&&e.correlationHeaderExcludePatterns)for(var r=0;r<e.correlationHeaderExcludePatterns.length;r++)if(e.correlationHeaderExcludePatterns[r].test(t))return!1;var i=Ct.parseUrl(t).host.toLowerCase();if(i&&(~i.indexOf(":443")||~i.indexOf(":80"))&&(i=(Ct.parseFullHost(t,!0)||"").toLowerCase()),!(e&&e.enableCorsCorrelation||i===n))return!1;var a,o=e&&e.correlationHeaderDomains;if(o&&(ve.arrForEach(o,function(e){var t=RegExp(e.toLowerCase().replace(/\./g,".").replace(/\*/g,".*"));a=a||t.test(i)}),!a))return!1;var s=e&&e.correlationHeaderExcludedDomains;if(!s||0===s.length)return!0;for(r=0;r<s.length;r++)if(RegExp(s[r].toLowerCase().replace(/\./g,".").replace(/\*/g,".*")).test(i))return!1;return i&&0<i.length},Nt.getCorrelationContext=function(e){if(e){var t=Nt.getCorrelationContextValue(e,dt.requestContextTargetKey);if(t&&t!==Nt.correlationIdPrefix)return t}},Nt.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]}},Nt.correlationIdPrefix="cid-v1:",Nt);function Nt(){}var _t=(bt.ParseDependencyPath=function(e,t,n,r){var i,a,o,s=r,u=r,s=t&&0<t.length?(o=(i=Ct.parseUrl(t)).host,s||(null!=i.pathname?("/"!=(a=0===i.pathname.length?"/":i.pathname)[0]&&(a="/"+a),u=i.pathname,gt.sanitizeString(e,n?n+" "+a:a)):gt.sanitizeString(e,t))):o=r;return{target:o,name:s,data:u}},bt);function bt(){}var At=(Mt.Now=function(){var e=U();return e&&e.now&&e.timing?e.now()+e.timing.navigationStart:(new Date).getTime()},Mt.GetDuration=function(e,t){var n=null;return 0===e||0===t||ve.isNullOrUndefined(e)||ve.isNullOrUndefined(t)||(n=t-e),n},Mt);function Mt(){}var Et,Dt="Microsoft_ApplicationInsights_BypassAjaxInstrumentation",wt=(__extends(Lt,function(){}),Lt);function Lt(){return this}Et=function(){this.ver=1,this.sampleRate=100,this.tags={}},__extends(function(e,t,n){var r=Et.call(this)||this;return r.name=gt.sanitizeString(e,n)||yt.NotSpecified,r.data=t,r.time=ve.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},Et);var qt,Rt,kt=function(){},Ft=(qt=kt,__extends(Ht,qt),Ht);function Ht(){var e=qt.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}function Ot(e,t,n,r){var i=Rt.call(this)||this;return i.aiDataContract={ver:g.Required,name:g.Required,properties:g.Default,measurements:g.Default},i.name=gt.sanitizeString(e,t)||yt.NotSpecified,i.properties=gt.sanitizeProperties(e,n),i.measurements=gt.sanitizeMeasurements(e,r),i}Rt=Ft,__extends(Ot,Rt),Ot.envelopeType="Microsoft.ApplicationInsights.{0}.Event",Ot.dataType="EventData";var Pt,jt=(Pt=kt,__extends(Ut,Pt),Ut);function Ut(){var e=Pt.call(this)||this;return e.ver=2,e.exceptions=[],e.properties={},e.measurements={},e}var zt,Gt="error";function Bt(e,t,n,r,i,a){var o,s=zt.call(this)||this;return s.aiDataContract={ver:g.Required,exceptions:g.Required,severityLevel:g.Default,properties:g.Default,measurements:g.Default},"ver"in(o=t)&&"exceptions"in o&&"properties"in o?(s.exceptions=t.exceptions,s.properties=t.properties,s.measurements=t.measurements,t.severityLevel&&(s.severityLevel=t.severityLevel),t.id&&(s.id=t.id),t.problemGroup&&(s.problemGroup=t.problemGroup),s.ver=2,ve.isNullOrUndefined(t.isManual)||(s.isManual=t.isManual)):(s.exceptions=[new Xt(e,t)],s.properties=gt.sanitizeProperties(e,n)||{},s.measurements=gt.sanitizeMeasurements(e,r),i&&(s.severityLevel=i),a&&(s.id=a)),s}zt=jt,__extends(Bt,zt),Bt.CreateFromInterface=function(t,e,n,r){var i=e.exceptions&&ve.arrMap(e.exceptions,function(e){return Xt.CreateFromInterface(t,e)});return new Bt(t,__assign({},e,{exceptions:i}),n,r)},Bt.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&&ve.arrMap(t,function(e){return e.toInterface()})||undefined,severityLevel:i,properties:n,measurements:r,problemGroup:a,id:o,isManual:s}},Bt.CreateSimpleException=function(e,t,n,r,i,a){return{exceptions:[{hasFullStack:!0,message:e,stack:i,typeName:t}]}},Bt.envelopeType="Microsoft.ApplicationInsights.{0}.Exception",Bt.dataType="ExceptionData";var Wt,Xt=(Wt=function(){this.hasFullStack=!0,this.parsedStack=[]},__extends(Vt,Wt),Vt.prototype.toInterface=function(){var e=this.parsedStack instanceof Array&&ve.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}},Vt.CreateFromInterface=function(e,t){var n=t.parsedStack instanceof Array&&ve.arrMap(t.parsedStack,function(e){return $t.CreateFromInterface(e)})||t.parsedStack;return new Vt(e,__assign({},t,{parsedStack:n}))},Vt.parseStack=function(e){if(ve.isString(e)){for(var t=e.split("\n"),n=[],r=0,i=0,a=0;a<=t.length;a++){var o,s=t[a];$t.regex.test(s)&&(i+=(o=new $t(t[a],r++)).sizeInBytes,n.push(o))}if(32768<i)for(var u=0,c=n.length-1,l=0,f=u,d=c;u<c;){if(32768<(l+=n[u].sizeInBytes+n[c].sizeInBytes)){var p=d-f+1;n.splice(f,p);break}f=u,d=c,u++,c--}}return n},Vt);function Vt(e,t){var n,r,i=Wt.call(this)||this;return i.aiDataContract={id:g.Default,outerId:g.Default,typeName:g.Required,message:g.Required,hasFullStack:g.Default,stack:g.Default,parsedStack:g.Array},"hasFullStack"in t&&"typeName"in t?(i.typeName=t.typeName,i.message=t.message,i.stack=t.stack,i.parsedStack=t.parsedStack,i.hasFullStack=t.hasFullStack):(n=t,yt.isError(n)||(n=n[Gt]||n.evt||n),i.typeName=gt.sanitizeString(e,function(e){var t="";if(e&&!(t=e.typeName||e.name||""))try{var n=/function (.{1,})\(/.exec(e.constructor.toString()),t=n&&1<n.length?n[1]:""}catch(r){}return t}(n))||yt.NotSpecified,i.message=gt.sanitizeMessage(e,t.message)||yt.NotSpecified,r=t.stack,i.parsedStack=Vt.parseStack(r),i.stack=gt.sanitizeException(e,r),i.hasFullStack=yt.isArray(i.parsedStack)&&0<i.parsedStack.length),i}var Kt,$t=(Kt=function(){},__extends(Jt,Kt),Jt.CreateFromInterface=function(e){return new Jt(e,null)},Jt.prototype.toInterface=function(){return{level:this.level,method:this.method,assembly:this.assembly,fileName:this.fileName,line:this.line}},Jt.regex=/^([\s]+at)?(.*?)(\@|\s\(|\s)([^\(\@\n]+):([0-9]+):([0-9]+)(\)?)$/,Jt.baseSize=58,Jt);function Jt(e,t){var n,r,i=Kt.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=yt.trim(n),i.fileName="",i.line=0,(r=n.match(Jt.regex))&&5<=r.length&&(i.method=yt.trim(r[2])||i.method,i.fileName=yt.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+=Jt.baseSize,i.sizeInBytes+=i.level.toString().length,i.sizeInBytes+=i.line.toString().length,i}var Qt,Yt,Zt,en=(Qt=kt,__extends(tn,Qt),tn);function tn(){var e=Qt.call(this)||this;return e.ver=2,e.metrics=[],e.properties={},e.measurements={},e}(Zt=Yt={})[Zt.Measurement=0]="Measurement",Zt[Zt.Aggregation=1]="Aggregation";var nn,rn,an=(nn=function(){this.kind=Yt.Measurement},__extends(on,nn),on);function on(){var e=nn.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}function sn(e,t,n,r,i,a,o,s){var u=rn.call(this)||this;u.aiDataContract={ver:g.Required,metrics:g.Required,properties:g.Default};var c=new an;return c.count=0<r?r:undefined,c.max=isNaN(a)||null===a?undefined:a,c.min=isNaN(i)||null===i?undefined:i,c.name=gt.sanitizeString(e,t)||yt.NotSpecified,c.value=n,u.metrics=[c],u.properties=gt.sanitizeProperties(e,o),u.measurements=gt.sanitizeMeasurements(e,s),u}rn=en,__extends(sn,rn),sn.envelopeType="Microsoft.ApplicationInsights.{0}.Metric",sn.dataType="MetricData";var un,cn,ln=(un=Ft,__extends(fn,un),fn);function fn(){var e=un.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}function dn(e,t,n,r,i,a,o){var s=cn.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=gt.sanitizeId(e,o),s.url=gt.sanitizeUrl(e,n),s.name=gt.sanitizeString(e,t)||yt.NotSpecified,isNaN(r)||(s.duration=yt.msToTimeSpan(r)),s.properties=gt.sanitizeProperties(e,i),s.measurements=gt.sanitizeMeasurements(e,a),s}cn=ln,__extends(dn,cn),dn.envelopeType="Microsoft.ApplicationInsights.{0}.Pageview",dn.dataType="PageviewData";var pn,gn=(pn=kt,__extends(hn,pn),hn);function hn(){var e=pn.call(this)||this;return e.ver=2,e.success=!0,e.properties={},e.measurements={},e}var mn,vn=(mn=gn,__extends(xn,mn),xn.envelopeType="Microsoft.ApplicationInsights.{0}.RemoteDependency",xn.dataType="RemoteDependencyData",xn);function xn(e,t,n,r,i,a,o,s,u,c,l,f){void 0===u&&(u="Ajax");var d=mn.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=yt.msToTimeSpan(i),d.success=a,d.resultCode=o+"",d.type=gt.sanitizeString(e,u);var p=_t.ParseDependencyPath(e,n,s,r);return d.data=gt.sanitizeUrl(e,r)||p.data,d.target=gt.sanitizeString(e,p.target),c&&(d.target=d.target+" | "+c),d.name=gt.sanitizeString(e,p.name),d.properties=gt.sanitizeProperties(e,l),d.measurements=gt.sanitizeMeasurements(e,f),d}var yn,Sn,Cn=(yn=kt,__extends(In,yn),In);function In(){var e=yn.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}function Tn(e,t,n,r,i){var a=Sn.call(this)||this;return a.aiDataContract={ver:g.Required,message:g.Required,severityLevel:g.Default,properties:g.Default},t=t||yt.NotSpecified,a.message=gt.sanitizeMessage(e,t),a.properties=gt.sanitizeProperties(e,r),a.measurements=gt.sanitizeMeasurements(e,i),n&&(a.severityLevel=n),a}Sn=Cn,__extends(Tn,Sn),Tn.envelopeType="Microsoft.ApplicationInsights.{0}.Message",Tn.dataType="MessageData";var Nn,_n,bn,An,Mn=(Nn=ln,__extends(En,Nn),En);function En(){var e=Nn.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}function Dn(e,t,n,r,i,a,o){var s=_n.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=gt.sanitizeUrl(e,n),s.name=gt.sanitizeString(e,t)||yt.NotSpecified,s.properties=gt.sanitizeProperties(e,i),s.measurements=gt.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}_n=Mn,__extends(Dn,_n),Dn.envelopeType="Microsoft.ApplicationInsights.{0}.PageviewPerformance",Dn.dataType="PageviewPerformanceData",bn=wt,__extends(function(e,t){var n=bn.call(this)||this;return n.aiDataContract={baseType:g.Required,baseData:g.Required},n.baseType=e,n.baseData=t,n},bn),(An={})[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 wn=(Ln.create=function(e,t,n,r,i,a){if(n=gt.sanitizeString(r,n)||yt.NotSpecified,ve.isNullOrUndefined(e)||ve.isNullOrUndefined(t)||ve.isNullOrUndefined(n))throw Error("Input doesn't contain all required fields");var o={name:n,time:ve.toISOString(new Date),iKey:"",ext:a||{},tags:[],data:{},baseType:t,baseData:e};if(!ve.isNullOrUndefined(i))for(var s in i)i.hasOwnProperty(s)&&(o.data[s]=i[s]);return o},Ln);function Ln(){}var qn="AppInsightsPropertiesPlugin",Rn="properties",kn=ve.objKeys,Fn=ve.arrForEach;function Hn(e,t,n){var r=0,i=e[t],a=e[n];return i&&a&&(r=At.GetDuration(i,a)),r}function On(e,t,n,r,i){var a=0,o=Hn(n,r,i);return o&&(a=Pn(e,t,yt.msToTimeSpan(o))),a}function Pn(e,t,n){var r="ajaxPerf",i=0;return e&&t&&n&&((e[r]=e[r]||{})[t]=n,i=1),i}var jn=function(){var e=this;e.openDone=!1,e.setRequestHeaderDone=!1,e.sendDone=!1,e.abortDone=!1,e.stateChangeAttached=!1},Un=function pr(e,t,n){var r=this,i=n,A="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 jn,r.clientFailure=0,r.traceID=e,r.spanID=t,ee(pr,r,function(b){b.getAbsoluteUrl=function(){return b.requestUrl?Ct.getAbsoluteUrl(b.requestUrl):null},b.getPathName=function(){return b.requestUrl?gt.sanitizeUrl(i,Ct.getCompleteUrl(b.method,b.requestUrl)):null},b.CreateTrackItem=function(e,t,n){if(b.ajaxTotalDuration=Math.round(1e3*At.GetDuration(b.requestSentTime,b.responseFinishedTime))/1e3,b.ajaxTotalDuration<0)return null;var r,i,a,o,s,u,c,l,f=((o={id:"|"+b.traceID+"."+b.spanID,target:b.getAbsoluteUrl(),name:b.getPathName(),type:e,duration:b.ajaxTotalDuration,success:200<=+b.status&&+b.status<400,responseCode:+b.status,method:b.method})[Rn]={HttpMethod:b.method},o),d=f,p=(s=b).perfTiming,g=d[Rn]||{},h=0,m=ve.isString,v="duration",x="startTime",y="connect"+"End",S="request"+"Start",C="response"+"End",I="transferSize",T="encodedBodySize",N="decodedBodySize",_="serverTiming";return p?(h|=On(g,"End",p,"redirectStart","End"),h|=On(g,"domainLookup",p,"domainLookupStart","domainLookupEnd"),h|=On(g,"connect",p,"connectStart",y),h|=On(g,"request",p,S,"requestEnd"),h|=On(g,"response",p,"responseStart",C),h|=On(g,"networkConnect",p,x,y),h|=On(g,"sentRequest",p,S,C),h|=Pn(g,v,u=p[v]||Hn(p,x,C)||0),h|=Pn(g,"perfTotal",u),(c=p[_])&&(l={},Fn(c,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=l[a]||{};Fn(kn(n),function(e){var t=n[e];("name"!==e&&m(t)||ve.isNumber(t))&&(o[e]&&(t=o[e]+";"+t),!t&&m(t)||(o[e]=t))}),l[a]=o}),h|=Pn(g,_,l)),h|=Pn(g,I,p[I]),h|=Pn(g,T,p[T]),h|=Pn(g,N,p[N])):s.perfMark&&(h|=Pn(g,"missing",s.perfAttempts)),h&&(d[Rn]=g),t&&0<kn(b.requestHeaders).length&&(f[Rn]=f[Rn]||{},f[Rn].requestHeaders=b.requestHeaders),!n||(r=n())&&((i=r.correlationContext)&&(f.correlationContext=i),r.headerMap&&0<kn(r.headerMap).length&&(f[Rn]=f[Rn]||{},f[Rn].responseHeaders=r.headerMap),400<=b.status&&(a=r.type,f[Rn]=f[Rn]||{},""!==a&&"text"!==a||(f[Rn][A]=r[A]?r.statusText+" - "+r[A]:r.statusText),"json"===a&&(f[Rn][A]=r.response?r.statusText+" - "+JSON.stringify(r.response):r.statusText))),f}})},zn=(Gn.isValidTraceId=function(e){return e.match(/^[0-9a-f]{32}$/)&&"00000000000000000000000000000000"!==e},Gn.isValidSpanId=function(e){return e.match(/^[0-9a-f]{16}$/)&&"0000000000000000"!==e},Gn.prototype.toString=function(){return this.version+"-"+this.traceId+"-"+this.spanId+"-"+this.traceFlag},Gn.DEFAULT_TRACE_FLAG="01",Gn.DEFAULT_VERSION="00",Gn);function Gn(e,t){var n=this;n.traceFlag=Gn.DEFAULT_TRACE_FLAG,n.version=Gn.DEFAULT_VERSION,e&&Gn.isValidTraceId(e)?n.traceId=e:n.traceId=yt.generateW3CId(),t&&Gn.isValidSpanId(t)?n.spanId=t:n.spanId=yt.generateW3CId().substr(0,16)}var Bn="ai.ajxmn.",Wn="diagLog",Xn="ajaxData",Vn="throwInternal",Kn="fetch",$n=ve.isNullOrUndefined,Jn=ve.arrForEach,Qn=ve.objKeys,Yn=0;function Zn(e){var t="";try{$n(e)||$n(e[Xn])||$n(e[Xn].requestUrl)||(t+="(url: '"+e[Xn].requestUrl+"')")}catch(n){}return t}function er(e,t,n,r,i){e[Wn]()[Vn](Ie.CRITICAL,t,n,r,i)}function tr(e,t,n,r,i){e[Wn]()[Vn](Ie.WARNING,t,n,r,i)}function nr(t,n,r){return function(e){er(t,n,r,{ajaxDiagnosticsMessage:Zn(e.inst),exception:yt.dump(e.err)})}}function rr(e,t){return e&&t?e.indexOf(t):-1}var ir,ar=(ir=Oe,__extends(or,ir),or.getDefaultConfig=function(){return{maxAjaxCallsPerView:500,disableAjaxTracking:!1,disableFetchTracking:!0,disableCorrelationHeaders:!1,distributedTracingMode:F.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}},or.getEmptyConfig=function(){var t=this.getDefaultConfig();return Jn(Qn(t),function(e){t[e]=undefined}),t},or.prototype.processTelemetry=function(e,t){this.processNext(e,t)},or.identifier="AjaxDependencyPlugin",or);function or(){var e=ir.call(this)||this;e.identifier=or.identifier,e.priority=120;var T,N,_,b,A,M,E="trackDependencyDataInternal",t=j(),D=!1,w=!1,u=t&&t.host&&t.host.toLowerCase(),L=or.getEmptyConfig(),q=!1,i=0,R=0,k=[],s={};return ee(or,e,function(g,h){function m(e,t,n){k.push(e?ft(e[O],t,n,!1):null)}function v(e,t,n){var r=!1,i=((ve.isString(t)?t:(t||{}).url||"")||"").toLowerCase(),a=rr(i,"?"),o=rr(i,"#");return(-1===a||-1!==o&&o<a)&&(a=o),-1!==a&&(i=i.substring(0,a)),$n(e)?$n(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 x(e,t){var n=!0,r=w;return $n(e)||(n=!0===t||!$n(e[Xn])),r&&n}function y(e,t){var n,r,i;t.requestUrl&&b&&A&&(n=U())&&ve.isFunction(n.mark)&&(r=b+e+"#"+ ++Yn,n.mark(r),(i=n.getEntriesByName(r))&&1===i.length&&(t.perfMark=i[0]))}function S(a,o,s,u){var c=o.perfMark,l=U(),f=L.maxAjaxPerfLookupAttempts,d=L.ajaxPerfLookupDelay,p=o.requestUrl,g=0;!function h(){try{if(l&&c){g++;for(var e=null,t=l.getEntries(),n=t.length-1;0<=n;n--){var r=t[n];if(r){if("resource"===r.entryType)r.initiatorType!==a||-1===rr(r.name,p)&&-1===rr(p,r.name)||(e=r);else if("mark"===r.entryType&&r.name===c.name){o.perfTiming=e;break}if(r.startTime<c.startTime-1e3)break}}}!c||o.perfTiming||f<=g||!1===o.async?(c&&ve.isFunction(l.clearMarks)&&l.clearMarks(c.name),o.perfAttempts=g,s()):setTimeout(h,d)}catch(i){u(i)}}()}function C(e){var t="";try{$n(e)||(t+="string"==typeof e?"(url: '"+e+"')":"(url: '"+e.url+"')")}catch(n){er(g,be.FailedMonitorAjaxOpen,"Failed to grab failed fetch diagnostics message",{exception:yt.dump(n)})}return t}function I(e,t,i,n,r){function a(e,t,n){var r=n||{};r.fetchDiagnosticsMessage=C(i),t&&(r.exception=yt.dump(t)),tr(g,e,"Failed to calculate the duration of the fetch call, monitoring data for this fetch call won't be sent.",r)}n&&(n.responseFinishedTime=At.Now(),n.status=t,S("fetch",n,function(){var e=n.CreateTrackItem("Fetch",q,r);e?g[E](e):a(be.FailedMonitorAjaxDur,null,{requestSentTime:n.requestSentTime,responseFinishedTime:n.responseFinishedTime})},function(e){a(be.FailedMonitorAjaxGetCorrelationHeader,e,null)}))}g.initialize=function(e,t,n,r){if(!g.isInitialized()){h.initialize(e,t,n,r);var i=g._getTelCtx(),a=or.getDefaultConfig();Jn(Qn(a),function(e){L[e]=i.getConfig(or.identifier,e,a[e])});var o,s=L.distributedTracingMode;if(q=L.enableRequestHeaderTracking,A=L.enableAjaxPerfTracking,R=L.maxAjaxCallsPerView,M=L.enableResponseHeaderTracking,_=s===F.AI||s===F.AI_AND_W3C,N=s===F.AI_AND_W3C||s===F.W3C,A&&(o=e.instrumentationKey||"unkwn",b=5<o.length?Bn+o.substring(o.length-5)+".":Bn+o+"."),!1===L.disableAjaxTracking&&(!function(e){var t,n=!1;typeof XMLHttpRequest===H||$n(XMLHttpRequest)||(t=XMLHttpRequest[O],n=!($n(t)||$n(t.open)||$n(t.send)||$n(t.abort)));var r=yt.getIEVersion();if(r&&r<9&&(n=!1),n)try{(new XMLHttpRequest)[Xn]={};var i=XMLHttpRequest[O].open;XMLHttpRequest[O].open=i}catch(a){n=!1,er(e,be.FailedMonitorAjaxOpen,"Failed to enable XMLHttpRequest monitoring, extension is not supported",{exception:yt.dump(a)})}return n}(g)||w||(m(XMLHttpRequest,"open",{req:function(e,t,n,r){var i,a,o,s,u,c,l,f,d=e.inst,p=d[Xn];v(d,n)||!x(d,!0)||p&&p.xhrMonitoringState.openDone||(i=d,a=t,o=n,s=r,u=T&&T.telemetryTrace&&T.telemetryTrace.traceID||yt.generateW3CId(),c=yt.generateW3CId().substr(0,16),(l=new Un(u,c,g[Wn]())).method=a,l.requestUrl=o,l.xhrMonitoringState.openDone=!0,l.requestHeaders={},l.async=s,i[Xn]=l,(f=i)[Xn].xhrMonitoringState.stateChangeAttached=Se.Attach(f,"readystatechange",function(){try{f&&4===f.readyState&&x(f)&&((i=(r=f)[Xn]).responseFinishedTime=At.Now(),i.status=r.status,S("xmlhttprequest",i,function(){try{var e=i.CreateTrackItem("Ajax",q,function(){var e,t,i,n={statusText:r.statusText,headerMap:null,correlationContext:function(e){try{var t=e.getAllResponseHeaders();if(null!==t&&-1!==rr(t.toLowerCase(),dt.requestContextHeaderLowerCase)){var n=e.getResponseHeader(dt.requestContextHeader);return Tt.getCorrelationContext(n)}}catch(r){tr(g,be.FailedMonitorAjaxGetCorrelationHeader,"Failed to get Request-Context correlation header as it may be not included in the response or not accessible.",{ajaxDiagnosticsMessage:Zn(e),exception:yt.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!M||(e=r.getAllResponseHeaders())&&(t=ve.strTrim(e).split(/[\r\n]+/),i={},Jn(t,function(e){var t=e.split(": "),n=t.shift(),r=t.join(": ");i[n]=r}),n.headerMap=i),n});e?g[E](e):n(null,{requestSentTime:i.requestSentTime,responseFinishedTime:i.responseFinishedTime})}finally{try{r[Xn]=null}catch(t){}}},function(e){n(e,null)}))}catch(t){var e=yt.dump(t);e&&-1!==rr(e.toLowerCase(),"c00c023f")||er(g,be.FailedMonitorAjaxRSC,"Failed to monitor XMLHttpRequest 'readystatechange' event handler, monitoring data for this ajax call may be incorrect.",{ajaxDiagnosticsMessage:Zn(f),exception:e})}function n(e,t){var n=t||{};n.ajaxDiagnosticsMessage=Zn(r),e&&(n.exception=yt.dump(e)),tr(g,be.FailedMonitorAjaxDur,"Failed to calculate the duration of the ajax call, monitoring data for this ajax call won't be sent.",n)}var r,i}))},hkErr:nr(g,be.FailedMonitorAjaxOpen,"Failed to monitor XMLHttpRequest.open, monitoring data for this ajax call may be incorrect.")}),m(XMLHttpRequest,"send",{req:function(e,t){var n=e.inst,r=n[Xn];x(n)&&!r.xhrMonitoringState.sendDone&&(y("xhr",r),r.requestSentTime=At.Now(),g.includeCorrelationHeaders(r,undefined,undefined,n),r.xhrMonitoringState.sendDone=!0)},hkErr:nr(g,be.FailedMonitorAjaxSend,"Failed to monitor XMLHttpRequest, monitoring data for this ajax call may be incorrect.")}),m(XMLHttpRequest,"abort",{req:function(e){var t=e.inst,n=t[Xn];x(t)&&!n.xhrMonitoringState.abortDone&&(n.aborted=1,n.xhrMonitoringState.abortDone=!0)},hkErr:nr(g,be.FailedMonitorAjaxAbort,"Failed to monitor XMLHttpRequest.abort, monitoring data for this ajax call may be incorrect.")}),q&&m(XMLHttpRequest,"setRequestHeader",{req:function(e,t,n){var r=e.inst;x(r)&&(r[Xn].requestHeaders[t]=n)},hkErr:nr(g,be.FailedMonitorAjaxSetRequestHeader,"Failed to monitor XMLHttpRequest.setRequestHeader, monitoring data for this ajax call may be incorrect.")}),w=!0)),(p=!(l=P())||$n(l.Request)||$n(l.Request[O])||$n(l[Kn])?null:l[Kn])&&(f=P(),d=p.polyfill,!1===L.disableFetchTracking?(k.push(ft(f,Kn,{req:function(e,t,n){var r,i,a;!D||v(null,t,n)||d&&w||(r=e.ctx(),i=function(e,t){var n=T&&T.telemetryTrace&&T.telemetryTrace.traceID||yt.generateW3CId(),r=yt.generateW3CId().substr(0,16),i=new Un(n,r,g[Wn]());i.requestSentTime=At.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={};return q&&new Headers((t?t.headers:0)||e instanceof Request&&e.headers||{}).forEach(function(e,t){o[t]=e}),i.requestHeaders=o,y("fetch",i),i}(t,n),(a=g.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 I(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(dt.requestContextHeader);return Tt.getCorrelationContext(t)}catch(n){tr(g,be.FailedMonitorAjaxGetCorrelationHeader,"Failed to get Request-Context correlation header as it may be not included in the response or not accessible.",{fetchDiagnosticsMessage:C(e),exception:yt.dump(n)})}}(t)};return M&&(n={},t.headers.forEach(function(e,t){n[t]=e}),e.headerMap=n),e}),t})["catch"](function(e){throw I(0,0,t,n,null,e.message),e}))},hkErr:nr(g,be.FailedMonitorAjaxOpen,"Failed to monitor Window.fetch, monitoring data for this fetch call may be incorrect.")})),D=!0):d&&k.push(ft(f,Kn,{req:function(e,t,n){v(null,t,n)}})),d&&(f[Kn].polyfill=d)),0<n.length&&n){for(var u=void 0,c=0;!u&&c<n.length;)n[c]&&n[c].identifier===qn&&(u=n[c]),c++;u&&(T=u.context)}}var l,f,d,p},g.teardown=function(){Jn(k,function(e){e.rm()}),w=D=!(k=[]),g.setInitialized(!1)},g.trackDependencyData=function(e,t){g[E](e,t)},g.includeCorrelationHeaders=function(e,t,n,r){var i,a,o,s=g._currentWindowHost||u;return t?(Tt.canIncludeCorrelationHeader(L,e.getAbsoluteUrl(),s)&&((n=n||{}).headers=new Headers(n.headers||t instanceof Request&&t.headers||{}),_&&(i="|"+e.traceID+"."+e.spanID,n.headers.set(dt.requestIdHeader,i),q&&(e.requestHeaders[dt.requestIdHeader]=i)),(a=L.appId||T&&T.appId())&&(n.headers.set(dt.requestContextHeader,dt.requestContextAppIdFormat+a),q&&(e.requestHeaders[dt.requestContextHeader]=dt.requestContextAppIdFormat+a)),N&&(o=new zn(e.traceID,e.spanID),n.headers.set(dt.traceParentHeader,o.toString()),q&&(e.requestHeaders[dt.traceParentHeader]=o.toString()))),n):r?(Tt.canIncludeCorrelationHeader(L,e.getAbsoluteUrl(),s)&&(_&&(i="|"+e.traceID+"."+e.spanID,r.setRequestHeader(dt.requestIdHeader,i),q&&(e.requestHeaders[dt.requestIdHeader]=i)),(a=L.appId||T&&T.appId())&&(r.setRequestHeader(dt.requestContextHeader,dt.requestContextAppIdFormat+a),q&&(e.requestHeaders[dt.requestContextHeader]=dt.requestContextAppIdFormat+a)),N&&(o=new zn(e.traceID,e.spanID),r.setRequestHeader(dt.traceParentHeader,o.toString()),q&&(e.requestHeaders[dt.traceParentHeader]=o.toString()))),r):undefined},g[E]=function(e,t,n){var r;-1===R||i<R?(L.distributedTracingMode!==F.W3C&&L.distributedTracingMode!==F.AI_AND_W3C||"string"!=typeof e.id||"."===e.id[e.id.length-1]||(e.id+="."),ve.isNullOrUndefined(e.startTime)&&(e.startTime=new Date),r=wn.create(e,vn.dataType,vn.envelopeType,g[Wn](),t,n),g.core.track(r)):i===R&&er(g,be.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=ar,e.ajaxRecord=Un,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})};"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e.Microsoft=e.Microsoft||{},e.Microsoft.ApplicationInsights=e.Microsoft.ApplicationInsights||{})); | ||
//# sourceMappingURL=applicationinsights-dependencies-js.min.js.map |
{ | ||
"name": "@microsoft/applicationinsights-dependencies-js", | ||
"version": "2.5.6", | ||
"version": "2.5.7", | ||
"description": "Microsoft Application Insights XHR dependencies plugin", | ||
@@ -24,3 +24,3 @@ "main": "dist/applicationinsights-dependencies-js.js", | ||
"grunt": "1.0.1", | ||
"grunt-contrib-qunit": "2.0.0", | ||
"grunt-contrib-qunit": "^3.1.0", | ||
"grunt-contrib-uglify": "3.1.0", | ||
@@ -37,8 +37,8 @@ "grunt-ts": "^6.0.0-beta.15", | ||
"dependencies": { | ||
"@microsoft/dynamicproto-js": "^0.5.2", | ||
"@microsoft/dynamicproto-js": "^1.0.0", | ||
"@microsoft/applicationinsights-shims" : "1.0.1", | ||
"@microsoft/applicationinsights-core-js": "2.5.6", | ||
"@microsoft/applicationinsights-common": "2.5.6" | ||
"@microsoft/applicationinsights-core-js": "2.5.7", | ||
"@microsoft/applicationinsights-common": "2.5.7" | ||
}, | ||
"license": "MIT" | ||
} |
@@ -36,3 +36,3 @@ // Copyright (c) Microsoft Corporation. All rights reserved. | ||
let _global = getGlobal(); | ||
if (!_global || | ||
if (!_global || | ||
_isNullOrUndefined((_global as any).Request) || | ||
@@ -43,7 +43,7 @@ _isNullOrUndefined((_global as any).Request[strPrototype]) || | ||
} | ||
return _global[strFetch]; | ||
} | ||
/** | ||
/** | ||
* Determines whether ajax monitoring can be enabled on this document | ||
@@ -86,3 +86,3 @@ * @returns True if Ajax monitoring is supported on this page, otherwise false | ||
exception: Util.dump(e) | ||
}); | ||
}); | ||
} | ||
@@ -217,3 +217,3 @@ } | ||
let _disabledUrls:any = {}; | ||
dynamicProto(AjaxMonitor, this, (_self, base) => { | ||
@@ -228,3 +228,3 @@ _self.initialize = (config: IConfiguration & IConfig, core: IAppInsightsCore, extensions: IPlugin[], pluginChain?:ITelemetryPluginChain) => { | ||
}); | ||
let distributedTracingMode = _config.distributedTracingMode; | ||
@@ -250,5 +250,5 @@ _enableRequestHeaderTracking = _config.enableRequestHeaderTracking; | ||
} | ||
_instrumentFetch(); | ||
if (extensions.length > 0 && extensions) { | ||
@@ -268,3 +268,3 @@ let propExt: any, extIx = 0; | ||
}; | ||
_self.teardown = () => { | ||
@@ -345,3 +345,3 @@ // Remove all instrumentation hooks | ||
} | ||
return xhr; | ||
@@ -352,3 +352,3 @@ } | ||
} | ||
_self[strTrackDependencyDataInternal] = (dependency: IDependencyTelemetry, properties?: { [key: string]: any }, systemProperties?: { [key: string]: any }) => { | ||
@@ -358,5 +358,5 @@ if (_maxAjaxCallsPerView === -1 || _trackAjaxAttempts < _maxAjaxCallsPerView) { | ||
// Non-w3c format is |abc.def | ||
// @todo Remove if better solution is available, e.g. handle in portal | ||
// @todo Remove if better solution is available, e.g. handle in portal | ||
if ((_config.distributedTracingMode === DistributedTracingModes.W3C | ||
|| _config.distributedTracingMode === DistributedTracingModes.AI_AND_W3C) | ||
|| _config.distributedTracingMode === DistributedTracingModes.AI_AND_W3C) | ||
&& typeof dependency.id === "string" && dependency.id[dependency.id.length - 1] !== "." | ||
@@ -366,2 +366,5 @@ ) { | ||
} | ||
if (CoreUtils.isNullOrUndefined(dependency.startTime)) { | ||
dependency.startTime = new Date(); | ||
} | ||
const item = TelemetryItemCreator.create<IDependencyTelemetry>( | ||
@@ -400,4 +403,4 @@ dependency, | ||
let fetchData: ajaxRecord; | ||
if (_fetchInitialized && | ||
!_isDisabledRequest(null, input, init) && | ||
if (_fetchInitialized && | ||
!_isDisabledRequest(null, input, init) && | ||
// If we have a polyfil and XHR instrumented then let XHR report otherwise we get duplicates | ||
@@ -425,3 +428,3 @@ !(isPolyfill && _xhrInitialized)) { | ||
}; | ||
if (_enableResponseHeaderTracking) { | ||
@@ -432,9 +435,9 @@ const responseHeaderMap = {}; | ||
}); | ||
ajaxResponse.headerMap = responseHeaderMap; | ||
} | ||
return ajaxResponse; | ||
}); | ||
return response; | ||
@@ -449,6 +452,6 @@ }) | ||
// Create an error callback to report any hook errors | ||
hkErr: _createErrorCallbackFunc(_self, _InternalMessageId.FailedMonitorAjaxOpen, | ||
hkErr: _createErrorCallbackFunc(_self, _InternalMessageId.FailedMonitorAjaxOpen, | ||
"Failed to monitor Window.fetch, monitoring data for this fetch call may be incorrect.") | ||
})); | ||
_fetchInitialized = true; | ||
@@ -488,3 +491,3 @@ } else if (isPolyfill) { | ||
let ajaxData = xhr[strAjaxData]; | ||
if (!_isDisabledRequest(xhr, url) && _isMonitoredXhrInstance(xhr, true) && | ||
if (!_isDisabledRequest(xhr, url) && _isMonitoredXhrInstance(xhr, true) && | ||
(!ajaxData || !ajaxData.xhrMonitoringState.openDone)) { | ||
@@ -494,6 +497,6 @@ _openHandler(xhr, method, url, async); | ||
}, | ||
hkErr: _createErrorCallbackFunc(_self, _InternalMessageId.FailedMonitorAjaxOpen, | ||
hkErr: _createErrorCallbackFunc(_self, _InternalMessageId.FailedMonitorAjaxOpen, | ||
"Failed to monitor XMLHttpRequest.open, monitoring data for this ajax call may be incorrect.") | ||
}); | ||
// Instrument send | ||
@@ -511,3 +514,3 @@ _hookProto(XMLHttpRequest, "send", { | ||
}, | ||
hkErr: _createErrorCallbackFunc(_self, _InternalMessageId.FailedMonitorAjaxSend, | ||
hkErr: _createErrorCallbackFunc(_self, _InternalMessageId.FailedMonitorAjaxSend, | ||
"Failed to monitor XMLHttpRequest, monitoring data for this ajax call may be incorrect.") | ||
@@ -526,3 +529,3 @@ }); | ||
}, | ||
hkErr: _createErrorCallbackFunc(_self, _InternalMessageId.FailedMonitorAjaxAbort, | ||
hkErr: _createErrorCallbackFunc(_self, _InternalMessageId.FailedMonitorAjaxAbort, | ||
"Failed to monitor XMLHttpRequest.abort, monitoring data for this ajax call may be incorrect.") | ||
@@ -540,3 +543,3 @@ }); | ||
}, | ||
hkErr: _createErrorCallbackFunc(_self, _InternalMessageId.FailedMonitorAjaxSetRequestHeader, | ||
hkErr: _createErrorCallbackFunc(_self, _InternalMessageId.FailedMonitorAjaxSetRequestHeader, | ||
"Failed to monitor XMLHttpRequest.setRequestHeader, monitoring data for this ajax call may be incorrect.") | ||
@@ -686,3 +689,3 @@ }); | ||
}; | ||
if (_enableResponseHeaderTracking) { | ||
@@ -701,7 +704,7 @@ const headers = xhr.getAllResponseHeaders(); | ||
}); | ||
ajaxResponse.headerMap = responseHeaderMap; | ||
} | ||
} | ||
return ajaxResponse; | ||
@@ -787,3 +790,3 @@ }); | ||
(_indexOf(entry.name, requestUrl) !== -1 || _indexOf(requestUrl, entry.name) !== -1)) { | ||
perfTiming = entry as PerformanceResourceTiming; | ||
@@ -796,3 +799,3 @@ } | ||
} | ||
if (entry.startTime < perfMark.startTime - 1000) { | ||
@@ -807,3 +810,3 @@ // Fallback to try and reduce the time spent looking for the perf entry | ||
if (!perfMark || // - we don't have a perfMark or | ||
ajaxData.perfTiming || // - we have not found the perf entry or | ||
ajaxData.perfTiming || // - we have not found the perf entry or | ||
attempt >= maxAttempts || // - we have tried too many attempts or | ||
@@ -823,3 +826,3 @@ ajaxData.async === false) { // - this is a sync request | ||
// We need to wait for the browser to populate the window.performance entry | ||
// This needs to be at least 1ms as waiting <= 1 (on firefox) is not enough time for fetch or xhr, | ||
// This needs to be at least 1ms as waiting <= 1 (on firefox) is not enough time for fetch or xhr, | ||
// this is a scheduling issue for the browser implementation | ||
@@ -945,3 +948,3 @@ setTimeout(locateResourceTiming, retryDelay); | ||
} | ||
public initialize(config: IConfiguration & IConfig, core: IAppInsightsCore, extensions: IPlugin[], pluginChain?:ITelemetryPluginChain) { | ||
@@ -948,0 +951,0 @@ // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging |
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 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
2525628
13780
+ Added@microsoft/applicationinsights-common@2.5.7(transitive)
+ Added@microsoft/applicationinsights-core-js@2.5.7(transitive)
+ Added@microsoft/dynamicproto-js@1.1.11(transitive)
- Removed@microsoft/applicationinsights-common@2.5.6(transitive)
- Removed@microsoft/applicationinsights-core-js@2.5.6(transitive)
- Removed@microsoft/dynamicproto-js@0.5.3(transitive)