2 строки
100 KiB
JavaScript
2 строки
100 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 n=t();for(var i in n)("object"==typeof exports?exports:e)[i]=n[i]}}(window,function(){return function(e){var t={};function n(i){if(t[i])return t[i].exports;var r=t[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(i,r,function(t){return e[t]}.bind(null,r));return i},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=18)}([function(e,t,n){var i,r;i=[n,t,n(2),n(1),n(6),n(8),n(24),n(9),n(10),n(25),n(27),n(20),n(28),n(33),n(7),n(34),n(36),n(38),n(40),n(41),n(42),n(3)],void 0===(r=function(e,t,n,i,r,o,a,s,l,c,u,p,d,f,g,h,v,y,_,m,I,S){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Util=n.Util,t.CorrelationIdHelper=n.CorrelationIdHelper,t.UrlHelper=n.UrlHelper,t._InternalMessageId=i._InternalMessageId,t.LoggingSeverity=i.LoggingSeverity,t.FieldType=i.FieldType,t._InternalLogging=r._InternalLogging,t._InternalLogMessage=r._InternalLogMessage,t.RequestHeaders=o.RequestHeaders,t.DisabledPropertyName=a.DisabledPropertyName,t.AIData=s.Data,t.AIBase=l.Base,t.Envelope=c.Envelope,t.Event=u.Event,t.Exception=p.Exception,t.Metric=d.Metric,t.PageView=f.PageView,t.PageViewData=g.PageViewData,t.RemoteDependencyData=h.RemoteDependencyData,t.Trace=v.Trace,t.PageViewPerformance=y.PageViewPerformance,t.Data=_.Data,t.SeverityLevel=m.SeverityLevel,t.ContextTagKeys=I.ContextTagKeys,t.DataSanitizer=S.DataSanitizer}.apply(t,i))||(e.exports=r)},function(e,t,n){var i;void 0===(i=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e[e.CRITICAL=0]="CRITICAL",e[e.WARNING=1]="WARNING"}(t.LoggingSeverity||(t.LoggingSeverity={})),function(e){e[e.BrowserDoesNotSupportLocalStorage=0]="BrowserDoesNotSupportLocalStorage",e[e.BrowserCannotReadLocalStorage=1]="BrowserCannotReadLocalStorage",e[e.BrowserCannotReadSessionStorage=2]="BrowserCannotReadSessionStorage",e[e.BrowserCannotWriteLocalStorage=3]="BrowserCannotWriteLocalStorage",e[e.BrowserCannotWriteSessionStorage=4]="BrowserCannotWriteSessionStorage",e[e.BrowserFailedRemovalFromLocalStorage=5]="BrowserFailedRemovalFromLocalStorage",e[e.BrowserFailedRemovalFromSessionStorage=6]="BrowserFailedRemovalFromSessionStorage",e[e.CannotSendEmptyTelemetry=7]="CannotSendEmptyTelemetry",e[e.ClientPerformanceMathError=8]="ClientPerformanceMathError",e[e.ErrorParsingAISessionCookie=9]="ErrorParsingAISessionCookie",e[e.ErrorPVCalc=10]="ErrorPVCalc",e[e.ExceptionWhileLoggingError=11]="ExceptionWhileLoggingError",e[e.FailedAddingTelemetryToBuffer=12]="FailedAddingTelemetryToBuffer",e[e.FailedMonitorAjaxAbort=13]="FailedMonitorAjaxAbort",e[e.FailedMonitorAjaxDur=14]="FailedMonitorAjaxDur",e[e.FailedMonitorAjaxOpen=15]="FailedMonitorAjaxOpen",e[e.FailedMonitorAjaxRSC=16]="FailedMonitorAjaxRSC",e[e.FailedMonitorAjaxSend=17]="FailedMonitorAjaxSend",e[e.FailedMonitorAjaxGetCorrelationHeader=18]="FailedMonitorAjaxGetCorrelationHeader",e[e.FailedToAddHandlerForOnBeforeUnload=19]="FailedToAddHandlerForOnBeforeUnload",e[e.FailedToSendQueuedTelemetry=20]="FailedToSendQueuedTelemetry",e[e.FailedToReportDataLoss=21]="FailedToReportDataLoss",e[e.FlushFailed=22]="FlushFailed",e[e.MessageLimitPerPVExceeded=23]="MessageLimitPerPVExceeded",e[e.MissingRequiredFieldSpecification=24]="MissingRequiredFieldSpecification",e[e.NavigationTimingNotSupported=25]="NavigationTimingNotSupported",e[e.OnError=26]="OnError",e[e.SessionRenewalDateIsZero=27]="SessionRenewalDateIsZero",e[e.SenderNotInitialized=28]="SenderNotInitialized",e[e.StartTrackEventFailed=29]="StartTrackEventFailed",e[e.StopTrackEventFailed=30]="StopTrackEventFailed",e[e.StartTrackFailed=31]="StartTrackFailed",e[e.StopTrackFailed=32]="StopTrackFailed",e[e.TelemetrySampledAndNotSent=33]="TelemetrySampledAndNotSent",e[e.TrackEventFailed=34]="TrackEventFailed",e[e.TrackExceptionFailed=35]="TrackExceptionFailed",e[e.TrackMetricFailed=36]="TrackMetricFailed",e[e.TrackPVFailed=37]="TrackPVFailed",e[e.TrackPVFailedCalc=38]="TrackPVFailedCalc",e[e.TrackTraceFailed=39]="TrackTraceFailed",e[e.TransmissionFailed=40]="TransmissionFailed",e[e.FailedToSetStorageBuffer=41]="FailedToSetStorageBuffer",e[e.FailedToRestoreStorageBuffer=42]="FailedToRestoreStorageBuffer",e[e.InvalidBackendResponse=43]="InvalidBackendResponse",e[e.FailedToFixDepricatedValues=44]="FailedToFixDepricatedValues",e[e.InvalidDurationValue=45]="InvalidDurationValue",e[e.TelemetryEnvelopeInvalid=46]="TelemetryEnvelopeInvalid",e[e.CreateEnvelopeError=47]="CreateEnvelopeError",e[e.CannotSerializeObject=48]="CannotSerializeObject",e[e.CannotSerializeObjectNonSerializable=49]="CannotSerializeObjectNonSerializable",e[e.CircularReferenceDetected=50]="CircularReferenceDetected",e[e.ClearAuthContextFailed=51]="ClearAuthContextFailed",e[e.ExceptionTruncated=52]="ExceptionTruncated",e[e.IllegalCharsInName=53]="IllegalCharsInName",e[e.ItemNotInArray=54]="ItemNotInArray",e[e.MaxAjaxPerPVExceeded=55]="MaxAjaxPerPVExceeded",e[e.MessageTruncated=56]="MessageTruncated",e[e.NameTooLong=57]="NameTooLong",e[e.SampleRateOutOfRange=58]="SampleRateOutOfRange",e[e.SetAuthContextFailed=59]="SetAuthContextFailed",e[e.SetAuthContextFailedAccountName=60]="SetAuthContextFailedAccountName",e[e.StringValueTooLong=61]="StringValueTooLong",e[e.StartCalledMoreThanOnce=62]="StartCalledMoreThanOnce",e[e.StopCalledWithoutStart=63]="StopCalledWithoutStart",e[e.TelemetryInitializerFailed=64]="TelemetryInitializerFailed",e[e.TrackArgumentsNotSpecified=65]="TrackArgumentsNotSpecified",e[e.UrlTooLong=66]="UrlTooLong",e[e.SessionStorageBufferFull=67]="SessionStorageBufferFull",e[e.CannotAccessCookie=68]="CannotAccessCookie",e[e.IdTooLong=69]="IdTooLong"}(t._InternalMessageId||(t._InternalMessageId={})),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,[n,t]))||(e.exports=i)},function(e,t,n){var i,r;i=[n,t,n(1),n(6),n(8),n(3)],void 0===(r=function(e,t,n,i,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(n.StorageType.LocalStorage):null},e._getVerifiedStorageObject=function(e){var t,i,r=null;try{i=new Date,(r=e===n.StorageType.LocalStorage?window.localStorage:window.sessionStorage).setItem(i,i),t=r.getItem(i)!=i,r.removeItem(i),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(n.StorageType.LocalStorage)),e._canUseLocalStorage},e.getStorage=function(t){var r=e._getLocalStorageObject();if(null!==r)try{return r.getItem(t)}catch(t){e._canUseLocalStorage=!1,i._InternalLogging.throwInternal(n.LoggingSeverity.WARNING,n._InternalMessageId.BrowserCannotReadLocalStorage,"Browser failed read of local storage. "+e.getExceptionName(t),{exception:e.dump(t)})}return null},e.setStorage=function(t,r){var o=e._getLocalStorageObject();if(null!==o)try{return o.setItem(t,r),!0}catch(t){e._canUseLocalStorage=!1,i._InternalLogging.throwInternal(n.LoggingSeverity.WARNING,n._InternalMessageId.BrowserCannotWriteLocalStorage,"Browser failed write to local storage. "+e.getExceptionName(t),{exception:e.dump(t)})}return!1},e.removeStorage=function(t){var r=e._getLocalStorageObject();if(null!==r)try{return r.removeItem(t),!0}catch(t){e._canUseLocalStorage=!1,i._InternalLogging.throwInternal(n.LoggingSeverity.WARNING,n._InternalMessageId.BrowserFailedRemovalFromLocalStorage,"Browser failed removal of local storage item. "+e.getExceptionName(t),{exception:e.dump(t)})}return!1},e._getSessionStorageObject=function(){return e.canUseSessionStorage()?e._getVerifiedStorageObject(n.StorageType.SessionStorage):null},e.canUseSessionStorage=function(){return void 0===e._canUseSessionStorage&&(e._canUseSessionStorage=!!e._getVerifiedStorageObject(n.StorageType.SessionStorage)),e._canUseSessionStorage},e.getSessionStorageKeys=function(){var t=[];if(e.canUseSessionStorage())for(var n in window.sessionStorage)t.push(n);return t},e.getSessionStorage=function(t){var r=e._getSessionStorageObject();if(null!==r)try{return r.getItem(t)}catch(t){e._canUseSessionStorage=!1,i._InternalLogging.throwInternal(n.LoggingSeverity.WARNING,n._InternalMessageId.BrowserCannotReadSessionStorage,"Browser failed read of session storage. "+e.getExceptionName(t),{exception:e.dump(t)})}return null},e.setSessionStorage=function(t,r){var o=e._getSessionStorageObject();if(null!==o)try{return o.setItem(t,r),!0}catch(t){e._canUseSessionStorage=!1,i._InternalLogging.throwInternal(n.LoggingSeverity.WARNING,n._InternalMessageId.BrowserCannotWriteSessionStorage,"Browser failed write to session storage. "+e.getExceptionName(t),{exception:e.dump(t)})}return!1},e.removeSessionStorage=function(t){var r=e._getSessionStorageObject();if(null!==r)try{return r.removeItem(t),!0}catch(t){e._canUseSessionStorage=!1,i._InternalLogging.throwInternal(n.LoggingSeverity.WARNING,n._InternalMessageId.BrowserFailedRemovalFromSessionStorage,"Browser failed removal of session storage item. "+e.getExceptionName(t),{exception:e.dump(t)})}return!1},e.disableCookies=function(){e._canUseCookies=!1},e.canUseCookies=function(){if(void 0===e._canUseCookies){e._canUseCookies=!1;try{e._canUseCookies=void 0!==e.document.cookie}catch(t){i._InternalLogging.throwInternal(n.LoggingSeverity.WARNING,n._InternalMessageId.CannotAccessCookie,"Cannot access document.cookie - "+e.getExceptionName(t),{exception:e.dump(t)})}}return e._canUseCookies},e.setCookie=function(t,n,i){var r="",o="";i&&(r=";domain="+i),e.document.location&&"https:"===e.document.location.protocol&&(o=";secure"),e.canUseCookies()&&(e.document.cookie=t+"="+n+r+";path=/"+o)},e.stringToBoolOrDefault=function(e,t){return void 0===t&&(t=!1),void 0===e||null===e?t:"true"===e.toString().toLowerCase()},e.getCookie=function(t){if(e.canUseCookies()){var n="";if(t&&t.length)for(var i=t+"=",r=e.document.cookie.split(";"),o=0;o<r.length;o++){var a=r[o];if((a=e.trim(a))&&0===a.indexOf(i)){n=a.substring(i.length,r[o].length);break}}return n}},e.deleteCookie=function(t){e.canUseCookies()&&(e.document.cookie=t+"=;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 n=function(e){var t=String(e);return 1===t.length&&(t="0"+t),t};return t.getUTCFullYear()+"-"+n(t.getUTCMonth()+1)+"-"+n(t.getUTCDate())+"T"+n(t.getUTCHours())+":"+n(t.getUTCMinutes())+":"+n(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,n=""+Math.floor(e/1e3)%60,i=""+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,n=n.length<2?"0"+n:n,i=i.length<2?"0"+i:i,r=r.length<2?"0"+r:r,(o>0?o+".":"")+r+":"+i+":"+n+"."+t},e.isCrossOriginError=function(e,t,n,i,r){return("Script error."===e||"Script error"===e)&&!r},e.dump=function(e){var t=Object.prototype.toString.call(e),n=JSON.stringify(e);return"[object Error]"===t&&(n="{ stack: '"+e.stack+"', message: '"+e.message+"', name: '"+e.name+"'"),t+n},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 n="on"+e;if(window.addEventListener)window.addEventListener(e,t,!1);else{if(!window.attachEvent)return!1;window.attachEvent(n,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 n,i=e.parseUrl(t);return i&&(n=i.href),n},e.getPathName=function(t){var n,i=e.parseUrl(t);return i&&(n=i.pathname),n},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,n){if(e&&e.disableCorrelationHeaders)return!1;if(!t)return!1;var i=s.parseUrl(t).host.toLowerCase();if(!(e&&e.enableCorsCorrelation||i===n))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(i))return!1}return!0},e.getCorrelationContext=function(t){if(t){var n=e.getCorrelationContextValue(t,r.RequestHeaders.requestContextTargetKey);if(n&&n!==e.correlationIdPrefix)return n}},e.getCorrelationContextValue=function(e,t){if(e)for(var n=e.split(","),i=0;i<n.length;++i){var r=n[i].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,n){var i,r;if(e&&e.length>0){var a=s.parseUrl(e);if(i=a.host,null!=a.pathname)"/"!==(n=0===a.pathname.length?"/":a.pathname).charAt(0)&&(n="/"+n),r=o.DataSanitizer.sanitizeString(t?t+" "+n:n);else r=o.DataSanitizer.sanitizeString(e)}else i=n,r=n;return{target:i,name:r}},e}();t.AjaxHelper=c}.apply(t,i))||(e.exports=r)},function(e,t,n){var i,r;i=[n,t,n(6),n(2),n(1)],void 0===(r=function(e,t,n,i,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(){}return e.sanitizeKeyAndAddUniqueness=function(t,n){var i=t.length,r=e.sanitizeKey(t);if(r.length!==i){for(var o=0,a=r;void 0!==n[a];)o++,a=r.substring(0,e.MAX_NAME_LENGTH-3)+e.padNumber(o);r=a}return r},e.sanitizeKey=function(t){return t&&(t=i.Util.trim(t.toString())).length>e.MAX_NAME_LENGTH&&(t=t.substring(0,e.MAX_NAME_LENGTH),n._InternalLogging.throwInternal(r.LoggingSeverity.WARNING,r._InternalMessageId.NameTooLong,"name is too long. It has been truncated to "+e.MAX_NAME_LENGTH+" characters.",{name:t},!0)),t},e.sanitizeString=function(t,o){return void 0===o&&(o=e.MAX_STRING_LENGTH),t&&(o=o||e.MAX_STRING_LENGTH,(t=i.Util.trim(t)).toString().length>o&&(t=t.toString().substring(0,o),n._InternalLogging.throwInternal(r.LoggingSeverity.WARNING,r._InternalMessageId.StringValueTooLong,"string value is too long. It has been truncated to "+o+" characters.",{value:t},!0))),t},e.sanitizeUrl=function(t){return e.sanitizeInput(t,e.MAX_URL_LENGTH,r._InternalMessageId.UrlTooLong)},e.sanitizeMessage=function(t){return t&&t.length>e.MAX_MESSAGE_LENGTH&&(t=t.substring(0,e.MAX_MESSAGE_LENGTH),n._InternalLogging.throwInternal(r.LoggingSeverity.WARNING,r._InternalMessageId.MessageTruncated,"message is too long, it has been truncated to "+e.MAX_MESSAGE_LENGTH+" characters.",{message:t},!0)),t},e.sanitizeException=function(t){return t&&t.length>e.MAX_EXCEPTION_LENGTH&&(t=t.substring(0,e.MAX_EXCEPTION_LENGTH),n._InternalLogging.throwInternal(r.LoggingSeverity.WARNING,r._InternalMessageId.ExceptionTruncated,"exception is too long, it has been truncated to "+e.MAX_EXCEPTION_LENGTH+" characters.",{exception:t},!0)),t},e.sanitizeProperties=function(t){if(t){var n={};for(var i in t){var r=e.sanitizeString(t[i],e.MAX_PROPERTY_LENGTH);n[i=e.sanitizeKeyAndAddUniqueness(i,n)]=r}t=n}return t},e.sanitizeMeasurements=function(t){if(t){var n={};for(var i in t){var r=t[i];n[i=e.sanitizeKeyAndAddUniqueness(i,n)]=r}t=n}return t},e.sanitizeId=function(t){return t?e.sanitizeInput(t,e.MAX_ID_LENGTH,r._InternalMessageId.IdTooLong).toString():t},e.sanitizeInput=function(e,t,o){return e&&(e=i.Util.trim(e)).length>t&&(e=e.substring(0,t),n._InternalLogging.throwInternal(r.LoggingSeverity.WARNING,o,"input is too long, it has been truncated to "+t+" characters.",{data:e},!0)),e},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=o}.apply(t,i))||(e.exports=r)},function(e,t,n){var i,r;i=[n,t,n(14),n(15),n(44),n(16),n(17)],void 0===(r=function(e,t,n,i,r,o,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MinChannelPriorty=n.MinChannelPriorty,t.EventsDiscardedReason=i.EventsDiscardedReason,t.AppInsightsCore=r.AppInsightsCore,t.CoreUtils=o.CoreUtils,t.NotificationManager=a.NotificationManager}.apply(t,i))||(e.exports=r)},function(e,t,n){var i;void 0===(i=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){return function(){}}();t.Domain=n}.apply(t,[n,t]))||(e.exports=i)},function(e,t,n){var i,r;i=[n,t,n(1),n(2)],void 0===(r=function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(t,i,r,o){void 0===r&&(r=!1),this.messageId=t,this.message=(r?e.AiUserActionablePrefix:e.AiNonUserActionablePrefix)+n._InternalMessageId[t].toString();var a=(i?" message:"+e.sanitizeDiagnosticText(i):"")+(o?" props:"+e.sanitizeDiagnosticText(JSON.stringify(o)):"");this.message+=a}return e.sanitizeDiagnosticText=function(e){return'"'+e.replace(/\"/g,"")+'"'},e.AiNonUserActionablePrefix="AI (Internal): ",e.AiUserActionablePrefix="AI: ",e}();t._InternalLogMessage=r;var o=function(){function e(){}return e.throwInternal=function(e,t,i,o,a){void 0===a&&(a=!1);var s=new r(t,i,a,o);if(this.enableDebugExceptions())throw s;if(void 0!==s&&s&&void 0!==s.message){if(a){var l=n._InternalMessageId[s.messageId];this._messageLogged[l]&&!this.verboseLogging()||(this.warnToConsole(s.message),this._messageLogged[l]=!0)}else this.verboseLogging()&&this.warnToConsole(s.message);this.logInternalMessage(e,s)}},e.warnToConsole=function(e){"undefined"!=typeof console&&console&&("function"==typeof console.warn?console.warn(e):"function"==typeof console.log&&console.log(e))},e.resetInternalMessageCount=function(){this._messageCount=0,this._messageLogged={}},e.clearInternalMessageLoggedTypes=function(){if(i.Util.canUseSessionStorage())for(var t=i.Util.getSessionStorageKeys(),n=0;n<t.length;n++)0===t[n].indexOf(e.AIInternalMessagePrefix)&&i.Util.removeSessionStorage(t[n])},e.setMaxInternalMessageLimit=function(e){if(!e)throw new Error("limit cannot be undefined.");this.MAX_INTERNAL_MESSAGE_LIMIT=e},e.logInternalMessage=function(t,o){if(!this._areInternalMessagesThrottled()){var a=!0,s=e.AIInternalMessagePrefix+n._InternalMessageId[o.messageId];if(i.Util.canUseSessionStorage())i.Util.getSessionStorage(s)?a=!1:i.Util.setSessionStorage(s,"1");else this._messageLogged[s]?a=!1:this._messageLogged[s]=!0;if(a&&((this.verboseLogging()||t===n.LoggingSeverity.CRITICAL)&&(this.queue.push(o),this._messageCount++),this._messageCount==this.MAX_INTERNAL_MESSAGE_LIMIT)){var l="Internal events throttle limit per PageView reached for this app.",c=new r(n._InternalMessageId.MessageLimitPerPVExceeded,l,!1);this.queue.push(c),this.warnToConsole(l)}}},e._areInternalMessagesThrottled=function(){return this._messageCount>=this.MAX_INTERNAL_MESSAGE_LIMIT},e.AIInternalMessagePrefix="AITR_",e.enableDebugExceptions=function(){return!1},e.verboseLogging=function(){return!1},e.queue=[],e.MAX_INTERNAL_MESSAGE_LIMIT=25,e._messageCount=0,e._messageLogged={},e}();t._InternalLogging=o}.apply(t,i))||(e.exports=r)},function(e,t,n){var i,r,o=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();i=[n,t,n(11)],void 0===(r=function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(e){function t(){var t=e.call(this)||this;return t.ver=2,t.properties={},t.measurements={},t}return o(t,e),t}(n.EventData);t.PageViewData=i}.apply(t,i))||(e.exports=r)},function(e,t,n){var i;void 0===(i=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(){}return e.requestContextHeader="Request-Context",e.requestContextTargetKey="appId",e.requestContextAppIdFormat="appId=cid-v1:",e.requestIdHeader="Request-Id",e.sdkContextHeader="Sdk-Context",e.sdkContextHeaderAppIdRequest="appId",e.requestContextHeaderLowerCase="request-context",e}();t.RequestHeaders=n}.apply(t,[n,t]))||(e.exports=i)},function(e,t,n){var i,r,o=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();i=[n,t,n(10)],void 0===(r=function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(e){function t(){return e.call(this)||this}return o(t,e),t}(n.Base);t.Data=i}.apply(t,i))||(e.exports=r)},function(e,t,n){var i;void 0===(i=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){return function(){}}();t.Base=n}.apply(t,[n,t]))||(e.exports=i)},function(e,t,n){var i,r,o=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();i=[n,t,n(5)],void 0===(r=function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(e){function t(){var t=e.call(this)||this;return t.ver=2,t.properties={},t.measurements={},t}return o(t,e),t}(n.Domain);t.EventData=i}.apply(t,i))||(e.exports=r)},function(e,t,n){var i,r;i=[n,t,n(13)],void 0===(r=function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ApplicationInsights=n.ApplicationInsights}.apply(t,i))||(e.exports=r)},function(e,t,n){var i,r;i=[n,t,n(0),n(43),n(4),n(45),n(57)],void 0===(r=function(e,t,n,i,r,o,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(){this._trackAjaxAttempts=0,this.identifier=e.defaultIdentifier,this.initialize=this._initialize.bind(this)}return e.prototype.processTelemetry=function(e){r.CoreUtils.isNullOrUndefined(this._nextPlugin)||this._nextPlugin.processTelemetry(e)},e.prototype.setNextPlugin=function(e){this._nextPlugin=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){n._InternalLogging.throwInternal(n.LoggingSeverity.CRITICAL,n._InternalMessageId.TrackPVFailed,"trackPageView failed, page view will not be collected: "+n.Util.getExceptionName(e),{exception:n.Util.dump(e)})}},e.prototype.sendPageViewInternal=function(e,t,i){var r=a.TelemetryItemCreator.createItem(e,n.PageView.dataType,n.PageView.envelopeType,t,i);this.context.track(r),this._trackAjaxAttempts=0},e.prototype.sendPageViewPerformanceInternal=function(e){},e.prototype._initialize=function(t,a,s){var l=this;if(r.CoreUtils.isNullOrUndefined(a))throw Error("Error initializing");this.core=a,this._globalconfig={instrumentationKey:t.instrumentationKey,endpointUrl:t.endpointUrl},this.config=t.extensions&&t.extensions[this.identifier]?t.extensions[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])}n._InternalLogging.verboseLogging=function(){return l.config.verboseLogging},n._InternalLogging.enableDebugExceptions=function(){return l.config.enableDebug},this.config.isCookieUseDisabled&&n.Util.disableCookies(),this.config.isStorageUseDisabled&&n.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}};this.context=new o.TelemetryContext(p,this.core),this._pageViewManager=new i.PageViewManager(this,this.config.overridePageViewDuration,this.core)},e.defaultIdentifier="ApplicationInsightsAnalytics",e.Version="0.0.1",e}();t.ApplicationInsights=s;!function(){function e(e){this._name=e,this._events={}}e.prototype.start=function(e){void 0!==this._events[e]&&n._InternalLogging.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,i,r){var o=this._events[e];if(isNaN(o))n._InternalLogging.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=n.PageViewPerformance.getDuration(o,a);this.action(e,t,s,i,r)}delete this._events[e],this._events[e]=void 0}}()}.apply(t,i))||(e.exports=r)},function(e,t,n){var i;void 0===(i=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MinChannelPriorty=100}.apply(t,[n,t]))||(e.exports=i)},function(e,t,n){var i;void 0===(i=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,[n,t]))||(e.exports=i)},function(e,t,n){var i;void 0===(i=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(){}return e.isNullOrUndefined=function(e){return null===e||void 0===e},e}();t.CoreUtils=n}.apply(t,[n,t]))||(e.exports=i)},function(e,t,n){var i;void 0===(i=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=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,n=function(n){i.listeners[n].eventsSent&&setTimeout(function(){return t.listeners[n].eventsSent(e)},0)},i=this,r=0;r<this.listeners.length;++r)n(r)},e.prototype.eventsDiscarded=function(e,t){for(var n=this,i=function(i){r.listeners[i].eventsDiscarded&&setTimeout(function(){return n.listeners[i].eventsDiscarded(e,t)},0)},r=this,o=0;o<this.listeners.length;++o)i(o)},e}();t.NotificationManager=n}.apply(t,[n,t]))||(e.exports=i)},function(e,t,n){e.exports=n(19)},function(e,t,n){var i,r;i=[n,t,n(0),n(12),n(58)],void 0===(r=function(e,t,n,i,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});try{if("undefined"!=typeof window&&"undefined"!=typeof JSON){if(void 0===window.appInsightsvNext)i.ApplicationInsights.appInsightsDefaultConfig=r.Initialization.getDefaultConfig();else{var o=window.appInsightsvNext||{},a=new r.Initialization(o),s=a.loadAppInsights();for(var l in s)o[l]=s[l];a.emptyQueue(),a.addHousekeepingBeforeUnload(s)}}}catch(e){n._InternalLogging.warnToConsole("Failed to initialize AppInsights JS SDK: "+e.message)}}.apply(t,i))||(e.exports=r)},function(e,t,n){var i,r,o=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();i=[n,t,n(21),n(22),n(23),n(3),n(1),n(2)],void 0===(r=function(e,t,n,i,r,a,s,l){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var c=function(e){function t(t,n,i,r){var o=e.call(this)||this;return o.aiDataContract={ver:s.FieldType.Required,exceptions:s.FieldType.Required,severityLevel:s.FieldType.Default,properties:s.FieldType.Default,measurements:s.FieldType.Default},o.properties=a.DataSanitizer.sanitizeProperties(n),o.measurements=a.DataSanitizer.sanitizeMeasurements(i),o.exceptions=[new u(t)],r&&(o.severityLevel=r),o}return o(t,e),t.CreateSimpleException=function(e,t,n,i,r,o){return{exceptions:[{hasFullStack:!0,message:e,stack:r,typeName:t}]}},t.envelopeType="Microsoft.ApplicationInsights.{0}.Exception",t.dataType="ExceptionData",t}(i.ExceptionData);t.Exception=c;var u=function(e){function t(t){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.name)||l.Util.NotSpecified,n.message=a.DataSanitizer.sanitizeMessage(t.message)||l.Util.NotSpecified;var i=t.stack;return n.parsedStack=n.parseStack(i),n.stack=a.DataSanitizer.sanitizeException(i),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 n=e.split("\n");t=[];for(var i=0,r=0,o=0;o<=n.length;o++){var a=n[o];if(p.regex.test(a)){var s=new p(n[o],i++);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(n,i){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=i,r.method="<no_method>",r.assembly=l.Util.trim(n);var o=n.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}(n.StackFrame);t._StackFrame=p}.apply(t,i))||(e.exports=r)},function(e,t,n){var i;void 0===(i=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){return function(){}}();t.StackFrame=n}.apply(t,[n,t]))||(e.exports=i)},function(e,t,n){var i,r,o=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();i=[n,t,n(5)],void 0===(r=function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=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}(n.Domain);t.ExceptionData=i}.apply(t,i))||(e.exports=r)},function(e,t,n){var i;void 0===(i=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){return function(){this.hasFullStack=!0,this.parsedStack=[]}}();t.ExceptionDetails=n}.apply(t,[n,t]))||(e.exports=i)},function(e,t,n){var i;void 0===(i=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DisabledPropertyName="Microsoft_ApplicationInsights_BypassAjaxInstrumentation"}.apply(t,[n,t]))||(e.exports=i)},function(e,t,n){var i,r,o=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();i=[n,t,n(26),n(3),n(1),n(2)],void 0===(r=function(e,t,n,i,r,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s=function(e){function t(t,n){var o=e.call(this)||this;return o.name=i.DataSanitizer.sanitizeString(n)||a.Util.NotSpecified,o.data=t,o.time=a.Util.toISOStringForIE8(new Date),o.aiDataContract={time:r.FieldType.Required,iKey:r.FieldType.Required,name:r.FieldType.Required,sampleRate:function(){return 100==o.sampleRate?r.FieldType.Hidden:r.FieldType.Required},tags:r.FieldType.Required,data:r.FieldType.Required},o}return o(t,e),t}(n.Envelope);t.Envelope=s}.apply(t,i))||(e.exports=r)},function(e,t,n){var i;void 0===(i=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){return function(){this.ver=1,this.sampleRate=100,this.tags={}}}();t.Envelope=n}.apply(t,[n,t]))||(e.exports=i)},function(e,t,n){var i,r,o=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();i=[n,t,n(11),n(3),n(1),n(2)],void 0===(r=function(e,t,n,i,r,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s=function(e){function t(t,n,o){var s=e.call(this)||this;return s.aiDataContract={ver:r.FieldType.Required,name:r.FieldType.Required,properties:r.FieldType.Default,measurements:r.FieldType.Default},s.name=i.DataSanitizer.sanitizeString(t)||a.Util.NotSpecified,s.properties=i.DataSanitizer.sanitizeProperties(n),s.measurements=i.DataSanitizer.sanitizeMeasurements(o),s}return o(t,e),t.envelopeType="Microsoft.ApplicationInsights.{0}.Event",t.dataType="EventData",t}(n.EventData);t.Event=s}.apply(t,i))||(e.exports=r)},function(e,t,n){var i,r,o=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();i=[n,t,n(29),n(3),n(1),n(30),n(2)],void 0===(r=function(e,t,n,i,r,a,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var l=function(e){function t(t,n,o,l,c,u){var p=e.call(this)||this;p.aiDataContract={ver:r.FieldType.Required,metrics:r.FieldType.Required,properties:r.FieldType.Default};var d=new a.DataPoint;return d.count=o>0?o:void 0,d.max=isNaN(c)||null===c?void 0:c,d.min=isNaN(l)||null===l?void 0:l,d.name=i.DataSanitizer.sanitizeString(t)||s.Util.NotSpecified,d.value=n,p.metrics=[d],p.properties=i.DataSanitizer.sanitizeProperties(u),p}return o(t,e),t.envelopeType="Microsoft.ApplicationInsights.{0}.Metric",t.dataType="MetricData",t}(n.MetricData);t.Metric=l}.apply(t,i))||(e.exports=r)},function(e,t,n){var i,r,o=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();i=[n,t,n(5)],void 0===(r=function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(e){function t(){var t=e.call(this)||this;return t.ver=2,t.metrics=[],t.properties={},t}return o(t,e),t}(n.Domain);t.MetricData=i}.apply(t,i))||(e.exports=r)},function(e,t,n){var i,r,o=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();i=[n,t,n(31),n(1)],void 0===(r=function(e,t,n,i){"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:i.FieldType.Required,kind:i.FieldType.Default,value:i.FieldType.Required,count:i.FieldType.Default,min:i.FieldType.Default,max:i.FieldType.Default,stdDev:i.FieldType.Default},t}return o(t,e),t}(n.DataPoint);t.DataPoint=r}.apply(t,i))||(e.exports=r)},function(e,t,n){var i,r;i=[n,t,n(32)],void 0===(r=function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){return function(){this.kind=n.DataPointType.Measurement}}();t.DataPoint=i}.apply(t,i))||(e.exports=r)},function(e,t,n){var i;void 0===(i=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,[n,t]))||(e.exports=i)},function(e,t,n){var i,r,o=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();i=[n,t,n(7),n(3),n(1),n(2)],void 0===(r=function(e,t,n,i,r,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s=function(e){function t(t,n,o,s,l,c){var u=e.call(this)||this;return u.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},u.id=i.DataSanitizer.sanitizeId(c),u.url=i.DataSanitizer.sanitizeUrl(n),u.name=i.DataSanitizer.sanitizeString(t)||a.Util.NotSpecified,isNaN(o)||(u.duration=a.Util.msToTimeSpan(o)),u.properties=i.DataSanitizer.sanitizeProperties(s),u.measurements=i.DataSanitizer.sanitizeMeasurements(l),u}return o(t,e),t.envelopeType="Microsoft.ApplicationInsights.{0}.Pageview",t.dataType="PageviewData",t}(n.PageViewData);t.PageView=s}.apply(t,i))||(e.exports=r)},function(e,t,n){var i,r,o=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();i=[n,t,n(3),n(1),n(2),n(2),n(35)],void 0===(r=function(e,t,n,i,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){var g=e.call(this)||this;g.aiDataContract={id:i.FieldType.Required,ver:i.FieldType.Required,name:i.FieldType.Default,resultCode:i.FieldType.Default,duration:i.FieldType.Default,success:i.FieldType.Default,data:i.FieldType.Default,target:i.FieldType.Default,type:i.FieldType.Default,properties:i.FieldType.Default,measurements:i.FieldType.Default,kind:i.FieldType.Default,value:i.FieldType.Default,count:i.FieldType.Default,min:i.FieldType.Default,max:i.FieldType.Default,stdDev:i.FieldType.Default,dependencyKind:i.FieldType.Default,dependencySource:i.FieldType.Default,commandName:i.FieldType.Default,dependencyTypeName:i.FieldType.Default},g.id=t,g.duration=r.Util.msToTimeSpan(l),g.success=c,g.resultCode=u+"",g.type="Ajax",g.data=n.DataSanitizer.sanitizeUrl(s);var h=a.AjaxHelper.ParseDependencyPath(o,p,s);return g.target=h.target,g.name=h.name,g.properties=n.DataSanitizer.sanitizeProperties(d),g.measurements=n.DataSanitizer.sanitizeMeasurements(f),g}return o(t,e),t.envelopeType="Microsoft.ApplicationInsights.{0}.RemoteDependency",t.dataType="RemoteDependencyData",t}(s.RemoteDependencyData);t.RemoteDependencyData=l}.apply(t,i))||(e.exports=r)},function(e,t,n){var i,r,o=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();i=[n,t,n(5)],void 0===(r=function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=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}(n.Domain);t.RemoteDependencyData=i}.apply(t,i))||(e.exports=r)},function(e,t,n){var i,r,o=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();i=[n,t,n(37),n(3),n(1),n(2)],void 0===(r=function(e,t,n,i,r,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s=function(e){function t(t,n,o){var s=e.call(this)||this;return s.aiDataContract={ver:r.FieldType.Required,message:r.FieldType.Required,severityLevel:r.FieldType.Default,properties:r.FieldType.Default},t=t||a.Util.NotSpecified,s.message=i.DataSanitizer.sanitizeMessage(t),s.properties=i.DataSanitizer.sanitizeProperties(n),o&&(s.severityLevel=o),s}return o(t,e),t.envelopeType="Microsoft.ApplicationInsights.{0}.Message",t.dataType="MessageData",t}(n.MessageData);t.Trace=s}.apply(t,i))||(e.exports=r)},function(e,t,n){var i,r,o=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();i=[n,t,n(5)],void 0===(r=function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(e){function t(){var t=e.call(this)||this;return t.ver=2,t.properties={},t}return o(t,e),t}(n.Domain);t.MessageData=i}.apply(t,i))||(e.exports=r)},function(e,t,n){var i,r,o=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();i=[n,t,n(39),n(1),n(3),n(2),n(6)],void 0===(r=function(e,t,n,i,r,a,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var l=function(e){function t(n,o,l,c,u){var p=e.call(this)||this;p.aiDataContract={ver:i.FieldType.Required,name:i.FieldType.Default,url:i.FieldType.Default,duration:i.FieldType.Default,perfTotal:i.FieldType.Default,networkConnect:i.FieldType.Default,sentRequest:i.FieldType.Default,receivedResponse:i.FieldType.Default,domProcessing:i.FieldType.Default,properties:i.FieldType.Default,measurements:i.FieldType.Default},p.isValid=!1;var d=t.getPerformanceTiming();if(d){var f=t.getDuration(d.navigationStart,d.loadEventEnd),g=t.getDuration(d.navigationStart,d.connectEnd),h=t.getDuration(d.requestStart,d.responseStart),v=t.getDuration(d.responseStart,d.responseEnd),y=t.getDuration(d.responseEnd,d.loadEventEnd);0==f?s._InternalLogging.throwInternal(i.LoggingSeverity.WARNING,i._InternalMessageId.ErrorPVCalc,"error calculating page view performance.",{total:f,network:g,request:h,response:v,dom:y}):t.shouldCollectDuration(f,g,h,v,y)?f<Math.floor(g)+Math.floor(h)+Math.floor(v)+Math.floor(y)?s._InternalLogging.throwInternal(i.LoggingSeverity.WARNING,i._InternalMessageId.ClientPerformanceMathError,"client performance math error.",{total:f,network:g,request:h,response:v,dom:y}):(p.durationMs=f,p.perfTotal=p.duration=a.Util.msToTimeSpan(f),p.networkConnect=a.Util.msToTimeSpan(g),p.sentRequest=a.Util.msToTimeSpan(h),p.receivedResponse=a.Util.msToTimeSpan(v),p.domProcessing=a.Util.msToTimeSpan(y),p.isValid=!0):s._InternalLogging.throwInternal(i.LoggingSeverity.WARNING,i._InternalMessageId.InvalidDurationValue,"Invalid page load duration value. Browser perf data won't be sent.",{total:f,network:g,request:h,response:v,dom:y})}return p.url=r.DataSanitizer.sanitizeUrl(o),p.name=r.DataSanitizer.sanitizeString(n)||a.Util.NotSpecified,p.properties=r.DataSanitizer.sanitizeProperties(c),p.measurements=r.DataSanitizer.sanitizeMeasurements(u),p}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!1},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 n=void 0;return isNaN(e)||isNaN(t)||(n=Math.max(t-e,0)),n},t.shouldCollectDuration=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var i=["googlebot","adsbot-google","apis-google","mediapartners-google"],r=navigator.userAgent,o=!1;if(r)for(var a=0;a<i.length;a++)o=o||-1!==r.toLowerCase().indexOf(i[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}(n.PageViewPerfData);t.PageViewPerformance=l}.apply(t,i))||(e.exports=r)},function(e,t,n){var i,r,o=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();i=[n,t,n(7)],void 0===(r=function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(e){function t(){var t=e.call(this)||this;return t.ver=2,t.properties={},t.measurements={},t}return o(t,e),t}(n.PageViewData);t.PageViewPerfData=i}.apply(t,i))||(e.exports=r)},function(e,t,n){var i,r,o=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();i=[n,t,n(9),n(1)],void 0===(r=function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){function t(t,n){var r=e.call(this)||this;return r.aiDataContract={baseType:i.FieldType.Required,baseData:i.FieldType.Required},r.baseType=t,r.baseData=n,r}return o(t,e),t}(n.Data);t.Data=r}.apply(t,i))||(e.exports=r)},function(e,t,n){var i;void 0===(i=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,[n,t]))||(e.exports=i)},function(e,t,n){var i;void 0===(i=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=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=n}.apply(t,[n,t]))||(e.exports=i)},function(e,t,n){var i,r;i=[n,t,n(0),n(4)],void 0===(r=function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t,n){this.pageViewPerformanceSent=!1,this.overridePageViewDuration=!1,this.overridePageViewDuration=t,this.appInsights=e,n&&(this._channel=n.getTransmissionControl())}return e.prototype.trackPageView=function(e,t){var r=this,o=e.name;(i.CoreUtils.isNullOrUndefined(o)||"string"!=typeof o)&&(e.name=window.document&&window.document.title||"");var a=e.uri;if((i.CoreUtils.isNullOrUndefined(a)||"string"!=typeof a)&&(e.uri=window.location&&window.location.href||""),!n.PageViewPerformance.isPerformanceTimingSupported())return this.appInsights.sendPageViewInternal(e,t),this._channel.flush(),void n._InternalLogging.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=n.PageViewPerformance.getPerformanceTiming().navigationStart;l=n.PageViewPerformance.getDuration(c,+new Date),n.PageViewPerformance.shouldCollectDuration(l)||(l=void 0);var u=e.duration;!this.overridePageViewDuration&&isNaN(u)||(isNaN(u)&&(e.duration=l),this.appInsights.sendPageViewInternal(e,t),this._channel.flush(),s=!0);var p=setInterval(function(){try{if(n.PageViewPerformance.isPerformanceTimingDataReady()){clearInterval(p);var i=new n.PageViewPerformance(o,a,null,t,void 0);i.getIsValid()||s?(s||(e.duration=i.getDurationMs(),r.appInsights.sendPageViewInternal(e,t)),r.pageViewPerformanceSent||(r.appInsights.sendPageViewPerformanceInternal(i),r.pageViewPerformanceSent=!0),r._channel.flush()):(e.duration=l,r.appInsights.sendPageViewInternal(e,t),r._channel.flush())}else n.PageViewPerformance.getDuration(c,+new Date)>6e4&&(clearInterval(p),s||(e.duration=6e4,r.appInsights.sendPageViewInternal(e,t),r._channel.flush()))}catch(e){n._InternalLogging.throwInternal(n.LoggingSeverity.CRITICAL,n._InternalMessageId.TrackPVFailedCalc,"trackPageView failed on page load calculation: "+n.Util.getExceptionName(e),{exception:n.Util.dump(e)})}},100)},e}();t.PageViewManager=r}.apply(t,i))||(e.exports=r)},function(e,t,n){var i,r;i=[n,t,n(14),n(15),n(16),n(17)],void 0===(r=function(e,t,n,i,r,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(){this._extensions=new Array}return e.prototype.initialize=function(e,t){var n=this;if(!t||0===t.length)throw Error("At least one extension channel is required");if(!e||r.CoreUtils.isNullOrUndefined(e.instrumentationKey))throw Error("Please provide instrumentation key");this.config=e,this._notificationManager=new o.NotificationManager,this.config.extensions=this.config.extensions?this.config.extensions:{},this.config.extensions.NotificationManager=this._notificationManager,t.forEach(function(e){if(r.CoreUtils.isNullOrUndefined(e.initialize))throw Error("Extensions must provide callback to initialize")}),this._extensions=t.sort(function(e,t){var n=e,i=t,r=typeof n.processTelemetry,o=typeof i.processTelemetry;return"function"===r&&"function"===o?n.priority>i.priority?1:-1:"function"===r&&"function"!==o?1:"function"!==r&&"function"===o?-1:void 0});for(var i=0;i<this._extensions.length-1;i++)this._extensions[i]&&"function"!=typeof this._extensions[i].processTelemetry||this._extensions[i].setNextPlugin(this._extensions[i+1]);this._extensions.forEach(function(e){return e.initialize(n.config,n,n._extensions)})},e.prototype.getTransmissionControl=function(){for(var e=0;e<this._extensions.length;e++){var t=this._extensions[e].priority;if(!r.CoreUtils.isNullOrUndefined(t)&&t>=n.MinChannelPriorty)return this._extensions[e]}throw new Error("No channel extension found")},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");this._validateTelmetryItem(e),e.instrumentationKey||(e.instrumentationKey=this.config.instrumentationKey);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._validateTelmetryItem=function(e){if(r.CoreUtils.isNullOrUndefined(e.name))throw this._notifiyInvalidEvent(e),Error("telemetry name required");if(r.CoreUtils.isNullOrUndefined(e.timestamp))throw this._notifiyInvalidEvent(e),Error("telemetry timestamp required");if(r.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}.apply(t,i))||(e.exports=r)},function(e,t,n){var i,r;i=[n,t,n(0),n(47),n(48),n(49),n(46),n(50),n(51),n(54),n(55),n(4)],void 0===(r=function(e,t,n,i,r,o,a,s,l,c,u,p){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var d=function(){function e(e,t){this._config=e,this._core=t,this._telemetryInitializers=[],"undefined"!=typeof window&&(this._sessionManager=new u._SessionManager(e),this.application=new i.Application,this.device=new r.Device,this.internal=new o.Internal(e),this.location=new a.Location,this.user=new c.User(e),this.operation=new s.Operation,this.session=new u.Session,this.sample=new l.Sample(e.sampleRate())),this._addDefaultTelemetryInitializers()}return e.prototype.addTelemetryInitializer=function(e){this._telemetryInitializers.push(e)},e.prototype.track=function(e){return p.CoreUtils.isNullOrUndefined(e)?n._InternalLogging.throwInternal(n.LoggingSeverity.CRITICAL,n._InternalMessageId.TrackArgumentsNotSpecified,"cannot call .track() with a null or undefined argument",null,!0):(e.name===n.PageView.envelopeType&&n._InternalLogging.resetInternalMessageCount(),this.session&&"string"!=typeof this.session.id&&this._sessionManager.update(),this._track(e)),e},e.prototype._addDefaultTelemetryInitializers=function(){if(!this._config.isBrowserLinkTrackingEnabled()){var e=["/browserLinkSignalR/","/__browserLink/"];this.addTelemetryInitializer(function(t){if(t.name===n.RemoteDependencyData.envelopeType){var i=t.data;if(i&&i.baseData)for(var r=0;r<e.length;r++)if(i.baseData.name.indexOf(e[r])>=0)return!1}return!0})}},e.prototype._track=function(e){var t={};this.session&&("string"==typeof this.session.id?this._applySessionContext(t,this.session):this._applySessionContext(t,this._sessionManager.automaticSession)),this._applyApplicationContext(t,this.application),this._applyDeviceContext(t,this.device),this._applyInternalContext(t,this.internal),this._applyLocationContext(t,this.location),this._applySampleContext(t,this.sample),this._applyUserContext(t,this.user),this._applyOperationContext(t,this.operation),e.tags.push(t),e.instrumentationKey=this._config.instrumentationKey();var i=!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])){i=!0;break}}}catch(e){i=!0,n._InternalLogging.throwInternal(n.LoggingSeverity.CRITICAL,n._InternalMessageId.TelemetryInitializerFailed,"One of telemetry initializers failed, telemetry item will not be sent: "+n.Util.getExceptionName(e),{exception:n.Util.dump(e)},!0)}if(!i)if(e.name===n.Metric.envelopeType||this.sample.isSampledIn(e)){var s=this._config.instrumentationKey().replace(/-/g,"");e.name=e.name.replace("{0}",s),this._core.track(e)}else n._InternalLogging.throwInternal(n.LoggingSeverity.WARNING,n._InternalMessageId.TelemetrySampledAndNotSent,"Telemetry is sampled and not sent to the AI service.",{SampleRate:this.sample.sampleRate},!0);return e},e.prototype._applyApplicationContext=function(e,t){if(t){var i=new n.ContextTagKeys;"string"==typeof t.ver&&(e[i.applicationVersion]=t.ver),"string"==typeof t.build&&(e[i.applicationBuild]=t.build)}},e.prototype._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.prototype._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.prototype._applyLocationContext=function(e,t){if(t){var i=new n.ContextTagKeys;"string"==typeof t.ip&&(e[i.locationIp]=t.ip)}},e.prototype._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.prototype._applySampleContext=function(e,t){t&&(e.sampleRate=t.sampleRate)},e.prototype._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.prototype._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.TelemetryContext=d}.apply(t,i))||(e.exports=r)},function(e,t,n){var i;void 0===(i=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){return function(){}}();t.Location=n}.apply(t,[n,t]))||(e.exports=i)},function(e,t,n){var i;void 0===(i=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){return function(){}}();t.Application=n}.apply(t,[n,t]))||(e.exports=i)},function(e,t,n){var i;void 0===(i=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){return function(){this.id="browser",this.type="Browser"}}();t.Device=n}.apply(t,[n,t]))||(e.exports=i)},function(e,t,n){var i,r;i=[n,t,n(13)],void 0===(r=function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){return function(e){this.sdkVersion=(e.sdkExtension()?e.sdkExtension()+"_":"")+"javascript:"+n.ApplicationInsights.Version}}();t.Internal=i}.apply(t,i))||(e.exports=r)},function(e,t,n){var i,r;i=[n,t,n(0)],void 0===(r=function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){return function(){this.id=n.Util.newId(),window&&window.location&&window.location.pathname&&(this.name=window.location.pathname)}}();t.Operation=i}.apply(t,i))||(e.exports=r)},function(e,t,n){var i,r;i=[n,t,n(52),n(0)],void 0===(r=function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e){this.INT_MAX_VALUE=2147483647,(e>100||e<0)&&(i._InternalLogging.throwInternal(i.LoggingSeverity.WARNING,i._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 n.SamplingScoreGenerator}return e.prototype.isSampledIn=function(e){return!0},e}();t.Sample=r}.apply(t,i))||(e.exports=r)},function(e,t,n){var i,r;i=[n,t,n(53),n(0)],void 0===(r=function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(){this.hashCodeGeneragor=new n.HashCodeScoreGenerator}return e.prototype.getSamplingScore=function(e){var t=new i.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,i))||(e.exports=r)},function(e,t,n){var i;void 0===(i=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=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 n=5381,i=0;i<t.length;++i)n=(n<<5)+n+t.charCodeAt(i),n&=n;return Math.abs(n)},e.INT_MAX_VALUE=2147483647,e.MIN_INPUT_LENGTH=8,e}();t.HashCodeScoreGenerator=n}.apply(t,[n,t]))||(e.exports=i)},function(e,t,n){var i,r;i=[n,t,n(0)],void 0===(r=function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(t){var i=n.Util.getCookie(e.userCookieName);if(i){var r=i.split(e.cookieSeparator);r.length>0&&(this.id=r[0])}if(this.config=t,!this.id){this.id=n.Util.newId();var o=new Date,a=n.Util.toISOStringForIE8(o);this.accountAcquisitionDate=a,o.setTime(o.getTime()+31536e6);var s=[this.id,a],l=this.config.cookieDomain?this.config.cookieDomain():void 0;n.Util.setCookie(e.userCookieName,s.join(e.cookieSeparator)+";expires="+o.toUTCString(),l),n.Util.removeStorage("ai_session")}this.accountId=t.accountId?t.accountId():void 0;var c=n.Util.getCookie(e.authUserCookieName);if(c){var u=(c=decodeURI(c)).split(e.cookieSeparator);u[0]&&(this.authenticatedId=u[0]),u.length>1&&u[1]&&(this.accountId=u[1])}}return e.prototype.setAuthenticatedUserContext=function(t,i,r){if(void 0===r&&(r=!1),!this.validateUserInput(t)||i&&!this.validateUserInput(i))n._InternalLogging.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 o=this.authenticatedId;i&&(this.accountId=i,o=[this.authenticatedId,this.accountId].join(e.cookieSeparator)),r&&n.Util.setCookie(e.authUserCookieName,encodeURI(o),this.config.cookieDomain())}},e.prototype.clearAuthenticatedUserContext=function(){this.authenticatedId=null,this.accountId=null,n.Util.deleteCookie(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=i}.apply(t,i))||(e.exports=r)},function(e,t,n){var i,r;i=[n,t,n(0),n(56)],void 0===(r=function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){return function(){}}();t.Session=r;var o=function(){function e(t){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.dateTime.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=n.Util.getCookie("ai_session");if(e&&"function"==typeof e.split)this.initializeAutomaticSessionWithData(e);else{var t=n.Util.getStorage("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 i=+t[1];this.automaticSession.acquisitionDate=+new Date(i),this.automaticSession.acquisitionDate=this.automaticSession.acquisitionDate>0?this.automaticSession.acquisitionDate:0}if(t.length>2){var r=+t[2];this.automaticSession.renewalDate=+new Date(r),this.automaticSession.renewalDate=this.automaticSession.renewalDate>0?this.automaticSession.renewalDate:0}}catch(e){n._InternalLogging.throwInternal(n.LoggingSeverity.CRITICAL,n._InternalMessageId.ErrorParsingAISessionCookie,"Error parsing ai_session cookie, session will be reset: "+n.Util.getExceptionName(e),{exception:n.Util.dump(e)})}0==this.automaticSession.renewalDate&&n._InternalLogging.throwInternal(n.LoggingSeverity.WARNING,n._InternalMessageId.SessionRenewalDateIsZero,"AI session renewal date is 0, session will be reset.")},e.prototype.renew=function(){var e=i.dateTime.Now();this.automaticSession.id=n.Util.newId(),this.automaticSession.acquisitionDate=e,this.automaticSession.renewalDate=e,this.setCookie(this.automaticSession.id,this.automaticSession.acquisitionDate,this.automaticSession.renewalDate),n.Util.canUseLocalStorage()||n._InternalLogging.throwInternal(n.LoggingSeverity.WARNING,n._InternalMessageId.BrowserDoesNotSupportLocalStorage,"Browser does not support local storage. Session durations will be inaccurate.")},e.prototype.setCookie=function(e,t,r){var o=t+this.config.sessionExpirationMs(),a=r+this.config.sessionRenewalMs(),s=new Date,l=[e,t,r];o<a?s.setTime(o):s.setTime(a);var c=this.config.cookieDomain?this.config.cookieDomain():null;n.Util.setCookie("ai_session",l.join("|")+";expires="+s.toUTCString(),c),this.cookieUpdatedTimestamp=i.dateTime.Now()},e.prototype.setStorage=function(e,t,i){n.Util.setStorage("ai_session",[e,t,i].join("|"))},e.acquisitionSpan=864e5,e.renewalSpan=18e5,e.cookieUpdateInterval=6e4,e}();t._SessionManager=o}.apply(t,i))||(e.exports=r)},function(e,t,n){var i;void 0===(i=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(){}return e.IsNullOrUndefined=function(e){return void 0===e||null===e},e}();t.extensions=n;var i=function(){function e(){}return e.GetLength=function(e){var t=0;if(!n.IsNullOrUndefined(e)){var i="";try{i=e.toString()}catch(e){}t=i.length,t=isNaN(t)?0:t}return t},e}();t.stringUtils=i;var r=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.IsNullOrUndefined(e)||n.IsNullOrUndefined(t)||(i=t-e),i},e}();t.dateTime=r;var o=function(){function e(){}return e.AttachEvent=function(e,t,i){var r=!1;return n.IsNullOrUndefined(e)||(n.IsNullOrUndefined(e.attachEvent)?n.IsNullOrUndefined(e.addEventListener)||(e.addEventListener(t,i,!1),r=!0):(e.attachEvent("on"+t,i),r=!0)),r},e.DetachEvent=function(e,t,i){n.IsNullOrUndefined(e)||(n.IsNullOrUndefined(e.detachEvent)?n.IsNullOrUndefined(e.removeEventListener)||e.removeEventListener(t,i,!1):e.detachEvent("on"+t,i))},e}();t.EventHelper=o}.apply(t,[n,t]))||(e.exports=i)},function(e,t,n){var i,r;i=[n,t,n(0),n(4)],void 0===(r=function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(){}return e.createItem=function(t,n,r,o,a){if(i.CoreUtils.isNullOrUndefined(t)||i.CoreUtils.isNullOrUndefined(n)||i.CoreUtils.isNullOrUndefined(r))throw Error("pageView doesn't contain all required fields");return e.creator.create(t,n,r,o,a)},e.prototype.create=function(e,t,r,o,a){if(r=n.DataSanitizer.sanitizeString(r)||n.Util.NotSpecified,t===n.PageView.dataType){var s={name:r,timestamp:new Date,instrumentationKey:"",ctx:a||{},tags:[],data:{},baseType:t,baseData:e};if(!i.CoreUtils.isNullOrUndefined(o))for(var l in o)o.hasOwnProperty(l)&&(s.data[l]=o[l]);return s}throw Error("Not implemented")},e.creator=new e,e}();t.TelemetryItemCreator=r}.apply(t,i))||(e.exports=r)},function(e,t,n){var i,r;i=[n,t,n(4),n(12),n(0),n(59)],void 0===(r=function(e,t,n,i,r,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(t){t.queue=t.queue||[];var n=t.config||{};n&&!n.instrumentationKey&&(n=t,i.ApplicationInsights.Version="2.0.0"),this.appInsights=new i.ApplicationInsights,n=e.getDefaultConfig(n,this.appInsights.identifier),this.snippet=t,this.config=n}return e.prototype.loadAppInsights=function(){this.core=new n.AppInsightsCore;var e=[],t=new o.Sender;return e.push(t),e.push(this.appInsights),this.core.initialize(this.config,e),this.appInsights.initialize(this.config,this.core,e),t.initialize(this.config),this.appInsights},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.config.disableFlushOnBeforeUnload&&"onbeforeunload"in window){r.Util.addEventHandler("beforeunload",function(){this.core.getTransmissionControl().flush(!0),e.context._sessionManager.backup()})||r._InternalLogging.throwInternal(r.LoggingSeverity.CRITICAL,r._InternalMessageId.FailedToAddHandlerForOnBeforeUnload,"Could not add handler for beforeunload")}},e.getDefaultConfig=function(e,t){e||(e={}),e&&(t=t||"AppAnalytics");var n=e.extensions?e.extensions[t]:{};return e.endpointUrl=e.endpointUrl||"https://dc.services.visualstudio.com/v2/track",n.sessionRenewalMs=18e5,n.sessionExpirationMs=864e5,n.enableDebug=r.Util.stringToBoolOrDefault(n.enableDebug),n.disableExceptionTracking=r.Util.stringToBoolOrDefault(n.disableExceptionTracking),n.verboseLogging=r.Util.stringToBoolOrDefault(n.verboseLogging),n.diagnosticLogInterval=n.diagnosticLogInterval||1e4,n.autoTrackPageVisitTime=r.Util.stringToBoolOrDefault(n.autoTrackPageVisitTime),(isNaN(n.samplingPercentage)||n.samplingPercentage<=0||n.samplingPercentage>=100)&&(n.samplingPercentage=100),n.disableAjaxTracking=r.Util.stringToBoolOrDefault(n.disableAjaxTracking),n.maxAjaxCallsPerView=isNaN(n.maxAjaxCallsPerView)?500:n.maxAjaxCallsPerView,n.disableCorrelationHeaders=r.Util.stringToBoolOrDefault(n.disableCorrelationHeaders),n.correlationHeaderExcludedDomains=n.correlationHeaderExcludedDomains||["*.blob.core.windows.net","*.blob.core.chinacloudapi.cn","*.blob.core.cloudapi.de","*.blob.core.usgovcloudapi.net"],n.disableFlushOnBeforeUnload=r.Util.stringToBoolOrDefault(n.disableFlushOnBeforeUnload),n.isCookieUseDisabled=r.Util.stringToBoolOrDefault(n.isCookieUseDisabled),n.isStorageUseDisabled=r.Util.stringToBoolOrDefault(n.isStorageUseDisabled),n.isBrowserLinkTrackingEnabled=r.Util.stringToBoolOrDefault(n.isBrowserLinkTrackingEnabled),n.enableCorsCorrelation=r.Util.stringToBoolOrDefault(n.enableCorsCorrelation),e},e}();t.Initialization=a}.apply(t,i))||(e.exports=r)},function(e,t,n){var i,r;i=[n,t,n(60)],void 0===(r=function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sender=n.Sender}.apply(t,i))||(e.exports=r)},function(e,t,n){var i,r;i=[n,t,n(62),n(63),n(64),n(65),n(66),n(61),n(67),n(68),n(69),n(70),n(0),n(4)],void 0===(r=function(e,t,n,i,r,o,a,s,l,c,u,p,d,f){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var g=function(){function e(){this.priority=200,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){d._InternalLogging.throwInternal(d.LoggingSeverity.CRITICAL,d._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){(this.identifier="AppInsightsChannelPlugin",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 n.SessionStorageSendBuffer(this._config):new n.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 d._InternalLogging.throwInternal(d.LoggingSeverity.CRITICAL,d._InternalMessageId.CannotSendEmptyTelemetry,"Cannot send empty telemetry");if(!this._sender)return void d._InternalLogging.throwInternal(d.LoggingSeverity.CRITICAL,d._InternalMessageId.SenderNotInitialized,"Sender was not initialized");if(!e._validate(t))return void d._InternalLogging.throwInternal(d.LoggingSeverity.CRITICAL,d._InternalMessageId.TelemetryEnvelopeInvalid,"Invalid telemetry envelope");var n=e._constructEnvelope(t);if(!n)return void d._InternalLogging.throwInternal(d.LoggingSeverity.CRITICAL,d._InternalMessageId.CreateEnvelopeError,"Unable to create an AppInsights envelope");var i=p.Serializer.serialize(n),r=this._buffer.getItems(),o=this._buffer.batchPayloads(r);o&&o.length+i.length>this._config.maxBatchSizeInBytes()&&this.triggerSend(),this._buffer.enqueue(i),this._setupTimer()}catch(e){d._InternalLogging.throwInternal(d.LoggingSeverity.WARNING,d._InternalMessageId.FailedAddingTelemetryToBuffer,"Failed adding telemetry to the sender's buffer, some telemetry will be lost: "+d.Util.getExceptionName(e),{exception:d.Util.dump(e)})}f.CoreUtils.isNullOrUndefined(this._nextPlugin)||this._nextPlugin.processTelemetry(t)},e.prototype.setNextPlugin=function(e){this._nextPlugin=e},e.prototype._xhrReadyStateChange=function(e,t,n){if(4===e.readyState){var i=null;this._appId||(i=this._parseResponse(e.responseText||e.response))&&i.appId&&(this._appId=i.appId),(e.status<200||e.status>=300)&&0!==e.status?!this._config.isRetryDisabled()&&this._isRetriable(e.status)?(this._resendPayload(t),d._InternalLogging.throwInternal(d.LoggingSeverity.WARNING,d._InternalMessageId.TransmissionFailed,". Response code "+e.status+". Will retry to send "+t.length+" items.")):this._onError(t,this._formatErrorMessageXhr(e)):206===e.status?(i||(i=this._parseResponse(e.responseText||e.response)),i&&!this._config.isRetryDisabled()?this._onPartialSuccess(t,i):this._onError(t,this._formatErrorMessageXhr(e))):(this._consecutiveErrors=0,this._onSuccess(t,n))}},e.prototype.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)&&d._InternalLogging.throwInternal(d.LoggingSeverity.CRITICAL,d._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,n){d._InternalLogging.throwInternal(d.LoggingSeverity.WARNING,d._InternalMessageId.OnError,"Failed to send telemetry.",{message:t}),this._buffer.clearSent(e)},e.prototype._onPartialSuccess=function(e,t){for(var n=[],i=[],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)?i.push(s):n.push(s)}e.length>0&&this._onSuccess(e,t.itemsAccepted),n.length>0&&this._onError(n,this._formatErrorMessageXhr(null,["partial success",t.itemsAccepted,"of",t.itemsReceived].join(" "))),i.length>0&&(this._resendPayload(i),d._InternalLogging.throwInternal(d.LoggingSeverity.WARNING,d._InternalMessageId.TransmissionFailed,"Partial success. Delivered: "+e.length+", Failed: "+n.length+". Will retry to send "+i.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 n=this._parseResponse(e.responseText);n&&n.itemsReceived&&n.itemsReceived>n.itemsAccepted&&!this._config.isRetryDisabled()?this._onPartialSuccess(t,n):this._onError(t,this._formatErrorMessageXdr(e))}else this._consecutiveErrors=0,this._onSuccess(t,0)},e._constructEnvelope=function(e){switch(e.baseType){case d.Event.dataType:return i.EventEnvelopeCreator.EventEnvelopeCreator.Create(e);case d.Trace.dataType:return i.TraceEnvelopeCreator.TraceEnvelopeCreator.Create(e);case d.PageView.dataType:return i.PageViewEnvelopeCreator.PageViewEnvelopeCreator.Create(e);case d.PageViewPerformance.dataType:return i.PageViewPerformanceEnvelopeCreator.PageViewPerformanceEnvelopeCreator.Create(e);case d.Exception.dataType:return i.ExceptionEnvelopeCreator.ExceptionEnvelopeCreator.Create(e);case d.Metric.dataType:return i.MetricEnvelopeCreator.MetricEnvelopeCreator.Create(e);case d.RemoteDependencyData.dataType:return i.DependencyEnvelopeCreator.DependencyEnvelopeCreator.Create(e);default:return null}},e._getDefaultAppInsightsChannelConfig=function(e,t){var n={},i=e.extensions&&e.extensions[t]?e.extensions[t]:{};return n.endpointUrl=function(){return e.endpointUrl||"https://dc.services.visualstudio.com/v2/track"},n.emitLineDelimitedJson=function(){return d.Util.stringToBoolOrDefault(i.emitLineDelimitedJson)},n.maxBatchInterval=function(){return isNaN(i.maxBatchInterval)?15e3:i.maxBatchInterval},n.maxBatchSizeInBytes=function(){return i.maxBatchSizeInBytes>0?i.maxBatchSizeInBytes:102400},n.disableTelemetry=function(){return d.Util.stringToBoolOrDefault(i.disableTelemetry)},n.enableSessionStorageBuffer=function(){return d.Util.stringToBoolOrDefault(i.enableSessionStorageBuffer,!0)},n.isRetryDisabled=function(){return d.Util.stringToBoolOrDefault(i.isRetryDisabled)},n.isBeaconApiDisabled=function(){return d.Util.stringToBoolOrDefault(i.isBeaconApiDisabled,!0)},n},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)}return!1},e.prototype._beaconSender=function(e,t){var n=this._config.endpointUrl(),i=this._buffer.batchPayloads(e),r=new Blob([i],{type:"text/plain;charset=UTF-8"});navigator.sendBeacon(n,r)?this._buffer.markAsSent(e):d._InternalLogging.throwInternal(d.LoggingSeverity.CRITICAL,d._InternalMessageId.TransmissionFailed,". Failed to send telemetry with Beacon API.")},e.prototype._xhrSender=function(e,t){var n=this,i=new XMLHttpRequest;i[d.DisabledPropertyName]=!0,i.open("POST",this._config.endpointUrl(),t),i.setRequestHeader("Content-type","application/json"),d.Util.isInternalApplicationInsightsEndpoint(this._config.endpointUrl())&&i.setRequestHeader(d.RequestHeaders.sdkContextHeader,d.RequestHeaders.sdkContextHeaderAppIdRequest),i.onreadystatechange=function(){return n._xhrReadyStateChange(i,e,e.length)},i.onerror=function(t){return n._onError(e,n._formatErrorMessageXhr(i),t)};var r=this._buffer.batchPayloads(e);i.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){d._InternalLogging.throwInternal(d.LoggingSeverity.CRITICAL,d._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,n=e;t<n.length;t++){var i=n[t];this._buffer.enqueue(i)}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,n=Math.floor(Math.random()*t*10)+1;e=Math.max(Math.min(n,3600),10)}var i=Date.now()+1e3*e;this._retryAt=i},e.prototype._setupTimer=function(){var e=this;if(!this._timeoutHandle){var t=this._retryAt?Math.max(0,this._retryAt-Date.now()):0,n=Math.max(this._config.maxBatchInterval(),t);this._timeoutHandle=setTimeout(function(){e.triggerSend()},n)}},e.prototype._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 n=this,i=new XDomainRequest;i.onload=function(){return n._xdrOnLoad(i,e)},i.onerror=function(t){return n._onError(e,n._formatErrorMessageXdr(i),t)};var r=window.location.protocol;if(0!==this._config.endpointUrl().lastIndexOf(r,0))return d._InternalLogging.throwInternal(d.LoggingSeverity.WARNING,d._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?:)/,"");i.open("POST",o);var a=this._buffer.batchPayloads(e);i.send(a),this._buffer.markAsSent(e)},e.prototype._formatErrorMessageXdr=function(e,t){return e?"XDomainRequest,Response:"+e.responseText||"":t},e}();t.Sender=g}.apply(t,i))||(e.exports=r)},function(e,t,n){var i;void 0===(i=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(){}return e.prototype.Validate=function(e){return!1},e.MetricValidator=new e,e}();t.MetricValidator=n}.apply(t,[n,t]))||(e.exports=i)},function(e,t,n){var i,r;i=[n,t,n(0)],void 0===(r=function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=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=i;var r=function(){function e(t){this._bufferFullMessageSent=!1,this._config=t;var n=this.getBuffer(e.BUFFER_KEY),i=this.getBuffer(e.SENT_BUFFER_KEY);this._buffer=n.concat(i),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||(n._InternalLogging.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&&(n._InternalLogging.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 n=this.getBuffer(e.SENT_BUFFER_KEY);n=this.removePayloadsFromBuffer(t,n),this.setBuffer(e.SENT_BUFFER_KEY,n)},e.prototype.removePayloadsFromBuffer=function(e,t){var n=[];for(var i in t){var r=!1;for(var o in e)if(e[o]===t[i]){r=!0;break}r||n.push(t[i])}return n},e.prototype.getBuffer=function(e){try{var t=n.Util.getSessionStorage(e);if(t){var i=JSON.parse(t);if(i)return i}}catch(t){n._InternalLogging.throwInternal(n.LoggingSeverity.CRITICAL,n._InternalMessageId.FailedToRestoreStorageBuffer," storage key: "+e+", "+n.Util.getExceptionName(t),{exception:n.Util.dump(t)})}return[]},e.prototype.setBuffer=function(e,t){try{var i=JSON.stringify(t);n.Util.setSessionStorage(e,i)}catch(t){n.Util.setSessionStorage(e,JSON.stringify([])),n._InternalLogging.throwInternal(n.LoggingSeverity.WARNING,n._InternalMessageId.FailedToSetStorageBuffer," storage key: "+e+", "+n.Util.getExceptionName(t)+". Buffer cleared",{exception:n.Util.dump(t)})}},e.BUFFER_KEY="AI_buffer",e.SENT_BUFFER_KEY="AI_sentBuffer",e.MAX_BUFFER_SIZE=2e3,e}();t.SessionStorageSendBuffer=r}.apply(t,i))||(e.exports=r)},function(e,t,n){var i,r,o=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();i=[n,t,n(0),n(4)],void 0===(r=function(e,t,n,i){"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 n in e)if(e.hasOwnProperty(n)){var i=e[n];"number"!=typeof i&&(t||(t={}),t[n]=i)}return t},e.extractPropsAndMeasurements=function(e,t,n){if(!i.CoreUtils.isNullOrUndefined(e))for(var r in e)if(e.hasOwnProperty(r)){var o=e[r];"number"==typeof o?n[r]=o:t[r]=o}},e.createEnvelope=function(e,i,r){var o=new n.Envelope(r,e);o.iKey=i.instrumentationKey;var a=i.instrumentationKey.replace(/-/g,"");for(var s in o.name=o.name.replace("{0}",a),i.ctx)i.ctx.hasOwnProperty(s)&&t.ContextTagKeys.indexOf(s)>=0&&(o.tags[s]=i.ctx[s]);return i.tags.forEach(function(e){for(var n in e)e.hasOwnProperty(n)&&t.ContextTagKeys.indexOf(n)>=0&&(o.tags[n]=e[n])}),o},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){i.CoreUtils.isNullOrUndefined(e.baseData)&&n._InternalLogging.throwInternal(n.LoggingSeverity.CRITICAL,n._InternalMessageId.TelemetryEnvelopeInvalid,"telemetryItem.baseData cannot be null.");var t={},o={};r.extractPropsAndMeasurements(e.data,o,t);var a=e.baseData.id,s=e.baseData.absoluteUrl,l=e.baseData.command,c=e.baseData.totalTime,u=e.baseData.success,p=e.baseData.resultCode,d=e.baseData.method,f=new n.RemoteDependencyData(a,s,l,c,u,p,d,o,t),g=new n.Data(n.RemoteDependencyData.dataType,f);return r.createEnvelope(n.RemoteDependencyData.envelopeType,e,g)},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){i.CoreUtils.isNullOrUndefined(e.baseData)&&n._InternalLogging.throwInternal(n.LoggingSeverity.CRITICAL,n._InternalMessageId.TelemetryEnvelopeInvalid,"telemetryItem.baseData cannot be null.");var t={},o={};r.extractPropsAndMeasurements(e.data,t,o);var a=e.baseData.name,s=new n.Event(a,t,o),l=new n.Data(n.Event.dataType,s);return r.createEnvelope(n.Event.envelopeType,e,l)},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){i.CoreUtils.isNullOrUndefined(e.baseData)&&n._InternalLogging.throwInternal(n.LoggingSeverity.CRITICAL,n._InternalMessageId.TelemetryEnvelopeInvalid,"telemetryItem.baseData cannot be null.");var t={},o={};r.extractPropsAndMeasurements(e.data,t,o);var a=e.baseData.exception,s=e.baseData.severityLevel,l=new n.Exception(a,t,o,s),c=new n.Data(n.Exception.dataType,l);return r.createEnvelope(n.Exception.envelopeType,e,c)},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){i.CoreUtils.isNullOrUndefined(e.baseData)&&n._InternalLogging.throwInternal(n.LoggingSeverity.CRITICAL,n._InternalMessageId.TelemetryEnvelopeInvalid,"telemetryItem.baseData cannot be null.");var t=r.extractProperties(e.data),o=e.baseData.name,a=e.baseData.average,s=e.baseData.sampleCount,l=e.baseData.min,c=e.baseData.max,u=new n.Metric(o,a,s,l,c,t),p=new n.Data(n.Metric.dataType,u);return r.createEnvelope(n.Metric.envelopeType,e,p)},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){i.CoreUtils.isNullOrUndefined(e.baseData)&&n._InternalLogging.throwInternal(n.LoggingSeverity.CRITICAL,n._InternalMessageId.TelemetryEnvelopeInvalid,"telemetryItem.baseData cannot be null.");var t={},o={};r.extractPropsAndMeasurements(e.data,t,o);var a=e.baseData.name,s=e.baseData.uri,l=e.baseData.duration;if(i.CoreUtils.isNullOrUndefined(e.baseData.refUri)||(t.refUri=e.baseData.refUri),i.CoreUtils.isNullOrUndefined(e.baseData.pageType)||(t.pageType=e.baseData.pageType),i.CoreUtils.isNullOrUndefined(e.baseData.isLoggedIn)||(t.isLoggedIn=e.baseData.isLoggedIn),!i.CoreUtils.isNullOrUndefined(e.baseData.pageTags)){var c=e.baseData.pageTags;for(var u in c)c.hasOwnProperty(u)&&(t[u]=c[u])}var p=new n.PageView(a,s,l,t,o),d=new n.Data(n.PageView.dataType,p);return r.createEnvelope(n.PageView.envelopeType,e,d)},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){i.CoreUtils.isNullOrUndefined(e.baseData)&&n._InternalLogging.throwInternal(n.LoggingSeverity.CRITICAL,n._InternalMessageId.TelemetryEnvelopeInvalid,"telemetryItem.baseData cannot be null.");var t={},o={};r.extractPropsAndMeasurements(e.data,t,o);var a=e.baseData.name,s=e.baseData.uri,l=e.baseData.duration,c=new n.PageViewPerformance(a,s,l,t,o),u=new n.Data(n.PageViewPerformance.dataType,c);return r.createEnvelope(n.PageViewPerformance.envelopeType,e,u)},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){i.CoreUtils.isNullOrUndefined(e.baseData)&&n._InternalLogging.throwInternal(n.LoggingSeverity.CRITICAL,n._InternalMessageId.TelemetryEnvelopeInvalid,"telemetryItem.baseData cannot be null.");var t=e.baseData.message,o=e.baseData.severityLevel,a=r.extractProperties(e.data),s=new n.Trace(t,a,o),l=new n.Data(n.Trace.dataType,s);return r.createEnvelope(n.Trace.envelopeType,e,l)},t.TraceEnvelopeCreator=new t,t}(r);t.TraceEnvelopeCreator=d}.apply(t,i))||(e.exports=r)},function(e,t,n){var i;void 0===(i=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(){}return e.prototype.Validate=function(e){return!0},e.EventValidator=new e,e}();t.EventValidator=n}.apply(t,[n,t]))||(e.exports=i)},function(e,t,n){var i;void 0===(i=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(){}return e.prototype.Validate=function(e){return!0},e.TraceValidator=new e,e}();t.TraceValidator=n}.apply(t,[n,t]))||(e.exports=i)},function(e,t,n){var i;void 0===(i=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(){}return e.prototype.Validate=function(e){return!0},e._validateExceptions=function(e){return!0},e.ExceptionValidator=new e,e}();t.ExceptionValidator=n}.apply(t,[n,t]))||(e.exports=i)},function(e,t,n){var i;void 0===(i=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(){}return e.prototype.Validate=function(e){return!0},e.PageViewPerformanceValidator=new e,e}();t.PageViewPerformanceValidator=n}.apply(t,[n,t]))||(e.exports=i)},function(e,t,n){var i;void 0===(i=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(){}return e.prototype.Validate=function(e){return!0},e.PageViewValidator=new e,e}();t.PageViewValidator=n}.apply(t,[n,t]))||(e.exports=i)},function(e,t,n){var i;void 0===(i=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(){}return e.prototype.Validate=function(e){return!0},e.RemoteDepdencyValidator=new e,e}();t.RemoteDepdencyValidator=n}.apply(t,[n,t]))||(e.exports=i)},function(e,t,n){var i,r;i=[n,t,n(0)],void 0===(r=function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(){}return e.serialize=function(t){var n=e._serializeObject(t,"root");return JSON.stringify(n)},e._serializeObject=function(t,i){var r={};if(!t)return n._InternalLogging.throwInternal(n.LoggingSeverity.CRITICAL,n._InternalMessageId.CannotSerializeObject,"cannot serialize object because it is null or undefined",{name:i},!0),r;if(t.__aiCircularRefCheck)return n._InternalLogging.throwInternal(n.LoggingSeverity.WARNING,n._InternalMessageId.CircularReferenceDetected,"Circular reference detected while serializing object",{name:i},!0),r;if(!t.aiDataContract){if("measurements"===i)r=e._serializeStringMap(t,"number",i);else if("properties"===i)r=e._serializeStringMap(t,"string",i);else if("tags"===i)r=e._serializeStringMap(t,"string",i);else if(n.Util.isArray(t))r=e._serializeArray(t,i);else{n._InternalLogging.throwInternal(n.LoggingSeverity.WARNING,n._InternalMessageId.CannotSerializeObjectNonSerializable,"Attempting to serialize an object which does not implement ISerializable",{name:i},!0);try{JSON.stringify(t),r=t}catch(e){n._InternalLogging.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 t.__aiCircularRefCheck=!0,t.aiDataContract){var a,s=t.aiDataContract[o],l="function"==typeof s?s()&n.FieldType.Required:s&n.FieldType.Required,c="function"==typeof s?s()&n.FieldType.Hidden:s&n.FieldType.Hidden,u=s&n.FieldType.Array,p=void 0!==t[o],d="object"==typeof t[o]&&null!==t[o];if(!l||p||u){if(!c)void 0!==(a=d?u?e._serializeArray(t[o],o):e._serializeObject(t[o],o):t[o])&&(r[o]=a)}else n._InternalLogging.throwInternal(n.LoggingSeverity.CRITICAL,n._InternalMessageId.MissingRequiredFieldSpecification,"Missing required field specification. The field is required but not present on source",{field:o,name:i})}return delete t.__aiCircularRefCheck,r},e._serializeArray=function(t,i){var r=void 0;if(t)if(n.Util.isArray(t)){r=[];for(var o=0;o<t.length;o++){var a=t[o],s=e._serializeObject(a,i+"["+o+"]");r.push(s)}}else n._InternalLogging.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:i},!0);return r},e._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.",n._InternalLogging.throwInternal(n.LoggingSeverity.CRITICAL,r[o],null,!0)}return r},e}();t.Serializer=i}.apply(t,i))||(e.exports=r)}])});
|
|
//# sourceMappingURL=aisdk.0.0.9.js.map
|