az416426.vo.msecnd.net Open in urlscan Pro
2606:2800:133:206e:1315:22a5:2006:24fd  Public Scan

URL: https://az416426.vo.msecnd.net/scripts/a/ai.0.js
Submission Tags: falconsandbox
Submission: On November 20 via api from US — Scanned from DE

Form analysis 0 forms found in the DOM

Text Content

"use strict";var AI,Microsoft,__extends=this&&this.__extends||function(){var i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}}();function _endsWith(e,t){var n=e.length,i=n-t.length;return e.substring(0<=i?i:0,n)===t}!function(e){e.ApplicationInsights||(e.ApplicationInsights={})}(Microsoft||(Microsoft={})),function(e){var t;t=function n(){},(e.Telemetry||(e.Telemetry={})).Base=t}(Microsoft||(Microsoft={})),function(e){var t;t=function n(){this.ver=1,this.sampleRate=100,this.tags={}},(e.Telemetry||(e.Telemetry={})).Envelope=t}(Microsoft||(Microsoft={})),function(e){var t;(t=e.ApplicationInsights||(e.ApplicationInsights={})).Context||(t.Context={})}(Microsoft||(Microsoft={})),function(e){var t;(t=e.ApplicationInsights||(e.ApplicationInsights={})).Context||(t.Context={})}(Microsoft||(Microsoft={})),function(e){var t;(t=e.ApplicationInsights||(e.ApplicationInsights={})).Context||(t.Context={})}(Microsoft||(Microsoft={})),function(e){var t;(t=e.ApplicationInsights||(e.ApplicationInsights={})).Context||(t.Context={})}(Microsoft||(Microsoft={})),function(e){var t;(t=e.ApplicationInsights||(e.ApplicationInsights={})).Context||(t.Context={})}(Microsoft||(Microsoft={})),function(e){var t;(t=e.ApplicationInsights||(e.ApplicationInsights={})).Context||(t.Context={})}(Microsoft||(Microsoft={})),function(e){var t;(t=e.ApplicationInsights||(e.ApplicationInsights={})).Context||(t.Context={})}(Microsoft||(Microsoft={})),function(e){var t;(t=e.ApplicationInsights||(e.ApplicationInsights={})).Context||(t.Context={})}(Microsoft||(Microsoft={})),function(e){e.ApplicationInsights||(e.ApplicationInsights={})}(Microsoft||(Microsoft={})),function(e){e.ApplicationInsights||(e.ApplicationInsights={})}(Microsoft||(Microsoft={})),function(e){e.ApplicationInsights||(e.ApplicationInsights={})}(Microsoft||(Microsoft={})),function(e){var t;(t=e.SeverityLevel||(e.SeverityLevel={}))[t.Verbose=0]="Verbose",t[t.Information=1]="Information",t[t.Warning=2]="Warning",t[t.Error=3]="Error",t[t.Critical=4]="Critical"}(AI||(AI={})),function(e){e.ApplicationInsights||(e.ApplicationInsights={})}(Microsoft||(Microsoft={})),function(e){!function(s){var l,e,c,t;(e=l=s.LoggingSeverity||(s.LoggingSeverity={}))[e.CRITICAL=0]="CRITICAL",e[e.WARNING=1]="WARNING",(t=c=s._InternalMessageId||(s._InternalMessageId={}))[t.BrowserDoesNotSupportLocalStorage=0]="BrowserDoesNotSupportLocalStorage",t[t.BrowserCannotReadLocalStorage=1]="BrowserCannotReadLocalStorage",t[t.BrowserCannotReadSessionStorage=2]="BrowserCannotReadSessionStorage",t[t.BrowserCannotWriteLocalStorage=3]="BrowserCannotWriteLocalStorage",t[t.BrowserCannotWriteSessionStorage=4]="BrowserCannotWriteSessionStorage",t[t.BrowserFailedRemovalFromLocalStorage=5]="BrowserFailedRemovalFromLocalStorage",t[t.BrowserFailedRemovalFromSessionStorage=6]="BrowserFailedRemovalFromSessionStorage",t[t.CannotSendEmptyTelemetry=7]="CannotSendEmptyTelemetry",t[t.ClientPerformanceMathError=8]="ClientPerformanceMathError",t[t.ErrorParsingAISessionCookie=9]="ErrorParsingAISessionCookie",t[t.ErrorPVCalc=10]="ErrorPVCalc",t[t.ExceptionWhileLoggingError=11]="ExceptionWhileLoggingError",t[t.FailedAddingTelemetryToBuffer=12]="FailedAddingTelemetryToBuffer",t[t.FailedMonitorAjaxAbort=13]="FailedMonitorAjaxAbort",t[t.FailedMonitorAjaxDur=14]="FailedMonitorAjaxDur",t[t.FailedMonitorAjaxOpen=15]="FailedMonitorAjaxOpen",t[t.FailedMonitorAjaxRSC=16]="FailedMonitorAjaxRSC",t[t.FailedMonitorAjaxSend=17]="FailedMonitorAjaxSend",t[t.FailedMonitorAjaxGetCorrelationHeader=18]="FailedMonitorAjaxGetCorrelationHeader",t[t.FailedToAddHandlerForOnBeforeUnload=19]="FailedToAddHandlerForOnBeforeUnload",t[t.FailedToSendQueuedTelemetry=20]="FailedToSendQueuedTelemetry",t[t.FailedToReportDataLoss=21]="FailedToReportDataLoss",t[t.FlushFailed=22]="FlushFailed",t[t.MessageLimitPerPVExceeded=23]="MessageLimitPerPVExceeded",t[t.MissingRequiredFieldSpecification=24]="MissingRequiredFieldSpecification",t[t.NavigationTimingNotSupported=25]="NavigationTimingNotSupported",t[t.OnError=26]="OnError",t[t.SessionRenewalDateIsZero=27]="SessionRenewalDateIsZero",t[t.SenderNotInitialized=28]="SenderNotInitialized",t[t.StartTrackEventFailed=29]="StartTrackEventFailed",t[t.StopTrackEventFailed=30]="StopTrackEventFailed",t[t.StartTrackFailed=31]="StartTrackFailed",t[t.StopTrackFailed=32]="StopTrackFailed",t[t.TelemetrySampledAndNotSent=33]="TelemetrySampledAndNotSent",t[t.TrackEventFailed=34]="TrackEventFailed",t[t.TrackExceptionFailed=35]="TrackExceptionFailed",t[t.TrackMetricFailed=36]="TrackMetricFailed",t[t.TrackPVFailed=37]="TrackPVFailed",t[t.TrackPVFailedCalc=38]="TrackPVFailedCalc",t[t.TrackTraceFailed=39]="TrackTraceFailed",t[t.TransmissionFailed=40]="TransmissionFailed",t[t.FailedToSetStorageBuffer=41]="FailedToSetStorageBuffer",t[t.FailedToRestoreStorageBuffer=42]="FailedToRestoreStorageBuffer",t[t.InvalidBackendResponse=43]="InvalidBackendResponse",t[t.FailedToFixDepricatedValues=44]="FailedToFixDepricatedValues",t[t.InvalidDurationValue=45]="InvalidDurationValue",t[t.CannotSerializeObject=46]="CannotSerializeObject",t[t.CannotSerializeObjectNonSerializable=47]="CannotSerializeObjectNonSerializable",t[t.CircularReferenceDetected=48]="CircularReferenceDetected",t[t.ClearAuthContextFailed=49]="ClearAuthContextFailed",t[t.ExceptionTruncated=50]="ExceptionTruncated",t[t.IllegalCharsInName=51]="IllegalCharsInName",t[t.ItemNotInArray=52]="ItemNotInArray",t[t.MaxAjaxPerPVExceeded=53]="MaxAjaxPerPVExceeded",t[t.MessageTruncated=54]="MessageTruncated",t[t.NameTooLong=55]="NameTooLong",t[t.SampleRateOutOfRange=56]="SampleRateOutOfRange",t[t.SetAuthContextFailed=57]="SetAuthContextFailed",t[t.SetAuthContextFailedAccountName=58]="SetAuthContextFailedAccountName",t[t.StringValueTooLong=59]="StringValueTooLong",t[t.StartCalledMoreThanOnce=60]="StartCalledMoreThanOnce",t[t.StopCalledWithoutStart=61]="StopCalledWithoutStart",t[t.TelemetryInitializerFailed=62]="TelemetryInitializerFailed",t[t.TrackArgumentsNotSpecified=63]="TrackArgumentsNotSpecified",t[t.UrlTooLong=64]="UrlTooLong",t[t.SessionStorageBufferFull=65]="SessionStorageBufferFull",t[t.CannotAccessCookie=66]="CannotAccessCookie",t[t.IdTooLong=67]="IdTooLong";var g=function(){function a(e,t,n,i){void 0===n&&(n=!1),this.messageId=e,this.message=(n?a.AiUserActionablePrefix:a.AiNonUserActionablePrefix)+c[e].toString();var o=(t?" message:"+a.sanitizeDiagnosticText(t):"")+(i?" props:"+a.sanitizeDiagnosticText(JSON.stringify(i)):"");this.message+=o}return a.sanitizeDiagnosticText=function(e){return'"'+e.replace(/\"/g,"")+'"'},a.AiNonUserActionablePrefix="AI (Internal): ",a.AiUserActionablePrefix="AI: ",a}();s._InternalLogMessage=g;var n=function(){function r(){}return r.throwInternal=function(e,t,n,i,o){void 0===o&&(o=!1);var a=new g(t,n,o,i);if(this.enableDebugExceptions())throw a;if(void 0!==a&&a&&"undefined"!=typeof a.message){if(o){var r=c[a.messageId];this._messageLogged[r]&&!this.verboseLogging()||(this.warnToConsole(a.message),this._messageLogged[r]=!0)}else this.verboseLogging()&&this.warnToConsole(a.message);this.logInternalMessage(e,a)}},r.warnToConsole=function(e){"undefined"!=typeof console&&console&&("function"==typeof console.warn?console.warn(e):"function"==typeof console.log&&console.log(e))},r.resetInternalMessageCount=function(){this._messageCount=0,this._messageLogged={}},r.clearInternalMessageLoggedTypes=function(){if(s.Util.canUseSessionStorage())for(var e=s.Util.getSessionStorageKeys(),t=0;t<e.length;t++)0===e[t].indexOf(r.AIInternalMessagePrefix)&&s.Util.removeSessionStorage(e[t])},r.setMaxInternalMessageLimit=function(e){if(!e)throw new Error("limit cannot be undefined.");this.MAX_INTERNAL_MESSAGE_LIMIT=e},r.logInternalMessage=function(e,t){if(!this._areInternalMessagesThrottled()){var n=!0,i=r.AIInternalMessagePrefix+c[t.messageId];if(s.Util.canUseSessionStorage())s.Util.getSessionStorage(i)?n=!1:s.Util.setSessionStorage(i,"1");else this._messageLogged[i]?n=!1:this._messageLogged[i]=!0;if(n&&((this.verboseLogging()||e===l.CRITICAL)&&(this.queue.push(t),this._messageCount++),this._messageCount==this.MAX_INTERNAL_MESSAGE_LIMIT)){var o="Internal events throttle limit per PageView reached for this app.",a=new g(c.MessageLimitPerPVExceeded,o,!1);this.queue.push(a),this.warnToConsole(o)}}},r._areInternalMessagesThrottled=function(){return this._messageCount>=this.MAX_INTERNAL_MESSAGE_LIMIT},r.AIInternalMessagePrefix="AITR_",r.enableDebugExceptions=function(){return!1},r.verboseLogging=function(){return!1},r.queue=[],r.MAX_INTERNAL_MESSAGE_LIMIT=25,r._messageCount=0,r._messageLogged={},r}();s._InternalLogging=n}(e.ApplicationInsights||(e.ApplicationInsights={}))}(Microsoft||(Microsoft={})),function(e){var t,n;t=e.ApplicationInsights||(e.ApplicationInsights={}),n=function(){function e(){}return e.newId=function(){for(var e="",t=1073741824*Math.random();0<t;){e+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(t%64),t=Math.floor(t/64)}return e},e}(),t.UtilHelpers=n}(Microsoft||(Microsoft={})),function(e){!function(o){var a,e;(e=a||(a={}))[e.LocalStorage=0]="LocalStorage",e[e.SessionStorage=1]="SessionStorage";var t=function(){function r(){}return r.disableStorage=function(){r._canUseLocalStorage=!1,r._canUseSessionStorage=!1},r._getLocalStorageObject=function(){return r.canUseLocalStorage()?r._getVerifiedStorageObject(a.LocalStorage):null},r._getVerifiedStorageObject=function(e){var t,n,i=null;try{n=new Date,(i=e===a.LocalStorage?window.localStorage:window.sessionStorage).setItem(n,n),t=i.getItem(n)!=n,i.removeItem(n),t&&(i=null)}catch(o){i=null}return i},r.isInternalApplicationInsightsEndpoint=function(e){return-1!==r._internalEndpoints.indexOf(e.toLowerCase())},r.canUseLocalStorage=function(){return r._canUseLocalStorage===undefined&&(r._canUseLocalStorage=!!r._getVerifiedStorageObject(a.LocalStorage)),r._canUseLocalStorage},r.getStorage=function(e){var t=r._getLocalStorageObject();if(null!==t)try{return t.getItem(e)}catch(n){r._canUseLocalStorage=!1,o._InternalLogging.throwInternal(o.LoggingSeverity.WARNING,o._InternalMessageId.BrowserCannotReadLocalStorage,"Browser failed read of local storage. "+r.getExceptionName(n),{exception:r.dump(n)})}return null},r.setStorage=function(e,t){var n=r._getLocalStorageObject();if(null!==n)try{return n.setItem(e,t),!0}catch(i){r._canUseLocalStorage=!1,o._InternalLogging.throwInternal(o.LoggingSeverity.WARNING,o._InternalMessageId.BrowserCannotWriteLocalStorage,"Browser failed write to local storage. "+r.getExceptionName(i),{exception:r.dump(i)})}return!1},r.removeStorage=function(e){var t=r._getLocalStorageObject();if(null!==t)try{return t.removeItem(e),!0}catch(n){r._canUseLocalStorage=!1,o._InternalLogging.throwInternal(o.LoggingSeverity.WARNING,o._InternalMessageId.BrowserFailedRemovalFromLocalStorage,"Browser failed removal of local storage item. "+r.getExceptionName(n),{exception:r.dump(n)})}return!1},r._getSessionStorageObject=function(){return r.canUseSessionStorage()?r._getVerifiedStorageObject(a.SessionStorage):null},r.canUseSessionStorage=function(){return r._canUseSessionStorage===undefined&&(r._canUseSessionStorage=!!r._getVerifiedStorageObject(a.SessionStorage)),r._canUseSessionStorage},r.getSessionStorageKeys=function(){var e=[];if(r.canUseSessionStorage())for(var t in window.sessionStorage)e.push(t);return e},r.getSessionStorage=function(e){var t=r._getSessionStorageObject();if(null!==t)try{return t.getItem(e)}catch(n){r._canUseSessionStorage=!1,o._InternalLogging.throwInternal(o.LoggingSeverity.WARNING,o._InternalMessageId.BrowserCannotReadSessionStorage,"Browser failed read of session storage. "+r.getExceptionName(n),{exception:r.dump(n)})}return null},r.setSessionStorage=function(e,t){var n=r._getSessionStorageObject();if(null!==n)try{return n.setItem(e,t),!0}catch(i){r._canUseSessionStorage=!1,o._InternalLogging.throwInternal(o.LoggingSeverity.WARNING,o._InternalMessageId.BrowserCannotWriteSessionStorage,"Browser failed write to session storage. "+r.getExceptionName(i),{exception:r.dump(i)})}return!1},r.removeSessionStorage=function(e){var t=r._getSessionStorageObject();if(null!==t)try{return t.removeItem(e),!0}catch(n){r._canUseSessionStorage=!1,o._InternalLogging.throwInternal(o.LoggingSeverity.WARNING,o._InternalMessageId.BrowserFailedRemovalFromSessionStorage,"Browser failed removal of session storage item. "+r.getExceptionName(n),{exception:r.dump(n)})}return!1},r.disableCookies=function(){r._canUseCookies=!1},r.canUseCookies=function(){if(r._canUseCookies===undefined){r._canUseCookies=!1;try{r._canUseCookies=r.document.cookie!==undefined}catch(e){o._InternalLogging.throwInternal(o.LoggingSeverity.WARNING,o._InternalMessageId.CannotAccessCookie,"Cannot access document.cookie - "+r.getExceptionName(e),{exception:r.dump(e)})}}return r._canUseCookies},r.disallowsSameSiteNone=function(e){return"string"==typeof e&&(-1!==e.indexOf("CPU iPhone OS 12")||-1!==e.indexOf("iPad; CPU OS 12")||(-1!==e.indexOf("Macintosh; Intel Mac OS X 10_14")&&-1!==e.indexOf("Version/")&&-1!==e.indexOf("Safari")||(!(-1===e.indexOf("Macintosh; Intel Mac OS X 10_14")||!_endsWith(e,"AppleWebKit/605.1.15 (KHTML, like Gecko)"))||(-1!==e.indexOf("Chrome/5")||-1!==e.indexOf("Chrome/6")||(-1!==e.indexOf("UnrealEngine")&&-1===e.indexOf("Chrome")||(-1!==e.indexOf("UCBrowser/12")||-1!==e.indexOf("UCBrowser/11")))))))},r.setCookie=function(e,t,n){var i="",o="";n&&(i=";domain="+n),r.document.location&&"https:"===r.document.location.protocol&&(o=";secure",null===r._uaDisallowsSameSiteNone&&"undefined"!=typeof navigator&&(r._uaDisallowsSameSiteNone=r.disallowsSameSiteNone(navigator.userAgent)),r._uaDisallowsSameSiteNone||(t+=";SameSite=None")),r.canUseCookies()&&(r.document.cookie=e+"="+t+i+";path=/"+o)},r.stringToBoolOrDefault=function(e,t){return void 0===t&&(t=!1),e===undefined||null===e?t:"true"===e.toString().toLowerCase()},r.getCookie=function(e){if(r.canUseCookies()){var t="";if(e&&e.length)for(var n=e+"=",i=r.document.cookie.split(";"),o=0;o<i.length;o++){var a=i[o];if((a=r.trim(a))&&0===a.indexOf(n)){t=a.substring(n.length,i[o].length);break}}return t}},r.deleteCookie=function(e){r.canUseCookies()&&(r.document.cookie=e+"=;path=/;expires=Thu, 01 Jan 1970 00:00:01 GMT;")},r.trim=function(e){return"string"!=typeof e?e:e.replace(/^\s+|\s+$/g,"")},r.newId=function(){return o.UtilHelpers.newId()},r.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)},r.isError=function(e){return"[object Error]"===Object.prototype.toString.call(e)},r.isDate=function(e){return"[object Date]"===Object.prototype.toString.call(e)},r.toISOStringForIE8=function(e){if(r.isDate(e)){if(Date.prototype.toISOString)return e.toISOString();var t=function(e){var t=String(e);return 1===t.length&&(t="0"+t),t};return e.getUTCFullYear()+"-"+t(e.getUTCMonth()+1)+"-"+t(e.getUTCDate())+"T"+t(e.getUTCHours())+":"+t(e.getUTCMinutes())+":"+t(e.getUTCSeconds())+"."+String((e.getUTCMilliseconds()/1e3).toFixed(3)).slice(2,5)+"Z"}},r.getIEVersion=function(e){void 0===e&&(e=null);var t=e?e.toLowerCase():navigator.userAgent.toLowerCase();return-1!=t.indexOf("msie")?parseInt(t.split("msie")[1]):null},r.msToTimeSpan=function(e){(isNaN(e)||e<0)&&(e=0);var t=""+(e=Math.round(e))%1e3,n=""+Math.floor(e/1e3)%60,i=""+Math.floor(e/6e4)%60,o=""+Math.floor(e/36e5)%24,a=Math.floor(e/864e5);return t=1===t.length?"00"+t:2===t.length?"0"+t:t,n=n.length<2?"0"+n:n,i=i.length<2?"0"+i:i,(0<a?a+".":"")+(o=o.length<2?"0"+o:o)+":"+i+":"+n+"."+t},r.isCrossOriginError=function(e,t,n,i,o){return("Script error."===e||"Script error"===e)&&!o},r.dump=function(e){var t=Object.prototype.toString.call(e),n=JSON.stringify(e);return"[object Error]"===t&&(n="{ stack: '"+e.stack+"', message: '"+e.message+"', name: '"+e.name+"'"),t+n},r.getExceptionName=function(e){return"[object Error]"===Object.prototype.toString.call(e)?e.name:""},r.addEventHandler=function(e,t){if(!window||"string"!=typeof e||"function"!=typeof t)return!1;var n="on"+e;if(window.addEventListener)window.addEventListener(e,t,!1);else{if(!window.attachEvent)return!1;window.attachEvent(n,t)}return!0},r.IsBeaconApiSupported=function(){return"sendBeacon"in navigator&&navigator.sendBeacon},r.document="undefined"!=typeof document?document:{},r._canUseCookies=undefined,r._canUseLocalStorage=undefined,r._canUseSessionStorage=undefined,r._uaDisallowsSameSiteNone=null,r._internalEndpoints=["https://dc.services.visualstudio.com/v2/track","https://breeze.aimon.applicationinsights.io/v2/track","https://dc-int.services.visualstudio.com/v2/track"],r.NotSpecified="not_specified",r}();o.Util=t;var r=function(){function i(){}return i.parseUrl=function(e){return i.htmlAnchorElement||(i.htmlAnchorElement=i.document.createElement?i.document.createElement("a"):{host:i.parseHost(e)}),i.htmlAnchorElement.href=e,i.htmlAnchorElement},i.parseHost=function(e){var t=e.match(/:\/\/(www[0-9]?\.)?(.[^/:]+)/i);return null!=t&&2<t.length&&"string"==typeof t[2]&&0<t[2].length?t[2]:null},i.getAbsoluteUrl=function(e){var t,n=i.parseUrl(e);return n&&(t=n.href),t},i.getPathName=function(e){var t,n=i.parseUrl(e);return n&&(t=n.pathname),t},i.getCompleteUrl=function(e,t){return e?e.toUpperCase()+" "+t:t},i.document="undefined"!=typeof document?document:{},i}();o.UrlHelper=r;var n=function(){function n(){}return n.canIncludeCorrelationHeader=function(e,t,n){if(e&&e.disableCorrelationHeaders)return!1;if(!t)return!1;var i=r.parseUrl(t).host.toLowerCase();if(!(e&&e.enableCorsCorrelation||i===n))return!1;var o=e&&e.correlationHeaderExcludedDomains;if(!o||0==o.length)return!0;for(var a=0;a<o.length;a++){if(new RegExp(o[a].toLowerCase().replace(/\./g,".").replace(/\*/g,".*")).test(i))return!1}return!0},n.getCorrelationContext=function(e){if(e){var t=n.getCorrelationContextValue(e,o.RequestHeaders.requestContextTargetKey);if(t&&t!==n.correlationIdPrefix)return t}},n.getCorrelationContextValue=function(e,t){if(e)for(var n=e.split(","),i=0;i<n.length;++i){var o=n[i].split("=");if(2==o.length&&o[0]==t)return o[1]}},n.correlationIdPrefix="cid-v1:",n}();o.CorrelationIdHelper=n}(e.ApplicationInsights||(e.ApplicationInsights={}))}(Microsoft||(Microsoft={})),function(e){!function(f){var h,e;(e=h=f.FieldType||(f.FieldType={}))[e.Default=0]="Default",e[e.Required=1]="Required",e[e.Array=2]="Array",e[e.Hidden=4]="Hidden";var t=function(){function d(){}return d.serialize=function(e){var t=d._serializeObject(e,"root");return JSON.stringify(t)},d._serializeObject=function(e,t){var n="__aiCircularRefCheck",i={};if(!e)return f._InternalLogging.throwInternal(f.LoggingSeverity.CRITICAL,f._InternalMessageId.CannotSerializeObject,"cannot serialize object because it is null or undefined",{name:t},!0),i;if(e[n])return f._InternalLogging.throwInternal(f.LoggingSeverity.WARNING,f._InternalMessageId.CircularReferenceDetected,"Circular reference detected while serializing object",{name:t},!0),i;if(!e.aiDataContract){if("measurements"===t)i=d._serializeStringMap(e,"number",t);else if("properties"===t)i=d._serializeStringMap(e,"string",t);else if("tags"===t)i=d._serializeStringMap(e,"string",t);else if(f.Util.isArray(e))i=d._serializeArray(e,t);else{f._InternalLogging.throwInternal(f.LoggingSeverity.WARNING,f._InternalMessageId.CannotSerializeObjectNonSerializable,"Attempting to serialize an object which does not implement ISerializable",{name:t},!0);try{JSON.stringify(e),i=e}catch(p){f._InternalLogging.throwInternal(f.LoggingSeverity.CRITICAL,f._InternalMessageId.CannotSerializeObject,p&&"function"==typeof p.toString?p.toString():"Error serializing object",null,!0)}}return i}for(var o in e[n]=!0,e.aiDataContract){var a,r=e.aiDataContract[o],s="function"==typeof r?r()&h.Required:r&h.Required,l="function"==typeof r?r()&h.Hidden:r&h.Hidden,c=r&h.Array,g=e[o]!==undefined,u="object"==typeof e[o]&&null!==e[o];if(!s||g||c){if(!l)(a=u?c?d._serializeArray(e[o],o):d._serializeObject(e[o],o):e[o])!==undefined&&(i[o]=a)}else f._InternalLogging.throwInternal(f.LoggingSeverity.CRITICAL,f._InternalMessageId.MissingRequiredFieldSpecification,"Missing required field specification. The field is required but not present on source",{field:o,name:t})}return delete e[n],i},d._serializeArray=function(e,t){var n=undefined;if(e)if(f.Util.isArray(e)){n=[];for(var i=0;i<e.length;i++){var o=e[i],a=d._serializeObject(o,t+"["+i+"]");n.push(a)}}else f._InternalLogging.throwInternal(f.LoggingSeverity.CRITICAL,f._InternalMessageId.ItemNotInArray,"This field was specified as an array in the contract but the item is not an array.\r\n",{name:t},!0);return n},d._serializeStringMap=function(e,t,n){var i=undefined;if(e)for(var o in i={},e){var a=e[o];if("string"===t)a===undefined?i[o]="undefined":null===a?i[o]="null":a.toString?i[o]=a.toString():i[o]="invalid field: toString() is not defined.";else if("number"===t)if(a===undefined)i[o]="undefined";else if(null===a)i[o]="null";else{var r=parseFloat(a);isNaN(r)?i[o]="NaN":i[o]=r}else i[o]="invalid field: "+n+" is of unknown type.",f._InternalLogging.throwInternal(f.LoggingSeverity.CRITICAL,i[o],null,!0)}return i},d}();f.Serializer=t}(e.ApplicationInsights||(e.ApplicationInsights={}))}(Microsoft||(Microsoft={})),function(e){var o,t,a,n;o=e.ApplicationInsights||(e.ApplicationInsights={}),t=o.Telemetry||(o.Telemetry={}),a=t.Common||(t.Common={}),n=function(i){function e(e,t){var n=i.call(this)||this;return n.name=a.DataSanitizer.sanitizeString(t)||o.Util.NotSpecified,n.data=e,n.time=o.Util.toISOStringForIE8(new Date),n.aiDataContract={time:o.FieldType.Required,iKey:o.FieldType.Required,name:o.FieldType.Required,sampleRate:function(){return 100==n.sampleRate?o.FieldType.Hidden:o.FieldType.Required},tags:o.FieldType.Required,data:o.FieldType.Required},n}return __extends(e,i),e}(e.Telemetry.Envelope),a.Envelope=n}(Microsoft||(Microsoft={})),function(e){var t,n,i,o;t=e.ApplicationInsights||(e.ApplicationInsights={}),n=t.Telemetry||(t.Telemetry={}),i=n.Common||(n.Common={}),o=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.aiDataContract={},e}return __extends(e,t),e}(e.Telemetry.Base),i.Base=o}(Microsoft||(Microsoft={})),function(e){var t=function n(){this.applicationVersion="ai.application.ver",this.applicationBuild="ai.application.build",this.applicationTypeId="ai.application.typeId",this.applicationId="ai.application.applicationId",this.applicationLayer="ai.application.layer",this.deviceId="ai.device.id",this.deviceIp="ai.device.ip",this.deviceLanguage="ai.device.language",this.deviceLocale="ai.device.locale",this.deviceModel="ai.device.model",this.deviceFriendlyName="ai.device.friendlyName",this.deviceNetwork="ai.device.network",this.deviceNetworkName="ai.device.networkName",this.deviceOEMName="ai.device.oemName",this.deviceOS="ai.device.os",this.deviceOSVersion="ai.device.osVersion",this.deviceRoleInstance="ai.device.roleInstance",this.deviceRoleName="ai.device.roleName",this.deviceScreenResolution="ai.device.screenResolution",this.deviceType="ai.device.type",this.deviceMachineName="ai.device.machineName",this.deviceVMName="ai.device.vmName",this.deviceBrowser="ai.device.browser",this.deviceBrowserVersion="ai.device.browserVersion",this.locationIp="ai.location.ip",this.locationCountry="ai.location.country",this.locationProvince="ai.location.province",this.locationCity="ai.location.city",this.operationId="ai.operation.id",this.operationName="ai.operation.name",this.operationParentId="ai.operation.parentId",this.operationRootId="ai.operation.rootId",this.operationSyntheticSource="ai.operation.syntheticSource",this.operationCorrelationVector="ai.operation.correlationVector",this.sessionId="ai.session.id",this.sessionIsFirst="ai.session.isFirst",this.sessionIsNew="ai.session.isNew",this.userAccountAcquisitionDate="ai.user.accountAcquisitionDate",this.userAccountId="ai.user.accountId",this.userAgent="ai.user.userAgent",this.userId="ai.user.id",this.userStoreRegion="ai.user.storeRegion",this.userAuthUserId="ai.user.authUserId",this.userAnonymousUserAcquisitionDate="ai.user.anonUserAcquisitionDate",this.userAuthenticatedUserAcquisitionDate="ai.user.authUserAcquisitionDate",this.cloudName="ai.cloud.name",this.cloudRole="ai.cloud.role",this.cloudRoleVer="ai.cloud.roleVer",this.cloudRoleInstance="ai.cloud.roleInstance",this.cloudEnvironment="ai.cloud.environment",this.cloudLocation="ai.cloud.location",this.cloudDeploymentUnit="ai.cloud.deploymentUnit",this.internalSdkVersion="ai.internal.sdkVersion",this.internalAgentVersion="ai.internal.agentVersion",this.internalNodeName="ai.internal.nodeName"};(AI||(AI={})).ContextTagKeys=t}(),function(e){var t,n;t=e.ApplicationInsights||(e.ApplicationInsights={}),n=function i(){},(t.Context||(t.Context={})).Application=n}(Microsoft||(Microsoft={})),function(e){var t,n;t=e.ApplicationInsights||(e.ApplicationInsights={}),n=function i(){this.id="browser",this.type="Browser"},(t.Context||(t.Context={})).Device=n}(Microsoft||(Microsoft={})),function(e){var t,n;t=e.ApplicationInsights||(e.ApplicationInsights={}),n=function i(e){this.sdkVersion=(e.sdkExtension()?e.sdkExtension()+"_":"")+"javascript:"+t.Version},(t.Context||(t.Context={})).Internal=n}(Microsoft||(Microsoft={})),function(e){var t,n;t=e.ApplicationInsights||(e.ApplicationInsights={}),n=function i(){},(t.Context||(t.Context={})).Location=n}(Microsoft||(Microsoft={})),function(e){var t,n;t=e.ApplicationInsights||(e.ApplicationInsights={}),n=function i(){this.id=t.Util.newId(),window&&window.location&&window.location.pathname&&(this.name=window.location.pathname)},(t.Context||(t.Context={})).Operation=n}(Microsoft||(Microsoft={})),function(e){var t,n;t=e.ApplicationInsights||(e.ApplicationInsights={}),n=function(){function i(){}return i.prototype.getHashCodeScore=function(e){return 100*(this.getHashCode(e)/i.INT_MAX_VALUE)},i.prototype.getHashCode=function(e){if(""==e)return 0;for(;e.length<i.MIN_INPUT_LENGTH;)e=e.concat(e);for(var t=5381,n=0;n<e.length;++n)t=(t<<5)+t+e.charCodeAt(n),t&=t;return Math.abs(t)},i.INT_MAX_VALUE=2147483647,i.MIN_INPUT_LENGTH=8,i}(),t.HashCodeScoreGenerator=n}(Microsoft||(Microsoft={})),function(e){var t,n;t=e.ApplicationInsights||(e.ApplicationInsights={}),n=function(){function e(){this.hashCodeGeneragor=new t.HashCodeScoreGenerator}return e.prototype.getSamplingScore=function(e){var t=new AI.ContextTagKeys;return e.tags[t.userId]?this.hashCodeGeneragor.getHashCodeScore(e.tags[t.userId]):e.tags[t.operationId]?this.hashCodeGeneragor.getHashCodeScore(e.tags[t.operationId]):Math.random()},e}(),t.SamplingScoreGenerator=n}(Microsoft||(Microsoft={})),function(e){var t,n,i;t=e.ApplicationInsights||(e.ApplicationInsights={}),n=t.Context||(t.Context={}),i=function(){function e(e){this.INT_MAX_VALUE=2147483647,(100<e||e<0)&&(t._InternalLogging.throwInternal(t.LoggingSeverity.WARNING,t._InternalMessageId.SampleRateOutOfRange,"Sampling rate is out of range (0..100). Sampling will be disabled, you may be sending too much data which may affect your AI service level.",{samplingRate:e},!0),this.sampleRate=100),this.sampleRate=e,this.samplingScoreGenerator=new t.SamplingScoreGenerator}return e.prototype.isSampledIn=function(e){return 100==this.sampleRate||this.samplingScoreGenerator.getSamplingScore(e)<this.sampleRate},e}(),n.Sample=i}(Microsoft||(Microsoft={})),function(e){var l;(function(e){var t=function i(){};e.Session=t;var n=function(){function i(e){e||(e={}),"function"!=typeof e.sessionExpirationMs&&(e.sessionExpirationMs=function(){return i.acquisitionSpan}),"function"!=typeof e.sessionRenewalMs&&(e.sessionRenewalMs=function(){return i.renewalSpan}),this.config=e,this.automaticSession=new t}return i.prototype.update=function(){this.automaticSession.id||this.initializeAutomaticSession();var e=l.dateTime.Now(),t=e-this.automaticSession.acquisitionDate>this.config.sessionExpirationMs(),n=e-this.automaticSession.renewalDate>this.config.sessionRenewalMs();t||n?(this.automaticSession.isFirst=undefined,this.renew()):(!this.cookieUpdatedTimestamp||e-this.cookieUpdatedTimestamp>i.cookieUpdateInterval)&&(this.automaticSession.renewalDate=e,this.setCookie(this.automaticSession.id,this.automaticSession.acquisitionDate,this.automaticSession.renewalDate))},i.prototype.backup=function(){this.setStorage(this.automaticSession.id,this.automaticSession.acquisitionDate,this.automaticSession.renewalDate)},i.prototype.initializeAutomaticSession=function(){var e=l.Util.getCookie("ai_session");if(e&&"function"==typeof e.split)this.initializeAutomaticSessionWithData(e);else{var t=l.Util.getStorage("ai_session");t&&this.initializeAutomaticSessionWithData(t)}this.automaticSession.id||(this.automaticSession.isFirst=!0,this.renew())},i.prototype.initializeAutomaticSessionWithData=function(e){var t=e.split("|");0<t.length&&(this.automaticSession.id=t[0]);try{if(1<t.length){var n=+t[1];this.automaticSession.acquisitionDate=+new Date(n),this.automaticSession.acquisitionDate=0<this.automaticSession.acquisitionDate?this.automaticSession.acquisitionDate:0}if(2<t.length){var i=+t[2];this.automaticSession.renewalDate=+new Date(i),this.automaticSession.renewalDate=0<this.automaticSession.renewalDate?this.automaticSession.renewalDate:0}}catch(o){l._InternalLogging.throwInternal(l.LoggingSeverity.CRITICAL,l._InternalMessageId.ErrorParsingAISessionCookie,"Error parsing ai_session cookie, session will be reset: "+l.Util.getExceptionName(o),{exception:l.Util.dump(o)})}0==this.automaticSession.renewalDate&&l._InternalLogging.throwInternal(l.LoggingSeverity.WARNING,l._InternalMessageId.SessionRenewalDateIsZero,"AI session renewal date is 0, session will be reset.")},i.prototype.renew=function(){var e=l.dateTime.Now();this.automaticSession.id=l.Util.newId(),this.automaticSession.acquisitionDate=e,this.automaticSession.renewalDate=e,this.setCookie(this.automaticSession.id,this.automaticSession.acquisitionDate,this.automaticSession.renewalDate),l.Util.canUseLocalStorage()||l._InternalLogging.throwInternal(l.LoggingSeverity.WARNING,l._InternalMessageId.BrowserDoesNotSupportLocalStorage,"Browser does not support local storage. Session durations will be inaccurate.")},i.prototype.setCookie=function(e,t,n){var i=t+this.config.sessionExpirationMs(),o=n+this.config.sessionRenewalMs(),a=new Date,r=[e,t,n];i<o?a.setTime(i):a.setTime(o);var s=this.config.cookieDomain?this.config.cookieDomain():null;l.Util.setCookie("ai_session",r.join("|")+";expires="+a.toUTCString(),s),this.cookieUpdatedTimestamp=l.dateTime.Now()},i.prototype.setStorage=function(e,t,n){l.Util.setStorage("ai_session",[e,t,n].join("|"))},i.acquisitionSpan=864e5,i.renewalSpan=18e5,i.cookieUpdateInterval=6e4,i}();e._SessionManager=n})((l=e.ApplicationInsights||(e.ApplicationInsights={})).Context||(l.Context={}))}(Microsoft||(Microsoft={})),function(e){var g,t,n;g=e.ApplicationInsights||(e.ApplicationInsights={}),t=g.Context||(g.Context={}),n=function(){function c(e){var t=g.Util.getCookie(c.userCookieName);if(t){var n=t.split(c.cookieSeparator);0<n.length&&(this.id=n[0])}if(this.config=e,!this.id){this.id=g.Util.newId();var i=new Date,o=g.Util.toISOStringForIE8(i);this.accountAcquisitionDate=o,i.setTime(i.getTime()+31536e6);var a=[this.id,o],r=this.config.cookieDomain?this.config.cookieDomain():undefined;g.Util.setCookie(c.userCookieName,a.join(c.cookieSeparator)+";expires="+i.toUTCString(),r),g.Util.removeStorage("ai_session")}this.accountId=e.accountId?e.accountId():undefined;var s=g.Util.getCookie(c.authUserCookieName);if(s){var l=(s=decodeURI(s)).split(c.cookieSeparator);l[0]&&(this.authenticatedId=l[0]),1<l.length&&l[1]&&(this.accountId=l[1])}}return c.prototype.setAuthenticatedUserContext=function(e,t,n){if(void 0===n&&(n=!1),!this.validateUserInput(e)||t&&!this.validateUserInput(t))g._InternalLogging.throwInternal(g.LoggingSeverity.WARNING,g._InternalMessageId.SetAuthContextFailedAccountName,"Setting auth user context failed. User auth/account id should be of type string, and not contain commas, semi-colons, equal signs, spaces, or vertical-bars.",!0);else{this.authenticatedId=e;var i=this.authenticatedId;t&&(this.accountId=t,i=[this.authenticatedId,this.accountId].join(c.cookieSeparator)),n&&g.Util.setCookie(c.authUserCookieName,encodeURI(i),this.config.cookieDomain())}},c.prototype.clearAuthenticatedUserContext=function(){this.authenticatedId=null,this.accountId=null,g.Util.deleteCookie(c.authUserCookieName)},c.prototype.validateUserInput=function(e){return!("string"!=typeof e||!e||e.match(/,|;|=| |\|/))},c.cookieSeparator="|",c.userCookieName="ai_user",c.authUserCookieName="ai_authUser",c}(),t.User=n}(Microsoft||(Microsoft={})),function(e){!function(r){var o=function(){function e(){}return e.IsNullOrUndefined=function(e){return null==e},e}();r.extensions=o;var e=function(){function e(){}return e.GetLength=function(e){var t=0;if(!o.IsNullOrUndefined(e)){var n="";try{n=e.toString()}catch(i){}t=n.length,t=isNaN(t)?0:t}return t},e}();r.stringUtils=e;var t=function(){function e(){}return e.Now=window.performance&&window.performance.now&&window.performance.timing?function(){return window.performance.now()+window.performance.timing.navigationStart}:function(){return(new Date).getTime()},e.GetDuration=function(e,t){var n=null;return 0===e||0===t||o.IsNullOrUndefined(e)||o.IsNullOrUndefined(t)||(n=t-e),n},e}();r.dateTime=t;var n=function(){function e(){}return e.AttachEvent=function(e,t,n){var i=!1;return o.IsNullOrUndefined(e)||(o.IsNullOrUndefined(e.attachEvent)?o.IsNullOrUndefined(e.addEventListener)||(e.addEventListener(t,n,!1),i=!0):(e.attachEvent("on"+t,n),i=!0)),i},e.DetachEvent=function(e,t,n){o.IsNullOrUndefined(e)||(o.IsNullOrUndefined(e.detachEvent)?o.IsNullOrUndefined(e.removeEventListener)||e.removeEventListener(t,n,!1):e.detachEvent("on"+t,n))},e}();r.EventHelper=n;var i=function(){function e(){}return e.ParseDependencyPath=function(e,t,n){var i,o;if(e&&0<e.length){var a=r.UrlHelper.parseUrl(e);if(i=a.host,null!=a.pathname)"/"!==(n=0===a.pathname.length?"/":a.pathname).charAt(0)&&(n="/"+n),o=r.Telemetry.Common.DataSanitizer.sanitizeString(t?t+" "+n:n);else o=r.Telemetry.Common.DataSanitizer.sanitizeString(e)}else o=i=n;return{target:i,name:o}},e}();r.AjaxHelper=i}(e.ApplicationInsights||(e.ApplicationInsights={}))}(Microsoft||(Microsoft={})),function(e){!function(t){var n=function i(){this.openDone=!1,this.setRequestHeaderDone=!1,this.sendDone=!1,this.abortDone=!1,this.onreadystatechangeCallbackAttached=!1};t.XHRMonitoringState=n;var e=function(){function e(e){this.completed=!1,this.requestHeadersSize=null,this.ttfb=null,this.responseReceivingDuration=null,this.callbackDuration=null,this.ajaxTotalDuration=null,this.aborted=null,this.pageUrl=null,this.requestUrl=null,this.requestSize=0,this.method=null,this.status=null,this.requestSentTime=null,this.responseStartedTime=null,this.responseFinishedTime=null,this.callbackFinishedTime=null,this.endTime=null,this.originalOnreadystatechage=null,this.xhrMonitoringState=new n,this.clientFailure=0,this.CalculateMetrics=function(){this.ajaxTotalDuration=Math.round(1e3*t.dateTime.GetDuration(this.requestSentTime,this.responseFinishedTime))/1e3},this.id=e}return e.prototype.getAbsoluteUrl=function(){return this.requestUrl?t.UrlHelper.getAbsoluteUrl(this.requestUrl):null},e.prototype.getPathName=function(){return this.requestUrl?t.Telemetry.Common.DataSanitizer.sanitizeUrl(t.UrlHelper.getCompleteUrl(this.method,this.requestUrl)):null},e}();t.ajaxRecord=e}(e.ApplicationInsights||(e.ApplicationInsights={}))}(Microsoft||(Microsoft={})),function(e){var t,n;t=e.ApplicationInsights||(e.ApplicationInsights={}),n=function(){function e(){}return e.requestContextHeader="Request-Context",e.requestContextTargetKey="appId",e.requestContextAppIdFormat="appId=cid-v1:",e.requestIdHeader="Request-Id",e.sdkContextHeader="Sdk-Context",e.sdkContextHeaderAppIdRequest="appId",e.requestContextHeaderLowerCase="request-context",e}(),t.RequestHeaders=n}(Microsoft||(Microsoft={})),function(e){var t;t=function n(){},(e.Telemetry||(e.Telemetry={})).Domain=t}(Microsoft||(Microsoft={})),function(e){var t=function(t){function e(){var e=t.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}return __extends(e,t),e}(Microsoft.Telemetry.Domain);e.EventData=t}(AI||(AI={})),function(e){var t=function(t){function e(){var e=t.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}return __extends(e,t),e}(e.EventData);e.PageViewData=t}(AI||(AI={})),function(e){var t=function(t){function e(){var e=t.call(this)||this;return e.ver=2,e.success=!0,e.properties={},e.measurements={},e}return __extends(e,t),e}(Microsoft.Telemetry.Domain);e.RemoteDependencyData=t}(AI||(AI={})),function(e){var i,t,n,o;i=e.ApplicationInsights||(e.ApplicationInsights={}),t=i.Telemetry||(i.Telemetry={}),n=t.Common||(t.Common={}),o=function(){function r(){}return r.sanitizeKeyAndAddUniqueness=function(e,t){var n=e.length,i=r.sanitizeKey(e);if(i.length!==n){for(var o=0,a=i;t[a]!==undefined;)o++,a=i.substring(0,r.MAX_NAME_LENGTH-3)+r.padNumber(o);i=a}return i},r.sanitizeKey=function(e){return e&&(e=i.Util.trim(e.toString())).length>r.MAX_NAME_LENGTH&&(e=e.substring(0,r.MAX_NAME_LENGTH),i._InternalLogging.throwInternal(i.LoggingSeverity.WARNING,i._InternalMessageId.NameTooLong,"name is too long.  It has been truncated to "+r.MAX_NAME_LENGTH+" characters.",{name:e},!0)),e},r.sanitizeString=function(e,t){return void 0===t&&(t=r.MAX_STRING_LENGTH),e&&(t=t||r.MAX_STRING_LENGTH,(e=i.Util.trim(e)).toString().length>t&&(e=e.toString().substring(0,t),i._InternalLogging.throwInternal(i.LoggingSeverity.WARNING,i._InternalMessageId.StringValueTooLong,"string value is too long. It has been truncated to "+t+" characters.",{value:e},!0))),e},r.sanitizeUrl=function(e){return r.sanitizeInput(e,r.MAX_URL_LENGTH,i._InternalMessageId.UrlTooLong)},r.sanitizeMessage=function(e){return e&&e.length>r.MAX_MESSAGE_LENGTH&&(e=e.substring(0,r.MAX_MESSAGE_LENGTH),i._InternalLogging.throwInternal(i.LoggingSeverity.WARNING,i._InternalMessageId.MessageTruncated,"message is too long, it has been truncated to "+r.MAX_MESSAGE_LENGTH+" characters.",{message:e},!0)),e},r.sanitizeException=function(e){return e&&e.length>r.MAX_EXCEPTION_LENGTH&&(e=e.substring(0,r.MAX_EXCEPTION_LENGTH),i._InternalLogging.throwInternal(i.LoggingSeverity.WARNING,i._InternalMessageId.ExceptionTruncated,"exception is too long, it has been truncated to "+r.MAX_EXCEPTION_LENGTH+" characters.",{exception:e},!0)),e},r.sanitizeProperties=function(e){if(e){var t={};for(var n in e){var i=r.sanitizeString(e[n],r.MAX_PROPERTY_LENGTH);t[n=r.sanitizeKeyAndAddUniqueness(n,t)]=i}e=t}return e},r.sanitizeMeasurements=function(e){if(e){var t={};for(var n in e){var i=e[n];t[n=r.sanitizeKeyAndAddUniqueness(n,t)]=i}e=t}return e},r.sanitizeId=function(e){return e?r.sanitizeInput(e,r.MAX_ID_LENGTH,i._InternalMessageId.IdTooLong).toString():e},r.sanitizeInput=function(e,t,n){return e&&(e=i.Util.trim(e)).length>t&&(e=e.substring(0,t),i._InternalLogging.throwInternal(i.LoggingSeverity.WARNING,n,"input is too long, it has been truncated to "+t+" characters.",{data:e},!0)),e},r.padNumber=function(e){var t="00"+e;return t.substr(t.length-3)},r.MAX_NAME_LENGTH=150,r.MAX_ID_LENGTH=128,r.MAX_PROPERTY_LENGTH=8192,r.MAX_STRING_LENGTH=1024,r.MAX_URL_LENGTH=2048,r.MAX_MESSAGE_LENGTH=32768,r.MAX_EXCEPTION_LENGTH=32768,r}(),n.DataSanitizer=o}(Microsoft||(Microsoft={})),function(e){var p,d,t;p=e.ApplicationInsights||(e.ApplicationInsights={}),d=p.Telemetry||(p.Telemetry={}),t=function(u){function e(e,t,n,i,o,a,r,s,l){var c=u.call(this)||this;c.aiDataContract={id:p.FieldType.Required,ver:p.FieldType.Required,name:p.FieldType.Default,resultCode:p.FieldType.Default,duration:p.FieldType.Default,success:p.FieldType.Default,data:p.FieldType.Default,target:p.FieldType.Default,type:p.FieldType.Default,properties:p.FieldType.Default,measurements:p.FieldType.Default,kind:p.FieldType.Default,value:p.FieldType.Default,count:p.FieldType.Default,min:p.FieldType.Default,max:p.FieldType.Default,stdDev:p.FieldType.Default,dependencyKind:p.FieldType.Default,dependencySource:p.FieldType.Default,commandName:p.FieldType.Default,dependencyTypeName:p.FieldType.Default},c.id=e,c.duration=p.Util.msToTimeSpan(i),c.success=o,c.resultCode=a+"",c.type="Ajax",c.data=d.Common.DataSanitizer.sanitizeUrl(n);var g=p.AjaxHelper.ParseDependencyPath(t,r,n);return c.target=g.target,c.name=g.name,c.properties=p.Telemetry.Common.DataSanitizer.sanitizeProperties(s),c.measurements=p.Telemetry.Common.DataSanitizer.sanitizeMeasurements(l),c}return __extends(e,u),e.envelopeType="Microsoft.ApplicationInsights.{0}.RemoteDependency",e.dataType="RemoteDependencyData",e}(AI.RemoteDependencyData),d.RemoteDependencyData=t}(Microsoft||(Microsoft={})),function(s){var l,e;l=s.ApplicationInsights||(s.ApplicationInsights={}),e=function(){function r(e){this.currentWindowHost="object"==typeof window?window.location.host&&window.location.host.toLowerCase():undefined,this.appInsights=e,this.initialized=!1,this.Init()}return r.prototype.Init=function(){this.supportsMonitoring()&&(this.instrumentOpen(),this.instrumentSend(),this.instrumentAbort(),this.initialized=!0)},r.prototype.isMonitoredInstance=function(e,t){return this.initialized&&(!0===t||!l.extensions.IsNullOrUndefined(e.ajaxData))&&!0!==e[r.DisabledPropertyName]},r.prototype.supportsMonitoring=function(){var e=!0;("function"!=typeof XMLHttpRequest||l.extensions.IsNullOrUndefined(XMLHttpRequest)||l.extensions.IsNullOrUndefined(XMLHttpRequest.prototype)||l.extensions.IsNullOrUndefined(XMLHttpRequest.prototype.open)||l.extensions.IsNullOrUndefined(XMLHttpRequest.prototype.send)||l.extensions.IsNullOrUndefined(XMLHttpRequest.prototype.abort))&&(e=!1);try{" a ".trim()}catch(t){e=!1}return e},r.prototype.instrumentOpen=function(){var o=XMLHttpRequest.prototype.open,a=this;XMLHttpRequest.prototype.open=function(e,t,n){try{!a.isMonitoredInstance(this,!0)||this.ajaxData&&this.ajaxData.xhrMonitoringState.openDone||a.openHandler(this,e,t,n)}catch(i){l._InternalLogging.throwInternal(l.LoggingSeverity.CRITICAL,l._InternalMessageId.FailedMonitorAjaxOpen,"Failed to monitor XMLHttpRequest.open, monitoring data for this ajax call may be incorrect.",{ajaxDiagnosticsMessage:r.getFailedAjaxDiagnosticsMessage(this),exception:s.ApplicationInsights.Util.dump(i)})}return o.apply(this,arguments)}},r.prototype.openHandler=function(e,t,n,i){var o="|"+this.appInsights.context.operation.id+"."+l.Util.newId(),a=new l.ajaxRecord(o);a.method=t,a.requestUrl=n,a.xhrMonitoringState.openDone=!0,e.ajaxData=a,this.attachToOnReadyStateChange(e)},r.getFailedAjaxDiagnosticsMessage=function(e){var t="";try{l.extensions.IsNullOrUndefined(e)||l.extensions.IsNullOrUndefined(e.ajaxData)||l.extensions.IsNullOrUndefined(e.ajaxData.requestUrl)||(t+="(url: '"+e.ajaxData.requestUrl+"')")}catch(n){}return t},r.prototype.instrumentSend=function(){var n=XMLHttpRequest.prototype.send,i=this;XMLHttpRequest.prototype.send=function(e){try{i.isMonitoredInstance(this)&&!this.ajaxData.xhrMonitoringState.sendDone&&i.sendHandler(this,e)}catch(t){l._InternalLogging.throwInternal(l.LoggingSeverity.CRITICAL,l._InternalMessageId.FailedMonitorAjaxSend,"Failed to monitor XMLHttpRequest, monitoring data for this ajax call may be incorrect.",{ajaxDiagnosticsMessage:r.getFailedAjaxDiagnosticsMessage(this),exception:s.ApplicationInsights.Util.dump(t)})}return n.apply(this,arguments)}},r.prototype.sendHandler=function(e,t){if(e.ajaxData.requestSentTime=l.dateTime.Now(),l.CorrelationIdHelper.canIncludeCorrelationHeader(this.appInsights.config,e.ajaxData.getAbsoluteUrl(),this.currentWindowHost)&&(e.setRequestHeader(l.RequestHeaders.requestIdHeader,e.ajaxData.id),this.appInsights.context)){var n=this.appInsights.context.appId();n&&e.setRequestHeader(l.RequestHeaders.requestContextHeader,l.RequestHeaders.requestContextAppIdFormat+n)}e.ajaxData.xhrMonitoringState.sendDone=!0},r.prototype.instrumentAbort=function(){var t=XMLHttpRequest.prototype.abort,n=this;XMLHttpRequest.prototype.abort=function(){try{n.isMonitoredInstance(this)&&!this.ajaxData.xhrMonitoringState.abortDone&&(this.ajaxData.aborted=1,this.ajaxData.xhrMonitoringState.abortDone=!0)}catch(e){l._InternalLogging.throwInternal(l.LoggingSeverity.CRITICAL,l._InternalMessageId.FailedMonitorAjaxAbort,"Failed to monitor XMLHttpRequest.abort, monitoring data for this ajax call may be incorrect.",{ajaxDiagnosticsMessage:r.getFailedAjaxDiagnosticsMessage(this),exception:s.ApplicationInsights.Util.dump(e)})}return t.apply(this,arguments)}},r.prototype.attachToOnReadyStateChange=function(n){var i=this;n.ajaxData.xhrMonitoringState.onreadystatechangeCallbackAttached=l.EventHelper.AttachEvent(n,"readystatechange",function(){try{i.isMonitoredInstance(n)&&4===n.readyState&&i.onAjaxComplete(n)}catch(t){var e=s.ApplicationInsights.Util.dump(t);e&&-1!=e.toLowerCase().indexOf("c00c023f")||l._InternalLogging.throwInternal(l.LoggingSeverity.CRITICAL,l._InternalMessageId.FailedMonitorAjaxRSC,"Failed to monitor XMLHttpRequest 'readystatechange' event handler, monitoring data for this ajax call may be incorrect.",{ajaxDiagnosticsMessage:r.getFailedAjaxDiagnosticsMessage(n),exception:s.ApplicationInsights.Util.dump(t)})}})},r.prototype.onAjaxComplete=function(e){if(e.ajaxData.responseFinishedTime=l.dateTime.Now(),e.ajaxData.status=e.status,e.ajaxData.CalculateMetrics(),e.ajaxData.ajaxTotalDuration<0)l._InternalLogging.throwInternal(l.LoggingSeverity.WARNING,l._InternalMessageId.FailedMonitorAjaxDur,"Failed to calculate the duration of the ajax call, monitoring data for this ajax call won't be sent.",{ajaxDiagnosticsMessage:r.getFailedAjaxDiagnosticsMessage(e),requestSentTime:e.ajaxData.requestSentTime,responseFinishedTime:e.ajaxData.responseFinishedTime});else{var t=new l.Telemetry.RemoteDependencyData(e.ajaxData.id,e.ajaxData.getAbsoluteUrl(),e.ajaxData.getPathName(),e.ajaxData.ajaxTotalDuration,200<=+e.ajaxData.status&&+e.ajaxData.status<400,+e.ajaxData.status,e.ajaxData.method),n=this.getCorrelationContext(e);n&&(t.target=t.target+" | "+n),this.appInsights.trackDependencyData(t),e.ajaxData=null}},r.prototype.getCorrelationContext=function(e){try{var t=e.getAllResponseHeaders();if(null!==t)if(-1!==t.toLowerCase().indexOf(l.RequestHeaders.requestContextHeaderLowerCase)){var n=e.getResponseHeader(l.RequestHeaders.requestContextHeader);return l.CorrelationIdHelper.getCorrelationContext(n)}}catch(i){l._InternalLogging.throwInternal(l.LoggingSeverity.WARNING,l._InternalMessageId.FailedMonitorAjaxGetCorrelationHeader,"Failed to get Request-Context correlation header as it may be not included in the response or not accessible.",{ajaxDiagnosticsMessage:r.getFailedAjaxDiagnosticsMessage(e),exception:s.ApplicationInsights.Util.dump(i)})}},r.instrumentedByAppInsightsName="InstrumentedByAppInsights",r.DisabledPropertyName="Microsoft_ApplicationInsights_BypassAjaxInstrumentation",r}(),l.AjaxMonitor=e}(Microsoft||(Microsoft={})),function(e){!function(o){var e=function(){function e(e){this._config=e,this._buffer=[]}return e.prototype.enqueue=function(e){this._buffer.push(e)},e.prototype.count=function(){return this._buffer.length},e.prototype.clear=function(){this._buffer.length=0},e.prototype.getItems=function(){return this._buffer.slice(0)},e.prototype.batchPayloads=function(e){return e&&0<e.length?this._config.emitLineDelimitedJson()?e.join("\n"):"["+e.join(",")+"]":null},e.prototype.markAsSent=function(e){this.clear()},e.prototype.clearSent=function(e){},e}();o.ArraySendBuffer=e;var t=function(){function i(e){this._bufferFullMessageSent=!1,this._config=e;var t=this.getBuffer(i.BUFFER_KEY),n=this.getBuffer(i.SENT_BUFFER_KEY);this._buffer=t.concat(n),this._buffer.length>i.MAX_BUFFER_SIZE&&(this._buffer.length=i.MAX_BUFFER_SIZE),this.setBuffer(i.SENT_BUFFER_KEY,[]),this.setBuffer(i.BUFFER_KEY,this._buffer)}return i.prototype.enqueue=function(e){this._buffer.length>=i.MAX_BUFFER_SIZE?this._bufferFullMessageSent||(o._InternalLogging.throwInternal(o.LoggingSeverity.WARNING,o._InternalMessageId.SessionStorageBufferFull,"Maximum buffer size reached: "+this._buffer.length,!0),this._bufferFullMessageSent=!0):(this._buffer.push(e),this.setBuffer(i.BUFFER_KEY,this._buffer))},i.prototype.count=function(){return this._buffer.length},i.prototype.clear=function(){this._buffer.length=0,this.setBuffer(i.BUFFER_KEY,[]),this.setBuffer(i.SENT_BUFFER_KEY,[]),this._bufferFullMessageSent=!1},i.prototype.getItems=function(){return this._buffer.slice(0)},i.prototype.batchPayloads=function(e){return e&&0<e.length?this._config.emitLineDelimitedJson()?e.join("\n"):"["+e.join(",")+"]":null},i.prototype.markAsSent=function(e){this._buffer=this.removePayloadsFromBuffer(e,this._buffer),this.setBuffer(i.BUFFER_KEY,this._buffer);var t=this.getBuffer(i.SENT_BUFFER_KEY);t instanceof Array&&e instanceof Array&&((t=t.concat(e)).length>i.MAX_BUFFER_SIZE&&(o._InternalLogging.throwInternal(o.LoggingSeverity.CRITICAL,o._InternalMessageId.SessionStorageBufferFull,"Sent buffer reached its maximum size: "+t.length,!0),t.length=i.MAX_BUFFER_SIZE),this.setBuffer(i.SENT_BUFFER_KEY,t))},i.prototype.clearSent=function(e){var t=this.getBuffer(i.SENT_BUFFER_KEY);t=this.removePayloadsFromBuffer(e,t),this.setBuffer(i.SENT_BUFFER_KEY,t)},i.prototype.removePayloadsFromBuffer=function(e,t){var n=[];for(var i in t){var o=!1;for(var a in e)if(e[a]===t[i]){o=!0;break}o||n.push(t[i])}return n},i.prototype.getBuffer=function(e){try{var t=o.Util.getSessionStorage(e);if(t){var n=JSON.parse(t);if(n)return n}}catch(i){o._InternalLogging.throwInternal(o.LoggingSeverity.CRITICAL,o._InternalMessageId.FailedToRestoreStorageBuffer," storage key: "+e+", "+o.Util.getExceptionName(i),{exception:o.Util.dump(i)})}return[]},i.prototype.setBuffer=function(e,t){try{var n=JSON.stringify(t);o.Util.setSessionStorage(e,n)}catch(i){o.Util.setSessionStorage(e,JSON.stringify([])),o._InternalLogging.throwInternal(o.LoggingSeverity.WARNING,o._InternalMessageId.FailedToSetStorageBuffer," storage key: "+e+", "+o.Util.getExceptionName(i)+". Buffer cleared",{exception:o.Util.dump(i)})}},i.BUFFER_KEY="AI_buffer",i.SENT_BUFFER_KEY="AI_sentBuffer",i.MAX_BUFFER_SIZE=2e3,i}();o.SessionStorageSendBuffer=t}(e.ApplicationInsights||(e.ApplicationInsights={}))}(Microsoft||(Microsoft={})),function(e){var l,t;l=e.ApplicationInsights||(e.ApplicationInsights={}),t=function(){function e(e){(this._XMLHttpRequestSupported=!1,this._consecutiveErrors=0,this._retryAt=null,this._lastSend=0,this._config=e,this._sender=null,this._buffer=l.Util.canUseSessionStorage()&&this._config.enableSessionStorageBuffer()?new l.SessionStorageSendBuffer(e):new l.ArraySendBuffer(e),!this._config.isBeaconApiDisabled()&&l.Util.IsBeaconApiSupported())?this._sender=this._beaconSender:"undefined"!=typeof XMLHttpRequest&&("withCredentials"in new XMLHttpRequest?(this._sender=this._xhrSender,this._XMLHttpRequestSupported=!0):"undefined"!=typeof XDomainRequest&&(this._sender=this._xdrSender))}return e.prototype.send=function(e){try{if(this._config.disableTelemetry())return;if(!e)return void l._InternalLogging.throwInternal(l.LoggingSeverity.CRITICAL,l._InternalMessageId.CannotSendEmptyTelemetry,"Cannot send empty telemetry");if(!this._sender)return void l._InternalLogging.throwInternal(l.LoggingSeverity.CRITICAL,l._InternalMessageId.SenderNotInitialized,"Sender was not initialized");var t=l.Serializer.serialize(e),n=this._buffer.getItems(),i=this._buffer.batchPayloads(n);i&&i.length+t.length>this._config.maxBatchSizeInBytes()&&this.triggerSend(),this._buffer.enqueue(t),this._setupTimer()}catch(o){l._InternalLogging.throwInternal(l.LoggingSeverity.WARNING,l._InternalMessageId.FailedAddingTelemetryToBuffer,"Failed adding telemetry to the sender's buffer, some telemetry will be lost: "+l.Util.getExceptionName(o),{exception:l.Util.dump(o)})}},e.prototype._setupTimer=function(){var e=this;if(!this._timeoutHandle){var t=this._retryAt?Math.max(0,this._retryAt-Date.now()):0,n=Math.max(this._config.maxBatchInterval(),t);this._timeoutHandle=setTimeout(function(){e.triggerSend()},n)}},e.prototype._getSizeInBytes=function(e){var t=0;if(e&&e.length)for(var n=0;n<e.length;n++){var i=e[n];i&&i.length&&(t+=i.length)}return t},e.prototype.triggerSend=function(e){void 0===e&&(e=!0);try{if(this._config.disableTelemetry())this._buffer.clear();else{if(0<this._buffer.count()){var t=this._buffer.getItems();this._sender(t,e)}this._lastSend=+new Date}clearTimeout(this._timeoutHandle),this._timeoutHandle=null,this._retryAt=null}catch(n){(!l.Util.getIEVersion()||9<l.Util.getIEVersion())&&l._InternalLogging.throwInternal(l.LoggingSeverity.CRITICAL,l._InternalMessageId.TransmissionFailed,"Telemetry transmission failed, some telemetry will be lost: "+l.Util.getExceptionName(n),{exception:l.Util.dump(n)})}},e.prototype._setRetryTime=function(){var e;if(this._consecutiveErrors<=1)e=10;else{var t=(Math.pow(2,this._consecutiveErrors)-1)/2,n=Math.floor(Math.random()*t*10)+1;e=Math.max(Math.min(n,3600),10)}var i=Date.now()+1e3*e;this._retryAt=i},e.prototype._parseResponse=function(e){try{if(e&&""!==e){var t=JSON.parse(e);if(t&&t.itemsReceived&&t.itemsReceived>=t.itemsAccepted&&t.itemsReceived-t.itemsAccepted==t.errors.length)return t}}catch(n){l._InternalLogging.throwInternal(l.LoggingSeverity.CRITICAL,l._InternalMessageId.InvalidBackendResponse,"Cannot parse the response. "+l.Util.getExceptionName(n),{response:e})}return null},e.prototype._isRetriable=function(e){return 408==e||429==e||500==e||503==e},e.prototype._resendPayload=function(e){if(e&&0!==e.length){this._buffer.clearSent(e),this._consecutiveErrors++;for(var t=0,n=e;t<n.length;t++){var i=n[t];this._buffer.enqueue(i)}this._setRetryTime(),this._setupTimer()}},e.prototype._formatErrorMessageXhr=function(e,t){return e?"XMLHttpRequest,Status:"+e.status+",Response:"+e.responseText||e.response||"":t},e.prototype._formatErrorMessageXdr=function(e,t){return e?"XDomainRequest,Response:"+e.responseText||"":t},e.prototype._xhrSender=function(t,e){var n=this,i=new XMLHttpRequest;i[l.AjaxMonitor.DisabledPropertyName]=!0,i.open("POST",this._config.endpointUrl(),e),i.setRequestHeader("Content-type","application/json"),l.Util.isInternalApplicationInsightsEndpoint(this._config.endpointUrl())&&i.setRequestHeader(l.RequestHeaders.sdkContextHeader,l.RequestHeaders.sdkContextHeaderAppIdRequest),i.onreadystatechange=function(){return n._xhrReadyStateChange(i,t,t.length)},i.onerror=function(e){return n._onError(t,n._formatErrorMessageXhr(i),e)};var o=this._buffer.batchPayloads(t);i.send(o),this._buffer.markAsSent(t)},e.prototype._xdrSender=function(t,e){var n=this,i=new XDomainRequest;i.onload=function(){return n._xdrOnLoad(i,t)},i.onerror=function(e){return n._onError(t,n._formatErrorMessageXdr(i),e)};var o=window.location.protocol;if(0!==this._config.endpointUrl().lastIndexOf(o,0))return l._InternalLogging.throwInternal(l.LoggingSeverity.WARNING,l._InternalMessageId.TransmissionFailed,". Cannot send XDomain request. The endpoint URL protocol doesn't match the hosting page protocol."),void this._buffer.clear();var a=this._config.endpointUrl().replace(/^(https?:)/,"");i.open("POST",a);var r=this._buffer.batchPayloads(t);i.send(r),this._buffer.markAsSent(t)},e.prototype._beaconSender=function(e,t){var n=this._config.endpointUrl(),i=this._buffer.batchPayloads(e),o=new Blob([i],{type:"text/plain;charset=UTF-8"});navigator.sendBeacon(n,o)?this._buffer.markAsSent(e):l._InternalLogging.throwInternal(l.LoggingSeverity.CRITICAL,l._InternalMessageId.TransmissionFailed,". Failed to send telemetry with Beacon API.")},e.prototype._xhrReadyStateChange=function(e,t,n){if(4===e.readyState){var i=null;this._appId||(i=this._parseResponse(e.responseText||e.response))&&i.appId&&(this._appId=i.appId),(e.status<200||300<=e.status)&&0!==e.status?!this._config.isRetryDisabled()&&this._isRetriable(e.status)?(this._resendPayload(t),l._InternalLogging.throwInternal(l.LoggingSeverity.WARNING,l._InternalMessageId.TransmissionFailed,". Response code "+e.status+". Will retry to send "+t.length+" items.")):this._onError(t,this._formatErrorMessageXhr(e)):206===e.status?(i||(i=this._parseResponse(e.responseText||e.response)),i&&!this._config.isRetryDisabled()?this._onPartialSuccess(t,i):this._onError(t,this._formatErrorMessageXhr(e))):(this._consecutiveErrors=0,this._onSuccess(t,n))}},e.prototype._xdrOnLoad=function(e,t){if(!e||e.responseText+""!="200"&&""!==e.responseText){var n=this._parseResponse(e.responseText);n&&n.itemsReceived&&n.itemsReceived>n.itemsAccepted&&!this._config.isRetryDisabled()?this._onPartialSuccess(t,n):this._onError(t,this._formatErrorMessageXdr(e))}else this._consecutiveErrors=0,this._onSuccess(t,0)},e.prototype._onPartialSuccess=function(e,t){for(var n=[],i=[],o=0,a=t.errors.reverse();o<a.length;o++){var r=a[o],s=e.splice(r.index,1)[0];this._isRetriable(r.statusCode)?i.push(s):n.push(s)}0<e.length&&this._onSuccess(e,t.itemsAccepted),0<n.length&&this._onError(n,this._formatErrorMessageXhr(null,["partial success",t.itemsAccepted,"of",t.itemsReceived].join(" "))),0<i.length&&(this._resendPayload(i),l._InternalLogging.throwInternal(l.LoggingSeverity.WARNING,l._InternalMessageId.TransmissionFailed,"Partial success. Delivered: "+e.length+", Failed: "+n.length+". Will retry to send "+i.length+" our of "+t.itemsReceived+" items"))},e.prototype._onError=function(e,t,n){l._InternalLogging.throwInternal(l.LoggingSeverity.WARNING,l._InternalMessageId.OnError,"Failed to send telemetry.",{message:t}),this._buffer.clearSent(e)},e.prototype._onSuccess=function(e,t){this._buffer.clearSent(e)},e.MaxBeaconPayloadSize=65536,e}(),l.Sender=t}(Microsoft||(Microsoft={})),function(e){var t=function(t){function e(){var e=t.call(this)||this;return e.ver=2,e.properties={},e}return __extends(e,t),e}(Microsoft.Telemetry.Domain);e.MessageData=t}(AI||(AI={})),function(e){var a,r,t;a=e.ApplicationInsights||(e.ApplicationInsights={}),r=a.Telemetry||(a.Telemetry={}),t=function(o){function e(e,t,n){var i=o.call(this)||this;return i.aiDataContract={ver:a.FieldType.Required,message:a.FieldType.Required,severityLevel:a.FieldType.Default,properties:a.FieldType.Default},e=e||a.Util.NotSpecified,i.message=r.Common.DataSanitizer.sanitizeMessage(e),i.properties=r.Common.DataSanitizer.sanitizeProperties(t),n&&(i.severityLevel=n),i}return __extends(e,o),e.envelopeType="Microsoft.ApplicationInsights.{0}.Message",e.dataType="MessageData",e}(AI.MessageData),r.Trace=t}(Microsoft||(Microsoft={})),function(e){var a,t,n;a=e.ApplicationInsights||(e.ApplicationInsights={}),t=a.Telemetry||(a.Telemetry={}),n=function(o){function e(e,t,n){var i=o.call(this)||this;return i.aiDataContract={ver:a.FieldType.Required,name:a.FieldType.Required,properties:a.FieldType.Default,measurements:a.FieldType.Default},i.name=a.Telemetry.Common.DataSanitizer.sanitizeString(e)||a.Util.NotSpecified,i.properties=a.Telemetry.Common.DataSanitizer.sanitizeProperties(t),i.measurements=a.Telemetry.Common.DataSanitizer.sanitizeMeasurements(n),i}return __extends(e,o),e.envelopeType="Microsoft.ApplicationInsights.{0}.Event",e.dataType="EventData",e}(AI.EventData),t.Event=n}(Microsoft||(Microsoft={})),function(e){var t=function n(){this.hasFullStack=!0,this.parsedStack=[]};(AI||(AI={})).ExceptionDetails=t}(),function(e){var t=function(t){function e(){var e=t.call(this)||this;return e.ver=2,e.exceptions=[],e.properties={},e.measurements={},e}return __extends(e,t),e}(Microsoft.Telemetry.Domain);e.ExceptionData=t}(AI||(AI={})),function(e){var t=function n(){};(AI||(AI={})).StackFrame=t}(),function(e){var s;(function(o){var e=function(a){function e(e,t,n,i){var o=a.call(this)||this;return o.aiDataContract={ver:s.FieldType.Required,exceptions:s.FieldType.Required,severityLevel:s.FieldType.Default,properties:s.FieldType.Default,measurements:s.FieldType.Default},o.properties=s.Telemetry.Common.DataSanitizer.sanitizeProperties(t),o.measurements=s.Telemetry.Common.DataSanitizer.sanitizeMeasurements(n),o.exceptions=[new r(e)],i&&(o.severityLevel=i),o}return __extends(e,a),e.CreateSimpleException=function(e,t,n,i,o,a){return{exceptions:[{hasFullStack:!0,message:e,stack:o,typeName:t}]}},e.envelopeType="Microsoft.ApplicationInsights.{0}.Exception",e.dataType="ExceptionData",e}(AI.ExceptionData);o.Exception=e;var r=function(i){function e(e){var t=i.call(this)||this;t.aiDataContract={id:s.FieldType.Default,outerId:s.FieldType.Default,typeName:s.FieldType.Required,message:s.FieldType.Required,hasFullStack:s.FieldType.Default,stack:s.FieldType.Default,parsedStack:s.FieldType.Array},t.typeName=o.Common.DataSanitizer.sanitizeString(e.name)||s.Util.NotSpecified,t.message=o.Common.DataSanitizer.sanitizeMessage(e.message)||s.Util.NotSpecified;var n=e.stack;return t.parsedStack=t.parseStack(n),t.stack=o.Common.DataSanitizer.sanitizeException(n),t.hasFullStack=s.Util.isArray(t.parsedStack)&&0<t.parsedStack.length,t}return __extends(e,i),e.prototype.parseStack=function(e){var t=undefined;if("string"==typeof e){var n=e.split("\n");t=[];for(var i=0,o=0,a=0;a<=n.length;a++){var r=n[a];if(f.regex.test(r)){var s=new f(n[a],i++);o+=s.sizeInBytes,t.push(s)}}if(32768<o)for(var l=0,c=t.length-1,g=0,u=l,p=c;l<c;){if(32768<(g+=t[l].sizeInBytes+t[c].sizeInBytes)){var d=p-u+1;t.splice(u,d);break}u=l,p=c,l++,c--}}return t},e}(AI.ExceptionDetails),f=function(o){function a(e,t){var n=o.call(this)||this;n.sizeInBytes=0,n.aiDataContract={level:s.FieldType.Required,method:s.FieldType.Required,assembly:s.FieldType.Default,fileName:s.FieldType.Default,line:s.FieldType.Default},n.level=t,n.method="<no_method>",n.assembly=s.Util.trim(e);var i=e.match(a.regex);return i&&5<=i.length&&(n.method=s.Util.trim(i[2])||n.method,n.fileName=s.Util.trim(i[4]),n.line=parseInt(i[5])||0),n.sizeInBytes+=n.method.length,n.sizeInBytes+=n.fileName.length,n.sizeInBytes+=n.assembly.length,n.sizeInBytes+=a.baseSize,n.sizeInBytes+=n.level.toString().length,n.sizeInBytes+=n.line.toString().length,n}return __extends(a,o),a.regex=/^([\s]+at)?(.*?)(\@|\s\(|\s)([^\(\@\n]+):([0-9]+):([0-9]+)(\)?)$/,a.baseSize=58,a}(AI.StackFrame);o._StackFrame=f})((s=e.ApplicationInsights||(e.ApplicationInsights={})).Telemetry||(s.Telemetry={}))}(Microsoft||(Microsoft={})),function(e){var t;(t=e.DataPointType||(e.DataPointType={}))[t.Measurement=0]="Measurement",t[t.Aggregation=1]="Aggregation"}(AI||(AI={})),function(e){var t=function n(){this.kind=e.DataPointType.Measurement};e.DataPoint=t}(AI||(AI={})),function(e){var t=function(t){function e(){var e=t.call(this)||this;return e.ver=2,e.metrics=[],e.properties={},e}return __extends(e,t),e}(Microsoft.Telemetry.Domain);e.MetricData=t}(AI||(AI={})),function(e){var n,t,i,o;n=e.ApplicationInsights||(e.ApplicationInsights={}),t=n.Telemetry||(n.Telemetry={}),i=t.Common||(t.Common={}),o=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.aiDataContract={name:n.FieldType.Required,kind:n.FieldType.Default,value:n.FieldType.Required,count:n.FieldType.Default,min:n.FieldType.Default,max:n.FieldType.Default,stdDev:n.FieldType.Default},e}return __extends(e,t),e}(AI.DataPoint),i.DataPoint=o}(Microsoft||(Microsoft={})),function(c){var g,u,e;g=c.ApplicationInsights||(c.ApplicationInsights={}),u=g.Telemetry||(g.Telemetry={}),e=function(l){function e(e,t,n,i,o,a){var r=l.call(this)||this;r.aiDataContract={ver:g.FieldType.Required,metrics:g.FieldType.Required,properties:g.FieldType.Default};var s=new c.ApplicationInsights.Telemetry.Common.DataPoint;return s.count=0<n?n:undefined,s.max=isNaN(o)||null===o?undefined:o,s.min=isNaN(i)||null===i?undefined:i,s.name=u.Common.DataSanitizer.sanitizeString(e)||g.Util.NotSpecified,s.value=t,r.metrics=[s],r.properties=g.Telemetry.Common.DataSanitizer.sanitizeProperties(a),r}return __extends(e,l),e.envelopeType="Microsoft.ApplicationInsights.{0}.Metric",e.dataType="MetricData",e}(AI.MetricData),u.Metric=e}(Microsoft||(Microsoft={})),function(e){var l,c,t;l=e.ApplicationInsights||(e.ApplicationInsights={}),c=l.Telemetry||(l.Telemetry={}),t=function(s){function e(e,t,n,i,o,a){var r=s.call(this)||this;return r.aiDataContract={ver:l.FieldType.Required,name:l.FieldType.Default,url:l.FieldType.Default,duration:l.FieldType.Default,properties:l.FieldType.Default,measurements:l.FieldType.Default,id:l.FieldType.Default},r.id=c.Common.DataSanitizer.sanitizeId(a),r.url=c.Common.DataSanitizer.sanitizeUrl(t),r.name=c.Common.DataSanitizer.sanitizeString(e)||l.Util.NotSpecified,isNaN(n)||(r.duration=l.Util.msToTimeSpan(n)),r.properties=l.Telemetry.Common.DataSanitizer.sanitizeProperties(i),r.measurements=l.Telemetry.Common.DataSanitizer.sanitizeMeasurements(o),r}return __extends(e,s),e.envelopeType="Microsoft.ApplicationInsights.{0}.Pageview",e.dataType="PageviewData",e}(AI.PageViewData),c.PageView=t}(Microsoft||(Microsoft={})),function(e){var t=function(t){function e(){var e=t.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}return __extends(e,t),e}(e.PageViewData);e.PageViewPerfData=t}(AI||(AI={})),function(e){var f,h,t;f=e.ApplicationInsights||(e.ApplicationInsights={}),h=f.Telemetry||(f.Telemetry={}),t=function(p){function d(e,t,n,i,o){var a=p.call(this)||this;a.aiDataContract={ver:f.FieldType.Required,name:f.FieldType.Default,url:f.FieldType.Default,duration:f.FieldType.Default,perfTotal:f.FieldType.Default,networkConnect:f.FieldType.Default,sentRequest:f.FieldType.Default,receivedResponse:f.FieldType.Default,domProcessing:f.FieldType.Default,properties:f.FieldType.Default,measurements:f.FieldType.Default},a.isValid=!1;var r=d.getPerformanceTiming();if(r){var s=d.getDuration(r.navigationStart,r.loadEventEnd),l=d.getDuration(r.navigationStart,r.connectEnd),c=d.getDuration(r.requestStart,r.responseStart),g=d.getDuration(r.responseStart,r.responseEnd),u=d.getDuration(r.responseEnd,r.loadEventEnd);0==s?f._InternalLogging.throwInternal(f.LoggingSeverity.WARNING,f._InternalMessageId.ErrorPVCalc,"error calculating page view performance.",{total:s,network:l,request:c,response:g,dom:u}):d.shouldCollectDuration(s,l,c,g,u)?s<Math.floor(l)+Math.floor(c)+Math.floor(g)+Math.floor(u)?f._InternalLogging.throwInternal(f.LoggingSeverity.WARNING,f._InternalMessageId.ClientPerformanceMathError,"client performance math error.",{total:s,network:l,request:c,response:g,dom:u}):(a.durationMs=s,a.perfTotal=a.duration=f.Util.msToTimeSpan(s),a.networkConnect=f.Util.msToTimeSpan(l),a.sentRequest=f.Util.msToTimeSpan(c),a.receivedResponse=f.Util.msToTimeSpan(g),a.domProcessing=f.Util.msToTimeSpan(u),a.isValid=!0):f._InternalLogging.throwInternal(f.LoggingSeverity.WARNING,f._InternalMessageId.InvalidDurationValue,"Invalid page load duration value. Browser perf data won't be sent.",{total:s,network:l,request:c,response:g,dom:u})}return a.url=h.Common.DataSanitizer.sanitizeUrl(t),a.name=h.Common.DataSanitizer.sanitizeString(e)||f.Util.NotSpecified,a.properties=f.Telemetry.Common.DataSanitizer.sanitizeProperties(i),a.measurements=f.Telemetry.Common.DataSanitizer.sanitizeMeasurements(o),a}return __extends(d,p),d.prototype.getIsValid=function(){return this.isValid},d.prototype.getDurationMs=function(){return this.durationMs},d.getPerformanceTiming=function(){return d.isPerformanceTimingSupported()?window.performance.timing:null},d.isPerformanceTimingSupported=function(){return"undefined"!=typeof window&&window.performance&&window.performance.timing},d.isPerformanceTimingDataReady=function(){var e=window.performance.timing;return 0<e.domainLookupStart&&0<e.navigationStart&&0<e.responseStart&&0<e.requestStart&&0<e.loadEventEnd&&0<e.responseEnd&&0<e.connectEnd&&0<e.domLoading},d.getDuration=function(e,t){var n=undefined;return isNaN(e)||isNaN(t)||(n=Math.max(t-e,0)),n},d.shouldCollectDuration=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=["googlebot","adsbot-google","apis-google","mediapartners-google"],i=navigator.userAgent,o=!1;if(i)for(var a=0;a<n.length;a++)o=o||-1!==i.toLowerCase().indexOf(n[a]);if(o)return!1;for(var r=0;r<e.length;r++)if(e[r]>=d.MAX_DURATION_ALLOWED)return!1;return!0},d.envelopeType="Microsoft.ApplicationInsights.{0}.PageviewPerformance",d.dataType="PageviewPerformanceData",d.MAX_DURATION_ALLOWED=36e5,d}(AI.PageViewPerfData),h.PageViewPerformance=t}(Microsoft||(Microsoft={})),function(o){var s,e;s=o.ApplicationInsights||(o.ApplicationInsights={}),e=function(){function e(e){var t=this;this._config=e,this._sender=new s.Sender(e),this.appId=function(){return t._sender._appId},e.appId()&&(this._sender._appId=e.appId()),this.telemetryInitializers=[],"undefined"!=typeof window&&(this._sessionManager=new s.Context._SessionManager(e),this.application=new s.Context.Application,this.device=new s.Context.Device,this.internal=new s.Context.Internal(e),this.location=new s.Context.Location,this.user=new s.Context.User(e),this.operation=new s.Context.Operation,this.session=new s.Context.Session,this.sample=new s.Context.Sample(e.sampleRate())),this._addDefaultTelemetryInitializers()}return e.prototype.addTelemetryInitializer=function(e){this.telemetryInitializers.push(e)},e.prototype.track=function(e){return e?(e.name===s.Telemetry.PageView.envelopeType&&s._InternalLogging.resetInternalMessageCount(),this.session&&"string"!=typeof this.session.id&&this._sessionManager.update(),this._track(e)):s._InternalLogging.throwInternal(s.LoggingSeverity.CRITICAL,s._InternalMessageId.TrackArgumentsNotSpecified,"cannot call .track() with a null or undefined argument",null,!0),e},e.prototype._addDefaultTelemetryInitializers=function(){if(!this._config.isBrowserLinkTrackingEnabled()){var i=["/browserLinkSignalR/","/__browserLink/"];this.addTelemetryInitializer(function(e){if(e.name===o.ApplicationInsights.Telemetry.RemoteDependencyData.envelopeType){var t=e.data;if(t&&t.baseData)for(var n=0;n<i.length;n++)if(0<=t.baseData.name.indexOf(i[n]))return!1}return!0})}},e.prototype._track=function(e){this.session&&("string"==typeof this.session.id?this._applySessionContext(e,this.session):this._applySessionContext(e,this._sessionManager.automaticSession)),this._applyApplicationContext(e,this.application),this._applyDeviceContext(e,this.device),this._applyInternalContext(e,this.internal),this._applyLocationContext(e,this.location),this._applySampleContext(e,this.sample),this._applyUserContext(e,this.user),this._applyOperationContext(e,this.operation),e.iKey=this._config.instrumentationKey();var t=!1;try{for(var n=this.telemetryInitializers.length,i=0;i<n;++i){var o=this.telemetryInitializers[i];if(o&&!1===o.apply(null,[e])){t=!0;break}}}catch(r){t=!0,s._InternalLogging.throwInternal(s.LoggingSeverity.CRITICAL,s._InternalMessageId.TelemetryInitializerFailed,"One of telemetry initializers failed, telemetry item will not be sent: "+s.Util.getExceptionName(r),{exception:s.Util.dump(r)},!0)}if(!t)if(e.name===s.Telemetry.Metric.envelopeType||this.sample.isSampledIn(e)){var a=this._config.instrumentationKey().replace(/-/g,"");e.name=e.name.replace("{0}",a),this._sender.send(e)}else s._InternalLogging.throwInternal(s.LoggingSeverity.WARNING,s._InternalMessageId.TelemetrySampledAndNotSent,"Telemetry is sampled and not sent to the AI service.",{SampleRate:this.sample.sampleRate},!0);return e},e.prototype._applyApplicationContext=function(e,t){if(t){var n=new AI.ContextTagKeys;"string"==typeof t.ver&&(e.tags[n.applicationVersion]=t.ver),"string"==typeof t.build&&(e.tags[n.applicationBuild]=t.build)}},e.prototype._applyDeviceContext=function(e,t){var n=new AI.ContextTagKeys;t&&("string"==typeof t.id&&(e.tags[n.deviceId]=t.id),"string"==typeof t.ip&&(e.tags[n.deviceIp]=t.ip),"string"==typeof t.language&&(e.tags[n.deviceLanguage]=t.language),"string"==typeof t.locale&&(e.tags[n.deviceLocale]=t.locale),"string"==typeof t.model&&(e.tags[n.deviceModel]=t.model),"undefined"!=typeof t.network&&(e.tags[n.deviceNetwork]=t.network),"string"==typeof t.oemName&&(e.tags[n.deviceOEMName]=t.oemName),"string"==typeof t.os&&(e.tags[n.deviceOS]=t.os),"string"==typeof t.osversion&&(e.tags[n.deviceOSVersion]=t.osversion),"string"==typeof t.resolution&&(e.tags[n.deviceScreenResolution]=t.resolution),"string"==typeof t.type&&(e.tags[n.deviceType]=t.type))},e.prototype._applyInternalContext=function(e,t){if(t){var n=new AI.ContextTagKeys;"string"==typeof t.agentVersion&&(e.tags[n.internalAgentVersion]=t.agentVersion),"string"==typeof t.sdkVersion&&(e.tags[n.internalSdkVersion]=t.sdkVersion)}},e.prototype._applyLocationContext=function(e,t){if(t){var n=new AI.ContextTagKeys;"string"==typeof t.ip&&(e.tags[n.locationIp]=t.ip)}},e.prototype._applyOperationContext=function(e,t){if(t){var n=new AI.ContextTagKeys;"string"==typeof t.id&&(e.tags[n.operationId]=t.id),"string"==typeof t.name&&(e.tags[n.operationName]=t.name),"string"==typeof t.parentId&&(e.tags[n.operationParentId]=t.parentId),"string"==typeof t.rootId&&(e.tags[n.operationRootId]=t.rootId),"string"==typeof t.syntheticSource&&(e.tags[n.operationSyntheticSource]=t.syntheticSource)}},e.prototype._applySampleContext=function(e,t){t&&(e.sampleRate=t.sampleRate)},e.prototype._applySessionContext=function(e,t){if(t){var n=new AI.ContextTagKeys;"string"==typeof t.id&&(e.tags[n.sessionId]=t.id),"undefined"!=typeof t.isFirst&&(e.tags[n.sessionIsFirst]=t.isFirst)}},e.prototype._applyUserContext=function(e,t){if(t){var n=new AI.ContextTagKeys;"string"==typeof t.accountId&&(e.tags[n.userAccountId]=t.accountId),"string"==typeof t.agent&&(e.tags[n.userAgent]=t.agent),"string"==typeof t.id&&(e.tags[n.userId]=t.id),"string"==typeof t.authenticatedId&&(e.tags[n.userAuthUserId]=t.authenticatedId),"string"==typeof t.storeRegion&&(e.tags[n.userStoreRegion]=t.storeRegion)}},e}(),s.TelemetryContext=e}(Microsoft||(Microsoft={})),function(e){var t,n;t=e.Telemetry||(e.Telemetry={}),n=function(e){function t(){return e.call(this)||this}return __extends(t,e),t}(e.Telemetry.Base),t.Data=n}(Microsoft||(Microsoft={})),function(e){var o,t,n,i;o=e.ApplicationInsights||(e.ApplicationInsights={}),t=o.Telemetry||(o.Telemetry={}),n=t.Common||(t.Common={}),i=function(i){function e(e,t){var n=i.call(this)||this;return n.aiDataContract={baseType:o.FieldType.Required,baseData:o.FieldType.Required},n.baseType=e,n.baseData=t,n}return __extends(e,i),e}(e.Telemetry.Data),n.Data=i}(Microsoft||(Microsoft={})),function(e){var u,p,t;u=e.ApplicationInsights||(e.ApplicationInsights={}),p=u.Telemetry||(u.Telemetry={}),t=function(){function e(e,t){this.pageViewPerformanceSent=!1,this.overridePageViewDuration=!1,this.overridePageViewDuration=t,this.appInsights=e}return e.prototype.trackPageView=function(n,i,o,a,e){var r=this;"string"!=typeof n&&(n=window.document&&window.document.title||""),"string"!=typeof i&&(i=window.location&&window.location.href||"");var s=!1,l=undefined;if(p.PageViewPerformance.isPerformanceTimingSupported()){var c=p.PageViewPerformance.getPerformanceTiming().navigationStart;l=p.PageViewPerformance.getDuration(c,+new Date),p.PageViewPerformance.shouldCollectDuration(l)||(l=undefined)}else this.appInsights.sendPageViewInternal(n,i,isNaN(e)?undefined:e,o,a),this.appInsights.flush(),s=!0;if(s||!this.overridePageViewDuration&&isNaN(e)||(this.appInsights.sendPageViewInternal(n,i,isNaN(e)?l:e,o,a),this.appInsights.flush(),s=!0),p.PageViewPerformance.isPerformanceTimingSupported())var g=setInterval(function(){try{if(p.PageViewPerformance.isPerformanceTimingDataReady()){clearInterval(g);var e=new p.PageViewPerformance(n,i,null,o,a);e.getIsValid()||s?(s||r.appInsights.sendPageViewInternal(n,i,e.getDurationMs(),o,a),r.pageViewPerformanceSent||(r.appInsights.sendPageViewPerformanceInternal(e),r.pageViewPerformanceSent=!0)):r.appInsights.sendPageViewInternal(n,i,l,o,a),r.appInsights.flush()}else 6e4<p.PageViewPerformance.getDuration(c,+new Date)&&(clearInterval(g),s||(r.appInsights.sendPageViewInternal(n,i,6e4,o,a),r.appInsights.flush()))}catch(t){u._InternalLogging.throwInternal(u.LoggingSeverity.CRITICAL,u._InternalMessageId.TrackPVFailedCalc,"trackPageView failed on page load calculation: "+u.Util.getExceptionName(t),{exception:u.Util.dump(t)})}},100);else u._InternalLogging.throwInternal(u.LoggingSeverity.WARNING,u._InternalMessageId.NavigationTimingNotSupported,"trackPageView: navigation timing API used for calculation of page duration is not supported in this browser. This page view will be collected without duration and timing info.")},e}(),p.PageViewManager=t}(Microsoft||(Microsoft={})),function(e){var r;(function(e){var t=function(){function e(e){this.prevPageVisitDataKeyName="prevPageVisitData",this.pageVisitTimeTrackingHandler=e}return e.prototype.trackPreviousPageVisit=function(e,t){try{var n=this.restartPageVisitTimer(e,t);n&&this.pageVisitTimeTrackingHandler(n.pageName,n.pageUrl,n.pageVisitTime)}catch(i){r._InternalLogging.warnToConsole("Auto track page visit time failed, metric will not be collected: "+r.Util.dump(i))}},e.prototype.restartPageVisitTimer=function(e,t){try{var n=this.stopPageVisitTimer();return this.startPageVisitTimer(e,t),n}catch(i){return r._InternalLogging.warnToConsole("Call to restart failed: "+r.Util.dump(i)),null}},e.prototype.startPageVisitTimer=function(e,t){try{if(r.Util.canUseSessionStorage()){if(null!=r.Util.getSessionStorage(this.prevPageVisitDataKeyName))throw new Error("Cannot call startPageVisit consecutively without first calling stopPageVisit");var n=new a(e,t),i=JSON.stringify(n);r.Util.setSessionStorage(this.prevPageVisitDataKeyName,i)}}catch(o){r._InternalLogging.warnToConsole("Call to start failed: "+r.Util.dump(o))}},e.prototype.stopPageVisitTimer=function(){try{if(r.Util.canUseSessionStorage()){var e=Date.now(),t=r.Util.getSessionStorage(this.prevPageVisitDataKeyName);if(t){var n=JSON.parse(t);return n.pageVisitTime=e-n.pageVisitStartTime,r.Util.removeSessionStorage(this.prevPageVisitDataKeyName),n}return null}return null}catch(i){return r._InternalLogging.warnToConsole("Stop page visit timer failed: "+r.Util.dump(i)),null}},e}();e.PageVisitTimeManager=t;var a=function n(e,t){this.pageVisitStartTime=Date.now(),this.pageName=e,this.pageUrl=t};e.PageVisitData=a})((r=e.ApplicationInsights||(e.ApplicationInsights={})).Telemetry||(r.Telemetry={}))}(Microsoft||(Microsoft={})),function(e){var t,n;t=e.ApplicationInsights||(e.ApplicationInsights={}),n=function(){function e(){this.hashCodeGeneragor=new t.HashCodeScoreGenerator}return e.prototype.isEnabled=function(e,t){return this.hashCodeGeneragor.getHashCodeScore(e)<t},e}(),t.SplitTest=n}(Microsoft||(Microsoft={})),function(r){!function(p){p.Version="1.0.21";var e=function(){function o(e){var l=this;this._trackAjaxAttempts=0,this.config=e||{};var t=o.defaultConfig;if(t!==undefined)for(var n in t)this.config[n]===undefined&&(this.config[n]=t[n]);p._InternalLogging.verboseLogging=function(){return l.config.verboseLogging},p._InternalLogging.enableDebugExceptions=function(){return l.config.enableDebug};var i={instrumentationKey:function(){return l.config.instrumentationKey},accountId:function(){return l.config.accountId},sessionRenewalMs:function(){return l.config.sessionRenewalMs},sessionExpirationMs:function(){return l.config.sessionExpirationMs},endpointUrl:function(){return l.config.endpointUrl},emitLineDelimitedJson:function(){return l.config.emitLineDelimitedJson},maxBatchSizeInBytes:function(){return!l.config.isBeaconApiDisabled&&p.Util.IsBeaconApiSupported()?Math.min(l.config.maxBatchSizeInBytes,p.Sender.MaxBeaconPayloadSize):l.config.maxBatchSizeInBytes},maxBatchInterval:function(){return l.config.maxBatchInterval},disableTelemetry:function(){return l.config.disableTelemetry},sampleRate:function(){return l.config.samplingPercentage},cookieDomain:function(){return l.config.cookieDomain},enableSessionStorageBuffer:function(){return(l.config.isBeaconApiDisabled||!p.Util.IsBeaconApiSupported())&&l.config.enableSessionStorageBuffer},isRetryDisabled:function(){return l.config.isRetryDisabled},isBeaconApiDisabled:function(){return l.config.isBeaconApiDisabled},sdkExtension:function(){return l.config.sdkExtension},isBrowserLinkTrackingEnabled:function(){return l.config.isBrowserLinkTrackingEnabled},appId:function(){return l.config.appId}};this.config.isCookieUseDisabled&&p.Util.disableCookies(),this.config.isStorageUseDisabled&&p.Util.disableStorage(),this.context=new p.TelemetryContext(i),this._pageViewManager=new r.ApplicationInsights.Telemetry.PageViewManager(this,this.config.overridePageViewDuration),this._eventTracking=new a("trackEvent"),this._eventTracking.action=function(e,t,n,i,o){o?isNaN(o.duration)&&(o.duration=n):o={duration:n};var a=new p.Telemetry.Event(e,i,o),r=new p.Telemetry.Common.Data(p.Telemetry.Event.dataType,a),s=new p.Telemetry.Common.Envelope(r,p.Telemetry.Event.envelopeType);l.context.track(s)},this._pageTracking=new a("trackPageView"),this._pageTracking.action=function(e,t,n,i,o){l.sendPageViewInternal(e,t,n,i,o)},this._pageVisitTimeManager=new p.Telemetry.PageVisitTimeManager(function(e,t,n){return l.trackPageVisitTime(e,t,n)}),this.config.disableAjaxTracking||(this._ajaxMonitor=new r.ApplicationInsights.AjaxMonitor(this))}return o.prototype.sendPageViewInternal=function(e,t,n,i,o){var a=new p.Telemetry.PageView(e,t,n,i,o,this.context.operation.id),r=new p.Telemetry.Common.Data(p.Telemetry.PageView.dataType,a),s=new p.Telemetry.Common.Envelope(r,p.Telemetry.PageView.envelopeType);this.context.track(s),this._trackAjaxAttempts=0},o.prototype.sendPageViewPerformanceInternal=function(e){var t=new p.Telemetry.Common.Data(p.Telemetry.PageViewPerformance.dataType,e),n=new p.Telemetry.Common.Envelope(t,p.Telemetry.PageViewPerformance.envelopeType);this.context.track(n)},o.prototype.startTrackPage=function(e){try{"string"!=typeof e&&(e=window.document&&window.document.title||""),this._pageTracking.start(e)}catch(t){p._InternalLogging.throwInternal(p.LoggingSeverity.CRITICAL,p._InternalMessageId.StartTrackFailed,"startTrackPage failed, page view may not be collected: "+p.Util.getExceptionName(t),{exception:p.Util.dump(t)})}},o.prototype.stopTrackPage=function(e,t,n,i){try{"string"!=typeof e&&(e=window.document&&window.document.title||""),"string"!=typeof t&&(t=window.location&&window.location.href||""),this._pageTracking.stop(e,t,n,i),this.config.autoTrackPageVisitTime&&this._pageVisitTimeManager.trackPreviousPageVisit(e,t)}catch(o){p._InternalLogging.throwInternal(p.LoggingSeverity.CRITICAL,p._InternalMessageId.StopTrackFailed,"stopTrackPage failed, page view will not be collected: "+p.Util.getExceptionName(o),{exception:p.Util.dump(o)})}},o.prototype.trackPageView=function(e,t,n,i,o){try{this._pageViewManager.trackPageView(e,t,n,i,o),this.config.autoTrackPageVisitTime&&this._pageVisitTimeManager.trackPreviousPageVisit(e,t)}catch(a){p._InternalLogging.throwInternal(p.LoggingSeverity.CRITICAL,p._InternalMessageId.TrackPVFailed,"trackPageView failed, page view will not be collected: "+p.Util.getExceptionName(a),{exception:p.Util.dump(a)})}},o.prototype.startTrackEvent=function(e){try{this._eventTracking.start(e)}catch(t){p._InternalLogging.throwInternal(p.LoggingSeverity.CRITICAL,p._InternalMessageId.StartTrackEventFailed,"startTrackEvent failed, event will not be collected: "+p.Util.getExceptionName(t),{exception:p.Util.dump(t)})}},o.prototype.stopTrackEvent=function(e,t,n){try{this._eventTracking.stop(e,undefined,t,n)}catch(i){p._InternalLogging.throwInternal(p.LoggingSeverity.CRITICAL,p._InternalMessageId.StopTrackEventFailed,"stopTrackEvent failed, event will not be collected: "+p.Util.getExceptionName(i),{exception:p.Util.dump(i)})}},o.prototype.trackEvent=function(e,t,n){try{var i=new p.Telemetry.Event(e,t,n),o=new p.Telemetry.Common.Data(p.Telemetry.Event.dataType,i),a=new p.Telemetry.Common.Envelope(o,p.Telemetry.Event.envelopeType);this.context.track(a)}catch(r){p._InternalLogging.throwInternal(p.LoggingSeverity.CRITICAL,p._InternalMessageId.TrackEventFailed,"trackEvent failed, event will not be collected: "+p.Util.getExceptionName(r),{exception:p.Util.dump(r)})}},o.prototype.trackDependency=function(e,t,n,i,o,a,r,s,l){if(-1===this.config.maxAjaxCallsPerView||this._trackAjaxAttempts<this.config.maxAjaxCallsPerView){var c=new p.Telemetry.RemoteDependencyData(e,n,i,o,a,r,t,s,l),g=new p.Telemetry.Common.Data(p.Telemetry.RemoteDependencyData.dataType,c),u=new p.Telemetry.Common.Envelope(g,p.Telemetry.RemoteDependencyData.envelopeType);this.context.track(u)}else this._trackAjaxAttempts===this.config.maxAjaxCallsPerView&&p._InternalLogging.throwInternal(p.LoggingSeverity.CRITICAL,p._InternalMessageId.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);++this._trackAjaxAttempts},o.prototype.trackDependencyData=function(e){if(-1===this.config.maxAjaxCallsPerView||this._trackAjaxAttempts<this.config.maxAjaxCallsPerView){var t=new p.Telemetry.Common.Data(p.Telemetry.RemoteDependencyData.dataType,e),n=new p.Telemetry.Common.Envelope(t,p.Telemetry.RemoteDependencyData.envelopeType);this.context.track(n)}else this._trackAjaxAttempts===this.config.maxAjaxCallsPerView&&p._InternalLogging.throwInternal(p.LoggingSeverity.CRITICAL,p._InternalMessageId.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);++this._trackAjaxAttempts},o.prototype.trackAjax=function(e,t,n,i,o,a,r){this.trackDependency(e,null,t,n,i,o,a)},o.prototype.trackException=function(e,t,n,i,o){try{if(!p.Util.isError(e))try{throw new Error(e)}catch(l){e=l}var a=new p.Telemetry.Exception(e,n,i,o),r=new p.Telemetry.Common.Data(p.Telemetry.Exception.dataType,a),s=new p.Telemetry.Common.Envelope(r,p.Telemetry.Exception.envelopeType);this.context.track(s)}catch(c){p._InternalLogging.throwInternal(p.LoggingSeverity.CRITICAL,p._InternalMessageId.TrackExceptionFailed,"trackException failed, exception will not be collected: "+p.Util.getExceptionName(c),{exception:p.Util.dump(c)})}},o.prototype.trackMetric=function(e,t,n,i,o,a){try{var r=new p.Telemetry.Metric(e,t,n,i,o,a),s=new p.Telemetry.Common.Data(p.Telemetry.Metric.dataType,r),l=new p.Telemetry.Common.Envelope(s,p.Telemetry.Metric.envelopeType);this.context.track(l)}catch(c){p._InternalLogging.throwInternal(p.LoggingSeverity.CRITICAL,p._InternalMessageId.TrackMetricFailed,"trackMetric failed, metric will not be collected: "+p.Util.getExceptionName(c),{exception:p.Util.dump(c)})}},o.prototype.trackTrace=function(e,t,n){try{var i=new p.Telemetry.Trace(e,t,n),o=new p.Telemetry.Common.Data(p.Telemetry.Trace.dataType,i),a=new p.Telemetry.Common.Envelope(o,p.Telemetry.Trace.envelopeType);this.context.track(a)}catch(r){p._InternalLogging.throwInternal(p.LoggingSeverity.WARNING,p._InternalMessageId.TrackTraceFailed,"trackTrace failed, trace will not be collected: "+p.Util.getExceptionName(r),{exception:p.Util.dump(r)})}},o.prototype.trackPageVisitTime=function(e,t,n){var i={PageName:e,PageUrl:t};this.trackMetric("PageVisitTime",n,1,n,n,i)},o.prototype.flush=function(e){void 0===e&&(e=!0);try{this.context._sender.triggerSend(e)}catch(t){p._InternalLogging.throwInternal(p.LoggingSeverity.CRITICAL,p._InternalMessageId.FlushFailed,"flush failed, telemetry will not be collected: "+p.Util.getExceptionName(t),{exception:p.Util.dump(t)})}},o.prototype.setAuthenticatedUserContext=function(e,t,n){void 0===n&&(n=!1);try{this.context.user.setAuthenticatedUserContext(e,t,n)}catch(i){p._InternalLogging.throwInternal(p.LoggingSeverity.WARNING,p._InternalMessageId.SetAuthContextFailed,"Setting auth user context failed. "+p.Util.getExceptionName(i),{exception:p.Util.dump(i)},!0)}},o.prototype.clearAuthenticatedUserContext=function(){try{this.context.user.clearAuthenticatedUserContext()}catch(e){p._InternalLogging.throwInternal(p.LoggingSeverity.WARNING,p._InternalMessageId.SetAuthContextFailed,"Clearing auth user context failed. "+p.Util.getExceptionName(e),{exception:p.Util.dump(e)},!0)}},o.prototype.SendCORSException=function(e){var t=r.ApplicationInsights.Telemetry.Exception.CreateSimpleException("Script error.","Error","unknown","unknown","The browser's same-origin policy prevents us from getting the details of this exception. Consider using 'crossorigin' attribute.",0);t.properties=e;var n=new p.Telemetry.Common.Data(p.Telemetry.Exception.dataType,t),i=new p.Telemetry.Common.Envelope(n,p.Telemetry.Exception.envelopeType);this.context.track(i)},o.prototype._onerror=function(e,t,n,i,o){try{var a={url:t||document.URL};if(p.Util.isCrossOriginError(e,t,n,i,o))this.SendCORSException(a);else{if(!p.Util.isError(o)){var r="window.onerror@"+a.url+":"+n+":"+(i||0);(o=new Error(e)).stack=r}this.trackException(o,null,a)}}catch(c){var s=o?o.name+", "+o.message:"null",l=p.Util.dump(c);p._InternalLogging.throwInternal(p.LoggingSeverity.CRITICAL,p._InternalMessageId.ExceptionWhileLoggingError,"_onerror threw exception while logging error, error will not be collected: "+p.Util.getExceptionName(c),{exception:l,errorString:s})}},o}();p.AppInsights=e;var a=function(){function e(e){this._name=e,this._events={}}return e.prototype.start=function(e){"undefined"!=typeof this._events[e]&&p._InternalLogging.throwInternal(p.LoggingSeverity.WARNING,p._InternalMessageId.StartCalledMoreThanOnce,"start was called more than once for this event without calling stop.",{name:this._name,key:e},!0),this._events[e]=+new Date},e.prototype.stop=function(e,t,n,i){var o=this._events[e];if(isNaN(o))p._InternalLogging.throwInternal(p.LoggingSeverity.WARNING,p._InternalMessageId.StopCalledWithoutStart,"stop was called without a corresponding start.",{name:this._name,key:e},!0);else{var a=+new Date,r=p.Telemetry.PageViewPerformance.getDuration(o,a);this.action(e,t,r,n,i)}delete this._events[e],this._events[e]=undefined},e}()}(r.ApplicationInsights||(r.ApplicationInsights={}))}(Microsoft||(Microsoft={})),function(e){var o,t;o=e.ApplicationInsights||(e.ApplicationInsights={}),t=function(){function i(){}return i.reset=function(){i.isEnabled()&&(o.Util.setSessionStorage(i.ITEMS_QUEUED_KEY,"0"),o.Util.setSessionStorage(i.ISSUES_REPORTED_KEY,"0"),i.itemsRestoredFromSessionBuffer=0)},i.isEnabled=function(){return i.enabled&&null!=i.appInsights&&i.appInsights.context._sender._XMLHttpRequestSupported&&o.Util.canUseSessionStorage()},i.getIssuesReported=function(){return!i.isEnabled()||isNaN(+o.Util.getSessionStorage(i.ISSUES_REPORTED_KEY))?0:+o.Util.getSessionStorage(i.ISSUES_REPORTED_KEY)},i.incrementItemsQueued=function(){try{if(i.isEnabled()){var e=i.getNumberOfLostItems();++e,o.Util.setSessionStorage(i.ITEMS_QUEUED_KEY,e.toString())}}catch(t){}},i.decrementItemsQueued=function(e){try{if(i.isEnabled()){var t=i.getNumberOfLostItems();(t-=e)<0&&(t=0),o.Util.setSessionStorage(i.ITEMS_QUEUED_KEY,t.toString())}}catch(n){}},i.getNumberOfLostItems=function(){var e=0;try{i.isEnabled()&&(e=isNaN(+o.Util.getSessionStorage(i.ITEMS_QUEUED_KEY))?0:+o.Util.getSessionStorage(i.ITEMS_QUEUED_KEY))}catch(t){e=0}return e},i.reportLostItems=function(){try{if(i.isEnabled()&&i.getIssuesReported()<i.LIMIT_PER_SESSION&&0<i.getNumberOfLostItems()){var e=i.getNumberOfLostItems()-i.itemsRestoredFromSessionBuffer;i.appInsights.trackTrace('AI (Internal): Internal report DATALOSS:"'+e+'"',null),i.appInsights.flush();var t=i.getIssuesReported();++t,o.Util.setSessionStorage(i.ISSUES_REPORTED_KEY,t.toString())}}catch(n){o._InternalLogging.throwInternal(o.LoggingSeverity.CRITICAL,o._InternalMessageId.FailedToReportDataLoss,"Failed to report data loss: "+o.Util.getExceptionName(n),{exception:o.Util.dump(n)})}finally{try{i.reset()}catch(n){}}},i.enabled=!1,i.itemsRestoredFromSessionBuffer=0,i.LIMIT_PER_SESSION=10,i.ITEMS_QUEUED_KEY="AI_itemsQueued",i.ISSUES_REPORTED_KEY="AI_lossIssuesReported",i}(),o.DataLossAnalyzer=t}(Microsoft||(Microsoft={})),function(a){var o,e;o=a.ApplicationInsights||(a.ApplicationInsights={}),e=function(){function n(e){e.queue=e.queue||[];var t=e.config||{};if(t&&!t.instrumentationKey)if((t=e).iKey)a.ApplicationInsights.Version="0.10.0.0",t.instrumentationKey=t.iKey;else{if(!t.applicationInsightsId)throw new Error("Cannot load Application Insights SDK, no instrumentationKey was provided.");a.ApplicationInsights.Version="0.7.2.0",t.instrumentationKey=t.applicationInsightsId}t=n.getDefaultConfig(t),this.snippet=e,this.config=t}return n.prototype.loadAppInsights=function(){var i=new a.ApplicationInsights.AppInsights(this.config);if(this.config.iKey){var o=i.trackPageView;i.trackPageView=function(e,t,n){o.apply(i,[null,e,t,n])}}var e="logPageView";"function"==typeof this.snippet[e]&&(i[e]=function(e,t,n){i.trackPageView(null,e,t,n)});var t="logEvent";return"function"==typeof this.snippet[t]&&(i[t]=function(e,t,n){i.trackEvent(e,t,n)}),i},n.prototype.emptyQueue=function(){try{if(a.ApplicationInsights.Util.isArray(this.snippet.queue)){for(var e=this.snippet.queue.length,t=0;t<e;t++){(0,this.snippet.queue[t])()}this.snippet.queue=undefined,delete this.snippet.queue}}catch(i){var n={};i&&"function"==typeof i.toString&&(n.exception=i.toString()),a.ApplicationInsights._InternalLogging.throwInternal(o.LoggingSeverity.WARNING,o._InternalMessageId.FailedToSendQueuedTelemetry,"Failed to send queued telemetry",n)}},n.prototype.pollInteralLogs=function(i){return setInterval(function(){for(var e=a.ApplicationInsights._InternalLogging.queue,t=e.length,n=0;n<t;n++)i.trackTrace(e[n].message);e.length=0},this.config.diagnosticLogInterval)},n.prototype.addHousekeepingBeforeUnload=function(e){if(!e.config.disableFlushOnBeforeUnload&&"onbeforeunload"in window){a.ApplicationInsights.Util.addEventHandler("beforeunload",function(){e.context._sender.triggerSend(),e.context._sessionManager.backup()})||a.ApplicationInsights._InternalLogging.throwInternal(a.ApplicationInsights.LoggingSeverity.CRITICAL,a.ApplicationInsights._InternalMessageId.FailedToAddHandlerForOnBeforeUnload,"Could not add handler for beforeunload")}},n.getDefaultConfig=function(e){return e||(e={}),e.endpointUrl=e.endpointUrl||"https://dc.services.visualstudio.com/v2/track",e.sessionRenewalMs=18e5,e.sessionExpirationMs=864e5,e.maxBatchSizeInBytes=0<e.maxBatchSizeInBytes?e.maxBatchSizeInBytes:102400,e.maxBatchInterval=isNaN(e.maxBatchInterval)?15e3:e.maxBatchInterval,e.enableDebug=o.Util.stringToBoolOrDefault(e.enableDebug),e.disableExceptionTracking=o.Util.stringToBoolOrDefault(e.disableExceptionTracking),e.disableTelemetry=o.Util.stringToBoolOrDefault(e.disableTelemetry),e.verboseLogging=o.Util.stringToBoolOrDefault(e.verboseLogging),e.emitLineDelimitedJson=o.Util.stringToBoolOrDefault(e.emitLineDelimitedJson),e.diagnosticLogInterval=e.diagnosticLogInterval||1e4,e.autoTrackPageVisitTime=o.Util.stringToBoolOrDefault(e.autoTrackPageVisitTime),(isNaN(e.samplingPercentage)||e.samplingPercentage<=0||100<=e.samplingPercentage)&&(e.samplingPercentage=100),e.disableAjaxTracking=o.Util.stringToBoolOrDefault(e.disableAjaxTracking),e.maxAjaxCallsPerView=isNaN(e.maxAjaxCallsPerView)?500:e.maxAjaxCallsPerView,e.isBeaconApiDisabled=o.Util.stringToBoolOrDefault(e.isBeaconApiDisabled,!0),e.disableCorrelationHeaders=o.Util.stringToBoolOrDefault(e.disableCorrelationHeaders),e.correlationHeaderExcludedDomains=e.correlationHeaderExcludedDomains||["*.blob.core.windows.net","*.blob.core.chinacloudapi.cn","*.blob.core.cloudapi.de","*.blob.core.usgovcloudapi.net"],e.disableFlushOnBeforeUnload=o.Util.stringToBoolOrDefault(e.disableFlushOnBeforeUnload),e.enableSessionStorageBuffer=o.Util.stringToBoolOrDefault(e.enableSessionStorageBuffer,!0),e.isRetryDisabled=o.Util.stringToBoolOrDefault(e.isRetryDisabled),e.isCookieUseDisabled=o.Util.stringToBoolOrDefault(e.isCookieUseDisabled),e.isStorageUseDisabled=o.Util.stringToBoolOrDefault(e.isStorageUseDisabled),e.isBrowserLinkTrackingEnabled=o.Util.stringToBoolOrDefault(e.isBrowserLinkTrackingEnabled),e.enableCorsCorrelation=o.Util.stringToBoolOrDefault(e.enableCorsCorrelation),e},n}(),o.Initialization=e}(Microsoft||(Microsoft={})),function(s){!function(e){try{if("undefined"!=typeof window&&"undefined"!=typeof JSON){var t="appInsights";if(window[t]===undefined)s.ApplicationInsights.AppInsights.defaultConfig=s.ApplicationInsights.Initialization.getDefaultConfig();else{var n=window[t]||{},i=new s.ApplicationInsights.Initialization(n),o=i.loadAppInsights();for(var a in o)n[a]=o[a];i.emptyQueue(),i.pollInteralLogs(o),i.addHousekeepingBeforeUnload(o)}}}catch(r){s.ApplicationInsights._InternalLogging.warnToConsole("Failed to initialize AppInsights JS SDK: "+r.message)}}(s.ApplicationInsights||(s.ApplicationInsights={}))}(Microsoft||(Microsoft={}));
//# sourceMappingURL=ai.0.js.map