ApplicationInsights-JS/AISKU/dist-history/aisdk.0.0.13.min.js

2 строки
117 KiB
JavaScript

!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var i=t();for(var n in i)("object"==typeof exports?exports:e)[n]=i[n]}}(window,function(){return function(e){var t={};function i(n){if(t[n])return t[n].exports;var r=t[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,i),r.l=!0,r.exports}return i.m=e,i.c=t,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)i.d(n,r,function(t){return e[t]}.bind(null,r));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s=17)}([function(e,t,i){var n,r;n=[i,t,i(22),i(9),i(23),i(6),i(10),i(11),i(12)],void 0===(r=function(e,t,i,n,r,o,a,s,l){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MinChannelPriorty=i.MinChannelPriorty,t.EventsDiscardedReason=n.EventsDiscardedReason,t.AppInsightsCore=r.AppInsightsCore,t.CoreUtils=o.CoreUtils,t.NotificationManager=a.NotificationManager,t.DiagnosticLogger=s.DiagnosticLogger,t._InternalLogMessage=s._InternalLogMessage,t._InternalMessageId=l._InternalMessageId,t.LoggingSeverity=l.LoggingSeverity}.apply(t,n))||(e.exports=r)},function(e,t,i){var n,r;n=[i,t,i(2),i(3),i(13),i(27),i(14),i(15),i(28),i(30),i(31),i(20),i(35),i(7),i(36),i(38),i(40),i(42),i(43),i(44),i(4),i(45)],void 0===(r=function(e,t,i,n,r,o,a,s,l,c,u,p,d,f,g,h,y,v,m,_,I,S){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Util=i.Util,t.CorrelationIdHelper=i.CorrelationIdHelper,t.UrlHelper=i.UrlHelper,t.DateTimeUtils=i.DateTimeUtils,t.FieldType=n.FieldType,t.RequestHeaders=r.RequestHeaders,t.DisabledPropertyName=o.DisabledPropertyName,t.AIData=a.Data,t.AIBase=s.Base,t.Envelope=l.Envelope,t.Event=c.Event,t.Exception=u.Exception,t.Metric=p.Metric,t.PageView=d.PageView,t.PageViewData=f.PageViewData,t.RemoteDependencyData=g.RemoteDependencyData,t.Trace=h.Trace,t.PageViewPerformance=y.PageViewPerformance,t.Data=v.Data,t.SeverityLevel=m.SeverityLevel,t.ContextTagKeys=_.ContextTagKeys,t.DataSanitizer=I.DataSanitizer,t.TelemetryItemCreator=S.TelemetryItemCreator}.apply(t,n))||(e.exports=r)},function(e,t,i){var n,r;n=[i,t,i(3),i(0),i(13),i(4)],void 0===(r=function(e,t,i,n,r,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(){}return e.disableStorage=function(){e._canUseLocalStorage=!1,e._canUseSessionStorage=!1},e._getLocalStorageObject=function(){return e.canUseLocalStorage()?e._getVerifiedStorageObject(i.StorageType.LocalStorage):null},e._getVerifiedStorageObject=function(e){var t,n,r=null;try{n=new Date,(r=e===i.StorageType.LocalStorage?window.localStorage:window.sessionStorage).setItem(n,n),t=r.getItem(n)!=n,r.removeItem(n),t&&(r=null)}catch(e){r=null}return r},e.isInternalApplicationInsightsEndpoint=function(t){return-1!==e._internalEndpoints.indexOf(t.toLowerCase())},e.canUseLocalStorage=function(){return void 0===e._canUseLocalStorage&&(e._canUseLocalStorage=!!e._getVerifiedStorageObject(i.StorageType.LocalStorage)),e._canUseLocalStorage},e.getStorage=function(t,i){var r=e._getLocalStorageObject();if(null!==r)try{return r.getItem(i)}catch(i){e._canUseLocalStorage=!1,t.throwInternal(n.LoggingSeverity.WARNING,n._InternalMessageId.BrowserCannotReadLocalStorage,"Browser failed read of local storage. "+e.getExceptionName(i),{exception:e.dump(i)})}return null},e.setStorage=function(t,i,r){var o=e._getLocalStorageObject();if(null!==o)try{return o.setItem(i,r),!0}catch(i){e._canUseLocalStorage=!1,t.throwInternal(n.LoggingSeverity.WARNING,n._InternalMessageId.BrowserCannotWriteLocalStorage,"Browser failed write to local storage. "+e.getExceptionName(i),{exception:e.dump(i)})}return!1},e.removeStorage=function(t,i){var r=e._getLocalStorageObject();if(null!==r)try{return r.removeItem(i),!0}catch(i){e._canUseLocalStorage=!1,t.throwInternal(n.LoggingSeverity.WARNING,n._InternalMessageId.BrowserFailedRemovalFromLocalStorage,"Browser failed removal of local storage item. "+e.getExceptionName(i),{exception:e.dump(i)})}return!1},e._getSessionStorageObject=function(){return e.canUseSessionStorage()?e._getVerifiedStorageObject(i.StorageType.SessionStorage):null},e.canUseSessionStorage=function(){return void 0===e._canUseSessionStorage&&(e._canUseSessionStorage=!!e._getVerifiedStorageObject(i.StorageType.SessionStorage)),e._canUseSessionStorage},e.getSessionStorageKeys=function(){var t=[];if(e.canUseSessionStorage())for(var i in window.sessionStorage)t.push(i);return t},e.getSessionStorage=function(t,i){var r=e._getSessionStorageObject();if(null!==r)try{return r.getItem(i)}catch(i){e._canUseSessionStorage=!1,t.throwInternal(n.LoggingSeverity.WARNING,n._InternalMessageId.BrowserCannotReadSessionStorage,"Browser failed read of session storage. "+e.getExceptionName(i),{exception:e.dump(i)})}return null},e.setSessionStorage=function(t,i,r){var o=e._getSessionStorageObject();if(null!==o)try{return o.setItem(i,r),!0}catch(i){e._canUseSessionStorage=!1,t.throwInternal(n.LoggingSeverity.WARNING,n._InternalMessageId.BrowserCannotWriteSessionStorage,"Browser failed write to session storage. "+e.getExceptionName(i),{exception:e.dump(i)})}return!1},e.removeSessionStorage=function(t,i){var r=e._getSessionStorageObject();if(null!==r)try{return r.removeItem(i),!0}catch(i){e._canUseSessionStorage=!1,t.throwInternal(n.LoggingSeverity.WARNING,n._InternalMessageId.BrowserFailedRemovalFromSessionStorage,"Browser failed removal of session storage item. "+e.getExceptionName(i),{exception:e.dump(i)})}return!1},e.disableCookies=function(){e._canUseCookies=!1},e.canUseCookies=function(t){if(void 0===e._canUseCookies){e._canUseCookies=!1;try{e._canUseCookies=void 0!==e.document.cookie}catch(i){t.throwInternal(n.LoggingSeverity.WARNING,n._InternalMessageId.CannotAccessCookie,"Cannot access document.cookie - "+e.getExceptionName(i),{exception:e.dump(i)})}}return e._canUseCookies},e.setCookie=function(t,i,n,r){var o="",a="";r&&(o=";domain="+r),e.document.location&&"https:"===e.document.location.protocol&&(a=";secure"),e.canUseCookies(t)&&(e.document.cookie=i+"="+n+o+";path=/"+a)},e.stringToBoolOrDefault=function(e,t){return void 0===t&&(t=!1),null==e?t:"true"===e.toString().toLowerCase()},e.getCookie=function(t,i){if(e.canUseCookies(t)){var n="";if(i&&i.length)for(var r=i+"=",o=e.document.cookie.split(";"),a=0;a<o.length;a++){var s=o[a];if((s=e.trim(s))&&0===s.indexOf(r)){n=s.substring(r.length,o[a].length);break}}return n}},e.deleteCookie=function(t,i){e.canUseCookies(t)&&(e.document.cookie=i+"=;path=/;expires=Thu, 01 Jan 1970 00:00:01 GMT;")},e.trim=function(e){return"string"!=typeof e?e:e.replace(/^\s+|\s+$/g,"")},e.newId=function(){for(var e="",t=1073741824*Math.random();t>0;){e+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(t%64),t=Math.floor(t/64)}return e},e.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)},e.isError=function(e){return"[object Error]"===Object.prototype.toString.call(e)},e.isDate=function(e){return"[object Date]"===Object.prototype.toString.call(e)},e.toISOStringForIE8=function(t){if(e.isDate(t)){if(Date.prototype.toISOString)return t.toISOString();var i=function(e){var t=String(e);return 1===t.length&&(t="0"+t),t};return t.getUTCFullYear()+"-"+i(t.getUTCMonth()+1)+"-"+i(t.getUTCDate())+"T"+i(t.getUTCHours())+":"+i(t.getUTCMinutes())+":"+i(t.getUTCSeconds())+"."+String((t.getUTCMilliseconds()/1e3).toFixed(3)).slice(2,5)+"Z"}},e.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},e.msToTimeSpan=function(e){(isNaN(e)||e<0)&&(e=0);var t=""+(e=Math.round(e))%1e3,i=""+Math.floor(e/1e3)%60,n=""+Math.floor(e/6e4)%60,r=""+Math.floor(e/36e5)%24,o=Math.floor(e/864e5);return t=1===t.length?"00"+t:2===t.length?"0"+t:t,i=i.length<2?"0"+i:i,n=n.length<2?"0"+n:n,(o>0?o+".":"")+(r=r.length<2?"0"+r:r)+":"+n+":"+i+"."+t},e.isCrossOriginError=function(e,t,i,n,r){return("Script error."===e||"Script error"===e)&&!r},e.dump=function(e){var t=Object.prototype.toString.call(e),i=JSON.stringify(e);return"[object Error]"===t&&(i="{ stack: '"+e.stack+"', message: '"+e.message+"', name: '"+e.name+"'"),t+i},e.getExceptionName=function(e){return"[object Error]"===Object.prototype.toString.call(e)?e.name:""},e.addEventHandler=function(e,t){if(!window||"string"!=typeof e||"function"!=typeof t)return!1;var i="on"+e;if(window.addEventListener)window.addEventListener(e,t,!1);else{if(!window.attachEvent)return!1;window.attachEvent(i,t)}return!0},e.IsBeaconApiSupported=function(){return"sendBeacon"in navigator&&navigator.sendBeacon},e.document="undefined"!=typeof document?document:{},e._canUseCookies=void 0,e._canUseLocalStorage=void 0,e._canUseSessionStorage=void 0,e._internalEndpoints=["https://dc.services.visualstudio.com/v2/track","https://breeze.aimon.applicationinsights.io/v2/track","https://dc-int.services.visualstudio.com/v2/track"],e.NotSpecified="not_specified",e}();t.Util=a;var s=function(){function e(){}return e.parseUrl=function(t){return e.htmlAnchorElement||(e.htmlAnchorElement=e.document.createElement?e.document.createElement("a"):{}),e.htmlAnchorElement.href=t,e.htmlAnchorElement},e.getAbsoluteUrl=function(t){var i,n=e.parseUrl(t);return n&&(i=n.href),i},e.getPathName=function(t){var i,n=e.parseUrl(t);return n&&(i=n.pathname),i},e.getCompleteUrl=function(e,t){return e?e.toUpperCase()+" "+t:t},e.document="undefined"!=typeof document?document:{},e}();t.UrlHelper=s;var l=function(){function e(){}return e.canIncludeCorrelationHeader=function(e,t,i){if(e&&e.disableCorrelationHeaders)return!1;if(!t)return!1;var n=s.parseUrl(t).host.toLowerCase();if(!(e&&e.enableCorsCorrelation||n===i))return!1;var r=e&&e.correlationHeaderExcludedDomains;if(!r||0==r.length)return!0;for(var o=0;o<r.length;o++){if(new RegExp(r[o].toLowerCase().replace(/\./g,".").replace(/\*/g,".*")).test(n))return!1}return!0},e.getCorrelationContext=function(t){if(t){var i=e.getCorrelationContextValue(t,r.RequestHeaders.requestContextTargetKey);if(i&&i!==e.correlationIdPrefix)return i}},e.getCorrelationContextValue=function(e,t){if(e)for(var i=e.split(","),n=0;n<i.length;++n){var r=i[n].split("=");if(2==r.length&&r[0]==t)return r[1]}},e.correlationIdPrefix="cid-v1:",e}();t.CorrelationIdHelper=l;var c=function(){function e(){}return e.ParseDependencyPath=function(e,t,i,n){var r,a;if(t&&t.length>0){var l=s.parseUrl(t);if(r=l.host,null!=l.pathname)"/"!==(n=0===l.pathname.length?"/":l.pathname).charAt(0)&&(n="/"+n),a=o.DataSanitizer.sanitizeString(e,i?i+" "+n:n);else a=o.DataSanitizer.sanitizeString(e,t)}else r=n,a=n;return{target:r,name:a}},e}();t.AjaxHelper=c;var u=function(){function e(){}return e.Now=window.performance&&window.performance.now&&window.performance.timing?function(){return window.performance.now()+window.performance.timing.navigationStart}:function(){return(new Date).getTime()},e.GetDuration=function(e,t){var i=null;return 0===e||0===t||n.CoreUtils.isNullOrUndefined(e)||n.CoreUtils.isNullOrUndefined(t)||(i=t-e),i},e}();t.DateTimeUtils=u}.apply(t,n))||(e.exports=r)},function(e,t,i){var n;void 0===(n=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e[e.LocalStorage=0]="LocalStorage",e[e.SessionStorage=1]="SessionStorage"}(t.StorageType||(t.StorageType={})),function(e){e[e.Default=0]="Default",e[e.Required=1]="Required",e[e.Array=2]="Array",e[e.Hidden=4]="Hidden"}(t.FieldType||(t.FieldType={}))}.apply(t,[i,t]))||(e.exports=n)},function(e,t,i){var n,r;n=[i,t,i(0),i(2)],void 0===(r=function(e,t,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(){}return e.sanitizeKeyAndAddUniqueness=function(t,i,n){var r=i.length,o=e.sanitizeKey(t,i);if(o.length!==r){for(var a=0,s=o;void 0!==n[s];)a++,s=o.substring(0,e.MAX_NAME_LENGTH-3)+e.padNumber(a);o=s}return o},e.sanitizeKey=function(t,r){return r&&(r=n.Util.trim(r.toString())).length>e.MAX_NAME_LENGTH&&(r=r.substring(0,e.MAX_NAME_LENGTH),t.throwInternal(i.LoggingSeverity.WARNING,i._InternalMessageId.NameTooLong,"name is too long. It has been truncated to "+e.MAX_NAME_LENGTH+" characters.",{name:r},!0)),r},e.sanitizeString=function(t,r,o){return void 0===o&&(o=e.MAX_STRING_LENGTH),r&&(o=o||e.MAX_STRING_LENGTH,(r=n.Util.trim(r)).toString().length>o&&(r=r.toString().substring(0,o),t.throwInternal(i.LoggingSeverity.WARNING,i._InternalMessageId.StringValueTooLong,"string value is too long. It has been truncated to "+o+" characters.",{value:r},!0))),r},e.sanitizeUrl=function(t,n){return e.sanitizeInput(t,n,e.MAX_URL_LENGTH,i._InternalMessageId.UrlTooLong)},e.sanitizeMessage=function(t,n){return n&&n.length>e.MAX_MESSAGE_LENGTH&&(n=n.substring(0,e.MAX_MESSAGE_LENGTH),t.throwInternal(i.LoggingSeverity.WARNING,i._InternalMessageId.MessageTruncated,"message is too long, it has been truncated to "+e.MAX_MESSAGE_LENGTH+" characters.",{message:n},!0)),n},e.sanitizeException=function(t,n){return n&&n.length>e.MAX_EXCEPTION_LENGTH&&(n=n.substring(0,e.MAX_EXCEPTION_LENGTH),t.throwInternal(i.LoggingSeverity.WARNING,i._InternalMessageId.ExceptionTruncated,"exception is too long, it has been truncated to "+e.MAX_EXCEPTION_LENGTH+" characters.",{exception:n},!0)),n},e.sanitizeProperties=function(t,i){if(i){var n={};for(var r in i){var o=e.sanitizeString(t,i[r],e.MAX_PROPERTY_LENGTH);n[r=e.sanitizeKeyAndAddUniqueness(t,r,n)]=o}i=n}return i},e.sanitizeMeasurements=function(t,i){if(i){var n={};for(var r in i){var o=i[r];n[r=e.sanitizeKeyAndAddUniqueness(t,r,n)]=o}i=n}return i},e.sanitizeId=function(t,n){return n?e.sanitizeInput(t,n,e.MAX_ID_LENGTH,i._InternalMessageId.IdTooLong).toString():n},e.sanitizeInput=function(e,t,r,o){return t&&(t=n.Util.trim(t)).length>r&&(t=t.substring(0,r),e.throwInternal(i.LoggingSeverity.WARNING,o,"input is too long, it has been truncated to "+r+" characters.",{data:t},!0)),t},e.padNumber=function(e){var t="00"+e;return t.substr(t.length-3)},e.MAX_NAME_LENGTH=150,e.MAX_ID_LENGTH=128,e.MAX_PROPERTY_LENGTH=8192,e.MAX_STRING_LENGTH=1024,e.MAX_URL_LENGTH=2048,e.MAX_MESSAGE_LENGTH=32768,e.MAX_EXCEPTION_LENGTH=32768,e}();t.DataSanitizer=r}.apply(t,n))||(e.exports=r)},function(e,t,i){var n;void 0===(n=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){return function(){}}();t.Domain=i}.apply(t,[i,t]))||(e.exports=n)},function(e,t,i){var n;void 0===(n=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(){}return e.isNullOrUndefined=function(e){return null==e},e.newGuid=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(n,function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})},e}();t.CoreUtils=i;var n=/[xy]/g}.apply(t,[i,t]))||(e.exports=n)},function(e,t,i){var n,r,o=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();n=[i,t,i(16)],void 0===(r=function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e){function t(){var t=e.call(this)||this;return t.ver=2,t.properties={},t.measurements={},t}return o(t,e),t}(i.EventData);t.PageViewData=n}.apply(t,n))||(e.exports=r)},function(e,t,i){var n,r;n=[i,t,i(19)],void 0===(r=function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ApplicationInsights=i.ApplicationInsights}.apply(t,n))||(e.exports=r)},function(e,t,i){var n;void 0===(n=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EventsDiscardedReason={Unknown:0,NonRetryableStatus:1,InvalidEvent:2,SizeLimitExceeded:3,KillSwitch:4,QueueFull:5}}.apply(t,[i,t]))||(e.exports=n)},function(e,t,i){var n;void 0===(n=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(){this.listeners=[]}return e.prototype.addNotificationListener=function(e){this.listeners.push(e)},e.prototype.removeNotificationListener=function(e){for(var t=this.listeners.indexOf(e);t>-1;)this.listeners.splice(t,1),t=this.listeners.indexOf(e)},e.prototype.eventsSent=function(e){for(var t=this,i=function(i){n.listeners[i].eventsSent&&setTimeout(function(){return t.listeners[i].eventsSent(e)},0)},n=this,r=0;r<this.listeners.length;++r)i(r)},e.prototype.eventsDiscarded=function(e,t){for(var i=this,n=function(n){r.listeners[n].eventsDiscarded&&setTimeout(function(){return i.listeners[n].eventsDiscarded(e,t)},0)},r=this,o=0;o<this.listeners.length;++o)n(o)},e}();t.NotificationManager=i}.apply(t,[i,t]))||(e.exports=n)},function(e,t,i){var n,r;n=[i,t,i(12),i(6)],void 0===(r=function(e,t,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(t,i,n,r){void 0===n&&(n=!1),this.messageId=t,this.message=(n?e.AiUserActionablePrefix:e.AiNonUserActionablePrefix)+t;var o=(i?" message:"+e.sanitizeDiagnosticText(i):"")+(r?" props:"+e.sanitizeDiagnosticText(JSON.stringify(r)):"");this.message+=o}return e.sanitizeDiagnosticText=function(e){return'"'+e.replace(/\"/g,"")+'"'},e.dataType="MessageData",e.AiNonUserActionablePrefix="AI (Internal): ",e.AiUserActionablePrefix="AI: ",e}();t._InternalLogMessage=r;var o=function(){function e(e){this.AIInternalMessagePrefix="AITR_",this.enableDebugExceptions=function(){return!1},this.consoleLoggingLevel=function(){return 1},this.telemetryLoggingLevel=function(){return 0},this.maxInternalMessageLimit=function(){return 25},this.queue=[],this._messageCount=0,this._messageLogged={},n.CoreUtils.isNullOrUndefined(e)||(n.CoreUtils.isNullOrUndefined(e.loggingLevelConsole)||(this.consoleLoggingLevel=function(){return e.loggingLevelConsole}),n.CoreUtils.isNullOrUndefined(e.loggingLevelTelemetry)||(this.telemetryLoggingLevel=function(){return e.loggingLevelTelemetry}),n.CoreUtils.isNullOrUndefined(e.maxMessageLimit)||(this.maxInternalMessageLimit=function(){return e.maxMessageLimit}),n.CoreUtils.isNullOrUndefined(e.enableDebugExceptions)||(this.enableDebugExceptions=function(){return e.enableDebugExceptions}))}return e.prototype.throwInternal=function(e,t,n,o,a){void 0===a&&(a=!1);var s=new r(t,n,a,o);if(this.enableDebugExceptions())throw s;if(void 0!==s&&s&&void 0!==s.message){if(a){var l=+s.messageId;(!this._messageLogged[l]||this.consoleLoggingLevel()>=i.LoggingSeverity.WARNING)&&(this.warnToConsole(s.message),this._messageLogged[l]=!0)}else this.consoleLoggingLevel()>=i.LoggingSeverity.WARNING&&this.warnToConsole(s.message);this.logInternalMessage(e,s)}},e.prototype.warnToConsole=function(e){"undefined"!=typeof console&&console&&("function"==typeof console.warn?console.warn(e):"function"==typeof console.log&&console.log(e))},e.prototype.resetInternalMessageCount=function(){this._messageCount=0,this._messageLogged={}},e.prototype.logInternalMessage=function(e,t){if(!this._areInternalMessagesThrottled()){var n=!0,o=this.AIInternalMessagePrefix+t.messageId;if(this._messageLogged[o]?n=!1:this._messageLogged[o]=!0,n&&(e<=this.telemetryLoggingLevel()&&(this.queue.push(t),this._messageCount++),this._messageCount==this.maxInternalMessageLimit())){var a="Internal events throttle limit per PageView reached for this app.",s=new r(i._InternalMessageId.MessageLimitPerPVExceeded,a,!1);this.queue.push(s),this.warnToConsole(a)}}},e.prototype._areInternalMessagesThrottled=function(){return this._messageCount>=this.maxInternalMessageLimit()},e}();t.DiagnosticLogger=o}.apply(t,n))||(e.exports=r)},function(e,t,i){var n;void 0===(n=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e[e.CRITICAL=1]="CRITICAL",e[e.WARNING=2]="WARNING"}(t.LoggingSeverity||(t.LoggingSeverity={})),t._InternalMessageId={BrowserDoesNotSupportLocalStorage:0,BrowserCannotReadLocalStorage:1,BrowserCannotReadSessionStorage:2,BrowserCannotWriteLocalStorage:3,BrowserCannotWriteSessionStorage:4,BrowserFailedRemovalFromLocalStorage:5,BrowserFailedRemovalFromSessionStorage:6,CannotSendEmptyTelemetry:7,ClientPerformanceMathError:8,ErrorParsingAISessionCookie:9,ErrorPVCalc:10,ExceptionWhileLoggingError:11,FailedAddingTelemetryToBuffer:12,FailedMonitorAjaxAbort:13,FailedMonitorAjaxDur:14,FailedMonitorAjaxOpen:15,FailedMonitorAjaxRSC:16,FailedMonitorAjaxSend:17,FailedMonitorAjaxGetCorrelationHeader:18,FailedToAddHandlerForOnBeforeUnload:19,FailedToSendQueuedTelemetry:20,FailedToReportDataLoss:21,FlushFailed:22,MessageLimitPerPVExceeded:23,MissingRequiredFieldSpecification:24,NavigationTimingNotSupported:25,OnError:26,SessionRenewalDateIsZero:27,SenderNotInitialized:28,StartTrackEventFailed:29,StopTrackEventFailed:30,StartTrackFailed:31,StopTrackFailed:32,TelemetrySampledAndNotSent:33,TrackEventFailed:34,TrackExceptionFailed:35,TrackMetricFailed:36,TrackPVFailed:37,TrackPVFailedCalc:38,TrackTraceFailed:39,TransmissionFailed:40,FailedToSetStorageBuffer:41,FailedToRestoreStorageBuffer:42,InvalidBackendResponse:43,FailedToFixDepricatedValues:44,InvalidDurationValue:45,TelemetryEnvelopeInvalid:46,CreateEnvelopeError:47,CannotSerializeObject:48,CannotSerializeObjectNonSerializable:49,CircularReferenceDetected:50,ClearAuthContextFailed:51,ExceptionTruncated:52,IllegalCharsInName:53,ItemNotInArray:54,MaxAjaxPerPVExceeded:55,MessageTruncated:56,NameTooLong:57,SampleRateOutOfRange:58,SetAuthContextFailed:59,SetAuthContextFailedAccountName:60,StringValueTooLong:61,StartCalledMoreThanOnce:62,StopCalledWithoutStart:63,TelemetryInitializerFailed:64,TrackArgumentsNotSpecified:65,UrlTooLong:66,SessionStorageBufferFull:67,CannotAccessCookie:68,IdTooLong:69}}.apply(t,[i,t]))||(e.exports=n)},function(e,t,i){var n;void 0===(n=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(){}return e.requestContextHeader="Request-Context",e.requestContextTargetKey="appId",e.requestContextAppIdFormat="appId=cid-v1:",e.requestIdHeader="Request-Id",e.sdkContextHeader="Sdk-Context",e.sdkContextHeaderAppIdRequest="appId",e.requestContextHeaderLowerCase="request-context",e}();t.RequestHeaders=i}.apply(t,[i,t]))||(e.exports=n)},function(e,t,i){var n,r,o=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();n=[i,t,i(15)],void 0===(r=function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e){function t(){return e.call(this)||this}return o(t,e),t}(i.Base);t.Data=n}.apply(t,n))||(e.exports=r)},function(e,t,i){var n;void 0===(n=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){return function(){}}();t.Base=i}.apply(t,[i,t]))||(e.exports=n)},function(e,t,i){var n,r,o=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();n=[i,t,i(5)],void 0===(r=function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e){function t(){var t=e.call(this)||this;return t.ver=2,t.properties={},t.measurements={},t}return o(t,e),t}(i.Domain);t.EventData=n}.apply(t,n))||(e.exports=r)},function(e,t,i){e.exports=i(18)},function(e,t,i){var n,r;n=[i,t,i(8),i(47)],void 0===(r=function(e,t,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});try{var r;if("undefined"!=typeof window&&"undefined"!=typeof JSON)if(r=window.appInsightsSDK,void 0===window[r])i.ApplicationInsights.appInsightsDefaultConfig=n.Initialization.getDefaultConfig();else if(window[r].initialize){var o=window[r]||{},a=new n.Initialization(o),s=a.loadAppInsights();for(var l in s)o[l]=s[l];a.emptyQueue(),a.addHousekeepingBeforeUnload(s)}}catch(e){console&&console.warn("Failed to initialize AppInsights JS SDK for instance "+r+e.message)}}.apply(t,n))||(e.exports=r)},function(e,t,i){var n,r;n=[i,t,i(1),i(0),i(46)],void 0===(r=function(e,t,i,n,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(){this.identifier="ApplicationInsightsAnalytics",this.priority=160,this._isInitialized=!1,this._trackAjaxAttempts=0,this.initialize=this._initialize.bind(this)}return e.prototype.processTelemetry=function(e){var t=!1;try{for(var r=this._telemetryInitializers.length,o=0;o<r;++o){var a=this._telemetryInitializers[o];if(a&&!1===a.apply(null,[e])){t=!0;break}}}catch(e){t=!0,this._logger.throwInternal(n.LoggingSeverity.CRITICAL,n._InternalMessageId.TelemetryInitializerFailed,"One of telemetry initializers failed, telemetry item will not be sent: "+i.Util.getExceptionName(e),{exception:i.Util.dump(e)},!0)}t||n.CoreUtils.isNullOrUndefined(this._nextPlugin)||this._nextPlugin.processTelemetry(e)},e.prototype.setNextPlugin=function(e){this._nextPlugin=e},e.prototype.trackTrace=function(e,t){try{var r=i.TelemetryItemCreator.create(e,i.Trace.dataType,i.Trace.envelopeType,this._logger,t);this._setTelemetryNameAndIKey(r),this.core.track(r)}catch(e){this._logger.throwInternal(n.LoggingSeverity.WARNING,n._InternalMessageId.TrackTraceFailed,"trackTrace failed, trace will not be collected: "+i.Util.getExceptionName(e),{exception:i.Util.dump(e)})}},e.prototype.trackMetric=function(e,t){try{var r=i.TelemetryItemCreator.create(e,i.Metric.dataType,i.Metric.envelopeType,this._logger,t);this._setTelemetryNameAndIKey(r),this.core.track(r)}catch(e){this._logger.throwInternal(n.LoggingSeverity.CRITICAL,n._InternalMessageId.TrackMetricFailed,"trackMetric failed, metric will not be collected: "+i.Util.getExceptionName(e),{exception:i.Util.dump(e)})}},e.prototype.trackPageView=function(e,t){try{this._pageViewManager.trackPageView(e,t),this.config.autoTrackPageVisitTime&&this._pageVisitTimeManager.trackPreviousPageVisit(e.name,e.uri)}catch(e){this._logger.throwInternal(n.LoggingSeverity.CRITICAL,n._InternalMessageId.TrackPVFailed,"trackPageView failed, page view will not be collected: "+i.Util.getExceptionName(e),{exception:i.Util.dump(e)})}},e.prototype.sendPageViewInternal=function(e,t,n){var r=i.TelemetryItemCreator.create(e,i.PageView.dataType,i.PageView.envelopeType,this._logger,t,n);this._setTelemetryNameAndIKey(r),this.core.track(r),this._trackAjaxAttempts=0},e.prototype.sendPageViewPerformanceInternal=function(e,t){var n=i.TelemetryItemCreator.create(e,i.PageViewPerformance.dataType,i.PageViewPerformance.envelopeType,this._logger,t);this._setTelemetryNameAndIKey(n),this.core.track(n)},e.prototype.startTrackPage=function(e){try{"string"!=typeof e&&(e=window.document&&window.document.title||""),this._pageTracking.start(e)}catch(e){this._logger.throwInternal(n.LoggingSeverity.CRITICAL,n._InternalMessageId.StartTrackFailed,"startTrackPage failed, page view may not be collected: "+i.Util.getExceptionName(e),{exception:i.Util.dump(e)})}},e.prototype.stopTrackPage=function(e,t,r){try{"string"!=typeof e&&(e=window.document&&window.document.title||""),"string"!=typeof t&&(t=window.location&&window.location.href||""),this._pageTracking.stop(e,t,r),this.config.autoTrackPageVisitTime&&this._pageVisitTimeManager.trackPreviousPageVisit(e,t)}catch(e){this._logger.throwInternal(n.LoggingSeverity.CRITICAL,n._InternalMessageId.StopTrackFailed,"stopTrackPage failed, page view will not be collected: "+i.Util.getExceptionName(e),{exception:i.Util.dump(e)})}},e.prototype.trackException=function(e,t){try{var r=i.TelemetryItemCreator.create(e,i.Exception.dataType,i.Exception.envelopeType,this._logger,t);this._setTelemetryNameAndIKey(r),this.core.track(r)}catch(e){this._logger.throwInternal(n.LoggingSeverity.CRITICAL,n._InternalMessageId.TrackExceptionFailed,"trackException failed, exception will not be collected: "+i.Util.getExceptionName(e),{exception:i.Util.dump(e)})}},e.prototype._onerror=function(e){try{var t={url:e&&e.url||document.URL,lineNumber:e.lineNumber,columnNumber:e.columnNumber,message:e.message};if(i.Util.isCrossOriginError(e.message,e.url,e.lineNumber,e.columnNumber,e.error))this._sendCORSException(t.url);else{if(!i.Util.isError(e.error)){var r="window.onerror@"+t.url+":"+e.lineNumber+":"+(e.columnNumber||0);e.error=new Error(e.message),e.error.stack=r}this.trackException({error:e.error,severityLevel:i.SeverityLevel.Error},t)}}catch(t){var o=e.error?e.error.name+", "+e.error.message:"null";this._logger.throwInternal(n.LoggingSeverity.CRITICAL,n._InternalMessageId.ExceptionWhileLoggingError,"_onError threw exception while logging error, error will not be collected: "+i.Util.getExceptionName(t),{exception:i.Util.dump(t),errorString:o})}},e.prototype.addTelemetryInitializer=function(e){this._telemetryInitializers.push(e)},e.prototype._initialize=function(t,o,s){var l=this;if(!this._isInitialized){if(n.CoreUtils.isNullOrUndefined(o))throw Error("Error initializing");this.core=o,this._logger=o.logger,this._globalconfig={instrumentationKey:t.instrumentationKey,endpointUrl:t.endpointUrl},this.config=t.extensionConfig&&t.extensionConfig[this.identifier]?t.extensionConfig[this.identifier]:{};var c=e.appInsightsDefaultConfig;if(void 0!==c){if(c.extensions&&c.extensions[this.identifier])for(var u in c.extensions[this.identifier])void 0===this.config[u]&&(this.config[u]=c[u]);if(this._globalconfig)for(var u in c)void 0===this._globalconfig[u]&&(this._globalconfig[u]=c[u])}this.config.isCookieUseDisabled&&i.Util.disableCookies(),this.config.isStorageUseDisabled&&i.Util.disableStorage();var p={instrumentationKey:function(){return t.instrumentationKey},accountId:function(){return l.config.accountId},sessionRenewalMs:function(){return l.config.sessionRenewalMs},sessionExpirationMs:function(){return l.config.sessionExpirationMs},sampleRate:function(){return l.config.samplingPercentage},cookieDomain:function(){return l.config.cookieDomain},sdkExtension:function(){return l.config.sdkExtension},isBrowserLinkTrackingEnabled:function(){return l.config.isBrowserLinkTrackingEnabled},appId:function(){return l.config.appId}};if(this._pageViewManager=new r.PageViewManager(this,this.config.overridePageViewDuration,this.core),this._telemetryInitializers=[],this._addDefaultTelemetryInitializers(p),this._pageTracking=new a(this._logger,"trackPageView"),this._pageTracking.action=function(e,t,i,r){var o={name:e,uri:t};n.CoreUtils.isNullOrUndefined(r)&&(r={}),r.duration=i,l.sendPageViewInternal(o,r)},!1===this.config.disableExceptionTracking&&!this.config.autoExceptionsInstrumented){var d=window.onerror;window.onerror=function(e,t,i,n,r){var o=d&&d(e,t,i,n,r);return!0!==o&&this._onerror({message:e,url:t,lineNumber:i,columnNumber:n,error:r}),o},this.config.autoExceptionsInstrumented=!0}this._isInitialized=!0}},e.prototype._addDefaultTelemetryInitializers=function(e){if(!e.isBrowserLinkTrackingEnabled()){var t=["/browserLinkSignalR/","/__browserLink/"];this._addTelemetryInitializer(function(e){if(e.baseType===i.RemoteDependencyData.dataType){var n=e.baseData;if(n)for(var r=0;r<t.length;r++)if(n.absoluteUrl&&n.absoluteUrl.indexOf(t[r])>=0)return!1}return!0})}},e.prototype._addTelemetryInitializer=function(e){this._telemetryInitializers.push(e)},e.prototype._sendCORSException=function(e){var t={message:"Script error: The browser's same-origin policy prevents us from getting the details of this exception. Consider using the 'crossorigin' attribute.",url:e,lineNumber:0,columnNumber:0,error:void 0},n=i.TelemetryItemCreator.create(t,i.Exception.dataType,i.Exception.envelopeType,this._logger,{url:e});this.core.track(n)},e.prototype._setTelemetryNameAndIKey=function(e){e.instrumentationKey=this._globalconfig.instrumentationKey;var t=this._globalconfig.instrumentationKey.replace(/-/g,"");e.name=e.name.replace("{0}",t)},e.Version="2.0.1-beta",e}();t.ApplicationInsights=o;var a=function(){function e(e,t){this._name=t,this._events={},this._logger=e}return e.prototype.start=function(e){void 0!==this._events[e]&&this._logger.throwInternal(n.LoggingSeverity.WARNING,n._InternalMessageId.StartCalledMoreThanOnce,"start was called more than once for this event without calling stop.",{name:this._name,key:e},!0),this._events[e]=+new Date},e.prototype.stop=function(e,t,r){var o=this._events[e];if(isNaN(o))this._logger.throwInternal(n.LoggingSeverity.WARNING,n._InternalMessageId.StopCalledWithoutStart,"stop was called without a corresponding start.",{name:this._name,key:e},!0);else{var a=+new Date,s=i.PageViewPerformance.getDuration(o,a);this.action(e,t,s,r)}delete this._events[e],this._events[e]=void 0},e}()}.apply(t,n))||(e.exports=r)},function(e,t,i){var n,r,o=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();n=[i,t,i(21),i(4),i(3),i(24),i(2)],void 0===(r=function(e,t,i,n,r,a,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var l=function(e){function t(t,i,o,l,c,u,p){var d=e.call(this)||this;d.aiDataContract={ver:r.FieldType.Required,metrics:r.FieldType.Required,properties:r.FieldType.Default};var f=new a.DataPoint;return f.count=l>0?l:void 0,f.max=isNaN(u)||null===u?void 0:u,f.min=isNaN(c)||null===c?void 0:c,f.name=n.DataSanitizer.sanitizeString(t,i)||s.Util.NotSpecified,f.value=o,d.metrics=[f],d.properties=n.DataSanitizer.sanitizeProperties(t,p),d}return o(t,e),t.envelopeType="Microsoft.ApplicationInsights.{0}.Metric",t.dataType="MetricData",t}(i.MetricData);t.Metric=l}.apply(t,n))||(e.exports=r)},function(e,t,i){var n,r,o=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();n=[i,t,i(5)],void 0===(r=function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e){function t(){var t=e.call(this)||this;return t.ver=2,t.metrics=[],t.properties={},t}return o(t,e),t}(i.Domain);t.MetricData=n}.apply(t,n))||(e.exports=r)},function(e,t,i){var n;void 0===(n=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MinChannelPriorty=100}.apply(t,[i,t]))||(e.exports=n)},function(e,t,i){var n,r;n=[i,t,i(9),i(6),i(10),i(11)],void 0===(r=function(e,t,i,n,r,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(){this._isInitialized=!1,this._extensions=new Array,this._channelController=new s}return e.prototype.initialize=function(e,t){var i=this;if(this._isInitialized)throw Error("Core should not be initialized more than once");if(!e||n.CoreUtils.isNullOrUndefined(e.instrumentationKey))throw Error("Please provide instrumentation key");if(this.config=e,this._notificationManager=new r.NotificationManager,this.config.extensions=n.CoreUtils.isNullOrUndefined(this.config.extensions)?[]:this.config.extensions,this.config.extensionConfig=n.CoreUtils.isNullOrUndefined(this.config.extensionConfig)?{}:this.config.extensionConfig,this.config.extensionConfig.NotificationManager=this._notificationManager,this.logger=new o.DiagnosticLogger(e),t.forEach(function(e){if(n.CoreUtils.isNullOrUndefined(e.initialize))throw Error(l)}),this.config.extensions.length>0){var a=!0;if(this.config.extensions.forEach(function(e){n.CoreUtils.isNullOrUndefined(e)&&(a=!1)}),!a)throw Error(l)}(u=this._extensions).push.apply(u,[this._channelController].concat(t,this.config.extensions)),this._extensions=this._extensions.sort(function(e,t){var i=e,n=t,r=typeof i.processTelemetry,o=typeof n.processTelemetry;return"function"===r&&"function"===o?i.priority-n.priority:"function"===r&&"function"!==o?1:"function"!==r&&"function"===o?-1:void 0});var s={};this._extensions.forEach(function(e){var t=e;t&&t.priority&&(n.CoreUtils.isNullOrUndefined(s[t.priority])?s[t.priority]=t.identifier:i.logger.warnToConsole("Two extensions have same priority"+s[t.priority]+", "+t.identifier))}),this._extensions.forEach(function(e){e&&e.priority<=c&&e.initialize(i.config,i,i._extensions)});for(var u,p=-1,d=0;d<this._extensions.length-1;d++){var f=this._extensions[d];if(!f||"function"==typeof f.processTelemetry){if(f.priority===c){p=d+1;break}this._extensions[d].setNextPlugin(this._extensions[d+1])}}if(p<this._extensions.length&&this._extensions.splice(p),0===this.getTransmissionControls().length)throw new Error("No channels available");this._isInitialized=!0},e.prototype.getTransmissionControls=function(){return this._channelController.ChannelControls},e.prototype.track=function(e){if(null===e)throw this._notifiyInvalidEvent(e),Error("Invalid telemetry item");if(e.baseData&&!e.baseType)throw this._notifiyInvalidEvent(e),Error("Provide data.baseType for data.baseData");e.baseType||(e.baseType="EventData"),e.instrumentationKey||(e.instrumentationKey=this.config.instrumentationKey),e.timestamp||(e.timestamp=new Date),this._validateTelmetryItem(e);for(var t=0;t<this._extensions.length;){if(this._extensions[t].processTelemetry){this._extensions[t].processTelemetry(e);break}t++}},e.prototype.addNotificationListener=function(e){this._notificationManager.addNotificationListener(e)},e.prototype.removeNotificationListener=function(e){this._notificationManager.removeNotificationListener(e)},e.prototype.pollInternalLogs=function(){var e=this;if(!(this.config.diagnosticLoggingInterval>0))throw Error("config.diagnosticLoggingInterval must be a positive integer");return setInterval(function(){var t=e.logger.queue;t.forEach(function(t){var i={name:"InternalMessageId: "+t.messageId,instrumentationKey:e.config.instrumentationKey,timestamp:new Date,baseType:o._InternalLogMessage.dataType,baseData:{message:t.message}};e.track(i)}),t.length=0},this.config.diagnosticLoggingInterval)},e.prototype._validateTelmetryItem=function(e){if(n.CoreUtils.isNullOrUndefined(e.name))throw this._notifiyInvalidEvent(e),Error("telemetry name required");if(n.CoreUtils.isNullOrUndefined(e.timestamp))throw this._notifiyInvalidEvent(e),Error("telemetry timestamp required");if(n.CoreUtils.isNullOrUndefined(e.instrumentationKey))throw this._notifiyInvalidEvent(e),Error("telemetry instrumentationKey required")},e.prototype._notifiyInvalidEvent=function(e){this._notificationManager.eventsDiscarded([e],i.EventsDiscardedReason.InvalidEvent)},e}();t.AppInsightsCore=a;var s=function(){function e(){this.identifier="ChannelControllerPlugin",this.priority=c}return e.prototype.processTelemetry=function(e){this.channelQueue.forEach(function(t){t.length>0&&t[0].processTelemetry(e)})},Object.defineProperty(e.prototype,"ChannelControls",{get:function(){return this.channelQueue},enumerable:!0,configurable:!0}),e.prototype.initialize=function(e,t,i){var n=this;if(this.channelQueue=new Array,e.channels)e.channels.forEach(function(r){if(r&&r.length>0){(r=r.sort(function(e,t){return e.priority-t.priority})).forEach(function(n){return n.initialize(e,t,i)});for(var o=1;o<r.length;o++)r[o-1].setNextPlugin(r[o]);n.channelQueue.push(r)}});else{for(var r=new Array,o=0;o<i.length;o++){var a=i[o];a.priority>c&&r.push(a)}if(r.length>0){(r=r.sort(function(e,t){return e.priority-t.priority})).forEach(function(n){return n.initialize(e,t,i)});for(o=1;o<r.length;o++)r[o-1].setNextPlugin(r[o]);this.channelQueue.push(r)}}},e}(),l="Extensions must provide callback to initialize",c=200}.apply(t,n))||(e.exports=r)},function(e,t,i){var n,r,o=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();n=[i,t,i(25),i(3)],void 0===(r=function(e,t,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.aiDataContract={name:n.FieldType.Required,kind:n.FieldType.Default,value:n.FieldType.Required,count:n.FieldType.Default,min:n.FieldType.Default,max:n.FieldType.Default,stdDev:n.FieldType.Default},t}return o(t,e),t}(i.DataPoint);t.DataPoint=r}.apply(t,n))||(e.exports=r)},function(e,t,i){var n,r;n=[i,t,i(26)],void 0===(r=function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){return function(){this.kind=i.DataPointType.Measurement}}();t.DataPoint=n}.apply(t,n))||(e.exports=r)},function(e,t,i){var n;void 0===(n=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e[e.Measurement=0]="Measurement",e[e.Aggregation=1]="Aggregation"}(t.DataPointType||(t.DataPointType={}))}.apply(t,[i,t]))||(e.exports=n)},function(e,t,i){var n;void 0===(n=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DisabledPropertyName="Microsoft_ApplicationInsights_BypassAjaxInstrumentation"}.apply(t,[i,t]))||(e.exports=n)},function(e,t,i){var n,r,o=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();n=[i,t,i(29),i(4),i(3),i(2)],void 0===(r=function(e,t,i,n,r,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s=function(e){function t(t,i,o){var s=e.call(this)||this;return s.name=n.DataSanitizer.sanitizeString(t,o)||a.Util.NotSpecified,s.data=i,s.time=a.Util.toISOStringForIE8(new Date),s.aiDataContract={time:r.FieldType.Required,iKey:r.FieldType.Required,name:r.FieldType.Required,sampleRate:function(){return 100==s.sampleRate?r.FieldType.Hidden:r.FieldType.Required},tags:r.FieldType.Required,data:r.FieldType.Required},s}return o(t,e),t}(i.Envelope);t.Envelope=s}.apply(t,n))||(e.exports=r)},function(e,t,i){var n;void 0===(n=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){return function(){this.ver=1,this.sampleRate=100,this.tags={}}}();t.Envelope=i}.apply(t,[i,t]))||(e.exports=n)},function(e,t,i){var n,r,o=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();n=[i,t,i(16),i(4),i(3),i(2)],void 0===(r=function(e,t,i,n,r,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s=function(e){function t(t,i,o,s){var l=e.call(this)||this;return l.aiDataContract={ver:r.FieldType.Required,name:r.FieldType.Required,properties:r.FieldType.Default,measurements:r.FieldType.Default},l.name=n.DataSanitizer.sanitizeString(t,i)||a.Util.NotSpecified,l.properties=n.DataSanitizer.sanitizeProperties(t,o),l.measurements=n.DataSanitizer.sanitizeMeasurements(t,s),l}return o(t,e),t.envelopeType="Microsoft.ApplicationInsights.{0}.Event",t.dataType="EventData",t}(i.EventData);t.Event=s}.apply(t,n))||(e.exports=r)},function(e,t,i){var n,r,o=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();n=[i,t,i(32),i(33),i(34),i(4),i(3),i(2)],void 0===(r=function(e,t,i,n,r,a,s,l){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var c=function(e){function t(t,i,n,r,o){var l=e.call(this)||this;return l.aiDataContract={ver:s.FieldType.Required,exceptions:s.FieldType.Required,severityLevel:s.FieldType.Default,properties:s.FieldType.Default,measurements:s.FieldType.Default},l.properties=a.DataSanitizer.sanitizeProperties(t,n),l.measurements=a.DataSanitizer.sanitizeMeasurements(t,r),l.exceptions=[new u(t,i)],o&&(l.severityLevel=o),l}return o(t,e),t.CreateSimpleException=function(e,t,i,n,r,o){return{exceptions:[{hasFullStack:!0,message:e,stack:r,typeName:t}]}},t.envelopeType="Microsoft.ApplicationInsights.{0}.Exception",t.dataType="ExceptionData",t}(n.ExceptionData);t.Exception=c;var u=function(e){function t(t,i){var n=e.call(this)||this;n.aiDataContract={id:s.FieldType.Default,outerId:s.FieldType.Default,typeName:s.FieldType.Required,message:s.FieldType.Required,hasFullStack:s.FieldType.Default,stack:s.FieldType.Default,parsedStack:s.FieldType.Array},n.typeName=a.DataSanitizer.sanitizeString(t,i.name)||l.Util.NotSpecified,n.message=a.DataSanitizer.sanitizeMessage(t,i.message)||l.Util.NotSpecified;var r=i.stack;return n.parsedStack=n.parseStack(r),n.stack=a.DataSanitizer.sanitizeException(t,r),n.hasFullStack=l.Util.isArray(n.parsedStack)&&n.parsedStack.length>0,n}return o(t,e),t.prototype.parseStack=function(e){var t=void 0;if("string"==typeof e){var i=e.split("\n");t=[];for(var n=0,r=0,o=0;o<=i.length;o++){var a=i[o];if(p.regex.test(a)){var s=new p(i[o],n++);r+=s.sizeInBytes,t.push(s)}}if(r>32768)for(var l=0,c=t.length-1,u=0,d=l,f=c;l<c;){if((u+=t[l].sizeInBytes+t[c].sizeInBytes)>32768){var g=f-d+1;t.splice(d,g);break}d=l,f=c,l++,c--}}return t},t}(r.ExceptionDetails),p=function(e){function t(i,n){var r=e.call(this)||this;r.sizeInBytes=0,r.aiDataContract={level:s.FieldType.Required,method:s.FieldType.Required,assembly:s.FieldType.Default,fileName:s.FieldType.Default,line:s.FieldType.Default},r.level=n,r.method="<no_method>",r.assembly=l.Util.trim(i);var o=i.match(t.regex);return o&&o.length>=5&&(r.method=l.Util.trim(o[2])||r.method,r.fileName=l.Util.trim(o[4]),r.line=parseInt(o[5])||0),r.sizeInBytes+=r.method.length,r.sizeInBytes+=r.fileName.length,r.sizeInBytes+=r.assembly.length,r.sizeInBytes+=t.baseSize,r.sizeInBytes+=r.level.toString().length,r.sizeInBytes+=r.line.toString().length,r}return o(t,e),t.regex=/^([\s]+at)?(.*?)(\@|\s\(|\s)([^\(\@\n]+):([0-9]+):([0-9]+)(\)?)$/,t.baseSize=58,t}(i.StackFrame);t._StackFrame=p}.apply(t,n))||(e.exports=r)},function(e,t,i){var n;void 0===(n=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){return function(){}}();t.StackFrame=i}.apply(t,[i,t]))||(e.exports=n)},function(e,t,i){var n,r,o=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();n=[i,t,i(5)],void 0===(r=function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e){function t(){var t=e.call(this)||this;return t.ver=2,t.exceptions=[],t.properties={},t.measurements={},t}return o(t,e),t}(i.Domain);t.ExceptionData=n}.apply(t,n))||(e.exports=r)},function(e,t,i){var n;void 0===(n=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){return function(){this.hasFullStack=!0,this.parsedStack=[]}}();t.ExceptionDetails=i}.apply(t,[i,t]))||(e.exports=n)},function(e,t,i){var n,r,o=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();n=[i,t,i(7),i(4),i(3),i(2)],void 0===(r=function(e,t,i,n,r,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s=function(e){function t(t,i,o,s,l,c,u){var p=e.call(this)||this;return p.aiDataContract={ver:r.FieldType.Required,name:r.FieldType.Default,url:r.FieldType.Default,duration:r.FieldType.Default,properties:r.FieldType.Default,measurements:r.FieldType.Default,id:r.FieldType.Default},p.id=n.DataSanitizer.sanitizeId(t,u),p.url=n.DataSanitizer.sanitizeUrl(t,o),p.name=n.DataSanitizer.sanitizeString(t,i)||a.Util.NotSpecified,isNaN(s)||(p.duration=a.Util.msToTimeSpan(s)),p.properties=n.DataSanitizer.sanitizeProperties(t,l),p.measurements=n.DataSanitizer.sanitizeMeasurements(t,c),p}return o(t,e),t.envelopeType="Microsoft.ApplicationInsights.{0}.Pageview",t.dataType="PageviewData",t}(i.PageViewData);t.PageView=s}.apply(t,n))||(e.exports=r)},function(e,t,i){var n,r,o=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();n=[i,t,i(4),i(3),i(2),i(2),i(37)],void 0===(r=function(e,t,i,n,r,a,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var l=function(e){function t(t,o,s,l,c,u,p,d,f,g){var h=e.call(this)||this;h.aiDataContract={id:n.FieldType.Required,ver:n.FieldType.Required,name:n.FieldType.Default,resultCode:n.FieldType.Default,duration:n.FieldType.Default,success:n.FieldType.Default,data:n.FieldType.Default,target:n.FieldType.Default,type:n.FieldType.Default,properties:n.FieldType.Default,measurements:n.FieldType.Default,kind:n.FieldType.Default,value:n.FieldType.Default,count:n.FieldType.Default,min:n.FieldType.Default,max:n.FieldType.Default,stdDev:n.FieldType.Default,dependencyKind:n.FieldType.Default,dependencySource:n.FieldType.Default,commandName:n.FieldType.Default,dependencyTypeName:n.FieldType.Default},h.id=o,h.duration=r.Util.msToTimeSpan(c),h.success=u,h.resultCode=p+"",h.type="Ajax",h.data=i.DataSanitizer.sanitizeUrl(t,l);var y=a.AjaxHelper.ParseDependencyPath(t,s,d,l);return h.target=y.target,h.name=y.name,h.properties=i.DataSanitizer.sanitizeProperties(t,f),h.measurements=i.DataSanitizer.sanitizeMeasurements(t,g),h}return o(t,e),t.envelopeType="Microsoft.ApplicationInsights.{0}.RemoteDependency",t.dataType="RemoteDependencyData",t}(s.RemoteDependencyData);t.RemoteDependencyData=l}.apply(t,n))||(e.exports=r)},function(e,t,i){var n,r,o=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();n=[i,t,i(5)],void 0===(r=function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e){function t(){var t=e.call(this)||this;return t.ver=2,t.success=!0,t.properties={},t.measurements={},t}return o(t,e),t}(i.Domain);t.RemoteDependencyData=n}.apply(t,n))||(e.exports=r)},function(e,t,i){var n,r,o=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();n=[i,t,i(39),i(4),i(3),i(2)],void 0===(r=function(e,t,i,n,r,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s=function(e){function t(t,i,o,s){var l=e.call(this)||this;return l.aiDataContract={ver:r.FieldType.Required,message:r.FieldType.Required,severityLevel:r.FieldType.Default,properties:r.FieldType.Default},i=i||a.Util.NotSpecified,l.message=n.DataSanitizer.sanitizeMessage(t,i),l.properties=n.DataSanitizer.sanitizeProperties(t,o),s&&(l.severityLevel=s),l}return o(t,e),t.envelopeType="Microsoft.ApplicationInsights.{0}.Message",t.dataType="MessageData",t}(i.MessageData);t.Trace=s}.apply(t,n))||(e.exports=r)},function(e,t,i){var n,r,o=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();n=[i,t,i(5)],void 0===(r=function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e){function t(){var t=e.call(this)||this;return t.ver=2,t.properties={},t}return o(t,e),t}(i.Domain);t.MessageData=n}.apply(t,n))||(e.exports=r)},function(e,t,i){var n,r,o=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();n=[i,t,i(41),i(3),i(4),i(2),i(0)],void 0===(r=function(e,t,i,n,r,a,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var l=function(e){function t(i,o,l,c,u,p){var d=e.call(this)||this;d.aiDataContract={ver:n.FieldType.Required,name:n.FieldType.Default,url:n.FieldType.Default,duration:n.FieldType.Default,perfTotal:n.FieldType.Default,networkConnect:n.FieldType.Default,sentRequest:n.FieldType.Default,receivedResponse:n.FieldType.Default,domProcessing:n.FieldType.Default,properties:n.FieldType.Default,measurements:n.FieldType.Default},d.isValid=!1;var f=t.getPerformanceTiming();if(f){var g=t.getDuration(f.navigationStart,f.loadEventEnd),h=t.getDuration(f.navigationStart,f.connectEnd),y=t.getDuration(f.requestStart,f.responseStart),v=t.getDuration(f.responseStart,f.responseEnd),m=t.getDuration(f.responseEnd,f.loadEventEnd);0==g?i.throwInternal(s.LoggingSeverity.WARNING,s._InternalMessageId.ErrorPVCalc,"error calculating page view performance.",{total:g,network:h,request:y,response:v,dom:m}):t.shouldCollectDuration(g,h,y,v,m)?g<Math.floor(h)+Math.floor(y)+Math.floor(v)+Math.floor(m)?i.throwInternal(s.LoggingSeverity.WARNING,s._InternalMessageId.ClientPerformanceMathError,"client performance math error.",{total:g,network:h,request:y,response:v,dom:m}):(d.durationMs=g,d.perfTotal=d.duration=a.Util.msToTimeSpan(g),d.networkConnect=a.Util.msToTimeSpan(h),d.sentRequest=a.Util.msToTimeSpan(y),d.receivedResponse=a.Util.msToTimeSpan(v),d.domProcessing=a.Util.msToTimeSpan(m),d.isValid=!0):i.throwInternal(s.LoggingSeverity.WARNING,s._InternalMessageId.InvalidDurationValue,"Invalid page load duration value. Browser perf data won't be sent.",{total:g,network:h,request:y,response:v,dom:m})}return d.url=r.DataSanitizer.sanitizeUrl(i,l),d.name=r.DataSanitizer.sanitizeString(i,o)||a.Util.NotSpecified,d.properties=r.DataSanitizer.sanitizeProperties(i,u),d.measurements=r.DataSanitizer.sanitizeMeasurements(i,p),d}return o(t,e),t.prototype.getIsValid=function(){return this.isValid},t.prototype.getDurationMs=function(){return this.durationMs},t.getPerformanceTiming=function(){return t.isPerformanceTimingSupported()?window.performance.timing:null},t.isPerformanceTimingSupported=function(){return"undefined"!=typeof window&&window.performance&&window.performance.timing},t.isPerformanceTimingDataReady=function(){var e=window.performance.timing;return e.domainLookupStart>0&&e.navigationStart>0&&e.responseStart>0&&e.requestStart>0&&e.loadEventEnd>0&&e.responseEnd>0&&e.connectEnd>0&&e.domLoading>0},t.getDuration=function(e,t){var i=void 0;return isNaN(e)||isNaN(t)||(i=Math.max(t-e,0)),i},t.shouldCollectDuration=function(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];var n=["googlebot","adsbot-google","apis-google","mediapartners-google"],r=navigator.userAgent,o=!1;if(r)for(var a=0;a<n.length;a++)o=o||-1!==r.toLowerCase().indexOf(n[a]);if(o)return!1;for(var s=0;s<e.length;s++)if(e[s]>=t.MAX_DURATION_ALLOWED)return!1;return!0},t.envelopeType="Microsoft.ApplicationInsights.{0}.PageviewPerformance",t.dataType="PageviewPerformanceData",t.MAX_DURATION_ALLOWED=36e5,t}(i.PageViewPerfData);t.PageViewPerformance=l}.apply(t,n))||(e.exports=r)},function(e,t,i){var n,r,o=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();n=[i,t,i(7)],void 0===(r=function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e){function t(){var t=e.call(this)||this;return t.ver=2,t.properties={},t.measurements={},t}return o(t,e),t}(i.PageViewData);t.PageViewPerfData=n}.apply(t,n))||(e.exports=r)},function(e,t,i){var n,r,o=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();n=[i,t,i(14),i(3)],void 0===(r=function(e,t,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){function t(t,i){var r=e.call(this)||this;return r.aiDataContract={baseType:n.FieldType.Required,baseData:n.FieldType.Required},r.baseType=t,r.baseData=i,r}return o(t,e),t}(i.Data);t.Data=r}.apply(t,n))||(e.exports=r)},function(e,t,i){var n;void 0===(n=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e[e.Verbose=0]="Verbose",e[e.Information=1]="Information",e[e.Warning=2]="Warning",e[e.Error=3]="Error",e[e.Critical=4]="Critical"}(t.SeverityLevel||(t.SeverityLevel={}))}.apply(t,[i,t]))||(e.exports=n)},function(e,t,i){var n;void 0===(n=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){return 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.internalSdkVersion="ai.internal.sdkVersion",this.internalAgentVersion="ai.internal.agentVersion",this.internalNodeName="ai.internal.nodeName"}}();t.ContextTagKeys=i}.apply(t,[i,t]))||(e.exports=n)},function(e,t,i){var n,r;n=[i,t,i(2),i(4),i(0)],void 0===(r=function(e,t,i,n,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(){}return e.create=function(e,t,o,a,s,l){if(o=n.DataSanitizer.sanitizeString(a,o)||i.Util.NotSpecified,r.CoreUtils.isNullOrUndefined(e)||r.CoreUtils.isNullOrUndefined(t)||r.CoreUtils.isNullOrUndefined(o))throw Error("Input doesn't contain all required fields");var c={name:o,timestamp:new Date,instrumentationKey:"",ctx:l||{},tags:[],data:{},baseType:t,baseData:e};if(!r.CoreUtils.isNullOrUndefined(s))for(var u in s)s.hasOwnProperty(u)&&(c.data[u]=s[u]);return c},e}();t.TelemetryItemCreator=o}.apply(t,n))||(e.exports=r)},function(e,t,i){var n,r;n=[i,t,i(1),i(0)],void 0===(r=function(e,t,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t,i){this.pageViewPerformanceSent=!1,this.overridePageViewDuration=!1,this.overridePageViewDuration=t,this.appInsights=e,i&&(this._channel=function(){return i.getTransmissionControls()},this._logger=i.logger)}return e.prototype.trackPageView=function(e,t){var r=this,o=e.name;(n.CoreUtils.isNullOrUndefined(o)||"string"!=typeof o)&&(e.name=window.document&&window.document.title||"");var a=e.uri;if((n.CoreUtils.isNullOrUndefined(a)||"string"!=typeof a)&&(e.uri=window.location&&window.location.href||""),!i.PageViewPerformance.isPerformanceTimingSupported())return this.appInsights.sendPageViewInternal(e,t),this._channel().forEach(function(e){e.forEach(function(e){return e.flush(!0)})}),void this._logger.throwInternal(n.LoggingSeverity.WARNING,n._InternalMessageId.NavigationTimingNotSupported,"trackPageView: navigation timing API used for calculation of page duration is not supported in this browser. This page view will be collected without duration and timing info.");var s=!1,l=void 0,c=i.PageViewPerformance.getPerformanceTiming().navigationStart;l=i.PageViewPerformance.getDuration(c,+new Date),i.PageViewPerformance.shouldCollectDuration(l)||(l=void 0);var u=void 0;n.CoreUtils.isNullOrUndefined(t)||n.CoreUtils.isNullOrUndefined(t.duration)||(u=t.duration),!this.overridePageViewDuration&&isNaN(u)||(isNaN(u)&&(t||(t={}),t.duration=l),this.appInsights.sendPageViewInternal(e,t),this._channel().forEach(function(e){e.forEach(function(e){return e.flush(!0)})}),s=!0);t||(t={});var p=setInterval(function(){try{if(i.PageViewPerformance.isPerformanceTimingDataReady()){clearInterval(p);var u=new i.PageViewPerformance(r._logger,o,a,null);u.getIsValid()||s?(s||(t.duration=u.getDurationMs(),r.appInsights.sendPageViewInternal(e,t)),r.pageViewPerformanceSent||(r.appInsights.sendPageViewPerformanceInternal(u,t),r.pageViewPerformanceSent=!0),r._channel().forEach(function(e){e.forEach(function(e){return e.flush(!0)})})):(t.duration=l,r.appInsights.sendPageViewInternal(e,t),r._channel().forEach(function(e){e.forEach(function(e){return e.flush(!0)})}))}else i.PageViewPerformance.getDuration(c,+new Date)>6e4&&(clearInterval(p),s||(t.duration=6e4,r.appInsights.sendPageViewInternal(e,t),r._channel().forEach(function(e){e.forEach(function(e){return e.flush(!0)})})))}catch(e){r._logger.throwInternal(n.LoggingSeverity.CRITICAL,n._InternalMessageId.TrackPVFailedCalc,"trackPageView failed on page load calculation: "+i.Util.getExceptionName(e),{exception:i.Util.dump(e)})}},100)},e}();t.PageViewManager=r}.apply(t,n))||(e.exports=r)},function(e,t,i){var n,r;n=[i,t,i(0),i(8),i(1),i(48),i(60),i(72)],void 0===(r=function(e,t,i,n,r,o,a,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(t){t.queue=t.queue||[];var i=t.config||{};i&&!i.instrumentationKey&&(i=t,n.ApplicationInsights.Version="2.0.0"),this.appInsights=new n.ApplicationInsights,i=e.getDefaultConfig(i,this.appInsights.identifier),this.properties=new a.PropertiesPlugin,this.dependencies=new s.AjaxPlugin,this.snippet=t,this.config=i}return e.prototype.trackPageView=function(e,t){this.appInsights.trackPageView(e,t)},e.prototype.trackException=function(e,t){this.appInsights.trackException(e,t)},e.prototype._onerror=function(e){this.appInsights._onerror(e)},e.prototype.trackTrace=function(e,t){this.appInsights.trackTrace(e,t)},e.prototype.trackMetric=function(e,t){this.appInsights.trackMetric(e,t)},e.prototype.startTrackPage=function(e){this.appInsights.startTrackPage(e)},e.prototype.stopTrackPage=function(e,t,i){this.appInsights.stopTrackPage(e,t,i)},e.prototype.addTelemetryInitializer=function(e){return this.appInsights.addTelemetryInitializer(e)},e.prototype.setAuthenticatedUserContext=function(e,t,i){void 0===i&&(i=!1),this.properties.user.setAuthenticatedUserContext(e,t,i)},e.prototype.clearAuthenticatedUserContext=function(){this.properties.user.clearAuthenticatedUserContext()},e.prototype.trackDependencyData=function(e,t,i){this.dependencies.trackDependencyData(e,t,i)},e.prototype.loadAppInsights=function(){this.core=new i.AppInsightsCore;var e=[],t=new o.Sender;return e.push(t),e.push(this.properties),e.push(this.dependencies),e.push(this.appInsights),this.core.initialize(this.config,e),this.appInsights.initialize(this.config,this.core,e),t.initialize(this.config,this.core,e),this},e.prototype.emptyQueue=function(){try{if(r.Util.isArray(this.snippet.queue)){for(var e=this.snippet.queue.length,t=0;t<e;t++){(0,this.snippet.queue[t])()}this.snippet.queue=void 0,delete this.snippet.queue}}catch(e){e&&"function"==typeof e.toString&&e.toString()}},e.prototype.pollInteralLogs=function(e){},e.prototype.addHousekeepingBeforeUnload=function(e){if(!e.appInsights.config.disableFlushOnBeforeUnload&&"onbeforeunload"in window){r.Util.addEventHandler("beforeunload",function(){e.appInsights.core.getTransmissionControls().forEach(function(e){e.forEach(function(e){return e.flush(!0)})}),this.core.extensions.AppInsightsPropertiesPlugin&&this.core.extensions.AppInsightsPropertiesPlugin._sessionManager&&this.core.extensions.AppInsightsPropertiesPlugin._sessionManager.backup()})||this.core.logger.throwInternal(i.LoggingSeverity.CRITICAL,i._InternalMessageId.FailedToAddHandlerForOnBeforeUnload,"Could not add handler for beforeunload")}},e.getDefaultConfig=function(e,t){e||(e={}),e&&(t=t||"ApplicationInsightsAnalytics");var i=e.extensions?e.extensions[t]:{};return e.endpointUrl=e.endpointUrl||"https://dc.services.visualstudio.com/v2/track",i.sessionRenewalMs=18e5,i.sessionExpirationMs=864e5,i.enableDebug=r.Util.stringToBoolOrDefault(i.enableDebug),i.disableExceptionTracking=r.Util.stringToBoolOrDefault(i.disableExceptionTracking),i.consoleLoggingLevel=i.consoleLoggingLevel||1,i.telemetryLoggingLevel=i.telemetryLoggingLevel||0,i.diagnosticLogInterval=i.diagnosticLogInterval||1e4,i.autoTrackPageVisitTime=r.Util.stringToBoolOrDefault(i.autoTrackPageVisitTime),(isNaN(i.samplingPercentage)||i.samplingPercentage<=0||i.samplingPercentage>=100)&&(i.samplingPercentage=100),i.disableAjaxTracking=r.Util.stringToBoolOrDefault(i.disableAjaxTracking),i.maxAjaxCallsPerView=isNaN(i.maxAjaxCallsPerView)?500:i.maxAjaxCallsPerView,i.disableCorrelationHeaders=r.Util.stringToBoolOrDefault(i.disableCorrelationHeaders),i.correlationHeaderExcludedDomains=i.correlationHeaderExcludedDomains||["*.blob.core.windows.net","*.blob.core.chinacloudapi.cn","*.blob.core.cloudapi.de","*.blob.core.usgovcloudapi.net"],i.disableFlushOnBeforeUnload=r.Util.stringToBoolOrDefault(i.disableFlushOnBeforeUnload),i.isCookieUseDisabled=r.Util.stringToBoolOrDefault(i.isCookieUseDisabled),i.isStorageUseDisabled=r.Util.stringToBoolOrDefault(i.isStorageUseDisabled),i.isBrowserLinkTrackingEnabled=r.Util.stringToBoolOrDefault(i.isBrowserLinkTrackingEnabled),i.enableCorsCorrelation=r.Util.stringToBoolOrDefault(i.enableCorsCorrelation),e},e}();t.Initialization=l}.apply(t,n))||(e.exports=r)},function(e,t,i){var n,r;n=[i,t,i(49)],void 0===(r=function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sender=i.Sender}.apply(t,n))||(e.exports=r)},function(e,t,i){var n,r;n=[i,t,i(51),i(52),i(53),i(54),i(55),i(56),i(50),i(57),i(58),i(59),i(1),i(0),i(0)],void 0===(r=function(e,t,i,n,r,o,a,s,l,c,u,p,d,f,g){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var h=function(){function e(){this.priority=201,this._XMLHttpRequestSupported=!1}return e.prototype.pause=function(){throw new Error("Method not implemented.")},e.prototype.resume=function(){throw new Error("Method not implemented.")},e.prototype.flush=function(){try{this.triggerSend()}catch(e){this._logger.throwInternal(f.LoggingSeverity.CRITICAL,f._InternalMessageId.FlushFailed,"flush failed, telemetry will not be collected: "+d.Util.getExceptionName(e),{exception:d.Util.dump(e)})}},e.prototype.teardown=function(){throw new Error("Method not implemented.")},e.prototype.initialize=function(t,n,r){(this.identifier="AppInsightsChannelPlugin",this._logger=n.logger,this._serializer=new p.Serializer(n.logger),this._consecutiveErrors=0,this._retryAt=null,this._lastSend=0,this._config=e._getDefaultAppInsightsChannelConfig(t,this.identifier),this._sender=null,this._buffer=d.Util.canUseSessionStorage()&&this._config.enableSessionStorageBuffer?new i.SessionStorageSendBuffer(this._logger,this._config):new i.ArraySendBuffer(this._config),!this._config.isBeaconApiDisabled()&&d.Util.IsBeaconApiSupported())?this._sender=this._beaconSender:"undefined"!=typeof XMLHttpRequest&&("withCredentials"in new XMLHttpRequest?(this._sender=this._xhrSender,this._XMLHttpRequestSupported=!0):"undefined"!=typeof XDomainRequest&&(this._sender=this._xdrSender))},e.prototype.processTelemetry=function(t){try{if(this._config.disableTelemetry())return;if(!t)return void this._logger.throwInternal(f.LoggingSeverity.CRITICAL,f._InternalMessageId.CannotSendEmptyTelemetry,"Cannot send empty telemetry");if(!this._sender)return void this._logger.throwInternal(f.LoggingSeverity.CRITICAL,f._InternalMessageId.SenderNotInitialized,"Sender was not initialized");if(!e._validate(t))return void this._logger.throwInternal(f.LoggingSeverity.CRITICAL,f._InternalMessageId.TelemetryEnvelopeInvalid,"Invalid telemetry envelope");var i=this._constructEnvelope(t);if(!i)return void this._logger.throwInternal(f.LoggingSeverity.CRITICAL,f._InternalMessageId.CreateEnvelopeError,"Unable to create an AppInsights envelope");var n=this._serializer.serialize(i),r=this._buffer.getItems(),o=this._buffer.batchPayloads(r);o&&o.length+n.length>this._config.maxBatchSizeInBytes()&&this.triggerSend(),this._buffer.enqueue(n),this._setupTimer()}catch(e){this._logger.throwInternal(f.LoggingSeverity.WARNING,f._InternalMessageId.FailedAddingTelemetryToBuffer,"Failed adding telemetry to the sender's buffer, some telemetry will be lost: "+d.Util.getExceptionName(e),{exception:d.Util.dump(e)})}g.CoreUtils.isNullOrUndefined(this._nextPlugin)||this._nextPlugin.processTelemetry(t)},e.prototype.setNextPlugin=function(e){this._nextPlugin=e},e.prototype._xhrReadyStateChange=function(e,t,i){if(4===e.readyState){var n=null;this._appId||(n=this._parseResponse(e.responseText||e.response))&&n.appId&&(this._appId=n.appId),(e.status<200||e.status>=300)&&0!==e.status?!this._config.isRetryDisabled()&&this._isRetriable(e.status)?(this._resendPayload(t),this._logger.throwInternal(f.LoggingSeverity.WARNING,f._InternalMessageId.TransmissionFailed,". Response code "+e.status+". Will retry to send "+t.length+" items.")):this._onError(t,this._formatErrorMessageXhr(e)):206===e.status?(n||(n=this._parseResponse(e.responseText||e.response)),n&&!this._config.isRetryDisabled()?this._onPartialSuccess(t,n):this._onError(t,this._formatErrorMessageXhr(e))):(this._consecutiveErrors=0,this._onSuccess(t,i))}},e.prototype.triggerSend=function(e){void 0===e&&(e=!0);try{if(this._config.disableTelemetry())this._buffer.clear();else{if(this._buffer.count()>0){var t=this._buffer.getItems();this._sender(t,e)}this._lastSend=+new Date}clearTimeout(this._timeoutHandle),this._timeoutHandle=null,this._retryAt=null}catch(e){(!d.Util.getIEVersion()||d.Util.getIEVersion()>9)&&this._logger.throwInternal(f.LoggingSeverity.CRITICAL,f._InternalMessageId.TransmissionFailed,"Telemetry transmission failed, some telemetry will be lost: "+d.Util.getExceptionName(e),{exception:d.Util.dump(e)})}},e.prototype._onError=function(e,t,i){this._logger.throwInternal(f.LoggingSeverity.WARNING,f._InternalMessageId.OnError,"Failed to send telemetry.",{message:t}),this._buffer.clearSent(e)},e.prototype._onPartialSuccess=function(e,t){for(var i=[],n=[],r=0,o=t.errors.reverse();r<o.length;r++){var a=o[r],s=e.splice(a.index,1)[0];this._isRetriable(a.statusCode)?n.push(s):i.push(s)}e.length>0&&this._onSuccess(e,t.itemsAccepted),i.length>0&&this._onError(i,this._formatErrorMessageXhr(null,["partial success",t.itemsAccepted,"of",t.itemsReceived].join(" "))),n.length>0&&(this._resendPayload(n),this._logger.throwInternal(f.LoggingSeverity.WARNING,f._InternalMessageId.TransmissionFailed,"Partial success. Delivered: "+e.length+", Failed: "+i.length+". Will retry to send "+n.length+" our of "+t.itemsReceived+" items"))},e.prototype._onSuccess=function(e,t){this._buffer.clearSent(e)},e.prototype._xdrOnLoad=function(e,t){if(!e||e.responseText+""!="200"&&""!==e.responseText){var i=this._parseResponse(e.responseText);i&&i.itemsReceived&&i.itemsReceived>i.itemsAccepted&&!this._config.isRetryDisabled()?this._onPartialSuccess(t,i):this._onError(t,this._formatErrorMessageXdr(e))}else this._consecutiveErrors=0,this._onSuccess(t,0)},e.prototype._constructEnvelope=function(e){switch(e.baseType){case d.Event.dataType:return n.EventEnvelopeCreator.EventEnvelopeCreator.Create(this._logger,e);case d.Trace.dataType:return n.TraceEnvelopeCreator.TraceEnvelopeCreator.Create(this._logger,e);case d.PageView.dataType:return n.PageViewEnvelopeCreator.PageViewEnvelopeCreator.Create(this._logger,e);case d.PageViewPerformance.dataType:return n.PageViewPerformanceEnvelopeCreator.PageViewPerformanceEnvelopeCreator.Create(this._logger,e);case d.Exception.dataType:return n.ExceptionEnvelopeCreator.ExceptionEnvelopeCreator.Create(this._logger,e);case d.Metric.dataType:return n.MetricEnvelopeCreator.MetricEnvelopeCreator.Create(this._logger,e);case d.RemoteDependencyData.dataType:return n.DependencyEnvelopeCreator.DependencyEnvelopeCreator.Create(this._logger,e);default:return n.EventEnvelopeCreator.EventEnvelopeCreator.Create(this._logger,e)}},e._getDefaultAppInsightsChannelConfig=function(e,t){var i={},n=e.extensionConfig&&e.extensionConfig[t]?e.extensionConfig[t]:{};return i.endpointUrl=function(){return e.endpointUrl||"https://dc.services.visualstudio.com/v2/track"},i.emitLineDelimitedJson=function(){return d.Util.stringToBoolOrDefault(n.emitLineDelimitedJson)},i.maxBatchInterval=function(){return isNaN(n.maxBatchInterval)?15e3:n.maxBatchInterval},i.maxBatchSizeInBytes=function(){return n.maxBatchSizeInBytes>0?n.maxBatchSizeInBytes:102400},i.disableTelemetry=function(){return d.Util.stringToBoolOrDefault(n.disableTelemetry)},i.enableSessionStorageBuffer=function(){return d.Util.stringToBoolOrDefault(n.enableSessionStorageBuffer,!0)},i.isRetryDisabled=function(){return d.Util.stringToBoolOrDefault(n.isRetryDisabled)},i.isBeaconApiDisabled=function(){return d.Util.stringToBoolOrDefault(n.isBeaconApiDisabled,!0)},i},e._validate=function(e){switch(e.baseType){case d.Event.dataType:return r.EventValidator.EventValidator.Validate(e);case d.Trace.dataType:return o.TraceValidator.TraceValidator.Validate(e);case d.Exception.dataType:return a.ExceptionValidator.ExceptionValidator.Validate(e);case d.Metric.dataType:return s.MetricValidator.MetricValidator.Validate(e);case d.PageView.dataType:return c.PageViewValidator.PageViewValidator.Validate(e);case d.PageViewPerformance.dataType:return l.PageViewPerformanceValidator.PageViewPerformanceValidator.Validate(e);case d.RemoteDependencyData.dataType:return u.RemoteDepdencyValidator.RemoteDepdencyValidator.Validate(e);default:return r.EventValidator.EventValidator.Validate(e)}},e.prototype._beaconSender=function(e,t){var i=this._config.endpointUrl(),n=this._buffer.batchPayloads(e),r=new Blob([n],{type:"text/plain;charset=UTF-8"});navigator.sendBeacon(i,r)?this._buffer.markAsSent(e):this._logger.throwInternal(f.LoggingSeverity.CRITICAL,f._InternalMessageId.TransmissionFailed,". Failed to send telemetry with Beacon API.")},e.prototype._xhrSender=function(e,t){var i=this,n=new XMLHttpRequest;n[d.DisabledPropertyName]=!0,n.open("POST",this._config.endpointUrl(),t),n.setRequestHeader("Content-type","application/json"),d.Util.isInternalApplicationInsightsEndpoint(this._config.endpointUrl())&&n.setRequestHeader(d.RequestHeaders.sdkContextHeader,d.RequestHeaders.sdkContextHeaderAppIdRequest),n.onreadystatechange=function(){return i._xhrReadyStateChange(n,e,e.length)},n.onerror=function(t){return i._onError(e,i._formatErrorMessageXhr(n),t)};var r=this._buffer.batchPayloads(e);n.send(r),this._buffer.markAsSent(e)},e.prototype._parseResponse=function(e){try{if(e&&""!==e){var t=JSON.parse(e);if(t&&t.itemsReceived&&t.itemsReceived>=t.itemsAccepted&&t.itemsReceived-t.itemsAccepted==t.errors.length)return t}}catch(t){this._logger.throwInternal(f.LoggingSeverity.CRITICAL,f._InternalMessageId.InvalidBackendResponse,"Cannot parse the response. "+d.Util.getExceptionName(t),{response:e})}return null},e.prototype._resendPayload=function(e){if(e&&0!==e.length){this._buffer.clearSent(e),this._consecutiveErrors++;for(var t=0,i=e;t<i.length;t++){var n=i[t];this._buffer.enqueue(n)}this._setRetryTime(),this._setupTimer()}},e.prototype._setRetryTime=function(){var e;if(this._consecutiveErrors<=1)e=10;else{var t=(Math.pow(2,this._consecutiveErrors)-1)/2,i=Math.floor(Math.random()*t*10)+1;e=Math.max(Math.min(i,3600),10)}var n=Date.now()+1e3*e;this._retryAt=n},e.prototype._setupTimer=function(){var e=this;if(!this._timeoutHandle){var t=this._retryAt?Math.max(0,this._retryAt-Date.now()):0,i=Math.max(this._config.maxBatchInterval(),t);this._timeoutHandle=setTimeout(function(){e.triggerSend()},i)}},e.prototype._isRetriable=function(e){return 408==e||429==e||500==e||503==e},e.prototype._formatErrorMessageXhr=function(e,t){return e?"XMLHttpRequest,Status:"+e.status+",Response:"+e.responseText||e.response||"":t},e.prototype._xdrSender=function(e,t){var i=this,n=new XDomainRequest;n.onload=function(){return i._xdrOnLoad(n,e)},n.onerror=function(t){return i._onError(e,i._formatErrorMessageXdr(n),t)};var r=window.location.protocol;if(0!==this._config.endpointUrl().lastIndexOf(r,0))return this._logger.throwInternal(f.LoggingSeverity.WARNING,f._InternalMessageId.TransmissionFailed,". Cannot send XDomain request. The endpoint URL protocol doesn't match the hosting page protocol."),void this._buffer.clear();var o=this._config.endpointUrl().replace(/^(https?:)/,"");n.open("POST",o);var a=this._buffer.batchPayloads(e);n.send(a),this._buffer.markAsSent(e)},e.prototype._formatErrorMessageXdr=function(e,t){return e?"XDomainRequest,Response:"+e.responseText||"":t},e}();t.Sender=h}.apply(t,n))||(e.exports=r)},function(e,t,i){var n;void 0===(n=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(){}return e.prototype.Validate=function(e){return!0},e.PageViewPerformanceValidator=new e,e}();t.PageViewPerformanceValidator=i}.apply(t,[i,t]))||(e.exports=n)},function(e,t,i){var n,r;n=[i,t,i(1),i(0)],void 0===(r=function(e,t,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e){this._config=e,this._buffer=[]}return e.prototype.enqueue=function(e){this._buffer.push(e)},e.prototype.count=function(){return this._buffer.length},e.prototype.clear=function(){this._buffer.length=0},e.prototype.getItems=function(){return this._buffer.slice(0)},e.prototype.batchPayloads=function(e){return e&&e.length>0?this._config.emitLineDelimitedJson()?e.join("\n"):"["+e.join(",")+"]":null},e.prototype.markAsSent=function(e){this.clear()},e.prototype.clearSent=function(e){},e}();t.ArraySendBuffer=r;var o=function(){function e(t,i){this._bufferFullMessageSent=!1,this._logger=t,this._config=i;var n=this.getBuffer(e.BUFFER_KEY),r=this.getBuffer(e.SENT_BUFFER_KEY);this._buffer=n.concat(r),this._buffer.length>e.MAX_BUFFER_SIZE&&(this._buffer.length=e.MAX_BUFFER_SIZE),this.setBuffer(e.SENT_BUFFER_KEY,[]),this.setBuffer(e.BUFFER_KEY,this._buffer)}return e.prototype.enqueue=function(t){this._buffer.length>=e.MAX_BUFFER_SIZE?this._bufferFullMessageSent||(this._logger.throwInternal(n.LoggingSeverity.WARNING,n._InternalMessageId.SessionStorageBufferFull,"Maximum buffer size reached: "+this._buffer.length,!0),this._bufferFullMessageSent=!0):(this._buffer.push(t),this.setBuffer(e.BUFFER_KEY,this._buffer))},e.prototype.count=function(){return this._buffer.length},e.prototype.clear=function(){this._buffer.length=0,this.setBuffer(e.BUFFER_KEY,[]),this.setBuffer(e.SENT_BUFFER_KEY,[]),this._bufferFullMessageSent=!1},e.prototype.getItems=function(){return this._buffer.slice(0)},e.prototype.batchPayloads=function(e){return e&&e.length>0?this._config.emitLineDelimitedJson()?e.join("\n"):"["+e.join(",")+"]":null},e.prototype.markAsSent=function(t){this._buffer=this.removePayloadsFromBuffer(t,this._buffer),this.setBuffer(e.BUFFER_KEY,this._buffer);var i=this.getBuffer(e.SENT_BUFFER_KEY);i instanceof Array&&t instanceof Array&&((i=i.concat(t)).length>e.MAX_BUFFER_SIZE&&(this._logger.throwInternal(n.LoggingSeverity.CRITICAL,n._InternalMessageId.SessionStorageBufferFull,"Sent buffer reached its maximum size: "+i.length,!0),i.length=e.MAX_BUFFER_SIZE),this.setBuffer(e.SENT_BUFFER_KEY,i))},e.prototype.clearSent=function(t){var i=this.getBuffer(e.SENT_BUFFER_KEY);i=this.removePayloadsFromBuffer(t,i),this.setBuffer(e.SENT_BUFFER_KEY,i)},e.prototype.removePayloadsFromBuffer=function(e,t){var i=[];for(var n in t){var r=!1;for(var o in e)if(e[o]===t[n]){r=!0;break}r||i.push(t[n])}return i},e.prototype.getBuffer=function(e){try{var t=i.Util.getSessionStorage(this._logger,e);if(t){var r=JSON.parse(t);if(r)return r}}catch(t){this._logger.throwInternal(n.LoggingSeverity.CRITICAL,n._InternalMessageId.FailedToRestoreStorageBuffer," storage key: "+e+", "+i.Util.getExceptionName(t),{exception:i.Util.dump(t)})}return[]},e.prototype.setBuffer=function(e,t){try{var r=JSON.stringify(t);i.Util.setSessionStorage(this._logger,e,r)}catch(t){i.Util.setSessionStorage(this._logger,e,JSON.stringify([])),this._logger.throwInternal(n.LoggingSeverity.WARNING,n._InternalMessageId.FailedToSetStorageBuffer," storage key: "+e+", "+i.Util.getExceptionName(t)+". Buffer cleared",{exception:i.Util.dump(t)})}},e.BUFFER_KEY="AI_buffer",e.SENT_BUFFER_KEY="AI_sentBuffer",e.MAX_BUFFER_SIZE=2e3,e}();t.SessionStorageSendBuffer=o}.apply(t,n))||(e.exports=r)},function(e,t,i){var n,r,o=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();n=[i,t,i(1),i(0)],void 0===(r=function(e,t,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ContextTagKeys=["ai.application.ver","ai.application.build","ai.application.typeId","ai.application.applicationId","ai.application.layer","ai.device.id","ai.device.ip","ai.device.language","ai.device.locale","ai.device.model","ai.device.friendlyName","ai.device.network","ai.device.networkName","ai.device.oemName","ai.device.os","ai.device.osVersion","ai.device.roleInstance","ai.device.roleName","ai.device.screenResolution","ai.device.type","ai.device.machineName","ai.device.vmName","ai.device.browser","ai.device.browserVersion","ai.location.ip","ai.location.country","ai.location.province","ai.location.city","ai.operation.id","ai.operation.name","ai.operation.parentId","ai.operation.rootId","ai.operation.syntheticSource","ai.operation.correlationVector","ai.session.id","ai.session.isFirst","ai.session.isNew","ai.user.accountAcquisitionDate","ai.user.accountId","ai.user.userAgent","ai.user.id","ai.user.storeRegion","ai.user.authUserId","ai.user.anonUserAcquisitionDate","ai.user.authUserAcquisitionDate","ai.cloud.name","ai.cloud.role","ai.cloud.roleVer","ai.cloud.roleInstance","ai.cloud.environment","ai.cloud.location","ai.cloud.deploymentUnit","ai.internal.sdkVersion","ai.internal.agentVersion","ai.internal.nodeName"];var r=function(){function e(){}return e.extractProperties=function(e){var t=null;for(var i in e)if(e.hasOwnProperty(i)){var n=e[i];"number"!=typeof n&&(t||(t={}),t[i]=n)}return t},e.extractPropsAndMeasurements=function(e,t,i){if(!n.CoreUtils.isNullOrUndefined(e))for(var r in e)if(e.hasOwnProperty(r)){var o=e[r];"number"==typeof o?i[r]=o:t[r]=o}},e.createEnvelope=function(e,n,r,o){var a=new i.Envelope(e,o,n);a.iKey=r.instrumentationKey;var s=r.instrumentationKey.replace(/-/g,"");for(var l in a.name=a.name.replace("{0}",s),r.ctx)r.ctx.hasOwnProperty(l)&&t.ContextTagKeys.indexOf(l)>=0&&(a.tags[l]=r.ctx[l]);return r.tags.forEach(function(e){for(var i in e)e.hasOwnProperty(i)&&t.ContextTagKeys.indexOf(i)>=0&&(a.tags[i]=e[i])}),a},e}();t.EnvelopeCreator=r;var a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.Create=function(e,t){this._logger=e,n.CoreUtils.isNullOrUndefined(t.baseData)&&this._logger.throwInternal(n.LoggingSeverity.CRITICAL,n._InternalMessageId.TelemetryEnvelopeInvalid,"telemetryItem.baseData cannot be null.");var o={},a={};r.extractPropsAndMeasurements(t.data,a,o);var s=t.baseData;if(n.CoreUtils.isNullOrUndefined(s))return e.warnToConsole("Invalid input for dependency data"),null;var l=s.id,c=s.absoluteUrl,u=s.commandName,p=s.duration,d=s.success,f=s.resultCode,g=s.method,h=new i.RemoteDependencyData(e,l,c,u,p,d,f,g,a,o),y=new i.Data(i.RemoteDependencyData.dataType,h);return r.createEnvelope(e,i.RemoteDependencyData.envelopeType,t,y)},t.DependencyEnvelopeCreator=new t,t}(r);t.DependencyEnvelopeCreator=a;var s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.Create=function(e,t){this._logger=e,n.CoreUtils.isNullOrUndefined(t.baseData)&&this._logger.throwInternal(n.LoggingSeverity.CRITICAL,n._InternalMessageId.TelemetryEnvelopeInvalid,"telemetryItem.baseData cannot be null.");var o={},a={};t.baseType!==i.Event.dataType&&r.extractPropsAndMeasurements(t.baseData,o,a),r.extractPropsAndMeasurements(t.data,o,a);var s=t.baseData.name,l=new i.Event(e,s,o,a),c=new i.Data(i.Event.dataType,l);return r.createEnvelope(e,i.Event.envelopeType,t,c)},t.EventEnvelopeCreator=new t,t}(r);t.EventEnvelopeCreator=s;var l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.Create=function(e,t){this._logger=e,n.CoreUtils.isNullOrUndefined(t.baseData)&&this._logger.throwInternal(n.LoggingSeverity.CRITICAL,n._InternalMessageId.TelemetryEnvelopeInvalid,"telemetryItem.baseData cannot be null.");var o={},a={};r.extractPropsAndMeasurements(t.data,o,a);var s=t.baseData.error,l=t.baseData.severityLevel,c=new i.Exception(e,s,o,a,l),u=new i.Data(i.Exception.dataType,c);return r.createEnvelope(e,i.Exception.envelopeType,t,u)},t.ExceptionEnvelopeCreator=new t,t}(r);t.ExceptionEnvelopeCreator=l;var c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.Create=function(e,t){this._logger=e,n.CoreUtils.isNullOrUndefined(t.baseData)&&this._logger.throwInternal(n.LoggingSeverity.CRITICAL,n._InternalMessageId.TelemetryEnvelopeInvalid,"telemetryItem.baseData cannot be null.");var o=r.extractProperties(t.data),a=t.baseData.name,s=t.baseData.average,l=t.baseData.sampleCount,c=t.baseData.min,u=t.baseData.max,p=new i.Metric(e,a,s,l,c,u,o),d=new i.Data(i.Metric.dataType,p);return r.createEnvelope(e,i.Metric.envelopeType,t,d)},t.MetricEnvelopeCreator=new t,t}(r);t.MetricEnvelopeCreator=c;var u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.Create=function(e,t){this._logger=e,n.CoreUtils.isNullOrUndefined(t.baseData)&&this._logger.throwInternal(n.LoggingSeverity.CRITICAL,n._InternalMessageId.TelemetryEnvelopeInvalid,"telemetryItem.baseData cannot be null.");var o=void 0;n.CoreUtils.isNullOrUndefined(t.data)||n.CoreUtils.isNullOrUndefined(t.data.duration)||(o=t.data.duration,delete t.data.duration);var a={},s={};r.extractPropsAndMeasurements(t.data,a,s);var l=t.baseData.name,c=t.baseData.uri;if(n.CoreUtils.isNullOrUndefined(t.baseData.refUri)||(a.refUri=t.baseData.refUri),n.CoreUtils.isNullOrUndefined(t.baseData.pageType)||(a.pageType=t.baseData.pageType),n.CoreUtils.isNullOrUndefined(t.baseData.isLoggedIn)||(a.isLoggedIn=t.baseData.isLoggedIn),!n.CoreUtils.isNullOrUndefined(t.baseData.pageTags)){var u=t.baseData.pageTags;for(var p in u)u.hasOwnProperty(p)&&(a[p]=u[p])}var d=new i.PageView(e,l,c,o,a,s),f=new i.Data(i.PageView.dataType,d);return r.createEnvelope(e,i.PageView.envelopeType,t,f)},t.PageViewEnvelopeCreator=new t,t}(r);t.PageViewEnvelopeCreator=u;var p=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.Create=function(e,t){this._logger=e,n.CoreUtils.isNullOrUndefined(t.baseData)&&this._logger.throwInternal(n.LoggingSeverity.CRITICAL,n._InternalMessageId.TelemetryEnvelopeInvalid,"telemetryItem.baseData cannot be null.");var o={},a={};r.extractPropsAndMeasurements(t.data,o,a);var s=t.baseData.name,l=t.baseData.uri,c=t.baseData.duration,u=new i.PageViewPerformance(e,s,l,c,o,a),p=new i.Data(i.PageViewPerformance.dataType,u);return r.createEnvelope(e,i.PageViewPerformance.envelopeType,t,p)},t.PageViewPerformanceEnvelopeCreator=new t,t}(r);t.PageViewPerformanceEnvelopeCreator=p;var d=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.Create=function(e,t){this._logger=e,n.CoreUtils.isNullOrUndefined(t.baseData)&&this._logger.throwInternal(n.LoggingSeverity.CRITICAL,n._InternalMessageId.TelemetryEnvelopeInvalid,"telemetryItem.baseData cannot be null.");var o=t.baseData.message,a=t.baseData.severityLevel,s=r.extractProperties(t.data),l=new i.Trace(e,o,s,a),c=new i.Data(i.Trace.dataType,l);return r.createEnvelope(e,i.Trace.envelopeType,t,c)},t.TraceEnvelopeCreator=new t,t}(r);t.TraceEnvelopeCreator=d}.apply(t,n))||(e.exports=r)},function(e,t,i){var n;void 0===(n=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(){}return e.prototype.Validate=function(e){return!0},e.EventValidator=new e,e}();t.EventValidator=i}.apply(t,[i,t]))||(e.exports=n)},function(e,t,i){var n;void 0===(n=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(){}return e.prototype.Validate=function(e){return!0},e.TraceValidator=new e,e}();t.TraceValidator=i}.apply(t,[i,t]))||(e.exports=n)},function(e,t,i){var n;void 0===(n=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(){}return e.prototype.Validate=function(e){return!0},e._validateExceptions=function(e){return!0},e.ExceptionValidator=new e,e}();t.ExceptionValidator=i}.apply(t,[i,t]))||(e.exports=n)},function(e,t,i){var n;void 0===(n=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(){}return e.prototype.Validate=function(e){return!0},e.MetricValidator=new e,e}();t.MetricValidator=i}.apply(t,[i,t]))||(e.exports=n)},function(e,t,i){var n;void 0===(n=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(){}return e.prototype.Validate=function(e){return!0},e.PageViewValidator=new e,e}();t.PageViewValidator=i}.apply(t,[i,t]))||(e.exports=n)},function(e,t,i){var n;void 0===(n=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(){}return e.prototype.Validate=function(e){return!0},e.RemoteDepdencyValidator=new e,e}();t.RemoteDepdencyValidator=i}.apply(t,[i,t]))||(e.exports=n)},function(e,t,i){var n,r;n=[i,t,i(1),i(0)],void 0===(r=function(e,t,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e){this._logger=e}return e.prototype.serialize=function(e){var t=this._serializeObject(e,"root");return JSON.stringify(t)},e.prototype._serializeObject=function(e,t){var r={};if(!e)return this._logger.throwInternal(n.LoggingSeverity.CRITICAL,n._InternalMessageId.CannotSerializeObject,"cannot serialize object because it is null or undefined",{name:t},!0),r;if(e.__aiCircularRefCheck)return this._logger.throwInternal(n.LoggingSeverity.WARNING,n._InternalMessageId.CircularReferenceDetected,"Circular reference detected while serializing object",{name:t},!0),r;if(!e.aiDataContract){if("measurements"===t)r=this._serializeStringMap(e,"number",t);else if("properties"===t)r=this._serializeStringMap(e,"string",t);else if("tags"===t)r=this._serializeStringMap(e,"string",t);else if(i.Util.isArray(e))r=this._serializeArray(e,t);else{this._logger.throwInternal(n.LoggingSeverity.WARNING,n._InternalMessageId.CannotSerializeObjectNonSerializable,"Attempting to serialize an object which does not implement ISerializable",{name:t},!0);try{JSON.stringify(e),r=e}catch(e){this._logger.throwInternal(n.LoggingSeverity.CRITICAL,n._InternalMessageId.CannotSerializeObject,e&&"function"==typeof e.toString?e.toString():"Error serializing object",null,!0)}}return r}for(var o in e.__aiCircularRefCheck=!0,e.aiDataContract){var a,s=e.aiDataContract[o],l="function"==typeof s?s()&i.FieldType.Required:s&i.FieldType.Required,c="function"==typeof s?s()&i.FieldType.Hidden:s&i.FieldType.Hidden,u=s&i.FieldType.Array,p=void 0!==e[o],d="object"==typeof e[o]&&null!==e[o];if(!l||p||u){if(!c)void 0!==(a=d?u?this._serializeArray(e[o],o):this._serializeObject(e[o],o):e[o])&&(r[o]=a)}else this._logger.throwInternal(n.LoggingSeverity.CRITICAL,n._InternalMessageId.MissingRequiredFieldSpecification,"Missing required field specification. The field is required but not present on source",{field:o,name:t})}return delete e.__aiCircularRefCheck,r},e.prototype._serializeArray=function(e,t){var r=void 0;if(e)if(i.Util.isArray(e)){r=[];for(var o=0;o<e.length;o++){var a=e[o],s=this._serializeObject(a,t+"["+o+"]");r.push(s)}}else this._logger.throwInternal(n.LoggingSeverity.CRITICAL,n._InternalMessageId.ItemNotInArray,"This field was specified as an array in the contract but the item is not an array.\r\n",{name:t},!0);return r},e.prototype._serializeStringMap=function(e,t,i){var r=void 0;if(e)for(var o in r={},e){var a=e[o];if("string"===t)void 0===a?r[o]="undefined":null===a?r[o]="null":a.toString?r[o]=a.toString():r[o]="invalid field: toString() is not defined.";else if("number"===t)if(void 0===a)r[o]="undefined";else if(null===a)r[o]="null";else{var s=parseFloat(a);isNaN(s)?r[o]="NaN":r[o]=s}else r[o]="invalid field: "+i+" is of unknown type.",this._logger.throwInternal(n.LoggingSeverity.CRITICAL,r[o],null,!0)}return r},e}();t.Serializer=r}.apply(t,n))||(e.exports=r)},function(e,t,i){var n,r;n=[i,t,i(61)],void 0===(r=function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PropertiesPlugin=i.default}.apply(t,n))||(e.exports=r)},function(e,t,i){var n,r;n=[i,t,i(0),i(1),i(63),i(64),i(62),i(65),i(66),i(67),i(68),i(69)],void 0===(r=function(e,t,i,n,r,o,a,s,l,c,u,p){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var d=function(){function e(){this.priority=170,this.identifier="AppInsightsPropertiesPlugin"}return e.prototype.initialize=function(e,t,i){var n=e.extensions&&e.extensions[this.identifier]?e.extensions[this.identifier]:{};this._extensionConfig={instrumentationKey:function(){return n.instrumentationKey},accountId:function(){return n.accountId},sessionRenewalMs:function(){return n.sessionRenewalMs},sampleRate:function(){return n.sampleRate},sessionExpirationMs:function(){return n.sessionExpirationMs},cookieDomain:function(){return n.cookieDomain},sdkExtension:function(){return n.sdkExtension},isBrowserLinkTrackingEnabled:function(){return n.isBrowserLinkTrackingEnabled},appId:function(){return n.appId}},"undefined"!=typeof window&&(this._sessionManager=new r._SessionManager(this._extensionConfig,t.logger),this.application=new o.Application,this.device=new a.Device,this.internal=new s.Internal(this._extensionConfig),this.location=new l.Location,this.user=new u.User(this._extensionConfig,t.logger),this.operation=new c.Operation,this.session=new r.Session,this.sample=new p.Sample(this._extensionConfig.sampleRate(),t.logger))},e.prototype.processTelemetry=function(e){i.CoreUtils.isNullOrUndefined(e)||(this.sample.isSampledIn(e)&&(e.name,n.PageView.envelopeType,this.session&&"string"!=typeof this.session.id&&this._sessionManager.update(),this._processTelemetryInternal(e)),i.CoreUtils.isNullOrUndefined(this._nextPlugin)||this._nextPlugin.processTelemetry(e))},e.prototype.setNextPlugin=function(e){this._nextPlugin=e},e.prototype._processTelemetryInternal=function(t){var i={};this.session&&("string"==typeof this.session.id?e._applySessionContext(i,this.session):e._applySessionContext(i,this._sessionManager.automaticSession)),e._applyApplicationContext(i,this.application),e._applyDeviceContext(i,this.device),e._applyInternalContext(i,this.internal),e._applyLocationContext(i,this.location),e._applySampleContext(i,this.sample),e._applyUserContext(i,this.user),e._applyOperationContext(i,this.operation),t.tags.push(i)},e._applySessionContext=function(e,t){if(t){var i=new n.ContextTagKeys;"string"==typeof t.id&&(e[i.sessionId]=t.id),void 0!==t.isFirst&&(e[i.sessionIsFirst]=t.isFirst)}},e._applyApplicationContext=function(e,t){if(t){var i=new n.ContextTagKeys;"string"==typeof t.ver&&(e[i.applicationVersion]=t.ver),"string"==typeof t.build&&(e[i.applicationBuild]=t.build)}},e._applyDeviceContext=function(e,t){var i=new n.ContextTagKeys;t&&("string"==typeof t.id&&(e[i.deviceId]=t.id),"string"==typeof t.ip&&(e[i.deviceIp]=t.ip),"string"==typeof t.language&&(e[i.deviceLanguage]=t.language),"string"==typeof t.locale&&(e[i.deviceLocale]=t.locale),"string"==typeof t.model&&(e[i.deviceModel]=t.model),void 0!==t.network&&(e[i.deviceNetwork]=t.network),"string"==typeof t.oemName&&(e[i.deviceOEMName]=t.oemName),"string"==typeof t.os&&(e[i.deviceOS]=t.os),"string"==typeof t.osversion&&(e[i.deviceOSVersion]=t.osversion),"string"==typeof t.resolution&&(e[i.deviceScreenResolution]=t.resolution),"string"==typeof t.type&&(e[i.deviceType]=t.type))},e._applyInternalContext=function(e,t){if(t){var i=new n.ContextTagKeys;"string"==typeof t.agentVersion&&(e[i.internalAgentVersion]=t.agentVersion),"string"==typeof t.sdkVersion&&(e[i.internalSdkVersion]=t.sdkVersion)}},e._applyLocationContext=function(e,t){if(t){var i=new n.ContextTagKeys;"string"==typeof t.ip&&(e[i.locationIp]=t.ip)}},e._applySampleContext=function(e,t){t&&(e.sampleRate=t.sampleRate)},e._applyOperationContext=function(e,t){if(t){var i=new n.ContextTagKeys;"string"==typeof t.id&&(e[i.operationId]=t.id),"string"==typeof t.name&&(e[i.operationName]=t.name),"string"==typeof t.parentId&&(e[i.operationParentId]=t.parentId),"string"==typeof t.rootId&&(e[i.operationRootId]=t.rootId),"string"==typeof t.syntheticSource&&(e[i.operationSyntheticSource]=t.syntheticSource)}},e._applyUserContext=function(e,t){if(t){var i=new n.ContextTagKeys;"string"==typeof t.accountId&&(e[i.userAccountId]=t.accountId),"string"==typeof t.agent&&(e[i.userAgent]=t.agent),"string"==typeof t.id&&(e[i.userId]=t.id),"string"==typeof t.authenticatedId&&(e[i.userAuthUserId]=t.authenticatedId),"string"==typeof t.storeRegion&&(e[i.userStoreRegion]=t.storeRegion)}},e}();t.default=d}.apply(t,n))||(e.exports=r)},function(e,t,i){var n;void 0===(n=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){return function(){this.id="browser",this.type="Browser"}}();t.Device=i}.apply(t,[i,t]))||(e.exports=n)},function(e,t,i){var n,r;n=[i,t,i(1),i(0)],void 0===(r=function(e,t,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){return function(){}}();t.Session=r;var o=function(){function e(t,i){n.CoreUtils.isNullOrUndefined(i)?this._logger=new n.DiagnosticLogger:this._logger=i,t||(t={}),"function"!=typeof t.sessionExpirationMs&&(t.sessionExpirationMs=function(){return e.acquisitionSpan}),"function"!=typeof t.sessionRenewalMs&&(t.sessionRenewalMs=function(){return e.renewalSpan}),this.config=t,this.automaticSession=new r}return e.prototype.update=function(){this.automaticSession.id||this.initializeAutomaticSession();var t=i.DateTimeUtils.Now(),n=t-this.automaticSession.acquisitionDate>this.config.sessionExpirationMs(),r=t-this.automaticSession.renewalDate>this.config.sessionRenewalMs();n||r?(this.automaticSession.isFirst=void 0,this.renew()):(!this.cookieUpdatedTimestamp||t-this.cookieUpdatedTimestamp>e.cookieUpdateInterval)&&(this.automaticSession.renewalDate=t,this.setCookie(this.automaticSession.id,this.automaticSession.acquisitionDate,this.automaticSession.renewalDate))},e.prototype.backup=function(){this.setStorage(this.automaticSession.id,this.automaticSession.acquisitionDate,this.automaticSession.renewalDate)},e.prototype.initializeAutomaticSession=function(){var e=i.Util.getCookie(this._logger,"ai_session");if(e&&"function"==typeof e.split)this.initializeAutomaticSessionWithData(e);else{var t=i.Util.getStorage(this._logger,"ai_session");t&&this.initializeAutomaticSessionWithData(t)}this.automaticSession.id||(this.automaticSession.isFirst=!0,this.renew())},e.prototype.initializeAutomaticSessionWithData=function(e){var t=e.split("|");t.length>0&&(this.automaticSession.id=t[0]);try{if(t.length>1){var r=+t[1];this.automaticSession.acquisitionDate=+new Date(r),this.automaticSession.acquisitionDate=this.automaticSession.acquisitionDate>0?this.automaticSession.acquisitionDate:0}if(t.length>2){var o=+t[2];this.automaticSession.renewalDate=+new Date(o),this.automaticSession.renewalDate=this.automaticSession.renewalDate>0?this.automaticSession.renewalDate:0}}catch(e){this._logger.throwInternal(n.LoggingSeverity.CRITICAL,n._InternalMessageId.ErrorParsingAISessionCookie,"Error parsing ai_session cookie, session will be reset: "+i.Util.getExceptionName(e),{exception:i.Util.dump(e)})}0==this.automaticSession.renewalDate&&this._logger.throwInternal(n.LoggingSeverity.WARNING,n._InternalMessageId.SessionRenewalDateIsZero,"AI session renewal date is 0, session will be reset.")},e.prototype.renew=function(){var e=i.DateTimeUtils.Now();this.automaticSession.id=i.Util.newId(),this.automaticSession.acquisitionDate=e,this.automaticSession.renewalDate=e,this.setCookie(this.automaticSession.id,this.automaticSession.acquisitionDate,this.automaticSession.renewalDate),i.Util.canUseLocalStorage()||this._logger.throwInternal(n.LoggingSeverity.WARNING,n._InternalMessageId.BrowserDoesNotSupportLocalStorage,"Browser does not support local storage. Session durations will be inaccurate.")},e.prototype.setCookie=function(e,t,n){var r=t+this.config.sessionExpirationMs(),o=n+this.config.sessionRenewalMs(),a=new Date,s=[e,t,n];r<o?a.setTime(r):a.setTime(o);var l=this.config.cookieDomain?this.config.cookieDomain():null;i.Util.setCookie(this._logger,"ai_session",s.join("|")+";expires="+a.toUTCString(),l),this.cookieUpdatedTimestamp=i.DateTimeUtils.Now()},e.prototype.setStorage=function(e,t,n){i.Util.setStorage(this._logger,"ai_session",[e,t,n].join("|"))},e.acquisitionSpan=864e5,e.renewalSpan=18e5,e.cookieUpdateInterval=6e4,e}();t._SessionManager=o}.apply(t,n))||(e.exports=r)},function(e,t,i){var n;void 0===(n=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){return function(){}}();t.Application=i}.apply(t,[i,t]))||(e.exports=n)},function(e,t,i){var n;void 0===(n=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i="2.0.1-beta",n=function(){return function(e){this.sdkVersion=(e.sdkExtension&&e.sdkExtension()?e.sdkExtension()+"_":"")+"javascript:"+i}}();t.Internal=n}.apply(t,[i,t]))||(e.exports=n)},function(e,t,i){var n;void 0===(n=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){return function(){}}();t.Location=i}.apply(t,[i,t]))||(e.exports=n)},function(e,t,i){var n,r;n=[i,t,i(1)],void 0===(r=function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){return function(){this.id=i.Util.newId(),window&&window.location&&window.location.pathname&&(this.name=window.location.pathname)}}();t.Operation=n}.apply(t,n))||(e.exports=r)},function(e,t,i){var n,r;n=[i,t,i(1),i(0)],void 0===(r=function(e,t,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(t,n){this._logger=n;var r=i.Util.getCookie(this._logger,e.userCookieName);if(r){var o=r.split(e.cookieSeparator);o.length>0&&(this.id=o[0])}if(this.config=t,!this.id){this.id=i.Util.newId();var a=new Date,s=i.Util.toISOStringForIE8(a);this.accountAcquisitionDate=s,a.setTime(a.getTime()+31536e6);var l=[this.id,s],c=this.config.cookieDomain?this.config.cookieDomain():void 0;i.Util.setCookie(this._logger,e.userCookieName,l.join(e.cookieSeparator)+";expires="+a.toUTCString(),c),i.Util.removeStorage(this._logger,"ai_session")}this.accountId=t.accountId?t.accountId():void 0;var u=i.Util.getCookie(this._logger,e.authUserCookieName);if(u){var p=(u=decodeURI(u)).split(e.cookieSeparator);p[0]&&(this.authenticatedId=p[0]),p.length>1&&p[1]&&(this.accountId=p[1])}}return e.prototype.setAuthenticatedUserContext=function(t,r,o){if(void 0===o&&(o=!1),!this.validateUserInput(t)||r&&!this.validateUserInput(r))this._logger.throwInternal(n.LoggingSeverity.WARNING,n._InternalMessageId.SetAuthContextFailedAccountName,"Setting auth user context failed. User auth/account id should be of type string, and not contain commas, semi-colons, equal signs, spaces, or vertical-bars.",!0);else{this.authenticatedId=t;var a=this.authenticatedId;r&&(this.accountId=r,a=[this.authenticatedId,this.accountId].join(e.cookieSeparator)),o&&i.Util.setCookie(this._logger,e.authUserCookieName,encodeURI(a),this.config.cookieDomain())}},e.prototype.clearAuthenticatedUserContext=function(){this.authenticatedId=null,this.accountId=null,i.Util.deleteCookie(this._logger,e.authUserCookieName)},e.prototype.validateUserInput=function(e){return!("string"!=typeof e||!e||e.match(/,|;|=| |\|/))},e.cookieSeparator="|",e.userCookieName="ai_user",e.authUserCookieName="ai_authUser",e}();t.User=r}.apply(t,n))||(e.exports=r)},function(e,t,i){var n,r;n=[i,t,i(70),i(0)],void 0===(r=function(e,t,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){this.INT_MAX_VALUE=2147483647,n.CoreUtils.isNullOrUndefined(t)?this._logger=new n.DiagnosticLogger:this._logger=t,(e>100||e<0)&&(this._logger.throwInternal(n.LoggingSeverity.WARNING,n._InternalMessageId.SampleRateOutOfRange,"Sampling rate is out of range (0..100). Sampling will be disabled, you may be sending too much data which may affect your AI service level.",{samplingRate:e},!0),this.sampleRate=100),this.sampleRate=e,this.samplingScoreGenerator=new i.SamplingScoreGenerator}return e.prototype.isSampledIn=function(e){return!0},e}();t.Sample=r}.apply(t,n))||(e.exports=r)},function(e,t,i){var n,r;n=[i,t,i(71),i(1)],void 0===(r=function(e,t,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(){this.hashCodeGeneragor=new i.HashCodeScoreGenerator}return e.prototype.getSamplingScore=function(e){var t=new n.ContextTagKeys;return e.tags[t.userId]?this.hashCodeGeneragor.getHashCodeScore(e.tags[t.userId]):e.tags[t.operationId]?this.hashCodeGeneragor.getHashCodeScore(e.tags[t.operationId]):Math.random()},e}();t.SamplingScoreGenerator=r}.apply(t,n))||(e.exports=r)},function(e,t,i){var n;void 0===(n=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(){}return e.prototype.getHashCodeScore=function(t){return 100*(this.getHashCode(t)/e.INT_MAX_VALUE)},e.prototype.getHashCode=function(t){if(""==t)return 0;for(;t.length<e.MIN_INPUT_LENGTH;)t=t.concat(t);for(var i=5381,n=0;n<t.length;++n)i=(i<<5)+i+t.charCodeAt(n),i&=i;return Math.abs(i)},e.INT_MAX_VALUE=2147483647,e.MIN_INPUT_LENGTH=8,e}();t.HashCodeScoreGenerator=i}.apply(t,[i,t]))||(e.exports=n)},function(e,t,i){var n,r;n=[i,t,i(73)],void 0===(r=function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AjaxPlugin=i.AjaxMonitor}.apply(t,n))||(e.exports=r)},function(e,t,i){var n,r;n=[i,t,i(1),i(0),i(74),i(75)],void 0===(r=function(e,t,i,n,r,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(){this._trackAjaxAttempts=0,this.identifier="AjaxDependencyPlugin",this.priority=161,this.currentWindowHost=window&&window.location.host&&window.location.host.toLowerCase(),this.initialized=!1}return e.prototype.isMonitoredInstance=function(e,t){return this.initialized&&(!0===t||!n.CoreUtils.isNullOrUndefined(e.ajaxData))&&!0!==e[i.DisabledPropertyName]},e.prototype.supportsMonitoring=function(){var e=!0;(n.CoreUtils.isNullOrUndefined(XMLHttpRequest)||n.CoreUtils.isNullOrUndefined(XMLHttpRequest.prototype)||n.CoreUtils.isNullOrUndefined(XMLHttpRequest.prototype.open)||n.CoreUtils.isNullOrUndefined(XMLHttpRequest.prototype.send)||n.CoreUtils.isNullOrUndefined(XMLHttpRequest.prototype.abort))&&(e=!1);try{" a ".trim()}catch(t){e=!1}return e},e.prototype.instrumentOpen=function(){var t=XMLHttpRequest.prototype.open,r=this;XMLHttpRequest.prototype.open=function(o,a,s){try{!r.isMonitoredInstance(this,!0)||this.ajaxData&&this.ajaxData.xhrMonitoringState.openDone||r.openHandler(this,o,a,s)}catch(t){this._core.logger.throwInternal(n.LoggingSeverity.CRITICAL,n._InternalMessageId.FailedMonitorAjaxOpen,"Failed to monitor XMLHttpRequest.open, monitoring data for this ajax call may be incorrect.",{ajaxDiagnosticsMessage:e.getFailedAjaxDiagnosticsMessage(this),exception:i.Util.dump(t)})}return t.apply(this,arguments)}},e.prototype.openHandler=function(e,t,n,o){var a=i.Util.newId(),s=new r.ajaxRecord(a,this._core._logger);s.method=t,s.requestUrl=n,s.xhrMonitoringState.openDone=!0,e.ajaxData=s,this.attachToOnReadyStateChange(e)},e.getFailedAjaxDiagnosticsMessage=function(e){var t="";try{n.CoreUtils.isNullOrUndefined(e)||n.CoreUtils.isNullOrUndefined(e.ajaxData)||n.CoreUtils.isNullOrUndefined(e.ajaxData.requestUrl)||(t+="(url: '"+e.ajaxData.requestUrl+"')")}catch(e){}return t},e.prototype.instrumentSend=function(){var t=XMLHttpRequest.prototype.send,r=this;XMLHttpRequest.prototype.send=function(o){try{r.isMonitoredInstance(this)&&!this.ajaxData.xhrMonitoringState.sendDone&&r.sendHandler(this,o)}catch(t){this._core.logger.throwInternal(n.LoggingSeverity.CRITICAL,n._InternalMessageId.FailedMonitorAjaxSend,"Failed to monitor XMLHttpRequest, monitoring data for this ajax call may be incorrect.",{ajaxDiagnosticsMessage:e.getFailedAjaxDiagnosticsMessage(this),exception:i.Util.dump(t)})}return t.apply(this,arguments)}},e.prototype.sendHandler=function(e,t){if(e.ajaxData.requestSentTime=i.DateTimeUtils.Now(),this.currentWindowHost&&i.CorrelationIdHelper.canIncludeCorrelationHeader(this._config,e.ajaxData.getAbsoluteUrl(),this.currentWindowHost)){e.setRequestHeader(i.RequestHeaders.requestIdHeader,e.ajaxData.id);var n=this._config.appId;n&&e.setRequestHeader(i.RequestHeaders.requestContextHeader,i.RequestHeaders.requestContextAppIdFormat+n)}e.ajaxData.xhrMonitoringState.sendDone=!0},e.prototype.instrumentAbort=function(){var t=XMLHttpRequest.prototype.abort,r=this;XMLHttpRequest.prototype.abort=function(){try{r.isMonitoredInstance(this)&&!this.ajaxData.xhrMonitoringState.abortDone&&(this.ajaxData.aborted=1,this.ajaxData.xhrMonitoringState.abortDone=!0)}catch(t){this._core.logger.throwInternal(n.LoggingSeverity.CRITICAL,n._InternalMessageId.FailedMonitorAjaxAbort,"Failed to monitor XMLHttpRequest.abort, monitoring data for this ajax call may be incorrect.",{ajaxDiagnosticsMessage:e.getFailedAjaxDiagnosticsMessage(this),exception:i.Util.dump(t)})}return t.apply(this,arguments)}},e.prototype.attachToOnReadyStateChange=function(t){var r=this,a=this;t.ajaxData.xhrMonitoringState.onreadystatechangeCallbackAttached=o.EventHelper.AttachEvent(t,"readystatechange",function(){try{a.isMonitoredInstance(t)&&4===t.readyState&&a.onAjaxComplete(t)}catch(a){var o=i.Util.dump(a);o&&-1!=o.toLowerCase().indexOf("c00c023f")||r._core.logger.throwInternal(n.LoggingSeverity.CRITICAL,n._InternalMessageId.FailedMonitorAjaxRSC,"Failed to monitor XMLHttpRequest 'readystatechange' event handler, monitoring data for this ajax call may be incorrect.",{ajaxDiagnosticsMessage:e.getFailedAjaxDiagnosticsMessage(t),exception:i.Util.dump(a)})}})},e.prototype.onAjaxComplete=function(t){if(t.ajaxData.responseFinishedTime=i.DateTimeUtils.Now(),t.ajaxData.status=t.status,t.ajaxData.CalculateMetrics(),t.ajaxData.ajaxTotalDuration<0)this._core.logger.throwInternal(n.LoggingSeverity.WARNING,n._InternalMessageId.FailedMonitorAjaxDur,"Failed to calculate the duration of the ajax call, monitoring data for this ajax call won't be sent.",{ajaxDiagnosticsMessage:e.getFailedAjaxDiagnosticsMessage(t),requestSentTime:t.ajaxData.requestSentTime,responseFinishedTime:t.ajaxData.responseFinishedTime});else{var r={id:t.ajaxData.id,absoluteUrl:t.ajaxData.getAbsoluteUrl(),commandName:t.ajaxData.getPathName(),duration:t.ajaxData.ajaxTotalDuration,success:+t.ajaxData.status>=200&&+t.ajaxData.status<400,resultCode:+t.ajaxData.status,method:t.ajaxData.method},o=this.getCorrelationContext(t);o&&(r.correlationContext=o),this.trackDependencyData(r),t.ajaxData=null}},e.prototype.getCorrelationContext=function(t){try{var r=t.getAllResponseHeaders();if(null!==r)if(-1!==r.toLowerCase().indexOf(i.RequestHeaders.requestContextHeaderLowerCase)){var o=t.getResponseHeader(i.RequestHeaders.requestContextHeader);return i.CorrelationIdHelper.getCorrelationContext(o)}}catch(r){this._core.logger.throwInternal(n.LoggingSeverity.WARNING,n._InternalMessageId.FailedMonitorAjaxGetCorrelationHeader,"Failed to get Request-Context correlation header as it may be not included in the response or not accessible.",{ajaxDiagnosticsMessage:e.getFailedAjaxDiagnosticsMessage(t),exception:i.Util.dump(r)})}},e.prototype.trackDependencyData=function(e,t,r){if(-1===this._config.maxAjaxCallsPerView||this._trackAjaxAttempts<this._config.maxAjaxCallsPerView){var o=i.TelemetryItemCreator.create(e,i.RemoteDependencyData.dataType,i.RemoteDependencyData.envelopeType,this._core._logger,t,r);this._core.track(o)}else this._trackAjaxAttempts===this._config.maxAjaxCallsPerView&&this._core.logger.throwInternal(n.LoggingSeverity.CRITICAL,n._InternalMessageId.MaxAjaxPerPVExceeded,"Maximum ajax per page view limit reached, ajax monitoring is paused until the next trackPageView(). In order to increase the limit set the maxAjaxCallsPerView configuration parameter.",!0);++this._trackAjaxAttempts},e.prototype.processTelemetry=function(e){this._nextPlugin&&this._nextPlugin.processTelemetry&&this._nextPlugin.processTelemetry(e)},e.prototype.setNextPlugin=function(e){e&&(this._nextPlugin=e)},e.prototype.initialize=function(e,t,n){if(!this.initialized){this._core=t,e.extensionConfig=e.extensionConfig?e.extensionConfig:{};var r=e.extensionConfig[this.identifier]?e.extensionConfig[this.identifier]:{};this._config={maxAjaxCallsPerView:isNaN(r.maxAjaxCallsPerView)?500:r.maxAjaxCallsPerView,disableAjaxTracking:i.Util.stringToBoolOrDefault(r.disableAjaxTracking),disableCorrelationHeaders:i.Util.stringToBoolOrDefault(r.disableCorrelationHeaders),correlationHeaderExcludedDomains:r.correlationHeaderExcludedDomains||["*.blob.core.windows.net","*.blob.core.chinacloudapi.cn","*.blob.core.cloudapi.de","*.blob.core.usgovcloudapi.net"],appId:r.appId,enableCorsCorrelation:i.Util.stringToBoolOrDefault(r.enableCorsCorrelation)},this.supportsMonitoring()&&!this._config.disableAjaxTracking&&(this.instrumentOpen(),this.instrumentSend(),this.instrumentAbort(),this.initialized=!0)}},e}();t.AjaxMonitor=a}.apply(t,n))||(e.exports=r)},function(e,t,i){var n,r;n=[i,t,i(1)],void 0===(r=function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){return function(){this.openDone=!1,this.setRequestHeaderDone=!1,this.sendDone=!1,this.abortDone=!1,this.onreadystatechangeCallbackAttached=!1}}();t.XHRMonitoringState=n;var r=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 n,this.clientFailure=0,this.CalculateMetrics=function(){this.ajaxTotalDuration=Math.round(1e3*i.DateTimeUtils.GetDuration(this.requestSentTime,this.responseFinishedTime))/1e3},this.id=e,this._logger=t}return e.prototype.getAbsoluteUrl=function(){return this.requestUrl?i.UrlHelper.getAbsoluteUrl(this.requestUrl):null},e.prototype.getPathName=function(){return this.requestUrl?i.DataSanitizer.sanitizeUrl(this._logger,i.UrlHelper.getCompleteUrl(this.method,this.requestUrl)):null},e}();t.ajaxRecord=r}.apply(t,n))||(e.exports=r)},function(e,t,i){var n,r;n=[i,t,i(0)],void 0===(r=function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(){}return e.GetLength=function(e){var t=0;if(!i.CoreUtils.isNullOrUndefined(e)){var n="";try{n=e.toString()}catch(e){}t=n.length,t=isNaN(t)?0:t}return t},e}();t.stringUtils=n;var r=function(){function e(){}return e.AttachEvent=function(e,t,n){var r=!1;return i.CoreUtils.isNullOrUndefined(e)||(i.CoreUtils.isNullOrUndefined(e.attachEvent)?i.CoreUtils.isNullOrUndefined(e.addEventListener)||(e.addEventListener(t,n,!1),r=!0):(e.attachEvent("on"+t,n),r=!0)),r},e.DetachEvent=function(e,t,n){i.CoreUtils.isNullOrUndefined(e)||(i.CoreUtils.isNullOrUndefined(e.detachEvent)?i.CoreUtils.isNullOrUndefined(e.removeEventListener)||e.removeEventListener(t,n,!1):e.detachEvent("on"+t,n))},e}();t.EventHelper=r}.apply(t,n))||(e.exports=r)}])});
//# sourceMappingURL=aisdk.0.0.13.min.js.map