(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["applicationinsights-web"],{"8b03":function(e,t,n){"use strict";n.r(t),n.d(t,"ApplicationInsights",(function(){return ni})),n.d(t,"Telemetry",(function(){return ti})),n.d(t,"ApplicationInsightsContainer",(function(){return ri})),n.d(t,"AppInsightsCore",(function(){return ue})),n.d(t,"LoggingSeverity",(function(){return S})),n.d(t,"_InternalMessageId",(function(){return w})),n.d(t,"Util",(function(){return ve})),n.d(t,"SeverityLevel",(function(){return ze})),n.d(t,"Event",(function(){return Pe})),n.d(t,"Exception",(function(){return Fe})),n.d(t,"Metric",(function(){return Ge})),n.d(t,"PageView",(function(){return Ke})),n.d(t,"PageViewPerformance",(function(){return $e})),n.d(t,"RemoteDependencyData",(function(){return Ye})),n.d(t,"Trace",(function(){return Qe})),n.d(t,"DistributedTracingModes",(function(){return te})),n.d(t,"Sender",(function(){return sn})),n.d(t,"ApplicationAnalytics",(function(){return Bt})),n.d(t,"PropertiesPlugin",(function(){return In})),n.d(t,"DependenciesPlugin",(function(){return ei}));var i={};n.r(i),n.d(i,"Util",(function(){return ve})),n.d(i,"CorrelationIdHelper",(function(){return Ie})),n.d(i,"UrlHelper",(function(){return ye})),n.d(i,"DateTimeUtils",(function(){return Te})),n.d(i,"ConnectionStringParser",(function(){return Ee})),n.d(i,"FieldType",(function(){return ee})),n.d(i,"RequestHeaders",(function(){return le})),n.d(i,"DisabledPropertyName",(function(){return Se})),n.d(i,"ProcessLegacy",(function(){return _e})),n.d(i,"SampleRate",(function(){return be})),n.d(i,"HttpMethod",(function(){return Ce})),n.d(i,"DEFAULT_BREEZE_ENDPOINT",(function(){return we})),n.d(i,"AIData",(function(){return Ne})),n.d(i,"AIBase",(function(){return De})),n.d(i,"Envelope",(function(){return ke})),n.d(i,"Event",(function(){return Pe})),n.d(i,"Exception",(function(){return Fe})),n.d(i,"Metric",(function(){return Ge})),n.d(i,"PageView",(function(){return Ke})),n.d(i,"PageViewData",(function(){return We})),n.d(i,"RemoteDependencyData",(function(){return Ye})),n.d(i,"Trace",(function(){return Qe})),n.d(i,"PageViewPerformance",(function(){return $e})),n.d(i,"Data",(function(){return et})),n.d(i,"SeverityLevel",(function(){return ze})),n.d(i,"ConfigurationManager",(function(){return tt})),n.d(i,"ContextTagKeys",(function(){return nt})),n.d(i,"DataSanitizer",(function(){return pe})),n.d(i,"TelemetryItemCreator",(function(){return it})),n.d(i,"CtxTagKeys",(function(){return at})),n.d(i,"Extensions",(function(){return rt})),n.d(i,"DistributedTracingModes",(function(){return te})),n.d(i,"PropertiesPluginIdentifier",(function(){return ot})),n.d(i,"BreezeChannelIdentifier",(function(){return st})),n.d(i,"AnalyticsPluginIdentifier",(function(){return ct})); /*! ***************************************************************************** Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT. See the Apache Version 2.0 License for specific language governing permissions and limitations under the License. ***************************************************************************** */ var r=function(e,t){return r=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])},r(e,t)};function a(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var o=function(){return o=Object.assign||function(e){for(var t,n=1,i=arguments.length;n=0?r:i-Math.abs(r),0);a=3)i=arguments[2];else{while(a=S.WARNING&&(o.warnToConsole(a.message),o._messageLogged[s]=!0)}else o.consoleLoggingLevel()>=S.WARNING&&o.warnToConsole(a.message);o.logInternalMessage(e,a)}},e.prototype.warnToConsole=function(e){!b.isUndefined(console)&&console&&(b.isFunction(console.warn)?console.warn(e):b.isFunction(console.log)&&console.log(e))},e.prototype.resetInternalMessageCount=function(){this._messageCount=0,this._messageLogged={}},e.prototype.logInternalMessage=function(e,t){var n=this;if(!n._areInternalMessagesThrottled()){var i=!0,r=n.AIInternalMessagePrefix+t.messageId;if(n._messageLogged[r]?i=!1:n._messageLogged[r]=!0,i&&(e<=n.telemetryLoggingLevel()&&(n.queue.push(t),n._messageCount++),n._messageCount===n.maxInternalMessageLimit())){var a="Internal events throttle limit per PageView reached for this app.",o=new E(w.MessageLimitPerPVExceeded,a,!1);n.queue.push(o),n.warnToConsole(a)}}},e.prototype._areInternalMessagesThrottled=function(){return this._messageCount>=this.maxInternalMessageLimit()},e}(),N=b.isFunction,A=function(){function e(e,t){var n=this,i=null,r=N(e.processTelemetry),a=N(e.setNextPlugin);n._hasRun=!1,n.getPlugin=function(){return e},n.getNext=function(){return i},n.setNext=function(e){i=e},n.processTelemetry=function(o,s){if(s||(s=t),e&&r){n._hasRun=!0;try{s.setNext(i),a&&e.setNextPlugin(i),i&&(i._hasRun=!1),e.processTelemetry(o,s)}catch(u){var c=i&&i._hasRun;i&&c||s.diagLog().throwInternal(S.CRITICAL,w.PluginException,"Plugin ["+e.identifier+"] failed during processTelemetry - "+u),i&&!c&&i.processTelemetry(o,s)}}else i&&(n._hasRun=!0,i.processTelemetry(o,s))}}return e}(),k=b.isNullOrUndefined;function R(e,t){var n=[];if(e&&e.length>0)for(var i=null,r=0;r0?n[0]:null}function L(e,t,n){var i=[],r=!n;if(e)while(e){var a=e.getPlugin();(r||a===n)&&(r=!0,i.push(a)),e=e.getNext()}return r||i.push(n),R(i,t)}function P(e,t,n){var i=e,r=!1;return n&&e&&(i=[],b.arrForEach(e,(function(e){(r||e===n)&&(r=!0,i.push(e))}))),n&&!r&&(i||(i=[]),i.push(n)),R(i,t)}var M=function(){function e(t,n,i,r){var a=this,o=null;null!==r&&(t&&b.isFunction(t.getPlugin)?o=L(t,a,r||t.getPlugin()):r?o=P(t,a,r):b.isUndefined(r)&&(o=R(t,a))),a.core=function(){return i},a.diagLog=function(){var e=(i||{}).logger;return e||(e=new D(n||{})),e},a.getCfg=function(){return n},a.getExtCfg=function(e,t){var i;if(void 0===t&&(t={}),n){var r=n.extensionConfig;r&&e&&(i=r[e])}return i||t},a.getConfig=function(e,t,i){var r;void 0===i&&(i=!1);var o=a.getExtCfg(e,null);return o&&!k(o[t])?r=o[t]:n&&!k(n[t])&&(r=n[t]),k(r)?i:r},a.hasNext=function(){return null!=o},a.getNext=function(){return o},a.setNext=function(e){o=e},a.processNext=function(e){var t=o;t&&(o=t.getNext(),t.processTelemetry(e,a))},a.createNew=function(t,r){return void 0===t&&(t=null),new e(t||o,n,i,r)}}return e}(),O=b.isFunction,U="getPlugin",F=function(){function e(){var e=this,t=!1,n=null,i=null;e.core=null,e.diagLog=function(t){return e._getTelCtx(t).diagLog()},e.isInitialized=function(){return t},e.setInitialized=function(e){t=e},e.setNextPlugin=function(e){i=e},e.processNext=function(e,t){t?t.processNext(e):i&&O(i.processTelemetry)&&i.processTelemetry(e,null)},e._getTelCtx=function(t){void 0===t&&(t=null);var r=t;if(!r){var a=n||new M(null,{},e.core);r=i&&i[U]?a.createNew(null,i[U]):a.createNew(null,i)}return r},e._baseTelInit=function(r,a,o,s){r&&(r.extensionConfig=r.extensionConfig||[]),!s&&a&&(s=a.getProcessTelContext().getNext());var c=i;i&&i[U]&&(c=i[U]()),e.core=a,n=new M(s,r,a,c),t=!0}}return e.prototype.initialize=function(e,t,n,i){this._baseTelInit(e,t,n,i)},e}(),j=b.isFunction,q="processTelemetry",B="priority",z="setNextPlugin",V="isInitialized";function H(e,t){var n=[],i=null,r=e.getNext();while(r){var a=r.getPlugin();a&&(i&&j(i[z])&&j(a[q])&&i[z](a),j(a[V])&&a[V]()||n.push(a),i=a,r=r.getNext())}b.arrForEach(n,(function(n){n.initialize(e.getCfg(),e.core(),t,e.getNext())}))}function G(e){return e.sort((function(e,t){var n=0,i=j(t[q]);return j(e[q])?n=i?e[B]-t[B]:1:i&&(n=-1),n}))}var W=500,K="Channel has invalid priority",X=b.arrForEach,Y=b.objDefineAccessors;function J(e){X(e,(function(e){if(e.priority0&&(t=t.sort((function(e,t){return e.priority-t.priority})),J(t),e.push(t))}function Z(e,t){var n=[];if(e&&X(e,(function(e){return Q(n,e)})),t){var i=[];X(t,(function(e){e.priority>W&&i.push(e)})),Q(n,i)}return n}var $,ee,te,ne=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.identifier="ChannelControllerPlugin",t.priority=W,t}return a(t,e),t.prototype.processTelemetry=function(e,t){var n=this;this._channelQueue&&X(this._channelQueue,(function(i){if(i.length>0){var r=n._getTelCtx(t).createNew(i);r.processNext(e)}}))},t.prototype.getChannelControls=function(){return this._channelQueue},t.prototype.initialize=function(t,n,i){var r=this;if(!r.isInitialized()){e.prototype.initialize.call(this,t,n,i),t.isCookieUseDisabled&&b.disableCookies();var a=r._channelQueue=Z((t||{}).channels,i);X(a,(function(e){return H(new M(e,t,n),i)}))}},t._staticInit=function(){Y(t.prototype,"ChannelControls",t.prototype.getChannelControls),Y(t.prototype,"channelQueue",t.prototype.getChannelControls)}(),t}(F),ie="Extensions must provide callback to initialize",re=b.arrForEach,ae=b.isNullOrUndefined,oe=function(){function e(){var e=!1,t=this;t._extensions=new Array,t._channelController=new ne,t.isInitialized=function(){return e},t._setInit=function(t){e=t},t._eventQueue=[]}return e.prototype.initialize=function(e,t,n,i){var r=this;if(r.isInitialized())throw Error("Core should not be initialized more than once");if(!e||ae(e.instrumentationKey))throw Error("Please provide instrumentation key");r.config=e;var a=r._channelController;i||(i=b.objCreate({addNotificationListener:function(e){},removeNotificationListener:function(e){},eventsSent:function(e){},eventsDiscarded:function(e,t){}})),r._notificationManager=i,e.extensions=ae(e.extensions)?[]:e.extensions;var o=e.extensionConfig=ae(e.extensionConfig)?{}:e.extensionConfig;o.NotificationManager=i,n||(n=b.objCreate({throwInternal:function(e,t,n,i,r){void 0===r&&(r=!1)},warnToConsole:function(e){},resetInternalMessageCount:function(){}})),r.logger=n;var s=[];s.push.apply(s,t.concat(e.extensions)),s=G(s);var c=[],u=[],l={};if(re(s,(function(e){if(ae(e)||ae(e.initialize))throw Error(ie);var t=e.priority,i=e.identifier;e&&t&&(ae(l[t])?l[t]=i:n.warnToConsole("Two extensions have same priority #"+t+" - "+l[t]+", "+i)),!t||t0&&(re(t._eventQueue,(function(e){t.getProcessTelContext().processNext(e)})),t._eventQueue=[]),t.getProcessTelContext().processNext(e)):t._eventQueue.push(e)},e.prototype.getProcessTelContext=function(){var e=this,t=e._extensions,n=t;return t&&0!==t.length||(n=[e._channelController]),new M(n,e.config,e)},e}(),se={Unknown:0,NonRetryableStatus:1,InvalidEvent:2,SizeLimitExceeded:3,KillSwitch:4,QueueFull:5},ce=function(){function e(){this.listeners=[]}return e.prototype.addNotificationListener=function(e){this.listeners.push(e)},e.prototype.removeNotificationListener=function(e){var t=b.arrIndexOf(this.listeners,e);while(t>-1)this.listeners.splice(t,1),t=b.arrIndexOf(this.listeners,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;r0||(n=1e4),setInterval((function(){var n=t,i=n.logger?n.logger.queue:[];b.arrForEach(i,(function(t){var i={name:e||"InternalMessageId: "+t.messageId,iKey:n.config.instrumentationKey,time:b.toISOString(new Date),baseType:E.dataType,baseData:{message:t.message}};n.track(i)})),i.length=0}),n)},t.prototype._validateTelemetryItem=function(e){if(b.isNullOrUndefined(e.name))throw this._notifyInvalidEvent(e),Error("telemetry name required")},t.prototype._notifyInvalidEvent=function(e){this._notificationManager&&this._notificationManager.eventsDiscarded([e],se.InvalidEvent)},t}(oe);(function(e){e[e["LocalStorage"]=0]="LocalStorage",e[e["SessionStorage"]=1]="SessionStorage"})($||($={})),function(e){e[e["Default"]=0]="Default",e[e["Required"]=1]="Required",e[e["Array"]=2]="Array",e[e["Hidden"]=4]="Hidden"}(ee||(ee={})),function(e){e[e["AI"]=0]="AI",e[e["AI_AND_W3C"]=1]="AI_AND_W3C",e[e["W3C"]=2]="W3C"}(te||(te={}));var le=function(){function e(){}return e.requestContextHeader="Request-Context",e.requestContextTargetKey="appId",e.requestContextAppIdFormat="appId=cid-v1:",e.requestIdHeader="Request-Id",e.traceParentHeader="traceparent",e.sdkContextHeader="Sdk-Context",e.sdkContextHeaderAppIdRequest="appId",e.requestContextHeaderLowerCase="request-context",e}(),pe=function(){function e(){}return e.sanitizeKeyAndAddUniqueness=function(t,n,i){var r=n.length,a=e.sanitizeKey(t,n);if(a.length!==r){var o=0,s=a;while(void 0!==i[s])o++,s=a.substring(0,e.MAX_NAME_LENGTH-3)+e.padNumber(o);a=s}return a},e.sanitizeKey=function(t,n){var i;return n&&(n=e.trim(n.toString()),n.length>e.MAX_NAME_LENGTH&&(i=n.substring(0,e.MAX_NAME_LENGTH),t.throwInternal(S.WARNING,w.NameTooLong,"name is too long. It has been truncated to "+e.MAX_NAME_LENGTH+" characters.",{name:n},!0))),i||n},e.sanitizeString=function(t,n,i){var r;return void 0===i&&(i=e.MAX_STRING_LENGTH),n&&(i=i||e.MAX_STRING_LENGTH,n=e.trim(n),n.toString().length>i&&(r=n.toString().substring(0,i),t.throwInternal(S.WARNING,w.StringValueTooLong,"string value is too long. It has been truncated to "+i+" characters.",{value:n},!0))),r||n},e.sanitizeUrl=function(t,n){return e.sanitizeInput(t,n,e.MAX_URL_LENGTH,w.UrlTooLong)},e.sanitizeMessage=function(t,n){var i;return n&&n.length>e.MAX_MESSAGE_LENGTH&&(i=n.substring(0,e.MAX_MESSAGE_LENGTH),t.throwInternal(S.WARNING,w.MessageTruncated,"message is too long, it has been truncated to "+e.MAX_MESSAGE_LENGTH+" characters.",{message:n},!0)),i||n},e.sanitizeException=function(t,n){var i;return n&&n.length>e.MAX_EXCEPTION_LENGTH&&(i=n.substring(0,e.MAX_EXCEPTION_LENGTH),t.throwInternal(S.WARNING,w.ExceptionTruncated,"exception is too long, it has been truncated to "+e.MAX_EXCEPTION_LENGTH+" characters.",{exception:n},!0)),i||n},e.sanitizeProperties=function(t,n){if(n){var i={};for(var r in n){var a=n[r];if(b.isObject(a)&&Object(s["k"])())try{a=Object(s["e"])().stringify(a)}catch(o){t.throwInternal(S.WARNING,w.CannotSerializeObjectNonSerializable,"custom property is not valid",{exception:o},!0)}a=e.sanitizeString(t,a,e.MAX_PROPERTY_LENGTH),r=e.sanitizeKeyAndAddUniqueness(t,r,i),i[r]=a}n=i}return n},e.sanitizeMeasurements=function(t,n){if(n){var i={};for(var r in n){var a=n[r];r=e.sanitizeKeyAndAddUniqueness(t,r,i),i[r]=a}n=i}return n},e.sanitizeId=function(t,n){return n?e.sanitizeInput(t,n,e.MAX_ID_LENGTH,w.IdTooLong).toString():n},e.sanitizeInput=function(t,n,i,r){var a;return n&&(n=e.trim(n),n.length>i&&(a=n.substring(0,i),t.throwInternal(S.WARNING,r,"input is too long, it has been truncated to "+i+" characters.",{data:n},!0))),a||n},e.padNumber=function(e){var t="00"+e;return t.substr(t.length-3)},e.trim=function(e){return b.isString(e)?e.replace(/^\s+|\s+$/g,""):e},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}(),fe=Object(s["g"])(),de=b.isString,ge=null;function he(e,t){var n=e.length,i=n-t.length;return e.substring(i>=0?i:0,n)===t}var me,ve=function(){function e(){}return e.createDomEvent=function(e){var t=null;if(b.isFunction(Event))t=new Event(e);else{var n=Object(s["a"])();n&&n.createEvent&&(t=n.createEvent("Event"),t.initEvent(e,!0,!0))}return t},e.disableStorage=function(){e._canUseLocalStorage=!1,e._canUseSessionStorage=!1},e._getLocalStorageObject=function(){return e.canUseLocalStorage()?e._getVerifiedStorageObject($.LocalStorage):null},e._getVerifiedStorageObject=function(e){var t,n,i=null;try{if(b.isNullOrUndefined(Object(s["b"])()))return null;n=new Date,i=e===$.LocalStorage?Object(s["c"])("localStorage"):Object(s["c"])("sessionStorage"),i.setItem(n.toString(),n.toString()),t=i.getItem(n.toString())!==n.toString(),i.removeItem(n.toString()),t&&(i=null)}catch(r){i=null}return i},e.isInternalApplicationInsightsEndpoint=function(t){return-1!==e._internalEndpoints.indexOf(t.toLowerCase())},e.canUseLocalStorage=function(){return void 0===e._canUseLocalStorage&&(e._canUseLocalStorage=!!e._getVerifiedStorageObject($.LocalStorage)),e._canUseLocalStorage},e.getStorage=function(t,n){var i=e._getLocalStorageObject();if(null!==i)try{return i.getItem(n)}catch(r){e._canUseLocalStorage=!1,t.throwInternal(S.WARNING,w.BrowserCannotReadLocalStorage,"Browser failed read of local storage. "+e.getExceptionName(r),{exception:e.dump(r)})}return null},e.setStorage=function(t,n,i){var r=e._getLocalStorageObject();if(null!==r)try{return r.setItem(n,i),!0}catch(a){e._canUseLocalStorage=!1,t.throwInternal(S.WARNING,w.BrowserCannotWriteLocalStorage,"Browser failed write to local storage. "+e.getExceptionName(a),{exception:e.dump(a)})}return!1},e.removeStorage=function(t,n){var i=e._getLocalStorageObject();if(null!==i)try{return i.removeItem(n),!0}catch(r){e._canUseLocalStorage=!1,t.throwInternal(S.WARNING,w.BrowserFailedRemovalFromLocalStorage,"Browser failed removal of local storage item. "+e.getExceptionName(r),{exception:e.dump(r)})}return!1},e._getSessionStorageObject=function(){return e.canUseSessionStorage()?e._getVerifiedStorageObject($.SessionStorage):null},e.canUseSessionStorage=function(){return void 0===e._canUseSessionStorage&&(e._canUseSessionStorage=!!e._getVerifiedStorageObject($.SessionStorage)),e._canUseSessionStorage},e.getSessionStorageKeys=function(){var t=[];if(e.canUseSessionStorage())for(var n in Object(s["c"])("sessionStorage"))t.push(n);return t},e.getSessionStorage=function(t,n){var i=e._getSessionStorageObject();if(null!==i)try{return i.getItem(n)}catch(r){e._canUseSessionStorage=!1,t.throwInternal(S.WARNING,w.BrowserCannotReadSessionStorage,"Browser failed read of session storage. "+e.getExceptionName(r),{exception:e.dump(r)})}return null},e.setSessionStorage=function(t,n,i){var r=e._getSessionStorageObject();if(null!==r)try{return r.setItem(n,i),!0}catch(a){e._canUseSessionStorage=!1,t.throwInternal(S.WARNING,w.BrowserCannotWriteSessionStorage,"Browser failed write to session storage. "+e.getExceptionName(a),{exception:e.dump(a)})}return!1},e.removeSessionStorage=function(t,n){var i=e._getSessionStorageObject();if(null!==i)try{return i.removeItem(n),!0}catch(r){e._canUseSessionStorage=!1,t.throwInternal(S.WARNING,w.BrowserFailedRemovalFromSessionStorage,"Browser failed removal of session storage item. "+e.getExceptionName(r),{exception:e.dump(r)})}return!1},e.disableCookies=function(){b.disableCookies()},e.canUseCookies=function(t){if(void 0===b._canUseCookies){b._canUseCookies=!1;try{b._canUseCookies=void 0!==e.document.cookie}catch(n){t.throwInternal(S.WARNING,w.CannotAccessCookie,"Cannot access document.cookie - "+e.getExceptionName(n),{exception:e.dump(n)})}}return b._canUseCookies},e.disallowsSameSiteNone=function(e){return!!de(e)&&(-1!==e.indexOf("CPU iPhone OS 12")||-1!==e.indexOf("iPad; CPU OS 12")||(-1!==e.indexOf("Macintosh; Intel Mac OS X 10_14")&&-1!==e.indexOf("Version/")&&-1!==e.indexOf("Safari")||(!(-1===e.indexOf("Macintosh; Intel Mac OS X 10_14")||!he(e,"AppleWebKit/605.1.15 (KHTML, like Gecko)"))||(-1!==e.indexOf("Chrome/5")||-1!==e.indexOf("Chrome/6")||(-1!==e.indexOf("UnrealEngine")&&-1===e.indexOf("Chrome")||(-1!==e.indexOf("UCBrowser/12")||-1!==e.indexOf("UCBrowser/11")))))))},e.setCookie=function(t,n,i,r){if(e.canUseCookies(t)){var a="",o="";r&&(a=";domain="+r);var c=Object(s["f"])();c&&"https:"===c.protocol&&(o=";secure",null===ge&&(ge=e.disallowsSameSiteNone((Object(s["g"])()||{}).userAgent)),ge||(i+=";SameSite=None")),e.document.cookie=n+"="+i+a+";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,n){if(e.canUseCookies(t)){var i="";if(n&&n.length)for(var r=n+"=",a=e.document.cookie.split(";"),o=0;o0){var i=e.charAt(n%64);t+=i,n=Math.floor(n/64)}return t},e.random32=function(){return 4294967296*Math.random()|0},e.generateW3CId=function(){for(var t,n=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"],i="",r=0;r<4;r++)t=e.random32(),i+=n[15&t]+n[t>>4&15]+n[t>>8&15]+n[t>>12&15]+n[t>>16&15]+n[t>>20&15]+n[t>>24&15]+n[t>>28&15];var a=n[8+4*Math.random()|0];return i.substr(0,8)+i.substr(9,4)+"4"+i.substr(13,3)+a+i.substr(16,3)+i.substr(19,12)},e.isArray=function(e){return"[object Array]"===Object[s["o"]].toString.call(e)},e.isError=function(e){return"[object Error]"===Object[s["o"]].toString.call(e)},e.getIEVersion=function(e){void 0===e&&(e=null);var t=e?e.toLowerCase():fe?(fe.userAgent||"").toLowerCase():"";return-1!==t.indexOf("msie")?parseInt(t.split("msie")[1]):null},e.msToTimeSpan=function(e){(isNaN(e)||e<0)&&(e=0),e=Math.round(e);var t=""+e%1e3,n=""+Math.floor(e/1e3)%60,i=""+Math.floor(e/6e4)%60,r=""+Math.floor(e/36e5)%24,a=Math.floor(e/864e5);return t=1===t.length?"00"+t:2===t.length?"0"+t:t,n=n.length<2?"0"+n:n,i=i.length<2?"0"+i:i,r=r.length<2?"0"+r:r,(a>0?a+".":"")+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[s["o"]].toString.call(e),n="";return"[object Error]"===t?n="{ stack: '"+e.stack+"', message: '"+e.message+"', name: '"+e.name+"'":Object(s["k"])()&&(n=Object(s["e"])().stringify(e)),t+n},e.getExceptionName=function(e){var t=Object[s["o"]].toString.call(e);return"[object Error]"===t?e.name:""},e.addEventHandler=function(e,t){return C.Attach(Object(s["i"])(),e,t)},e.IsBeaconApiSupported=function(){return"sendBeacon"in fe&&fe.sendBeacon},e.getExtension=function(e,t){var n=null,i=0;while(!n&&i2&&de(t[2])&&t[2].length>0)return t[2]}return null},e.document=Object(s["a"])()||{},e}(),Ie=function(){function e(){}return e.canIncludeCorrelationHeader=function(e,t,n){if(e&&e.disableCorrelationHeaders)return!1;if(!t)return!1;var i=ye.parseUrl(t).host.toLowerCase();if((!e||!e.enableCorsCorrelation)&&i!==n)return!1;var r,a=e&&e.correlationHeaderDomains;if(a&&(b.arrForEach(a,(function(e){var t=new RegExp(e.toLowerCase().replace(/\./g,".").replace(/\*/g,".*"));r=r||t.test(i)})),!r))return!1;var o=e&&e.correlationHeaderExcludedDomains;if(!o||0===o.length)return!0;for(var s=0;s0},e.getCorrelationContext=function(t){if(t){var n=e.getCorrelationContextValue(t,le.requestContextTargetKey);if(n&&n!==e.correlationIdPrefix)return n}},e.getCorrelationContextValue=function(e,t){if(e)for(var n=e.split(","),i=0;i0){var s=ye.parseUrl(t);if(r=s.host,!a)if(null!=s.pathname){var c=0===s.pathname.length?"/":s.pathname;"/"!==c.charAt(0)&&(c="/"+c),o=s.pathname,a=pe.sanitizeString(e,n?n+" "+c:c)}else a=pe.sanitizeString(e,t)}else r=i,a=i;return{target:r,name:a,data:o}},e}(),Te=function(){function e(){}return e.Now=function(){var e=Object(s["h"])();return e&&e.now&&e.timing?e.now()+e.timing.navigationStart:(new Date).getTime()},e.GetDuration=function(e,t){var n=null;return 0===e||0===t||b.isNullOrUndefined(e)||b.isNullOrUndefined(t)||(n=t-e),n},e}(),Se="Microsoft_ApplicationInsights_BypassAjaxInstrumentation",be="sampleRate",_e="ProcessLegacy",Ce="http.method",we="https://dc.services.visualstudio.com",Ee=function(){function e(){}return e.parse=function(t){if(!t)return{};var n=t.split(e._FIELDS_SEPARATOR),i=b.arrReduce(n,(function(t,n){var i=n.split(e._FIELD_KEY_VALUE_SEPARATOR);if(2===i.length){var r=i[0].toLowerCase(),a=i[1];t[r]=a}return t}),{});if(b.objKeys(i).length>0){if(i.endpointsuffix){var r=i.location?i.location+".":"";i.ingestionendpoint=i.ingestionendpoint||"https://"+r+"dc."+i.endpointsuffix}i.ingestionendpoint=i.ingestionendpoint||we}return i},e._FIELDS_SEPARATOR=";",e._FIELD_KEY_VALUE_SEPARATOR="=",e}(),De=function(){function e(){}return e}(),Ne=function(e){function t(){return e.call(this)||this}return a(t,e),t}(De),Ae=function(){function e(){this.ver=1,this.sampleRate=100,this.tags={}}return e}(),ke=function(e){function t(t,n,i){var r=e.call(this)||this;return r.name=pe.sanitizeString(t,i)||ve.NotSpecified,r.data=n,r.time=b.toISOString(new Date),r.aiDataContract={time:ee.Required,iKey:ee.Required,name:ee.Required,sampleRate:function(){return 100===r.sampleRate?ee.Hidden:ee.Required},tags:ee.Required,data:ee.Required},r}return a(t,e),t}(Ae),Re=function(){function e(){}return e}(),Le=function(e){function t(){var t=e.call(this)||this;return t.ver=2,t.properties={},t.measurements={},t}return a(t,e),t}(Re),Pe=function(e){function t(t,n,i,r){var a=e.call(this)||this;return a.aiDataContract={ver:ee.Required,name:ee.Required,properties:ee.Default,measurements:ee.Default},a.name=pe.sanitizeString(t,n)||ve.NotSpecified,a.properties=pe.sanitizeProperties(t,i),a.measurements=pe.sanitizeMeasurements(t,r),a}return a(t,e),t.envelopeType="Microsoft.ApplicationInsights.{0}.Event",t.dataType="EventData",t}(Le),Me=function(){function e(){}return e}(),Oe=function(e){function t(){var t=e.call(this)||this;return t.ver=2,t.exceptions=[],t.properties={},t.measurements={},t}return a(t,e),t}(Re),Ue=function(){function e(){this.hasFullStack=!0,this.parsedStack=[]}return e}(),Fe=function(e){function t(t,n,i,r,a,o){var s=e.call(this)||this;return s.aiDataContract={ver:ee.Required,exceptions:ee.Required,severityLevel:ee.Default,properties:ee.Default,measurements:ee.Default},n instanceof Error?(s.exceptions=[new je(t,n)],s.properties=pe.sanitizeProperties(t,i),s.measurements=pe.sanitizeMeasurements(t,r),a&&(s.severityLevel=a),o&&(s.id=o)):(s.exceptions=n.exceptions,s.properties=n.properties,s.measurements=n.measurements,n.severityLevel&&(s.severityLevel=n.severityLevel),n.id&&(s.id=n.id),n.problemGroup&&(s.problemGroup=n.problemGroup),s.ver=2,b.isNullOrUndefined(n.isManual)||(s.isManual=n.isManual)),s}return a(t,e),t.CreateFromInterface=function(e,n){var i=n.exceptions&&b.arrMap(n.exceptions,(function(t){return je.CreateFromInterface(e,t)})),r=new t(e,o({},n,{exceptions:i}));return r},t.prototype.toInterface=function(){var e=this,t=e.exceptions,n=e.properties,i=e.measurements,r=e.severityLevel,a=(e.ver,e.problemGroup),o=e.id,s=e.isManual,c=t instanceof Array&&b.arrMap(t,(function(e){return e.toInterface()}))||void 0;return{ver:"4.0",exceptions:c,severityLevel:r,properties:n,measurements:i,problemGroup:a,id:o,isManual:s}},t.CreateSimpleException=function(e,t,n,i,r,a){return{exceptions:[{hasFullStack:!0,message:e,stack:r,typeName:t}]}},t.envelopeType="Microsoft.ApplicationInsights.{0}.Exception",t.dataType="ExceptionData",t}(Oe),je=function(e){function t(n,i){var r=e.call(this)||this;if(r.aiDataContract={id:ee.Default,outerId:ee.Default,typeName:ee.Required,message:ee.Required,hasFullStack:ee.Default,stack:ee.Default,parsedStack:ee.Array},i instanceof Error){r.typeName=pe.sanitizeString(n,i.name)||ve.NotSpecified,r.message=pe.sanitizeMessage(n,i.message)||ve.NotSpecified;var a=i.stack;r.parsedStack=t.parseStack(a),r.stack=pe.sanitizeException(n,a),r.hasFullStack=ve.isArray(r.parsedStack)&&r.parsedStack.length>0}else r.typeName=i.typeName,r.message=i.message,r.stack=i.stack,r.parsedStack=i.parsedStack,r.hasFullStack=i.hasFullStack;return r}return a(t,e),t.prototype.toInterface=function(){var e=this.parsedStack instanceof Array&&b.arrMap(this.parsedStack,(function(e){return e.toInterface()})),t={id:this.id,outerId:this.outerId,typeName:this.typeName,message:this.message,hasFullStack:this.hasFullStack,stack:this.stack,parsedStack:e||void 0};return t},t.CreateFromInterface=function(e,n){var i=n.parsedStack instanceof Array&&b.arrMap(n.parsedStack,(function(e){return qe.CreateFromInterface(e)}))||n.parsedStack,r=new t(e,o({},n,{parsedStack:i}));return r},t.parseStack=function(e){var t;if(b.isString(e)){var n=e.split("\n");t=[];for(var i=0,r=0,a=0;a<=n.length;a++){var o=n[a];if(qe.regex.test(o)){var s=new qe(n[a],i++);r+=s.sizeInBytes,t.push(s)}}var c=32768;if(r>c){var u=0,l=t.length-1,p=0,f=u,d=l;while(uc){var m=d-f+1;t.splice(f,m);break}f=u,d=l,u++,l--}}}return t},t}(Ue),qe=function(e){function t(n,i){var r=e.call(this)||this;if(r.sizeInBytes=0,r.aiDataContract={level:ee.Required,method:ee.Required,assembly:ee.Default,fileName:ee.Default,line:ee.Default},"string"===typeof n){var a=n;r.level=i,r.method="",r.assembly=ve.trim(a),r.fileName="",r.line=0;var o=a.match(t.regex);o&&o.length>=5&&(r.method=ve.trim(o[2])||r.method,r.fileName=ve.trim(o[4]),r.line=parseInt(o[5])||0)}else r.level=n.level,r.method=n.method,r.assembly=n.assembly,r.fileName=n.fileName,r.line=n.line,r.sizeInBytes=0;return 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 a(t,e),t.CreateFromInterface=function(e){return new t(e,null)},t.prototype.toInterface=function(){return{level:this.level,method:this.method,assembly:this.assembly,fileName:this.fileName,line:this.line}},t.regex=/^([\s]+at)?(.*?)(\@|\s\(|\s)([^\(\@\n]+):([0-9]+):([0-9]+)(\)?)$/,t.baseSize=58,t}(Me),Be=function(e){function t(){var t=e.call(this)||this;return t.ver=2,t.metrics=[],t.properties={},t.measurements={},t}return a(t,e),t}(Re);(function(e){e[e["Measurement"]=0]="Measurement",e[e["Aggregation"]=1]="Aggregation"})(me||(me={}));var ze,Ve=function(){function e(){this.kind=me.Measurement}return e}(),He=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.aiDataContract={name:ee.Required,kind:ee.Default,value:ee.Required,count:ee.Default,min:ee.Default,max:ee.Default,stdDev:ee.Default},t}return a(t,e),t}(Ve),Ge=function(e){function t(t,n,i,r,a,o,s,c){var u=e.call(this)||this;u.aiDataContract={ver:ee.Required,metrics:ee.Required,properties:ee.Default};var l=new He;return l.count=r>0?r:void 0,l.max=isNaN(o)||null===o?void 0:o,l.min=isNaN(a)||null===a?void 0:a,l.name=pe.sanitizeString(t,n)||ve.NotSpecified,l.value=i,u.metrics=[l],u.properties=pe.sanitizeProperties(t,s),u.measurements=pe.sanitizeMeasurements(t,c),u}return a(t,e),t.envelopeType="Microsoft.ApplicationInsights.{0}.Metric",t.dataType="MetricData",t}(Be),We=function(e){function t(){var t=e.call(this)||this;return t.ver=2,t.properties={},t.measurements={},t}return a(t,e),t}(Le),Ke=function(e){function t(t,n,i,r,a,o,s){var c=e.call(this)||this;return c.aiDataContract={ver:ee.Required,name:ee.Default,url:ee.Default,duration:ee.Default,properties:ee.Default,measurements:ee.Default,id:ee.Default},c.id=pe.sanitizeId(t,s),c.url=pe.sanitizeUrl(t,i),c.name=pe.sanitizeString(t,n)||ve.NotSpecified,isNaN(r)||(c.duration=ve.msToTimeSpan(r)),c.properties=pe.sanitizeProperties(t,a),c.measurements=pe.sanitizeMeasurements(t,o),c}return a(t,e),t.envelopeType="Microsoft.ApplicationInsights.{0}.Pageview",t.dataType="PageviewData",t}(We),Xe=function(e){function t(){var t=e.call(this)||this;return t.ver=2,t.success=!0,t.properties={},t.measurements={},t}return a(t,e),t}(Re),Ye=function(e){function t(t,n,i,r,a,o,s,c,u,l,p,f){void 0===u&&(u="Ajax");var d=e.call(this)||this;d.aiDataContract={id:ee.Required,ver:ee.Required,name:ee.Default,resultCode:ee.Default,duration:ee.Default,success:ee.Default,data:ee.Default,target:ee.Default,type:ee.Default,properties:ee.Default,measurements:ee.Default,kind:ee.Default,value:ee.Default,count:ee.Default,min:ee.Default,max:ee.Default,stdDev:ee.Default,dependencyKind:ee.Default,dependencySource:ee.Default,commandName:ee.Default,dependencyTypeName:ee.Default},d.id=n,d.duration=ve.msToTimeSpan(a),d.success=o,d.resultCode=s+"",d.type=pe.sanitizeString(t,u);var g=xe.ParseDependencyPath(t,i,c,r);return d.data=pe.sanitizeUrl(t,r)||g.data,d.target=pe.sanitizeString(t,g.target),l&&(d.target=d.target+" | "+l),d.name=pe.sanitizeString(t,g.name),d.properties=pe.sanitizeProperties(t,p),d.measurements=pe.sanitizeMeasurements(t,f),d}return a(t,e),t.envelopeType="Microsoft.ApplicationInsights.{0}.RemoteDependency",t.dataType="RemoteDependencyData",t}(Xe),Je=function(e){function t(){var t=e.call(this)||this;return t.ver=2,t.properties={},t.measurements={},t}return a(t,e),t}(Re),Qe=function(e){function t(t,n,i,r,a){var o=e.call(this)||this;return o.aiDataContract={ver:ee.Required,message:ee.Required,severityLevel:ee.Default,properties:ee.Default},n=n||ve.NotSpecified,o.message=pe.sanitizeMessage(t,n),o.properties=pe.sanitizeProperties(t,r),o.measurements=pe.sanitizeMeasurements(t,a),i&&(o.severityLevel=i),o}return a(t,e),t.envelopeType="Microsoft.ApplicationInsights.{0}.Message",t.dataType="MessageData",t}(Je),Ze=function(e){function t(){var t=e.call(this)||this;return t.ver=2,t.properties={},t.measurements={},t}return a(t,e),t}(We),$e=function(e){function t(t,n,i,r,a,o,s){var c=e.call(this)||this;return c.aiDataContract={ver:ee.Required,name:ee.Default,url:ee.Default,duration:ee.Default,perfTotal:ee.Default,networkConnect:ee.Default,sentRequest:ee.Default,receivedResponse:ee.Default,domProcessing:ee.Default,properties:ee.Default,measurements:ee.Default},c.url=pe.sanitizeUrl(t,i),c.name=pe.sanitizeString(t,n)||ve.NotSpecified,c.properties=pe.sanitizeProperties(t,a),c.measurements=pe.sanitizeMeasurements(t,o),s&&(c.domProcessing=s.domProcessing,c.duration=s.duration,c.networkConnect=s.networkConnect,c.perfTotal=s.perfTotal,c.receivedResponse=s.receivedResponse,c.sentRequest=s.sentRequest),c}return a(t,e),t.envelopeType="Microsoft.ApplicationInsights.{0}.PageviewPerformance",t.dataType="PageviewPerformanceData",t}(Ze),et=function(e){function t(t,n){var i=e.call(this)||this;return i.aiDataContract={baseType:ee.Required,baseData:ee.Required},i.baseType=t,i.baseData=n,i}return a(t,e),t}(Ne);(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"})(ze||(ze={}));var tt=function(){function e(){}return e.getConfig=function(e,t,n,i){var r;return void 0===i&&(i=!1),r=n&&e.extensionConfig&&e.extensionConfig[n]&&!b.isNullOrUndefined(e.extensionConfig[n][t])?e.extensionConfig[n][t]:e[t],b.isNullOrUndefined(r)?i:r},e}(),nt=function(){function e(){this.applicationVersion="ai.application.ver",this.applicationBuild="ai.application.build",this.applicationTypeId="ai.application.typeId",this.applicationId="ai.application.applicationId",this.applicationLayer="ai.application.layer",this.deviceId="ai.device.id",this.deviceIp="ai.device.ip",this.deviceLanguage="ai.device.language",this.deviceLocale="ai.device.locale",this.deviceModel="ai.device.model",this.deviceFriendlyName="ai.device.friendlyName",this.deviceNetwork="ai.device.network",this.deviceNetworkName="ai.device.networkName",this.deviceOEMName="ai.device.oemName",this.deviceOS="ai.device.os",this.deviceOSVersion="ai.device.osVersion",this.deviceRoleInstance="ai.device.roleInstance",this.deviceRoleName="ai.device.roleName",this.deviceScreenResolution="ai.device.screenResolution",this.deviceType="ai.device.type",this.deviceMachineName="ai.device.machineName",this.deviceVMName="ai.device.vmName",this.deviceBrowser="ai.device.browser",this.deviceBrowserVersion="ai.device.browserVersion",this.locationIp="ai.location.ip",this.locationCountry="ai.location.country",this.locationProvince="ai.location.province",this.locationCity="ai.location.city",this.operationId="ai.operation.id",this.operationName="ai.operation.name",this.operationParentId="ai.operation.parentId",this.operationRootId="ai.operation.rootId",this.operationSyntheticSource="ai.operation.syntheticSource",this.operationCorrelationVector="ai.operation.correlationVector",this.sessionId="ai.session.id",this.sessionIsFirst="ai.session.isFirst",this.sessionIsNew="ai.session.isNew",this.userAccountAcquisitionDate="ai.user.accountAcquisitionDate",this.userAccountId="ai.user.accountId",this.userAgent="ai.user.userAgent",this.userId="ai.user.id",this.userStoreRegion="ai.user.storeRegion",this.userAuthUserId="ai.user.authUserId",this.userAnonymousUserAcquisitionDate="ai.user.anonUserAcquisitionDate",this.userAuthenticatedUserAcquisitionDate="ai.user.authUserAcquisitionDate",this.cloudName="ai.cloud.name",this.cloudRole="ai.cloud.role",this.cloudRoleVer="ai.cloud.roleVer",this.cloudRoleInstance="ai.cloud.roleInstance",this.cloudEnvironment="ai.cloud.environment",this.cloudLocation="ai.cloud.location",this.cloudDeploymentUnit="ai.cloud.deploymentUnit",this.internalNodeName="ai.internal.nodeName",this.internalSdkVersion="ai.internal.sdkVersion",this.internalAgentVersion="ai.internal.agentVersion"}return e}(),it=function(){function e(){}return e.create=function(e,t,n,i,r,a){if(n=pe.sanitizeString(i,n)||ve.NotSpecified,b.isNullOrUndefined(e)||b.isNullOrUndefined(t)||b.isNullOrUndefined(n))throw Error("Input doesn't contain all required fields");var o={name:n,time:b.toISOString(new Date),iKey:"",ext:a||{},tags:[],data:{},baseType:t,baseData:e};if(!b.isNullOrUndefined(r))for(var s in r)r.hasOwnProperty(s)&&(o.data[s]=r[s]);return o},e}(),rt=function(){function e(){}return e.UserExt="user",e.DeviceExt="device",e.TraceExt="trace",e.WebExt="web",e.AppExt="app",e.OSExt="os",e.SessionExt="ses",e.SDKExt="sdk",e}(),at=new nt,ot="AppInsightsPropertiesPlugin",st="AppInsightsChannelPlugin",ct="ApplicationInsightsAnalytics",ut="constructor",lt="prototype",pt="function",ft="_dynInstFuncs",dt="_isDynProxy",gt="_dynClass",ht="_dynCls$",mt="_unknown_",vt="__proto__",yt=Object["getPrototypeOf"],It=0;function xt(e,t){return e&&Object[lt].hasOwnProperty.call(e,t)}function Tt(e){return typeof e===pt}function St(e){return e&&(e===Object[lt]||e===Array[lt])}function bt(e){return St(e)||e===Function[lt]}function _t(e){if(e){if(yt)return yt(e);var t=e[vt]||e[lt]||e[ut];if(t)return t}return null}function Ct(e,t,n){return t!==ut&&Tt(e[t])&&(n||xt(e,t))}function wt(e){throw new TypeError("DynamicProto: "+e)}function Et(e){var t={};for(var n in e)!t[n]&&Ct(e,n,!1)&&(t[n]=e[n]);return t}function Dt(e,t){for(var n=e.length-1;n>=0;n--)if(e[n]===t)return!0;return!1}function Nt(e,t,n){function i(e,t){return function(){return t.apply(e,arguments)}}var r={};for(var a in n)r[a]=i(t,n[a]);var o=_t(e),s=[];while(o&&!bt(o)&&!Dt(s,o)){for(var a in o)!r[a]&&Ct(o,a,!yt)&&(r[a]=i(t,o[a]));s.push(o),o=_t(o)}return r}function At(e,t,n,i){function r(e,t){var n=function(){var i=this;if(i&&xt(e,gt)){var r=((i[ft]||{})[e[gt]]||{})[t];if(r)return r.apply(i,arguments);wt("Missing ["+t+"] "+pt)}var a=e[t];return a===n&&(a=_t(e)[t]),Tt(a)||wt("["+t+"] is not a "+pt),a.apply(i,arguments)};return n[dt]=1,n}if(!St(e)){var a=n[ft]=n[ft]||{},o=a[t]=a[t]||{};for(var s in n)Ct(n,s,!1)&&n[s]!==i[s]&&(o[s]=n[s],delete n[s],(!xt(e,s)||e[s]&&!e[s][dt])&&(e[s]=r(e,s)))}}function kt(e,t){var n=_t(t);while(n&&!bt(n)){if(n===e)return!0;n=_t(n)}return!1}function Rt(e,t){return xt(e,lt)?e.name||t||mt:((e||{})[ut]||{}).name||t||mt}function Lt(e,t,n){xt(e,lt)||wt("theClass is an invalid class definition.");var i=e[lt];kt(i,t)||wt("["+Rt(e)+"] is not in class heirarchy of ["+Rt(t)+"]");var r=null;xt(i,gt)?r=i[gt]:(r=ht+Rt(e,"_")+"$"+It,It++,i[gt]=r);var a=Et(t),o=Nt(i,t,a);n(t,o),At(i,r,t,a)}var Pt=Lt,Mt=function(){function e(t,n,i,r){Pt(e,this,(function(e){var a,o=b.arrForEach,c=b.isNullOrUndefined,u=null,l=[],p=!1;function f(){i&&o(i.getTransmissionControls(),(function(e){o(e,(function(e){return e.flush(!0)}))}))}function d(e){l.push(e),u||(u=setInterval((function(){var e=l.slice(0),t=!1;l=[],o(e,(function(e){e()?t=!0:l.push(e)})),0===l.length&&(clearInterval(u),u=null),t&&f()}),100))}i&&(a=i.logger),e.trackPageView=function(e,i){var o=e.name;if(c(o)||"string"!==typeof o){var u=Object(s["a"])();o=e.name=u&&u.title||""}var l=e.uri;if(c(l)||"string"!==typeof l){var g=Object(s["f"])();l=e.uri=g&&g.href||""}if(!r.isPerformanceTimingSupported())return t.sendPageViewInternal(e,i),f(),void a.throwInternal(S.WARNING,w.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 h,m,v=!1,y=r.getPerformanceTiming().navigationStart;h=Te.GetDuration(y,+new Date),r.shouldCollectDuration(h)||(h=void 0),c(i)||c(i.duration)||(m=i.duration),!n&&isNaN(m)||(isNaN(m)&&(i||(i={}),i["duration"]=h),t.sendPageViewInternal(e,i),f(),v=!0);var I=6e4;i||(i={}),d((function(){var n=!1;try{if(r.isPerformanceTimingDataReady()){n=!0;var s={name:o,uri:l};r.populatePageViewPerformanceEvent(s),s.isValid||v?(v||(i["duration"]=s.durationMs,t.sendPageViewInternal(e,i)),p||(t.sendPageViewPerformanceInternal(s,i),p=!0)):(i["duration"]=h,t.sendPageViewInternal(e,i))}else Te.GetDuration(y,+new Date)>I&&(n=!0,v||(i["duration"]=I,t.sendPageViewInternal(e,i)))}catch(c){a.throwInternal(S.CRITICAL,w.TrackPVFailedCalc,"trackPageView failed on page load calculation: "+ve.getExceptionName(c),{exception:ve.dump(c)})}return n}))}}))}return e}(),Ot=function(){function e(e,t){this.prevPageVisitDataKeyName="prevPageVisitData",this.pageVisitTimeTrackingHandler=t,this._logger=e}return e.prototype.trackPreviousPageVisit=function(e,t){try{var n=this.restartPageVisitTimer(e,t);n&&this.pageVisitTimeTrackingHandler(n.pageName,n.pageUrl,n.pageVisitTime)}catch(i){this._logger.warnToConsole("Auto track page visit time failed, metric will not be collected: "+ve.dump(i))}},e.prototype.restartPageVisitTimer=function(e,t){try{var n=this.stopPageVisitTimer();return this.startPageVisitTimer(e,t),n}catch(i){return this._logger.warnToConsole("Call to restart failed: "+ve.dump(i)),null}},e.prototype.startPageVisitTimer=function(e,t){try{if(ve.canUseSessionStorage()){if(null!=ve.getSessionStorage(this._logger,this.prevPageVisitDataKeyName))throw new Error("Cannot call startPageVisit consecutively without first calling stopPageVisit");var n=new Ut(e,t),i=Object(s["e"])().stringify(n);ve.setSessionStorage(this._logger,this.prevPageVisitDataKeyName,i)}}catch(r){this._logger.warnToConsole("Call to start failed: "+ve.dump(r))}},e.prototype.stopPageVisitTimer=function(){try{if(ve.canUseSessionStorage()){var e=Date.now(),t=ve.getSessionStorage(this._logger,this.prevPageVisitDataKeyName);if(t&&Object(s["k"])()){var n=Object(s["e"])().parse(t);return n.pageVisitTime=e-n.pageVisitStartTime,ve.removeSessionStorage(this._logger,this.prevPageVisitDataKeyName),n}return null}return null}catch(i){return this._logger.warnToConsole("Stop page visit timer failed: "+ve.dump(i)),null}},e}(),Ut=function(){function e(e,t){this.pageVisitStartTime=Date.now(),this.pageName=e,this.pageUrl=t}return e}(),Ft=function(){function e(e){this.MAX_DURATION_ALLOWED=36e5,e&&(this._logger=e.logger)}return e.prototype.populatePageViewPerformanceEvent=function(e){e.isValid=!1;var t=this.getPerformanceNavigationTiming(),n=this.getPerformanceTiming();if(t||n){if(t)var i=t.duration,r=Te.GetDuration(t.startTime,t.connectEnd),a=Te.GetDuration(t.requestStart,t.responseStart),o=Te.GetDuration(t.responseStart,t.responseEnd),s=Te.GetDuration(t.responseEnd,t.loadEventEnd);else i=Te.GetDuration(n.navigationStart,n.loadEventEnd),r=Te.GetDuration(n.navigationStart,n.connectEnd),a=Te.GetDuration(n.requestStart,n.responseStart),o=Te.GetDuration(n.responseStart,n.responseEnd),s=Te.GetDuration(n.responseEnd,n.loadEventEnd);0===i?this._logger.throwInternal(S.WARNING,w.ErrorPVCalc,"error calculating page view performance.",{total:i,network:r,request:a,response:o,dom:s}):this.shouldCollectDuration(i,r,a,o,s)?i0},e.prototype.isPerformanceTimingSupported=function(){var e=Object(s["h"])();return e&&e.timing},e.prototype.isPerformanceTimingDataReady=function(){var e=Object(s["h"])(),t=e?e.timing:0;return t&&t.domainLookupStart>0&&t.navigationStart>0&&t.responseStart>0&&t.requestStart>0&&t.loadEventEnd>0&&t.responseEnd>0&&t.connectEnd>0&&t.domLoading>0},e.prototype.shouldCollectDuration=function(){for(var e=[],t=0;t=this.MAX_DURATION_ALLOWED)return!1;return!0},e}(),jt="duration"; /*! * Application Insights JavaScript SDK - Web Analytics, 2.5.4 * Copyright (c) Microsoft and contributors. All rights reserved. */function qt(e,t){e&&e.dispatchEvent&&t&&e.dispatchEvent(t)}var Bt=function(e){function t(){var t=e.call(this)||this;t.identifier=ct,t.priority=180,t.autoRoutePVDelay=500,t._trackAjaxAttempts=0;var n=Object(s["f"])();return t._prevUri=n&&n.href||"",t}return a(t,e),t.getDefaultConfig=function(e){return e||(e={}),e.sessionRenewalMs=18e5,e.sessionExpirationMs=864e5,e.disableExceptionTracking=ve.stringToBoolOrDefault(e.disableExceptionTracking),e.autoTrackPageVisitTime=ve.stringToBoolOrDefault(e.autoTrackPageVisitTime),e.overridePageViewDuration=ve.stringToBoolOrDefault(e.overridePageViewDuration),e.enableUnhandledPromiseRejectionTracking=ve.stringToBoolOrDefault(e.enableUnhandledPromiseRejectionTracking),(isNaN(e.samplingPercentage)||e.samplingPercentage<=0||e.samplingPercentage>=100)&&(e.samplingPercentage=100),e.isCookieUseDisabled=ve.stringToBoolOrDefault(e.isCookieUseDisabled),e.isStorageUseDisabled=ve.stringToBoolOrDefault(e.isStorageUseDisabled),e.isBrowserLinkTrackingEnabled=ve.stringToBoolOrDefault(e.isBrowserLinkTrackingEnabled),e.enableAutoRouteTracking=ve.stringToBoolOrDefault(e.enableAutoRouteTracking),e.namePrefix=e.namePrefix||"",e},t.prototype.processTelemetry=function(e,t){var n=!1,i=this._telemetryInitializers.length;t=this._getTelCtx(t);for(var r=0;r=0)return!1}return!0};this._addTelemetryInitializer(n)}},t.prototype._addTelemetryInitializer=function(e){this._telemetryInitializers.push(e)},t.prototype._sendCORSException=function(e){var t={message:"Script error: The browser's same-origin policy prevents us from getting the details of this exception. Consider using the 'crossorigin' attribute.",url:e,lineNumber:0,columnNumber:0,error:void 0},n=it.create(t,Fe.dataType,Fe.envelopeType,this.diagLog(),{url:e});this.core.track(n)},t.Version="2.5.4",t}(F),zt=function(){function e(e,t){this._name=t,this._events={},this._logger=e}return e.prototype.start=function(e){"undefined"!==typeof this._events[e]&&this._logger.throwInternal(S.WARNING,w.StartCalledMoreThanOnce,"start was called more than once for this event without calling stop.",{name:this._name,key:e},!0),this._events[e]=+new Date},e.prototype.stop=function(e,t,n,i){var r=this._events[e];if(isNaN(r))this._logger.throwInternal(S.WARNING,w.StopCalledWithoutStart,"stop was called without a corresponding start.",{name:this._name,key:e},!0);else{var a=+new Date,o=Te.GetDuration(r,a);this.action(e,t,o,n,i)}delete this._events[e],this._events[e]=void 0},e}(),Vt=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){if(e&&e.length>0){var t=this._config.emitLineDelimitedJson()?e.join("\n"):"["+e.join(",")+"]";return t}return null},e.prototype.markAsSent=function(e){this.clear()},e.prototype.clearSent=function(e){},e}(),Ht=function(){function e(t,n){this._bufferFullMessageSent=!1,this._logger=t,this._config=n;var i=this.getBuffer(e.BUFFER_KEY),r=this.getBuffer(e.SENT_BUFFER_KEY);this._buffer=i.concat(r),this._buffer.length>e.MAX_BUFFER_SIZE&&(this._buffer.length=e.MAX_BUFFER_SIZE),this.setBuffer(e.SENT_BUFFER_KEY,[]),this.setBuffer(e.BUFFER_KEY,this._buffer)}return e.prototype.enqueue=function(t){this._buffer.length>=e.MAX_BUFFER_SIZE?this._bufferFullMessageSent||(this._logger.throwInternal(S.WARNING,w.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){if(e&&e.length>0){var t=this._config.emitLineDelimitedJson()?e.join("\n"):"["+e.join(",")+"]";return t}return null},e.prototype.markAsSent=function(t){this._buffer=this.removePayloadsFromBuffer(t,this._buffer),this.setBuffer(e.BUFFER_KEY,this._buffer);var n=this.getBuffer(e.SENT_BUFFER_KEY);n instanceof Array&&t instanceof Array&&(n=n.concat(t),n.length>e.MAX_BUFFER_SIZE&&(this._logger.throwInternal(S.CRITICAL,w.SessionStorageBufferFull,"Sent buffer reached its maximum size: "+n.length,!0),n.length=e.MAX_BUFFER_SIZE),this.setBuffer(e.SENT_BUFFER_KEY,n))},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 a in e)if(e[a]===t[i]){r=!0;break}r||n.push(t[i])}return n},e.prototype.getBuffer=function(e){var t=e;try{t=this._config.namePrefix&&this._config.namePrefix()?this._config.namePrefix()+"_"+t:t;var n=ve.getSessionStorage(this._logger,t);if(n){var i=Object(s["e"])().parse(n);if(i)return i}}catch(r){this._logger.throwInternal(S.CRITICAL,w.FailedToRestoreStorageBuffer," storage key: "+t+", "+ve.getExceptionName(r),{exception:ve.dump(r)})}return[]},e.prototype.setBuffer=function(e,t){var n=e;try{n=this._config.namePrefix&&this._config.namePrefix()?this._config.namePrefix()+"_"+n:n;var i=JSON.stringify(t);ve.setSessionStorage(this._logger,n,i)}catch(r){ve.setSessionStorage(this._logger,n,JSON.stringify([])),this._logger.throwInternal(S.WARNING,w.FailedToSetStorageBuffer," storage key: "+n+", "+ve.getExceptionName(r)+". Buffer cleared",{exception:ve.dump(r)})}},e.BUFFER_KEY="AI_buffer",e.SENT_BUFFER_KEY="AI_sentBuffer",e.MAX_BUFFER_SIZE=2e3,e}(),Gt=function(){function e(){}return e.extractPropsAndMeasurements=function(e,t,n){if(!b.isNullOrUndefined(e))for(var i in e)if(e.hasOwnProperty(i)){var r=e[i];b.isNumber(r)?n[i]=r:b.isString(r)?t[i]=r:Object(s["k"])()&&(t[i]=Object(s["e"])().stringify(r))}},e.createEnvelope=function(t,n,i,r){var a=new ke(t,r,n);i[be]&&(a.sampleRate=i[be]),a.iKey=i.iKey;var o=i.iKey.replace(/-/g,"");return a.name=a.name.replace("{0}",o),e.extractPartAExtensions(i,a),i.tags||(i.tags=[]),a},e.extractPartAExtensions=function(t,n){if(n.tags||(n.tags={}),t.ext||(t.ext={}),t.tags||(t.tags=[]),t.ext.user){t.ext.user.authId&&(n.tags[at.userAuthUserId]=t.ext.user.authId);var i=t.ext.user.id||t.ext.user.localId;i&&(n.tags[at.userId]=i)}if(t.ext.app&&t.ext.app.sesId&&(n.tags[at.sessionId]=t.ext.app.sesId),t.ext.device&&((t.ext.device.id||t.ext.device.localId)&&(n.tags[at.deviceId]=t.ext.device.id||t.ext.device.localId),t.ext.device.deviceClass&&(n.tags[at.deviceType]=t.ext.device.deviceClass),t.ext.device.ip&&(n.tags[at.deviceIp]=t.ext.device.ip)),t.ext.web){var r=t.ext.web;r.browserLang&&(n.tags[at.deviceLanguage]=r.browserLang),r.browserVer&&(n.tags[at.deviceBrowserVersion]=r.browserVer),r.browser&&(n.tags[at.deviceBrowser]=r.browser),n.data=n.data||{},n.data.baseData=n.data.baseData||{},n.data.baseData.properties=n.data.baseData.properties||{},r.domain&&(n.data.baseData.properties["domain"]=r.domain),r.isManual&&(n.data.baseData.properties["isManual"]=r.isManual.toString()),r.screenRes&&(n.data.baseData.properties["screenRes"]=r.screenRes),r.userConsent&&(n.data.baseData.properties["userConsent"]=r.userConsent.toString())}t.ext.device&&t.ext.device.model&&(n.tags[at.deviceModel]=t.ext.device.model),t.ext.os&&t.ext.os.name&&(n.tags[at.deviceOS]=t.ext.os.name),t.ext.device&&t.ext.device.deviceType&&(n.tags[at.deviceType]=t.ext.device.deviceType),t.ext.trace&&(t.ext.trace.parentID&&(n.tags[at.operationParentId]=t.ext.trace.parentID),t.ext.trace.name&&(n.tags[at.operationName]=t.ext.trace.name),t.ext.trace.traceID&&(n.tags[at.operationId]=t.ext.trace.traceID));for(var a={},s=function(e){var n=t.tags[e];b.arrForEach(b.objKeys(n),(function(e){a[e]=n[e]})),t.tags.splice(e,1)},c=t.tags.length-1;c>=0;c--)s(c);for(var u in t.tags)a[u]=t.tags[u];n.tags=o({},n.tags,a),n.tags[at.internalSdkVersion]||(n.tags[at.internalSdkVersion]="javascript:"+e.Version)},e.Version="2.5.4",e}(),Wt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),t.prototype.Create=function(e,t){this._logger=e,b.isNullOrUndefined(t.baseData)&&this._logger.throwInternal(S.CRITICAL,w.TelemetryEnvelopeInvalid,"telemetryItem.baseData cannot be null.");var n=t.baseData.measurements||{},i=t.baseData.properties||{};Gt.extractPropsAndMeasurements(t.data,i,n);var r=t.baseData;if(b.isNullOrUndefined(r))return e.warnToConsole("Invalid input for dependency data"),null;var a=r.id,o=r.target,s=r.name,c=r.duration,u=r.success,l=r.responseCode,p=r.type,f=r.correlationContext,d=r.properties&&r.properties[Ce]?r.properties[Ce]:"GET",g=new Ye(e,a,o,s,c,u,l,d,p,f,i,n),h=new et(Ye.dataType,g);return Gt.createEnvelope(e,Ye.envelopeType,t,h)},t.DependencyEnvelopeCreator=new t,t}(Gt),Kt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),t.prototype.Create=function(e,t){this._logger=e,b.isNullOrUndefined(t.baseData)&&this._logger.throwInternal(S.CRITICAL,w.TelemetryEnvelopeInvalid,"telemetryItem.baseData cannot be null.");var n={},i={};t.baseType!==Pe.dataType&&(n["baseTypeSource"]=t.baseType),t.baseType===Pe.dataType?(n=t.baseData.properties||{},i=t.baseData.measurements||{}):t.baseData&&Gt.extractPropsAndMeasurements(t.baseData,n,i),Gt.extractPropsAndMeasurements(t.data,n,i);var r=t.baseData.name,a=new Pe(e,r,n,i),o=new et(Pe.dataType,a);return Gt.createEnvelope(e,Pe.envelopeType,t,o)},t.EventEnvelopeCreator=new t,t}(Gt),Xt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),t.prototype.Create=function(e,t){this._logger=e,b.isNullOrUndefined(t.baseData)&&this._logger.throwInternal(S.CRITICAL,w.TelemetryEnvelopeInvalid,"telemetryItem.baseData cannot be null.");var n=t.baseData,i=Fe.CreateFromInterface(e,n),r=new et(Fe.dataType,i);return Gt.createEnvelope(e,Fe.envelopeType,t,r)},t.ExceptionEnvelopeCreator=new t,t}(Gt),Yt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),t.prototype.Create=function(e,t){this._logger=e,b.isNullOrUndefined(t.baseData)&&this._logger.throwInternal(S.CRITICAL,w.TelemetryEnvelopeInvalid,"telemetryItem.baseData cannot be null.");var n=t.baseData.properties||{},i=t.baseData.measurements||{};Gt.extractPropsAndMeasurements(t.data,n,i);var r=t.baseData.name,a=t.baseData.average,o=t.baseData.sampleCount,s=t.baseData.min,c=t.baseData.max,u=new Ge(e,r,a,o,s,c,n,i),l=new et(Ge.dataType,u);return Gt.createEnvelope(e,Ge.envelopeType,t,l)},t.MetricEnvelopeCreator=new t,t}(Gt),Jt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),t.prototype.Create=function(e,t){var n;this._logger=e,b.isNullOrUndefined(t.baseData)&&this._logger.throwInternal(S.CRITICAL,w.TelemetryEnvelopeInvalid,"telemetryItem.baseData cannot be null."),b.isNullOrUndefined(t.baseData)||b.isNullOrUndefined(t.baseData.properties)||b.isNullOrUndefined(t.baseData.properties.duration)?b.isNullOrUndefined(t.data)||b.isNullOrUndefined(t.data["duration"])||(n=t.data["duration"],delete t.data["duration"]):(n=t.baseData.properties.duration,delete t.baseData.properties.duration);var i,r=t.baseData;t.ext&&t.ext.trace&&t.ext.trace.traceID&&(i=t.ext.trace.traceID);var a=r.id||i,o=r.name,s=r.uri,c=r.properties||{},u=r.measurements||{};if(b.isNullOrUndefined(r.refUri)||(c["refUri"]=r.refUri),b.isNullOrUndefined(r.pageType)||(c["pageType"]=r.pageType),b.isNullOrUndefined(r.isLoggedIn)||(c["isLoggedIn"]=r.isLoggedIn.toString()),!b.isNullOrUndefined(r.properties)){var l=r.properties;for(var p in l)l.hasOwnProperty(p)&&(c[p]=l[p])}Gt.extractPropsAndMeasurements(t.data,c,u);var f=new Ke(e,o,s,n,c,u,a),d=new et(Ke.dataType,f);return Gt.createEnvelope(e,Ke.envelopeType,t,d)},t.PageViewEnvelopeCreator=new t,t}(Gt),Qt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),t.prototype.Create=function(e,t){this._logger=e,b.isNullOrUndefined(t.baseData)&&this._logger.throwInternal(S.CRITICAL,w.TelemetryEnvelopeInvalid,"telemetryItem.baseData cannot be null.");var n=t.baseData,i=n.name,r=n.uri||n.url,a=n.properties||{},o=n.measurements||{};Gt.extractPropsAndMeasurements(t.data,a,o);var s=new $e(e,i,r,void 0,a,o,n),c=new et($e.dataType,s);return Gt.createEnvelope(e,$e.envelopeType,t,c)},t.PageViewPerformanceEnvelopeCreator=new t,t}(Gt),Zt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),t.prototype.Create=function(e,t){this._logger=e,b.isNullOrUndefined(t.baseData)&&this._logger.throwInternal(S.CRITICAL,w.TelemetryEnvelopeInvalid,"telemetryItem.baseData cannot be null.");var n=t.baseData.message,i=t.baseData.severityLevel,r=t.baseData.properties||{},a=t.baseData.measurements||{};Gt.extractPropsAndMeasurements(t.data,r,a);var o=new Qe(e,n,i,r,a),s=new et(Qe.dataType,o);return Gt.createEnvelope(e,Qe.envelopeType,t,s)},t.TraceEnvelopeCreator=new t,t}(Gt),$t=function(){function e(e){this._logger=e}return e.prototype.serialize=function(e){var t=this._serializeObject(e,"root");try{return Object(s["e"])().stringify(t)}catch(n){this._logger.throwInternal(S.CRITICAL,w.CannotSerializeObject,n&&b.isFunction(n.toString)?n.toString():"Error serializing object",null,!0)}},e.prototype._serializeObject=function(e,t){var n="__aiCircularRefCheck",i={};if(!e)return this._logger.throwInternal(S.CRITICAL,w.CannotSerializeObject,"cannot serialize object because it is null or undefined",{name:t},!0),i;if(e[n])return this._logger.throwInternal(S.WARNING,w.CircularReferenceDetected,"Circular reference detected while serializing object",{name:t},!0),i;if(!e.aiDataContract){if("measurements"===t)i=this._serializeStringMap(e,"number",t);else if("properties"===t)i=this._serializeStringMap(e,"string",t);else if("tags"===t)i=this._serializeStringMap(e,"string",t);else if(ve.isArray(e))i=this._serializeArray(e,t);else{this._logger.throwInternal(S.WARNING,w.CannotSerializeObjectNonSerializable,"Attempting to serialize an object which does not implement ISerializable",{name:t},!0);try{Object(s["e"])().stringify(e),i=e}catch(d){this._logger.throwInternal(S.CRITICAL,w.CannotSerializeObject,d&&b.isFunction(d.toString)?d.toString():"Error serializing object",null,!0)}}return i}for(var r in e[n]=!0,e.aiDataContract){var a=e.aiDataContract[r],o=b.isFunction(a)?a()&ee.Required:a&ee.Required,c=b.isFunction(a)?a()&ee.Hidden:a&ee.Hidden,u=a&ee.Array,l=void 0!==e[r],p=b.isObject(e[r])&&null!==e[r];if(!o||l||u){if(!c){var f=void 0;f=p?u?this._serializeArray(e[r],r):this._serializeObject(e[r],r):e[r],void 0!==f&&(i[r]=f)}}else this._logger.throwInternal(S.CRITICAL,w.MissingRequiredFieldSpecification,"Missing required field specification. The field is required but not present on source",{field:r,name:t})}return delete e[n],i},e.prototype._serializeArray=function(e,t){var n;if(e)if(ve.isArray(e)){n=[];for(var i=0;i100||e<0)&&(this._logger.throwInternal(S.WARNING,w.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 rn}return e.prototype.isSampledIn=function(e){var t=this.sampleRate,n=!1;return null===t||void 0===t||t>=100||(e.baseType===Ge.dataType||(n=this.samplingScoreGenerator.getSamplingScore(e)this._senderConfig.maxBatchSizeInBytes()&&this.triggerSend(),this._buffer.enqueue(a),this._setupTimer()}catch(c){n.diagLog().throwInternal(S.WARNING,w.FailedAddingTelemetryToBuffer,"Failed adding telemetry to the sender's buffer, some telemetry will be lost: "+ve.getExceptionName(c),{exception:ve.dump(c)})}this.processNext(e,n)},t.prototype._xhrReadyStateChange=function(e,t,n){if(4===e.readyState){var i=null;if(this._appId||(i=this._parseResponse(on(e)||e.response),i&&i.appId&&(this._appId=i.appId)),(e.status<200||e.status>=300)&&0!==e.status)!this._senderConfig.isRetryDisabled()&&this._isRetriable(e.status)?(this._resendPayload(t),this.diagLog().throwInternal(S.WARNING,w.TransmissionFailed,". Response code "+e.status+". Will retry to send "+t.length+" items.")):this._onError(t,this._formatErrorMessageXhr(e));else if(tn.isOffline()){if(!this._senderConfig.isRetryDisabled()){var r=10;this._resendPayload(t,r),this.diagLog().throwInternal(S.WARNING,w.TransmissionFailed,". Offline - Response Code: "+e.status+". Offline status: "+tn.isOffline()+". Will retry to send "+t.length+" items.")}}else 206===e.status?(i||(i=this._parseResponse(on(e)||e.response)),i&&!this._senderConfig.isRetryDisabled()?this._onPartialSuccess(t,i):this._onError(t,this._formatErrorMessageXhr(e))):(this._consecutiveErrors=0,this._onSuccess(t,n))}},t.prototype.triggerSend=function(e,t){void 0===e&&(e=!0);try{if(this._senderConfig.disableTelemetry())this._buffer.clear();else{if(this._buffer.count()>0){var n=this._buffer.getItems();t?t.call(this,n,e):this._sender(n,e)}this._lastSend=+new Date}clearTimeout(this._timeoutHandle),this._timeoutHandle=null,this._retryAt=null}catch(i){(!ve.getIEVersion()||ve.getIEVersion()>9)&&this.diagLog().throwInternal(S.CRITICAL,w.TransmissionFailed,"Telemetry transmission failed, some telemetry will be lost: "+ve.getExceptionName(i),{exception:ve.dump(i)})}},t.prototype._onError=function(e,t,n){this.diagLog().throwInternal(S.WARNING,w.OnError,"Failed to send telemetry.",{message:t}),this._buffer.clearSent(e)},t.prototype._onPartialSuccess=function(e,t){for(var n=[],i=[],r=t.errors.reverse(),a=0,o=r;a0&&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),this.diagLog().throwInternal(S.WARNING,w.TransmissionFailed,"Partial success. Delivered: "+e.length+", Failed: "+n.length+". Will retry to send "+i.length+" our of "+t.itemsReceived+" items"))},t.prototype._onSuccess=function(e,t){this._buffer.clearSent(e)},t.prototype._xdrOnLoad=function(e,t){var n=on(e);if(!e||n+""!=="200"&&""!==n){var i=this._parseResponse(n);i&&i.itemsReceived&&i.itemsReceived>i.itemsAccepted&&!this._senderConfig.isRetryDisabled()?this._onPartialSuccess(t,i):this._onError(t,this._formatErrorMessageXdr(e))}else this._consecutiveErrors=0,this._onSuccess(t,0)},t.prototype._isSampledIn=function(e){return this._sample.isSampledIn(e)},t.prototype._beaconSender=function(e,t){var n=this._senderConfig.endpointUrl(),i=this._buffer.batchPayloads(e),r=new Blob([i],{type:"text/plain;charset=UTF-8"}),a=Object(s["g"])().sendBeacon(n,r);a?(this._buffer.markAsSent(e),this._onSuccess(e,e.length)):(this._xhrSender(e,!0),this.diagLog().throwInternal(S.WARNING,w.TransmissionFailed,". Failed to send telemetry with Beacon API, retried with xhrSender."))},t.prototype._xhrSender=function(e,t){var n=this,i=new XMLHttpRequest,r=this._senderConfig.endpointUrl();try{i[Se]=!0}catch(o){}i.open("POST",r,t),i.setRequestHeader("Content-type","application/json"),ve.isInternalApplicationInsightsEndpoint(r)&&i.setRequestHeader(le.sdkContextHeader,le.sdkContextHeaderAppIdRequest),i.onreadystatechange=function(){return n._xhrReadyStateChange(i,e,e.length)},i.onerror=function(t){return n._onError(e,n._formatErrorMessageXhr(i),t)};var a=this._buffer.batchPayloads(e);i.send(a),this._buffer.markAsSent(e)},t.prototype._parseResponse=function(e){try{if(e&&""!==e){var t=Object(s["e"])().parse(e);if(t&&t.itemsReceived&&t.itemsReceived>=t.itemsAccepted&&t.itemsReceived-t.itemsAccepted===t.errors.length)return t}}catch(n){this.diagLog().throwInternal(S.CRITICAL,w.InvalidBackendResponse,"Cannot parse the response. "+ve.getExceptionName(n),{response:e})}return null},t.prototype._resendPayload=function(e,t){if(void 0===t&&(t=1),e&&0!==e.length){this._buffer.clearSent(e),this._consecutiveErrors++;for(var n=0,i=e;nthis.config.sessionExpirationMs(),i=0!==this.config.sessionExpirationMs()&&t-this.automaticSession.renewalDate>this.config.sessionRenewalMs();n||i?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=ve.getCookie(this._logger,this._storageNamePrefix());if(e&&"function"===typeof e.split)this.initializeAutomaticSessionWithData(e);else{var t=ve.getStorage(this._logger,this._storageNamePrefix());t&&this.initializeAutomaticSessionWithData(t)}this.automaticSession.id||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 n=+t[1];this.automaticSession.acquisitionDate=+new Date(n),this.automaticSession.acquisitionDate=this.automaticSession.acquisitionDate>0?this.automaticSession.acquisitionDate:0}if(t.length>2){var i=+t[2];this.automaticSession.renewalDate=+new Date(i),this.automaticSession.renewalDate=this.automaticSession.renewalDate>0?this.automaticSession.renewalDate:0}}catch(r){this._logger.throwInternal(S.CRITICAL,w.ErrorParsingAISessionCookie,"Error parsing ai_session cookie, session will be reset: "+ve.getExceptionName(r),{exception:ve.dump(r)})}0===this.automaticSession.renewalDate&&this._logger.throwInternal(S.WARNING,w.SessionRenewalDateIsZero,"AI session renewal date is 0, session will be reset.")},e.prototype.renew=function(){var e=Te.Now();this.automaticSession.id=ve.newId(),this.automaticSession.acquisitionDate=e,this.automaticSession.renewalDate=e,this.setCookie(this.automaticSession.id,this.automaticSession.acquisitionDate,this.automaticSession.renewalDate),ve.canUseLocalStorage()||this._logger.throwInternal(S.WARNING,w.BrowserDoesNotSupportLocalStorage,"Browser does not support local storage. Session durations will be inaccurate.")},e.prototype.setCookie=function(e,t,n){var i=t+this.config.sessionExpirationMs(),r=n+this.config.sessionRenewalMs(),a=new Date,o=[e,t,n];i0&&(this.id=r[0])}if(this.config=t,!this.id){this.id=ve.newId();var a=new Date,o=b.toISOString(a);this.accountAcquisitionDate=o,this.isNewUser=!0,a.setTime(a.getTime()+31536e6);var s=[this.id,o],c=this.config.cookieDomain?this.config.cookieDomain():void 0;ve.setCookie(this._logger,e.userCookieName,s.join(e.cookieSeparator)+";expires="+a.toUTCString(),c);var u=t.namePrefix&&t.namePrefix()?t.namePrefix()+"ai_session":"ai_session";ve.removeStorage(this._logger,u)}this.accountId=t.accountId?t.accountId():void 0;var l=ve.getCookie(this._logger,e.authUserCookieName);if(l){l=decodeURI(l);var p=l.split(e.cookieSeparator);p[0]&&(this.authenticatedId=p[0]),p.length>1&&p[1]&&(this.accountId=p[1])}}return e.prototype.setAuthenticatedUserContext=function(t,n,i){void 0===i&&(i=!1);var r=!this.validateUserInput(t)||n&&!this.validateUserInput(n);if(r)this._logger.throwInternal(S.WARNING,w.SetAuthContextFailedAccountName,"Setting auth user context failed. User auth/account id should be of type string, and not contain commas, semi-colons, equal signs, spaces, or vertical-bars.",!0);else{this.authenticatedId=t;var a=this.authenticatedId;n&&(this.accountId=n,a=[this.authenticatedId,this.accountId].join(e.cookieSeparator)),i&&ve.setCookie(this._logger,e.authUserCookieName,encodeURI(a),this.config.cookieDomain())}},e.prototype.clearAuthenticatedUserContext=function(){this.authenticatedId=null,this.accountId=null,ve.deleteCookie(this._logger,e.authUserCookieName)},e.prototype.validateUserInput=function(e){return!("string"!==typeof e||!e||e.match(/,|;|=| |\|/))},e.cookieSeparator="|",e.userCookieName="ai_user",e.authUserCookieName="ai_authUser",e}(),hn=function(){function e(){}return e}(),mn=function(){function e(e,t,n,i){this.traceID=e||ve.generateW3CId(),this.parentID=t,this.name=n;var r=Object(s["f"])();!n&&r&&r.pathname&&(this.name=r.pathname),this.name=pe.sanitizeString(i,this.name)}return e}(),vn=function(){function e(e,t){Object(s["l"])()&&(this.sessionManager=new un(t,e),this.application=new ln,this.device=new pn,this.internal=new dn(t),this.location=new hn,this.user=new gn(t,e),this.telemetryTrace=new mn(void 0,void 0,void 0,e),this.session=new cn),this.appId=function(){return null}}return e.prototype.applySessionContext=function(e,t){var n=this.session||this.sessionManager&&this.sessionManager.automaticSession;n&&"string"===typeof n.id&&(e.ext.app.sesId=n.id),this.session&&("string"===typeof this.session.id?e.ext.app.sesId=this.session.id:e.ext.app.sesId=this.sessionManager.automaticSession.id)},e.prototype.applyOperatingSystemContxt=function(e,t){this.os&&this.os.name&&(e.ext.os=this.os)},e.prototype.applyApplicationContext=function(e,t){this.application&&("string"===typeof this.application.ver&&(e.tags[at.applicationVersion]=this.application.ver),"string"===typeof this.application.build&&(e.tags[at.applicationBuild]=this.application.build))},e.prototype.applyDeviceContext=function(e,t){this.device&&("string"===typeof this.device.id&&(e.ext.device.localId=this.device.id),"string"===typeof this.device.ip&&(e.ext.device.ip=this.device.ip),"string"===typeof this.device.model&&(e.ext.device.model=this.device.model),"string"===typeof this.device.deviceClass&&(e.ext.device.deviceClass=this.device.deviceClass))},e.prototype.applyInternalContext=function(e,t){this.internal&&("string"===typeof this.internal.agentVersion&&(e.tags[at.internalAgentVersion]=this.internal.agentVersion),"string"===typeof this.internal.sdkVersion&&(e.tags[at.internalSdkVersion]=this.internal.sdkVersion))},e.prototype.applyLocationContext=function(e,t){this.location&&"string"===typeof this.location.ip&&(e.tags[at.locationIp]=this.location.ip)},e.prototype.applyOperationContext=function(e,t){if(this.telemetryTrace){var n=e.ext.trace||{traceID:void 0,parentID:void 0};"string"===typeof this.telemetryTrace.traceID&&(n.traceID=this.telemetryTrace.traceID),"string"===typeof this.telemetryTrace.name&&(n.name=this.telemetryTrace.name),"string"===typeof this.telemetryTrace.parentID&&(n.parentID=this.telemetryTrace.parentID),e.ext.trace=n}},e.prototype.applyWebContext=function(e,t){this.web&&(e.ext.web=e.ext.web||{},e.ext.web=this.web)},e.prototype.applyUserContext=function(e,t){if(this.user){if(e.tags||(e.tags=[]),"string"===typeof this.user.accountId){e.tags[at.userAccountId]=this.user.accountId}"string"===typeof this.user.id&&(e.ext.user.id=this.user.id),"string"===typeof this.user.authenticatedId&&(e.ext.user.authId=this.user.authenticatedId)}},e.prototype.cleanUp=function(e,t){e.ext[rt.DeviceExt]&&0===b.objKeys(e.ext[rt.DeviceExt]).length&&delete e.ext[rt.DeviceExt],e.ext[rt.UserExt]&&0===b.objKeys(e.ext[rt.UserExt]).length&&delete e.ext[rt.UserExt],e.ext[rt.WebExt]&&0===b.objKeys(e.ext[rt.WebExt]).length&&delete e.ext[rt.WebExt],e.ext[rt.OSExt]&&0===b.objKeys(e.ext[rt.OSExt]).length&&delete e.ext[rt.OSExt],e.ext[rt.AppExt]&&0===b.objKeys(e.ext[rt.AppExt]).length&&delete e.ext[rt.AppExt],e.ext[rt.TraceExt]&&0===b.objKeys(e.ext[rt.TraceExt]).length&&delete e.ext[rt.TraceExt]},e}(),yn=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.priority=110,t.identifier=ot,t}return a(t,e),t.getDefaultConfig=function(){var e={instrumentationKey:function(){},accountId:function(){return null},sessionRenewalMs:function(){return 18e5},samplingPercentage:function(){return 100},sessionExpirationMs:function(){return 864e5},cookieDomain:function(){return null},sdkExtension:function(){return null},isBrowserLinkTrackingEnabled:function(){return!1},appId:function(){return null},namePrefix:function(){}};return e},t.prototype.initialize=function(n,i,r,a){var o=this;e.prototype.initialize.call(this,n,i,r,a);var s=this._getTelCtx(),c=this.identifier,u=t.getDefaultConfig();this._extensionConfig=this._extensionConfig||t.getDefaultConfig();var l=function(e){p._extensionConfig[e]=function(){return s.getConfig(c,e,u[e]())}},p=this;for(var f in u)l(f);this.context=new vn(i.logger,this._extensionConfig),this._breezeChannel=ve.getExtension(r,st),this.context.appId=function(){return o._breezeChannel?o._breezeChannel["_appId"]:null}},t.prototype.processTelemetry=function(e,t){if(b.isNullOrUndefined(e));else{if(t=this._getTelCtx(t),e.name===Ke.envelopeType&&t.diagLog().resetInternalMessageCount(),this.context.session&&"string"!==typeof this.context.session.id&&this.context.sessionManager.update(),this._processTelemetryInternal(e,t),this.context&&this.context.user&&this.context.user.isNewUser){this.context.user.isNewUser=!1;var n=new E(w.SendBrowserInfoOnUserInit,(Object(s["g"])()||{}).userAgent||"");t.diagLog().logInternalMessage(S.CRITICAL,n)}this.processNext(e,t)}},t.prototype._processTelemetryInternal=function(e,t){e.tags||(e.tags=[]),e.ext||(e.ext={});var n=e.ext;n[rt.DeviceExt]=n[rt.DeviceExt]||{},n[rt.WebExt]=n[rt.WebExt]||{},n[rt.UserExt]=n[rt.UserExt]||{},n[rt.OSExt]=n[rt.OSExt]||{},n[rt.AppExt]=n[rt.AppExt]||{},n[rt.TraceExt]=n[rt.TraceExt]||{};var i=this.context;i.applySessionContext(e,t),i.applyApplicationContext(e,t),i.applyDeviceContext(e,t),i.applyOperationContext(e,t),i.applyUserContext(e,t),i.applyOperatingSystemContxt(e,t),i.applyWebContext(e,t),i.applyLocationContext(e,t),i.applyInternalContext(e,t),i.cleanUp(e,t)},t}(F),In=yn,xn="_aiHooks",Tn=["req","rsp","hkErr","fnErr"];function Sn(e,t){if(e)for(var n=0;n=0&&r<=2&&Sn(e,(function(e,a){var o=e.cbks,s=o[Tn[r]];if(s){t.ctx=function(){var e=i[a]=i[a]||{};return e};try{s.apply(t.inst,n)}catch(l){var c=t.err;try{var u=o[Tn[2]];u&&(t.err=l,u.apply(t.inst,n))}catch(p){}finally{t.err=c}}}}))}function _n(e){return function(){var t=this,n=arguments,i=e.h,r={name:e.n,inst:t,ctx:null,set:c},a=[],o=s([r],n);function s(e,t){return Sn(t,(function(t){e.push(t)})),e}function c(e,t){n=s([],n),n[e]=t,o=s([r],n)}bn(i,r,o,a,0);var u=e.f;try{r.rslt=u.apply(t,n)}catch(l){throw r.err=l,bn(i,r,o,a,3),l}return bn(i,r,o,a,1),r.rslt}}function Cn(e,t,n){var i=null;return e&&(b.hasOwnProperty(e,t)?i=e:n&&(i=Cn(e[s["o"]],t,!1))),i}function wn(e,t,n){return e?En(e[s["o"]],t,n,!1):null}function En(e,t,n,i){if(void 0===i&&(i=!0),e&&t&&n){var r=Cn(e,t,i),a=r[t];if(typeof a===s["m"]){var o=a[xn];if(!o){o={i:0,n:t,f:a,h:[]};var c=_n(o);c[xn]=o,r[t]=c}var u={id:o.i,cbks:n,rm:function(){var e=this.id;Sn(o.h,(function(t,n){if(t.id===e)return o.h.splice(n,1),1}))}};return o.i++,o.h.push(u),u}}return null} /*! * Application Insights JavaScript SDK - Dependencies Plugin, 2.5.4 * Copyright (c) Microsoft and contributors. All rights reserved. */ var Dn="properties",Nn=b.objKeys,An=b.arrForEach;function kn(e,t,n){var i=0,r=e[t],a=e[n];return r&&a&&(i=Te.GetDuration(r,a)),i}function Rn(e,t,n,i,r){var a=0,o=kn(n,i,r);return o&&(a=Ln(e,t,ve.msToTimeSpan(o))),a}function Ln(e,t,n){var i="ajaxPerf",r=0;if(e&&t&&n){var a=e[i]=e[i]||{};a[t]=n,r=1}return r}function Pn(e,t){var n=e.perfTiming,i=t[Dn]||{},r=0,a=b.isString,o="name",s="Start",c="End",u="domainLookup",l="connect",p="redirect",f="request",d="response",g="duration",h="startTime",m=u+s,v=u+c,y=l+s,I=l+c,x=f+s,S=f+c,_=d+s,C=d+c,w=p+s,E=p=c,D="transferSize",N="encodedBodySize",A="decodedBodySize",k="serverTiming";if(n){r|=Rn(i,p,n,w,E),r|=Rn(i,u,n,m,v),r|=Rn(i,l,n,y,I),r|=Rn(i,f,n,x,S),r|=Rn(i,d,n,_,C),r|=Rn(i,"networkConnect",n,h,I),r|=Rn(i,"sentRequest",n,x,C);var R=n[g];R||(R=kn(n,h,C)||0),r|=Ln(i,g,R),r|=Ln(i,"perfTotal",R);var L=n[k];if(L){var P={};An(L,(function(e,t){var n=T(e[o]||""+t),i=P[n]||{};An(Nn(e),(function(t){var n=e[t];(t!==o&&a(n)||b.isNumber(n))&&(i[t]&&(n=i[t]+";"+n),!n&&a(n)||(i[t]=n))})),P[n]=i})),r|=Ln(i,k,P)}r|=Ln(i,D,n[D]),r|=Ln(i,N,n[N]),r|=Ln(i,A,n[A])}else e.perfMark&&(r|=Ln(i,"missing",e.perfAttempts));r&&(t[Dn]=i)}var Mn=function(){function e(){var e=this;e.openDone=!1,e.setRequestHeaderDone=!1,e.sendDone=!1,e.abortDone=!1,e.stateChangeAttached=!1}return e}(),On=function(){function e(t,n,i){var r=this,a=i,o="responseText";r.perfMark=null,r.completed=!1,r.requestHeadersSize=null,r.requestHeaders=null,r.responseReceivingDuration=null,r.callbackDuration=null,r.ajaxTotalDuration=null,r.aborted=0,r.pageUrl=null,r.requestUrl=null,r.requestSize=0,r.method=null,r.status=null,r.requestSentTime=null,r.responseStartedTime=null,r.responseFinishedTime=null,r.callbackFinishedTime=null,r.endTime=null,r.xhrMonitoringState=new Mn,r.clientFailure=0,r.traceID=t,r.spanID=n,Pt(e,r,(function(e){e.getAbsoluteUrl=function(){return e.requestUrl?ye.getAbsoluteUrl(e.requestUrl):null},e.getPathName=function(){return e.requestUrl?pe.sanitizeUrl(a,ye.getCompleteUrl(e.method,e.requestUrl)):null},e.CreateTrackItem=function(t,n,i){if(e.ajaxTotalDuration=Math.round(1e3*Te.GetDuration(e.requestSentTime,e.responseFinishedTime))/1e3,e.ajaxTotalDuration<0)return null;var r,a=(r={id:"|"+e.traceID+"."+e.spanID,target:e.getAbsoluteUrl(),name:e.getPathName(),type:t,duration:e.ajaxTotalDuration,success:+e.status>=200&&+e.status<400,responseCode:+e.status,method:e.method},r[Dn]={HttpMethod:e.method},r);if(Pn(e,a),n&&Nn(e.requestHeaders).length>0&&(a[Dn]=a[Dn]||{},a[Dn].requestHeaders=e.requestHeaders),i){var s=i();if(s){var c=s.correlationContext;if(c&&(a.correlationContext=c),s.headerMap&&Nn(s.headerMap).length>0&&(a[Dn]=a[Dn]||{},a[Dn].responseHeaders=s.headerMap),e.status>=400){var u=s.type;a[Dn]=a[Dn]||{},""!==u&&"text"!==u||(a[Dn][o]=s[o]?s.statusText+" - "+s[o]:s.statusText),"json"===u&&(a[Dn][o]=s.response?s.statusText+" - "+JSON.stringify(s.response):s.statusText)}}}return a}}))}return e}(),Un=function(){function e(t,n){var i=this;i.traceFlag=e.DEFAULT_TRACE_FLAG,i.version=e.DEFAULT_VERSION,t&&e.isValidTraceId(t)?i.traceId=t:i.traceId=ve.generateW3CId(),n&&e.isValidSpanId(n)?i.spanId=n:i.spanId=ve.generateW3CId().substr(0,16)}return e.isValidTraceId=function(e){return e.match(/^[0-9a-f]{32}$/)&&"00000000000000000000000000000000"!==e},e.isValidSpanId=function(e){return e.match(/^[0-9a-f]{16}$/)&&"0000000000000000"!==e},e.prototype.toString=function(){var e=this;return e.version+"-"+e.traceId+"-"+e.spanId+"-"+e.traceFlag},e.DEFAULT_TRACE_FLAG="01",e.DEFAULT_VERSION="00",e}(),Fn="ai.ajxmn.",jn="diagLog",qn="ajaxData",Bn="throwInternal",zn="fetch",Vn=b.isNullOrUndefined,Hn=b.arrForEach,Gn=b.objKeys,Wn=0;function Kn(){var e=Object(s["b"])();return!e||Vn(e.Request)||Vn(e.Request[s["o"]])||Vn(e[zn])?null:e[zn]}function Xn(e){var t=!1;if(typeof XMLHttpRequest!==s["p"]&&!Vn(XMLHttpRequest)){var n=XMLHttpRequest[s["o"]];t=!Vn(n)&&!Vn(n.open)&&!Vn(n.send)&&!Vn(n.abort)}try{" a ".trim()}catch(a){t=!1}if(t)try{var i=new XMLHttpRequest;i[qn]={};var r=XMLHttpRequest[s["o"]].open;XMLHttpRequest[s["o"]].open=r}catch(o){t=!1,Jn(e,w.FailedMonitorAjaxOpen,"Failed to enable XMLHttpRequest monitoring, extension is not supported",{exception:ve.dump(o)})}return t}function Yn(e){var t="";try{Vn(e)||Vn(e[qn])||Vn(e[qn].requestUrl)||(t+="(url: '"+e[qn].requestUrl+"')")}catch(n){}return t}function Jn(e,t,n,i,r){e[jn]()[Bn](S.CRITICAL,t,n,i,r)}function Qn(e,t,n,i,r){e[jn]()[Bn](S.WARNING,t,n,i,r)}function Zn(e,t,n){return function(i){Jn(e,t,n,{ajaxDiagnosticsMessage:Yn(i.inst),exception:ve.dump(i.err)})}}function $n(e,t){return e&&t?e.indexOf(t):-1}var ei=function(e){function t(){var n=e.call(this)||this;n.identifier=t.identifier,n.priority=120;var i,r,a,o,c="trackDependencyDataInternal",u=Object(s["f"])(),l=!1,p=!1,f=u&&u.host&&u.host.toLowerCase(),d=t.getEmptyConfig(),g=!1,h=0,m=!1,v=0,y=!1,I=[],x={};return Pt(t,n,(function(e,n){function u(){var t=Kn();if(t){var n=Object(s["b"])(),i=t.polyfill;!1===d.disableFetchTracking?(I.push(En(n,zn,{req:function(t,n,r){var a;if(l&&!_(null,n,r)&&(!i||!p)){var o=t.ctx();a=M(n,r);var s=e.includeCorrelationHeaders(a,n,r);s!==r&&t.set(1,s),o.data=a}},rsp:function(e,t){var n=e.ctx().data;n&&(e.rslt=e.rslt.then((function(t){return U(e,(t||{}).status,t,n,(function(){var e={statusText:t.statusText,headerMap:null,correlationContext:F(t)};if(y){var n={};t.headers.forEach((function(e,t){n[t]=e})),e.headerMap=n}return e})),t}))["catch"]((function(i){throw U(e,0,t,n,null,{error:i.message}),i})))},hkErr:Zn(e,w.FailedMonitorAjaxOpen,"Failed to monitor Window.fetch, monitoring data for this fetch call may be incorrect.")})),l=!0):i&&I.push(En(n,zn,{req:function(e,t,n){_(null,t,n)}})),i&&(n[zn].polyfill=i)}}function T(e,t,n){I.push(wn(e,t,n))}function S(){Xn(e)&&!p&&(T(XMLHttpRequest,"open",{req:function(e,t,n,i){var r=e.inst,a=r[qn];_(r,n)||!E(r,!0)||a&&a.xhrMonitoringState.openDone||D(r,t,n,i)},hkErr:Zn(e,w.FailedMonitorAjaxOpen,"Failed to monitor XMLHttpRequest.open, monitoring data for this ajax call may be incorrect.")}),T(XMLHttpRequest,"send",{req:function(t,n){var i=t.inst,r=i[qn];E(i)&&!r.xhrMonitoringState.sendDone&&(L("xhr",r),r.requestSentTime=Te.Now(),i=e.includeCorrelationHeaders(r,void 0,void 0,i),r.xhrMonitoringState.sendDone=!0)},hkErr:Zn(e,w.FailedMonitorAjaxSend,"Failed to monitor XMLHttpRequest, monitoring data for this ajax call may be incorrect.")}),T(XMLHttpRequest,"abort",{req:function(e){var t=e.inst,n=t[qn];E(t)&&!n.xhrMonitoringState.abortDone&&(n.aborted=1,n.xhrMonitoringState.abortDone=!0)},hkErr:Zn(e,w.FailedMonitorAjaxAbort,"Failed to monitor XMLHttpRequest.abort, monitoring data for this ajax call may be incorrect.")}),g&&T(XMLHttpRequest,"setRequestHeader",{req:function(e,t,n){var i=e.inst;E(i)&&(i[qn].requestHeaders[t]=n)},hkErr:Zn(e,w.FailedMonitorAjaxSetRequestHeader,"Failed to monitor XMLHttpRequest.setRequestHeader, monitoring data for this ajax call may be incorrect.")}),p=!0)}function _(e,t,n){var i=!1,r=((b.isString(t)?t:(t||{}).url||"")||"").toLowerCase(),a=$n(r,"?"),o=$n(r,"#");return(-1===a||-1!==o&&o=0;d--){var g=f[d];if(g){if("resource"===g.entryType)g.initiatorType!==e||-1===$n(g.name,u)&&-1===$n(u,g.name)||(p=g);else if("mark"===g.entryType&&g.name===r.name){t.perfTiming=p;break}if(g.startTime=o||!1===t.async?(r&&b.isFunction(a.clearMarks)&&a.clearMarks(r.name),t.perfAttempts=l,n()):setTimeout(s,c)}catch(h){i(h)}})()}function M(t,n){var r=i&&i.telemetryTrace&&i.telemetryTrace.traceID||ve.generateW3CId(),a=ve.generateW3CId().substr(0,16),o=new On(r,a,e[jn]());o.requestSentTime=Te.Now(),t instanceof Request?o.requestUrl=t?t.url:"":o.requestUrl=t;var s="GET";n&&n.method?s=n.method:t&&t instanceof Request&&(s=t.method),o.method=s;var c={};if(g){var u=new Headers((n?n.headers:0)||t instanceof Request&&t.headers||{});u.forEach((function(e,t){c[t]=e}))}return o.requestHeaders=c,L("fetch",o),o}function O(t){var n="";try{Vn(t)||(n+="string"===typeof t?"(url: '"+t+"')":"(url: '"+t.url+"')")}catch(i){Jn(e,w.FailedMonitorAjaxOpen,"Failed to grab failed fetch diagnostics message",{exception:ve.dump(i)})}return n}function U(t,n,i,r,a,o){function s(t,n,r){var a=r||{};a["fetchDiagnosticsMessage"]=O(i),n&&(a["exception"]=ve.dump(n)),Qn(e,t,"Failed to calculate the duration of the fetch call, monitoring data for this fetch call won't be sent.",a)}r&&(r.responseFinishedTime=Te.Now(),r.status=n,P("fetch",r,(function(){var t=r.CreateTrackItem("Fetch",g,a);t?e[c](t):s(w.FailedMonitorAjaxDur,null,{requestSentTime:r.requestSentTime,responseFinishedTime:r.responseFinishedTime})}),(function(e){s(w.FailedMonitorAjaxGetCorrelationHeader,e,null)})))}function F(t){if(t&&t.headers)try{var n=t.headers.get(le.requestContextHeader);return Ie.getCorrelationContext(n)}catch(i){Qn(e,w.FailedMonitorAjaxGetCorrelationHeader,"Failed to get Request-Context correlation header as it may be not included in the response or not accessible.",{fetchDiagnosticsMessage:O(t),exception:ve.dump(i)})}}e.initialize=function(s,c,l,p){if(!e.isInitialized()){n.initialize(s,c,l,p);var f=e._getTelCtx(),h=t.getDefaultConfig();Hn(Gn(h),(function(e){d[e]=f.getConfig(t.identifier,e,h[e])}));var I=d.distributedTracingMode;if(g=d.enableRequestHeaderTracking,m=d.enableAjaxPerfTracking,v=d.maxAjaxCallsPerView,y=d.enableResponseHeaderTracking,a=I===te.AI||I===te.AI_AND_W3C,r=I===te.AI_AND_W3C||I===te.W3C,m){var x=s.instrumentationKey||"unkwn";o=x.length>5?Fn+x.substring(x.length-5)+".":Fn+x+"."}if(!1===d.disableAjaxTracking&&S(),u(),l.length>0&&l){var T=void 0,b=0;while(!T&&b0)throw new Error("Extensions not allowed in legacy mode");var i=[],r=new sn;return i.push(r),i.push(t.properties),i.push(t.dependencies),i.push(t.appInsights),t.core.initialize(t.config,i),t.context=t.properties.context,n(t.snippet),t.emptyQueue(),t.pollInternalLogs(),t.addHousekeepingBeforeUnload(this),t},e.prototype.updateSnippetDefinitions=function(e){for(var t in this)b.isString(t)&&(e[t]=this[t])},e.prototype.emptyQueue=function(){var e=this;try{if(ve.isArray(e.snippet.queue)){for(var t=e.snippet.queue.length,n=0;n0?e.config.diagnosticLogInterval:1e4},e}(),ii=function(){function e(t,n){this._hasLegacyInitializers=!1,this._queue=[],this.config=e.getDefaultConfig(t.config),this.appInsightsNew=n,this.context={addTelemetryInitializer:this.addTelemetryInitializers.bind(this)}}return e.getDefaultConfig=function(e){return e||(e={}),e.endpointUrl=e.endpointUrl||"https://dc.services.visualstudio.com/v2/track",e.sessionRenewalMs=18e5,e.sessionExpirationMs=864e5,e.maxBatchSizeInBytes=e.maxBatchSizeInBytes>0?e.maxBatchSizeInBytes:102400,e.maxBatchInterval=isNaN(e.maxBatchInterval)?15e3:e.maxBatchInterval,e.enableDebug=ve.stringToBoolOrDefault(e.enableDebug),e.disableExceptionTracking=ve.stringToBoolOrDefault(e.disableExceptionTracking),e.disableTelemetry=ve.stringToBoolOrDefault(e.disableTelemetry),e.verboseLogging=ve.stringToBoolOrDefault(e.verboseLogging),e.emitLineDelimitedJson=ve.stringToBoolOrDefault(e.emitLineDelimitedJson),e.diagnosticLogInterval=e.diagnosticLogInterval||1e4,e.autoTrackPageVisitTime=ve.stringToBoolOrDefault(e.autoTrackPageVisitTime),(isNaN(e.samplingPercentage)||e.samplingPercentage<=0||e.samplingPercentage>=100)&&(e.samplingPercentage=100),e.disableAjaxTracking=ve.stringToBoolOrDefault(e.disableAjaxTracking),e.maxAjaxCallsPerView=isNaN(e.maxAjaxCallsPerView)?500:e.maxAjaxCallsPerView,e.isBeaconApiDisabled=ve.stringToBoolOrDefault(e.isBeaconApiDisabled,!0),e.disableCorrelationHeaders=ve.stringToBoolOrDefault(e.disableCorrelationHeaders),e.correlationHeaderExcludedDomains=e.correlationHeaderExcludedDomains||["*.blob.core.windows.net","*.blob.core.chinacloudapi.cn","*.blob.core.cloudapi.de","*.blob.core.usgovcloudapi.net"],e.disableFlushOnBeforeUnload=ve.stringToBoolOrDefault(e.disableFlushOnBeforeUnload),e.disableFlushOnUnload=ve.stringToBoolOrDefault(e.disableFlushOnUnload,e.disableFlushOnBeforeUnload),e.enableSessionStorageBuffer=ve.stringToBoolOrDefault(e.enableSessionStorageBuffer,!0),e.isRetryDisabled=ve.stringToBoolOrDefault(e.isRetryDisabled),e.isCookieUseDisabled=ve.stringToBoolOrDefault(e.isCookieUseDisabled),e.isStorageUseDisabled=ve.stringToBoolOrDefault(e.isStorageUseDisabled),e.isBrowserLinkTrackingEnabled=ve.stringToBoolOrDefault(e.isBrowserLinkTrackingEnabled),e.enableCorsCorrelation=ve.stringToBoolOrDefault(e.enableCorsCorrelation),e},e.prototype.addTelemetryInitializers=function(e){var t=this;this._hasLegacyInitializers||(this.appInsightsNew.addTelemetryInitializer((function(e){t._processLegacyInitializers(e)})),this._hasLegacyInitializers=!0),this._queue.push(e)},e.prototype.startTrackPage=function(e){this.appInsightsNew.startTrackPage(e)},e.prototype.stopTrackPage=function(e,t,n,i){this.appInsightsNew.stopTrackPage(e,t,n)},e.prototype.trackPageView=function(e,t,n,i,r){var a={name:e,uri:t,properties:n,measurements:i};this.appInsightsNew.trackPageView(a)},e.prototype.trackEvent=function(e,t,n){this.appInsightsNew.trackEvent({name:e})},e.prototype.trackDependency=function(e,t,n,i,r,a,o){this.appInsightsNew.trackDependencyData({id:e,target:n,type:i,duration:r,properties:{HttpMethod:t},success:a,responseCode:o})},e.prototype.trackException=function(e,t,n,i,r){this.appInsightsNew.trackException({exception:e})},e.prototype.trackMetric=function(e,t,n,i,r,a){this.appInsightsNew.trackMetric({name:e,average:t,sampleCount:n,min:i,max:r})},e.prototype.trackTrace=function(e,t,n){this.appInsightsNew.trackTrace({message:e,severityLevel:n})},e.prototype.flush=function(e){this.appInsightsNew.flush(e)},e.prototype.setAuthenticatedUserContext=function(e,t,n){this.appInsightsNew.context.user.setAuthenticatedUserContext(e,t,n)},e.prototype.clearAuthenticatedUserContext=function(){this.appInsightsNew.context.user.clearAuthenticatedUserContext()},e.prototype._onerror=function(e,t,n,i,r){this.appInsightsNew._onerror({message:e,url:t,lineNumber:n,columnNumber:i,error:r})},e.prototype.startTrackEvent=function(e){this.appInsightsNew.startTrackEvent(e)},e.prototype.stopTrackEvent=function(e,t,n){this.appInsightsNew.stopTrackEvent(e,t,n)},e.prototype.downloadAndSetup=function(e){throw new Error("downloadAndSetup not implemented in web SKU")},e.prototype.updateSnippetDefinitions=function(e){for(var t in this)"string"===typeof t&&(e[t]=this[t])},e.prototype.loadAppInsights=function(){var e=this;if(this.config["iKey"]){var t=this.trackPageView;this.trackPageView=function(n,i,r){t.apply(e,[null,n,i,r])}}var n="logPageView";"function"===typeof this.snippet[n]&&(this[n]=function(t,n,i){e.trackPageView(null,t,n,i)});var i="logEvent";return"function"===typeof this.snippet[i]&&(this[i]=function(t,n,i){e.trackEvent(t,n,i)}),this},e.prototype._processLegacyInitializers=function(e){return e.tags[_e]=this._queue,e},e}(),ri=function(){function e(){}return e.getAppInsights=function(e,t){var n=new ni(e),i=2!==t;if(2===t)return n.updateSnippetDefinitions(e),n.loadAppInsights(i),n;var r=new ii(e,n);return r.updateSnippetDefinitions(e),n.loadAppInsights(i),r},e}(); /*! * Application Insights JavaScript SDK - Web, 2.5.4 * Copyright (c) Microsoft and contributors. All rights reserved. */},a508:function(e,t,n){"use strict";(function(e){n.d(t,"p",(function(){return i})),n.d(t,"n",(function(){return r})),n.d(t,"o",(function(){return a})),n.d(t,"m",(function(){return o})),n.d(t,"b",(function(){return g})),n.d(t,"c",(function(){return h})),n.d(t,"l",(function(){return m})),n.d(t,"i",(function(){return v})),n.d(t,"j",(function(){return y})),n.d(t,"a",(function(){return I})),n.d(t,"g",(function(){return T})),n.d(t,"d",(function(){return b})),n.d(t,"f",(function(){return _})),n.d(t,"h",(function(){return C})),n.d(t,"k",(function(){return w})),n.d(t,"e",(function(){return E}));var i="undefined",r="object",a="prototype",o="function",s="window",c="document",u="navigator",l="history",p="location",f="performance",d="JSON";function g(){return typeof globalThis!==i&&globalThis?globalThis:typeof self!==i&&self?self:typeof window!==i&&window?window:typeof e!==i&&e?e:null}function h(e){var t=g();return t&&t[e]?t[e]:e===s&&m()?window:null}function m(){return Boolean(typeof window===r&&window)}function v(){return m()?window:h(s)}function y(){return Boolean(typeof document===r&&document)}function I(){return y()?document:h(c)}function x(){return Boolean(typeof navigator===r&&navigator)}function T(){return x()?navigator:h(u)}function S(){return Boolean(typeof history===r&&history)}function b(){return S()?history:h(l)}function _(){return typeof location===r&&location?location:h(p)}function C(){return h(f)}function w(){return Boolean(typeof JSON===r&&JSON||null!==h(d))}function E(){return w()?JSON||h(d):null}}).call(this,n("c8ba"))}}]); //# sourceMappingURL=applicationinsights-web.fea8e880.js.map