Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@microsoft/applicationinsights-dependencies-js

Package Overview
Dependencies
Maintainers
5
Versions
595
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@microsoft/applicationinsights-dependencies-js - npm Package Compare versions

Comparing version 1.0.0-beta.7 to 1.0.0-beta.8

4

browser/applicationinsights-dependencies-js.min.js
/*!
* Application Insights JavaScript SDK - Dependencies Plugin, 1.0.0-beta.7
* Application Insights JavaScript SDK - Dependencies Plugin, 1.0.0-beta.8
* Copyright (c) Microsoft and contributors. All rights reserved.
*/
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t(e.aidependencies={})}(this,function(e){"use strict";var a,t,g,n;(t=a||(a={}))[t.LocalStorage=0]="LocalStorage",t[t.SessionStorage=1]="SessionStorage",(n=g||(g={}))[n.Default=0]="Default",n[n.Required=1]="Required",n[n.Array=2]="Array",n[n.Hidden=4]="Hidden";var m,i,c=function(){function e(){}return e.isNullOrUndefined=function(e){return null==e},e.newGuid=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(r,function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})},e}(),r=/[xy]/g;(i=m||(m={}))[i.CRITICAL=1]="CRITICAL",i[i.WARNING=2]="WARNING";var o=1,u=2,l=3,d=4,h=5,p=6,v=8,x=10,s=13,f=14,y=15,D=16,I=17,S=18,N=45,w=52,A=55,C=56,T=57,M=61,_=66,b=68,R=69,E=(function(){function e(){this.identifier="ChannelControllerPlugin",this.priority=E}e.prototype.processTelemetry=function(t){this.channelQueue.forEach(function(e){0<e.length&&e[0].processTelemetry(t)})},Object.defineProperty(e.prototype,"ChannelControls",{get:function(){return this.channelQueue},enumerable:!0,configurable:!0}),e.prototype.initialize=function(n,i,a){var r=this;if(this.channelQueue=new Array,n.channels)n.channels.forEach(function(e){if(e&&0<e.length){(e=e.sort(function(e,t){return e.priority-t.priority})).forEach(function(e){return e.initialize(n,i,a)});for(var t=1;t<e.length;t++)e[t-1].setNextPlugin(e[t]);r.channelQueue.push(e)}});else{for(var e=new Array,t=0;t<a.length;t++){var o=a[t];o.priority>E&&e.push(o)}if(0<e.length){(e=e.sort(function(e,t){return e.priority-t.priority})).forEach(function(e){return e.initialize(n,i,a)});for(t=1;t<e.length;t++)e[t-1].setNextPlugin(e[t]);this.channelQueue.push(e)}}}}(),200),U=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}(),j=function(){function s(){}return s.sanitizeKeyAndAddUniqueness=function(e,t,n){var i=t.length,a=s.sanitizeKey(e,t);if(a.length!==i){for(var r=0,o=a;void 0!==n[o];)r++,o=a.substring(0,s.MAX_NAME_LENGTH-3)+s.padNumber(r);a=o}return a},s.sanitizeKey=function(e,t){return t&&(t=s.trim(t.toString())).length>s.MAX_NAME_LENGTH&&(t=t.substring(0,s.MAX_NAME_LENGTH),e.throwInternal(m.WARNING,T,"name is too long. It has been truncated to "+s.MAX_NAME_LENGTH+" characters.",{name:t},!0)),t},s.sanitizeString=function(e,t,n){return void 0===n&&(n=s.MAX_STRING_LENGTH),t&&(n=n||s.MAX_STRING_LENGTH,(t=s.trim(t)).toString().length>n&&(t=t.toString().substring(0,n),e.throwInternal(m.WARNING,M,"string value is too long. It has been truncated to "+n+" characters.",{value:t},!0))),t},s.sanitizeUrl=function(e,t){return s.sanitizeInput(e,t,s.MAX_URL_LENGTH,_)},s.sanitizeMessage=function(e,t){return t&&t.length>s.MAX_MESSAGE_LENGTH&&(t=t.substring(0,s.MAX_MESSAGE_LENGTH),e.throwInternal(m.WARNING,C,"message is too long, it has been truncated to "+s.MAX_MESSAGE_LENGTH+" characters.",{message:t},!0)),t},s.sanitizeException=function(e,t){return t&&t.length>s.MAX_EXCEPTION_LENGTH&&(t=t.substring(0,s.MAX_EXCEPTION_LENGTH),e.throwInternal(m.WARNING,w,"exception is too long, it has been truncated to "+s.MAX_EXCEPTION_LENGTH+" characters.",{exception:t},!0)),t},s.sanitizeProperties=function(e,t){if(t){var n={};for(var i in t){var a=s.sanitizeString(e,t[i],s.MAX_PROPERTY_LENGTH);n[i=s.sanitizeKeyAndAddUniqueness(e,i,n)]=a}t=n}return t},s.sanitizeMeasurements=function(e,t){if(t){var n={};for(var i in t){var a=t[i];n[i=s.sanitizeKeyAndAddUniqueness(e,i,n)]=a}t=n}return t},s.sanitizeId=function(e,t){return t?s.sanitizeInput(e,t,s.MAX_ID_LENGTH,R).toString():t},s.sanitizeInput=function(e,t,n,i){return t&&(t=s.trim(t)).length>n&&(t=t.substring(0,n),e.throwInternal(m.WARNING,i,"input is too long, it has been truncated to "+n+" characters.",{data:t},!0)),t},s.padNumber=function(e){var t="00"+e;return t.substr(t.length-3)},s.trim=function(e){return"string"!=typeof e?e:e.replace(/^\s+|\s+$/g,"")},s.MAX_NAME_LENGTH=150,s.MAX_ID_LENGTH=128,s.MAX_PROPERTY_LENGTH=8192,s.MAX_STRING_LENGTH=1024,s.MAX_URL_LENGTH=2048,s.MAX_MESSAGE_LENGTH=32768,s.MAX_EXCEPTION_LENGTH=32768,s}(),q=function(){function s(){}return s.disableStorage=function(){s._canUseLocalStorage=!1,s._canUseSessionStorage=!1},s._getLocalStorageObject=function(){return s.canUseLocalStorage()?s._getVerifiedStorageObject(a.LocalStorage):null},s._getVerifiedStorageObject=function(e){var t,n,i=null;try{if("undefined"==typeof window)return null;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(e){i=null}return i},s.isInternalApplicationInsightsEndpoint=function(e){return-1!==s._internalEndpoints.indexOf(e.toLowerCase())},s.canUseLocalStorage=function(){return void 0===s._canUseLocalStorage&&(s._canUseLocalStorage=!!s._getVerifiedStorageObject(a.LocalStorage)),s._canUseLocalStorage},s.getStorage=function(t,e){var n=s._getLocalStorageObject();if(null!==n)try{return n.getItem(e)}catch(e){s._canUseLocalStorage=!1,t.throwInternal(m.WARNING,o,"Browser failed read of local storage. "+s.getExceptionName(e),{exception:s.dump(e)})}return null},s.setStorage=function(t,e,n){var i=s._getLocalStorageObject();if(null!==i)try{return i.setItem(e,n),!0}catch(e){s._canUseLocalStorage=!1,t.throwInternal(m.WARNING,l,"Browser failed write to local storage. "+s.getExceptionName(e),{exception:s.dump(e)})}return!1},s.removeStorage=function(t,e){var n=s._getLocalStorageObject();if(null!==n)try{return n.removeItem(e),!0}catch(e){s._canUseLocalStorage=!1,t.throwInternal(m.WARNING,h,"Browser failed removal of local storage item. "+s.getExceptionName(e),{exception:s.dump(e)})}return!1},s._getSessionStorageObject=function(){return s.canUseSessionStorage()?s._getVerifiedStorageObject(a.SessionStorage):null},s.canUseSessionStorage=function(){return void 0===s._canUseSessionStorage&&(s._canUseSessionStorage=!!s._getVerifiedStorageObject(a.SessionStorage)),s._canUseSessionStorage},s.getSessionStorageKeys=function(){var e=[];if(s.canUseSessionStorage())for(var t in window.sessionStorage)e.push(t);return e},s.getSessionStorage=function(t,e){var n=s._getSessionStorageObject();if(null!==n)try{return n.getItem(e)}catch(e){s._canUseSessionStorage=!1,t.throwInternal(m.WARNING,u,"Browser failed read of session storage. "+s.getExceptionName(e),{exception:s.dump(e)})}return null},s.setSessionStorage=function(t,e,n){var i=s._getSessionStorageObject();if(null!==i)try{return i.setItem(e,n),!0}catch(e){s._canUseSessionStorage=!1,t.throwInternal(m.WARNING,d,"Browser failed write to session storage. "+s.getExceptionName(e),{exception:s.dump(e)})}return!1},s.removeSessionStorage=function(t,e){var n=s._getSessionStorageObject();if(null!==n)try{return n.removeItem(e),!0}catch(e){s._canUseSessionStorage=!1,t.throwInternal(m.WARNING,p,"Browser failed removal of session storage item. "+s.getExceptionName(e),{exception:s.dump(e)})}return!1},s.disableCookies=function(){s._canUseCookies=!1},s.canUseCookies=function(t){if(void 0===s._canUseCookies){s._canUseCookies=!1;try{s._canUseCookies=void 0!==s.document.cookie}catch(e){t.throwInternal(m.WARNING,b,"Cannot access document.cookie - "+s.getExceptionName(e),{exception:s.dump(e)})}}return s._canUseCookies},s.setCookie=function(e,t,n,i){var a="",r="";i&&(a=";domain="+i),s.document.location&&"https:"===s.document.location.protocol&&(r=";secure"),s.canUseCookies(e)&&(s.document.cookie=t+"="+n+a+";path=/"+r)},s.stringToBoolOrDefault=function(e,t){return void 0===t&&(t=!1),null==e?t:"true"===e.toString().toLowerCase()},s.getCookie=function(e,t){if(s.canUseCookies(e)){var n="";if(t&&t.length)for(var i=t+"=",a=s.document.cookie.split(";"),r=0;r<a.length;r++){var o=a[r];if((o=s.trim(o))&&0===o.indexOf(i)){n=o.substring(i.length,a[r].length);break}}return n}},s.deleteCookie=function(e,t){s.canUseCookies(e)&&(s.document.cookie=t+"=;path=/;expires=Thu, 01 Jan 1970 00:00:01 GMT;")},s.trim=function(e){return"string"!=typeof e?e:e.replace(/^\s+|\s+$/g,"")},s.newId=function(){for(var e="",t=1073741824*Math.random();0<t;){e+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(t%64),t=Math.floor(t/64)}return e},s.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)},s.isError=function(e){return"[object Error]"===Object.prototype.toString.call(e)},s.isDate=function(e){return"[object Date]"===Object.prototype.toString.call(e)},s.toISOStringForIE8=function(e){if(s.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"}},s.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},s.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,a=""+Math.floor(e/36e5)%24,r=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<r?r+".":"")+(a=a.length<2?"0"+a:a)+":"+i+":"+n+"."+t},s.isCrossOriginError=function(e,t,n,i,a){return("Script error."===e||"Script error"===e)&&!a},s.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},s.getExceptionName=function(e){return"[object Error]"===Object.prototype.toString.call(e)?e.name:""},s.addEventHandler=function(e,t){if("undefined"==typeof window||!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},s.IsBeaconApiSupported=function(){return"sendBeacon"in navigator&&navigator.sendBeacon},s.document="undefined"!=typeof document?document:{},s._canUseCookies=void 0,s._canUseLocalStorage=void 0,s._canUseSessionStorage=void 0,s._internalEndpoints=["https://dc.services.visualstudio.com/v2/track","https://breeze.aimon.applicationinsights.io/v2/track","https://dc-int.services.visualstudio.com/v2/track"],s.NotSpecified="not_specified",s}(),L=function(){function i(){}return i.parseUrl=function(e){return i.htmlAnchorElement||(i.htmlAnchorElement=i.document.createElement?i.document.createElement("a"):{}),i.htmlAnchorElement.href=e,i.htmlAnchorElement},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=function(){function n(){}return n.canIncludeCorrelationHeader=function(e,t,n){if(e&&e.disableCorrelationHeaders)return!1;if(!t)return!1;var i=L.parseUrl(t).host.toLowerCase();if(!(e&&e.enableCorsCorrelation||i===n))return!1;var a=e&&e.correlationHeaderExcludedDomains;if(!a||0==a.length)return!0;for(var r=0;r<a.length;r++){if(new RegExp(a[r].toLowerCase().replace(/\./g,".").replace(/\*/g,".*")).test(i))return!1}return!0},n.getCorrelationContext=function(e){if(e){var t=n.getCorrelationContextValue(e,U.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 a=n[i].split("=");if(2==a.length&&a[0]==t)return a[1]}},n.correlationIdPrefix="cid-v1:",n}(),k=function(){function e(){}return e.ParseDependencyPath=function(e,t,n,i){var a,r;if(t&&0<t.length){var o=L.parseUrl(t);if(a=o.host,null!=o.pathname)"/"!==(i=0===o.pathname.length?"/":o.pathname).charAt(0)&&(i="/"+i),r=j.sanitizeString(e,n?n+" "+i:i);else r=j.sanitizeString(e,t)}else r=a=i;return{target:a,name:r}},e}(),H=function(){function e(){}return e.Now="undefined"==typeof window?function(){return(new Date).getTime()}: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||c.isNullOrUndefined(e)||c.isNullOrUndefined(t)||(n=t-e),n},e}(),F="Microsoft_ApplicationInsights_BypassAjaxInstrumentation",z=function(e,t){return(z=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function P(e,t){function n(){this.constructor=e}z(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var G,X,V=function(e){function t(){return e.call(this)||this}return P(t,e),t}(function(){}),W=(function(a){function e(e,t,n){var i=a.call(this)||this;return i.name=j.sanitizeString(e,n)||q.NotSpecified,i.data=t,i.time=q.toISOStringForIE8(new Date),i.aiDataContract={time:g.Required,iKey:g.Required,name:g.Required,sampleRate:function(){return 100==i.sampleRate?g.Hidden:g.Required},tags:g.Required,data:g.Required},i}P(e,a)}(function(){this.ver=1,this.sampleRate=100,this.tags={}}),function(){}),B=function(t){function e(){var e=t.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}return P(e,t),e}(W),K=(function(r){function e(e,t,n,i){var a=r.call(this)||this;return a.aiDataContract={ver:g.Required,name:g.Required,properties:g.Default,measurements:g.Default},a.name=j.sanitizeString(e,t)||q.NotSpecified,a.properties=j.sanitizeProperties(e,n),a.measurements=j.sanitizeMeasurements(e,i),a}P(e,r),e.envelopeType="Microsoft.ApplicationInsights.{0}.Event",e.dataType="EventData"}(B),function(){}),Q=function(){this.hasFullStack=!0,this.parsedStack=[]},Y=(function(o){function e(e,t,n,i,a){var r=o.call(this)||this;return r.aiDataContract={ver:g.Required,exceptions:g.Required,severityLevel:g.Default,properties:g.Default,measurements:g.Default},r.properties=j.sanitizeProperties(e,n),r.measurements=j.sanitizeMeasurements(e,i),r.exceptions=[new Y(e,t)],a&&(r.severityLevel=a),r}P(e,o),e.CreateSimpleException=function(e,t,n,i,a,r){return{exceptions:[{hasFullStack:!0,message:e,stack:a,typeName:t}]}},e.envelopeType="Microsoft.ApplicationInsights.{0}.Exception",e.dataType="ExceptionData"}(function(t){function e(){var e=t.call(this)||this;return e.ver=2,e.exceptions=[],e.properties={},e.measurements={},e}return P(e,t),e}(W)),function(a){function e(e,t){var n=a.call(this)||this;n.aiDataContract={id:g.Default,outerId:g.Default,typeName:g.Required,message:g.Required,hasFullStack:g.Default,stack:g.Default,parsedStack:g.Array},n.typeName=j.sanitizeString(e,t.name)||q.NotSpecified,n.message=j.sanitizeMessage(e,t.message)||q.NotSpecified;var i=t.stack;return n.parsedStack=n.parseStack(i),n.stack=j.sanitizeException(e,i),n.hasFullStack=q.isArray(n.parsedStack)&&0<n.parsedStack.length,n}return P(e,a),e.prototype.parseStack=function(e){var t=void 0;if("string"==typeof e){var n=e.split("\n");t=[];for(var i=0,a=0,r=0;r<=n.length;r++){var o=n[r];if(J.regex.test(o)){var s=new J(n[r],i++);a+=s.sizeInBytes,t.push(s)}}if(32768<a)for(var c=0,u=t.length-1,l=0,d=c,h=u;c<u;){if(32768<(l+=t[c].sizeInBytes+t[u].sizeInBytes)){var p=h-d+1;t.splice(d,p);break}d=c,h=u,c++,u--}}return t},e}(Q)),J=function(a){function r(e,t){var n=a.call(this)||this;n.sizeInBytes=0,n.aiDataContract={level:g.Required,method:g.Required,assembly:g.Default,fileName:g.Default,line:g.Default},n.level=t,n.method="<no_method>",n.assembly=q.trim(e);var i=e.match(r.regex);return i&&5<=i.length&&(n.method=q.trim(i[2])||n.method,n.fileName=q.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+=r.baseSize,n.sizeInBytes+=n.level.toString().length,n.sizeInBytes+=n.line.toString().length,n}return P(r,a),r.regex=/^([\s]+at)?(.*?)(\@|\s\(|\s)([^\(\@\n]+):([0-9]+):([0-9]+)(\)?)$/,r.baseSize=58,r}(K),$=function(t){function e(){var e=t.call(this)||this;return e.ver=2,e.metrics=[],e.properties={},e}return P(e,t),e}(W);(X=G||(G={}))[X.Measurement=0]="Measurement",X[X.Aggregation=1]="Aggregation";var Z,ee,te=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.aiDataContract={name:g.Required,kind:g.Default,value:g.Required,count:g.Default,min:g.Default,max:g.Default,stdDev:g.Default},e}return P(e,t),e}(function(){this.kind=G.Measurement}),ne=(function(u){function e(e,t,n,i,a,r,o){var s=u.call(this)||this;s.aiDataContract={ver:g.Required,metrics:g.Required,properties:g.Default};var c=new te;return c.count=0<i?i:void 0,c.max=isNaN(r)||null===r?void 0:r,c.min=isNaN(a)||null===a?void 0:a,c.name=j.sanitizeString(e,t)||q.NotSpecified,c.value=n,s.metrics=[c],s.properties=j.sanitizeProperties(e,o),s}P(e,u),e.envelopeType="Microsoft.ApplicationInsights.{0}.Metric",e.dataType="MetricData"}($),function(t){function e(){var e=t.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}return P(e,t),e}(B)),ie=(function(c){function e(e,t,n,i,a,r,o){var s=c.call(this)||this;return s.aiDataContract={ver:g.Required,name:g.Default,url:g.Default,duration:g.Default,properties:g.Default,measurements:g.Default,id:g.Default},s.id=j.sanitizeId(e,o),s.url=j.sanitizeUrl(e,n),s.name=j.sanitizeString(e,t)||q.NotSpecified,isNaN(i)||(s.duration=q.msToTimeSpan(i)),s.properties=j.sanitizeProperties(e,a),s.measurements=j.sanitizeMeasurements(e,r),s}P(e,c),e.envelopeType="Microsoft.ApplicationInsights.{0}.Pageview",e.dataType="PageviewData"}(ne),function(h){function e(e,t,n,i,a,r,o,s,c,u){var l=h.call(this)||this;l.aiDataContract={id:g.Required,ver:g.Required,name:g.Default,resultCode:g.Default,duration:g.Default,success:g.Default,data:g.Default,target:g.Default,type:g.Default,properties:g.Default,measurements:g.Default,kind:g.Default,value:g.Default,count:g.Default,min:g.Default,max:g.Default,stdDev:g.Default,dependencyKind:g.Default,dependencySource:g.Default,commandName:g.Default,dependencyTypeName:g.Default},l.id=t,l.duration=q.msToTimeSpan(a),l.success=r,l.resultCode=o+"",l.type="Ajax",l.data=j.sanitizeUrl(e,i);var d=k.ParseDependencyPath(e,n,s,i);return l.target=d.target,l.name=d.name,l.properties=j.sanitizeProperties(e,c),l.measurements=j.sanitizeMeasurements(e,u),l}return P(e,h),e.envelopeType="Microsoft.ApplicationInsights.{0}.RemoteDependency",e.dataType="RemoteDependencyData",e}(function(t){function e(){var e=t.call(this)||this;return e.ver=2,e.success=!0,e.properties={},e.measurements={},e}return P(e,t),e}(W)));(function(r){function e(e,t,n,i){var a=r.call(this)||this;return a.aiDataContract={ver:g.Required,message:g.Required,severityLevel:g.Default,properties:g.Default},t=t||q.NotSpecified,a.message=j.sanitizeMessage(e,t),a.properties=j.sanitizeProperties(e,n),i&&(a.severityLevel=i),a}P(e,r),e.envelopeType="Microsoft.ApplicationInsights.{0}.Message",e.dataType="MessageData"})(function(t){function e(){var e=t.call(this)||this;return e.ver=2,e.properties={},e}return P(e,t),e}(W)),function(p){function f(e,t,n,i,a,r){var o=p.call(this)||this;o.aiDataContract={ver:g.Required,name:g.Default,url:g.Default,duration:g.Default,perfTotal:g.Default,networkConnect:g.Default,sentRequest:g.Default,receivedResponse:g.Default,domProcessing:g.Default,properties:g.Default,measurements:g.Default},o.isValid=!1;var s=f.getPerformanceTiming();if(s){var c=f.getDuration(s.navigationStart,s.loadEventEnd),u=f.getDuration(s.navigationStart,s.connectEnd),l=f.getDuration(s.requestStart,s.responseStart),d=f.getDuration(s.responseStart,s.responseEnd),h=f.getDuration(s.responseEnd,s.loadEventEnd);0==c?e.throwInternal(m.WARNING,x,"error calculating page view performance.",{total:c,network:u,request:l,response:d,dom:h}):f.shouldCollectDuration(c,u,l,d,h)?c<Math.floor(u)+Math.floor(l)+Math.floor(d)+Math.floor(h)?e.throwInternal(m.WARNING,v,"client performance math error.",{total:c,network:u,request:l,response:d,dom:h}):(o.durationMs=c,o.perfTotal=o.duration=q.msToTimeSpan(c),o.networkConnect=q.msToTimeSpan(u),o.sentRequest=q.msToTimeSpan(l),o.receivedResponse=q.msToTimeSpan(d),o.domProcessing=q.msToTimeSpan(h),o.isValid=!0):e.throwInternal(m.WARNING,N,"Invalid page load duration value. Browser perf data won't be sent.",{total:c,network:u,request:l,response:d,dom:h})}return o.url=j.sanitizeUrl(e,n),o.name=j.sanitizeString(e,t)||q.NotSpecified,o.properties=j.sanitizeProperties(e,a),o.measurements=j.sanitizeMeasurements(e,r),o}P(f,p),f.prototype.getIsValid=function(){return this.isValid},f.prototype.getDurationMs=function(){return this.durationMs},f.getPerformanceTiming=function(){return f.isPerformanceTimingSupported()?window.performance.timing:null},f.isPerformanceTimingSupported=function(){return"undefined"!=typeof window&&window.performance&&window.performance.timing},f.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},f.getDuration=function(e,t){var n=void 0;return isNaN(e)||isNaN(t)||(n=Math.max(t-e,0)),n},f.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,a=!1;if(i)for(var r=0;r<n.length;r++)a=a||-1!==i.toLowerCase().indexOf(n[r]);if(a)return!1;for(var o=0;o<e.length;o++)if(e[o]>=f.MAX_DURATION_ALLOWED)return!1;return!0},f.envelopeType="Microsoft.ApplicationInsights.{0}.PageviewPerformance",f.dataType="PageviewPerformanceData",f.MAX_DURATION_ALLOWED=36e5}(function(t){function e(){var e=t.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}return P(e,t),e}(ne)),function(i){function e(e,t){var n=i.call(this)||this;return n.aiDataContract={baseType:g.Required,baseData:g.Required},n.baseType=e,n.baseData=t,n}P(e,i)}(V);(ee=Z||(Z={}))[ee.Verbose=0]="Verbose",ee[ee.Information=1]="Information",ee[ee.Warning=2]="Warning",ee[ee.Error=3]="Error",ee[ee.Critical=4]="Critical";var ae=function(){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.internalNodeName="ai.internal.nodeName",this.internalSdkVersion="ai.internal.sdkVersion",this.internalAgentVersion="ai.internal.agentVersion"},re=function(){function e(){}return e.create=function(e,t,n,i,a,r){if(n=j.sanitizeString(i,n)||q.NotSpecified,c.isNullOrUndefined(e)||c.isNullOrUndefined(t)||c.isNullOrUndefined(n))throw Error("Input doesn't contain all required fields");var o={name:n,timestamp:new Date,instrumentationKey:"",ctx:r||{},tags:[],data:{},baseType:t,baseData:e};if(!c.isNullOrUndefined(a))for(var s in a)a.hasOwnProperty(s)&&(o.data[s]=a[s]);return o},e}(),oe=(new function(e){this.UserExtensionName="User",this.WebExtensionName="Web",this.AppExtensionName="App",this.accountIdTag="User.AccountId",this.userTagsKeysMap={},this.userTagsKeysMap[this.accountIdTag]=e.userAccountId,this.ctxKeys={id:"id",authId:"authId",localId:"localId"},this.userExtKeysMap={},this.userExtKeysMap[this.ctxKeys.localId]=e.userId,this.userExtKeysMap[this.ctxKeys.authId]=e.userAuthUserId}(new ae),function(){this.openDone=!1,this.setRequestHeaderDone=!1,this.sendDone=!1,this.abortDone=!1,this.onreadystatechangeCallbackAttached=!1}),se=function(){function e(e,t){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 oe,this.clientFailure=0,this.CalculateMetrics=function(){this.ajaxTotalDuration=Math.round(1e3*H.GetDuration(this.requestSentTime,this.responseFinishedTime))/1e3},this.id=e,this._logger=t}return e.prototype.getAbsoluteUrl=function(){return this.requestUrl?L.getAbsoluteUrl(this.requestUrl):null},e.prototype.getPathName=function(){return this.requestUrl?j.sanitizeUrl(this._logger,L.getCompleteUrl(this.method,this.requestUrl)):null},e}(),ce=function(){function e(){}return e.AttachEvent=function(e,t,n){var i=!1;return c.isNullOrUndefined(e)||(c.isNullOrUndefined(e.attachEvent)?c.isNullOrUndefined(e.addEventListener)||(e.addEventListener(t,n,!1),i=!0):(e.attachEvent("on"+t,n),i=!0)),i},e.DetachEvent=function(e,t,n){c.isNullOrUndefined(e)||(c.isNullOrUndefined(e.detachEvent)?c.isNullOrUndefined(e.removeEventListener)||e.removeEventListener(t,n,!1):e.detachEvent("on"+t,n))},e}(),ue=function(){function r(){this._trackAjaxAttempts=0,this.identifier=r.identifier,this.priority=161,this.currentWindowHost=window&&window.location.host&&window.location.host.toLowerCase(),this.initialized=!1,this._fetchInitialized=!1}return r.prototype.isMonitoredInstance=function(e,t){return this.initialized&&(!0===t||!c.isNullOrUndefined(e.ajaxData))&&!0!==e[F]},r.prototype.supportsAjaxMonitoring=function(){var e=!0;return(c.isNullOrUndefined(XMLHttpRequest)||c.isNullOrUndefined(XMLHttpRequest.prototype)||c.isNullOrUndefined(XMLHttpRequest.prototype.open)||c.isNullOrUndefined(XMLHttpRequest.prototype.send)||c.isNullOrUndefined(XMLHttpRequest.prototype.abort))&&(e=!1),e},r.prototype.instrumentOpen=function(){var i=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(e){this._core.logger.throwInternal(m.CRITICAL,y,"Failed to monitor XMLHttpRequest.open, monitoring data for this ajax call may be incorrect.",{ajaxDiagnosticsMessage:r.getFailedAjaxDiagnosticsMessage(this),exception:q.dump(e)})}return i.apply(this,arguments)}},r.prototype.openHandler=function(e,t,n,i){var a=q.newId(),r=new se(a,this._core.logger);r.method=t,r.requestUrl=n,r.xhrMonitoringState.openDone=!0,e.ajaxData=r,this.attachToOnReadyStateChange(e)},r.getFailedAjaxDiagnosticsMessage=function(e){var t="";try{c.isNullOrUndefined(e)||c.isNullOrUndefined(e.ajaxData)||c.isNullOrUndefined(e.ajaxData.requestUrl)||(t+="(url: '"+e.ajaxData.requestUrl+"')")}catch(e){}return t},r.prototype.instrumentSend=function(){var t=XMLHttpRequest.prototype.send,n=this;XMLHttpRequest.prototype.send=function(e){try{n.isMonitoredInstance(this)&&!this.ajaxData.xhrMonitoringState.sendDone&&n.sendHandler(this,e)}catch(e){this._core.logger.throwInternal(m.CRITICAL,I,"Failed to monitor XMLHttpRequest, monitoring data for this ajax call may be incorrect.",{ajaxDiagnosticsMessage:r.getFailedAjaxDiagnosticsMessage(this),exception:q.dump(e)})}return t.apply(this,arguments)}},r.prototype.sendHandler=function(e,t){e.ajaxData.requestSentTime=H.Now(),(e=this.includeCorrelationHeaders(e.ajaxData,void 0,void 0,e)).ajaxData.xhrMonitoringState.sendDone=!0},r.prototype.instrumentAbort=function(){var e=XMLHttpRequest.prototype.abort,t=this;XMLHttpRequest.prototype.abort=function(){try{t.isMonitoredInstance(this)&&!this.ajaxData.xhrMonitoringState.abortDone&&(this.ajaxData.aborted=1,this.ajaxData.xhrMonitoringState.abortDone=!0)}catch(e){this._core.logger.throwInternal(m.CRITICAL,s,"Failed to monitor XMLHttpRequest.abort, monitoring data for this ajax call may be incorrect.",{ajaxDiagnosticsMessage:r.getFailedAjaxDiagnosticsMessage(this),exception:q.dump(e)})}return e.apply(this,arguments)}},r.prototype.attachToOnReadyStateChange=function(n){var i=this,e=this;n.ajaxData.xhrMonitoringState.onreadystatechangeCallbackAttached=ce.AttachEvent(n,"readystatechange",function(){try{e.isMonitoredInstance(n)&&4===n.readyState&&e.onAjaxComplete(n)}catch(e){var t=q.dump(e);t&&-1!=t.toLowerCase().indexOf("c00c023f")||i._core.logger.throwInternal(m.CRITICAL,D,"Failed to monitor XMLHttpRequest 'readystatechange' event handler, monitoring data for this ajax call may be incorrect.",{ajaxDiagnosticsMessage:r.getFailedAjaxDiagnosticsMessage(n),exception:q.dump(e)})}})},r.prototype.onAjaxComplete=function(e){if(e.ajaxData.responseFinishedTime=H.Now(),e.ajaxData.status=e.status,e.ajaxData.CalculateMetrics(),e.ajaxData.ajaxTotalDuration<0)this._core.logger.throwInternal(m.WARNING,f,"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={id:e.ajaxData.id,absoluteUrl:e.ajaxData.getAbsoluteUrl(),commandName:e.ajaxData.getPathName(),duration:e.ajaxData.ajaxTotalDuration,success:200<=+e.ajaxData.status&&+e.ajaxData.status<400,resultCode:+e.ajaxData.status,method:e.ajaxData.method},n=this.getAjaxCorrelationContext(e);n&&(t.correlationContext=n),this.trackDependencyDataInternal(t),e.ajaxData=null}},r.prototype.getAjaxCorrelationContext=function(t){try{var e=t.getAllResponseHeaders();if(null!==e)if(-1!==e.toLowerCase().indexOf(U.requestContextHeaderLowerCase)){var n=t.getResponseHeader(U.requestContextHeader);return O.getCorrelationContext(n)}}catch(e){this._core.logger.throwInternal(m.WARNING,S,"Failed to get Request-Context correlation header as it may be not included in the response or not accessible.",{ajaxDiagnosticsMessage:r.getFailedAjaxDiagnosticsMessage(t),exception:q.dump(e)})}},r.prototype.trackDependencyDataInternal=function(e,t,n){if(-1===this._config.maxAjaxCallsPerView||this._trackAjaxAttempts<this._config.maxAjaxCallsPerView){var i=re.create(e,ie.dataType,ie.envelopeType,this._core.logger,t,n);this._core.track(i)}else this._trackAjaxAttempts===this._config.maxAjaxCallsPerView&&this._core.logger.throwInternal(m.CRITICAL,A,"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},r.prototype.trackDependencyData=function(e,t){this.trackDependencyDataInternal(e,t)},r.prototype.processTelemetry=function(e){this._nextPlugin&&this._nextPlugin.processTelemetry&&this._nextPlugin.processTelemetry(e)},r.prototype.setNextPlugin=function(e){e&&(this._nextPlugin=e)},r.prototype.instrumentFetch=function(){if(this.supportsFetch()&&!this._fetchInitialized){var i=window.fetch,a=this;window.fetch=function(t,e){var n;if(a.isFetchInstrumented(t))try{n=a.createFetchRecord(t,e),e=a.includeCorrelationHeaders(n,t,e)}catch(e){a._core.logger.throwInternal(m.CRITICAL,y,"Failed to monitor Window.fetch, monitoring data for this fetch call may be incorrect.",{ajaxDiagnosticsMessage:this.getFailedFetchDiagnosticsMessage(t),exception:q.dump(e)})}return i(t,e).then(function(e){return a.onFetchComplete(e,n),e}).catch(function(e){throw a.onFetchFailed(t,n,e),e})},this._fetchInitialized=!0}},r.prototype.isFetchInstrumented=function(e){return this._fetchInitialized&&!0!==e[F]},r.prototype.supportsFetch=function(){var e=!0;return(!window||c.isNullOrUndefined(window.Request)||c.isNullOrUndefined(window.Request.prototype)||c.isNullOrUndefined(window.fetch))&&(e=!1),e},r.prototype.createFetchRecord=function(e,t){var n=q.newId(),i=new se(n,this._core.logger);return i.requestSentTime=H.Now(),e instanceof Request?i.requestUrl=e?e.url:"":i.requestUrl=e,t&&t.method?i.method=t.method:e&&e instanceof Request?i.method=e.method:i.method="GET",i},r.prototype.includeCorrelationHeaders=function(e,t,n,i){if(t){if(O.canIncludeCorrelationHeader(this._config,e.getAbsoluteUrl(),this.currentWindowHost))return n||(n={}),n.headers=new Headers(n.headers||t instanceof Request&&t.headers||{}),n.headers.set(U.requestIdHeader,e.id),n}else if(i){if(this.currentWindowHost&&O.canIncludeCorrelationHeader(this._config,i.ajaxData.getAbsoluteUrl(),this.currentWindowHost)){i.setRequestHeader(U.requestIdHeader,i.ajaxData.id);var a=this._config.appId;a&&i.setRequestHeader(U.requestContextHeader,U.requestContextAppIdFormat+a)}return i}},r.prototype.getFailedFetchDiagnosticsMessage=function(e){var t="";try{c.isNullOrUndefined(e)||(t+="string"==typeof e?"(url: '"+e+"')":"(url: '"+e.url+"')")}catch(e){this._core.logger.throwInternal(m.CRITICAL,y,"Failed to grab failed fetch diagnostics message",{exception:q.dump(e)})}return t},r.prototype.onFetchComplete=function(t,e){if(e)try{if(e.responseFinishedTime=H.Now(),e.CalculateMetrics(),e.ajaxTotalDuration<0)this._core.logger.throwInternal(m.WARNING,f,"Failed to calculate the duration of the fetch call, monitoring data for this fetch call won't be sent.",{fetchDiagnosticsMessage:this.getFailedFetchDiagnosticsMessage(t),requestSentTime:e.requestSentTime,responseFinishedTime:e.responseFinishedTime});else{var n={id:e.id,absoluteUrl:e.getAbsoluteUrl(),commandName:e.getPathName(),duration:e.ajaxTotalDuration,success:200<=t.status&&t.status<400,resultCode:t.status,method:e.method},i=this.getFetchCorrelationContext(t);i&&(n.correlationContext=i),this.trackDependencyDataInternal(n)}}catch(e){this._core.logger.throwInternal(m.WARNING,S,"Failed to calculate the duration of the fetch call, monitoring data for this fetch call won't be sent.",{fetchDiagnosticsMessage:this.getFailedFetchDiagnosticsMessage(t),exception:q.dump(e)})}},r.prototype.onFetchFailed=function(t,e,n){if(e)try{if(e.responseFinishedTime=H.Now(),e.CalculateMetrics(),e.ajaxTotalDuration<0)this._core.logger.throwInternal(m.WARNING,f,"Failed to calculate the duration of the failed fetch call, monitoring data for this fetch call won't be sent.",{fetchDiagnosticsMessage:this.getFailedFetchDiagnosticsMessage(t),requestSentTime:e.requestSentTime,responseFinishedTime:e.responseFinishedTime});else{var i={id:e.id,absoluteUrl:e.getAbsoluteUrl(),commandName:e.getPathName(),duration:e.ajaxTotalDuration,success:!1,resultCode:0,method:e.method};this.trackDependencyDataInternal(i,{error:n.message})}}catch(e){this._core.logger.throwInternal(m.WARNING,S,"Failed to calculate the duration of the failed fetch call, monitoring data for this fetch call won't be sent.",{fetchDiagnosticsMessage:this.getFailedFetchDiagnosticsMessage(t),exception:q.dump(e)})}},r.prototype.getFetchCorrelationContext=function(t){try{var e=t.headers.get(U.requestContextHeader);return O.getCorrelationContext(e)}catch(e){this._core.logger.throwInternal(m.WARNING,S,"Failed to get Request-Context correlation header as it may be not included in the response or not accessible.",{fetchDiagnosticsMessage:this.getFailedFetchDiagnosticsMessage(t),exception:q.dump(e)})}},r.prototype.instrumentXhr=function(){this.supportsAjaxMonitoring()&&!this.initialized&&(this.instrumentOpen(),this.instrumentSend(),this.instrumentAbort(),this.initialized=!0)},r.getDefaultConfig=function(){return{maxAjaxCallsPerView:500,disableAjaxTracking:!1,disableFetchTracking:!0,disableCorrelationHeaders:!1,correlationHeaderExcludedDomains:["*.blob.core.windows.net","*.blob.core.chinacloudapi.cn","*.blob.core.cloudapi.de","*.blob.core.usgovcloudapi.net"],appId:void 0,enableCorsCorrelation:!1}},r.getEmptyConfig=function(){return{maxAjaxCallsPerView:void 0,disableAjaxTracking:void 0,disableFetchTracking:void 0,disableCorrelationHeaders:void 0,correlationHeaderExcludedDomains:void 0,appId:void 0,enableCorsCorrelation:void 0}},r.prototype.initialize=function(e,t,n){if(!this.initialized&&!this._fetchInitialized){this._core=t;var i=r.getDefaultConfig();for(var a in this._config=r.getEmptyConfig(),i)this._config[a]=r.getConfig(e,a,r.identifier,i[a]);!1===this._config.disableAjaxTracking&&this.instrumentXhr(),!1===this._config.disableFetchTracking&&this.instrumentFetch()}},r.getConfig=function(e,t,n,i){var a;return void 0===i&&(i=!1),a=n&&e.extensionConfig&&e.extensionConfig[n]&&e.extensionConfig[n][t]?e.extensionConfig[n][t]:e[t],c.isNullOrUndefined(a)?i:a},r.identifier="AjaxDependencyPlugin",r}();e.AjaxPlugin=ue,e.ajaxRecord=se,Object.defineProperty(e,"__esModule",{value:!0})});
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t(e.aidependencies={})}(this,function(e){"use strict";var a,t,g,n;(t=a||(a={}))[t.LocalStorage=0]="LocalStorage",t[t.SessionStorage=1]="SessionStorage",(n=g||(g={}))[n.Default=0]="Default",n[n.Required=1]="Required",n[n.Array=2]="Array",n[n.Hidden=4]="Hidden";var m,i,c=function(){function e(){}return e.isNullOrUndefined=function(e){return null==e},e.newGuid=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(r,function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})},e}(),r=/[xy]/g;(i=m||(m={}))[i.CRITICAL=1]="CRITICAL",i[i.WARNING=2]="WARNING";var o=1,u=2,l=3,d=4,h=5,p=6,v=8,x=10,s=13,f=14,y=15,D=16,I=17,S=18,N=45,w=52,A=55,C=56,T=57,M=61,_=66,b=68,R=69,E=(function(){function e(){this.identifier="ChannelControllerPlugin",this.priority=E}e.prototype.processTelemetry=function(t){this.channelQueue.forEach(function(e){0<e.length&&e[0].processTelemetry(t)})},Object.defineProperty(e.prototype,"ChannelControls",{get:function(){return this.channelQueue},enumerable:!0,configurable:!0}),e.prototype.initialize=function(n,i,a){var r=this;if(this.channelQueue=new Array,n.channels)n.channels.forEach(function(e){if(e&&0<e.length){(e=e.sort(function(e,t){return e.priority-t.priority})).forEach(function(e){return e.initialize(n,i,a)});for(var t=1;t<e.length;t++)e[t-1].setNextPlugin(e[t]);r.channelQueue.push(e)}});else{for(var e=new Array,t=0;t<a.length;t++){var o=a[t];o.priority>E&&e.push(o)}if(0<e.length){(e=e.sort(function(e,t){return e.priority-t.priority})).forEach(function(e){return e.initialize(n,i,a)});for(t=1;t<e.length;t++)e[t-1].setNextPlugin(e[t]);this.channelQueue.push(e)}}}}(),200),U=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}(),j=function(){function s(){}return s.sanitizeKeyAndAddUniqueness=function(e,t,n){var i=t.length,a=s.sanitizeKey(e,t);if(a.length!==i){for(var r=0,o=a;void 0!==n[o];)r++,o=a.substring(0,s.MAX_NAME_LENGTH-3)+s.padNumber(r);a=o}return a},s.sanitizeKey=function(e,t){return t&&(t=s.trim(t.toString())).length>s.MAX_NAME_LENGTH&&(t=t.substring(0,s.MAX_NAME_LENGTH),e.throwInternal(m.WARNING,T,"name is too long. It has been truncated to "+s.MAX_NAME_LENGTH+" characters.",{name:t},!0)),t},s.sanitizeString=function(e,t,n){return void 0===n&&(n=s.MAX_STRING_LENGTH),t&&(n=n||s.MAX_STRING_LENGTH,(t=s.trim(t)).toString().length>n&&(t=t.toString().substring(0,n),e.throwInternal(m.WARNING,M,"string value is too long. It has been truncated to "+n+" characters.",{value:t},!0))),t},s.sanitizeUrl=function(e,t){return s.sanitizeInput(e,t,s.MAX_URL_LENGTH,_)},s.sanitizeMessage=function(e,t){return t&&t.length>s.MAX_MESSAGE_LENGTH&&(t=t.substring(0,s.MAX_MESSAGE_LENGTH),e.throwInternal(m.WARNING,C,"message is too long, it has been truncated to "+s.MAX_MESSAGE_LENGTH+" characters.",{message:t},!0)),t},s.sanitizeException=function(e,t){return t&&t.length>s.MAX_EXCEPTION_LENGTH&&(t=t.substring(0,s.MAX_EXCEPTION_LENGTH),e.throwInternal(m.WARNING,w,"exception is too long, it has been truncated to "+s.MAX_EXCEPTION_LENGTH+" characters.",{exception:t},!0)),t},s.sanitizeProperties=function(e,t){if(t){var n={};for(var i in t){var a=s.sanitizeString(e,t[i],s.MAX_PROPERTY_LENGTH);n[i=s.sanitizeKeyAndAddUniqueness(e,i,n)]=a}t=n}return t},s.sanitizeMeasurements=function(e,t){if(t){var n={};for(var i in t){var a=t[i];n[i=s.sanitizeKeyAndAddUniqueness(e,i,n)]=a}t=n}return t},s.sanitizeId=function(e,t){return t?s.sanitizeInput(e,t,s.MAX_ID_LENGTH,R).toString():t},s.sanitizeInput=function(e,t,n,i){return t&&(t=s.trim(t)).length>n&&(t=t.substring(0,n),e.throwInternal(m.WARNING,i,"input is too long, it has been truncated to "+n+" characters.",{data:t},!0)),t},s.padNumber=function(e){var t="00"+e;return t.substr(t.length-3)},s.trim=function(e){return"string"!=typeof e?e:e.replace(/^\s+|\s+$/g,"")},s.MAX_NAME_LENGTH=150,s.MAX_ID_LENGTH=128,s.MAX_PROPERTY_LENGTH=8192,s.MAX_STRING_LENGTH=1024,s.MAX_URL_LENGTH=2048,s.MAX_MESSAGE_LENGTH=32768,s.MAX_EXCEPTION_LENGTH=32768,s}(),q=function(){function s(){}return s.disableStorage=function(){s._canUseLocalStorage=!1,s._canUseSessionStorage=!1},s._getLocalStorageObject=function(){return s.canUseLocalStorage()?s._getVerifiedStorageObject(a.LocalStorage):null},s._getVerifiedStorageObject=function(e){var t,n,i=null;try{if("undefined"==typeof window)return null;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(e){i=null}return i},s.isInternalApplicationInsightsEndpoint=function(e){return-1!==s._internalEndpoints.indexOf(e.toLowerCase())},s.canUseLocalStorage=function(){return void 0===s._canUseLocalStorage&&(s._canUseLocalStorage=!!s._getVerifiedStorageObject(a.LocalStorage)),s._canUseLocalStorage},s.getStorage=function(t,e){var n=s._getLocalStorageObject();if(null!==n)try{return n.getItem(e)}catch(e){s._canUseLocalStorage=!1,t.throwInternal(m.WARNING,o,"Browser failed read of local storage. "+s.getExceptionName(e),{exception:s.dump(e)})}return null},s.setStorage=function(t,e,n){var i=s._getLocalStorageObject();if(null!==i)try{return i.setItem(e,n),!0}catch(e){s._canUseLocalStorage=!1,t.throwInternal(m.WARNING,l,"Browser failed write to local storage. "+s.getExceptionName(e),{exception:s.dump(e)})}return!1},s.removeStorage=function(t,e){var n=s._getLocalStorageObject();if(null!==n)try{return n.removeItem(e),!0}catch(e){s._canUseLocalStorage=!1,t.throwInternal(m.WARNING,h,"Browser failed removal of local storage item. "+s.getExceptionName(e),{exception:s.dump(e)})}return!1},s._getSessionStorageObject=function(){return s.canUseSessionStorage()?s._getVerifiedStorageObject(a.SessionStorage):null},s.canUseSessionStorage=function(){return void 0===s._canUseSessionStorage&&(s._canUseSessionStorage=!!s._getVerifiedStorageObject(a.SessionStorage)),s._canUseSessionStorage},s.getSessionStorageKeys=function(){var e=[];if(s.canUseSessionStorage())for(var t in window.sessionStorage)e.push(t);return e},s.getSessionStorage=function(t,e){var n=s._getSessionStorageObject();if(null!==n)try{return n.getItem(e)}catch(e){s._canUseSessionStorage=!1,t.throwInternal(m.WARNING,u,"Browser failed read of session storage. "+s.getExceptionName(e),{exception:s.dump(e)})}return null},s.setSessionStorage=function(t,e,n){var i=s._getSessionStorageObject();if(null!==i)try{return i.setItem(e,n),!0}catch(e){s._canUseSessionStorage=!1,t.throwInternal(m.WARNING,d,"Browser failed write to session storage. "+s.getExceptionName(e),{exception:s.dump(e)})}return!1},s.removeSessionStorage=function(t,e){var n=s._getSessionStorageObject();if(null!==n)try{return n.removeItem(e),!0}catch(e){s._canUseSessionStorage=!1,t.throwInternal(m.WARNING,p,"Browser failed removal of session storage item. "+s.getExceptionName(e),{exception:s.dump(e)})}return!1},s.disableCookies=function(){s._canUseCookies=!1},s.canUseCookies=function(t){if(void 0===s._canUseCookies){s._canUseCookies=!1;try{s._canUseCookies=void 0!==s.document.cookie}catch(e){t.throwInternal(m.WARNING,b,"Cannot access document.cookie - "+s.getExceptionName(e),{exception:s.dump(e)})}}return s._canUseCookies},s.setCookie=function(e,t,n,i){var a="",r="";i&&(a=";domain="+i),s.document.location&&"https:"===s.document.location.protocol&&(r=";secure"),s.canUseCookies(e)&&(s.document.cookie=t+"="+n+a+";path=/"+r)},s.stringToBoolOrDefault=function(e,t){return void 0===t&&(t=!1),null==e?t:"true"===e.toString().toLowerCase()},s.getCookie=function(e,t){if(s.canUseCookies(e)){var n="";if(t&&t.length)for(var i=t+"=",a=s.document.cookie.split(";"),r=0;r<a.length;r++){var o=a[r];if((o=s.trim(o))&&0===o.indexOf(i)){n=o.substring(i.length,a[r].length);break}}return n}},s.deleteCookie=function(e,t){s.canUseCookies(e)&&(s.document.cookie=t+"=;path=/;expires=Thu, 01 Jan 1970 00:00:01 GMT;")},s.trim=function(e){return"string"!=typeof e?e:e.replace(/^\s+|\s+$/g,"")},s.newId=function(){for(var e="",t=1073741824*Math.random();0<t;){e+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(t%64),t=Math.floor(t/64)}return e},s.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)},s.isError=function(e){return"[object Error]"===Object.prototype.toString.call(e)},s.isDate=function(e){return"[object Date]"===Object.prototype.toString.call(e)},s.toISOStringForIE8=function(e){if(s.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"}},s.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},s.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,a=""+Math.floor(e/36e5)%24,r=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<r?r+".":"")+(a=a.length<2?"0"+a:a)+":"+i+":"+n+"."+t},s.isCrossOriginError=function(e,t,n,i,a){return("Script error."===e||"Script error"===e)&&!a},s.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},s.getExceptionName=function(e){return"[object Error]"===Object.prototype.toString.call(e)?e.name:""},s.addEventHandler=function(e,t){if("undefined"==typeof window||!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},s.IsBeaconApiSupported=function(){return"sendBeacon"in navigator&&navigator.sendBeacon},s.document="undefined"!=typeof document?document:{},s._canUseCookies=void 0,s._canUseLocalStorage=void 0,s._canUseSessionStorage=void 0,s._internalEndpoints=["https://dc.services.visualstudio.com/v2/track","https://breeze.aimon.applicationinsights.io/v2/track","https://dc-int.services.visualstudio.com/v2/track"],s.NotSpecified="not_specified",s}(),L=function(){function i(){}return i.parseUrl=function(e){return i.htmlAnchorElement||(i.htmlAnchorElement=i.document.createElement?i.document.createElement("a"):{}),i.htmlAnchorElement.href=e,i.htmlAnchorElement},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=function(){function n(){}return n.canIncludeCorrelationHeader=function(e,t,n){if(e&&e.disableCorrelationHeaders)return!1;if(!t)return!1;var i=L.parseUrl(t).host.toLowerCase();if(!(e&&e.enableCorsCorrelation||i===n))return!1;var a=e&&e.correlationHeaderExcludedDomains;if(!a||0==a.length)return!0;for(var r=0;r<a.length;r++){if(new RegExp(a[r].toLowerCase().replace(/\./g,".").replace(/\*/g,".*")).test(i))return!1}return!0},n.getCorrelationContext=function(e){if(e){var t=n.getCorrelationContextValue(e,U.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 a=n[i].split("=");if(2==a.length&&a[0]==t)return a[1]}},n.correlationIdPrefix="cid-v1:",n}(),k=function(){function e(){}return e.ParseDependencyPath=function(e,t,n,i){var a,r;if(t&&0<t.length){var o=L.parseUrl(t);if(a=o.host,null!=o.pathname)"/"!==(i=0===o.pathname.length?"/":o.pathname).charAt(0)&&(i="/"+i),r=j.sanitizeString(e,n?n+" "+i:i);else r=j.sanitizeString(e,t)}else r=a=i;return{target:a,name:r}},e}(),H=function(){function e(){}return e.Now="undefined"==typeof window?function(){return(new Date).getTime()}: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||c.isNullOrUndefined(e)||c.isNullOrUndefined(t)||(n=t-e),n},e}(),F="Microsoft_ApplicationInsights_BypassAjaxInstrumentation",z=function(e,t){return(z=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function P(e,t){function n(){this.constructor=e}z(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var G,X,V=function(e){function t(){return e.call(this)||this}return P(t,e),t}(function(){}),W=(function(a){function e(e,t,n){var i=a.call(this)||this;return i.name=j.sanitizeString(e,n)||q.NotSpecified,i.data=t,i.time=q.toISOStringForIE8(new Date),i.aiDataContract={time:g.Required,iKey:g.Required,name:g.Required,sampleRate:function(){return 100==i.sampleRate?g.Hidden:g.Required},tags:g.Required,data:g.Required},i}P(e,a)}(function(){this.ver=1,this.sampleRate=100,this.tags={}}),function(){}),B=function(t){function e(){var e=t.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}return P(e,t),e}(W),K=(function(r){function e(e,t,n,i){var a=r.call(this)||this;return a.aiDataContract={ver:g.Required,name:g.Required,properties:g.Default,measurements:g.Default},a.name=j.sanitizeString(e,t)||q.NotSpecified,a.properties=j.sanitizeProperties(e,n),a.measurements=j.sanitizeMeasurements(e,i),a}P(e,r),e.envelopeType="Microsoft.ApplicationInsights.{0}.Event",e.dataType="EventData"}(B),function(){}),Q=function(){this.hasFullStack=!0,this.parsedStack=[]},Y=(function(o){function e(e,t,n,i,a){var r=o.call(this)||this;return r.aiDataContract={ver:g.Required,exceptions:g.Required,severityLevel:g.Default,properties:g.Default,measurements:g.Default},r.properties=j.sanitizeProperties(e,n),r.measurements=j.sanitizeMeasurements(e,i),r.exceptions=[new Y(e,t)],a&&(r.severityLevel=a),r}P(e,o),e.CreateSimpleException=function(e,t,n,i,a,r){return{exceptions:[{hasFullStack:!0,message:e,stack:a,typeName:t}]}},e.envelopeType="Microsoft.ApplicationInsights.{0}.Exception",e.dataType="ExceptionData"}(function(t){function e(){var e=t.call(this)||this;return e.ver=2,e.exceptions=[],e.properties={},e.measurements={},e}return P(e,t),e}(W)),function(a){function e(e,t){var n=a.call(this)||this;n.aiDataContract={id:g.Default,outerId:g.Default,typeName:g.Required,message:g.Required,hasFullStack:g.Default,stack:g.Default,parsedStack:g.Array},n.typeName=j.sanitizeString(e,t.name)||q.NotSpecified,n.message=j.sanitizeMessage(e,t.message)||q.NotSpecified;var i=t.stack;return n.parsedStack=n.parseStack(i),n.stack=j.sanitizeException(e,i),n.hasFullStack=q.isArray(n.parsedStack)&&0<n.parsedStack.length,n}return P(e,a),e.prototype.parseStack=function(e){var t=void 0;if("string"==typeof e){var n=e.split("\n");t=[];for(var i=0,a=0,r=0;r<=n.length;r++){var o=n[r];if(J.regex.test(o)){var s=new J(n[r],i++);a+=s.sizeInBytes,t.push(s)}}if(32768<a)for(var c=0,u=t.length-1,l=0,d=c,h=u;c<u;){if(32768<(l+=t[c].sizeInBytes+t[u].sizeInBytes)){var p=h-d+1;t.splice(d,p);break}d=c,h=u,c++,u--}}return t},e}(Q)),J=function(a){function r(e,t){var n=a.call(this)||this;n.sizeInBytes=0,n.aiDataContract={level:g.Required,method:g.Required,assembly:g.Default,fileName:g.Default,line:g.Default},n.level=t,n.method="<no_method>",n.assembly=q.trim(e);var i=e.match(r.regex);return i&&5<=i.length&&(n.method=q.trim(i[2])||n.method,n.fileName=q.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+=r.baseSize,n.sizeInBytes+=n.level.toString().length,n.sizeInBytes+=n.line.toString().length,n}return P(r,a),r.regex=/^([\s]+at)?(.*?)(\@|\s\(|\s)([^\(\@\n]+):([0-9]+):([0-9]+)(\)?)$/,r.baseSize=58,r}(K),$=function(t){function e(){var e=t.call(this)||this;return e.ver=2,e.metrics=[],e.properties={},e}return P(e,t),e}(W);(X=G||(G={}))[X.Measurement=0]="Measurement",X[X.Aggregation=1]="Aggregation";var Z,ee,te=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.aiDataContract={name:g.Required,kind:g.Default,value:g.Required,count:g.Default,min:g.Default,max:g.Default,stdDev:g.Default},e}return P(e,t),e}(function(){this.kind=G.Measurement}),ne=(function(u){function e(e,t,n,i,a,r,o){var s=u.call(this)||this;s.aiDataContract={ver:g.Required,metrics:g.Required,properties:g.Default};var c=new te;return c.count=0<i?i:void 0,c.max=isNaN(r)||null===r?void 0:r,c.min=isNaN(a)||null===a?void 0:a,c.name=j.sanitizeString(e,t)||q.NotSpecified,c.value=n,s.metrics=[c],s.properties=j.sanitizeProperties(e,o),s}P(e,u),e.envelopeType="Microsoft.ApplicationInsights.{0}.Metric",e.dataType="MetricData"}($),function(t){function e(){var e=t.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}return P(e,t),e}(B)),ie=(function(c){function e(e,t,n,i,a,r,o){var s=c.call(this)||this;return s.aiDataContract={ver:g.Required,name:g.Default,url:g.Default,duration:g.Default,properties:g.Default,measurements:g.Default,id:g.Default},s.id=j.sanitizeId(e,o),s.url=j.sanitizeUrl(e,n),s.name=j.sanitizeString(e,t)||q.NotSpecified,isNaN(i)||(s.duration=q.msToTimeSpan(i)),s.properties=j.sanitizeProperties(e,a),s.measurements=j.sanitizeMeasurements(e,r),s}P(e,c),e.envelopeType="Microsoft.ApplicationInsights.{0}.Pageview",e.dataType="PageviewData"}(ne),function(h){function e(e,t,n,i,a,r,o,s,c,u){var l=h.call(this)||this;l.aiDataContract={id:g.Required,ver:g.Required,name:g.Default,resultCode:g.Default,duration:g.Default,success:g.Default,data:g.Default,target:g.Default,type:g.Default,properties:g.Default,measurements:g.Default,kind:g.Default,value:g.Default,count:g.Default,min:g.Default,max:g.Default,stdDev:g.Default,dependencyKind:g.Default,dependencySource:g.Default,commandName:g.Default,dependencyTypeName:g.Default},l.id=t,l.duration=q.msToTimeSpan(a),l.success=r,l.resultCode=o+"",l.type="Ajax",l.data=j.sanitizeUrl(e,i);var d=k.ParseDependencyPath(e,n,s,i);return l.target=d.target,l.name=d.name,l.properties=j.sanitizeProperties(e,c),l.measurements=j.sanitizeMeasurements(e,u),l}return P(e,h),e.envelopeType="Microsoft.ApplicationInsights.{0}.RemoteDependency",e.dataType="RemoteDependencyData",e}(function(t){function e(){var e=t.call(this)||this;return e.ver=2,e.success=!0,e.properties={},e.measurements={},e}return P(e,t),e}(W)));(function(r){function e(e,t,n,i){var a=r.call(this)||this;return a.aiDataContract={ver:g.Required,message:g.Required,severityLevel:g.Default,properties:g.Default},t=t||q.NotSpecified,a.message=j.sanitizeMessage(e,t),a.properties=j.sanitizeProperties(e,n),i&&(a.severityLevel=i),a}P(e,r),e.envelopeType="Microsoft.ApplicationInsights.{0}.Message",e.dataType="MessageData"})(function(t){function e(){var e=t.call(this)||this;return e.ver=2,e.properties={},e}return P(e,t),e}(W)),function(p){function f(e,t,n,i,a,r){var o=p.call(this)||this;o.aiDataContract={ver:g.Required,name:g.Default,url:g.Default,duration:g.Default,perfTotal:g.Default,networkConnect:g.Default,sentRequest:g.Default,receivedResponse:g.Default,domProcessing:g.Default,properties:g.Default,measurements:g.Default},o.isValid=!1;var s=f.getPerformanceTiming();if(s){var c=f.getDuration(s.navigationStart,s.loadEventEnd),u=f.getDuration(s.navigationStart,s.connectEnd),l=f.getDuration(s.requestStart,s.responseStart),d=f.getDuration(s.responseStart,s.responseEnd),h=f.getDuration(s.responseEnd,s.loadEventEnd);0==c?e.throwInternal(m.WARNING,x,"error calculating page view performance.",{total:c,network:u,request:l,response:d,dom:h}):f.shouldCollectDuration(c,u,l,d,h)?c<Math.floor(u)+Math.floor(l)+Math.floor(d)+Math.floor(h)?e.throwInternal(m.WARNING,v,"client performance math error.",{total:c,network:u,request:l,response:d,dom:h}):(o.durationMs=c,o.perfTotal=o.duration=q.msToTimeSpan(c),o.networkConnect=q.msToTimeSpan(u),o.sentRequest=q.msToTimeSpan(l),o.receivedResponse=q.msToTimeSpan(d),o.domProcessing=q.msToTimeSpan(h),o.isValid=!0):e.throwInternal(m.WARNING,N,"Invalid page load duration value. Browser perf data won't be sent.",{total:c,network:u,request:l,response:d,dom:h})}return o.url=j.sanitizeUrl(e,n),o.name=j.sanitizeString(e,t)||q.NotSpecified,o.properties=j.sanitizeProperties(e,a),o.measurements=j.sanitizeMeasurements(e,r),o}P(f,p),f.prototype.getIsValid=function(){return this.isValid},f.prototype.getDurationMs=function(){return this.durationMs},f.getPerformanceTiming=function(){return f.isPerformanceTimingSupported()?window.performance.timing:null},f.isPerformanceTimingSupported=function(){return"undefined"!=typeof window&&window.performance&&window.performance.timing},f.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},f.getDuration=function(e,t){var n=void 0;return isNaN(e)||isNaN(t)||(n=Math.max(t-e,0)),n},f.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,a=!1;if(i)for(var r=0;r<n.length;r++)a=a||-1!==i.toLowerCase().indexOf(n[r]);if(a)return!1;for(var o=0;o<e.length;o++)if(e[o]>=f.MAX_DURATION_ALLOWED)return!1;return!0},f.envelopeType="Microsoft.ApplicationInsights.{0}.PageviewPerformance",f.dataType="PageviewPerformanceData",f.MAX_DURATION_ALLOWED=36e5}(function(t){function e(){var e=t.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}return P(e,t),e}(ne)),function(i){function e(e,t){var n=i.call(this)||this;return n.aiDataContract={baseType:g.Required,baseData:g.Required},n.baseType=e,n.baseData=t,n}P(e,i)}(V);(ee=Z||(Z={}))[ee.Verbose=0]="Verbose",ee[ee.Information=1]="Information",ee[ee.Warning=2]="Warning",ee[ee.Error=3]="Error",ee[ee.Critical=4]="Critical";var ae=function(){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.internalNodeName="ai.internal.nodeName",this.internalSdkVersion="ai.internal.sdkVersion",this.internalAgentVersion="ai.internal.agentVersion"},re=function(){function e(){}return e.create=function(e,t,n,i,a,r){if(n=j.sanitizeString(i,n)||q.NotSpecified,c.isNullOrUndefined(e)||c.isNullOrUndefined(t)||c.isNullOrUndefined(n))throw Error("Input doesn't contain all required fields");var o={name:n,timestamp:new Date,instrumentationKey:"",ctx:r||{},tags:[],data:{},baseType:t,baseData:e};if(!c.isNullOrUndefined(a))for(var s in a)a.hasOwnProperty(s)&&(o.data[s]=a[s]);return o},e}(),oe=(new function(e){this.UserExtensionName="User",this.WebExtensionName="Web",this.AppExtensionName="App",this.accountIdTag="User.AccountId",this.userTagsKeysMap={},this.userTagsKeysMap[this.accountIdTag]=e.userAccountId,this.ctxKeys={id:"id",authId:"authId",localId:"localId"},this.userExtKeysMap={},this.userExtKeysMap[this.ctxKeys.localId]=e.userId,this.userExtKeysMap[this.ctxKeys.authId]=e.userAuthUserId}(new ae),function(){this.openDone=!1,this.setRequestHeaderDone=!1,this.sendDone=!1,this.abortDone=!1,this.onreadystatechangeCallbackAttached=!1}),se=function(){function e(e,t){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 oe,this.clientFailure=0,this.CalculateMetrics=function(){this.ajaxTotalDuration=Math.round(1e3*H.GetDuration(this.requestSentTime,this.responseFinishedTime))/1e3},this.id=e,this._logger=t}return e.prototype.getAbsoluteUrl=function(){return this.requestUrl?L.getAbsoluteUrl(this.requestUrl):null},e.prototype.getPathName=function(){return this.requestUrl?j.sanitizeUrl(this._logger,L.getCompleteUrl(this.method,this.requestUrl)):null},e}(),ce=function(){function e(){}return e.AttachEvent=function(e,t,n){var i=!1;return c.isNullOrUndefined(e)||(c.isNullOrUndefined(e.attachEvent)?c.isNullOrUndefined(e.addEventListener)||(e.addEventListener(t,n,!1),i=!0):(e.attachEvent("on"+t,n),i=!0)),i},e.DetachEvent=function(e,t,n){c.isNullOrUndefined(e)||(c.isNullOrUndefined(e.detachEvent)?c.isNullOrUndefined(e.removeEventListener)||e.removeEventListener(t,n,!1):e.detachEvent("on"+t,n))},e}(),ue=function(){function r(){this._trackAjaxAttempts=0,this.identifier=r.identifier,this.priority=161,this.currentWindowHost=window&&window.location.host&&window.location.host.toLowerCase(),this.initialized=!1,this._fetchInitialized=!1}return r.prototype.isMonitoredInstance=function(e,t){return this.initialized&&(!0===t||!c.isNullOrUndefined(e.ajaxData))&&!0!==e[F]},r.prototype.supportsAjaxMonitoring=function(){var e=!0;return(c.isNullOrUndefined(XMLHttpRequest)||c.isNullOrUndefined(XMLHttpRequest.prototype)||c.isNullOrUndefined(XMLHttpRequest.prototype.open)||c.isNullOrUndefined(XMLHttpRequest.prototype.send)||c.isNullOrUndefined(XMLHttpRequest.prototype.abort))&&(e=!1),e},r.prototype.instrumentOpen=function(){var i=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(e){this._core.logger.throwInternal(m.CRITICAL,y,"Failed to monitor XMLHttpRequest.open, monitoring data for this ajax call may be incorrect.",{ajaxDiagnosticsMessage:r.getFailedAjaxDiagnosticsMessage(this),exception:q.dump(e)})}return i.apply(this,arguments)}},r.prototype.openHandler=function(e,t,n,i){var a=q.newId(),r=new se(a,this._core.logger);r.method=t,r.requestUrl=n,r.xhrMonitoringState.openDone=!0,e.ajaxData=r,this.attachToOnReadyStateChange(e)},r.getFailedAjaxDiagnosticsMessage=function(e){var t="";try{c.isNullOrUndefined(e)||c.isNullOrUndefined(e.ajaxData)||c.isNullOrUndefined(e.ajaxData.requestUrl)||(t+="(url: '"+e.ajaxData.requestUrl+"')")}catch(e){}return t},r.prototype.instrumentSend=function(){var t=XMLHttpRequest.prototype.send,n=this;XMLHttpRequest.prototype.send=function(e){try{n.isMonitoredInstance(this)&&!this.ajaxData.xhrMonitoringState.sendDone&&n.sendHandler(this,e)}catch(e){this._core.logger.throwInternal(m.CRITICAL,I,"Failed to monitor XMLHttpRequest, monitoring data for this ajax call may be incorrect.",{ajaxDiagnosticsMessage:r.getFailedAjaxDiagnosticsMessage(this),exception:q.dump(e)})}return t.apply(this,arguments)}},r.prototype.sendHandler=function(e,t){e.ajaxData.requestSentTime=H.Now(),(e=this.includeCorrelationHeaders(e.ajaxData,void 0,void 0,e)).ajaxData.xhrMonitoringState.sendDone=!0},r.prototype.instrumentAbort=function(){var e=XMLHttpRequest.prototype.abort,t=this;XMLHttpRequest.prototype.abort=function(){try{t.isMonitoredInstance(this)&&!this.ajaxData.xhrMonitoringState.abortDone&&(this.ajaxData.aborted=1,this.ajaxData.xhrMonitoringState.abortDone=!0)}catch(e){this._core.logger.throwInternal(m.CRITICAL,s,"Failed to monitor XMLHttpRequest.abort, monitoring data for this ajax call may be incorrect.",{ajaxDiagnosticsMessage:r.getFailedAjaxDiagnosticsMessage(this),exception:q.dump(e)})}return e.apply(this,arguments)}},r.prototype.attachToOnReadyStateChange=function(n){var i=this,e=this;n.ajaxData.xhrMonitoringState.onreadystatechangeCallbackAttached=ce.AttachEvent(n,"readystatechange",function(){try{e.isMonitoredInstance(n)&&4===n.readyState&&e.onAjaxComplete(n)}catch(e){var t=q.dump(e);t&&-1!=t.toLowerCase().indexOf("c00c023f")||i._core.logger.throwInternal(m.CRITICAL,D,"Failed to monitor XMLHttpRequest 'readystatechange' event handler, monitoring data for this ajax call may be incorrect.",{ajaxDiagnosticsMessage:r.getFailedAjaxDiagnosticsMessage(n),exception:q.dump(e)})}})},r.prototype.onAjaxComplete=function(e){if(e.ajaxData.responseFinishedTime=H.Now(),e.ajaxData.status=e.status,e.ajaxData.CalculateMetrics(),e.ajaxData.ajaxTotalDuration<0)this._core.logger.throwInternal(m.WARNING,f,"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={id:e.ajaxData.id,absoluteUrl:e.ajaxData.getAbsoluteUrl(),commandName:e.ajaxData.getPathName(),duration:e.ajaxData.ajaxTotalDuration,success:200<=+e.ajaxData.status&&+e.ajaxData.status<400,resultCode:+e.ajaxData.status,method:e.ajaxData.method},n=this.getAjaxCorrelationContext(e);n&&(t.correlationContext=n),this.trackDependencyDataInternal(t),e.ajaxData=null}},r.prototype.getAjaxCorrelationContext=function(t){try{var e=t.getAllResponseHeaders();if(null!==e)if(-1!==e.toLowerCase().indexOf(U.requestContextHeaderLowerCase)){var n=t.getResponseHeader(U.requestContextHeader);return O.getCorrelationContext(n)}}catch(e){this._core.logger.throwInternal(m.WARNING,S,"Failed to get Request-Context correlation header as it may be not included in the response or not accessible.",{ajaxDiagnosticsMessage:r.getFailedAjaxDiagnosticsMessage(t),exception:q.dump(e)})}},r.prototype.trackDependencyDataInternal=function(e,t,n){if(-1===this._config.maxAjaxCallsPerView||this._trackAjaxAttempts<this._config.maxAjaxCallsPerView){var i=re.create(e,ie.dataType,ie.envelopeType,this._core.logger,t,n);this._core.track(i)}else this._trackAjaxAttempts===this._config.maxAjaxCallsPerView&&this._core.logger.throwInternal(m.CRITICAL,A,"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},r.prototype.trackDependencyData=function(e,t){this.trackDependencyDataInternal(e,t)},r.prototype.processTelemetry=function(e){this._nextPlugin&&this._nextPlugin.processTelemetry&&this._nextPlugin.processTelemetry(e)},r.prototype.setNextPlugin=function(e){e&&(this._nextPlugin=e)},r.prototype.instrumentFetch=function(){if(this.supportsFetch()&&!this._fetchInitialized){var i=window.fetch,a=this;window.fetch=function(t,e){var n;if(a.isFetchInstrumented(t))try{n=a.createFetchRecord(t,e),e=a.includeCorrelationHeaders(n,t,e)}catch(e){a._core.logger.throwInternal(m.CRITICAL,y,"Failed to monitor Window.fetch, monitoring data for this fetch call may be incorrect.",{ajaxDiagnosticsMessage:this.getFailedFetchDiagnosticsMessage(t),exception:q.dump(e)})}return i(t,e).then(function(e){return a.onFetchComplete(e,n),e}).catch(function(e){throw a.onFetchFailed(t,n,e),e})},this._fetchInitialized=!0}},r.prototype.isFetchInstrumented=function(e){return this._fetchInitialized&&!0!==e[F]},r.prototype.supportsFetch=function(){var e=!0;return(!window||c.isNullOrUndefined(window.Request)||c.isNullOrUndefined(window.Request.prototype)||c.isNullOrUndefined(window.fetch))&&(e=!1),e},r.prototype.createFetchRecord=function(e,t){var n=q.newId(),i=new se(n,this._core.logger);return i.requestSentTime=H.Now(),e instanceof Request?i.requestUrl=e?e.url:"":i.requestUrl=e,t&&t.method?i.method=t.method:e&&e instanceof Request?i.method=e.method:i.method="GET",i},r.prototype.includeCorrelationHeaders=function(e,t,n,i){if(t){if(O.canIncludeCorrelationHeader(this._config,e.getAbsoluteUrl(),this.currentWindowHost))return n||(n={}),n.headers=new Headers(n.headers||t instanceof Request&&t.headers||{}),n.headers.set(U.requestIdHeader,e.id),n}else if(i){if(this.currentWindowHost&&O.canIncludeCorrelationHeader(this._config,i.ajaxData.getAbsoluteUrl(),this.currentWindowHost)){i.setRequestHeader(U.requestIdHeader,i.ajaxData.id);var a=this._config.appId;a&&i.setRequestHeader(U.requestContextHeader,U.requestContextAppIdFormat+a)}return i}},r.prototype.getFailedFetchDiagnosticsMessage=function(e){var t="";try{c.isNullOrUndefined(e)||(t+="string"==typeof e?"(url: '"+e+"')":"(url: '"+e.url+"')")}catch(e){this._core.logger.throwInternal(m.CRITICAL,y,"Failed to grab failed fetch diagnostics message",{exception:q.dump(e)})}return t},r.prototype.onFetchComplete=function(t,e){if(e)try{if(e.responseFinishedTime=H.Now(),e.CalculateMetrics(),e.ajaxTotalDuration<0)this._core.logger.throwInternal(m.WARNING,f,"Failed to calculate the duration of the fetch call, monitoring data for this fetch call won't be sent.",{fetchDiagnosticsMessage:this.getFailedFetchDiagnosticsMessage(t),requestSentTime:e.requestSentTime,responseFinishedTime:e.responseFinishedTime});else{var n={id:e.id,absoluteUrl:e.getAbsoluteUrl(),commandName:e.getPathName(),duration:e.ajaxTotalDuration,success:200<=t.status&&t.status<400,resultCode:t.status,method:e.method},i=this.getFetchCorrelationContext(t);i&&(n.correlationContext=i),this.trackDependencyDataInternal(n)}}catch(e){this._core.logger.throwInternal(m.WARNING,S,"Failed to calculate the duration of the fetch call, monitoring data for this fetch call won't be sent.",{fetchDiagnosticsMessage:this.getFailedFetchDiagnosticsMessage(t),exception:q.dump(e)})}},r.prototype.onFetchFailed=function(t,e,n){if(e)try{if(e.responseFinishedTime=H.Now(),e.CalculateMetrics(),e.ajaxTotalDuration<0)this._core.logger.throwInternal(m.WARNING,f,"Failed to calculate the duration of the failed fetch call, monitoring data for this fetch call won't be sent.",{fetchDiagnosticsMessage:this.getFailedFetchDiagnosticsMessage(t),requestSentTime:e.requestSentTime,responseFinishedTime:e.responseFinishedTime});else{var i={id:e.id,absoluteUrl:e.getAbsoluteUrl(),commandName:e.getPathName(),duration:e.ajaxTotalDuration,success:!1,resultCode:0,method:e.method};this.trackDependencyDataInternal(i,{error:n.message})}}catch(e){this._core.logger.throwInternal(m.WARNING,S,"Failed to calculate the duration of the failed fetch call, monitoring data for this fetch call won't be sent.",{fetchDiagnosticsMessage:this.getFailedFetchDiagnosticsMessage(t),exception:q.dump(e)})}},r.prototype.getFetchCorrelationContext=function(t){try{var e=t.headers.get(U.requestContextHeader);return O.getCorrelationContext(e)}catch(e){this._core.logger.throwInternal(m.WARNING,S,"Failed to get Request-Context correlation header as it may be not included in the response or not accessible.",{fetchDiagnosticsMessage:this.getFailedFetchDiagnosticsMessage(t),exception:q.dump(e)})}},r.prototype.instrumentXhr=function(){this.supportsAjaxMonitoring()&&!this.initialized&&(this.instrumentOpen(),this.instrumentSend(),this.instrumentAbort(),this.initialized=!0)},r.getDefaultConfig=function(){return{maxAjaxCallsPerView:500,disableAjaxTracking:!1,disableFetchTracking:!0,disableCorrelationHeaders:!1,correlationHeaderExcludedDomains:["*.blob.core.windows.net","*.blob.core.chinacloudapi.cn","*.blob.core.cloudapi.de","*.blob.core.usgovcloudapi.net"],appId:void 0,enableCorsCorrelation:!1}},r.getEmptyConfig=function(){return{maxAjaxCallsPerView:void 0,disableAjaxTracking:void 0,disableFetchTracking:void 0,disableCorrelationHeaders:void 0,correlationHeaderExcludedDomains:void 0,appId:void 0,enableCorsCorrelation:void 0}},r.prototype.initialize=function(e,t,n){if(!this.initialized&&!this._fetchInitialized){this._core=t;var i=r.getDefaultConfig();for(var a in this._config=r.getEmptyConfig(),i)this._config[a]=r.getConfig(e,a,r.identifier,i[a]);!1===this._config.disableAjaxTracking&&this.instrumentXhr(),!1===this._config.disableFetchTracking&&this.instrumentFetch()}},r.getConfig=function(e,t,n,i){var a;return void 0===i&&(i=!1),a=n&&e.extensionConfig&&e.extensionConfig[n]&&!c.isNullOrUndefined(e.extensionConfig[n][t])?e.extensionConfig[n][t]:e[t],c.isNullOrUndefined(a)?i:a},r.identifier="AjaxDependencyPlugin",r}();e.AjaxPlugin=ue,e.ajaxRecord=se,Object.defineProperty(e,"__esModule",{value:!0})});
//# sourceMappingURL=applicationinsights-dependencies-js.min.js.map

@@ -491,7 +491,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved.

var configValue;
if (identifier && config.extensionConfig && config.extensionConfig[identifier] && config.extensionConfig[identifier][field]) {
configValue = config.extensionConfig[identifier][field];
if (!identifier || !config.extensionConfig || !config.extensionConfig[identifier] || CoreUtils.isNullOrUndefined(config.extensionConfig[identifier][field])) {
configValue = config[field];
}
else {
configValue = config[field];
configValue = config.extensionConfig[identifier][field];
}

@@ -498,0 +498,0 @@ return !CoreUtils.isNullOrUndefined(configValue) ? configValue : defaultValue;

/*!
* Application Insights JavaScript SDK - Dependencies Plugin, 1.0.0-beta.7
* Application Insights JavaScript SDK - Dependencies Plugin, 1.0.0-beta.8
* Copyright (c) Microsoft and contributors. All rights reserved.
*/
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t(e.aidependencies={})}(this,function(e){"use strict";var a,t,g,n;(t=a||(a={}))[t.LocalStorage=0]="LocalStorage",t[t.SessionStorage=1]="SessionStorage",(n=g||(g={}))[n.Default=0]="Default",n[n.Required=1]="Required",n[n.Array=2]="Array",n[n.Hidden=4]="Hidden";var m,i,c=function(){function e(){}return e.isNullOrUndefined=function(e){return null==e},e.newGuid=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(r,function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})},e}(),r=/[xy]/g;(i=m||(m={}))[i.CRITICAL=1]="CRITICAL",i[i.WARNING=2]="WARNING";var o=1,u=2,l=3,d=4,h=5,p=6,v=8,x=10,s=13,f=14,y=15,D=16,I=17,S=18,N=45,w=52,A=55,C=56,T=57,M=61,_=66,b=68,R=69,E=(function(){function e(){this.identifier="ChannelControllerPlugin",this.priority=E}e.prototype.processTelemetry=function(t){this.channelQueue.forEach(function(e){0<e.length&&e[0].processTelemetry(t)})},Object.defineProperty(e.prototype,"ChannelControls",{get:function(){return this.channelQueue},enumerable:!0,configurable:!0}),e.prototype.initialize=function(n,i,a){var r=this;if(this.channelQueue=new Array,n.channels)n.channels.forEach(function(e){if(e&&0<e.length){(e=e.sort(function(e,t){return e.priority-t.priority})).forEach(function(e){return e.initialize(n,i,a)});for(var t=1;t<e.length;t++)e[t-1].setNextPlugin(e[t]);r.channelQueue.push(e)}});else{for(var e=new Array,t=0;t<a.length;t++){var o=a[t];o.priority>E&&e.push(o)}if(0<e.length){(e=e.sort(function(e,t){return e.priority-t.priority})).forEach(function(e){return e.initialize(n,i,a)});for(t=1;t<e.length;t++)e[t-1].setNextPlugin(e[t]);this.channelQueue.push(e)}}}}(),200),U=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}(),j=function(){function s(){}return s.sanitizeKeyAndAddUniqueness=function(e,t,n){var i=t.length,a=s.sanitizeKey(e,t);if(a.length!==i){for(var r=0,o=a;void 0!==n[o];)r++,o=a.substring(0,s.MAX_NAME_LENGTH-3)+s.padNumber(r);a=o}return a},s.sanitizeKey=function(e,t){return t&&(t=s.trim(t.toString())).length>s.MAX_NAME_LENGTH&&(t=t.substring(0,s.MAX_NAME_LENGTH),e.throwInternal(m.WARNING,T,"name is too long. It has been truncated to "+s.MAX_NAME_LENGTH+" characters.",{name:t},!0)),t},s.sanitizeString=function(e,t,n){return void 0===n&&(n=s.MAX_STRING_LENGTH),t&&(n=n||s.MAX_STRING_LENGTH,(t=s.trim(t)).toString().length>n&&(t=t.toString().substring(0,n),e.throwInternal(m.WARNING,M,"string value is too long. It has been truncated to "+n+" characters.",{value:t},!0))),t},s.sanitizeUrl=function(e,t){return s.sanitizeInput(e,t,s.MAX_URL_LENGTH,_)},s.sanitizeMessage=function(e,t){return t&&t.length>s.MAX_MESSAGE_LENGTH&&(t=t.substring(0,s.MAX_MESSAGE_LENGTH),e.throwInternal(m.WARNING,C,"message is too long, it has been truncated to "+s.MAX_MESSAGE_LENGTH+" characters.",{message:t},!0)),t},s.sanitizeException=function(e,t){return t&&t.length>s.MAX_EXCEPTION_LENGTH&&(t=t.substring(0,s.MAX_EXCEPTION_LENGTH),e.throwInternal(m.WARNING,w,"exception is too long, it has been truncated to "+s.MAX_EXCEPTION_LENGTH+" characters.",{exception:t},!0)),t},s.sanitizeProperties=function(e,t){if(t){var n={};for(var i in t){var a=s.sanitizeString(e,t[i],s.MAX_PROPERTY_LENGTH);n[i=s.sanitizeKeyAndAddUniqueness(e,i,n)]=a}t=n}return t},s.sanitizeMeasurements=function(e,t){if(t){var n={};for(var i in t){var a=t[i];n[i=s.sanitizeKeyAndAddUniqueness(e,i,n)]=a}t=n}return t},s.sanitizeId=function(e,t){return t?s.sanitizeInput(e,t,s.MAX_ID_LENGTH,R).toString():t},s.sanitizeInput=function(e,t,n,i){return t&&(t=s.trim(t)).length>n&&(t=t.substring(0,n),e.throwInternal(m.WARNING,i,"input is too long, it has been truncated to "+n+" characters.",{data:t},!0)),t},s.padNumber=function(e){var t="00"+e;return t.substr(t.length-3)},s.trim=function(e){return"string"!=typeof e?e:e.replace(/^\s+|\s+$/g,"")},s.MAX_NAME_LENGTH=150,s.MAX_ID_LENGTH=128,s.MAX_PROPERTY_LENGTH=8192,s.MAX_STRING_LENGTH=1024,s.MAX_URL_LENGTH=2048,s.MAX_MESSAGE_LENGTH=32768,s.MAX_EXCEPTION_LENGTH=32768,s}(),q=function(){function s(){}return s.disableStorage=function(){s._canUseLocalStorage=!1,s._canUseSessionStorage=!1},s._getLocalStorageObject=function(){return s.canUseLocalStorage()?s._getVerifiedStorageObject(a.LocalStorage):null},s._getVerifiedStorageObject=function(e){var t,n,i=null;try{if("undefined"==typeof window)return null;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(e){i=null}return i},s.isInternalApplicationInsightsEndpoint=function(e){return-1!==s._internalEndpoints.indexOf(e.toLowerCase())},s.canUseLocalStorage=function(){return void 0===s._canUseLocalStorage&&(s._canUseLocalStorage=!!s._getVerifiedStorageObject(a.LocalStorage)),s._canUseLocalStorage},s.getStorage=function(t,e){var n=s._getLocalStorageObject();if(null!==n)try{return n.getItem(e)}catch(e){s._canUseLocalStorage=!1,t.throwInternal(m.WARNING,o,"Browser failed read of local storage. "+s.getExceptionName(e),{exception:s.dump(e)})}return null},s.setStorage=function(t,e,n){var i=s._getLocalStorageObject();if(null!==i)try{return i.setItem(e,n),!0}catch(e){s._canUseLocalStorage=!1,t.throwInternal(m.WARNING,l,"Browser failed write to local storage. "+s.getExceptionName(e),{exception:s.dump(e)})}return!1},s.removeStorage=function(t,e){var n=s._getLocalStorageObject();if(null!==n)try{return n.removeItem(e),!0}catch(e){s._canUseLocalStorage=!1,t.throwInternal(m.WARNING,h,"Browser failed removal of local storage item. "+s.getExceptionName(e),{exception:s.dump(e)})}return!1},s._getSessionStorageObject=function(){return s.canUseSessionStorage()?s._getVerifiedStorageObject(a.SessionStorage):null},s.canUseSessionStorage=function(){return void 0===s._canUseSessionStorage&&(s._canUseSessionStorage=!!s._getVerifiedStorageObject(a.SessionStorage)),s._canUseSessionStorage},s.getSessionStorageKeys=function(){var e=[];if(s.canUseSessionStorage())for(var t in window.sessionStorage)e.push(t);return e},s.getSessionStorage=function(t,e){var n=s._getSessionStorageObject();if(null!==n)try{return n.getItem(e)}catch(e){s._canUseSessionStorage=!1,t.throwInternal(m.WARNING,u,"Browser failed read of session storage. "+s.getExceptionName(e),{exception:s.dump(e)})}return null},s.setSessionStorage=function(t,e,n){var i=s._getSessionStorageObject();if(null!==i)try{return i.setItem(e,n),!0}catch(e){s._canUseSessionStorage=!1,t.throwInternal(m.WARNING,d,"Browser failed write to session storage. "+s.getExceptionName(e),{exception:s.dump(e)})}return!1},s.removeSessionStorage=function(t,e){var n=s._getSessionStorageObject();if(null!==n)try{return n.removeItem(e),!0}catch(e){s._canUseSessionStorage=!1,t.throwInternal(m.WARNING,p,"Browser failed removal of session storage item. "+s.getExceptionName(e),{exception:s.dump(e)})}return!1},s.disableCookies=function(){s._canUseCookies=!1},s.canUseCookies=function(t){if(void 0===s._canUseCookies){s._canUseCookies=!1;try{s._canUseCookies=void 0!==s.document.cookie}catch(e){t.throwInternal(m.WARNING,b,"Cannot access document.cookie - "+s.getExceptionName(e),{exception:s.dump(e)})}}return s._canUseCookies},s.setCookie=function(e,t,n,i){var a="",r="";i&&(a=";domain="+i),s.document.location&&"https:"===s.document.location.protocol&&(r=";secure"),s.canUseCookies(e)&&(s.document.cookie=t+"="+n+a+";path=/"+r)},s.stringToBoolOrDefault=function(e,t){return void 0===t&&(t=!1),null==e?t:"true"===e.toString().toLowerCase()},s.getCookie=function(e,t){if(s.canUseCookies(e)){var n="";if(t&&t.length)for(var i=t+"=",a=s.document.cookie.split(";"),r=0;r<a.length;r++){var o=a[r];if((o=s.trim(o))&&0===o.indexOf(i)){n=o.substring(i.length,a[r].length);break}}return n}},s.deleteCookie=function(e,t){s.canUseCookies(e)&&(s.document.cookie=t+"=;path=/;expires=Thu, 01 Jan 1970 00:00:01 GMT;")},s.trim=function(e){return"string"!=typeof e?e:e.replace(/^\s+|\s+$/g,"")},s.newId=function(){for(var e="",t=1073741824*Math.random();0<t;){e+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(t%64),t=Math.floor(t/64)}return e},s.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)},s.isError=function(e){return"[object Error]"===Object.prototype.toString.call(e)},s.isDate=function(e){return"[object Date]"===Object.prototype.toString.call(e)},s.toISOStringForIE8=function(e){if(s.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"}},s.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},s.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,a=""+Math.floor(e/36e5)%24,r=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<r?r+".":"")+(a=a.length<2?"0"+a:a)+":"+i+":"+n+"."+t},s.isCrossOriginError=function(e,t,n,i,a){return("Script error."===e||"Script error"===e)&&!a},s.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},s.getExceptionName=function(e){return"[object Error]"===Object.prototype.toString.call(e)?e.name:""},s.addEventHandler=function(e,t){if("undefined"==typeof window||!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},s.IsBeaconApiSupported=function(){return"sendBeacon"in navigator&&navigator.sendBeacon},s.document="undefined"!=typeof document?document:{},s._canUseCookies=void 0,s._canUseLocalStorage=void 0,s._canUseSessionStorage=void 0,s._internalEndpoints=["https://dc.services.visualstudio.com/v2/track","https://breeze.aimon.applicationinsights.io/v2/track","https://dc-int.services.visualstudio.com/v2/track"],s.NotSpecified="not_specified",s}(),L=function(){function i(){}return i.parseUrl=function(e){return i.htmlAnchorElement||(i.htmlAnchorElement=i.document.createElement?i.document.createElement("a"):{}),i.htmlAnchorElement.href=e,i.htmlAnchorElement},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=function(){function n(){}return n.canIncludeCorrelationHeader=function(e,t,n){if(e&&e.disableCorrelationHeaders)return!1;if(!t)return!1;var i=L.parseUrl(t).host.toLowerCase();if(!(e&&e.enableCorsCorrelation||i===n))return!1;var a=e&&e.correlationHeaderExcludedDomains;if(!a||0==a.length)return!0;for(var r=0;r<a.length;r++){if(new RegExp(a[r].toLowerCase().replace(/\./g,".").replace(/\*/g,".*")).test(i))return!1}return!0},n.getCorrelationContext=function(e){if(e){var t=n.getCorrelationContextValue(e,U.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 a=n[i].split("=");if(2==a.length&&a[0]==t)return a[1]}},n.correlationIdPrefix="cid-v1:",n}(),k=function(){function e(){}return e.ParseDependencyPath=function(e,t,n,i){var a,r;if(t&&0<t.length){var o=L.parseUrl(t);if(a=o.host,null!=o.pathname)"/"!==(i=0===o.pathname.length?"/":o.pathname).charAt(0)&&(i="/"+i),r=j.sanitizeString(e,n?n+" "+i:i);else r=j.sanitizeString(e,t)}else r=a=i;return{target:a,name:r}},e}(),H=function(){function e(){}return e.Now="undefined"==typeof window?function(){return(new Date).getTime()}: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||c.isNullOrUndefined(e)||c.isNullOrUndefined(t)||(n=t-e),n},e}(),F="Microsoft_ApplicationInsights_BypassAjaxInstrumentation",z=function(e,t){return(z=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function P(e,t){function n(){this.constructor=e}z(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var G,X,V=function(e){function t(){return e.call(this)||this}return P(t,e),t}(function(){}),W=(function(a){function e(e,t,n){var i=a.call(this)||this;return i.name=j.sanitizeString(e,n)||q.NotSpecified,i.data=t,i.time=q.toISOStringForIE8(new Date),i.aiDataContract={time:g.Required,iKey:g.Required,name:g.Required,sampleRate:function(){return 100==i.sampleRate?g.Hidden:g.Required},tags:g.Required,data:g.Required},i}P(e,a)}(function(){this.ver=1,this.sampleRate=100,this.tags={}}),function(){}),B=function(t){function e(){var e=t.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}return P(e,t),e}(W),K=(function(r){function e(e,t,n,i){var a=r.call(this)||this;return a.aiDataContract={ver:g.Required,name:g.Required,properties:g.Default,measurements:g.Default},a.name=j.sanitizeString(e,t)||q.NotSpecified,a.properties=j.sanitizeProperties(e,n),a.measurements=j.sanitizeMeasurements(e,i),a}P(e,r),e.envelopeType="Microsoft.ApplicationInsights.{0}.Event",e.dataType="EventData"}(B),function(){}),Q=function(){this.hasFullStack=!0,this.parsedStack=[]},Y=(function(o){function e(e,t,n,i,a){var r=o.call(this)||this;return r.aiDataContract={ver:g.Required,exceptions:g.Required,severityLevel:g.Default,properties:g.Default,measurements:g.Default},r.properties=j.sanitizeProperties(e,n),r.measurements=j.sanitizeMeasurements(e,i),r.exceptions=[new Y(e,t)],a&&(r.severityLevel=a),r}P(e,o),e.CreateSimpleException=function(e,t,n,i,a,r){return{exceptions:[{hasFullStack:!0,message:e,stack:a,typeName:t}]}},e.envelopeType="Microsoft.ApplicationInsights.{0}.Exception",e.dataType="ExceptionData"}(function(t){function e(){var e=t.call(this)||this;return e.ver=2,e.exceptions=[],e.properties={},e.measurements={},e}return P(e,t),e}(W)),function(a){function e(e,t){var n=a.call(this)||this;n.aiDataContract={id:g.Default,outerId:g.Default,typeName:g.Required,message:g.Required,hasFullStack:g.Default,stack:g.Default,parsedStack:g.Array},n.typeName=j.sanitizeString(e,t.name)||q.NotSpecified,n.message=j.sanitizeMessage(e,t.message)||q.NotSpecified;var i=t.stack;return n.parsedStack=n.parseStack(i),n.stack=j.sanitizeException(e,i),n.hasFullStack=q.isArray(n.parsedStack)&&0<n.parsedStack.length,n}return P(e,a),e.prototype.parseStack=function(e){var t=void 0;if("string"==typeof e){var n=e.split("\n");t=[];for(var i=0,a=0,r=0;r<=n.length;r++){var o=n[r];if(J.regex.test(o)){var s=new J(n[r],i++);a+=s.sizeInBytes,t.push(s)}}if(32768<a)for(var c=0,u=t.length-1,l=0,d=c,h=u;c<u;){if(32768<(l+=t[c].sizeInBytes+t[u].sizeInBytes)){var p=h-d+1;t.splice(d,p);break}d=c,h=u,c++,u--}}return t},e}(Q)),J=function(a){function r(e,t){var n=a.call(this)||this;n.sizeInBytes=0,n.aiDataContract={level:g.Required,method:g.Required,assembly:g.Default,fileName:g.Default,line:g.Default},n.level=t,n.method="<no_method>",n.assembly=q.trim(e);var i=e.match(r.regex);return i&&5<=i.length&&(n.method=q.trim(i[2])||n.method,n.fileName=q.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+=r.baseSize,n.sizeInBytes+=n.level.toString().length,n.sizeInBytes+=n.line.toString().length,n}return P(r,a),r.regex=/^([\s]+at)?(.*?)(\@|\s\(|\s)([^\(\@\n]+):([0-9]+):([0-9]+)(\)?)$/,r.baseSize=58,r}(K),$=function(t){function e(){var e=t.call(this)||this;return e.ver=2,e.metrics=[],e.properties={},e}return P(e,t),e}(W);(X=G||(G={}))[X.Measurement=0]="Measurement",X[X.Aggregation=1]="Aggregation";var Z,ee,te=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.aiDataContract={name:g.Required,kind:g.Default,value:g.Required,count:g.Default,min:g.Default,max:g.Default,stdDev:g.Default},e}return P(e,t),e}(function(){this.kind=G.Measurement}),ne=(function(u){function e(e,t,n,i,a,r,o){var s=u.call(this)||this;s.aiDataContract={ver:g.Required,metrics:g.Required,properties:g.Default};var c=new te;return c.count=0<i?i:void 0,c.max=isNaN(r)||null===r?void 0:r,c.min=isNaN(a)||null===a?void 0:a,c.name=j.sanitizeString(e,t)||q.NotSpecified,c.value=n,s.metrics=[c],s.properties=j.sanitizeProperties(e,o),s}P(e,u),e.envelopeType="Microsoft.ApplicationInsights.{0}.Metric",e.dataType="MetricData"}($),function(t){function e(){var e=t.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}return P(e,t),e}(B)),ie=(function(c){function e(e,t,n,i,a,r,o){var s=c.call(this)||this;return s.aiDataContract={ver:g.Required,name:g.Default,url:g.Default,duration:g.Default,properties:g.Default,measurements:g.Default,id:g.Default},s.id=j.sanitizeId(e,o),s.url=j.sanitizeUrl(e,n),s.name=j.sanitizeString(e,t)||q.NotSpecified,isNaN(i)||(s.duration=q.msToTimeSpan(i)),s.properties=j.sanitizeProperties(e,a),s.measurements=j.sanitizeMeasurements(e,r),s}P(e,c),e.envelopeType="Microsoft.ApplicationInsights.{0}.Pageview",e.dataType="PageviewData"}(ne),function(h){function e(e,t,n,i,a,r,o,s,c,u){var l=h.call(this)||this;l.aiDataContract={id:g.Required,ver:g.Required,name:g.Default,resultCode:g.Default,duration:g.Default,success:g.Default,data:g.Default,target:g.Default,type:g.Default,properties:g.Default,measurements:g.Default,kind:g.Default,value:g.Default,count:g.Default,min:g.Default,max:g.Default,stdDev:g.Default,dependencyKind:g.Default,dependencySource:g.Default,commandName:g.Default,dependencyTypeName:g.Default},l.id=t,l.duration=q.msToTimeSpan(a),l.success=r,l.resultCode=o+"",l.type="Ajax",l.data=j.sanitizeUrl(e,i);var d=k.ParseDependencyPath(e,n,s,i);return l.target=d.target,l.name=d.name,l.properties=j.sanitizeProperties(e,c),l.measurements=j.sanitizeMeasurements(e,u),l}return P(e,h),e.envelopeType="Microsoft.ApplicationInsights.{0}.RemoteDependency",e.dataType="RemoteDependencyData",e}(function(t){function e(){var e=t.call(this)||this;return e.ver=2,e.success=!0,e.properties={},e.measurements={},e}return P(e,t),e}(W)));(function(r){function e(e,t,n,i){var a=r.call(this)||this;return a.aiDataContract={ver:g.Required,message:g.Required,severityLevel:g.Default,properties:g.Default},t=t||q.NotSpecified,a.message=j.sanitizeMessage(e,t),a.properties=j.sanitizeProperties(e,n),i&&(a.severityLevel=i),a}P(e,r),e.envelopeType="Microsoft.ApplicationInsights.{0}.Message",e.dataType="MessageData"})(function(t){function e(){var e=t.call(this)||this;return e.ver=2,e.properties={},e}return P(e,t),e}(W)),function(p){function f(e,t,n,i,a,r){var o=p.call(this)||this;o.aiDataContract={ver:g.Required,name:g.Default,url:g.Default,duration:g.Default,perfTotal:g.Default,networkConnect:g.Default,sentRequest:g.Default,receivedResponse:g.Default,domProcessing:g.Default,properties:g.Default,measurements:g.Default},o.isValid=!1;var s=f.getPerformanceTiming();if(s){var c=f.getDuration(s.navigationStart,s.loadEventEnd),u=f.getDuration(s.navigationStart,s.connectEnd),l=f.getDuration(s.requestStart,s.responseStart),d=f.getDuration(s.responseStart,s.responseEnd),h=f.getDuration(s.responseEnd,s.loadEventEnd);0==c?e.throwInternal(m.WARNING,x,"error calculating page view performance.",{total:c,network:u,request:l,response:d,dom:h}):f.shouldCollectDuration(c,u,l,d,h)?c<Math.floor(u)+Math.floor(l)+Math.floor(d)+Math.floor(h)?e.throwInternal(m.WARNING,v,"client performance math error.",{total:c,network:u,request:l,response:d,dom:h}):(o.durationMs=c,o.perfTotal=o.duration=q.msToTimeSpan(c),o.networkConnect=q.msToTimeSpan(u),o.sentRequest=q.msToTimeSpan(l),o.receivedResponse=q.msToTimeSpan(d),o.domProcessing=q.msToTimeSpan(h),o.isValid=!0):e.throwInternal(m.WARNING,N,"Invalid page load duration value. Browser perf data won't be sent.",{total:c,network:u,request:l,response:d,dom:h})}return o.url=j.sanitizeUrl(e,n),o.name=j.sanitizeString(e,t)||q.NotSpecified,o.properties=j.sanitizeProperties(e,a),o.measurements=j.sanitizeMeasurements(e,r),o}P(f,p),f.prototype.getIsValid=function(){return this.isValid},f.prototype.getDurationMs=function(){return this.durationMs},f.getPerformanceTiming=function(){return f.isPerformanceTimingSupported()?window.performance.timing:null},f.isPerformanceTimingSupported=function(){return"undefined"!=typeof window&&window.performance&&window.performance.timing},f.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},f.getDuration=function(e,t){var n=void 0;return isNaN(e)||isNaN(t)||(n=Math.max(t-e,0)),n},f.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,a=!1;if(i)for(var r=0;r<n.length;r++)a=a||-1!==i.toLowerCase().indexOf(n[r]);if(a)return!1;for(var o=0;o<e.length;o++)if(e[o]>=f.MAX_DURATION_ALLOWED)return!1;return!0},f.envelopeType="Microsoft.ApplicationInsights.{0}.PageviewPerformance",f.dataType="PageviewPerformanceData",f.MAX_DURATION_ALLOWED=36e5}(function(t){function e(){var e=t.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}return P(e,t),e}(ne)),function(i){function e(e,t){var n=i.call(this)||this;return n.aiDataContract={baseType:g.Required,baseData:g.Required},n.baseType=e,n.baseData=t,n}P(e,i)}(V);(ee=Z||(Z={}))[ee.Verbose=0]="Verbose",ee[ee.Information=1]="Information",ee[ee.Warning=2]="Warning",ee[ee.Error=3]="Error",ee[ee.Critical=4]="Critical";var ae=function(){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.internalNodeName="ai.internal.nodeName",this.internalSdkVersion="ai.internal.sdkVersion",this.internalAgentVersion="ai.internal.agentVersion"},re=function(){function e(){}return e.create=function(e,t,n,i,a,r){if(n=j.sanitizeString(i,n)||q.NotSpecified,c.isNullOrUndefined(e)||c.isNullOrUndefined(t)||c.isNullOrUndefined(n))throw Error("Input doesn't contain all required fields");var o={name:n,timestamp:new Date,instrumentationKey:"",ctx:r||{},tags:[],data:{},baseType:t,baseData:e};if(!c.isNullOrUndefined(a))for(var s in a)a.hasOwnProperty(s)&&(o.data[s]=a[s]);return o},e}(),oe=(new function(e){this.UserExtensionName="User",this.WebExtensionName="Web",this.AppExtensionName="App",this.accountIdTag="User.AccountId",this.userTagsKeysMap={},this.userTagsKeysMap[this.accountIdTag]=e.userAccountId,this.ctxKeys={id:"id",authId:"authId",localId:"localId"},this.userExtKeysMap={},this.userExtKeysMap[this.ctxKeys.localId]=e.userId,this.userExtKeysMap[this.ctxKeys.authId]=e.userAuthUserId}(new ae),function(){this.openDone=!1,this.setRequestHeaderDone=!1,this.sendDone=!1,this.abortDone=!1,this.onreadystatechangeCallbackAttached=!1}),se=function(){function e(e,t){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 oe,this.clientFailure=0,this.CalculateMetrics=function(){this.ajaxTotalDuration=Math.round(1e3*H.GetDuration(this.requestSentTime,this.responseFinishedTime))/1e3},this.id=e,this._logger=t}return e.prototype.getAbsoluteUrl=function(){return this.requestUrl?L.getAbsoluteUrl(this.requestUrl):null},e.prototype.getPathName=function(){return this.requestUrl?j.sanitizeUrl(this._logger,L.getCompleteUrl(this.method,this.requestUrl)):null},e}(),ce=function(){function e(){}return e.AttachEvent=function(e,t,n){var i=!1;return c.isNullOrUndefined(e)||(c.isNullOrUndefined(e.attachEvent)?c.isNullOrUndefined(e.addEventListener)||(e.addEventListener(t,n,!1),i=!0):(e.attachEvent("on"+t,n),i=!0)),i},e.DetachEvent=function(e,t,n){c.isNullOrUndefined(e)||(c.isNullOrUndefined(e.detachEvent)?c.isNullOrUndefined(e.removeEventListener)||e.removeEventListener(t,n,!1):e.detachEvent("on"+t,n))},e}(),ue=function(){function r(){this._trackAjaxAttempts=0,this.identifier=r.identifier,this.priority=161,this.currentWindowHost=window&&window.location.host&&window.location.host.toLowerCase(),this.initialized=!1,this._fetchInitialized=!1}return r.prototype.isMonitoredInstance=function(e,t){return this.initialized&&(!0===t||!c.isNullOrUndefined(e.ajaxData))&&!0!==e[F]},r.prototype.supportsAjaxMonitoring=function(){var e=!0;return(c.isNullOrUndefined(XMLHttpRequest)||c.isNullOrUndefined(XMLHttpRequest.prototype)||c.isNullOrUndefined(XMLHttpRequest.prototype.open)||c.isNullOrUndefined(XMLHttpRequest.prototype.send)||c.isNullOrUndefined(XMLHttpRequest.prototype.abort))&&(e=!1),e},r.prototype.instrumentOpen=function(){var i=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(e){this._core.logger.throwInternal(m.CRITICAL,y,"Failed to monitor XMLHttpRequest.open, monitoring data for this ajax call may be incorrect.",{ajaxDiagnosticsMessage:r.getFailedAjaxDiagnosticsMessage(this),exception:q.dump(e)})}return i.apply(this,arguments)}},r.prototype.openHandler=function(e,t,n,i){var a=q.newId(),r=new se(a,this._core.logger);r.method=t,r.requestUrl=n,r.xhrMonitoringState.openDone=!0,e.ajaxData=r,this.attachToOnReadyStateChange(e)},r.getFailedAjaxDiagnosticsMessage=function(e){var t="";try{c.isNullOrUndefined(e)||c.isNullOrUndefined(e.ajaxData)||c.isNullOrUndefined(e.ajaxData.requestUrl)||(t+="(url: '"+e.ajaxData.requestUrl+"')")}catch(e){}return t},r.prototype.instrumentSend=function(){var t=XMLHttpRequest.prototype.send,n=this;XMLHttpRequest.prototype.send=function(e){try{n.isMonitoredInstance(this)&&!this.ajaxData.xhrMonitoringState.sendDone&&n.sendHandler(this,e)}catch(e){this._core.logger.throwInternal(m.CRITICAL,I,"Failed to monitor XMLHttpRequest, monitoring data for this ajax call may be incorrect.",{ajaxDiagnosticsMessage:r.getFailedAjaxDiagnosticsMessage(this),exception:q.dump(e)})}return t.apply(this,arguments)}},r.prototype.sendHandler=function(e,t){e.ajaxData.requestSentTime=H.Now(),(e=this.includeCorrelationHeaders(e.ajaxData,void 0,void 0,e)).ajaxData.xhrMonitoringState.sendDone=!0},r.prototype.instrumentAbort=function(){var e=XMLHttpRequest.prototype.abort,t=this;XMLHttpRequest.prototype.abort=function(){try{t.isMonitoredInstance(this)&&!this.ajaxData.xhrMonitoringState.abortDone&&(this.ajaxData.aborted=1,this.ajaxData.xhrMonitoringState.abortDone=!0)}catch(e){this._core.logger.throwInternal(m.CRITICAL,s,"Failed to monitor XMLHttpRequest.abort, monitoring data for this ajax call may be incorrect.",{ajaxDiagnosticsMessage:r.getFailedAjaxDiagnosticsMessage(this),exception:q.dump(e)})}return e.apply(this,arguments)}},r.prototype.attachToOnReadyStateChange=function(n){var i=this,e=this;n.ajaxData.xhrMonitoringState.onreadystatechangeCallbackAttached=ce.AttachEvent(n,"readystatechange",function(){try{e.isMonitoredInstance(n)&&4===n.readyState&&e.onAjaxComplete(n)}catch(e){var t=q.dump(e);t&&-1!=t.toLowerCase().indexOf("c00c023f")||i._core.logger.throwInternal(m.CRITICAL,D,"Failed to monitor XMLHttpRequest 'readystatechange' event handler, monitoring data for this ajax call may be incorrect.",{ajaxDiagnosticsMessage:r.getFailedAjaxDiagnosticsMessage(n),exception:q.dump(e)})}})},r.prototype.onAjaxComplete=function(e){if(e.ajaxData.responseFinishedTime=H.Now(),e.ajaxData.status=e.status,e.ajaxData.CalculateMetrics(),e.ajaxData.ajaxTotalDuration<0)this._core.logger.throwInternal(m.WARNING,f,"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={id:e.ajaxData.id,absoluteUrl:e.ajaxData.getAbsoluteUrl(),commandName:e.ajaxData.getPathName(),duration:e.ajaxData.ajaxTotalDuration,success:200<=+e.ajaxData.status&&+e.ajaxData.status<400,resultCode:+e.ajaxData.status,method:e.ajaxData.method},n=this.getAjaxCorrelationContext(e);n&&(t.correlationContext=n),this.trackDependencyDataInternal(t),e.ajaxData=null}},r.prototype.getAjaxCorrelationContext=function(t){try{var e=t.getAllResponseHeaders();if(null!==e)if(-1!==e.toLowerCase().indexOf(U.requestContextHeaderLowerCase)){var n=t.getResponseHeader(U.requestContextHeader);return O.getCorrelationContext(n)}}catch(e){this._core.logger.throwInternal(m.WARNING,S,"Failed to get Request-Context correlation header as it may be not included in the response or not accessible.",{ajaxDiagnosticsMessage:r.getFailedAjaxDiagnosticsMessage(t),exception:q.dump(e)})}},r.prototype.trackDependencyDataInternal=function(e,t,n){if(-1===this._config.maxAjaxCallsPerView||this._trackAjaxAttempts<this._config.maxAjaxCallsPerView){var i=re.create(e,ie.dataType,ie.envelopeType,this._core.logger,t,n);this._core.track(i)}else this._trackAjaxAttempts===this._config.maxAjaxCallsPerView&&this._core.logger.throwInternal(m.CRITICAL,A,"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},r.prototype.trackDependencyData=function(e,t){this.trackDependencyDataInternal(e,t)},r.prototype.processTelemetry=function(e){this._nextPlugin&&this._nextPlugin.processTelemetry&&this._nextPlugin.processTelemetry(e)},r.prototype.setNextPlugin=function(e){e&&(this._nextPlugin=e)},r.prototype.instrumentFetch=function(){if(this.supportsFetch()&&!this._fetchInitialized){var i=window.fetch,a=this;window.fetch=function(t,e){var n;if(a.isFetchInstrumented(t))try{n=a.createFetchRecord(t,e),e=a.includeCorrelationHeaders(n,t,e)}catch(e){a._core.logger.throwInternal(m.CRITICAL,y,"Failed to monitor Window.fetch, monitoring data for this fetch call may be incorrect.",{ajaxDiagnosticsMessage:this.getFailedFetchDiagnosticsMessage(t),exception:q.dump(e)})}return i(t,e).then(function(e){return a.onFetchComplete(e,n),e}).catch(function(e){throw a.onFetchFailed(t,n,e),e})},this._fetchInitialized=!0}},r.prototype.isFetchInstrumented=function(e){return this._fetchInitialized&&!0!==e[F]},r.prototype.supportsFetch=function(){var e=!0;return(!window||c.isNullOrUndefined(window.Request)||c.isNullOrUndefined(window.Request.prototype)||c.isNullOrUndefined(window.fetch))&&(e=!1),e},r.prototype.createFetchRecord=function(e,t){var n=q.newId(),i=new se(n,this._core.logger);return i.requestSentTime=H.Now(),e instanceof Request?i.requestUrl=e?e.url:"":i.requestUrl=e,t&&t.method?i.method=t.method:e&&e instanceof Request?i.method=e.method:i.method="GET",i},r.prototype.includeCorrelationHeaders=function(e,t,n,i){if(t){if(O.canIncludeCorrelationHeader(this._config,e.getAbsoluteUrl(),this.currentWindowHost))return n||(n={}),n.headers=new Headers(n.headers||t instanceof Request&&t.headers||{}),n.headers.set(U.requestIdHeader,e.id),n}else if(i){if(this.currentWindowHost&&O.canIncludeCorrelationHeader(this._config,i.ajaxData.getAbsoluteUrl(),this.currentWindowHost)){i.setRequestHeader(U.requestIdHeader,i.ajaxData.id);var a=this._config.appId;a&&i.setRequestHeader(U.requestContextHeader,U.requestContextAppIdFormat+a)}return i}},r.prototype.getFailedFetchDiagnosticsMessage=function(e){var t="";try{c.isNullOrUndefined(e)||(t+="string"==typeof e?"(url: '"+e+"')":"(url: '"+e.url+"')")}catch(e){this._core.logger.throwInternal(m.CRITICAL,y,"Failed to grab failed fetch diagnostics message",{exception:q.dump(e)})}return t},r.prototype.onFetchComplete=function(t,e){if(e)try{if(e.responseFinishedTime=H.Now(),e.CalculateMetrics(),e.ajaxTotalDuration<0)this._core.logger.throwInternal(m.WARNING,f,"Failed to calculate the duration of the fetch call, monitoring data for this fetch call won't be sent.",{fetchDiagnosticsMessage:this.getFailedFetchDiagnosticsMessage(t),requestSentTime:e.requestSentTime,responseFinishedTime:e.responseFinishedTime});else{var n={id:e.id,absoluteUrl:e.getAbsoluteUrl(),commandName:e.getPathName(),duration:e.ajaxTotalDuration,success:200<=t.status&&t.status<400,resultCode:t.status,method:e.method},i=this.getFetchCorrelationContext(t);i&&(n.correlationContext=i),this.trackDependencyDataInternal(n)}}catch(e){this._core.logger.throwInternal(m.WARNING,S,"Failed to calculate the duration of the fetch call, monitoring data for this fetch call won't be sent.",{fetchDiagnosticsMessage:this.getFailedFetchDiagnosticsMessage(t),exception:q.dump(e)})}},r.prototype.onFetchFailed=function(t,e,n){if(e)try{if(e.responseFinishedTime=H.Now(),e.CalculateMetrics(),e.ajaxTotalDuration<0)this._core.logger.throwInternal(m.WARNING,f,"Failed to calculate the duration of the failed fetch call, monitoring data for this fetch call won't be sent.",{fetchDiagnosticsMessage:this.getFailedFetchDiagnosticsMessage(t),requestSentTime:e.requestSentTime,responseFinishedTime:e.responseFinishedTime});else{var i={id:e.id,absoluteUrl:e.getAbsoluteUrl(),commandName:e.getPathName(),duration:e.ajaxTotalDuration,success:!1,resultCode:0,method:e.method};this.trackDependencyDataInternal(i,{error:n.message})}}catch(e){this._core.logger.throwInternal(m.WARNING,S,"Failed to calculate the duration of the failed fetch call, monitoring data for this fetch call won't be sent.",{fetchDiagnosticsMessage:this.getFailedFetchDiagnosticsMessage(t),exception:q.dump(e)})}},r.prototype.getFetchCorrelationContext=function(t){try{var e=t.headers.get(U.requestContextHeader);return O.getCorrelationContext(e)}catch(e){this._core.logger.throwInternal(m.WARNING,S,"Failed to get Request-Context correlation header as it may be not included in the response or not accessible.",{fetchDiagnosticsMessage:this.getFailedFetchDiagnosticsMessage(t),exception:q.dump(e)})}},r.prototype.instrumentXhr=function(){this.supportsAjaxMonitoring()&&!this.initialized&&(this.instrumentOpen(),this.instrumentSend(),this.instrumentAbort(),this.initialized=!0)},r.getDefaultConfig=function(){return{maxAjaxCallsPerView:500,disableAjaxTracking:!1,disableFetchTracking:!0,disableCorrelationHeaders:!1,correlationHeaderExcludedDomains:["*.blob.core.windows.net","*.blob.core.chinacloudapi.cn","*.blob.core.cloudapi.de","*.blob.core.usgovcloudapi.net"],appId:void 0,enableCorsCorrelation:!1}},r.getEmptyConfig=function(){return{maxAjaxCallsPerView:void 0,disableAjaxTracking:void 0,disableFetchTracking:void 0,disableCorrelationHeaders:void 0,correlationHeaderExcludedDomains:void 0,appId:void 0,enableCorsCorrelation:void 0}},r.prototype.initialize=function(e,t,n){if(!this.initialized&&!this._fetchInitialized){this._core=t;var i=r.getDefaultConfig();for(var a in this._config=r.getEmptyConfig(),i)this._config[a]=r.getConfig(e,a,r.identifier,i[a]);!1===this._config.disableAjaxTracking&&this.instrumentXhr(),!1===this._config.disableFetchTracking&&this.instrumentFetch()}},r.getConfig=function(e,t,n,i){var a;return void 0===i&&(i=!1),a=n&&e.extensionConfig&&e.extensionConfig[n]&&e.extensionConfig[n][t]?e.extensionConfig[n][t]:e[t],c.isNullOrUndefined(a)?i:a},r.identifier="AjaxDependencyPlugin",r}();e.AjaxPlugin=ue,e.ajaxRecord=se,Object.defineProperty(e,"__esModule",{value:!0})});
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t(e.aidependencies={})}(this,function(e){"use strict";var a,t,g,n;(t=a||(a={}))[t.LocalStorage=0]="LocalStorage",t[t.SessionStorage=1]="SessionStorage",(n=g||(g={}))[n.Default=0]="Default",n[n.Required=1]="Required",n[n.Array=2]="Array",n[n.Hidden=4]="Hidden";var m,i,c=function(){function e(){}return e.isNullOrUndefined=function(e){return null==e},e.newGuid=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(r,function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})},e}(),r=/[xy]/g;(i=m||(m={}))[i.CRITICAL=1]="CRITICAL",i[i.WARNING=2]="WARNING";var o=1,u=2,l=3,d=4,h=5,p=6,v=8,x=10,s=13,f=14,y=15,D=16,I=17,S=18,N=45,w=52,A=55,C=56,T=57,M=61,_=66,b=68,R=69,E=(function(){function e(){this.identifier="ChannelControllerPlugin",this.priority=E}e.prototype.processTelemetry=function(t){this.channelQueue.forEach(function(e){0<e.length&&e[0].processTelemetry(t)})},Object.defineProperty(e.prototype,"ChannelControls",{get:function(){return this.channelQueue},enumerable:!0,configurable:!0}),e.prototype.initialize=function(n,i,a){var r=this;if(this.channelQueue=new Array,n.channels)n.channels.forEach(function(e){if(e&&0<e.length){(e=e.sort(function(e,t){return e.priority-t.priority})).forEach(function(e){return e.initialize(n,i,a)});for(var t=1;t<e.length;t++)e[t-1].setNextPlugin(e[t]);r.channelQueue.push(e)}});else{for(var e=new Array,t=0;t<a.length;t++){var o=a[t];o.priority>E&&e.push(o)}if(0<e.length){(e=e.sort(function(e,t){return e.priority-t.priority})).forEach(function(e){return e.initialize(n,i,a)});for(t=1;t<e.length;t++)e[t-1].setNextPlugin(e[t]);this.channelQueue.push(e)}}}}(),200),U=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}(),j=function(){function s(){}return s.sanitizeKeyAndAddUniqueness=function(e,t,n){var i=t.length,a=s.sanitizeKey(e,t);if(a.length!==i){for(var r=0,o=a;void 0!==n[o];)r++,o=a.substring(0,s.MAX_NAME_LENGTH-3)+s.padNumber(r);a=o}return a},s.sanitizeKey=function(e,t){return t&&(t=s.trim(t.toString())).length>s.MAX_NAME_LENGTH&&(t=t.substring(0,s.MAX_NAME_LENGTH),e.throwInternal(m.WARNING,T,"name is too long. It has been truncated to "+s.MAX_NAME_LENGTH+" characters.",{name:t},!0)),t},s.sanitizeString=function(e,t,n){return void 0===n&&(n=s.MAX_STRING_LENGTH),t&&(n=n||s.MAX_STRING_LENGTH,(t=s.trim(t)).toString().length>n&&(t=t.toString().substring(0,n),e.throwInternal(m.WARNING,M,"string value is too long. It has been truncated to "+n+" characters.",{value:t},!0))),t},s.sanitizeUrl=function(e,t){return s.sanitizeInput(e,t,s.MAX_URL_LENGTH,_)},s.sanitizeMessage=function(e,t){return t&&t.length>s.MAX_MESSAGE_LENGTH&&(t=t.substring(0,s.MAX_MESSAGE_LENGTH),e.throwInternal(m.WARNING,C,"message is too long, it has been truncated to "+s.MAX_MESSAGE_LENGTH+" characters.",{message:t},!0)),t},s.sanitizeException=function(e,t){return t&&t.length>s.MAX_EXCEPTION_LENGTH&&(t=t.substring(0,s.MAX_EXCEPTION_LENGTH),e.throwInternal(m.WARNING,w,"exception is too long, it has been truncated to "+s.MAX_EXCEPTION_LENGTH+" characters.",{exception:t},!0)),t},s.sanitizeProperties=function(e,t){if(t){var n={};for(var i in t){var a=s.sanitizeString(e,t[i],s.MAX_PROPERTY_LENGTH);n[i=s.sanitizeKeyAndAddUniqueness(e,i,n)]=a}t=n}return t},s.sanitizeMeasurements=function(e,t){if(t){var n={};for(var i in t){var a=t[i];n[i=s.sanitizeKeyAndAddUniqueness(e,i,n)]=a}t=n}return t},s.sanitizeId=function(e,t){return t?s.sanitizeInput(e,t,s.MAX_ID_LENGTH,R).toString():t},s.sanitizeInput=function(e,t,n,i){return t&&(t=s.trim(t)).length>n&&(t=t.substring(0,n),e.throwInternal(m.WARNING,i,"input is too long, it has been truncated to "+n+" characters.",{data:t},!0)),t},s.padNumber=function(e){var t="00"+e;return t.substr(t.length-3)},s.trim=function(e){return"string"!=typeof e?e:e.replace(/^\s+|\s+$/g,"")},s.MAX_NAME_LENGTH=150,s.MAX_ID_LENGTH=128,s.MAX_PROPERTY_LENGTH=8192,s.MAX_STRING_LENGTH=1024,s.MAX_URL_LENGTH=2048,s.MAX_MESSAGE_LENGTH=32768,s.MAX_EXCEPTION_LENGTH=32768,s}(),q=function(){function s(){}return s.disableStorage=function(){s._canUseLocalStorage=!1,s._canUseSessionStorage=!1},s._getLocalStorageObject=function(){return s.canUseLocalStorage()?s._getVerifiedStorageObject(a.LocalStorage):null},s._getVerifiedStorageObject=function(e){var t,n,i=null;try{if("undefined"==typeof window)return null;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(e){i=null}return i},s.isInternalApplicationInsightsEndpoint=function(e){return-1!==s._internalEndpoints.indexOf(e.toLowerCase())},s.canUseLocalStorage=function(){return void 0===s._canUseLocalStorage&&(s._canUseLocalStorage=!!s._getVerifiedStorageObject(a.LocalStorage)),s._canUseLocalStorage},s.getStorage=function(t,e){var n=s._getLocalStorageObject();if(null!==n)try{return n.getItem(e)}catch(e){s._canUseLocalStorage=!1,t.throwInternal(m.WARNING,o,"Browser failed read of local storage. "+s.getExceptionName(e),{exception:s.dump(e)})}return null},s.setStorage=function(t,e,n){var i=s._getLocalStorageObject();if(null!==i)try{return i.setItem(e,n),!0}catch(e){s._canUseLocalStorage=!1,t.throwInternal(m.WARNING,l,"Browser failed write to local storage. "+s.getExceptionName(e),{exception:s.dump(e)})}return!1},s.removeStorage=function(t,e){var n=s._getLocalStorageObject();if(null!==n)try{return n.removeItem(e),!0}catch(e){s._canUseLocalStorage=!1,t.throwInternal(m.WARNING,h,"Browser failed removal of local storage item. "+s.getExceptionName(e),{exception:s.dump(e)})}return!1},s._getSessionStorageObject=function(){return s.canUseSessionStorage()?s._getVerifiedStorageObject(a.SessionStorage):null},s.canUseSessionStorage=function(){return void 0===s._canUseSessionStorage&&(s._canUseSessionStorage=!!s._getVerifiedStorageObject(a.SessionStorage)),s._canUseSessionStorage},s.getSessionStorageKeys=function(){var e=[];if(s.canUseSessionStorage())for(var t in window.sessionStorage)e.push(t);return e},s.getSessionStorage=function(t,e){var n=s._getSessionStorageObject();if(null!==n)try{return n.getItem(e)}catch(e){s._canUseSessionStorage=!1,t.throwInternal(m.WARNING,u,"Browser failed read of session storage. "+s.getExceptionName(e),{exception:s.dump(e)})}return null},s.setSessionStorage=function(t,e,n){var i=s._getSessionStorageObject();if(null!==i)try{return i.setItem(e,n),!0}catch(e){s._canUseSessionStorage=!1,t.throwInternal(m.WARNING,d,"Browser failed write to session storage. "+s.getExceptionName(e),{exception:s.dump(e)})}return!1},s.removeSessionStorage=function(t,e){var n=s._getSessionStorageObject();if(null!==n)try{return n.removeItem(e),!0}catch(e){s._canUseSessionStorage=!1,t.throwInternal(m.WARNING,p,"Browser failed removal of session storage item. "+s.getExceptionName(e),{exception:s.dump(e)})}return!1},s.disableCookies=function(){s._canUseCookies=!1},s.canUseCookies=function(t){if(void 0===s._canUseCookies){s._canUseCookies=!1;try{s._canUseCookies=void 0!==s.document.cookie}catch(e){t.throwInternal(m.WARNING,b,"Cannot access document.cookie - "+s.getExceptionName(e),{exception:s.dump(e)})}}return s._canUseCookies},s.setCookie=function(e,t,n,i){var a="",r="";i&&(a=";domain="+i),s.document.location&&"https:"===s.document.location.protocol&&(r=";secure"),s.canUseCookies(e)&&(s.document.cookie=t+"="+n+a+";path=/"+r)},s.stringToBoolOrDefault=function(e,t){return void 0===t&&(t=!1),null==e?t:"true"===e.toString().toLowerCase()},s.getCookie=function(e,t){if(s.canUseCookies(e)){var n="";if(t&&t.length)for(var i=t+"=",a=s.document.cookie.split(";"),r=0;r<a.length;r++){var o=a[r];if((o=s.trim(o))&&0===o.indexOf(i)){n=o.substring(i.length,a[r].length);break}}return n}},s.deleteCookie=function(e,t){s.canUseCookies(e)&&(s.document.cookie=t+"=;path=/;expires=Thu, 01 Jan 1970 00:00:01 GMT;")},s.trim=function(e){return"string"!=typeof e?e:e.replace(/^\s+|\s+$/g,"")},s.newId=function(){for(var e="",t=1073741824*Math.random();0<t;){e+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(t%64),t=Math.floor(t/64)}return e},s.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)},s.isError=function(e){return"[object Error]"===Object.prototype.toString.call(e)},s.isDate=function(e){return"[object Date]"===Object.prototype.toString.call(e)},s.toISOStringForIE8=function(e){if(s.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"}},s.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},s.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,a=""+Math.floor(e/36e5)%24,r=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<r?r+".":"")+(a=a.length<2?"0"+a:a)+":"+i+":"+n+"."+t},s.isCrossOriginError=function(e,t,n,i,a){return("Script error."===e||"Script error"===e)&&!a},s.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},s.getExceptionName=function(e){return"[object Error]"===Object.prototype.toString.call(e)?e.name:""},s.addEventHandler=function(e,t){if("undefined"==typeof window||!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},s.IsBeaconApiSupported=function(){return"sendBeacon"in navigator&&navigator.sendBeacon},s.document="undefined"!=typeof document?document:{},s._canUseCookies=void 0,s._canUseLocalStorage=void 0,s._canUseSessionStorage=void 0,s._internalEndpoints=["https://dc.services.visualstudio.com/v2/track","https://breeze.aimon.applicationinsights.io/v2/track","https://dc-int.services.visualstudio.com/v2/track"],s.NotSpecified="not_specified",s}(),L=function(){function i(){}return i.parseUrl=function(e){return i.htmlAnchorElement||(i.htmlAnchorElement=i.document.createElement?i.document.createElement("a"):{}),i.htmlAnchorElement.href=e,i.htmlAnchorElement},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=function(){function n(){}return n.canIncludeCorrelationHeader=function(e,t,n){if(e&&e.disableCorrelationHeaders)return!1;if(!t)return!1;var i=L.parseUrl(t).host.toLowerCase();if(!(e&&e.enableCorsCorrelation||i===n))return!1;var a=e&&e.correlationHeaderExcludedDomains;if(!a||0==a.length)return!0;for(var r=0;r<a.length;r++){if(new RegExp(a[r].toLowerCase().replace(/\./g,".").replace(/\*/g,".*")).test(i))return!1}return!0},n.getCorrelationContext=function(e){if(e){var t=n.getCorrelationContextValue(e,U.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 a=n[i].split("=");if(2==a.length&&a[0]==t)return a[1]}},n.correlationIdPrefix="cid-v1:",n}(),k=function(){function e(){}return e.ParseDependencyPath=function(e,t,n,i){var a,r;if(t&&0<t.length){var o=L.parseUrl(t);if(a=o.host,null!=o.pathname)"/"!==(i=0===o.pathname.length?"/":o.pathname).charAt(0)&&(i="/"+i),r=j.sanitizeString(e,n?n+" "+i:i);else r=j.sanitizeString(e,t)}else r=a=i;return{target:a,name:r}},e}(),H=function(){function e(){}return e.Now="undefined"==typeof window?function(){return(new Date).getTime()}: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||c.isNullOrUndefined(e)||c.isNullOrUndefined(t)||(n=t-e),n},e}(),F="Microsoft_ApplicationInsights_BypassAjaxInstrumentation",z=function(e,t){return(z=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function P(e,t){function n(){this.constructor=e}z(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var G,X,V=function(e){function t(){return e.call(this)||this}return P(t,e),t}(function(){}),W=(function(a){function e(e,t,n){var i=a.call(this)||this;return i.name=j.sanitizeString(e,n)||q.NotSpecified,i.data=t,i.time=q.toISOStringForIE8(new Date),i.aiDataContract={time:g.Required,iKey:g.Required,name:g.Required,sampleRate:function(){return 100==i.sampleRate?g.Hidden:g.Required},tags:g.Required,data:g.Required},i}P(e,a)}(function(){this.ver=1,this.sampleRate=100,this.tags={}}),function(){}),B=function(t){function e(){var e=t.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}return P(e,t),e}(W),K=(function(r){function e(e,t,n,i){var a=r.call(this)||this;return a.aiDataContract={ver:g.Required,name:g.Required,properties:g.Default,measurements:g.Default},a.name=j.sanitizeString(e,t)||q.NotSpecified,a.properties=j.sanitizeProperties(e,n),a.measurements=j.sanitizeMeasurements(e,i),a}P(e,r),e.envelopeType="Microsoft.ApplicationInsights.{0}.Event",e.dataType="EventData"}(B),function(){}),Q=function(){this.hasFullStack=!0,this.parsedStack=[]},Y=(function(o){function e(e,t,n,i,a){var r=o.call(this)||this;return r.aiDataContract={ver:g.Required,exceptions:g.Required,severityLevel:g.Default,properties:g.Default,measurements:g.Default},r.properties=j.sanitizeProperties(e,n),r.measurements=j.sanitizeMeasurements(e,i),r.exceptions=[new Y(e,t)],a&&(r.severityLevel=a),r}P(e,o),e.CreateSimpleException=function(e,t,n,i,a,r){return{exceptions:[{hasFullStack:!0,message:e,stack:a,typeName:t}]}},e.envelopeType="Microsoft.ApplicationInsights.{0}.Exception",e.dataType="ExceptionData"}(function(t){function e(){var e=t.call(this)||this;return e.ver=2,e.exceptions=[],e.properties={},e.measurements={},e}return P(e,t),e}(W)),function(a){function e(e,t){var n=a.call(this)||this;n.aiDataContract={id:g.Default,outerId:g.Default,typeName:g.Required,message:g.Required,hasFullStack:g.Default,stack:g.Default,parsedStack:g.Array},n.typeName=j.sanitizeString(e,t.name)||q.NotSpecified,n.message=j.sanitizeMessage(e,t.message)||q.NotSpecified;var i=t.stack;return n.parsedStack=n.parseStack(i),n.stack=j.sanitizeException(e,i),n.hasFullStack=q.isArray(n.parsedStack)&&0<n.parsedStack.length,n}return P(e,a),e.prototype.parseStack=function(e){var t=void 0;if("string"==typeof e){var n=e.split("\n");t=[];for(var i=0,a=0,r=0;r<=n.length;r++){var o=n[r];if(J.regex.test(o)){var s=new J(n[r],i++);a+=s.sizeInBytes,t.push(s)}}if(32768<a)for(var c=0,u=t.length-1,l=0,d=c,h=u;c<u;){if(32768<(l+=t[c].sizeInBytes+t[u].sizeInBytes)){var p=h-d+1;t.splice(d,p);break}d=c,h=u,c++,u--}}return t},e}(Q)),J=function(a){function r(e,t){var n=a.call(this)||this;n.sizeInBytes=0,n.aiDataContract={level:g.Required,method:g.Required,assembly:g.Default,fileName:g.Default,line:g.Default},n.level=t,n.method="<no_method>",n.assembly=q.trim(e);var i=e.match(r.regex);return i&&5<=i.length&&(n.method=q.trim(i[2])||n.method,n.fileName=q.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+=r.baseSize,n.sizeInBytes+=n.level.toString().length,n.sizeInBytes+=n.line.toString().length,n}return P(r,a),r.regex=/^([\s]+at)?(.*?)(\@|\s\(|\s)([^\(\@\n]+):([0-9]+):([0-9]+)(\)?)$/,r.baseSize=58,r}(K),$=function(t){function e(){var e=t.call(this)||this;return e.ver=2,e.metrics=[],e.properties={},e}return P(e,t),e}(W);(X=G||(G={}))[X.Measurement=0]="Measurement",X[X.Aggregation=1]="Aggregation";var Z,ee,te=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.aiDataContract={name:g.Required,kind:g.Default,value:g.Required,count:g.Default,min:g.Default,max:g.Default,stdDev:g.Default},e}return P(e,t),e}(function(){this.kind=G.Measurement}),ne=(function(u){function e(e,t,n,i,a,r,o){var s=u.call(this)||this;s.aiDataContract={ver:g.Required,metrics:g.Required,properties:g.Default};var c=new te;return c.count=0<i?i:void 0,c.max=isNaN(r)||null===r?void 0:r,c.min=isNaN(a)||null===a?void 0:a,c.name=j.sanitizeString(e,t)||q.NotSpecified,c.value=n,s.metrics=[c],s.properties=j.sanitizeProperties(e,o),s}P(e,u),e.envelopeType="Microsoft.ApplicationInsights.{0}.Metric",e.dataType="MetricData"}($),function(t){function e(){var e=t.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}return P(e,t),e}(B)),ie=(function(c){function e(e,t,n,i,a,r,o){var s=c.call(this)||this;return s.aiDataContract={ver:g.Required,name:g.Default,url:g.Default,duration:g.Default,properties:g.Default,measurements:g.Default,id:g.Default},s.id=j.sanitizeId(e,o),s.url=j.sanitizeUrl(e,n),s.name=j.sanitizeString(e,t)||q.NotSpecified,isNaN(i)||(s.duration=q.msToTimeSpan(i)),s.properties=j.sanitizeProperties(e,a),s.measurements=j.sanitizeMeasurements(e,r),s}P(e,c),e.envelopeType="Microsoft.ApplicationInsights.{0}.Pageview",e.dataType="PageviewData"}(ne),function(h){function e(e,t,n,i,a,r,o,s,c,u){var l=h.call(this)||this;l.aiDataContract={id:g.Required,ver:g.Required,name:g.Default,resultCode:g.Default,duration:g.Default,success:g.Default,data:g.Default,target:g.Default,type:g.Default,properties:g.Default,measurements:g.Default,kind:g.Default,value:g.Default,count:g.Default,min:g.Default,max:g.Default,stdDev:g.Default,dependencyKind:g.Default,dependencySource:g.Default,commandName:g.Default,dependencyTypeName:g.Default},l.id=t,l.duration=q.msToTimeSpan(a),l.success=r,l.resultCode=o+"",l.type="Ajax",l.data=j.sanitizeUrl(e,i);var d=k.ParseDependencyPath(e,n,s,i);return l.target=d.target,l.name=d.name,l.properties=j.sanitizeProperties(e,c),l.measurements=j.sanitizeMeasurements(e,u),l}return P(e,h),e.envelopeType="Microsoft.ApplicationInsights.{0}.RemoteDependency",e.dataType="RemoteDependencyData",e}(function(t){function e(){var e=t.call(this)||this;return e.ver=2,e.success=!0,e.properties={},e.measurements={},e}return P(e,t),e}(W)));(function(r){function e(e,t,n,i){var a=r.call(this)||this;return a.aiDataContract={ver:g.Required,message:g.Required,severityLevel:g.Default,properties:g.Default},t=t||q.NotSpecified,a.message=j.sanitizeMessage(e,t),a.properties=j.sanitizeProperties(e,n),i&&(a.severityLevel=i),a}P(e,r),e.envelopeType="Microsoft.ApplicationInsights.{0}.Message",e.dataType="MessageData"})(function(t){function e(){var e=t.call(this)||this;return e.ver=2,e.properties={},e}return P(e,t),e}(W)),function(p){function f(e,t,n,i,a,r){var o=p.call(this)||this;o.aiDataContract={ver:g.Required,name:g.Default,url:g.Default,duration:g.Default,perfTotal:g.Default,networkConnect:g.Default,sentRequest:g.Default,receivedResponse:g.Default,domProcessing:g.Default,properties:g.Default,measurements:g.Default},o.isValid=!1;var s=f.getPerformanceTiming();if(s){var c=f.getDuration(s.navigationStart,s.loadEventEnd),u=f.getDuration(s.navigationStart,s.connectEnd),l=f.getDuration(s.requestStart,s.responseStart),d=f.getDuration(s.responseStart,s.responseEnd),h=f.getDuration(s.responseEnd,s.loadEventEnd);0==c?e.throwInternal(m.WARNING,x,"error calculating page view performance.",{total:c,network:u,request:l,response:d,dom:h}):f.shouldCollectDuration(c,u,l,d,h)?c<Math.floor(u)+Math.floor(l)+Math.floor(d)+Math.floor(h)?e.throwInternal(m.WARNING,v,"client performance math error.",{total:c,network:u,request:l,response:d,dom:h}):(o.durationMs=c,o.perfTotal=o.duration=q.msToTimeSpan(c),o.networkConnect=q.msToTimeSpan(u),o.sentRequest=q.msToTimeSpan(l),o.receivedResponse=q.msToTimeSpan(d),o.domProcessing=q.msToTimeSpan(h),o.isValid=!0):e.throwInternal(m.WARNING,N,"Invalid page load duration value. Browser perf data won't be sent.",{total:c,network:u,request:l,response:d,dom:h})}return o.url=j.sanitizeUrl(e,n),o.name=j.sanitizeString(e,t)||q.NotSpecified,o.properties=j.sanitizeProperties(e,a),o.measurements=j.sanitizeMeasurements(e,r),o}P(f,p),f.prototype.getIsValid=function(){return this.isValid},f.prototype.getDurationMs=function(){return this.durationMs},f.getPerformanceTiming=function(){return f.isPerformanceTimingSupported()?window.performance.timing:null},f.isPerformanceTimingSupported=function(){return"undefined"!=typeof window&&window.performance&&window.performance.timing},f.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},f.getDuration=function(e,t){var n=void 0;return isNaN(e)||isNaN(t)||(n=Math.max(t-e,0)),n},f.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,a=!1;if(i)for(var r=0;r<n.length;r++)a=a||-1!==i.toLowerCase().indexOf(n[r]);if(a)return!1;for(var o=0;o<e.length;o++)if(e[o]>=f.MAX_DURATION_ALLOWED)return!1;return!0},f.envelopeType="Microsoft.ApplicationInsights.{0}.PageviewPerformance",f.dataType="PageviewPerformanceData",f.MAX_DURATION_ALLOWED=36e5}(function(t){function e(){var e=t.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}return P(e,t),e}(ne)),function(i){function e(e,t){var n=i.call(this)||this;return n.aiDataContract={baseType:g.Required,baseData:g.Required},n.baseType=e,n.baseData=t,n}P(e,i)}(V);(ee=Z||(Z={}))[ee.Verbose=0]="Verbose",ee[ee.Information=1]="Information",ee[ee.Warning=2]="Warning",ee[ee.Error=3]="Error",ee[ee.Critical=4]="Critical";var ae=function(){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.internalNodeName="ai.internal.nodeName",this.internalSdkVersion="ai.internal.sdkVersion",this.internalAgentVersion="ai.internal.agentVersion"},re=function(){function e(){}return e.create=function(e,t,n,i,a,r){if(n=j.sanitizeString(i,n)||q.NotSpecified,c.isNullOrUndefined(e)||c.isNullOrUndefined(t)||c.isNullOrUndefined(n))throw Error("Input doesn't contain all required fields");var o={name:n,timestamp:new Date,instrumentationKey:"",ctx:r||{},tags:[],data:{},baseType:t,baseData:e};if(!c.isNullOrUndefined(a))for(var s in a)a.hasOwnProperty(s)&&(o.data[s]=a[s]);return o},e}(),oe=(new function(e){this.UserExtensionName="User",this.WebExtensionName="Web",this.AppExtensionName="App",this.accountIdTag="User.AccountId",this.userTagsKeysMap={},this.userTagsKeysMap[this.accountIdTag]=e.userAccountId,this.ctxKeys={id:"id",authId:"authId",localId:"localId"},this.userExtKeysMap={},this.userExtKeysMap[this.ctxKeys.localId]=e.userId,this.userExtKeysMap[this.ctxKeys.authId]=e.userAuthUserId}(new ae),function(){this.openDone=!1,this.setRequestHeaderDone=!1,this.sendDone=!1,this.abortDone=!1,this.onreadystatechangeCallbackAttached=!1}),se=function(){function e(e,t){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 oe,this.clientFailure=0,this.CalculateMetrics=function(){this.ajaxTotalDuration=Math.round(1e3*H.GetDuration(this.requestSentTime,this.responseFinishedTime))/1e3},this.id=e,this._logger=t}return e.prototype.getAbsoluteUrl=function(){return this.requestUrl?L.getAbsoluteUrl(this.requestUrl):null},e.prototype.getPathName=function(){return this.requestUrl?j.sanitizeUrl(this._logger,L.getCompleteUrl(this.method,this.requestUrl)):null},e}(),ce=function(){function e(){}return e.AttachEvent=function(e,t,n){var i=!1;return c.isNullOrUndefined(e)||(c.isNullOrUndefined(e.attachEvent)?c.isNullOrUndefined(e.addEventListener)||(e.addEventListener(t,n,!1),i=!0):(e.attachEvent("on"+t,n),i=!0)),i},e.DetachEvent=function(e,t,n){c.isNullOrUndefined(e)||(c.isNullOrUndefined(e.detachEvent)?c.isNullOrUndefined(e.removeEventListener)||e.removeEventListener(t,n,!1):e.detachEvent("on"+t,n))},e}(),ue=function(){function r(){this._trackAjaxAttempts=0,this.identifier=r.identifier,this.priority=161,this.currentWindowHost=window&&window.location.host&&window.location.host.toLowerCase(),this.initialized=!1,this._fetchInitialized=!1}return r.prototype.isMonitoredInstance=function(e,t){return this.initialized&&(!0===t||!c.isNullOrUndefined(e.ajaxData))&&!0!==e[F]},r.prototype.supportsAjaxMonitoring=function(){var e=!0;return(c.isNullOrUndefined(XMLHttpRequest)||c.isNullOrUndefined(XMLHttpRequest.prototype)||c.isNullOrUndefined(XMLHttpRequest.prototype.open)||c.isNullOrUndefined(XMLHttpRequest.prototype.send)||c.isNullOrUndefined(XMLHttpRequest.prototype.abort))&&(e=!1),e},r.prototype.instrumentOpen=function(){var i=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(e){this._core.logger.throwInternal(m.CRITICAL,y,"Failed to monitor XMLHttpRequest.open, monitoring data for this ajax call may be incorrect.",{ajaxDiagnosticsMessage:r.getFailedAjaxDiagnosticsMessage(this),exception:q.dump(e)})}return i.apply(this,arguments)}},r.prototype.openHandler=function(e,t,n,i){var a=q.newId(),r=new se(a,this._core.logger);r.method=t,r.requestUrl=n,r.xhrMonitoringState.openDone=!0,e.ajaxData=r,this.attachToOnReadyStateChange(e)},r.getFailedAjaxDiagnosticsMessage=function(e){var t="";try{c.isNullOrUndefined(e)||c.isNullOrUndefined(e.ajaxData)||c.isNullOrUndefined(e.ajaxData.requestUrl)||(t+="(url: '"+e.ajaxData.requestUrl+"')")}catch(e){}return t},r.prototype.instrumentSend=function(){var t=XMLHttpRequest.prototype.send,n=this;XMLHttpRequest.prototype.send=function(e){try{n.isMonitoredInstance(this)&&!this.ajaxData.xhrMonitoringState.sendDone&&n.sendHandler(this,e)}catch(e){this._core.logger.throwInternal(m.CRITICAL,I,"Failed to monitor XMLHttpRequest, monitoring data for this ajax call may be incorrect.",{ajaxDiagnosticsMessage:r.getFailedAjaxDiagnosticsMessage(this),exception:q.dump(e)})}return t.apply(this,arguments)}},r.prototype.sendHandler=function(e,t){e.ajaxData.requestSentTime=H.Now(),(e=this.includeCorrelationHeaders(e.ajaxData,void 0,void 0,e)).ajaxData.xhrMonitoringState.sendDone=!0},r.prototype.instrumentAbort=function(){var e=XMLHttpRequest.prototype.abort,t=this;XMLHttpRequest.prototype.abort=function(){try{t.isMonitoredInstance(this)&&!this.ajaxData.xhrMonitoringState.abortDone&&(this.ajaxData.aborted=1,this.ajaxData.xhrMonitoringState.abortDone=!0)}catch(e){this._core.logger.throwInternal(m.CRITICAL,s,"Failed to monitor XMLHttpRequest.abort, monitoring data for this ajax call may be incorrect.",{ajaxDiagnosticsMessage:r.getFailedAjaxDiagnosticsMessage(this),exception:q.dump(e)})}return e.apply(this,arguments)}},r.prototype.attachToOnReadyStateChange=function(n){var i=this,e=this;n.ajaxData.xhrMonitoringState.onreadystatechangeCallbackAttached=ce.AttachEvent(n,"readystatechange",function(){try{e.isMonitoredInstance(n)&&4===n.readyState&&e.onAjaxComplete(n)}catch(e){var t=q.dump(e);t&&-1!=t.toLowerCase().indexOf("c00c023f")||i._core.logger.throwInternal(m.CRITICAL,D,"Failed to monitor XMLHttpRequest 'readystatechange' event handler, monitoring data for this ajax call may be incorrect.",{ajaxDiagnosticsMessage:r.getFailedAjaxDiagnosticsMessage(n),exception:q.dump(e)})}})},r.prototype.onAjaxComplete=function(e){if(e.ajaxData.responseFinishedTime=H.Now(),e.ajaxData.status=e.status,e.ajaxData.CalculateMetrics(),e.ajaxData.ajaxTotalDuration<0)this._core.logger.throwInternal(m.WARNING,f,"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={id:e.ajaxData.id,absoluteUrl:e.ajaxData.getAbsoluteUrl(),commandName:e.ajaxData.getPathName(),duration:e.ajaxData.ajaxTotalDuration,success:200<=+e.ajaxData.status&&+e.ajaxData.status<400,resultCode:+e.ajaxData.status,method:e.ajaxData.method},n=this.getAjaxCorrelationContext(e);n&&(t.correlationContext=n),this.trackDependencyDataInternal(t),e.ajaxData=null}},r.prototype.getAjaxCorrelationContext=function(t){try{var e=t.getAllResponseHeaders();if(null!==e)if(-1!==e.toLowerCase().indexOf(U.requestContextHeaderLowerCase)){var n=t.getResponseHeader(U.requestContextHeader);return O.getCorrelationContext(n)}}catch(e){this._core.logger.throwInternal(m.WARNING,S,"Failed to get Request-Context correlation header as it may be not included in the response or not accessible.",{ajaxDiagnosticsMessage:r.getFailedAjaxDiagnosticsMessage(t),exception:q.dump(e)})}},r.prototype.trackDependencyDataInternal=function(e,t,n){if(-1===this._config.maxAjaxCallsPerView||this._trackAjaxAttempts<this._config.maxAjaxCallsPerView){var i=re.create(e,ie.dataType,ie.envelopeType,this._core.logger,t,n);this._core.track(i)}else this._trackAjaxAttempts===this._config.maxAjaxCallsPerView&&this._core.logger.throwInternal(m.CRITICAL,A,"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},r.prototype.trackDependencyData=function(e,t){this.trackDependencyDataInternal(e,t)},r.prototype.processTelemetry=function(e){this._nextPlugin&&this._nextPlugin.processTelemetry&&this._nextPlugin.processTelemetry(e)},r.prototype.setNextPlugin=function(e){e&&(this._nextPlugin=e)},r.prototype.instrumentFetch=function(){if(this.supportsFetch()&&!this._fetchInitialized){var i=window.fetch,a=this;window.fetch=function(t,e){var n;if(a.isFetchInstrumented(t))try{n=a.createFetchRecord(t,e),e=a.includeCorrelationHeaders(n,t,e)}catch(e){a._core.logger.throwInternal(m.CRITICAL,y,"Failed to monitor Window.fetch, monitoring data for this fetch call may be incorrect.",{ajaxDiagnosticsMessage:this.getFailedFetchDiagnosticsMessage(t),exception:q.dump(e)})}return i(t,e).then(function(e){return a.onFetchComplete(e,n),e}).catch(function(e){throw a.onFetchFailed(t,n,e),e})},this._fetchInitialized=!0}},r.prototype.isFetchInstrumented=function(e){return this._fetchInitialized&&!0!==e[F]},r.prototype.supportsFetch=function(){var e=!0;return(!window||c.isNullOrUndefined(window.Request)||c.isNullOrUndefined(window.Request.prototype)||c.isNullOrUndefined(window.fetch))&&(e=!1),e},r.prototype.createFetchRecord=function(e,t){var n=q.newId(),i=new se(n,this._core.logger);return i.requestSentTime=H.Now(),e instanceof Request?i.requestUrl=e?e.url:"":i.requestUrl=e,t&&t.method?i.method=t.method:e&&e instanceof Request?i.method=e.method:i.method="GET",i},r.prototype.includeCorrelationHeaders=function(e,t,n,i){if(t){if(O.canIncludeCorrelationHeader(this._config,e.getAbsoluteUrl(),this.currentWindowHost))return n||(n={}),n.headers=new Headers(n.headers||t instanceof Request&&t.headers||{}),n.headers.set(U.requestIdHeader,e.id),n}else if(i){if(this.currentWindowHost&&O.canIncludeCorrelationHeader(this._config,i.ajaxData.getAbsoluteUrl(),this.currentWindowHost)){i.setRequestHeader(U.requestIdHeader,i.ajaxData.id);var a=this._config.appId;a&&i.setRequestHeader(U.requestContextHeader,U.requestContextAppIdFormat+a)}return i}},r.prototype.getFailedFetchDiagnosticsMessage=function(e){var t="";try{c.isNullOrUndefined(e)||(t+="string"==typeof e?"(url: '"+e+"')":"(url: '"+e.url+"')")}catch(e){this._core.logger.throwInternal(m.CRITICAL,y,"Failed to grab failed fetch diagnostics message",{exception:q.dump(e)})}return t},r.prototype.onFetchComplete=function(t,e){if(e)try{if(e.responseFinishedTime=H.Now(),e.CalculateMetrics(),e.ajaxTotalDuration<0)this._core.logger.throwInternal(m.WARNING,f,"Failed to calculate the duration of the fetch call, monitoring data for this fetch call won't be sent.",{fetchDiagnosticsMessage:this.getFailedFetchDiagnosticsMessage(t),requestSentTime:e.requestSentTime,responseFinishedTime:e.responseFinishedTime});else{var n={id:e.id,absoluteUrl:e.getAbsoluteUrl(),commandName:e.getPathName(),duration:e.ajaxTotalDuration,success:200<=t.status&&t.status<400,resultCode:t.status,method:e.method},i=this.getFetchCorrelationContext(t);i&&(n.correlationContext=i),this.trackDependencyDataInternal(n)}}catch(e){this._core.logger.throwInternal(m.WARNING,S,"Failed to calculate the duration of the fetch call, monitoring data for this fetch call won't be sent.",{fetchDiagnosticsMessage:this.getFailedFetchDiagnosticsMessage(t),exception:q.dump(e)})}},r.prototype.onFetchFailed=function(t,e,n){if(e)try{if(e.responseFinishedTime=H.Now(),e.CalculateMetrics(),e.ajaxTotalDuration<0)this._core.logger.throwInternal(m.WARNING,f,"Failed to calculate the duration of the failed fetch call, monitoring data for this fetch call won't be sent.",{fetchDiagnosticsMessage:this.getFailedFetchDiagnosticsMessage(t),requestSentTime:e.requestSentTime,responseFinishedTime:e.responseFinishedTime});else{var i={id:e.id,absoluteUrl:e.getAbsoluteUrl(),commandName:e.getPathName(),duration:e.ajaxTotalDuration,success:!1,resultCode:0,method:e.method};this.trackDependencyDataInternal(i,{error:n.message})}}catch(e){this._core.logger.throwInternal(m.WARNING,S,"Failed to calculate the duration of the failed fetch call, monitoring data for this fetch call won't be sent.",{fetchDiagnosticsMessage:this.getFailedFetchDiagnosticsMessage(t),exception:q.dump(e)})}},r.prototype.getFetchCorrelationContext=function(t){try{var e=t.headers.get(U.requestContextHeader);return O.getCorrelationContext(e)}catch(e){this._core.logger.throwInternal(m.WARNING,S,"Failed to get Request-Context correlation header as it may be not included in the response or not accessible.",{fetchDiagnosticsMessage:this.getFailedFetchDiagnosticsMessage(t),exception:q.dump(e)})}},r.prototype.instrumentXhr=function(){this.supportsAjaxMonitoring()&&!this.initialized&&(this.instrumentOpen(),this.instrumentSend(),this.instrumentAbort(),this.initialized=!0)},r.getDefaultConfig=function(){return{maxAjaxCallsPerView:500,disableAjaxTracking:!1,disableFetchTracking:!0,disableCorrelationHeaders:!1,correlationHeaderExcludedDomains:["*.blob.core.windows.net","*.blob.core.chinacloudapi.cn","*.blob.core.cloudapi.de","*.blob.core.usgovcloudapi.net"],appId:void 0,enableCorsCorrelation:!1}},r.getEmptyConfig=function(){return{maxAjaxCallsPerView:void 0,disableAjaxTracking:void 0,disableFetchTracking:void 0,disableCorrelationHeaders:void 0,correlationHeaderExcludedDomains:void 0,appId:void 0,enableCorsCorrelation:void 0}},r.prototype.initialize=function(e,t,n){if(!this.initialized&&!this._fetchInitialized){this._core=t;var i=r.getDefaultConfig();for(var a in this._config=r.getEmptyConfig(),i)this._config[a]=r.getConfig(e,a,r.identifier,i[a]);!1===this._config.disableAjaxTracking&&this.instrumentXhr(),!1===this._config.disableFetchTracking&&this.instrumentFetch()}},r.getConfig=function(e,t,n,i){var a;return void 0===i&&(i=!1),a=n&&e.extensionConfig&&e.extensionConfig[n]&&!c.isNullOrUndefined(e.extensionConfig[n][t])?e.extensionConfig[n][t]:e[t],c.isNullOrUndefined(a)?i:a},r.identifier="AjaxDependencyPlugin",r}();e.AjaxPlugin=ue,e.ajaxRecord=se,Object.defineProperty(e,"__esModule",{value:!0})});
//# sourceMappingURL=applicationinsights-dependencies-js.min.js.map
{
"name": "@microsoft/applicationinsights-dependencies-js",
"version": "1.0.0-beta.7",
"version": "1.0.0-beta.8",
"description": "Microsoft Application Insights XHR dependencies plugin",
"main": "dist-esm/applicationinsights-dependencies-js.js",
"main": "dist/applicationinsights-dependencies-js.min.js",
"module": "dist-esm/applicationinsights-dependencies-js.js",
"browser": "browser/applicationinsights-dependencies-js.min.js",
"types": "types/applicationinsights-dependencies-js.d.ts",

@@ -7,0 +9,0 @@ "sideEffects": false,

@@ -6,4 +6,4 @@ // Copyright (c) Microsoft Corporation. All rights reserved.

RequestHeaders, Util, CorrelationIdHelper, TelemetryItemCreator, ICorrelationConfig,
RemoteDependencyData, DateTimeUtils, DisabledPropertyName, Data, IDependencyTelemetry,
IConfig
RemoteDependencyData, DateTimeUtils, DisabledPropertyName, IDependencyTelemetry,
IConfig, ConfigurationManager
} from '@microsoft/applicationinsights-common';

@@ -625,6 +625,6 @@ import {

let configValue;
if (identifier && config.extensionConfig && config.extensionConfig[identifier] && config.extensionConfig[identifier][field]) {
if (!identifier || !config.extensionConfig || !config.extensionConfig[identifier] || CoreUtils.isNullOrUndefined(config.extensionConfig[identifier][field])) {
configValue = config[field];
} else {
configValue = config.extensionConfig[identifier][field];
} else {
configValue = config[field];
}

@@ -634,2 +634,3 @@

}
}

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc