@microsoft/applicationinsights-properties-js
Advanced tools
Comparing version 2.4.1 to 2.4.2
/*! | ||
* Application Insights JavaScript SDK - Properties Plugin, 2.4.1 | ||
* Application Insights JavaScript SDK - Properties Plugin, 2.4.2 | ||
* Copyright (c) Microsoft and contributors. All rights reserved. | ||
*/ | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e.Microsoft=e.Microsoft||{},e.Microsoft.ApplicationInsights={}))}(this,function(e){"use strict";var i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function t(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?function(e){var t=Object.create;if(t)return t(e);if(null==e)return{};var n=typeof e;if("object"!=n&&"function"!=n)throw new TypeError("Object prototype may only be an Object:"+e);function i(){}return i.prototype=e,new i}(t):(n.prototype=t.prototype,new n)}var r=function(){return(r=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},n=2,o="undefined",a="object",s="window",c="location",u="JSON";function l(){return typeof globalThis!==o&&globalThis?globalThis:typeof self!==o&&self?self:typeof window!==o&&window?window:typeof global!==o&&global?global:null}function f(e){var t=l();return t&&t[e]?t[e]:e===s&&p()?window:null}function p(){return Boolean(typeof window===a&&window)}function h(){return p()?window:f(s)}function g(){return function e(){return Boolean(typeof document===a&&document)}()?document:f("document")}function d(){return function e(){return Boolean(typeof navigator===a&&navigator)}()?navigator:f("navigator")}function m(){return typeof location===a&&location?location:f(c)}function v(){return Boolean(typeof JSON===a&&JSON||null!==f(u))}function y(){return v()?JSON||f(u):null}var x=o,S="prototype",I="attachEvent",N="addEventListener",C="detachEvent",w="removeEventListener";function _(e,t){return typeof e===t}function D(e){return e===undefined||_(e,x)}function E(e){return D(e)||null===e}function b(e,t){return e&&Object[S].hasOwnProperty.call(e,t)}function T(e){return _(e,"object")}function A(e){return _(e,"function")}function M(e,t,n,i){void 0===i&&(i=!1);var r=!1;if(!E(e))try{E(e[N])?E(e[I])||(e[I]("on"+t,n),r=!0):(e[N](t,n,i),r=!0)}catch(o){}return r}function k(e,t,n,i){if(void 0===i&&(i=!1),!E(e))try{E(e[w])?E(e[C])||e[C]("on"+t,n):e[w](t,n,i)}catch(r){}}var U=(L.isDate=function(e){return"[object Date]"===Object[S].toString.call(e)},L.isString=function(e){return _(e,"string")},L.isNumber=function(e){return _(e,"number")},L.isBoolean=function(e){return _(e,"boolean")},L.disableCookies=function(){L._canUseCookies=!1},L.newGuid=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(z,function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})},L.toISOString=function(e){if(L.isDate(e)){var t=function(e){var t=String(e);return 1===t.length&&(t="0"+t),t};return e.getUTCFullYear()+"-"+t(e.getUTCMonth()+1)+"-"+t(e.getUTCDate())+"T"+t(e.getUTCHours())+":"+t(e.getUTCMinutes())+":"+t(e.getUTCSeconds())+"."+String((e.getUTCMilliseconds()/1e3).toFixed(3)).slice(2,5)+"Z"}},L.arrForEach=function(e,t,n){for(var i=e.length,r=0;r<i;++r)r in e&&t.call(n||e,e[r],r,e)},L.arrIndexOf=function(e,t,n){for(var i=e.length,r=n||0,o=Math.max(0<=r?r:i-Math.abs(r),0);o<i;o++)if(o in e&&e[o]===t)return o;return-1},L.arrMap=function(e,t,n){for(var i=e.length,r=n||e,o=new Array(i),a=0;a<i;a++)a in e&&(o[a]=t.call(r,e[a],e));return o},L.arrReduce=function(e,t,n){var i,r=e.length,o=0;if(3<=arguments.length)i=n;else{for(;o<r&&!(o in e);)o++;i=e[o++]}for(;o<r;)o in e&&(i=t(i,e[o],o,e)),o++;return i},L.objCreate=function(e){if(null==e)return{};if(!T(e)&&!A(e))throw new TypeError("Object prototype may only be an Object: "+e);function t(){}return t[S]=e,new t},L.objKeys=function(e){var t=!{toString:null}.propertyIsEnumerable("toString");if(!(A(e)||T(e)&&null!==e))throw new TypeError("objKeys called on non-object");var n=[];for(var i in e)b(e,i)&&n.push(i);if(t)for(var r=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],o=r.length,a=0;a<o;a++)b(e,r[a])&&n.push(r[a]);return n},L.objDefineAccessors=function(e,t,n,i){var r=Object.defineProperty;if(r)try{var o={enumerable:!0,configurable:!0};return n&&(o.get=n),i&&(o.set=i),r(e,t,o),!0}catch(a){}return!1},L.addEventHandler=function(e,t){var n=!1,i=h();i&&(n=M(i,e,t),n=M(i.body,e,t)||n);var r=g();return r&&(n=P.Attach(r,e,t)||n),n},L.isTypeof=_,L.isUndefined=D,L.isNullOrUndefined=E,L.hasOwnProperty=b,L.isFunction=A,L.isObject=T,L);function L(){}var O,R,z=/[xy]/g,P=(j.Attach=M,j.AttachEvent=M,j.Detach=k,j.DetachEvent=k,j);function j(){}(R=O=O||{})[R.CRITICAL=1]="CRITICAL",R[R.WARNING=2]="WARNING";var q=0,G=1,W=2,B=3,F=4,V=5,H=6,X=9,K=23,Q=27,J=49,Y=52,$=56,Z=57,ee=60,te=61,ne=66,ie=68,re=69,oe=72,ae=73,se=(ce.sanitizeDiagnosticText=function(e){return e?'"'+e.replace(/\"/g,"")+'"':""},ce.dataType="MessageData",ce.AiNonUserActionablePrefix="AI (Internal): ",ce.AiUserActionablePrefix="AI: ",ce);function ce(e,t,n,i){void 0===n&&(n=!1),this.messageId=e,this.message=(n?ce.AiUserActionablePrefix:ce.AiNonUserActionablePrefix)+e;var r="";v()&&(r=y().stringify(i));var o=(t?" message:"+ce.sanitizeDiagnosticText(t):"")+(i?" props:"+ce.sanitizeDiagnosticText(r):"");this.message+=o}var ue=(le.prototype.throwInternal=function(e,t,n,i,r){void 0===r&&(r=!1);var o=new se(t,n,r,i),a=this;if(a.enableDebugExceptions())throw o;if(!U.isUndefined(o)&&o&&!U.isUndefined(o.message)){if(r){var s=+o.messageId;!a._messageLogged[s]&&a.consoleLoggingLevel()>=O.WARNING&&(a.warnToConsole(o.message),a._messageLogged[s]=!0)}else a.consoleLoggingLevel()>=O.WARNING&&a.warnToConsole(o.message);a.logInternalMessage(e,o)}},le.prototype.warnToConsole=function(e){!U.isUndefined(console)&&console&&(U.isFunction(console.warn)?console.warn(e):U.isFunction(console.log)&&console.log(e))},le.prototype.resetInternalMessageCount=function(){this._messageCount=0,this._messageLogged={}},le.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 o="Internal events throttle limit per PageView reached for this app.",a=new se(K,o,!1);n.queue.push(a),n.warnToConsole(o)}}},le.prototype._areInternalMessagesThrottled=function(){return this._messageCount>=this.maxInternalMessageLimit()},le);function le(e){this.queue=[],this.AIInternalMessagePrefix="AITR_",this._messageCount=0,this._messageLogged={},this.enableDebugExceptions=function(){return!1},this.consoleLoggingLevel=function(){return 0},this.telemetryLoggingLevel=function(){return 1},this.maxInternalMessageLimit=function(){return 25},U.isNullOrUndefined(e)||(U.isNullOrUndefined(e.loggingLevelConsole)||(this.consoleLoggingLevel=function(){return e.loggingLevelConsole}),U.isNullOrUndefined(e.loggingLevelTelemetry)||(this.telemetryLoggingLevel=function(){return e.loggingLevelTelemetry}),U.isNullOrUndefined(e.maxMessageLimit)||(this.maxInternalMessageLimit=function(){return e.maxMessageLimit}),U.isNullOrUndefined(e.enableDebugExceptions)||(this.enableDebugExceptions=function(){return e.enableDebugExceptions}))}var fe=U.isFunction,pe=function Ln(r,o){var a=this,s=null,c=fe(r.processTelemetry),u=fe(r.setNextPlugin);a._hasRun=!1,a.getPlugin=function(){return r},a.getNext=function(){return s},a.setNext=function(e){s=e},a.processTelemetry=function(e,t){if(t=t||o,r&&c){a._hasRun=!0;try{t.setNext(s),u&&r.setNextPlugin(s),s&&(s._hasRun=!1),r.processTelemetry(e,t)}catch(i){var n=s&&s._hasRun;s&&n||t.diagLog().throwInternal(O.CRITICAL,ae,"Plugin ["+r.identifier+"] failed during processTelemetry - "+i),s&&!n&&s.processTelemetry(e,t)}}else s&&(a._hasRun=!0,s.processTelemetry(e,t))}},he=U.isNullOrUndefined;function ge(e,t){var n=[];if(e&&0<e.length)for(var i=null,r=0;r<e.length;r++){var o=e[r];if(o&&U.isFunction(o.processTelemetry)){var a=new pe(o,t);n.push(a),i&&i.setNext(a),i=a}}return 0<n.length?n[0]:null}var de=function On(e,o,n,t){var a=this,i=null;null!==t&&(e&&U.isFunction(e.getPlugin)?i=function s(e,t,n){var i=[],r=!n;if(e)for(;e;){var o=e.getPlugin();!r&&o!==n||(r=!0,i.push(o)),e=e.getNext()}return r||i.push(n),ge(i,t)}(e,a,t||e.getPlugin()):t?i=function c(e,t,n){var i=e,r=!1;return n&&e&&(i=[],U.arrForEach(e,function(e){!r&&e!==n||(r=!0,i.push(e))})),n&&!r&&(i=i||[]).push(n),ge(i,t)}(e,a,t):U.isUndefined(t)&&(i=ge(e,a))),a.core=function(){return n},a.diagLog=function(){var e=(n||{}).logger;return e=e||new ue(o||{})},a.getCfg=function(){return o},a.getExtCfg=function(e,t){var n;if(void 0===t&&(t={}),o){var i=o.extensionConfig;i&&e&&(n=i[e])}return n||t},a.getConfig=function(e,t,n){var i;void 0===n&&(n=!1);var r=a.getExtCfg(e,null);return r&&!he(r[t])?i=r[t]:o&&!he(o[t])&&(i=o[t]),he(i)?n:i},a.hasNext=function(){return null!=i},a.getNext=function(){return i},a.setNext=function(e){i=e},a.processNext=function(e){var t=i;t&&(i=t.getNext(),t.processTelemetry(e,a))},a.createNew=function(e,t){return void 0===e&&(e=null),new On(e||i,o,n,t)}},me=U.isFunction,ve="getPlugin",ye=(xe.prototype.initialize=function(e,t,n,i){this._baseTelInit(e,t,n,i)},xe);function xe(){var o=this,a=!1,s=null,c=null;o.core=null,o.diagLog=function(e){return o._getTelCtx(e).diagLog()},o.isInitialized=function(){return a},o.setInitialized=function(e){a=e},o.setNextPlugin=function(e){c=e},o.processNext=function(e,t){t?t.processNext(e):c&&me(c.processTelemetry)&&c.processTelemetry(e,null)},o._getTelCtx=function(e){void 0===e&&(e=null);var t=e;if(!t){var n=s||new de(null,{},o.core);t=c&&c[ve]?n.createNew(null,c[ve]):n.createNew(null,c)}return t},o._baseTelInit=function(e,t,n,i){e&&(e.extensionConfig=e.extensionConfig||[]),!i&&t&&(i=t.getProcessTelContext().getNext());var r=c;c&&c[ve]&&(r=c[ve]()),o.core=t,s=new de(i,e,t,r),a=!0}}var Se=U.isFunction,Ie="processTelemetry",Ne="priority",Ce="setNextPlugin",we="isInitialized";function _e(t,n){for(var e=[],i=null,r=t.getNext();r;){var o=r.getPlugin();o&&(i&&Se(i[Ce])&&Se(o[Ie])&&i[Ce](o),Se(o[we])&&o[we]()||e.push(o),i=o,r=r.getNext())}U.arrForEach(e,function(e){e.initialize(t.getCfg(),t.core(),n,t.getNext())})}function De(e){return e.sort(function(e,t){var n=0,i=Se(t[Ie]);return Se(e[Ie])?n=i?e[Ne]-t[Ne]:1:i&&(n=-1),n})}var Ee=500,be="Channel has invalid priority",Te=U.arrForEach,Ae=U.objDefineAccessors;function Me(e,t){t&&0<t.length&&(function n(e){Te(e,function(e){if(e.priority<Ee)throw Error(be+e.identifier)})}(t=t.sort(function(e,t){return e.priority-t.priority})),e.push(t))}var ke,Ue=(t(Le,ke=ye),Le.prototype.processTelemetry=function(t,n){var i=this;this._channelQueue&&Te(this._channelQueue,function(e){0<e.length&&i._getTelCtx(n).createNew(e).processNext(t)})},Le.prototype.getChannelControls=function(){return this._channelQueue},Le.prototype.initialize=function(t,n,i){if(!this.isInitialized()){ke.prototype.initialize.call(this,t,n,i),t.isCookieUseDisabled&&U.disableCookies();var e=this._channelQueue=function r(e,t){var n=[];if(e&&Te(e,function(e){return Me(n,e)}),t){var i=[];Te(t,function(e){e.priority>Ee&&i.push(e)}),Me(n,i)}return n}((t||{}).channels,i);Te(e,function(e){return _e(new de(e,t,n),i)})}},Le._staticInit=(Ae(Le.prototype,"ChannelControls",Le.prototype.getChannelControls),void Ae(Le.prototype,"channelQueue",Le.prototype.getChannelControls)),Le);function Le(){var e=null!==ke&&ke.apply(this,arguments)||this;return e.identifier="ChannelControllerPlugin",e.priority=Ee,e}var Oe=U.arrForEach,Re=U.isNullOrUndefined,ze=(Pe.prototype.initialize=function(e,t,i,n){var r=this;if(r.isInitialized())throw Error("Core should not be initialized more than once");if(!e||Re(e.instrumentationKey))throw Error("Please provide instrumentation key");r.config=e;var o=r._channelController;n=n||U.objCreate({addNotificationListener:function(e){},removeNotificationListener:function(e){},eventsSent:function(e){},eventsDiscarded:function(e,t){}}),r._notificationManager=n,e.extensions=Re(e.extensions)?[]:e.extensions,(e.extensionConfig=Re(e.extensionConfig)?{}:e.extensionConfig).NotificationManager=n,i=i||U.objCreate({throwInternal:function(e,t,n,i,r){void 0===r&&(r=!1)},warnToConsole:function(e){},resetInternalMessageCount:function(){}}),r.logger=i;var a=[];a.push.apply(a,t.concat(e.extensions)),a=De(a);var s=[],c={};if(Oe(a,function(e){if(Re(e)||Re(e.initialize))throw Error("Extensions must provide callback to initialize");var t=e.priority,n=e.identifier;e&&t&&(Re(c[t])?c[t]=n:i.warnToConsole("Two extensions have same priority #"+t+" - "+c[t]+", "+n)),(!t||t<o.priority)&&s.push(e)}),a.push(o),s.push(o),a=De(a),r._extensions=a,_e(new de([o],e,r),a),_e(new de(s,e,r),a),r._extensions=s,0===r.getTransmissionControls().length)throw new Error("No channels available");r._setInit(!0)},Pe.prototype.getTransmissionControls=function(){return this._channelController.getChannelControls()},Pe.prototype.track=function(e){var t=this;e.iKey||(e.iKey=t.config.instrumentationKey),e.time||(e.time=U.toISOString(new Date)),Re(e.ver)&&(e.ver="4.0"),t.isInitialized()?(0<t._eventQueue.length&&(Oe(t._eventQueue,function(e){t.getProcessTelContext().processNext(e)}),t._eventQueue=[]),t.getProcessTelContext().processNext(e)):t._eventQueue.push(e)},Pe.prototype.getProcessTelContext=function(){var e=this._extensions,t=e;return e&&0!==e.length||(t=[this._channelController]),new de(t,this.config,this)},Pe);function Pe(){var t=!1,e=this;e._extensions=new Array,e._channelController=new Ue,e.isInitialized=function(){return t},e._setInit=function(e){t=e},e._eventQueue=[]}var je=(qe.prototype.addNotificationListener=function(e){this.listeners.push(e)},qe.prototype.removeNotificationListener=function(e){for(var t=U.arrIndexOf(this.listeners,e);-1<t;)this.listeners.splice(t,1),t=U.arrIndexOf(this.listeners,e)},qe.prototype.eventsSent=function(t){for(var n=this,e=function(e){i.listeners[e].eventsSent&&setTimeout(function(){return n.listeners[e].eventsSent(t)},0)},i=this,r=0;r<this.listeners.length;++r)e(r)},qe.prototype.eventsDiscarded=function(t,n){for(var i=this,e=function(e){r.listeners[e].eventsDiscarded&&setTimeout(function(){return i.listeners[e].eventsDiscarded(t,n)},0)},r=this,o=0;o<this.listeners.length;++o)e(o)},qe);function qe(){this.listeners=[]}var Ge,We,Be,Fe,Ve,He,Xe;t(Ke,Ge=ze),Ke.prototype.initialize=function(e,t){var n=this;n._notificationManager=new je,n.logger=new ue(e),n.config=e,Ge.prototype.initialize.call(this,e,t,n.logger,n._notificationManager)},Ke.prototype.getTransmissionControls=function(){return Ge.prototype.getTransmissionControls.call(this)},Ke.prototype.track=function(e){if(null===e)throw this._notifyInvalidEvent(e),Error("Invalid telemetry item");this._validateTelemetryItem(e),Ge.prototype.track.call(this,e)},Ke.prototype.addNotificationListener=function(e){this._notificationManager&&this._notificationManager.addNotificationListener(e)},Ke.prototype.removeNotificationListener=function(e){this._notificationManager&&this._notificationManager.removeNotificationListener(e)},Ke.prototype.pollInternalLogs=function(i){var t=this,e=this.config.diagnosticLogInterval;return 0<e||(e=1e4),setInterval(function(){var n=t,e=n.logger?n.logger.queue:[];U.arrForEach(e,function(e){var t={name:i||"InternalMessageId: "+e.messageId,iKey:n.config.instrumentationKey,time:U.toISOString(new Date),baseType:se.dataType,baseData:{message:e.message}};n.track(t)}),e.length=0},e)},Ke.prototype._validateTelemetryItem=function(e){if(U.isNullOrUndefined(e.name))throw this._notifyInvalidEvent(e),Error("telemetry name required")},Ke.prototype._notifyInvalidEvent=function(e){this._notificationManager&&this._notificationManager.eventsDiscarded([e],n)};function Ke(){return Ge.call(this)||this}(Be=We=We||{})[Be.LocalStorage=0]="LocalStorage",Be[Be.SessionStorage=1]="SessionStorage",(Ve=Fe=Fe||{})[Ve.Default=0]="Default",Ve[Ve.Required=1]="Required",Ve[Ve.Array=2]="Array",Ve[Ve.Hidden=4]="Hidden",(Xe=He=He||{})[Xe.AI=0]="AI",Xe[Xe.AI_AND_W3C=1]="AI_AND_W3C",Xe[Xe.W3C=2]="W3C";var Qe=(Je.sanitizeKeyAndAddUniqueness=function(e,t,n){var i=t.length,r=Je.sanitizeKey(e,t);if(r.length!==i){for(var o=0,a=r;n[a]!==undefined;)o++,a=r.substring(0,Je.MAX_NAME_LENGTH-3)+Je.padNumber(o);r=a}return r},Je.sanitizeKey=function(e,t){var n;return t&&(t=Je.trim(t.toString())).length>Je.MAX_NAME_LENGTH&&(n=t.substring(0,Je.MAX_NAME_LENGTH),e.throwInternal(O.WARNING,Z,"name is too long. It has been truncated to "+Je.MAX_NAME_LENGTH+" characters.",{name:t},!0)),n||t},Je.sanitizeString=function(e,t,n){var i;return void 0===n&&(n=Je.MAX_STRING_LENGTH),t&&(n=n||Je.MAX_STRING_LENGTH,(t=Je.trim(t)).toString().length>n&&(i=t.toString().substring(0,n),e.throwInternal(O.WARNING,te,"string value is too long. It has been truncated to "+n+" characters.",{value:t},!0))),i||t},Je.sanitizeUrl=function(e,t){return Je.sanitizeInput(e,t,Je.MAX_URL_LENGTH,ne)},Je.sanitizeMessage=function(e,t){var n;return t&&t.length>Je.MAX_MESSAGE_LENGTH&&(n=t.substring(0,Je.MAX_MESSAGE_LENGTH),e.throwInternal(O.WARNING,$,"message is too long, it has been truncated to "+Je.MAX_MESSAGE_LENGTH+" characters.",{message:t},!0)),n||t},Je.sanitizeException=function(e,t){var n;return t&&t.length>Je.MAX_EXCEPTION_LENGTH&&(n=t.substring(0,Je.MAX_EXCEPTION_LENGTH),e.throwInternal(O.WARNING,Y,"exception is too long, it has been truncated to "+Je.MAX_EXCEPTION_LENGTH+" characters.",{exception:t},!0)),n||t},Je.sanitizeProperties=function(e,t){if(t){var n={};for(var i in t){var r=t[i];if(U.isObject(r)&&v())try{r=y().stringify(r)}catch(o){e.throwInternal(O.WARNING,J,"custom property is not valid",{exception:o},!0)}r=Je.sanitizeString(e,r,Je.MAX_PROPERTY_LENGTH),n[i=Je.sanitizeKeyAndAddUniqueness(e,i,n)]=r}t=n}return t},Je.sanitizeMeasurements=function(e,t){if(t){var n={};for(var i in t){var r=t[i];n[i=Je.sanitizeKeyAndAddUniqueness(e,i,n)]=r}t=n}return t},Je.sanitizeId=function(e,t){return t?Je.sanitizeInput(e,t,Je.MAX_ID_LENGTH,re).toString():t},Je.sanitizeInput=function(e,t,n,i){var r;return t&&(t=Je.trim(t)).length>n&&(r=t.substring(0,n),e.throwInternal(O.WARNING,i,"input is too long, it has been truncated to "+n+" characters.",{data:t},!0)),r||t},Je.padNumber=function(e){var t="00"+e;return t.substr(t.length-3)},Je.trim=function(e){return U.isString(e)?e.replace(/^\s+|\s+$/g,""):e},Je.MAX_NAME_LENGTH=150,Je.MAX_ID_LENGTH=128,Je.MAX_PROPERTY_LENGTH=8192,Je.MAX_STRING_LENGTH=1024,Je.MAX_URL_LENGTH=2048,Je.MAX_MESSAGE_LENGTH=32768,Je.MAX_EXCEPTION_LENGTH=32768,Je);function Je(){}var Ye="prototype",$e=d(),Ze=U.isString,et=null;var tt=(nt.createDomEvent=function(e){var t=null;if(U.isFunction(Event))t=new Event(e);else{var n=g();n&&n.createEvent&&(t=n.createEvent("Event")).initEvent(e,!0,!0)}return t},nt.disableStorage=function(){nt._canUseLocalStorage=!1,nt._canUseSessionStorage=!1},nt._getLocalStorageObject=function(){return nt.canUseLocalStorage()?nt._getVerifiedStorageObject(We.LocalStorage):null},nt._getVerifiedStorageObject=function(e){var t,n,i=null;try{if(U.isNullOrUndefined(l()))return null;n=new Date,(i=e===We.LocalStorage?f("localStorage"):f("sessionStorage")).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},nt.isInternalApplicationInsightsEndpoint=function(e){return-1!==nt._internalEndpoints.indexOf(e.toLowerCase())},nt.canUseLocalStorage=function(){return nt._canUseLocalStorage===undefined&&(nt._canUseLocalStorage=!!nt._getVerifiedStorageObject(We.LocalStorage)),nt._canUseLocalStorage},nt.getStorage=function(e,t){var n=nt._getLocalStorageObject();if(null!==n)try{return n.getItem(t)}catch(i){nt._canUseLocalStorage=!1,e.throwInternal(O.WARNING,G,"Browser failed read of local storage. "+nt.getExceptionName(i),{exception:nt.dump(i)})}return null},nt.setStorage=function(e,t,n){var i=nt._getLocalStorageObject();if(null!==i)try{return i.setItem(t,n),!0}catch(r){nt._canUseLocalStorage=!1,e.throwInternal(O.WARNING,B,"Browser failed write to local storage. "+nt.getExceptionName(r),{exception:nt.dump(r)})}return!1},nt.removeStorage=function(e,t){var n=nt._getLocalStorageObject();if(null!==n)try{return n.removeItem(t),!0}catch(i){nt._canUseLocalStorage=!1,e.throwInternal(O.WARNING,V,"Browser failed removal of local storage item. "+nt.getExceptionName(i),{exception:nt.dump(i)})}return!1},nt._getSessionStorageObject=function(){return nt.canUseSessionStorage()?nt._getVerifiedStorageObject(We.SessionStorage):null},nt.canUseSessionStorage=function(){return nt._canUseSessionStorage===undefined&&(nt._canUseSessionStorage=!!nt._getVerifiedStorageObject(We.SessionStorage)),nt._canUseSessionStorage},nt.getSessionStorageKeys=function(){var e=[];if(nt.canUseSessionStorage())for(var t in f("sessionStorage"))e.push(t);return e},nt.getSessionStorage=function(e,t){var n=nt._getSessionStorageObject();if(null!==n)try{return n.getItem(t)}catch(i){nt._canUseSessionStorage=!1,e.throwInternal(O.WARNING,W,"Browser failed read of session storage. "+nt.getExceptionName(i),{exception:nt.dump(i)})}return null},nt.setSessionStorage=function(e,t,n){var i=nt._getSessionStorageObject();if(null!==i)try{return i.setItem(t,n),!0}catch(r){nt._canUseSessionStorage=!1,e.throwInternal(O.WARNING,F,"Browser failed write to session storage. "+nt.getExceptionName(r),{exception:nt.dump(r)})}return!1},nt.removeSessionStorage=function(e,t){var n=nt._getSessionStorageObject();if(null!==n)try{return n.removeItem(t),!0}catch(i){nt._canUseSessionStorage=!1,e.throwInternal(O.WARNING,H,"Browser failed removal of session storage item. "+nt.getExceptionName(i),{exception:nt.dump(i)})}return!1},nt.disableCookies=function(){U.disableCookies()},nt.canUseCookies=function(e){if(U._canUseCookies===undefined){U._canUseCookies=!1;try{U._canUseCookies=nt.document.cookie!==undefined}catch(t){e.throwInternal(O.WARNING,ie,"Cannot access document.cookie - "+nt.getExceptionName(t),{exception:nt.dump(t)})}}return U._canUseCookies&&nt.document&&nt.document.cookie},nt.disallowsSameSiteNone=function(e){return!!Ze(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")||!function r(e,t){var n=e.length,i=n-t.length;return e.substring(0<=i?i:0,n)===t}(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"))},nt.setCookie=function(e,t,n,i){if(nt.canUseCookies(e)){var r="",o="";i&&(r=";domain="+i);var a=m();a&&"https:"===a.protocol&&(o=";secure",null===et&&(et=nt.disallowsSameSiteNone((d()||{}).userAgent)),et||(n+=";SameSite=None")),nt.document.cookie=t+"="+n+r+";path=/"+o}},nt.stringToBoolOrDefault=function(e,t){return void 0===t&&(t=!1),e===undefined||null===e?t:"true"===e.toString().toLowerCase()},nt.getCookie=function(e,t){if(nt.canUseCookies(e)){var n="";if(t&&t.length)for(var i=t+"=",r=nt.document.cookie.split(";"),o=0;o<r.length;o++){var a=r[o];if((a=nt.trim(a))&&0===a.indexOf(i)){n=a.substring(i.length,r[o].length);break}}return n}},nt.deleteCookie=function(e,t){nt.canUseCookies(e)&&(nt.document.cookie=t+"=;path=/;expires=Thu, 01 Jan 1970 00:00:01 GMT;")},nt.trim=function(e){return Ze(e)?e.replace(/^\s+|\s+$/g,""):e},nt.newId=function(){for(var e="",t=1073741824*Math.random();0<t;)e+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(t%64),t=Math.floor(t/64);return e},nt.random32=function(){return 4294967296*Math.random()|0},nt.generateW3CId=function(){for(var e,t=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"],n="",i=0;i<4;i++)n+=t[15&(e=nt.random32())]+t[e>>4&15]+t[e>>8&15]+t[e>>12&15]+t[e>>16&15]+t[e>>20&15]+t[e>>24&15]+t[e>>28&15];var r=t[8+4*Math.random()|0];return n.substr(0,8)+n.substr(9,4)+"4"+n.substr(13,3)+r+n.substr(16,3)+n.substr(19,12)},nt.isArray=function(e){return"[object Array]"===Object[Ye].toString.call(e)},nt.isError=function(e){return"[object Error]"===Object[Ye].toString.call(e)},nt.getIEVersion=function(e){void 0===e&&(e=null);var t=e?e.toLowerCase():$e?($e.userAgent||"").toLowerCase():"";return-1!==t.indexOf("msie")?parseInt(t.split("msie")[1]):null},nt.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,(0<o?o+".":"")+(r=r.length<2?"0"+r:r)+":"+i+":"+n+"."+t},nt.isCrossOriginError=function(e,t,n,i,r){return("Script error."===e||"Script error"===e)&&!r},nt.dump=function(e){var t=Object[Ye].toString.call(e),n="";return"[object Error]"===t?n="{ stack: '"+e.stack+"', message: '"+e.message+"', name: '"+e.name+"'":v()&&(n=y().stringify(e)),t+n},nt.getExceptionName=function(e){return"[object Error]"===Object[Ye].toString.call(e)?e.name:""},nt.addEventHandler=function(e,t){return P.Attach(h(),e,t)},nt.IsBeaconApiSupported=function(){return"sendBeacon"in $e&&$e.sendBeacon},nt.getExtension=function(e,t){for(var n=null,i=0;!n&&i<e.length;)e[i]&&e[i].identifier===t&&(n=e[i]),i++;return n},nt.document=g()||{},nt._canUseLocalStorage=undefined,nt._canUseSessionStorage=undefined,nt._internalEndpoints=["https://dc.services.visualstudio.com/v2/track","https://breeze.aimon.applicationinsights.io/v2/track","https://dc-int.services.visualstudio.com/v2/track"],nt.NotSpecified="not_specified",nt.isDate=U.isDate,nt.toISOStringForIE8=U.toISOString,nt);function nt(){}var it=(rt.parseUrl=function(e){return rt.htmlAnchorElement||(rt.htmlAnchorElement=rt.document.createElement?rt.document.createElement("a"):{host:rt.parseHost(e)}),rt.htmlAnchorElement.href=e,rt.htmlAnchorElement},rt.getAbsoluteUrl=function(e){var t,n=rt.parseUrl(e);return n&&(t=n.href),t},rt.getPathName=function(e){var t,n=rt.parseUrl(e);return n&&(t=n.pathname),t},rt.getCompleteUrl=function(e,t){return e?e.toUpperCase()+" "+t:t},rt.parseHost=function(e){if(e){var t=e.match(/:\/\/(www[0-9]?\.)?(.[^/:]+)/i);if(null!=t&&2<t.length&&Ze(t[2])&&0<t[2].length)return t[2]}return null},rt.document=g()||{},rt);function rt(){}var ot=(at.ParseDependencyPath=function(e,t,n,i){var r,o=i,a=i;if(t&&0<t.length){var s=it.parseUrl(t);if(r=s.host,!o)if(null!=s.pathname){var c=0===s.pathname.length?"/":s.pathname;"/"!==c.charAt(0)&&(c="/"+c),a=s.pathname,o=Qe.sanitizeString(e,n?n+" "+c:c)}else o=Qe.sanitizeString(e,t)}else o=r=i;return{target:r,name:o,data:a}},at);function at(){}var st=(ct.Now=function(){var e=function t(){return f("performance")}();return e&&e.now&&e.timing?e.now()+e.timing.navigationStart:(new Date).getTime()},ct.GetDuration=function(e,t){var n=null;return 0===e||0===t||U.isNullOrUndefined(e)||U.isNullOrUndefined(t)||(n=t-e),n},ct);function ct(){}var ut,lt=(t(ft,ut=function Rn(){}),ft);function ft(){return ut.call(this)||this}var pt;t(ht,pt=function zn(){this.ver=1,this.sampleRate=100,this.tags={}});function ht(e,t,n){var i=pt.call(this)||this;return i.name=Qe.sanitizeString(e,n)||tt.NotSpecified,i.data=t,i.time=U.toISOString(new Date),i.aiDataContract={time:Fe.Required,iKey:Fe.Required,name:Fe.Required,sampleRate:function(){return 100===i.sampleRate?Fe.Hidden:Fe.Required},tags:Fe.Required,data:Fe.Required},i}var gt,dt=function Pn(){},mt=(t(vt,gt=dt),vt);function vt(){var e=gt.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}var yt;t(xt,yt=mt),xt.envelopeType="Microsoft.ApplicationInsights.{0}.Event",xt.dataType="EventData";function xt(e,t,n,i){var r=yt.call(this)||this;return r.aiDataContract={ver:Fe.Required,name:Fe.Required,properties:Fe.Default,measurements:Fe.Default},r.name=Qe.sanitizeString(e,t)||tt.NotSpecified,r.properties=Qe.sanitizeProperties(e,n),r.measurements=Qe.sanitizeMeasurements(e,i),r}var St,It=function jn(){},Nt=(t(Ct,St=dt),Ct);function Ct(){var e=St.call(this)||this;return e.ver=2,e.exceptions=[],e.properties={},e.measurements={},e}var wt,_t=function qn(){this.hasFullStack=!0,this.parsedStack=[]};t(Dt,wt=Nt),Dt.CreateFromInterface=function(t,e){var n=e.exceptions&&U.arrMap(e.exceptions,function(e){return bt.CreateFromInterface(t,e)});return new Dt(t,r({},e,{exceptions:n}))},Dt.prototype.toInterface=function(){var e=this,t=e.exceptions,n=e.properties,i=e.measurements,r=e.severityLevel,o=(e.ver,e.problemGroup),a=e.id,s=e.isManual;return{ver:"4.0",exceptions:t instanceof Array&&U.arrMap(t,function(e){return e.toInterface()})||undefined,severityLevel:r,properties:n,measurements:i,problemGroup:o,id:a,isManual:s}},Dt.CreateSimpleException=function(e,t,n,i,r,o){return{exceptions:[{hasFullStack:!0,message:e,stack:r,typeName:t}]}},Dt.envelopeType="Microsoft.ApplicationInsights.{0}.Exception",Dt.dataType="ExceptionData";function Dt(e,t,n,i,r,o){var a=wt.call(this)||this;return a.aiDataContract={ver:Fe.Required,exceptions:Fe.Required,severityLevel:Fe.Default,properties:Fe.Default,measurements:Fe.Default},t instanceof Error?(a.exceptions=[new bt(e,t)],a.properties=Qe.sanitizeProperties(e,n),a.measurements=Qe.sanitizeMeasurements(e,i),r&&(a.severityLevel=r),o&&(a.id=o)):(a.exceptions=t.exceptions,a.properties=t.properties,a.measurements=t.measurements,t.severityLevel&&(a.severityLevel=t.severityLevel),t.id&&(a.id=t.id),t.problemGroup&&(a.problemGroup=t.problemGroup),a.ver=2,U.isNullOrUndefined(t.isManual)||(a.isManual=t.isManual)),a}var Et,bt=(t(Tt,Et=_t),Tt.prototype.toInterface=function(){var e=this.parsedStack instanceof Array&&U.arrMap(this.parsedStack,function(e){return e.toInterface()});return{id:this.id,outerId:this.outerId,typeName:this.typeName,message:this.message,hasFullStack:this.hasFullStack,stack:this.stack,parsedStack:e||undefined}},Tt.CreateFromInterface=function(e,t){var n=t.parsedStack instanceof Array&&U.arrMap(t.parsedStack,function(e){return Mt.CreateFromInterface(e)})||t.parsedStack;return new Tt(e,r({},t,{parsedStack:n}))},Tt.parseStack=function(e){var t;if(U.isString(e)){var n=e.split("\n");t=[];for(var i=0,r=0,o=0;o<=n.length;o++){var a=n[o];if(Mt.regex.test(a)){var s=new Mt(n[o],i++);r+=s.sizeInBytes,t.push(s)}}if(32768<r)for(var c=0,u=t.length-1,l=0,f=c,p=u;c<u;){if(32768<(l+=t[c].sizeInBytes+t[u].sizeInBytes)){var h=p-f+1;t.splice(f,h);break}f=c,p=u,c++,u--}}return t},Tt);function Tt(e,t){var n=Et.call(this)||this;if(n.aiDataContract={id:Fe.Default,outerId:Fe.Default,typeName:Fe.Required,message:Fe.Required,hasFullStack:Fe.Default,stack:Fe.Default,parsedStack:Fe.Array},t instanceof Error){n.typeName=Qe.sanitizeString(e,t.name)||tt.NotSpecified,n.message=Qe.sanitizeMessage(e,t.message)||tt.NotSpecified;var i=t.stack;n.parsedStack=Tt.parseStack(i),n.stack=Qe.sanitizeException(e,i),n.hasFullStack=tt.isArray(n.parsedStack)&&0<n.parsedStack.length}else n.typeName=t.typeName,n.message=t.message,n.stack=t.stack,n.parsedStack=t.parsedStack,n.hasFullStack=t.hasFullStack;return n}var At,Mt=(t(kt,At=It),kt.CreateFromInterface=function(e){return new kt(e,null)},kt.prototype.toInterface=function(){return{level:this.level,method:this.method,assembly:this.assembly,fileName:this.fileName,line:this.line}},kt.regex=/^([\s]+at)?(.*?)(\@|\s\(|\s)([^\(\@\n]+):([0-9]+):([0-9]+)(\)?)$/,kt.baseSize=58,kt);function kt(e,t){var n=At.call(this)||this;if(n.sizeInBytes=0,n.aiDataContract={level:Fe.Required,method:Fe.Required,assembly:Fe.Default,fileName:Fe.Default,line:Fe.Default},"string"==typeof e){var i=e;n.level=t,n.method="<no_method>",n.assembly=tt.trim(i),n.fileName="",n.line=0;var r=i.match(kt.regex);r&&5<=r.length&&(n.method=tt.trim(r[2])||n.method,n.fileName=tt.trim(r[4]),n.line=parseInt(r[5])||0)}else n.level=e.level,n.method=e.method,n.assembly=e.assembly,n.fileName=e.fileName,n.line=e.line,n.sizeInBytes=0;return n.sizeInBytes+=n.method.length,n.sizeInBytes+=n.fileName.length,n.sizeInBytes+=n.assembly.length,n.sizeInBytes+=kt.baseSize,n.sizeInBytes+=n.level.toString().length,n.sizeInBytes+=n.line.toString().length,n}var Ut,Lt,Ot,Rt=(t(zt,Ut=dt),zt);function zt(){var e=Ut.call(this)||this;return e.ver=2,e.metrics=[],e.properties={},e.measurements={},e}(Ot=Lt=Lt||{})[Ot.Measurement=0]="Measurement",Ot[Ot.Aggregation=1]="Aggregation";var Pt,jt=(t(qt,Pt=function Gn(){this.kind=Lt.Measurement}),qt);function qt(){var e=null!==Pt&&Pt.apply(this,arguments)||this;return e.aiDataContract={name:Fe.Required,kind:Fe.Default,value:Fe.Required,count:Fe.Default,min:Fe.Default,max:Fe.Default,stdDev:Fe.Default},e}var Gt;t(Wt,Gt=Rt),Wt.envelopeType="Microsoft.ApplicationInsights.{0}.Metric",Wt.dataType="MetricData";function Wt(e,t,n,i,r,o,a,s){var c=Gt.call(this)||this;c.aiDataContract={ver:Fe.Required,metrics:Fe.Required,properties:Fe.Default};var u=new jt;return u.count=0<i?i:undefined,u.max=isNaN(o)||null===o?undefined:o,u.min=isNaN(r)||null===r?undefined:r,u.name=Qe.sanitizeString(e,t)||tt.NotSpecified,u.value=n,c.metrics=[u],c.properties=Qe.sanitizeProperties(e,a),c.measurements=Qe.sanitizeMeasurements(e,s),c}var Bt,Ft=(t(Vt,Bt=mt),Vt);function Vt(){var e=Bt.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}var Ht,Xt=(t(Kt,Ht=Ft),Kt.envelopeType="Microsoft.ApplicationInsights.{0}.Pageview",Kt.dataType="PageviewData",Kt);function Kt(e,t,n,i,r,o,a){var s=Ht.call(this)||this;return s.aiDataContract={ver:Fe.Required,name:Fe.Default,url:Fe.Default,duration:Fe.Default,properties:Fe.Default,measurements:Fe.Default,id:Fe.Default},s.id=Qe.sanitizeId(e,a),s.url=Qe.sanitizeUrl(e,n),s.name=Qe.sanitizeString(e,t)||tt.NotSpecified,isNaN(i)||(s.duration=tt.msToTimeSpan(i)),s.properties=Qe.sanitizeProperties(e,r),s.measurements=Qe.sanitizeMeasurements(e,o),s}var Qt,Jt=(t(Yt,Qt=dt),Yt);function Yt(){var e=Qt.call(this)||this;return e.ver=2,e.success=!0,e.properties={},e.measurements={},e}var $t;t(Zt,$t=Jt),Zt.envelopeType="Microsoft.ApplicationInsights.{0}.RemoteDependency",Zt.dataType="RemoteDependencyData";function Zt(e,t,n,i,r,o,a,s,c,u,l,f){void 0===c&&(c="Ajax");var p=$t.call(this)||this;p.aiDataContract={id:Fe.Required,ver:Fe.Required,name:Fe.Default,resultCode:Fe.Default,duration:Fe.Default,success:Fe.Default,data:Fe.Default,target:Fe.Default,type:Fe.Default,properties:Fe.Default,measurements:Fe.Default,kind:Fe.Default,value:Fe.Default,count:Fe.Default,min:Fe.Default,max:Fe.Default,stdDev:Fe.Default,dependencyKind:Fe.Default,dependencySource:Fe.Default,commandName:Fe.Default,dependencyTypeName:Fe.Default},p.id=t,p.duration=tt.msToTimeSpan(r),p.success=o,p.resultCode=a+"",p.type=Qe.sanitizeString(e,c);var h=ot.ParseDependencyPath(e,n,s,i);return p.data=Qe.sanitizeUrl(e,i)||h.data,p.target=Qe.sanitizeString(e,h.target),u&&(p.target=p.target+" | "+u),p.name=Qe.sanitizeString(e,h.name),p.properties=Qe.sanitizeProperties(e,l),p.measurements=Qe.sanitizeMeasurements(e,f),p}var en,tn=(t(nn,en=dt),nn);function nn(){var e=en.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}var rn;t(on,rn=tn),on.envelopeType="Microsoft.ApplicationInsights.{0}.Message",on.dataType="MessageData";function on(e,t,n,i,r){var o=rn.call(this)||this;return o.aiDataContract={ver:Fe.Required,message:Fe.Required,severityLevel:Fe.Default,properties:Fe.Default},t=t||tt.NotSpecified,o.message=Qe.sanitizeMessage(e,t),o.properties=Qe.sanitizeProperties(e,i),o.measurements=Qe.sanitizeMeasurements(e,r),n&&(o.severityLevel=n),o}var an,sn=(t(cn,an=Ft),cn);function cn(){var e=an.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}var un;t(ln,un=sn),ln.envelopeType="Microsoft.ApplicationInsights.{0}.PageviewPerformance",ln.dataType="PageviewPerformanceData";function ln(e,t,n,i,r,o,a){var s=un.call(this)||this;return s.aiDataContract={ver:Fe.Required,name:Fe.Default,url:Fe.Default,duration:Fe.Default,perfTotal:Fe.Default,networkConnect:Fe.Default,sentRequest:Fe.Default,receivedResponse:Fe.Default,domProcessing:Fe.Default,properties:Fe.Default,measurements:Fe.Default},s.url=Qe.sanitizeUrl(e,n),s.name=Qe.sanitizeString(e,t)||tt.NotSpecified,s.properties=Qe.sanitizeProperties(e,r),s.measurements=Qe.sanitizeMeasurements(e,o),a&&(s.domProcessing=a.domProcessing,s.duration=a.duration,s.networkConnect=a.networkConnect,s.perfTotal=a.perfTotal,s.receivedResponse=a.receivedResponse,s.sentRequest=a.sentRequest),s}var fn,pn,hn;t(gn,fn=lt);function gn(e,t){var n=fn.call(this)||this;return n.aiDataContract={baseType:Fe.Required,baseData:Fe.Required},n.baseType=e,n.baseData=t,n}(hn=pn=pn||{})[hn.Verbose=0]="Verbose",hn[hn.Information=1]="Information",hn[hn.Warning=2]="Warning",hn[hn.Error=3]="Error",hn[hn.Critical=4]="Critical";var dn=function Wn(){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"},mn=(vn.UserExt="user",vn.DeviceExt="device",vn.TraceExt="trace",vn.WebExt="web",vn.AppExt="app",vn.OSExt="os",vn.SessionExt="ses",vn.SDKExt="sdk",vn);function vn(){}var yn=new dn,xn=function Bn(){},Sn=(In.prototype.update=function(){this.automaticSession.id||this.initializeAutomaticSession();var e=st.Now(),t=0!==this.config.sessionExpirationMs()&&e-this.automaticSession.acquisitionDate>this.config.sessionExpirationMs(),n=0!==this.config.sessionExpirationMs()&&e-this.automaticSession.renewalDate>this.config.sessionRenewalMs();t||n?this.renew():(!this.cookieUpdatedTimestamp||e-this.cookieUpdatedTimestamp>In.cookieUpdateInterval)&&(this.automaticSession.renewalDate=e,this.setCookie(this.automaticSession.id,this.automaticSession.acquisitionDate,this.automaticSession.renewalDate))},In.prototype.backup=function(){this.setStorage(this.automaticSession.id,this.automaticSession.acquisitionDate,this.automaticSession.renewalDate)},In.prototype.initializeAutomaticSession=function(){var e=tt.getCookie(this._logger,this._storageNamePrefix());if(e&&"function"==typeof e.split)this.initializeAutomaticSessionWithData(e);else{var t=tt.getStorage(this._logger,this._storageNamePrefix());t&&this.initializeAutomaticSessionWithData(t)}this.automaticSession.id||this.renew()},In.prototype.initializeAutomaticSessionWithData=function(e){var t=e.split("|");0<t.length&&(this.automaticSession.id=t[0]);try{if(1<t.length){var n=+t[1];this.automaticSession.acquisitionDate=+new Date(n),this.automaticSession.acquisitionDate=0<this.automaticSession.acquisitionDate?this.automaticSession.acquisitionDate:0}if(2<t.length){var i=+t[2];this.automaticSession.renewalDate=+new Date(i),this.automaticSession.renewalDate=0<this.automaticSession.renewalDate?this.automaticSession.renewalDate:0}}catch(r){this._logger.throwInternal(O.CRITICAL,X,"Error parsing ai_session cookie, session will be reset: "+tt.getExceptionName(r),{exception:tt.dump(r)})}0===this.automaticSession.renewalDate&&this._logger.throwInternal(O.WARNING,Q,"AI session renewal date is 0, session will be reset.")},In.prototype.renew=function(){var e=st.Now();this.automaticSession.id=tt.newId(),this.automaticSession.acquisitionDate=e,this.automaticSession.renewalDate=e,this.setCookie(this.automaticSession.id,this.automaticSession.acquisitionDate,this.automaticSession.renewalDate),tt.canUseLocalStorage()||this._logger.throwInternal(O.WARNING,q,"Browser does not support local storage. Session durations will be inaccurate.")},In.prototype.setCookie=function(e,t,n){var i=t+this.config.sessionExpirationMs(),r=n+this.config.sessionRenewalMs(),o=new Date,a=[e,t,n];i<r?o.setTime(i):o.setTime(r);var s=this.config.cookieDomain?this.config.cookieDomain():null,c=0===this.config.sessionExpirationMs()?"0":o.toUTCString();tt.setCookie(this._logger,this._storageNamePrefix(),a.join("|")+";expires="+c,s),this.cookieUpdatedTimestamp=st.Now()},In.prototype.setStorage=function(e,t,n){tt.setStorage(this._logger,this._storageNamePrefix(),[e,t,n].join("|"))},In.acquisitionSpan=864e5,In.renewalSpan=18e5,In.cookieUpdateInterval=6e4,In.cookieNameConst="ai_session",In);function In(e,t){var n=this;U.isNullOrUndefined(t)?this._logger=new ue:this._logger=t,"function"!=typeof(e=e||{}).sessionExpirationMs&&(e.sessionExpirationMs=function(){return In.acquisitionSpan}),"function"!=typeof e.sessionRenewalMs&&(e.sessionRenewalMs=function(){return In.renewalSpan}),this.config=e,this._storageNamePrefix=function(){return n.config.namePrefix&&n.config.namePrefix()?In.cookieNameConst+n.config.namePrefix():In.cookieNameConst},this.automaticSession=new xn}var Nn=function Fn(){},Cn=function Vn(){this.id="browser",this.deviceClass="Browser"},wn=function Hn(e){this.sdkVersion=(e.sdkExtension&&e.sdkExtension()?e.sdkExtension()+"_":"")+"javascript:2.4.1"},_n=(Dn.prototype.setAuthenticatedUserContext=function(e,t,n){if(void 0===n&&(n=!1),!this.validateUserInput(e)||t&&!this.validateUserInput(t))this._logger.throwInternal(O.WARNING,ee,"Setting auth user context failed. User auth/account id should be of type string, and not contain commas, semi-colons, equal signs, spaces, or vertical-bars.",!0);else{this.authenticatedId=e;var i=this.authenticatedId;t&&(this.accountId=t,i=[this.authenticatedId,this.accountId].join(Dn.cookieSeparator)),n&&tt.setCookie(this._logger,Dn.authUserCookieName,encodeURI(i),this.config.cookieDomain())}},Dn.prototype.clearAuthenticatedUserContext=function(){this.authenticatedId=null,this.accountId=null,tt.deleteCookie(this._logger,Dn.authUserCookieName)},Dn.prototype.validateUserInput=function(e){return!("string"!=typeof e||!e||e.match(/,|;|=| |\|/))},Dn.cookieSeparator="|",Dn.userCookieName="ai_user",Dn.authUserCookieName="ai_authUser",Dn);function Dn(e,t){this.isNewUser=!1,this._logger=t;var n=tt.getCookie(this._logger,Dn.userCookieName);if(n){this.isNewUser=!1;var i=n.split(Dn.cookieSeparator);0<i.length&&(this.id=i[0])}if(this.config=e,!this.id){this.id=tt.newId();var r=new Date,o=U.toISOString(r);this.accountAcquisitionDate=o,this.isNewUser=!0,r.setTime(r.getTime()+31536e6);var a=[this.id,o],s=this.config.cookieDomain?this.config.cookieDomain():undefined;tt.setCookie(this._logger,Dn.userCookieName,a.join(Dn.cookieSeparator)+";expires="+r.toUTCString(),s);var c=e.namePrefix&&e.namePrefix()?e.namePrefix()+"ai_session":"ai_session";tt.removeStorage(this._logger,c)}this.accountId=e.accountId?e.accountId():undefined;var u=tt.getCookie(this._logger,Dn.authUserCookieName);if(u){var l=(u=decodeURI(u)).split(Dn.cookieSeparator);l[0]&&(this.authenticatedId=l[0]),1<l.length&&l[1]&&(this.accountId=l[1])}}var En=function Xn(){},bn=function Kn(e,t,n){this.traceID=e||tt.generateW3CId(),this.parentID=t,this.name=n;var i=m();!n&&i&&i.pathname&&(this.name=i.pathname)},Tn=(An.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)},An.prototype.applyOperatingSystemContxt=function(e,t){this.os&&this.os.name&&(e.ext.os=this.os)},An.prototype.applyApplicationContext=function(e,t){this.application&&("string"==typeof this.application.ver&&(e.tags[yn.applicationVersion]=this.application.ver),"string"==typeof this.application.build&&(e.tags[yn.applicationBuild]=this.application.build))},An.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))},An.prototype.applyInternalContext=function(e,t){this.internal&&("string"==typeof this.internal.agentVersion&&(e.tags[yn.internalAgentVersion]=this.internal.agentVersion),"string"==typeof this.internal.sdkVersion&&(e.tags[yn.internalSdkVersion]=this.internal.sdkVersion))},An.prototype.applyLocationContext=function(e,t){this.location&&"string"==typeof this.location.ip&&(e.tags[yn.locationIp]=this.location.ip)},An.prototype.applyOperationContext=function(e,t){if(this.telemetryTrace){var n=e.ext.trace||{traceID:undefined,parentID:undefined};"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}},An.prototype.applyWebContext=function(e,t){this.web&&(e.ext.web=e.ext.web||{},e.ext.web=this.web)},An.prototype.applyUserContext=function(e,t){this.user&&(e.tags||(e.tags=[]),"string"==typeof this.user.accountId&&(e.tags[yn.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))},An.prototype.cleanUp=function(e,t){e.ext[mn.DeviceExt]&&0===U.objKeys(e.ext[mn.DeviceExt]).length&&delete e.ext[mn.DeviceExt],e.ext[mn.UserExt]&&0===U.objKeys(e.ext[mn.UserExt]).length&&delete e.ext[mn.UserExt],e.ext[mn.WebExt]&&0===U.objKeys(e.ext[mn.WebExt]).length&&delete e.ext[mn.WebExt],e.ext[mn.OSExt]&&0===U.objKeys(e.ext[mn.OSExt]).length&&delete e.ext[mn.OSExt],e.ext[mn.AppExt]&&0===U.objKeys(e.ext[mn.AppExt]).length&&delete e.ext[mn.AppExt],e.ext[mn.TraceExt]&&0===U.objKeys(e.ext[mn.TraceExt]).length&&delete e.ext[mn.TraceExt]},An);function An(e,t){p()&&(this.sessionManager=new Sn(t,e),this.application=new Nn,this.device=new Cn,this.internal=new wn(t),this.location=new En,this.user=new _n(t,e),this.telemetryTrace=new bn,this.session=new xn),this.appId=function(){return null}}var Mn,kn=(t(Un,Mn=ye),Un.getDefaultConfig=function(){return{instrumentationKey:function(){return undefined},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 undefined}}},Un.prototype.initialize=function(e,t,n,i){var r=this;Mn.prototype.initialize.call(this,e,t,n,i);var o=this._getTelCtx(),a=this.identifier,s=Un.getDefaultConfig();this._extensionConfig=this._extensionConfig||Un.getDefaultConfig();var c=function(e){u._extensionConfig[e]=function(){return o.getConfig(a,e,s[e]())}},u=this;for(var l in s)c(l);this.context=new Tn(t.logger,this._extensionConfig),this._breezeChannel=tt.getExtension(n,"AppInsightsChannelPlugin"),this.context.appId=function(){return r._breezeChannel?r._breezeChannel._appId:null}},Un.prototype.processTelemetry=function(e,t){if(!U.isNullOrUndefined(e)){if(t=this._getTelCtx(t),e.name===Xt.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 se(oe,(d()||{}).userAgent||"");t.diagLog().logInternalMessage(O.CRITICAL,n)}this.processNext(e,t)}},Un.prototype._processTelemetryInternal=function(e,t){e.tags||(e.tags=[]),e.ext||(e.ext={});var n=e.ext;n[mn.DeviceExt]=n[mn.DeviceExt]||{},n[mn.WebExt]=n[mn.WebExt]||{},n[mn.UserExt]=n[mn.UserExt]||{},n[mn.OSExt]=n[mn.OSExt]||{},n[mn.AppExt]=n[mn.AppExt]||{},n[mn.TraceExt]=n[mn.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)},Un);function Un(){var e=null!==Mn&&Mn.apply(this,arguments)||this;return e.priority=110,e.identifier="AppInsightsPropertiesPlugin",e}e.PropertiesPlugin=kn,e.TelemetryTrace=bn,e.TelemetryContext=Tn,e.Session=xn,e.SessionManager=Sn,function(e,t,n){var i=Object.defineProperty;if(i)try{return i(e,t,n)}catch(r){}typeof n.value!==undefined&&(e[t]=n.value)}(e,"__esModule",{value:!0})}); | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e.Microsoft=e.Microsoft||{},e.Microsoft.ApplicationInsights={}))}(this,function(e){"use strict";var i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function t(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?function(e){var t=Object.create;if(t)return t(e);if(null==e)return{};var n=typeof e;if("object"!=n&&"function"!=n)throw new TypeError("Object prototype may only be an Object:"+e);function i(){}return i.prototype=e,new i}(t):(n.prototype=t.prototype,new n)}var r=function(){return(r=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},n=2,o="undefined",a="object",s="window",c="location",u="JSON";function l(){return typeof globalThis!==o&&globalThis?globalThis:typeof self!==o&&self?self:typeof window!==o&&window?window:typeof global!==o&&global?global:null}function f(e){var t=l();return t&&t[e]?t[e]:e===s&&p()?window:null}function p(){return Boolean(typeof window===a&&window)}function h(){return p()?window:f(s)}function g(){return function e(){return Boolean(typeof document===a&&document)}()?document:f("document")}function d(){return function e(){return Boolean(typeof navigator===a&&navigator)}()?navigator:f("navigator")}function m(){return typeof location===a&&location?location:f(c)}function v(){return Boolean(typeof JSON===a&&JSON||null!==f(u))}function y(){return v()?JSON||f(u):null}var x=o,S="prototype",I="attachEvent",N="addEventListener",C="detachEvent",w="removeEventListener";function _(e,t){return typeof e===t}function D(e){return e===undefined||_(e,x)}function E(e){return D(e)||null===e}function b(e,t){return e&&Object[S].hasOwnProperty.call(e,t)}function T(e){return _(e,"object")}function A(e){return _(e,"function")}function M(e,t,n,i){void 0===i&&(i=!1);var r=!1;if(!E(e))try{E(e[N])?E(e[I])||(e[I]("on"+t,n),r=!0):(e[N](t,n,i),r=!0)}catch(o){}return r}function k(e,t,n,i){if(void 0===i&&(i=!1),!E(e))try{E(e[w])?E(e[C])||e[C]("on"+t,n):e[w](t,n,i)}catch(r){}}var U=(L.isDate=function(e){return"[object Date]"===Object[S].toString.call(e)},L.isString=function(e){return _(e,"string")},L.isNumber=function(e){return _(e,"number")},L.isBoolean=function(e){return _(e,"boolean")},L.disableCookies=function(){L._canUseCookies=!1},L.newGuid=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(z,function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})},L.toISOString=function(e){if(L.isDate(e)){var t=function(e){var t=String(e);return 1===t.length&&(t="0"+t),t};return e.getUTCFullYear()+"-"+t(e.getUTCMonth()+1)+"-"+t(e.getUTCDate())+"T"+t(e.getUTCHours())+":"+t(e.getUTCMinutes())+":"+t(e.getUTCSeconds())+"."+String((e.getUTCMilliseconds()/1e3).toFixed(3)).slice(2,5)+"Z"}},L.arrForEach=function(e,t,n){for(var i=e.length,r=0;r<i;++r)r in e&&t.call(n||e,e[r],r,e)},L.arrIndexOf=function(e,t,n){for(var i=e.length,r=n||0,o=Math.max(0<=r?r:i-Math.abs(r),0);o<i;o++)if(o in e&&e[o]===t)return o;return-1},L.arrMap=function(e,t,n){for(var i=e.length,r=n||e,o=new Array(i),a=0;a<i;a++)a in e&&(o[a]=t.call(r,e[a],e));return o},L.arrReduce=function(e,t,n){var i,r=e.length,o=0;if(3<=arguments.length)i=n;else{for(;o<r&&!(o in e);)o++;i=e[o++]}for(;o<r;)o in e&&(i=t(i,e[o],o,e)),o++;return i},L.objCreate=function(e){if(null==e)return{};if(!T(e)&&!A(e))throw new TypeError("Object prototype may only be an Object: "+e);function t(){}return t[S]=e,new t},L.objKeys=function(e){var t=!{toString:null}.propertyIsEnumerable("toString");if(!(A(e)||T(e)&&null!==e))throw new TypeError("objKeys called on non-object");var n=[];for(var i in e)b(e,i)&&n.push(i);if(t)for(var r=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],o=r.length,a=0;a<o;a++)b(e,r[a])&&n.push(r[a]);return n},L.objDefineAccessors=function(e,t,n,i){var r=Object.defineProperty;if(r)try{var o={enumerable:!0,configurable:!0};return n&&(o.get=n),i&&(o.set=i),r(e,t,o),!0}catch(a){}return!1},L.addEventHandler=function(e,t){var n=!1,i=h();i&&(n=M(i,e,t),n=M(i.body,e,t)||n);var r=g();return r&&(n=P.Attach(r,e,t)||n),n},L.isTypeof=_,L.isUndefined=D,L.isNullOrUndefined=E,L.hasOwnProperty=b,L.isFunction=A,L.isObject=T,L);function L(){}var O,R,z=/[xy]/g,P=(j.Attach=M,j.AttachEvent=M,j.Detach=k,j.DetachEvent=k,j);function j(){}(R=O=O||{})[R.CRITICAL=1]="CRITICAL",R[R.WARNING=2]="WARNING";var q=0,G=1,W=2,B=3,F=4,V=5,H=6,X=9,K=23,Q=27,J=49,Y=52,$=56,Z=57,ee=60,te=61,ne=66,ie=68,re=69,oe=72,ae=73,se=(ce.sanitizeDiagnosticText=function(e){return e?'"'+e.replace(/\"/g,"")+'"':""},ce.dataType="MessageData",ce.AiNonUserActionablePrefix="AI (Internal): ",ce.AiUserActionablePrefix="AI: ",ce);function ce(e,t,n,i){void 0===n&&(n=!1),this.messageId=e,this.message=(n?ce.AiUserActionablePrefix:ce.AiNonUserActionablePrefix)+e;var r="";v()&&(r=y().stringify(i));var o=(t?" message:"+ce.sanitizeDiagnosticText(t):"")+(i?" props:"+ce.sanitizeDiagnosticText(r):"");this.message+=o}var ue=(le.prototype.throwInternal=function(e,t,n,i,r){void 0===r&&(r=!1);var o=new se(t,n,r,i),a=this;if(a.enableDebugExceptions())throw o;if(!U.isUndefined(o)&&o&&!U.isUndefined(o.message)){if(r){var s=+o.messageId;!a._messageLogged[s]&&a.consoleLoggingLevel()>=O.WARNING&&(a.warnToConsole(o.message),a._messageLogged[s]=!0)}else a.consoleLoggingLevel()>=O.WARNING&&a.warnToConsole(o.message);a.logInternalMessage(e,o)}},le.prototype.warnToConsole=function(e){!U.isUndefined(console)&&console&&(U.isFunction(console.warn)?console.warn(e):U.isFunction(console.log)&&console.log(e))},le.prototype.resetInternalMessageCount=function(){this._messageCount=0,this._messageLogged={}},le.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 o="Internal events throttle limit per PageView reached for this app.",a=new se(K,o,!1);n.queue.push(a),n.warnToConsole(o)}}},le.prototype._areInternalMessagesThrottled=function(){return this._messageCount>=this.maxInternalMessageLimit()},le);function le(e){this.queue=[],this.AIInternalMessagePrefix="AITR_",this._messageCount=0,this._messageLogged={},this.enableDebugExceptions=function(){return!1},this.consoleLoggingLevel=function(){return 0},this.telemetryLoggingLevel=function(){return 1},this.maxInternalMessageLimit=function(){return 25},U.isNullOrUndefined(e)||(U.isNullOrUndefined(e.loggingLevelConsole)||(this.consoleLoggingLevel=function(){return e.loggingLevelConsole}),U.isNullOrUndefined(e.loggingLevelTelemetry)||(this.telemetryLoggingLevel=function(){return e.loggingLevelTelemetry}),U.isNullOrUndefined(e.maxMessageLimit)||(this.maxInternalMessageLimit=function(){return e.maxMessageLimit}),U.isNullOrUndefined(e.enableDebugExceptions)||(this.enableDebugExceptions=function(){return e.enableDebugExceptions}))}var fe=U.isFunction,pe=function Ln(r,o){var a=this,s=null,c=fe(r.processTelemetry),u=fe(r.setNextPlugin);a._hasRun=!1,a.getPlugin=function(){return r},a.getNext=function(){return s},a.setNext=function(e){s=e},a.processTelemetry=function(e,t){if(t=t||o,r&&c){a._hasRun=!0;try{t.setNext(s),u&&r.setNextPlugin(s),s&&(s._hasRun=!1),r.processTelemetry(e,t)}catch(i){var n=s&&s._hasRun;s&&n||t.diagLog().throwInternal(O.CRITICAL,ae,"Plugin ["+r.identifier+"] failed during processTelemetry - "+i),s&&!n&&s.processTelemetry(e,t)}}else s&&(a._hasRun=!0,s.processTelemetry(e,t))}},he=U.isNullOrUndefined;function ge(e,t){var n=[];if(e&&0<e.length)for(var i=null,r=0;r<e.length;r++){var o=e[r];if(o&&U.isFunction(o.processTelemetry)){var a=new pe(o,t);n.push(a),i&&i.setNext(a),i=a}}return 0<n.length?n[0]:null}var de=function On(e,o,n,t){var a=this,i=null;null!==t&&(e&&U.isFunction(e.getPlugin)?i=function s(e,t,n){var i=[],r=!n;if(e)for(;e;){var o=e.getPlugin();!r&&o!==n||(r=!0,i.push(o)),e=e.getNext()}return r||i.push(n),ge(i,t)}(e,a,t||e.getPlugin()):t?i=function c(e,t,n){var i=e,r=!1;return n&&e&&(i=[],U.arrForEach(e,function(e){!r&&e!==n||(r=!0,i.push(e))})),n&&!r&&(i=i||[]).push(n),ge(i,t)}(e,a,t):U.isUndefined(t)&&(i=ge(e,a))),a.core=function(){return n},a.diagLog=function(){var e=(n||{}).logger;return e=e||new ue(o||{})},a.getCfg=function(){return o},a.getExtCfg=function(e,t){var n;if(void 0===t&&(t={}),o){var i=o.extensionConfig;i&&e&&(n=i[e])}return n||t},a.getConfig=function(e,t,n){var i;void 0===n&&(n=!1);var r=a.getExtCfg(e,null);return r&&!he(r[t])?i=r[t]:o&&!he(o[t])&&(i=o[t]),he(i)?n:i},a.hasNext=function(){return null!=i},a.getNext=function(){return i},a.setNext=function(e){i=e},a.processNext=function(e){var t=i;t&&(i=t.getNext(),t.processTelemetry(e,a))},a.createNew=function(e,t){return void 0===e&&(e=null),new On(e||i,o,n,t)}},me=U.isFunction,ve="getPlugin",ye=(xe.prototype.initialize=function(e,t,n,i){this._baseTelInit(e,t,n,i)},xe);function xe(){var o=this,a=!1,s=null,c=null;o.core=null,o.diagLog=function(e){return o._getTelCtx(e).diagLog()},o.isInitialized=function(){return a},o.setInitialized=function(e){a=e},o.setNextPlugin=function(e){c=e},o.processNext=function(e,t){t?t.processNext(e):c&&me(c.processTelemetry)&&c.processTelemetry(e,null)},o._getTelCtx=function(e){void 0===e&&(e=null);var t=e;if(!t){var n=s||new de(null,{},o.core);t=c&&c[ve]?n.createNew(null,c[ve]):n.createNew(null,c)}return t},o._baseTelInit=function(e,t,n,i){e&&(e.extensionConfig=e.extensionConfig||[]),!i&&t&&(i=t.getProcessTelContext().getNext());var r=c;c&&c[ve]&&(r=c[ve]()),o.core=t,s=new de(i,e,t,r),a=!0}}var Se=U.isFunction,Ie="processTelemetry",Ne="priority",Ce="setNextPlugin",we="isInitialized";function _e(t,n){for(var e=[],i=null,r=t.getNext();r;){var o=r.getPlugin();o&&(i&&Se(i[Ce])&&Se(o[Ie])&&i[Ce](o),Se(o[we])&&o[we]()||e.push(o),i=o,r=r.getNext())}U.arrForEach(e,function(e){e.initialize(t.getCfg(),t.core(),n,t.getNext())})}function De(e){return e.sort(function(e,t){var n=0,i=Se(t[Ie]);return Se(e[Ie])?n=i?e[Ne]-t[Ne]:1:i&&(n=-1),n})}var Ee=500,be="Channel has invalid priority",Te=U.arrForEach,Ae=U.objDefineAccessors;function Me(e,t){t&&0<t.length&&(function n(e){Te(e,function(e){if(e.priority<Ee)throw Error(be+e.identifier)})}(t=t.sort(function(e,t){return e.priority-t.priority})),e.push(t))}var ke,Ue=(t(Le,ke=ye),Le.prototype.processTelemetry=function(t,n){var i=this;this._channelQueue&&Te(this._channelQueue,function(e){0<e.length&&i._getTelCtx(n).createNew(e).processNext(t)})},Le.prototype.getChannelControls=function(){return this._channelQueue},Le.prototype.initialize=function(t,n,i){if(!this.isInitialized()){ke.prototype.initialize.call(this,t,n,i),t.isCookieUseDisabled&&U.disableCookies();var e=this._channelQueue=function r(e,t){var n=[];if(e&&Te(e,function(e){return Me(n,e)}),t){var i=[];Te(t,function(e){e.priority>Ee&&i.push(e)}),Me(n,i)}return n}((t||{}).channels,i);Te(e,function(e){return _e(new de(e,t,n),i)})}},Le._staticInit=(Ae(Le.prototype,"ChannelControls",Le.prototype.getChannelControls),void Ae(Le.prototype,"channelQueue",Le.prototype.getChannelControls)),Le);function Le(){var e=null!==ke&&ke.apply(this,arguments)||this;return e.identifier="ChannelControllerPlugin",e.priority=Ee,e}var Oe=U.arrForEach,Re=U.isNullOrUndefined,ze=(Pe.prototype.initialize=function(e,t,i,n){var r=this;if(r.isInitialized())throw Error("Core should not be initialized more than once");if(!e||Re(e.instrumentationKey))throw Error("Please provide instrumentation key");r.config=e;var o=r._channelController;n=n||U.objCreate({addNotificationListener:function(e){},removeNotificationListener:function(e){},eventsSent:function(e){},eventsDiscarded:function(e,t){}}),r._notificationManager=n,e.extensions=Re(e.extensions)?[]:e.extensions,(e.extensionConfig=Re(e.extensionConfig)?{}:e.extensionConfig).NotificationManager=n,i=i||U.objCreate({throwInternal:function(e,t,n,i,r){void 0===r&&(r=!1)},warnToConsole:function(e){},resetInternalMessageCount:function(){}}),r.logger=i;var a=[];a.push.apply(a,t.concat(e.extensions)),a=De(a);var s=[],c={};if(Oe(a,function(e){if(Re(e)||Re(e.initialize))throw Error("Extensions must provide callback to initialize");var t=e.priority,n=e.identifier;e&&t&&(Re(c[t])?c[t]=n:i.warnToConsole("Two extensions have same priority #"+t+" - "+c[t]+", "+n)),(!t||t<o.priority)&&s.push(e)}),a.push(o),s.push(o),a=De(a),r._extensions=a,_e(new de([o],e,r),a),_e(new de(s,e,r),a),r._extensions=s,0===r.getTransmissionControls().length)throw new Error("No channels available");r._setInit(!0)},Pe.prototype.getTransmissionControls=function(){return this._channelController.getChannelControls()},Pe.prototype.track=function(e){var t=this;e.iKey||(e.iKey=t.config.instrumentationKey),e.time||(e.time=U.toISOString(new Date)),Re(e.ver)&&(e.ver="4.0"),t.isInitialized()?(0<t._eventQueue.length&&(Oe(t._eventQueue,function(e){t.getProcessTelContext().processNext(e)}),t._eventQueue=[]),t.getProcessTelContext().processNext(e)):t._eventQueue.push(e)},Pe.prototype.getProcessTelContext=function(){var e=this._extensions,t=e;return e&&0!==e.length||(t=[this._channelController]),new de(t,this.config,this)},Pe);function Pe(){var t=!1,e=this;e._extensions=new Array,e._channelController=new Ue,e.isInitialized=function(){return t},e._setInit=function(e){t=e},e._eventQueue=[]}var je=(qe.prototype.addNotificationListener=function(e){this.listeners.push(e)},qe.prototype.removeNotificationListener=function(e){for(var t=U.arrIndexOf(this.listeners,e);-1<t;)this.listeners.splice(t,1),t=U.arrIndexOf(this.listeners,e)},qe.prototype.eventsSent=function(t){for(var n=this,e=function(e){i.listeners[e].eventsSent&&setTimeout(function(){return n.listeners[e].eventsSent(t)},0)},i=this,r=0;r<this.listeners.length;++r)e(r)},qe.prototype.eventsDiscarded=function(t,n){for(var i=this,e=function(e){r.listeners[e].eventsDiscarded&&setTimeout(function(){return i.listeners[e].eventsDiscarded(t,n)},0)},r=this,o=0;o<this.listeners.length;++o)e(o)},qe);function qe(){this.listeners=[]}var Ge,We,Be,Fe,Ve,He,Xe;t(Ke,Ge=ze),Ke.prototype.initialize=function(e,t){var n=this;n._notificationManager=new je,n.logger=new ue(e),n.config=e,Ge.prototype.initialize.call(this,e,t,n.logger,n._notificationManager)},Ke.prototype.getTransmissionControls=function(){return Ge.prototype.getTransmissionControls.call(this)},Ke.prototype.track=function(e){if(null===e)throw this._notifyInvalidEvent(e),Error("Invalid telemetry item");this._validateTelemetryItem(e),Ge.prototype.track.call(this,e)},Ke.prototype.addNotificationListener=function(e){this._notificationManager&&this._notificationManager.addNotificationListener(e)},Ke.prototype.removeNotificationListener=function(e){this._notificationManager&&this._notificationManager.removeNotificationListener(e)},Ke.prototype.pollInternalLogs=function(i){var t=this,e=this.config.diagnosticLogInterval;return 0<e||(e=1e4),setInterval(function(){var n=t,e=n.logger?n.logger.queue:[];U.arrForEach(e,function(e){var t={name:i||"InternalMessageId: "+e.messageId,iKey:n.config.instrumentationKey,time:U.toISOString(new Date),baseType:se.dataType,baseData:{message:e.message}};n.track(t)}),e.length=0},e)},Ke.prototype._validateTelemetryItem=function(e){if(U.isNullOrUndefined(e.name))throw this._notifyInvalidEvent(e),Error("telemetry name required")},Ke.prototype._notifyInvalidEvent=function(e){this._notificationManager&&this._notificationManager.eventsDiscarded([e],n)};function Ke(){return Ge.call(this)||this}(Be=We=We||{})[Be.LocalStorage=0]="LocalStorage",Be[Be.SessionStorage=1]="SessionStorage",(Ve=Fe=Fe||{})[Ve.Default=0]="Default",Ve[Ve.Required=1]="Required",Ve[Ve.Array=2]="Array",Ve[Ve.Hidden=4]="Hidden",(Xe=He=He||{})[Xe.AI=0]="AI",Xe[Xe.AI_AND_W3C=1]="AI_AND_W3C",Xe[Xe.W3C=2]="W3C";var Qe=(Je.sanitizeKeyAndAddUniqueness=function(e,t,n){var i=t.length,r=Je.sanitizeKey(e,t);if(r.length!==i){for(var o=0,a=r;n[a]!==undefined;)o++,a=r.substring(0,Je.MAX_NAME_LENGTH-3)+Je.padNumber(o);r=a}return r},Je.sanitizeKey=function(e,t){var n;return t&&(t=Je.trim(t.toString())).length>Je.MAX_NAME_LENGTH&&(n=t.substring(0,Je.MAX_NAME_LENGTH),e.throwInternal(O.WARNING,Z,"name is too long. It has been truncated to "+Je.MAX_NAME_LENGTH+" characters.",{name:t},!0)),n||t},Je.sanitizeString=function(e,t,n){var i;return void 0===n&&(n=Je.MAX_STRING_LENGTH),t&&(n=n||Je.MAX_STRING_LENGTH,(t=Je.trim(t)).toString().length>n&&(i=t.toString().substring(0,n),e.throwInternal(O.WARNING,te,"string value is too long. It has been truncated to "+n+" characters.",{value:t},!0))),i||t},Je.sanitizeUrl=function(e,t){return Je.sanitizeInput(e,t,Je.MAX_URL_LENGTH,ne)},Je.sanitizeMessage=function(e,t){var n;return t&&t.length>Je.MAX_MESSAGE_LENGTH&&(n=t.substring(0,Je.MAX_MESSAGE_LENGTH),e.throwInternal(O.WARNING,$,"message is too long, it has been truncated to "+Je.MAX_MESSAGE_LENGTH+" characters.",{message:t},!0)),n||t},Je.sanitizeException=function(e,t){var n;return t&&t.length>Je.MAX_EXCEPTION_LENGTH&&(n=t.substring(0,Je.MAX_EXCEPTION_LENGTH),e.throwInternal(O.WARNING,Y,"exception is too long, it has been truncated to "+Je.MAX_EXCEPTION_LENGTH+" characters.",{exception:t},!0)),n||t},Je.sanitizeProperties=function(e,t){if(t){var n={};for(var i in t){var r=t[i];if(U.isObject(r)&&v())try{r=y().stringify(r)}catch(o){e.throwInternal(O.WARNING,J,"custom property is not valid",{exception:o},!0)}r=Je.sanitizeString(e,r,Je.MAX_PROPERTY_LENGTH),n[i=Je.sanitizeKeyAndAddUniqueness(e,i,n)]=r}t=n}return t},Je.sanitizeMeasurements=function(e,t){if(t){var n={};for(var i in t){var r=t[i];n[i=Je.sanitizeKeyAndAddUniqueness(e,i,n)]=r}t=n}return t},Je.sanitizeId=function(e,t){return t?Je.sanitizeInput(e,t,Je.MAX_ID_LENGTH,re).toString():t},Je.sanitizeInput=function(e,t,n,i){var r;return t&&(t=Je.trim(t)).length>n&&(r=t.substring(0,n),e.throwInternal(O.WARNING,i,"input is too long, it has been truncated to "+n+" characters.",{data:t},!0)),r||t},Je.padNumber=function(e){var t="00"+e;return t.substr(t.length-3)},Je.trim=function(e){return U.isString(e)?e.replace(/^\s+|\s+$/g,""):e},Je.MAX_NAME_LENGTH=150,Je.MAX_ID_LENGTH=128,Je.MAX_PROPERTY_LENGTH=8192,Je.MAX_STRING_LENGTH=1024,Je.MAX_URL_LENGTH=2048,Je.MAX_MESSAGE_LENGTH=32768,Je.MAX_EXCEPTION_LENGTH=32768,Je);function Je(){}var Ye="prototype",$e=d(),Ze=U.isString,et=null;var tt=(nt.createDomEvent=function(e){var t=null;if(U.isFunction(Event))t=new Event(e);else{var n=g();n&&n.createEvent&&(t=n.createEvent("Event")).initEvent(e,!0,!0)}return t},nt.disableStorage=function(){nt._canUseLocalStorage=!1,nt._canUseSessionStorage=!1},nt._getLocalStorageObject=function(){return nt.canUseLocalStorage()?nt._getVerifiedStorageObject(We.LocalStorage):null},nt._getVerifiedStorageObject=function(e){var t,n,i=null;try{if(U.isNullOrUndefined(l()))return null;n=new Date,(i=e===We.LocalStorage?f("localStorage"):f("sessionStorage")).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},nt.isInternalApplicationInsightsEndpoint=function(e){return-1!==nt._internalEndpoints.indexOf(e.toLowerCase())},nt.canUseLocalStorage=function(){return nt._canUseLocalStorage===undefined&&(nt._canUseLocalStorage=!!nt._getVerifiedStorageObject(We.LocalStorage)),nt._canUseLocalStorage},nt.getStorage=function(e,t){var n=nt._getLocalStorageObject();if(null!==n)try{return n.getItem(t)}catch(i){nt._canUseLocalStorage=!1,e.throwInternal(O.WARNING,G,"Browser failed read of local storage. "+nt.getExceptionName(i),{exception:nt.dump(i)})}return null},nt.setStorage=function(e,t,n){var i=nt._getLocalStorageObject();if(null!==i)try{return i.setItem(t,n),!0}catch(r){nt._canUseLocalStorage=!1,e.throwInternal(O.WARNING,B,"Browser failed write to local storage. "+nt.getExceptionName(r),{exception:nt.dump(r)})}return!1},nt.removeStorage=function(e,t){var n=nt._getLocalStorageObject();if(null!==n)try{return n.removeItem(t),!0}catch(i){nt._canUseLocalStorage=!1,e.throwInternal(O.WARNING,V,"Browser failed removal of local storage item. "+nt.getExceptionName(i),{exception:nt.dump(i)})}return!1},nt._getSessionStorageObject=function(){return nt.canUseSessionStorage()?nt._getVerifiedStorageObject(We.SessionStorage):null},nt.canUseSessionStorage=function(){return nt._canUseSessionStorage===undefined&&(nt._canUseSessionStorage=!!nt._getVerifiedStorageObject(We.SessionStorage)),nt._canUseSessionStorage},nt.getSessionStorageKeys=function(){var e=[];if(nt.canUseSessionStorage())for(var t in f("sessionStorage"))e.push(t);return e},nt.getSessionStorage=function(e,t){var n=nt._getSessionStorageObject();if(null!==n)try{return n.getItem(t)}catch(i){nt._canUseSessionStorage=!1,e.throwInternal(O.WARNING,W,"Browser failed read of session storage. "+nt.getExceptionName(i),{exception:nt.dump(i)})}return null},nt.setSessionStorage=function(e,t,n){var i=nt._getSessionStorageObject();if(null!==i)try{return i.setItem(t,n),!0}catch(r){nt._canUseSessionStorage=!1,e.throwInternal(O.WARNING,F,"Browser failed write to session storage. "+nt.getExceptionName(r),{exception:nt.dump(r)})}return!1},nt.removeSessionStorage=function(e,t){var n=nt._getSessionStorageObject();if(null!==n)try{return n.removeItem(t),!0}catch(i){nt._canUseSessionStorage=!1,e.throwInternal(O.WARNING,H,"Browser failed removal of session storage item. "+nt.getExceptionName(i),{exception:nt.dump(i)})}return!1},nt.disableCookies=function(){U.disableCookies()},nt.canUseCookies=function(e){if(U._canUseCookies===undefined){U._canUseCookies=!1;try{U._canUseCookies=nt.document.cookie!==undefined}catch(t){e.throwInternal(O.WARNING,ie,"Cannot access document.cookie - "+nt.getExceptionName(t),{exception:nt.dump(t)})}}return U._canUseCookies&&nt.document&&nt.document.cookie},nt.disallowsSameSiteNone=function(e){return!!Ze(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")||!function r(e,t){var n=e.length,i=n-t.length;return e.substring(0<=i?i:0,n)===t}(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"))},nt.setCookie=function(e,t,n,i){if(nt.canUseCookies(e)){var r="",o="";i&&(r=";domain="+i);var a=m();a&&"https:"===a.protocol&&(o=";secure",null===et&&(et=nt.disallowsSameSiteNone((d()||{}).userAgent)),et||(n+=";SameSite=None")),nt.document.cookie=t+"="+n+r+";path=/"+o}},nt.stringToBoolOrDefault=function(e,t){return void 0===t&&(t=!1),e===undefined||null===e?t:"true"===e.toString().toLowerCase()},nt.getCookie=function(e,t){if(nt.canUseCookies(e)){var n="";if(t&&t.length)for(var i=t+"=",r=nt.document.cookie.split(";"),o=0;o<r.length;o++){var a=r[o];if((a=nt.trim(a))&&0===a.indexOf(i)){n=a.substring(i.length,r[o].length);break}}return n}},nt.deleteCookie=function(e,t){nt.canUseCookies(e)&&(nt.document.cookie=t+"=;path=/;expires=Thu, 01 Jan 1970 00:00:01 GMT;")},nt.trim=function(e){return Ze(e)?e.replace(/^\s+|\s+$/g,""):e},nt.newId=function(){for(var e="",t=1073741824*Math.random();0<t;)e+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(t%64),t=Math.floor(t/64);return e},nt.random32=function(){return 4294967296*Math.random()|0},nt.generateW3CId=function(){for(var e,t=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"],n="",i=0;i<4;i++)n+=t[15&(e=nt.random32())]+t[e>>4&15]+t[e>>8&15]+t[e>>12&15]+t[e>>16&15]+t[e>>20&15]+t[e>>24&15]+t[e>>28&15];var r=t[8+4*Math.random()|0];return n.substr(0,8)+n.substr(9,4)+"4"+n.substr(13,3)+r+n.substr(16,3)+n.substr(19,12)},nt.isArray=function(e){return"[object Array]"===Object[Ye].toString.call(e)},nt.isError=function(e){return"[object Error]"===Object[Ye].toString.call(e)},nt.getIEVersion=function(e){void 0===e&&(e=null);var t=e?e.toLowerCase():$e?($e.userAgent||"").toLowerCase():"";return-1!==t.indexOf("msie")?parseInt(t.split("msie")[1]):null},nt.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,(0<o?o+".":"")+(r=r.length<2?"0"+r:r)+":"+i+":"+n+"."+t},nt.isCrossOriginError=function(e,t,n,i,r){return("Script error."===e||"Script error"===e)&&!r},nt.dump=function(e){var t=Object[Ye].toString.call(e),n="";return"[object Error]"===t?n="{ stack: '"+e.stack+"', message: '"+e.message+"', name: '"+e.name+"'":v()&&(n=y().stringify(e)),t+n},nt.getExceptionName=function(e){return"[object Error]"===Object[Ye].toString.call(e)?e.name:""},nt.addEventHandler=function(e,t){return P.Attach(h(),e,t)},nt.IsBeaconApiSupported=function(){return"sendBeacon"in $e&&$e.sendBeacon},nt.getExtension=function(e,t){for(var n=null,i=0;!n&&i<e.length;)e[i]&&e[i].identifier===t&&(n=e[i]),i++;return n},nt.document=g()||{},nt._canUseLocalStorage=undefined,nt._canUseSessionStorage=undefined,nt._internalEndpoints=["https://dc.services.visualstudio.com/v2/track","https://breeze.aimon.applicationinsights.io/v2/track","https://dc-int.services.visualstudio.com/v2/track"],nt.NotSpecified="not_specified",nt.isDate=U.isDate,nt.toISOStringForIE8=U.toISOString,nt);function nt(){}var it=(rt.parseUrl=function(e){return rt.htmlAnchorElement||(rt.htmlAnchorElement=rt.document.createElement?rt.document.createElement("a"):{host:rt.parseHost(e)}),rt.htmlAnchorElement.href=e,rt.htmlAnchorElement},rt.getAbsoluteUrl=function(e){var t,n=rt.parseUrl(e);return n&&(t=n.href),t},rt.getPathName=function(e){var t,n=rt.parseUrl(e);return n&&(t=n.pathname),t},rt.getCompleteUrl=function(e,t){return e?e.toUpperCase()+" "+t:t},rt.parseHost=function(e){if(e){var t=e.match(/:\/\/(www[0-9]?\.)?(.[^/:]+)/i);if(null!=t&&2<t.length&&Ze(t[2])&&0<t[2].length)return t[2]}return null},rt.document=g()||{},rt);function rt(){}var ot=(at.ParseDependencyPath=function(e,t,n,i){var r,o=i,a=i;if(t&&0<t.length){var s=it.parseUrl(t);if(r=s.host,!o)if(null!=s.pathname){var c=0===s.pathname.length?"/":s.pathname;"/"!==c.charAt(0)&&(c="/"+c),a=s.pathname,o=Qe.sanitizeString(e,n?n+" "+c:c)}else o=Qe.sanitizeString(e,t)}else o=r=i;return{target:r,name:o,data:a}},at);function at(){}var st=(ct.Now=function(){var e=function t(){return f("performance")}();return e&&e.now&&e.timing?e.now()+e.timing.navigationStart:(new Date).getTime()},ct.GetDuration=function(e,t){var n=null;return 0===e||0===t||U.isNullOrUndefined(e)||U.isNullOrUndefined(t)||(n=t-e),n},ct);function ct(){}var ut,lt=(t(ft,ut=function Rn(){}),ft);function ft(){return ut.call(this)||this}var pt;t(ht,pt=function zn(){this.ver=1,this.sampleRate=100,this.tags={}});function ht(e,t,n){var i=pt.call(this)||this;return i.name=Qe.sanitizeString(e,n)||tt.NotSpecified,i.data=t,i.time=U.toISOString(new Date),i.aiDataContract={time:Fe.Required,iKey:Fe.Required,name:Fe.Required,sampleRate:function(){return 100===i.sampleRate?Fe.Hidden:Fe.Required},tags:Fe.Required,data:Fe.Required},i}var gt,dt=function Pn(){},mt=(t(vt,gt=dt),vt);function vt(){var e=gt.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}var yt;t(xt,yt=mt),xt.envelopeType="Microsoft.ApplicationInsights.{0}.Event",xt.dataType="EventData";function xt(e,t,n,i){var r=yt.call(this)||this;return r.aiDataContract={ver:Fe.Required,name:Fe.Required,properties:Fe.Default,measurements:Fe.Default},r.name=Qe.sanitizeString(e,t)||tt.NotSpecified,r.properties=Qe.sanitizeProperties(e,n),r.measurements=Qe.sanitizeMeasurements(e,i),r}var St,It=function jn(){},Nt=(t(Ct,St=dt),Ct);function Ct(){var e=St.call(this)||this;return e.ver=2,e.exceptions=[],e.properties={},e.measurements={},e}var wt,_t=function qn(){this.hasFullStack=!0,this.parsedStack=[]};t(Dt,wt=Nt),Dt.CreateFromInterface=function(t,e){var n=e.exceptions&&U.arrMap(e.exceptions,function(e){return bt.CreateFromInterface(t,e)});return new Dt(t,r({},e,{exceptions:n}))},Dt.prototype.toInterface=function(){var e=this,t=e.exceptions,n=e.properties,i=e.measurements,r=e.severityLevel,o=(e.ver,e.problemGroup),a=e.id,s=e.isManual;return{ver:"4.0",exceptions:t instanceof Array&&U.arrMap(t,function(e){return e.toInterface()})||undefined,severityLevel:r,properties:n,measurements:i,problemGroup:o,id:a,isManual:s}},Dt.CreateSimpleException=function(e,t,n,i,r,o){return{exceptions:[{hasFullStack:!0,message:e,stack:r,typeName:t}]}},Dt.envelopeType="Microsoft.ApplicationInsights.{0}.Exception",Dt.dataType="ExceptionData";function Dt(e,t,n,i,r,o){var a=wt.call(this)||this;return a.aiDataContract={ver:Fe.Required,exceptions:Fe.Required,severityLevel:Fe.Default,properties:Fe.Default,measurements:Fe.Default},t instanceof Error?(a.exceptions=[new bt(e,t)],a.properties=Qe.sanitizeProperties(e,n),a.measurements=Qe.sanitizeMeasurements(e,i),r&&(a.severityLevel=r),o&&(a.id=o)):(a.exceptions=t.exceptions,a.properties=t.properties,a.measurements=t.measurements,t.severityLevel&&(a.severityLevel=t.severityLevel),t.id&&(a.id=t.id),t.problemGroup&&(a.problemGroup=t.problemGroup),a.ver=2,U.isNullOrUndefined(t.isManual)||(a.isManual=t.isManual)),a}var Et,bt=(t(Tt,Et=_t),Tt.prototype.toInterface=function(){var e=this.parsedStack instanceof Array&&U.arrMap(this.parsedStack,function(e){return e.toInterface()});return{id:this.id,outerId:this.outerId,typeName:this.typeName,message:this.message,hasFullStack:this.hasFullStack,stack:this.stack,parsedStack:e||undefined}},Tt.CreateFromInterface=function(e,t){var n=t.parsedStack instanceof Array&&U.arrMap(t.parsedStack,function(e){return Mt.CreateFromInterface(e)})||t.parsedStack;return new Tt(e,r({},t,{parsedStack:n}))},Tt.parseStack=function(e){var t;if(U.isString(e)){var n=e.split("\n");t=[];for(var i=0,r=0,o=0;o<=n.length;o++){var a=n[o];if(Mt.regex.test(a)){var s=new Mt(n[o],i++);r+=s.sizeInBytes,t.push(s)}}if(32768<r)for(var c=0,u=t.length-1,l=0,f=c,p=u;c<u;){if(32768<(l+=t[c].sizeInBytes+t[u].sizeInBytes)){var h=p-f+1;t.splice(f,h);break}f=c,p=u,c++,u--}}return t},Tt);function Tt(e,t){var n=Et.call(this)||this;if(n.aiDataContract={id:Fe.Default,outerId:Fe.Default,typeName:Fe.Required,message:Fe.Required,hasFullStack:Fe.Default,stack:Fe.Default,parsedStack:Fe.Array},t instanceof Error){n.typeName=Qe.sanitizeString(e,t.name)||tt.NotSpecified,n.message=Qe.sanitizeMessage(e,t.message)||tt.NotSpecified;var i=t.stack;n.parsedStack=Tt.parseStack(i),n.stack=Qe.sanitizeException(e,i),n.hasFullStack=tt.isArray(n.parsedStack)&&0<n.parsedStack.length}else n.typeName=t.typeName,n.message=t.message,n.stack=t.stack,n.parsedStack=t.parsedStack,n.hasFullStack=t.hasFullStack;return n}var At,Mt=(t(kt,At=It),kt.CreateFromInterface=function(e){return new kt(e,null)},kt.prototype.toInterface=function(){return{level:this.level,method:this.method,assembly:this.assembly,fileName:this.fileName,line:this.line}},kt.regex=/^([\s]+at)?(.*?)(\@|\s\(|\s)([^\(\@\n]+):([0-9]+):([0-9]+)(\)?)$/,kt.baseSize=58,kt);function kt(e,t){var n=At.call(this)||this;if(n.sizeInBytes=0,n.aiDataContract={level:Fe.Required,method:Fe.Required,assembly:Fe.Default,fileName:Fe.Default,line:Fe.Default},"string"==typeof e){var i=e;n.level=t,n.method="<no_method>",n.assembly=tt.trim(i),n.fileName="",n.line=0;var r=i.match(kt.regex);r&&5<=r.length&&(n.method=tt.trim(r[2])||n.method,n.fileName=tt.trim(r[4]),n.line=parseInt(r[5])||0)}else n.level=e.level,n.method=e.method,n.assembly=e.assembly,n.fileName=e.fileName,n.line=e.line,n.sizeInBytes=0;return n.sizeInBytes+=n.method.length,n.sizeInBytes+=n.fileName.length,n.sizeInBytes+=n.assembly.length,n.sizeInBytes+=kt.baseSize,n.sizeInBytes+=n.level.toString().length,n.sizeInBytes+=n.line.toString().length,n}var Ut,Lt,Ot,Rt=(t(zt,Ut=dt),zt);function zt(){var e=Ut.call(this)||this;return e.ver=2,e.metrics=[],e.properties={},e.measurements={},e}(Ot=Lt=Lt||{})[Ot.Measurement=0]="Measurement",Ot[Ot.Aggregation=1]="Aggregation";var Pt,jt=(t(qt,Pt=function Gn(){this.kind=Lt.Measurement}),qt);function qt(){var e=null!==Pt&&Pt.apply(this,arguments)||this;return e.aiDataContract={name:Fe.Required,kind:Fe.Default,value:Fe.Required,count:Fe.Default,min:Fe.Default,max:Fe.Default,stdDev:Fe.Default},e}var Gt;t(Wt,Gt=Rt),Wt.envelopeType="Microsoft.ApplicationInsights.{0}.Metric",Wt.dataType="MetricData";function Wt(e,t,n,i,r,o,a,s){var c=Gt.call(this)||this;c.aiDataContract={ver:Fe.Required,metrics:Fe.Required,properties:Fe.Default};var u=new jt;return u.count=0<i?i:undefined,u.max=isNaN(o)||null===o?undefined:o,u.min=isNaN(r)||null===r?undefined:r,u.name=Qe.sanitizeString(e,t)||tt.NotSpecified,u.value=n,c.metrics=[u],c.properties=Qe.sanitizeProperties(e,a),c.measurements=Qe.sanitizeMeasurements(e,s),c}var Bt,Ft=(t(Vt,Bt=mt),Vt);function Vt(){var e=Bt.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}var Ht,Xt=(t(Kt,Ht=Ft),Kt.envelopeType="Microsoft.ApplicationInsights.{0}.Pageview",Kt.dataType="PageviewData",Kt);function Kt(e,t,n,i,r,o,a){var s=Ht.call(this)||this;return s.aiDataContract={ver:Fe.Required,name:Fe.Default,url:Fe.Default,duration:Fe.Default,properties:Fe.Default,measurements:Fe.Default,id:Fe.Default},s.id=Qe.sanitizeId(e,a),s.url=Qe.sanitizeUrl(e,n),s.name=Qe.sanitizeString(e,t)||tt.NotSpecified,isNaN(i)||(s.duration=tt.msToTimeSpan(i)),s.properties=Qe.sanitizeProperties(e,r),s.measurements=Qe.sanitizeMeasurements(e,o),s}var Qt,Jt=(t(Yt,Qt=dt),Yt);function Yt(){var e=Qt.call(this)||this;return e.ver=2,e.success=!0,e.properties={},e.measurements={},e}var $t;t(Zt,$t=Jt),Zt.envelopeType="Microsoft.ApplicationInsights.{0}.RemoteDependency",Zt.dataType="RemoteDependencyData";function Zt(e,t,n,i,r,o,a,s,c,u,l,f){void 0===c&&(c="Ajax");var p=$t.call(this)||this;p.aiDataContract={id:Fe.Required,ver:Fe.Required,name:Fe.Default,resultCode:Fe.Default,duration:Fe.Default,success:Fe.Default,data:Fe.Default,target:Fe.Default,type:Fe.Default,properties:Fe.Default,measurements:Fe.Default,kind:Fe.Default,value:Fe.Default,count:Fe.Default,min:Fe.Default,max:Fe.Default,stdDev:Fe.Default,dependencyKind:Fe.Default,dependencySource:Fe.Default,commandName:Fe.Default,dependencyTypeName:Fe.Default},p.id=t,p.duration=tt.msToTimeSpan(r),p.success=o,p.resultCode=a+"",p.type=Qe.sanitizeString(e,c);var h=ot.ParseDependencyPath(e,n,s,i);return p.data=Qe.sanitizeUrl(e,i)||h.data,p.target=Qe.sanitizeString(e,h.target),u&&(p.target=p.target+" | "+u),p.name=Qe.sanitizeString(e,h.name),p.properties=Qe.sanitizeProperties(e,l),p.measurements=Qe.sanitizeMeasurements(e,f),p}var en,tn=(t(nn,en=dt),nn);function nn(){var e=en.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}var rn;t(on,rn=tn),on.envelopeType="Microsoft.ApplicationInsights.{0}.Message",on.dataType="MessageData";function on(e,t,n,i,r){var o=rn.call(this)||this;return o.aiDataContract={ver:Fe.Required,message:Fe.Required,severityLevel:Fe.Default,properties:Fe.Default},t=t||tt.NotSpecified,o.message=Qe.sanitizeMessage(e,t),o.properties=Qe.sanitizeProperties(e,i),o.measurements=Qe.sanitizeMeasurements(e,r),n&&(o.severityLevel=n),o}var an,sn=(t(cn,an=Ft),cn);function cn(){var e=an.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}var un;t(ln,un=sn),ln.envelopeType="Microsoft.ApplicationInsights.{0}.PageviewPerformance",ln.dataType="PageviewPerformanceData";function ln(e,t,n,i,r,o,a){var s=un.call(this)||this;return s.aiDataContract={ver:Fe.Required,name:Fe.Default,url:Fe.Default,duration:Fe.Default,perfTotal:Fe.Default,networkConnect:Fe.Default,sentRequest:Fe.Default,receivedResponse:Fe.Default,domProcessing:Fe.Default,properties:Fe.Default,measurements:Fe.Default},s.url=Qe.sanitizeUrl(e,n),s.name=Qe.sanitizeString(e,t)||tt.NotSpecified,s.properties=Qe.sanitizeProperties(e,r),s.measurements=Qe.sanitizeMeasurements(e,o),a&&(s.domProcessing=a.domProcessing,s.duration=a.duration,s.networkConnect=a.networkConnect,s.perfTotal=a.perfTotal,s.receivedResponse=a.receivedResponse,s.sentRequest=a.sentRequest),s}var fn,pn,hn;t(gn,fn=lt);function gn(e,t){var n=fn.call(this)||this;return n.aiDataContract={baseType:Fe.Required,baseData:Fe.Required},n.baseType=e,n.baseData=t,n}(hn=pn=pn||{})[hn.Verbose=0]="Verbose",hn[hn.Information=1]="Information",hn[hn.Warning=2]="Warning",hn[hn.Error=3]="Error",hn[hn.Critical=4]="Critical";var dn=function Wn(){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"},mn=(vn.UserExt="user",vn.DeviceExt="device",vn.TraceExt="trace",vn.WebExt="web",vn.AppExt="app",vn.OSExt="os",vn.SessionExt="ses",vn.SDKExt="sdk",vn);function vn(){}var yn=new dn,xn=function Bn(){},Sn=(In.prototype.update=function(){this.automaticSession.id||this.initializeAutomaticSession();var e=st.Now(),t=0!==this.config.sessionExpirationMs()&&e-this.automaticSession.acquisitionDate>this.config.sessionExpirationMs(),n=0!==this.config.sessionExpirationMs()&&e-this.automaticSession.renewalDate>this.config.sessionRenewalMs();t||n?this.renew():(!this.cookieUpdatedTimestamp||e-this.cookieUpdatedTimestamp>In.cookieUpdateInterval)&&(this.automaticSession.renewalDate=e,this.setCookie(this.automaticSession.id,this.automaticSession.acquisitionDate,this.automaticSession.renewalDate))},In.prototype.backup=function(){this.setStorage(this.automaticSession.id,this.automaticSession.acquisitionDate,this.automaticSession.renewalDate)},In.prototype.initializeAutomaticSession=function(){var e=tt.getCookie(this._logger,this._storageNamePrefix());if(e&&"function"==typeof e.split)this.initializeAutomaticSessionWithData(e);else{var t=tt.getStorage(this._logger,this._storageNamePrefix());t&&this.initializeAutomaticSessionWithData(t)}this.automaticSession.id||this.renew()},In.prototype.initializeAutomaticSessionWithData=function(e){var t=e.split("|");0<t.length&&(this.automaticSession.id=t[0]);try{if(1<t.length){var n=+t[1];this.automaticSession.acquisitionDate=+new Date(n),this.automaticSession.acquisitionDate=0<this.automaticSession.acquisitionDate?this.automaticSession.acquisitionDate:0}if(2<t.length){var i=+t[2];this.automaticSession.renewalDate=+new Date(i),this.automaticSession.renewalDate=0<this.automaticSession.renewalDate?this.automaticSession.renewalDate:0}}catch(r){this._logger.throwInternal(O.CRITICAL,X,"Error parsing ai_session cookie, session will be reset: "+tt.getExceptionName(r),{exception:tt.dump(r)})}0===this.automaticSession.renewalDate&&this._logger.throwInternal(O.WARNING,Q,"AI session renewal date is 0, session will be reset.")},In.prototype.renew=function(){var e=st.Now();this.automaticSession.id=tt.newId(),this.automaticSession.acquisitionDate=e,this.automaticSession.renewalDate=e,this.setCookie(this.automaticSession.id,this.automaticSession.acquisitionDate,this.automaticSession.renewalDate),tt.canUseLocalStorage()||this._logger.throwInternal(O.WARNING,q,"Browser does not support local storage. Session durations will be inaccurate.")},In.prototype.setCookie=function(e,t,n){var i=t+this.config.sessionExpirationMs(),r=n+this.config.sessionRenewalMs(),o=new Date,a=[e,t,n];i<r?o.setTime(i):o.setTime(r);var s=this.config.cookieDomain?this.config.cookieDomain():null,c=0===this.config.sessionExpirationMs()?"0":o.toUTCString();tt.setCookie(this._logger,this._storageNamePrefix(),a.join("|")+";expires="+c,s),this.cookieUpdatedTimestamp=st.Now()},In.prototype.setStorage=function(e,t,n){tt.setStorage(this._logger,this._storageNamePrefix(),[e,t,n].join("|"))},In.acquisitionSpan=864e5,In.renewalSpan=18e5,In.cookieUpdateInterval=6e4,In.cookieNameConst="ai_session",In);function In(e,t){var n=this;U.isNullOrUndefined(t)?this._logger=new ue:this._logger=t,"function"!=typeof(e=e||{}).sessionExpirationMs&&(e.sessionExpirationMs=function(){return In.acquisitionSpan}),"function"!=typeof e.sessionRenewalMs&&(e.sessionRenewalMs=function(){return In.renewalSpan}),this.config=e,this._storageNamePrefix=function(){return n.config.namePrefix&&n.config.namePrefix()?In.cookieNameConst+n.config.namePrefix():In.cookieNameConst},this.automaticSession=new xn}var Nn=function Fn(){},Cn=function Vn(){this.id="browser",this.deviceClass="Browser"},wn=function Hn(e){this.sdkVersion=(e.sdkExtension&&e.sdkExtension()?e.sdkExtension()+"_":"")+"javascript:2.4.2"},_n=(Dn.prototype.setAuthenticatedUserContext=function(e,t,n){if(void 0===n&&(n=!1),!this.validateUserInput(e)||t&&!this.validateUserInput(t))this._logger.throwInternal(O.WARNING,ee,"Setting auth user context failed. User auth/account id should be of type string, and not contain commas, semi-colons, equal signs, spaces, or vertical-bars.",!0);else{this.authenticatedId=e;var i=this.authenticatedId;t&&(this.accountId=t,i=[this.authenticatedId,this.accountId].join(Dn.cookieSeparator)),n&&tt.setCookie(this._logger,Dn.authUserCookieName,encodeURI(i),this.config.cookieDomain())}},Dn.prototype.clearAuthenticatedUserContext=function(){this.authenticatedId=null,this.accountId=null,tt.deleteCookie(this._logger,Dn.authUserCookieName)},Dn.prototype.validateUserInput=function(e){return!("string"!=typeof e||!e||e.match(/,|;|=| |\|/))},Dn.cookieSeparator="|",Dn.userCookieName="ai_user",Dn.authUserCookieName="ai_authUser",Dn);function Dn(e,t){this.isNewUser=!1,this._logger=t;var n=tt.getCookie(this._logger,Dn.userCookieName);if(n){this.isNewUser=!1;var i=n.split(Dn.cookieSeparator);0<i.length&&(this.id=i[0])}if(this.config=e,!this.id){this.id=tt.newId();var r=new Date,o=U.toISOString(r);this.accountAcquisitionDate=o,this.isNewUser=!0,r.setTime(r.getTime()+31536e6);var a=[this.id,o],s=this.config.cookieDomain?this.config.cookieDomain():undefined;tt.setCookie(this._logger,Dn.userCookieName,a.join(Dn.cookieSeparator)+";expires="+r.toUTCString(),s);var c=e.namePrefix&&e.namePrefix()?e.namePrefix()+"ai_session":"ai_session";tt.removeStorage(this._logger,c)}this.accountId=e.accountId?e.accountId():undefined;var u=tt.getCookie(this._logger,Dn.authUserCookieName);if(u){var l=(u=decodeURI(u)).split(Dn.cookieSeparator);l[0]&&(this.authenticatedId=l[0]),1<l.length&&l[1]&&(this.accountId=l[1])}}var En=function Xn(){},bn=function Kn(e,t,n){this.traceID=e||tt.generateW3CId(),this.parentID=t,this.name=n;var i=m();!n&&i&&i.pathname&&(this.name=i.pathname)},Tn=(An.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)},An.prototype.applyOperatingSystemContxt=function(e,t){this.os&&this.os.name&&(e.ext.os=this.os)},An.prototype.applyApplicationContext=function(e,t){this.application&&("string"==typeof this.application.ver&&(e.tags[yn.applicationVersion]=this.application.ver),"string"==typeof this.application.build&&(e.tags[yn.applicationBuild]=this.application.build))},An.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))},An.prototype.applyInternalContext=function(e,t){this.internal&&("string"==typeof this.internal.agentVersion&&(e.tags[yn.internalAgentVersion]=this.internal.agentVersion),"string"==typeof this.internal.sdkVersion&&(e.tags[yn.internalSdkVersion]=this.internal.sdkVersion))},An.prototype.applyLocationContext=function(e,t){this.location&&"string"==typeof this.location.ip&&(e.tags[yn.locationIp]=this.location.ip)},An.prototype.applyOperationContext=function(e,t){if(this.telemetryTrace){var n=e.ext.trace||{traceID:undefined,parentID:undefined};"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}},An.prototype.applyWebContext=function(e,t){this.web&&(e.ext.web=e.ext.web||{},e.ext.web=this.web)},An.prototype.applyUserContext=function(e,t){this.user&&(e.tags||(e.tags=[]),"string"==typeof this.user.accountId&&(e.tags[yn.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))},An.prototype.cleanUp=function(e,t){e.ext[mn.DeviceExt]&&0===U.objKeys(e.ext[mn.DeviceExt]).length&&delete e.ext[mn.DeviceExt],e.ext[mn.UserExt]&&0===U.objKeys(e.ext[mn.UserExt]).length&&delete e.ext[mn.UserExt],e.ext[mn.WebExt]&&0===U.objKeys(e.ext[mn.WebExt]).length&&delete e.ext[mn.WebExt],e.ext[mn.OSExt]&&0===U.objKeys(e.ext[mn.OSExt]).length&&delete e.ext[mn.OSExt],e.ext[mn.AppExt]&&0===U.objKeys(e.ext[mn.AppExt]).length&&delete e.ext[mn.AppExt],e.ext[mn.TraceExt]&&0===U.objKeys(e.ext[mn.TraceExt]).length&&delete e.ext[mn.TraceExt]},An);function An(e,t){p()&&(this.sessionManager=new Sn(t,e),this.application=new Nn,this.device=new Cn,this.internal=new wn(t),this.location=new En,this.user=new _n(t,e),this.telemetryTrace=new bn,this.session=new xn),this.appId=function(){return null}}var Mn,kn=(t(Un,Mn=ye),Un.getDefaultConfig=function(){return{instrumentationKey:function(){return undefined},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 undefined}}},Un.prototype.initialize=function(e,t,n,i){var r=this;Mn.prototype.initialize.call(this,e,t,n,i);var o=this._getTelCtx(),a=this.identifier,s=Un.getDefaultConfig();this._extensionConfig=this._extensionConfig||Un.getDefaultConfig();var c=function(e){u._extensionConfig[e]=function(){return o.getConfig(a,e,s[e]())}},u=this;for(var l in s)c(l);this.context=new Tn(t.logger,this._extensionConfig),this._breezeChannel=tt.getExtension(n,"AppInsightsChannelPlugin"),this.context.appId=function(){return r._breezeChannel?r._breezeChannel._appId:null}},Un.prototype.processTelemetry=function(e,t){if(!U.isNullOrUndefined(e)){if(t=this._getTelCtx(t),e.name===Xt.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 se(oe,(d()||{}).userAgent||"");t.diagLog().logInternalMessage(O.CRITICAL,n)}this.processNext(e,t)}},Un.prototype._processTelemetryInternal=function(e,t){e.tags||(e.tags=[]),e.ext||(e.ext={});var n=e.ext;n[mn.DeviceExt]=n[mn.DeviceExt]||{},n[mn.WebExt]=n[mn.WebExt]||{},n[mn.UserExt]=n[mn.UserExt]||{},n[mn.OSExt]=n[mn.OSExt]||{},n[mn.AppExt]=n[mn.AppExt]||{},n[mn.TraceExt]=n[mn.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)},Un);function Un(){var e=null!==Mn&&Mn.apply(this,arguments)||this;return e.priority=110,e.identifier="AppInsightsPropertiesPlugin",e}e.PropertiesPlugin=kn,e.TelemetryTrace=bn,e.TelemetryContext=Tn,e.Session=xn,e.SessionManager=Sn,function(e,t,n){var i=Object.defineProperty;if(i)try{return i(e,t,n)}catch(r){}typeof n.value!==undefined&&(e[t]=n.value)}(e,"__esModule",{value:!0})}); | ||
//# sourceMappingURL=applicationinsights-properties-js.min.js.map |
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT License. | ||
var Version = "2.4.1"; | ||
var Version = "2.4.2"; | ||
var Internal = /** @class */ (function () { | ||
@@ -5,0 +5,0 @@ /** |
/*! | ||
* Application Insights JavaScript SDK - Properties Plugin, 2.4.1 | ||
* Application Insights JavaScript SDK - Properties Plugin, 2.4.2 | ||
* Copyright (c) Microsoft and contributors. All rights reserved. | ||
*/ | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e.Microsoft=e.Microsoft||{},e.Microsoft.ApplicationInsights={}))}(this,function(e){"use strict";var i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function t(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?function(e){var t=Object.create;if(t)return t(e);if(null==e)return{};var n=typeof e;if("object"!=n&&"function"!=n)throw new TypeError("Object prototype may only be an Object:"+e);function i(){}return i.prototype=e,new i}(t):(n.prototype=t.prototype,new n)}var r=function(){return(r=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},n=2,o="undefined",a="object",s="window",c="location",u="JSON";function l(){return typeof globalThis!==o&&globalThis?globalThis:typeof self!==o&&self?self:typeof window!==o&&window?window:typeof global!==o&&global?global:null}function f(e){var t=l();return t&&t[e]?t[e]:e===s&&p()?window:null}function p(){return Boolean(typeof window===a&&window)}function h(){return p()?window:f(s)}function g(){return function e(){return Boolean(typeof document===a&&document)}()?document:f("document")}function d(){return function e(){return Boolean(typeof navigator===a&&navigator)}()?navigator:f("navigator")}function m(){return typeof location===a&&location?location:f(c)}function v(){return Boolean(typeof JSON===a&&JSON||null!==f(u))}function y(){return v()?JSON||f(u):null}var x=o,S="prototype",I="attachEvent",N="addEventListener",C="detachEvent",w="removeEventListener";function _(e,t){return typeof e===t}function D(e){return e===undefined||_(e,x)}function E(e){return D(e)||null===e}function b(e,t){return e&&Object[S].hasOwnProperty.call(e,t)}function T(e){return _(e,"object")}function A(e){return _(e,"function")}function M(e,t,n,i){void 0===i&&(i=!1);var r=!1;if(!E(e))try{E(e[N])?E(e[I])||(e[I]("on"+t,n),r=!0):(e[N](t,n,i),r=!0)}catch(o){}return r}function k(e,t,n,i){if(void 0===i&&(i=!1),!E(e))try{E(e[w])?E(e[C])||e[C]("on"+t,n):e[w](t,n,i)}catch(r){}}var U=(L.isDate=function(e){return"[object Date]"===Object[S].toString.call(e)},L.isString=function(e){return _(e,"string")},L.isNumber=function(e){return _(e,"number")},L.isBoolean=function(e){return _(e,"boolean")},L.disableCookies=function(){L._canUseCookies=!1},L.newGuid=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(z,function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})},L.toISOString=function(e){if(L.isDate(e)){var t=function(e){var t=String(e);return 1===t.length&&(t="0"+t),t};return e.getUTCFullYear()+"-"+t(e.getUTCMonth()+1)+"-"+t(e.getUTCDate())+"T"+t(e.getUTCHours())+":"+t(e.getUTCMinutes())+":"+t(e.getUTCSeconds())+"."+String((e.getUTCMilliseconds()/1e3).toFixed(3)).slice(2,5)+"Z"}},L.arrForEach=function(e,t,n){for(var i=e.length,r=0;r<i;++r)r in e&&t.call(n||e,e[r],r,e)},L.arrIndexOf=function(e,t,n){for(var i=e.length,r=n||0,o=Math.max(0<=r?r:i-Math.abs(r),0);o<i;o++)if(o in e&&e[o]===t)return o;return-1},L.arrMap=function(e,t,n){for(var i=e.length,r=n||e,o=new Array(i),a=0;a<i;a++)a in e&&(o[a]=t.call(r,e[a],e));return o},L.arrReduce=function(e,t,n){var i,r=e.length,o=0;if(3<=arguments.length)i=n;else{for(;o<r&&!(o in e);)o++;i=e[o++]}for(;o<r;)o in e&&(i=t(i,e[o],o,e)),o++;return i},L.objCreate=function(e){if(null==e)return{};if(!T(e)&&!A(e))throw new TypeError("Object prototype may only be an Object: "+e);function t(){}return t[S]=e,new t},L.objKeys=function(e){var t=!{toString:null}.propertyIsEnumerable("toString");if(!(A(e)||T(e)&&null!==e))throw new TypeError("objKeys called on non-object");var n=[];for(var i in e)b(e,i)&&n.push(i);if(t)for(var r=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],o=r.length,a=0;a<o;a++)b(e,r[a])&&n.push(r[a]);return n},L.objDefineAccessors=function(e,t,n,i){var r=Object.defineProperty;if(r)try{var o={enumerable:!0,configurable:!0};return n&&(o.get=n),i&&(o.set=i),r(e,t,o),!0}catch(a){}return!1},L.addEventHandler=function(e,t){var n=!1,i=h();i&&(n=M(i,e,t),n=M(i.body,e,t)||n);var r=g();return r&&(n=P.Attach(r,e,t)||n),n},L.isTypeof=_,L.isUndefined=D,L.isNullOrUndefined=E,L.hasOwnProperty=b,L.isFunction=A,L.isObject=T,L);function L(){}var O,R,z=/[xy]/g,P=(j.Attach=M,j.AttachEvent=M,j.Detach=k,j.DetachEvent=k,j);function j(){}(R=O=O||{})[R.CRITICAL=1]="CRITICAL",R[R.WARNING=2]="WARNING";var q=0,G=1,W=2,B=3,F=4,V=5,H=6,X=9,K=23,Q=27,J=49,Y=52,$=56,Z=57,ee=60,te=61,ne=66,ie=68,re=69,oe=72,ae=73,se=(ce.sanitizeDiagnosticText=function(e){return e?'"'+e.replace(/\"/g,"")+'"':""},ce.dataType="MessageData",ce.AiNonUserActionablePrefix="AI (Internal): ",ce.AiUserActionablePrefix="AI: ",ce);function ce(e,t,n,i){void 0===n&&(n=!1),this.messageId=e,this.message=(n?ce.AiUserActionablePrefix:ce.AiNonUserActionablePrefix)+e;var r="";v()&&(r=y().stringify(i));var o=(t?" message:"+ce.sanitizeDiagnosticText(t):"")+(i?" props:"+ce.sanitizeDiagnosticText(r):"");this.message+=o}var ue=(le.prototype.throwInternal=function(e,t,n,i,r){void 0===r&&(r=!1);var o=new se(t,n,r,i),a=this;if(a.enableDebugExceptions())throw o;if(!U.isUndefined(o)&&o&&!U.isUndefined(o.message)){if(r){var s=+o.messageId;!a._messageLogged[s]&&a.consoleLoggingLevel()>=O.WARNING&&(a.warnToConsole(o.message),a._messageLogged[s]=!0)}else a.consoleLoggingLevel()>=O.WARNING&&a.warnToConsole(o.message);a.logInternalMessage(e,o)}},le.prototype.warnToConsole=function(e){!U.isUndefined(console)&&console&&(U.isFunction(console.warn)?console.warn(e):U.isFunction(console.log)&&console.log(e))},le.prototype.resetInternalMessageCount=function(){this._messageCount=0,this._messageLogged={}},le.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 o="Internal events throttle limit per PageView reached for this app.",a=new se(K,o,!1);n.queue.push(a),n.warnToConsole(o)}}},le.prototype._areInternalMessagesThrottled=function(){return this._messageCount>=this.maxInternalMessageLimit()},le);function le(e){this.queue=[],this.AIInternalMessagePrefix="AITR_",this._messageCount=0,this._messageLogged={},this.enableDebugExceptions=function(){return!1},this.consoleLoggingLevel=function(){return 0},this.telemetryLoggingLevel=function(){return 1},this.maxInternalMessageLimit=function(){return 25},U.isNullOrUndefined(e)||(U.isNullOrUndefined(e.loggingLevelConsole)||(this.consoleLoggingLevel=function(){return e.loggingLevelConsole}),U.isNullOrUndefined(e.loggingLevelTelemetry)||(this.telemetryLoggingLevel=function(){return e.loggingLevelTelemetry}),U.isNullOrUndefined(e.maxMessageLimit)||(this.maxInternalMessageLimit=function(){return e.maxMessageLimit}),U.isNullOrUndefined(e.enableDebugExceptions)||(this.enableDebugExceptions=function(){return e.enableDebugExceptions}))}var fe=U.isFunction,pe=function Ln(r,o){var a=this,s=null,c=fe(r.processTelemetry),u=fe(r.setNextPlugin);a._hasRun=!1,a.getPlugin=function(){return r},a.getNext=function(){return s},a.setNext=function(e){s=e},a.processTelemetry=function(e,t){if(t=t||o,r&&c){a._hasRun=!0;try{t.setNext(s),u&&r.setNextPlugin(s),s&&(s._hasRun=!1),r.processTelemetry(e,t)}catch(i){var n=s&&s._hasRun;s&&n||t.diagLog().throwInternal(O.CRITICAL,ae,"Plugin ["+r.identifier+"] failed during processTelemetry - "+i),s&&!n&&s.processTelemetry(e,t)}}else s&&(a._hasRun=!0,s.processTelemetry(e,t))}},he=U.isNullOrUndefined;function ge(e,t){var n=[];if(e&&0<e.length)for(var i=null,r=0;r<e.length;r++){var o=e[r];if(o&&U.isFunction(o.processTelemetry)){var a=new pe(o,t);n.push(a),i&&i.setNext(a),i=a}}return 0<n.length?n[0]:null}var de=function On(e,o,n,t){var a=this,i=null;null!==t&&(e&&U.isFunction(e.getPlugin)?i=function s(e,t,n){var i=[],r=!n;if(e)for(;e;){var o=e.getPlugin();!r&&o!==n||(r=!0,i.push(o)),e=e.getNext()}return r||i.push(n),ge(i,t)}(e,a,t||e.getPlugin()):t?i=function c(e,t,n){var i=e,r=!1;return n&&e&&(i=[],U.arrForEach(e,function(e){!r&&e!==n||(r=!0,i.push(e))})),n&&!r&&(i=i||[]).push(n),ge(i,t)}(e,a,t):U.isUndefined(t)&&(i=ge(e,a))),a.core=function(){return n},a.diagLog=function(){var e=(n||{}).logger;return e=e||new ue(o||{})},a.getCfg=function(){return o},a.getExtCfg=function(e,t){var n;if(void 0===t&&(t={}),o){var i=o.extensionConfig;i&&e&&(n=i[e])}return n||t},a.getConfig=function(e,t,n){var i;void 0===n&&(n=!1);var r=a.getExtCfg(e,null);return r&&!he(r[t])?i=r[t]:o&&!he(o[t])&&(i=o[t]),he(i)?n:i},a.hasNext=function(){return null!=i},a.getNext=function(){return i},a.setNext=function(e){i=e},a.processNext=function(e){var t=i;t&&(i=t.getNext(),t.processTelemetry(e,a))},a.createNew=function(e,t){return void 0===e&&(e=null),new On(e||i,o,n,t)}},me=U.isFunction,ve="getPlugin",ye=(xe.prototype.initialize=function(e,t,n,i){this._baseTelInit(e,t,n,i)},xe);function xe(){var o=this,a=!1,s=null,c=null;o.core=null,o.diagLog=function(e){return o._getTelCtx(e).diagLog()},o.isInitialized=function(){return a},o.setInitialized=function(e){a=e},o.setNextPlugin=function(e){c=e},o.processNext=function(e,t){t?t.processNext(e):c&&me(c.processTelemetry)&&c.processTelemetry(e,null)},o._getTelCtx=function(e){void 0===e&&(e=null);var t=e;if(!t){var n=s||new de(null,{},o.core);t=c&&c[ve]?n.createNew(null,c[ve]):n.createNew(null,c)}return t},o._baseTelInit=function(e,t,n,i){e&&(e.extensionConfig=e.extensionConfig||[]),!i&&t&&(i=t.getProcessTelContext().getNext());var r=c;c&&c[ve]&&(r=c[ve]()),o.core=t,s=new de(i,e,t,r),a=!0}}var Se=U.isFunction,Ie="processTelemetry",Ne="priority",Ce="setNextPlugin",we="isInitialized";function _e(t,n){for(var e=[],i=null,r=t.getNext();r;){var o=r.getPlugin();o&&(i&&Se(i[Ce])&&Se(o[Ie])&&i[Ce](o),Se(o[we])&&o[we]()||e.push(o),i=o,r=r.getNext())}U.arrForEach(e,function(e){e.initialize(t.getCfg(),t.core(),n,t.getNext())})}function De(e){return e.sort(function(e,t){var n=0,i=Se(t[Ie]);return Se(e[Ie])?n=i?e[Ne]-t[Ne]:1:i&&(n=-1),n})}var Ee=500,be="Channel has invalid priority",Te=U.arrForEach,Ae=U.objDefineAccessors;function Me(e,t){t&&0<t.length&&(function n(e){Te(e,function(e){if(e.priority<Ee)throw Error(be+e.identifier)})}(t=t.sort(function(e,t){return e.priority-t.priority})),e.push(t))}var ke,Ue=(t(Le,ke=ye),Le.prototype.processTelemetry=function(t,n){var i=this;this._channelQueue&&Te(this._channelQueue,function(e){0<e.length&&i._getTelCtx(n).createNew(e).processNext(t)})},Le.prototype.getChannelControls=function(){return this._channelQueue},Le.prototype.initialize=function(t,n,i){if(!this.isInitialized()){ke.prototype.initialize.call(this,t,n,i),t.isCookieUseDisabled&&U.disableCookies();var e=this._channelQueue=function r(e,t){var n=[];if(e&&Te(e,function(e){return Me(n,e)}),t){var i=[];Te(t,function(e){e.priority>Ee&&i.push(e)}),Me(n,i)}return n}((t||{}).channels,i);Te(e,function(e){return _e(new de(e,t,n),i)})}},Le._staticInit=(Ae(Le.prototype,"ChannelControls",Le.prototype.getChannelControls),void Ae(Le.prototype,"channelQueue",Le.prototype.getChannelControls)),Le);function Le(){var e=null!==ke&&ke.apply(this,arguments)||this;return e.identifier="ChannelControllerPlugin",e.priority=Ee,e}var Oe=U.arrForEach,Re=U.isNullOrUndefined,ze=(Pe.prototype.initialize=function(e,t,i,n){var r=this;if(r.isInitialized())throw Error("Core should not be initialized more than once");if(!e||Re(e.instrumentationKey))throw Error("Please provide instrumentation key");r.config=e;var o=r._channelController;n=n||U.objCreate({addNotificationListener:function(e){},removeNotificationListener:function(e){},eventsSent:function(e){},eventsDiscarded:function(e,t){}}),r._notificationManager=n,e.extensions=Re(e.extensions)?[]:e.extensions,(e.extensionConfig=Re(e.extensionConfig)?{}:e.extensionConfig).NotificationManager=n,i=i||U.objCreate({throwInternal:function(e,t,n,i,r){void 0===r&&(r=!1)},warnToConsole:function(e){},resetInternalMessageCount:function(){}}),r.logger=i;var a=[];a.push.apply(a,t.concat(e.extensions)),a=De(a);var s=[],c={};if(Oe(a,function(e){if(Re(e)||Re(e.initialize))throw Error("Extensions must provide callback to initialize");var t=e.priority,n=e.identifier;e&&t&&(Re(c[t])?c[t]=n:i.warnToConsole("Two extensions have same priority #"+t+" - "+c[t]+", "+n)),(!t||t<o.priority)&&s.push(e)}),a.push(o),s.push(o),a=De(a),r._extensions=a,_e(new de([o],e,r),a),_e(new de(s,e,r),a),r._extensions=s,0===r.getTransmissionControls().length)throw new Error("No channels available");r._setInit(!0)},Pe.prototype.getTransmissionControls=function(){return this._channelController.getChannelControls()},Pe.prototype.track=function(e){var t=this;e.iKey||(e.iKey=t.config.instrumentationKey),e.time||(e.time=U.toISOString(new Date)),Re(e.ver)&&(e.ver="4.0"),t.isInitialized()?(0<t._eventQueue.length&&(Oe(t._eventQueue,function(e){t.getProcessTelContext().processNext(e)}),t._eventQueue=[]),t.getProcessTelContext().processNext(e)):t._eventQueue.push(e)},Pe.prototype.getProcessTelContext=function(){var e=this._extensions,t=e;return e&&0!==e.length||(t=[this._channelController]),new de(t,this.config,this)},Pe);function Pe(){var t=!1,e=this;e._extensions=new Array,e._channelController=new Ue,e.isInitialized=function(){return t},e._setInit=function(e){t=e},e._eventQueue=[]}var je=(qe.prototype.addNotificationListener=function(e){this.listeners.push(e)},qe.prototype.removeNotificationListener=function(e){for(var t=U.arrIndexOf(this.listeners,e);-1<t;)this.listeners.splice(t,1),t=U.arrIndexOf(this.listeners,e)},qe.prototype.eventsSent=function(t){for(var n=this,e=function(e){i.listeners[e].eventsSent&&setTimeout(function(){return n.listeners[e].eventsSent(t)},0)},i=this,r=0;r<this.listeners.length;++r)e(r)},qe.prototype.eventsDiscarded=function(t,n){for(var i=this,e=function(e){r.listeners[e].eventsDiscarded&&setTimeout(function(){return i.listeners[e].eventsDiscarded(t,n)},0)},r=this,o=0;o<this.listeners.length;++o)e(o)},qe);function qe(){this.listeners=[]}var Ge,We,Be,Fe,Ve,He,Xe;t(Ke,Ge=ze),Ke.prototype.initialize=function(e,t){var n=this;n._notificationManager=new je,n.logger=new ue(e),n.config=e,Ge.prototype.initialize.call(this,e,t,n.logger,n._notificationManager)},Ke.prototype.getTransmissionControls=function(){return Ge.prototype.getTransmissionControls.call(this)},Ke.prototype.track=function(e){if(null===e)throw this._notifyInvalidEvent(e),Error("Invalid telemetry item");this._validateTelemetryItem(e),Ge.prototype.track.call(this,e)},Ke.prototype.addNotificationListener=function(e){this._notificationManager&&this._notificationManager.addNotificationListener(e)},Ke.prototype.removeNotificationListener=function(e){this._notificationManager&&this._notificationManager.removeNotificationListener(e)},Ke.prototype.pollInternalLogs=function(i){var t=this,e=this.config.diagnosticLogInterval;return 0<e||(e=1e4),setInterval(function(){var n=t,e=n.logger?n.logger.queue:[];U.arrForEach(e,function(e){var t={name:i||"InternalMessageId: "+e.messageId,iKey:n.config.instrumentationKey,time:U.toISOString(new Date),baseType:se.dataType,baseData:{message:e.message}};n.track(t)}),e.length=0},e)},Ke.prototype._validateTelemetryItem=function(e){if(U.isNullOrUndefined(e.name))throw this._notifyInvalidEvent(e),Error("telemetry name required")},Ke.prototype._notifyInvalidEvent=function(e){this._notificationManager&&this._notificationManager.eventsDiscarded([e],n)};function Ke(){return Ge.call(this)||this}(Be=We=We||{})[Be.LocalStorage=0]="LocalStorage",Be[Be.SessionStorage=1]="SessionStorage",(Ve=Fe=Fe||{})[Ve.Default=0]="Default",Ve[Ve.Required=1]="Required",Ve[Ve.Array=2]="Array",Ve[Ve.Hidden=4]="Hidden",(Xe=He=He||{})[Xe.AI=0]="AI",Xe[Xe.AI_AND_W3C=1]="AI_AND_W3C",Xe[Xe.W3C=2]="W3C";var Qe=(Je.sanitizeKeyAndAddUniqueness=function(e,t,n){var i=t.length,r=Je.sanitizeKey(e,t);if(r.length!==i){for(var o=0,a=r;n[a]!==undefined;)o++,a=r.substring(0,Je.MAX_NAME_LENGTH-3)+Je.padNumber(o);r=a}return r},Je.sanitizeKey=function(e,t){var n;return t&&(t=Je.trim(t.toString())).length>Je.MAX_NAME_LENGTH&&(n=t.substring(0,Je.MAX_NAME_LENGTH),e.throwInternal(O.WARNING,Z,"name is too long. It has been truncated to "+Je.MAX_NAME_LENGTH+" characters.",{name:t},!0)),n||t},Je.sanitizeString=function(e,t,n){var i;return void 0===n&&(n=Je.MAX_STRING_LENGTH),t&&(n=n||Je.MAX_STRING_LENGTH,(t=Je.trim(t)).toString().length>n&&(i=t.toString().substring(0,n),e.throwInternal(O.WARNING,te,"string value is too long. It has been truncated to "+n+" characters.",{value:t},!0))),i||t},Je.sanitizeUrl=function(e,t){return Je.sanitizeInput(e,t,Je.MAX_URL_LENGTH,ne)},Je.sanitizeMessage=function(e,t){var n;return t&&t.length>Je.MAX_MESSAGE_LENGTH&&(n=t.substring(0,Je.MAX_MESSAGE_LENGTH),e.throwInternal(O.WARNING,$,"message is too long, it has been truncated to "+Je.MAX_MESSAGE_LENGTH+" characters.",{message:t},!0)),n||t},Je.sanitizeException=function(e,t){var n;return t&&t.length>Je.MAX_EXCEPTION_LENGTH&&(n=t.substring(0,Je.MAX_EXCEPTION_LENGTH),e.throwInternal(O.WARNING,Y,"exception is too long, it has been truncated to "+Je.MAX_EXCEPTION_LENGTH+" characters.",{exception:t},!0)),n||t},Je.sanitizeProperties=function(e,t){if(t){var n={};for(var i in t){var r=t[i];if(U.isObject(r)&&v())try{r=y().stringify(r)}catch(o){e.throwInternal(O.WARNING,J,"custom property is not valid",{exception:o},!0)}r=Je.sanitizeString(e,r,Je.MAX_PROPERTY_LENGTH),n[i=Je.sanitizeKeyAndAddUniqueness(e,i,n)]=r}t=n}return t},Je.sanitizeMeasurements=function(e,t){if(t){var n={};for(var i in t){var r=t[i];n[i=Je.sanitizeKeyAndAddUniqueness(e,i,n)]=r}t=n}return t},Je.sanitizeId=function(e,t){return t?Je.sanitizeInput(e,t,Je.MAX_ID_LENGTH,re).toString():t},Je.sanitizeInput=function(e,t,n,i){var r;return t&&(t=Je.trim(t)).length>n&&(r=t.substring(0,n),e.throwInternal(O.WARNING,i,"input is too long, it has been truncated to "+n+" characters.",{data:t},!0)),r||t},Je.padNumber=function(e){var t="00"+e;return t.substr(t.length-3)},Je.trim=function(e){return U.isString(e)?e.replace(/^\s+|\s+$/g,""):e},Je.MAX_NAME_LENGTH=150,Je.MAX_ID_LENGTH=128,Je.MAX_PROPERTY_LENGTH=8192,Je.MAX_STRING_LENGTH=1024,Je.MAX_URL_LENGTH=2048,Je.MAX_MESSAGE_LENGTH=32768,Je.MAX_EXCEPTION_LENGTH=32768,Je);function Je(){}var Ye="prototype",$e=d(),Ze=U.isString,et=null;var tt=(nt.createDomEvent=function(e){var t=null;if(U.isFunction(Event))t=new Event(e);else{var n=g();n&&n.createEvent&&(t=n.createEvent("Event")).initEvent(e,!0,!0)}return t},nt.disableStorage=function(){nt._canUseLocalStorage=!1,nt._canUseSessionStorage=!1},nt._getLocalStorageObject=function(){return nt.canUseLocalStorage()?nt._getVerifiedStorageObject(We.LocalStorage):null},nt._getVerifiedStorageObject=function(e){var t,n,i=null;try{if(U.isNullOrUndefined(l()))return null;n=new Date,(i=e===We.LocalStorage?f("localStorage"):f("sessionStorage")).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},nt.isInternalApplicationInsightsEndpoint=function(e){return-1!==nt._internalEndpoints.indexOf(e.toLowerCase())},nt.canUseLocalStorage=function(){return nt._canUseLocalStorage===undefined&&(nt._canUseLocalStorage=!!nt._getVerifiedStorageObject(We.LocalStorage)),nt._canUseLocalStorage},nt.getStorage=function(e,t){var n=nt._getLocalStorageObject();if(null!==n)try{return n.getItem(t)}catch(i){nt._canUseLocalStorage=!1,e.throwInternal(O.WARNING,G,"Browser failed read of local storage. "+nt.getExceptionName(i),{exception:nt.dump(i)})}return null},nt.setStorage=function(e,t,n){var i=nt._getLocalStorageObject();if(null!==i)try{return i.setItem(t,n),!0}catch(r){nt._canUseLocalStorage=!1,e.throwInternal(O.WARNING,B,"Browser failed write to local storage. "+nt.getExceptionName(r),{exception:nt.dump(r)})}return!1},nt.removeStorage=function(e,t){var n=nt._getLocalStorageObject();if(null!==n)try{return n.removeItem(t),!0}catch(i){nt._canUseLocalStorage=!1,e.throwInternal(O.WARNING,V,"Browser failed removal of local storage item. "+nt.getExceptionName(i),{exception:nt.dump(i)})}return!1},nt._getSessionStorageObject=function(){return nt.canUseSessionStorage()?nt._getVerifiedStorageObject(We.SessionStorage):null},nt.canUseSessionStorage=function(){return nt._canUseSessionStorage===undefined&&(nt._canUseSessionStorage=!!nt._getVerifiedStorageObject(We.SessionStorage)),nt._canUseSessionStorage},nt.getSessionStorageKeys=function(){var e=[];if(nt.canUseSessionStorage())for(var t in f("sessionStorage"))e.push(t);return e},nt.getSessionStorage=function(e,t){var n=nt._getSessionStorageObject();if(null!==n)try{return n.getItem(t)}catch(i){nt._canUseSessionStorage=!1,e.throwInternal(O.WARNING,W,"Browser failed read of session storage. "+nt.getExceptionName(i),{exception:nt.dump(i)})}return null},nt.setSessionStorage=function(e,t,n){var i=nt._getSessionStorageObject();if(null!==i)try{return i.setItem(t,n),!0}catch(r){nt._canUseSessionStorage=!1,e.throwInternal(O.WARNING,F,"Browser failed write to session storage. "+nt.getExceptionName(r),{exception:nt.dump(r)})}return!1},nt.removeSessionStorage=function(e,t){var n=nt._getSessionStorageObject();if(null!==n)try{return n.removeItem(t),!0}catch(i){nt._canUseSessionStorage=!1,e.throwInternal(O.WARNING,H,"Browser failed removal of session storage item. "+nt.getExceptionName(i),{exception:nt.dump(i)})}return!1},nt.disableCookies=function(){U.disableCookies()},nt.canUseCookies=function(e){if(U._canUseCookies===undefined){U._canUseCookies=!1;try{U._canUseCookies=nt.document.cookie!==undefined}catch(t){e.throwInternal(O.WARNING,ie,"Cannot access document.cookie - "+nt.getExceptionName(t),{exception:nt.dump(t)})}}return U._canUseCookies&&nt.document&&nt.document.cookie},nt.disallowsSameSiteNone=function(e){return!!Ze(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")||!function r(e,t){var n=e.length,i=n-t.length;return e.substring(0<=i?i:0,n)===t}(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"))},nt.setCookie=function(e,t,n,i){if(nt.canUseCookies(e)){var r="",o="";i&&(r=";domain="+i);var a=m();a&&"https:"===a.protocol&&(o=";secure",null===et&&(et=nt.disallowsSameSiteNone((d()||{}).userAgent)),et||(n+=";SameSite=None")),nt.document.cookie=t+"="+n+r+";path=/"+o}},nt.stringToBoolOrDefault=function(e,t){return void 0===t&&(t=!1),e===undefined||null===e?t:"true"===e.toString().toLowerCase()},nt.getCookie=function(e,t){if(nt.canUseCookies(e)){var n="";if(t&&t.length)for(var i=t+"=",r=nt.document.cookie.split(";"),o=0;o<r.length;o++){var a=r[o];if((a=nt.trim(a))&&0===a.indexOf(i)){n=a.substring(i.length,r[o].length);break}}return n}},nt.deleteCookie=function(e,t){nt.canUseCookies(e)&&(nt.document.cookie=t+"=;path=/;expires=Thu, 01 Jan 1970 00:00:01 GMT;")},nt.trim=function(e){return Ze(e)?e.replace(/^\s+|\s+$/g,""):e},nt.newId=function(){for(var e="",t=1073741824*Math.random();0<t;)e+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(t%64),t=Math.floor(t/64);return e},nt.random32=function(){return 4294967296*Math.random()|0},nt.generateW3CId=function(){for(var e,t=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"],n="",i=0;i<4;i++)n+=t[15&(e=nt.random32())]+t[e>>4&15]+t[e>>8&15]+t[e>>12&15]+t[e>>16&15]+t[e>>20&15]+t[e>>24&15]+t[e>>28&15];var r=t[8+4*Math.random()|0];return n.substr(0,8)+n.substr(9,4)+"4"+n.substr(13,3)+r+n.substr(16,3)+n.substr(19,12)},nt.isArray=function(e){return"[object Array]"===Object[Ye].toString.call(e)},nt.isError=function(e){return"[object Error]"===Object[Ye].toString.call(e)},nt.getIEVersion=function(e){void 0===e&&(e=null);var t=e?e.toLowerCase():$e?($e.userAgent||"").toLowerCase():"";return-1!==t.indexOf("msie")?parseInt(t.split("msie")[1]):null},nt.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,(0<o?o+".":"")+(r=r.length<2?"0"+r:r)+":"+i+":"+n+"."+t},nt.isCrossOriginError=function(e,t,n,i,r){return("Script error."===e||"Script error"===e)&&!r},nt.dump=function(e){var t=Object[Ye].toString.call(e),n="";return"[object Error]"===t?n="{ stack: '"+e.stack+"', message: '"+e.message+"', name: '"+e.name+"'":v()&&(n=y().stringify(e)),t+n},nt.getExceptionName=function(e){return"[object Error]"===Object[Ye].toString.call(e)?e.name:""},nt.addEventHandler=function(e,t){return P.Attach(h(),e,t)},nt.IsBeaconApiSupported=function(){return"sendBeacon"in $e&&$e.sendBeacon},nt.getExtension=function(e,t){for(var n=null,i=0;!n&&i<e.length;)e[i]&&e[i].identifier===t&&(n=e[i]),i++;return n},nt.document=g()||{},nt._canUseLocalStorage=undefined,nt._canUseSessionStorage=undefined,nt._internalEndpoints=["https://dc.services.visualstudio.com/v2/track","https://breeze.aimon.applicationinsights.io/v2/track","https://dc-int.services.visualstudio.com/v2/track"],nt.NotSpecified="not_specified",nt.isDate=U.isDate,nt.toISOStringForIE8=U.toISOString,nt);function nt(){}var it=(rt.parseUrl=function(e){return rt.htmlAnchorElement||(rt.htmlAnchorElement=rt.document.createElement?rt.document.createElement("a"):{host:rt.parseHost(e)}),rt.htmlAnchorElement.href=e,rt.htmlAnchorElement},rt.getAbsoluteUrl=function(e){var t,n=rt.parseUrl(e);return n&&(t=n.href),t},rt.getPathName=function(e){var t,n=rt.parseUrl(e);return n&&(t=n.pathname),t},rt.getCompleteUrl=function(e,t){return e?e.toUpperCase()+" "+t:t},rt.parseHost=function(e){if(e){var t=e.match(/:\/\/(www[0-9]?\.)?(.[^/:]+)/i);if(null!=t&&2<t.length&&Ze(t[2])&&0<t[2].length)return t[2]}return null},rt.document=g()||{},rt);function rt(){}var ot=(at.ParseDependencyPath=function(e,t,n,i){var r,o=i,a=i;if(t&&0<t.length){var s=it.parseUrl(t);if(r=s.host,!o)if(null!=s.pathname){var c=0===s.pathname.length?"/":s.pathname;"/"!==c.charAt(0)&&(c="/"+c),a=s.pathname,o=Qe.sanitizeString(e,n?n+" "+c:c)}else o=Qe.sanitizeString(e,t)}else o=r=i;return{target:r,name:o,data:a}},at);function at(){}var st=(ct.Now=function(){var e=function t(){return f("performance")}();return e&&e.now&&e.timing?e.now()+e.timing.navigationStart:(new Date).getTime()},ct.GetDuration=function(e,t){var n=null;return 0===e||0===t||U.isNullOrUndefined(e)||U.isNullOrUndefined(t)||(n=t-e),n},ct);function ct(){}var ut,lt=(t(ft,ut=function Rn(){}),ft);function ft(){return ut.call(this)||this}var pt;t(ht,pt=function zn(){this.ver=1,this.sampleRate=100,this.tags={}});function ht(e,t,n){var i=pt.call(this)||this;return i.name=Qe.sanitizeString(e,n)||tt.NotSpecified,i.data=t,i.time=U.toISOString(new Date),i.aiDataContract={time:Fe.Required,iKey:Fe.Required,name:Fe.Required,sampleRate:function(){return 100===i.sampleRate?Fe.Hidden:Fe.Required},tags:Fe.Required,data:Fe.Required},i}var gt,dt=function Pn(){},mt=(t(vt,gt=dt),vt);function vt(){var e=gt.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}var yt;t(xt,yt=mt),xt.envelopeType="Microsoft.ApplicationInsights.{0}.Event",xt.dataType="EventData";function xt(e,t,n,i){var r=yt.call(this)||this;return r.aiDataContract={ver:Fe.Required,name:Fe.Required,properties:Fe.Default,measurements:Fe.Default},r.name=Qe.sanitizeString(e,t)||tt.NotSpecified,r.properties=Qe.sanitizeProperties(e,n),r.measurements=Qe.sanitizeMeasurements(e,i),r}var St,It=function jn(){},Nt=(t(Ct,St=dt),Ct);function Ct(){var e=St.call(this)||this;return e.ver=2,e.exceptions=[],e.properties={},e.measurements={},e}var wt,_t=function qn(){this.hasFullStack=!0,this.parsedStack=[]};t(Dt,wt=Nt),Dt.CreateFromInterface=function(t,e){var n=e.exceptions&&U.arrMap(e.exceptions,function(e){return bt.CreateFromInterface(t,e)});return new Dt(t,r({},e,{exceptions:n}))},Dt.prototype.toInterface=function(){var e=this,t=e.exceptions,n=e.properties,i=e.measurements,r=e.severityLevel,o=(e.ver,e.problemGroup),a=e.id,s=e.isManual;return{ver:"4.0",exceptions:t instanceof Array&&U.arrMap(t,function(e){return e.toInterface()})||undefined,severityLevel:r,properties:n,measurements:i,problemGroup:o,id:a,isManual:s}},Dt.CreateSimpleException=function(e,t,n,i,r,o){return{exceptions:[{hasFullStack:!0,message:e,stack:r,typeName:t}]}},Dt.envelopeType="Microsoft.ApplicationInsights.{0}.Exception",Dt.dataType="ExceptionData";function Dt(e,t,n,i,r,o){var a=wt.call(this)||this;return a.aiDataContract={ver:Fe.Required,exceptions:Fe.Required,severityLevel:Fe.Default,properties:Fe.Default,measurements:Fe.Default},t instanceof Error?(a.exceptions=[new bt(e,t)],a.properties=Qe.sanitizeProperties(e,n),a.measurements=Qe.sanitizeMeasurements(e,i),r&&(a.severityLevel=r),o&&(a.id=o)):(a.exceptions=t.exceptions,a.properties=t.properties,a.measurements=t.measurements,t.severityLevel&&(a.severityLevel=t.severityLevel),t.id&&(a.id=t.id),t.problemGroup&&(a.problemGroup=t.problemGroup),a.ver=2,U.isNullOrUndefined(t.isManual)||(a.isManual=t.isManual)),a}var Et,bt=(t(Tt,Et=_t),Tt.prototype.toInterface=function(){var e=this.parsedStack instanceof Array&&U.arrMap(this.parsedStack,function(e){return e.toInterface()});return{id:this.id,outerId:this.outerId,typeName:this.typeName,message:this.message,hasFullStack:this.hasFullStack,stack:this.stack,parsedStack:e||undefined}},Tt.CreateFromInterface=function(e,t){var n=t.parsedStack instanceof Array&&U.arrMap(t.parsedStack,function(e){return Mt.CreateFromInterface(e)})||t.parsedStack;return new Tt(e,r({},t,{parsedStack:n}))},Tt.parseStack=function(e){var t;if(U.isString(e)){var n=e.split("\n");t=[];for(var i=0,r=0,o=0;o<=n.length;o++){var a=n[o];if(Mt.regex.test(a)){var s=new Mt(n[o],i++);r+=s.sizeInBytes,t.push(s)}}if(32768<r)for(var c=0,u=t.length-1,l=0,f=c,p=u;c<u;){if(32768<(l+=t[c].sizeInBytes+t[u].sizeInBytes)){var h=p-f+1;t.splice(f,h);break}f=c,p=u,c++,u--}}return t},Tt);function Tt(e,t){var n=Et.call(this)||this;if(n.aiDataContract={id:Fe.Default,outerId:Fe.Default,typeName:Fe.Required,message:Fe.Required,hasFullStack:Fe.Default,stack:Fe.Default,parsedStack:Fe.Array},t instanceof Error){n.typeName=Qe.sanitizeString(e,t.name)||tt.NotSpecified,n.message=Qe.sanitizeMessage(e,t.message)||tt.NotSpecified;var i=t.stack;n.parsedStack=Tt.parseStack(i),n.stack=Qe.sanitizeException(e,i),n.hasFullStack=tt.isArray(n.parsedStack)&&0<n.parsedStack.length}else n.typeName=t.typeName,n.message=t.message,n.stack=t.stack,n.parsedStack=t.parsedStack,n.hasFullStack=t.hasFullStack;return n}var At,Mt=(t(kt,At=It),kt.CreateFromInterface=function(e){return new kt(e,null)},kt.prototype.toInterface=function(){return{level:this.level,method:this.method,assembly:this.assembly,fileName:this.fileName,line:this.line}},kt.regex=/^([\s]+at)?(.*?)(\@|\s\(|\s)([^\(\@\n]+):([0-9]+):([0-9]+)(\)?)$/,kt.baseSize=58,kt);function kt(e,t){var n=At.call(this)||this;if(n.sizeInBytes=0,n.aiDataContract={level:Fe.Required,method:Fe.Required,assembly:Fe.Default,fileName:Fe.Default,line:Fe.Default},"string"==typeof e){var i=e;n.level=t,n.method="<no_method>",n.assembly=tt.trim(i),n.fileName="",n.line=0;var r=i.match(kt.regex);r&&5<=r.length&&(n.method=tt.trim(r[2])||n.method,n.fileName=tt.trim(r[4]),n.line=parseInt(r[5])||0)}else n.level=e.level,n.method=e.method,n.assembly=e.assembly,n.fileName=e.fileName,n.line=e.line,n.sizeInBytes=0;return n.sizeInBytes+=n.method.length,n.sizeInBytes+=n.fileName.length,n.sizeInBytes+=n.assembly.length,n.sizeInBytes+=kt.baseSize,n.sizeInBytes+=n.level.toString().length,n.sizeInBytes+=n.line.toString().length,n}var Ut,Lt,Ot,Rt=(t(zt,Ut=dt),zt);function zt(){var e=Ut.call(this)||this;return e.ver=2,e.metrics=[],e.properties={},e.measurements={},e}(Ot=Lt=Lt||{})[Ot.Measurement=0]="Measurement",Ot[Ot.Aggregation=1]="Aggregation";var Pt,jt=(t(qt,Pt=function Gn(){this.kind=Lt.Measurement}),qt);function qt(){var e=null!==Pt&&Pt.apply(this,arguments)||this;return e.aiDataContract={name:Fe.Required,kind:Fe.Default,value:Fe.Required,count:Fe.Default,min:Fe.Default,max:Fe.Default,stdDev:Fe.Default},e}var Gt;t(Wt,Gt=Rt),Wt.envelopeType="Microsoft.ApplicationInsights.{0}.Metric",Wt.dataType="MetricData";function Wt(e,t,n,i,r,o,a,s){var c=Gt.call(this)||this;c.aiDataContract={ver:Fe.Required,metrics:Fe.Required,properties:Fe.Default};var u=new jt;return u.count=0<i?i:undefined,u.max=isNaN(o)||null===o?undefined:o,u.min=isNaN(r)||null===r?undefined:r,u.name=Qe.sanitizeString(e,t)||tt.NotSpecified,u.value=n,c.metrics=[u],c.properties=Qe.sanitizeProperties(e,a),c.measurements=Qe.sanitizeMeasurements(e,s),c}var Bt,Ft=(t(Vt,Bt=mt),Vt);function Vt(){var e=Bt.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}var Ht,Xt=(t(Kt,Ht=Ft),Kt.envelopeType="Microsoft.ApplicationInsights.{0}.Pageview",Kt.dataType="PageviewData",Kt);function Kt(e,t,n,i,r,o,a){var s=Ht.call(this)||this;return s.aiDataContract={ver:Fe.Required,name:Fe.Default,url:Fe.Default,duration:Fe.Default,properties:Fe.Default,measurements:Fe.Default,id:Fe.Default},s.id=Qe.sanitizeId(e,a),s.url=Qe.sanitizeUrl(e,n),s.name=Qe.sanitizeString(e,t)||tt.NotSpecified,isNaN(i)||(s.duration=tt.msToTimeSpan(i)),s.properties=Qe.sanitizeProperties(e,r),s.measurements=Qe.sanitizeMeasurements(e,o),s}var Qt,Jt=(t(Yt,Qt=dt),Yt);function Yt(){var e=Qt.call(this)||this;return e.ver=2,e.success=!0,e.properties={},e.measurements={},e}var $t;t(Zt,$t=Jt),Zt.envelopeType="Microsoft.ApplicationInsights.{0}.RemoteDependency",Zt.dataType="RemoteDependencyData";function Zt(e,t,n,i,r,o,a,s,c,u,l,f){void 0===c&&(c="Ajax");var p=$t.call(this)||this;p.aiDataContract={id:Fe.Required,ver:Fe.Required,name:Fe.Default,resultCode:Fe.Default,duration:Fe.Default,success:Fe.Default,data:Fe.Default,target:Fe.Default,type:Fe.Default,properties:Fe.Default,measurements:Fe.Default,kind:Fe.Default,value:Fe.Default,count:Fe.Default,min:Fe.Default,max:Fe.Default,stdDev:Fe.Default,dependencyKind:Fe.Default,dependencySource:Fe.Default,commandName:Fe.Default,dependencyTypeName:Fe.Default},p.id=t,p.duration=tt.msToTimeSpan(r),p.success=o,p.resultCode=a+"",p.type=Qe.sanitizeString(e,c);var h=ot.ParseDependencyPath(e,n,s,i);return p.data=Qe.sanitizeUrl(e,i)||h.data,p.target=Qe.sanitizeString(e,h.target),u&&(p.target=p.target+" | "+u),p.name=Qe.sanitizeString(e,h.name),p.properties=Qe.sanitizeProperties(e,l),p.measurements=Qe.sanitizeMeasurements(e,f),p}var en,tn=(t(nn,en=dt),nn);function nn(){var e=en.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}var rn;t(on,rn=tn),on.envelopeType="Microsoft.ApplicationInsights.{0}.Message",on.dataType="MessageData";function on(e,t,n,i,r){var o=rn.call(this)||this;return o.aiDataContract={ver:Fe.Required,message:Fe.Required,severityLevel:Fe.Default,properties:Fe.Default},t=t||tt.NotSpecified,o.message=Qe.sanitizeMessage(e,t),o.properties=Qe.sanitizeProperties(e,i),o.measurements=Qe.sanitizeMeasurements(e,r),n&&(o.severityLevel=n),o}var an,sn=(t(cn,an=Ft),cn);function cn(){var e=an.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}var un;t(ln,un=sn),ln.envelopeType="Microsoft.ApplicationInsights.{0}.PageviewPerformance",ln.dataType="PageviewPerformanceData";function ln(e,t,n,i,r,o,a){var s=un.call(this)||this;return s.aiDataContract={ver:Fe.Required,name:Fe.Default,url:Fe.Default,duration:Fe.Default,perfTotal:Fe.Default,networkConnect:Fe.Default,sentRequest:Fe.Default,receivedResponse:Fe.Default,domProcessing:Fe.Default,properties:Fe.Default,measurements:Fe.Default},s.url=Qe.sanitizeUrl(e,n),s.name=Qe.sanitizeString(e,t)||tt.NotSpecified,s.properties=Qe.sanitizeProperties(e,r),s.measurements=Qe.sanitizeMeasurements(e,o),a&&(s.domProcessing=a.domProcessing,s.duration=a.duration,s.networkConnect=a.networkConnect,s.perfTotal=a.perfTotal,s.receivedResponse=a.receivedResponse,s.sentRequest=a.sentRequest),s}var fn,pn,hn;t(gn,fn=lt);function gn(e,t){var n=fn.call(this)||this;return n.aiDataContract={baseType:Fe.Required,baseData:Fe.Required},n.baseType=e,n.baseData=t,n}(hn=pn=pn||{})[hn.Verbose=0]="Verbose",hn[hn.Information=1]="Information",hn[hn.Warning=2]="Warning",hn[hn.Error=3]="Error",hn[hn.Critical=4]="Critical";var dn=function Wn(){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"},mn=(vn.UserExt="user",vn.DeviceExt="device",vn.TraceExt="trace",vn.WebExt="web",vn.AppExt="app",vn.OSExt="os",vn.SessionExt="ses",vn.SDKExt="sdk",vn);function vn(){}var yn=new dn,xn=function Bn(){},Sn=(In.prototype.update=function(){this.automaticSession.id||this.initializeAutomaticSession();var e=st.Now(),t=0!==this.config.sessionExpirationMs()&&e-this.automaticSession.acquisitionDate>this.config.sessionExpirationMs(),n=0!==this.config.sessionExpirationMs()&&e-this.automaticSession.renewalDate>this.config.sessionRenewalMs();t||n?this.renew():(!this.cookieUpdatedTimestamp||e-this.cookieUpdatedTimestamp>In.cookieUpdateInterval)&&(this.automaticSession.renewalDate=e,this.setCookie(this.automaticSession.id,this.automaticSession.acquisitionDate,this.automaticSession.renewalDate))},In.prototype.backup=function(){this.setStorage(this.automaticSession.id,this.automaticSession.acquisitionDate,this.automaticSession.renewalDate)},In.prototype.initializeAutomaticSession=function(){var e=tt.getCookie(this._logger,this._storageNamePrefix());if(e&&"function"==typeof e.split)this.initializeAutomaticSessionWithData(e);else{var t=tt.getStorage(this._logger,this._storageNamePrefix());t&&this.initializeAutomaticSessionWithData(t)}this.automaticSession.id||this.renew()},In.prototype.initializeAutomaticSessionWithData=function(e){var t=e.split("|");0<t.length&&(this.automaticSession.id=t[0]);try{if(1<t.length){var n=+t[1];this.automaticSession.acquisitionDate=+new Date(n),this.automaticSession.acquisitionDate=0<this.automaticSession.acquisitionDate?this.automaticSession.acquisitionDate:0}if(2<t.length){var i=+t[2];this.automaticSession.renewalDate=+new Date(i),this.automaticSession.renewalDate=0<this.automaticSession.renewalDate?this.automaticSession.renewalDate:0}}catch(r){this._logger.throwInternal(O.CRITICAL,X,"Error parsing ai_session cookie, session will be reset: "+tt.getExceptionName(r),{exception:tt.dump(r)})}0===this.automaticSession.renewalDate&&this._logger.throwInternal(O.WARNING,Q,"AI session renewal date is 0, session will be reset.")},In.prototype.renew=function(){var e=st.Now();this.automaticSession.id=tt.newId(),this.automaticSession.acquisitionDate=e,this.automaticSession.renewalDate=e,this.setCookie(this.automaticSession.id,this.automaticSession.acquisitionDate,this.automaticSession.renewalDate),tt.canUseLocalStorage()||this._logger.throwInternal(O.WARNING,q,"Browser does not support local storage. Session durations will be inaccurate.")},In.prototype.setCookie=function(e,t,n){var i=t+this.config.sessionExpirationMs(),r=n+this.config.sessionRenewalMs(),o=new Date,a=[e,t,n];i<r?o.setTime(i):o.setTime(r);var s=this.config.cookieDomain?this.config.cookieDomain():null,c=0===this.config.sessionExpirationMs()?"0":o.toUTCString();tt.setCookie(this._logger,this._storageNamePrefix(),a.join("|")+";expires="+c,s),this.cookieUpdatedTimestamp=st.Now()},In.prototype.setStorage=function(e,t,n){tt.setStorage(this._logger,this._storageNamePrefix(),[e,t,n].join("|"))},In.acquisitionSpan=864e5,In.renewalSpan=18e5,In.cookieUpdateInterval=6e4,In.cookieNameConst="ai_session",In);function In(e,t){var n=this;U.isNullOrUndefined(t)?this._logger=new ue:this._logger=t,"function"!=typeof(e=e||{}).sessionExpirationMs&&(e.sessionExpirationMs=function(){return In.acquisitionSpan}),"function"!=typeof e.sessionRenewalMs&&(e.sessionRenewalMs=function(){return In.renewalSpan}),this.config=e,this._storageNamePrefix=function(){return n.config.namePrefix&&n.config.namePrefix()?In.cookieNameConst+n.config.namePrefix():In.cookieNameConst},this.automaticSession=new xn}var Nn=function Fn(){},Cn=function Vn(){this.id="browser",this.deviceClass="Browser"},wn=function Hn(e){this.sdkVersion=(e.sdkExtension&&e.sdkExtension()?e.sdkExtension()+"_":"")+"javascript:2.4.1"},_n=(Dn.prototype.setAuthenticatedUserContext=function(e,t,n){if(void 0===n&&(n=!1),!this.validateUserInput(e)||t&&!this.validateUserInput(t))this._logger.throwInternal(O.WARNING,ee,"Setting auth user context failed. User auth/account id should be of type string, and not contain commas, semi-colons, equal signs, spaces, or vertical-bars.",!0);else{this.authenticatedId=e;var i=this.authenticatedId;t&&(this.accountId=t,i=[this.authenticatedId,this.accountId].join(Dn.cookieSeparator)),n&&tt.setCookie(this._logger,Dn.authUserCookieName,encodeURI(i),this.config.cookieDomain())}},Dn.prototype.clearAuthenticatedUserContext=function(){this.authenticatedId=null,this.accountId=null,tt.deleteCookie(this._logger,Dn.authUserCookieName)},Dn.prototype.validateUserInput=function(e){return!("string"!=typeof e||!e||e.match(/,|;|=| |\|/))},Dn.cookieSeparator="|",Dn.userCookieName="ai_user",Dn.authUserCookieName="ai_authUser",Dn);function Dn(e,t){this.isNewUser=!1,this._logger=t;var n=tt.getCookie(this._logger,Dn.userCookieName);if(n){this.isNewUser=!1;var i=n.split(Dn.cookieSeparator);0<i.length&&(this.id=i[0])}if(this.config=e,!this.id){this.id=tt.newId();var r=new Date,o=U.toISOString(r);this.accountAcquisitionDate=o,this.isNewUser=!0,r.setTime(r.getTime()+31536e6);var a=[this.id,o],s=this.config.cookieDomain?this.config.cookieDomain():undefined;tt.setCookie(this._logger,Dn.userCookieName,a.join(Dn.cookieSeparator)+";expires="+r.toUTCString(),s);var c=e.namePrefix&&e.namePrefix()?e.namePrefix()+"ai_session":"ai_session";tt.removeStorage(this._logger,c)}this.accountId=e.accountId?e.accountId():undefined;var u=tt.getCookie(this._logger,Dn.authUserCookieName);if(u){var l=(u=decodeURI(u)).split(Dn.cookieSeparator);l[0]&&(this.authenticatedId=l[0]),1<l.length&&l[1]&&(this.accountId=l[1])}}var En=function Xn(){},bn=function Kn(e,t,n){this.traceID=e||tt.generateW3CId(),this.parentID=t,this.name=n;var i=m();!n&&i&&i.pathname&&(this.name=i.pathname)},Tn=(An.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)},An.prototype.applyOperatingSystemContxt=function(e,t){this.os&&this.os.name&&(e.ext.os=this.os)},An.prototype.applyApplicationContext=function(e,t){this.application&&("string"==typeof this.application.ver&&(e.tags[yn.applicationVersion]=this.application.ver),"string"==typeof this.application.build&&(e.tags[yn.applicationBuild]=this.application.build))},An.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))},An.prototype.applyInternalContext=function(e,t){this.internal&&("string"==typeof this.internal.agentVersion&&(e.tags[yn.internalAgentVersion]=this.internal.agentVersion),"string"==typeof this.internal.sdkVersion&&(e.tags[yn.internalSdkVersion]=this.internal.sdkVersion))},An.prototype.applyLocationContext=function(e,t){this.location&&"string"==typeof this.location.ip&&(e.tags[yn.locationIp]=this.location.ip)},An.prototype.applyOperationContext=function(e,t){if(this.telemetryTrace){var n=e.ext.trace||{traceID:undefined,parentID:undefined};"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}},An.prototype.applyWebContext=function(e,t){this.web&&(e.ext.web=e.ext.web||{},e.ext.web=this.web)},An.prototype.applyUserContext=function(e,t){this.user&&(e.tags||(e.tags=[]),"string"==typeof this.user.accountId&&(e.tags[yn.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))},An.prototype.cleanUp=function(e,t){e.ext[mn.DeviceExt]&&0===U.objKeys(e.ext[mn.DeviceExt]).length&&delete e.ext[mn.DeviceExt],e.ext[mn.UserExt]&&0===U.objKeys(e.ext[mn.UserExt]).length&&delete e.ext[mn.UserExt],e.ext[mn.WebExt]&&0===U.objKeys(e.ext[mn.WebExt]).length&&delete e.ext[mn.WebExt],e.ext[mn.OSExt]&&0===U.objKeys(e.ext[mn.OSExt]).length&&delete e.ext[mn.OSExt],e.ext[mn.AppExt]&&0===U.objKeys(e.ext[mn.AppExt]).length&&delete e.ext[mn.AppExt],e.ext[mn.TraceExt]&&0===U.objKeys(e.ext[mn.TraceExt]).length&&delete e.ext[mn.TraceExt]},An);function An(e,t){p()&&(this.sessionManager=new Sn(t,e),this.application=new Nn,this.device=new Cn,this.internal=new wn(t),this.location=new En,this.user=new _n(t,e),this.telemetryTrace=new bn,this.session=new xn),this.appId=function(){return null}}var Mn,kn=(t(Un,Mn=ye),Un.getDefaultConfig=function(){return{instrumentationKey:function(){return undefined},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 undefined}}},Un.prototype.initialize=function(e,t,n,i){var r=this;Mn.prototype.initialize.call(this,e,t,n,i);var o=this._getTelCtx(),a=this.identifier,s=Un.getDefaultConfig();this._extensionConfig=this._extensionConfig||Un.getDefaultConfig();var c=function(e){u._extensionConfig[e]=function(){return o.getConfig(a,e,s[e]())}},u=this;for(var l in s)c(l);this.context=new Tn(t.logger,this._extensionConfig),this._breezeChannel=tt.getExtension(n,"AppInsightsChannelPlugin"),this.context.appId=function(){return r._breezeChannel?r._breezeChannel._appId:null}},Un.prototype.processTelemetry=function(e,t){if(!U.isNullOrUndefined(e)){if(t=this._getTelCtx(t),e.name===Xt.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 se(oe,(d()||{}).userAgent||"");t.diagLog().logInternalMessage(O.CRITICAL,n)}this.processNext(e,t)}},Un.prototype._processTelemetryInternal=function(e,t){e.tags||(e.tags=[]),e.ext||(e.ext={});var n=e.ext;n[mn.DeviceExt]=n[mn.DeviceExt]||{},n[mn.WebExt]=n[mn.WebExt]||{},n[mn.UserExt]=n[mn.UserExt]||{},n[mn.OSExt]=n[mn.OSExt]||{},n[mn.AppExt]=n[mn.AppExt]||{},n[mn.TraceExt]=n[mn.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)},Un);function Un(){var e=null!==Mn&&Mn.apply(this,arguments)||this;return e.priority=110,e.identifier="AppInsightsPropertiesPlugin",e}e.PropertiesPlugin=kn,e.TelemetryTrace=bn,e.TelemetryContext=Tn,e.Session=xn,e.SessionManager=Sn,function(e,t,n){var i=Object.defineProperty;if(i)try{return i(e,t,n)}catch(r){}typeof n.value!==undefined&&(e[t]=n.value)}(e,"__esModule",{value:!0})}); | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e.Microsoft=e.Microsoft||{},e.Microsoft.ApplicationInsights={}))}(this,function(e){"use strict";var i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function t(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?function(e){var t=Object.create;if(t)return t(e);if(null==e)return{};var n=typeof e;if("object"!=n&&"function"!=n)throw new TypeError("Object prototype may only be an Object:"+e);function i(){}return i.prototype=e,new i}(t):(n.prototype=t.prototype,new n)}var r=function(){return(r=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},n=2,o="undefined",a="object",s="window",c="location",u="JSON";function l(){return typeof globalThis!==o&&globalThis?globalThis:typeof self!==o&&self?self:typeof window!==o&&window?window:typeof global!==o&&global?global:null}function f(e){var t=l();return t&&t[e]?t[e]:e===s&&p()?window:null}function p(){return Boolean(typeof window===a&&window)}function h(){return p()?window:f(s)}function g(){return function e(){return Boolean(typeof document===a&&document)}()?document:f("document")}function d(){return function e(){return Boolean(typeof navigator===a&&navigator)}()?navigator:f("navigator")}function m(){return typeof location===a&&location?location:f(c)}function v(){return Boolean(typeof JSON===a&&JSON||null!==f(u))}function y(){return v()?JSON||f(u):null}var x=o,S="prototype",I="attachEvent",N="addEventListener",C="detachEvent",w="removeEventListener";function _(e,t){return typeof e===t}function D(e){return e===undefined||_(e,x)}function E(e){return D(e)||null===e}function b(e,t){return e&&Object[S].hasOwnProperty.call(e,t)}function T(e){return _(e,"object")}function A(e){return _(e,"function")}function M(e,t,n,i){void 0===i&&(i=!1);var r=!1;if(!E(e))try{E(e[N])?E(e[I])||(e[I]("on"+t,n),r=!0):(e[N](t,n,i),r=!0)}catch(o){}return r}function k(e,t,n,i){if(void 0===i&&(i=!1),!E(e))try{E(e[w])?E(e[C])||e[C]("on"+t,n):e[w](t,n,i)}catch(r){}}var U=(L.isDate=function(e){return"[object Date]"===Object[S].toString.call(e)},L.isString=function(e){return _(e,"string")},L.isNumber=function(e){return _(e,"number")},L.isBoolean=function(e){return _(e,"boolean")},L.disableCookies=function(){L._canUseCookies=!1},L.newGuid=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(z,function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})},L.toISOString=function(e){if(L.isDate(e)){var t=function(e){var t=String(e);return 1===t.length&&(t="0"+t),t};return e.getUTCFullYear()+"-"+t(e.getUTCMonth()+1)+"-"+t(e.getUTCDate())+"T"+t(e.getUTCHours())+":"+t(e.getUTCMinutes())+":"+t(e.getUTCSeconds())+"."+String((e.getUTCMilliseconds()/1e3).toFixed(3)).slice(2,5)+"Z"}},L.arrForEach=function(e,t,n){for(var i=e.length,r=0;r<i;++r)r in e&&t.call(n||e,e[r],r,e)},L.arrIndexOf=function(e,t,n){for(var i=e.length,r=n||0,o=Math.max(0<=r?r:i-Math.abs(r),0);o<i;o++)if(o in e&&e[o]===t)return o;return-1},L.arrMap=function(e,t,n){for(var i=e.length,r=n||e,o=new Array(i),a=0;a<i;a++)a in e&&(o[a]=t.call(r,e[a],e));return o},L.arrReduce=function(e,t,n){var i,r=e.length,o=0;if(3<=arguments.length)i=n;else{for(;o<r&&!(o in e);)o++;i=e[o++]}for(;o<r;)o in e&&(i=t(i,e[o],o,e)),o++;return i},L.objCreate=function(e){if(null==e)return{};if(!T(e)&&!A(e))throw new TypeError("Object prototype may only be an Object: "+e);function t(){}return t[S]=e,new t},L.objKeys=function(e){var t=!{toString:null}.propertyIsEnumerable("toString");if(!(A(e)||T(e)&&null!==e))throw new TypeError("objKeys called on non-object");var n=[];for(var i in e)b(e,i)&&n.push(i);if(t)for(var r=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],o=r.length,a=0;a<o;a++)b(e,r[a])&&n.push(r[a]);return n},L.objDefineAccessors=function(e,t,n,i){var r=Object.defineProperty;if(r)try{var o={enumerable:!0,configurable:!0};return n&&(o.get=n),i&&(o.set=i),r(e,t,o),!0}catch(a){}return!1},L.addEventHandler=function(e,t){var n=!1,i=h();i&&(n=M(i,e,t),n=M(i.body,e,t)||n);var r=g();return r&&(n=P.Attach(r,e,t)||n),n},L.isTypeof=_,L.isUndefined=D,L.isNullOrUndefined=E,L.hasOwnProperty=b,L.isFunction=A,L.isObject=T,L);function L(){}var O,R,z=/[xy]/g,P=(j.Attach=M,j.AttachEvent=M,j.Detach=k,j.DetachEvent=k,j);function j(){}(R=O=O||{})[R.CRITICAL=1]="CRITICAL",R[R.WARNING=2]="WARNING";var q=0,G=1,W=2,B=3,F=4,V=5,H=6,X=9,K=23,Q=27,J=49,Y=52,$=56,Z=57,ee=60,te=61,ne=66,ie=68,re=69,oe=72,ae=73,se=(ce.sanitizeDiagnosticText=function(e){return e?'"'+e.replace(/\"/g,"")+'"':""},ce.dataType="MessageData",ce.AiNonUserActionablePrefix="AI (Internal): ",ce.AiUserActionablePrefix="AI: ",ce);function ce(e,t,n,i){void 0===n&&(n=!1),this.messageId=e,this.message=(n?ce.AiUserActionablePrefix:ce.AiNonUserActionablePrefix)+e;var r="";v()&&(r=y().stringify(i));var o=(t?" message:"+ce.sanitizeDiagnosticText(t):"")+(i?" props:"+ce.sanitizeDiagnosticText(r):"");this.message+=o}var ue=(le.prototype.throwInternal=function(e,t,n,i,r){void 0===r&&(r=!1);var o=new se(t,n,r,i),a=this;if(a.enableDebugExceptions())throw o;if(!U.isUndefined(o)&&o&&!U.isUndefined(o.message)){if(r){var s=+o.messageId;!a._messageLogged[s]&&a.consoleLoggingLevel()>=O.WARNING&&(a.warnToConsole(o.message),a._messageLogged[s]=!0)}else a.consoleLoggingLevel()>=O.WARNING&&a.warnToConsole(o.message);a.logInternalMessage(e,o)}},le.prototype.warnToConsole=function(e){!U.isUndefined(console)&&console&&(U.isFunction(console.warn)?console.warn(e):U.isFunction(console.log)&&console.log(e))},le.prototype.resetInternalMessageCount=function(){this._messageCount=0,this._messageLogged={}},le.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 o="Internal events throttle limit per PageView reached for this app.",a=new se(K,o,!1);n.queue.push(a),n.warnToConsole(o)}}},le.prototype._areInternalMessagesThrottled=function(){return this._messageCount>=this.maxInternalMessageLimit()},le);function le(e){this.queue=[],this.AIInternalMessagePrefix="AITR_",this._messageCount=0,this._messageLogged={},this.enableDebugExceptions=function(){return!1},this.consoleLoggingLevel=function(){return 0},this.telemetryLoggingLevel=function(){return 1},this.maxInternalMessageLimit=function(){return 25},U.isNullOrUndefined(e)||(U.isNullOrUndefined(e.loggingLevelConsole)||(this.consoleLoggingLevel=function(){return e.loggingLevelConsole}),U.isNullOrUndefined(e.loggingLevelTelemetry)||(this.telemetryLoggingLevel=function(){return e.loggingLevelTelemetry}),U.isNullOrUndefined(e.maxMessageLimit)||(this.maxInternalMessageLimit=function(){return e.maxMessageLimit}),U.isNullOrUndefined(e.enableDebugExceptions)||(this.enableDebugExceptions=function(){return e.enableDebugExceptions}))}var fe=U.isFunction,pe=function Ln(r,o){var a=this,s=null,c=fe(r.processTelemetry),u=fe(r.setNextPlugin);a._hasRun=!1,a.getPlugin=function(){return r},a.getNext=function(){return s},a.setNext=function(e){s=e},a.processTelemetry=function(e,t){if(t=t||o,r&&c){a._hasRun=!0;try{t.setNext(s),u&&r.setNextPlugin(s),s&&(s._hasRun=!1),r.processTelemetry(e,t)}catch(i){var n=s&&s._hasRun;s&&n||t.diagLog().throwInternal(O.CRITICAL,ae,"Plugin ["+r.identifier+"] failed during processTelemetry - "+i),s&&!n&&s.processTelemetry(e,t)}}else s&&(a._hasRun=!0,s.processTelemetry(e,t))}},he=U.isNullOrUndefined;function ge(e,t){var n=[];if(e&&0<e.length)for(var i=null,r=0;r<e.length;r++){var o=e[r];if(o&&U.isFunction(o.processTelemetry)){var a=new pe(o,t);n.push(a),i&&i.setNext(a),i=a}}return 0<n.length?n[0]:null}var de=function On(e,o,n,t){var a=this,i=null;null!==t&&(e&&U.isFunction(e.getPlugin)?i=function s(e,t,n){var i=[],r=!n;if(e)for(;e;){var o=e.getPlugin();!r&&o!==n||(r=!0,i.push(o)),e=e.getNext()}return r||i.push(n),ge(i,t)}(e,a,t||e.getPlugin()):t?i=function c(e,t,n){var i=e,r=!1;return n&&e&&(i=[],U.arrForEach(e,function(e){!r&&e!==n||(r=!0,i.push(e))})),n&&!r&&(i=i||[]).push(n),ge(i,t)}(e,a,t):U.isUndefined(t)&&(i=ge(e,a))),a.core=function(){return n},a.diagLog=function(){var e=(n||{}).logger;return e=e||new ue(o||{})},a.getCfg=function(){return o},a.getExtCfg=function(e,t){var n;if(void 0===t&&(t={}),o){var i=o.extensionConfig;i&&e&&(n=i[e])}return n||t},a.getConfig=function(e,t,n){var i;void 0===n&&(n=!1);var r=a.getExtCfg(e,null);return r&&!he(r[t])?i=r[t]:o&&!he(o[t])&&(i=o[t]),he(i)?n:i},a.hasNext=function(){return null!=i},a.getNext=function(){return i},a.setNext=function(e){i=e},a.processNext=function(e){var t=i;t&&(i=t.getNext(),t.processTelemetry(e,a))},a.createNew=function(e,t){return void 0===e&&(e=null),new On(e||i,o,n,t)}},me=U.isFunction,ve="getPlugin",ye=(xe.prototype.initialize=function(e,t,n,i){this._baseTelInit(e,t,n,i)},xe);function xe(){var o=this,a=!1,s=null,c=null;o.core=null,o.diagLog=function(e){return o._getTelCtx(e).diagLog()},o.isInitialized=function(){return a},o.setInitialized=function(e){a=e},o.setNextPlugin=function(e){c=e},o.processNext=function(e,t){t?t.processNext(e):c&&me(c.processTelemetry)&&c.processTelemetry(e,null)},o._getTelCtx=function(e){void 0===e&&(e=null);var t=e;if(!t){var n=s||new de(null,{},o.core);t=c&&c[ve]?n.createNew(null,c[ve]):n.createNew(null,c)}return t},o._baseTelInit=function(e,t,n,i){e&&(e.extensionConfig=e.extensionConfig||[]),!i&&t&&(i=t.getProcessTelContext().getNext());var r=c;c&&c[ve]&&(r=c[ve]()),o.core=t,s=new de(i,e,t,r),a=!0}}var Se=U.isFunction,Ie="processTelemetry",Ne="priority",Ce="setNextPlugin",we="isInitialized";function _e(t,n){for(var e=[],i=null,r=t.getNext();r;){var o=r.getPlugin();o&&(i&&Se(i[Ce])&&Se(o[Ie])&&i[Ce](o),Se(o[we])&&o[we]()||e.push(o),i=o,r=r.getNext())}U.arrForEach(e,function(e){e.initialize(t.getCfg(),t.core(),n,t.getNext())})}function De(e){return e.sort(function(e,t){var n=0,i=Se(t[Ie]);return Se(e[Ie])?n=i?e[Ne]-t[Ne]:1:i&&(n=-1),n})}var Ee=500,be="Channel has invalid priority",Te=U.arrForEach,Ae=U.objDefineAccessors;function Me(e,t){t&&0<t.length&&(function n(e){Te(e,function(e){if(e.priority<Ee)throw Error(be+e.identifier)})}(t=t.sort(function(e,t){return e.priority-t.priority})),e.push(t))}var ke,Ue=(t(Le,ke=ye),Le.prototype.processTelemetry=function(t,n){var i=this;this._channelQueue&&Te(this._channelQueue,function(e){0<e.length&&i._getTelCtx(n).createNew(e).processNext(t)})},Le.prototype.getChannelControls=function(){return this._channelQueue},Le.prototype.initialize=function(t,n,i){if(!this.isInitialized()){ke.prototype.initialize.call(this,t,n,i),t.isCookieUseDisabled&&U.disableCookies();var e=this._channelQueue=function r(e,t){var n=[];if(e&&Te(e,function(e){return Me(n,e)}),t){var i=[];Te(t,function(e){e.priority>Ee&&i.push(e)}),Me(n,i)}return n}((t||{}).channels,i);Te(e,function(e){return _e(new de(e,t,n),i)})}},Le._staticInit=(Ae(Le.prototype,"ChannelControls",Le.prototype.getChannelControls),void Ae(Le.prototype,"channelQueue",Le.prototype.getChannelControls)),Le);function Le(){var e=null!==ke&&ke.apply(this,arguments)||this;return e.identifier="ChannelControllerPlugin",e.priority=Ee,e}var Oe=U.arrForEach,Re=U.isNullOrUndefined,ze=(Pe.prototype.initialize=function(e,t,i,n){var r=this;if(r.isInitialized())throw Error("Core should not be initialized more than once");if(!e||Re(e.instrumentationKey))throw Error("Please provide instrumentation key");r.config=e;var o=r._channelController;n=n||U.objCreate({addNotificationListener:function(e){},removeNotificationListener:function(e){},eventsSent:function(e){},eventsDiscarded:function(e,t){}}),r._notificationManager=n,e.extensions=Re(e.extensions)?[]:e.extensions,(e.extensionConfig=Re(e.extensionConfig)?{}:e.extensionConfig).NotificationManager=n,i=i||U.objCreate({throwInternal:function(e,t,n,i,r){void 0===r&&(r=!1)},warnToConsole:function(e){},resetInternalMessageCount:function(){}}),r.logger=i;var a=[];a.push.apply(a,t.concat(e.extensions)),a=De(a);var s=[],c={};if(Oe(a,function(e){if(Re(e)||Re(e.initialize))throw Error("Extensions must provide callback to initialize");var t=e.priority,n=e.identifier;e&&t&&(Re(c[t])?c[t]=n:i.warnToConsole("Two extensions have same priority #"+t+" - "+c[t]+", "+n)),(!t||t<o.priority)&&s.push(e)}),a.push(o),s.push(o),a=De(a),r._extensions=a,_e(new de([o],e,r),a),_e(new de(s,e,r),a),r._extensions=s,0===r.getTransmissionControls().length)throw new Error("No channels available");r._setInit(!0)},Pe.prototype.getTransmissionControls=function(){return this._channelController.getChannelControls()},Pe.prototype.track=function(e){var t=this;e.iKey||(e.iKey=t.config.instrumentationKey),e.time||(e.time=U.toISOString(new Date)),Re(e.ver)&&(e.ver="4.0"),t.isInitialized()?(0<t._eventQueue.length&&(Oe(t._eventQueue,function(e){t.getProcessTelContext().processNext(e)}),t._eventQueue=[]),t.getProcessTelContext().processNext(e)):t._eventQueue.push(e)},Pe.prototype.getProcessTelContext=function(){var e=this._extensions,t=e;return e&&0!==e.length||(t=[this._channelController]),new de(t,this.config,this)},Pe);function Pe(){var t=!1,e=this;e._extensions=new Array,e._channelController=new Ue,e.isInitialized=function(){return t},e._setInit=function(e){t=e},e._eventQueue=[]}var je=(qe.prototype.addNotificationListener=function(e){this.listeners.push(e)},qe.prototype.removeNotificationListener=function(e){for(var t=U.arrIndexOf(this.listeners,e);-1<t;)this.listeners.splice(t,1),t=U.arrIndexOf(this.listeners,e)},qe.prototype.eventsSent=function(t){for(var n=this,e=function(e){i.listeners[e].eventsSent&&setTimeout(function(){return n.listeners[e].eventsSent(t)},0)},i=this,r=0;r<this.listeners.length;++r)e(r)},qe.prototype.eventsDiscarded=function(t,n){for(var i=this,e=function(e){r.listeners[e].eventsDiscarded&&setTimeout(function(){return i.listeners[e].eventsDiscarded(t,n)},0)},r=this,o=0;o<this.listeners.length;++o)e(o)},qe);function qe(){this.listeners=[]}var Ge,We,Be,Fe,Ve,He,Xe;t(Ke,Ge=ze),Ke.prototype.initialize=function(e,t){var n=this;n._notificationManager=new je,n.logger=new ue(e),n.config=e,Ge.prototype.initialize.call(this,e,t,n.logger,n._notificationManager)},Ke.prototype.getTransmissionControls=function(){return Ge.prototype.getTransmissionControls.call(this)},Ke.prototype.track=function(e){if(null===e)throw this._notifyInvalidEvent(e),Error("Invalid telemetry item");this._validateTelemetryItem(e),Ge.prototype.track.call(this,e)},Ke.prototype.addNotificationListener=function(e){this._notificationManager&&this._notificationManager.addNotificationListener(e)},Ke.prototype.removeNotificationListener=function(e){this._notificationManager&&this._notificationManager.removeNotificationListener(e)},Ke.prototype.pollInternalLogs=function(i){var t=this,e=this.config.diagnosticLogInterval;return 0<e||(e=1e4),setInterval(function(){var n=t,e=n.logger?n.logger.queue:[];U.arrForEach(e,function(e){var t={name:i||"InternalMessageId: "+e.messageId,iKey:n.config.instrumentationKey,time:U.toISOString(new Date),baseType:se.dataType,baseData:{message:e.message}};n.track(t)}),e.length=0},e)},Ke.prototype._validateTelemetryItem=function(e){if(U.isNullOrUndefined(e.name))throw this._notifyInvalidEvent(e),Error("telemetry name required")},Ke.prototype._notifyInvalidEvent=function(e){this._notificationManager&&this._notificationManager.eventsDiscarded([e],n)};function Ke(){return Ge.call(this)||this}(Be=We=We||{})[Be.LocalStorage=0]="LocalStorage",Be[Be.SessionStorage=1]="SessionStorage",(Ve=Fe=Fe||{})[Ve.Default=0]="Default",Ve[Ve.Required=1]="Required",Ve[Ve.Array=2]="Array",Ve[Ve.Hidden=4]="Hidden",(Xe=He=He||{})[Xe.AI=0]="AI",Xe[Xe.AI_AND_W3C=1]="AI_AND_W3C",Xe[Xe.W3C=2]="W3C";var Qe=(Je.sanitizeKeyAndAddUniqueness=function(e,t,n){var i=t.length,r=Je.sanitizeKey(e,t);if(r.length!==i){for(var o=0,a=r;n[a]!==undefined;)o++,a=r.substring(0,Je.MAX_NAME_LENGTH-3)+Je.padNumber(o);r=a}return r},Je.sanitizeKey=function(e,t){var n;return t&&(t=Je.trim(t.toString())).length>Je.MAX_NAME_LENGTH&&(n=t.substring(0,Je.MAX_NAME_LENGTH),e.throwInternal(O.WARNING,Z,"name is too long. It has been truncated to "+Je.MAX_NAME_LENGTH+" characters.",{name:t},!0)),n||t},Je.sanitizeString=function(e,t,n){var i;return void 0===n&&(n=Je.MAX_STRING_LENGTH),t&&(n=n||Je.MAX_STRING_LENGTH,(t=Je.trim(t)).toString().length>n&&(i=t.toString().substring(0,n),e.throwInternal(O.WARNING,te,"string value is too long. It has been truncated to "+n+" characters.",{value:t},!0))),i||t},Je.sanitizeUrl=function(e,t){return Je.sanitizeInput(e,t,Je.MAX_URL_LENGTH,ne)},Je.sanitizeMessage=function(e,t){var n;return t&&t.length>Je.MAX_MESSAGE_LENGTH&&(n=t.substring(0,Je.MAX_MESSAGE_LENGTH),e.throwInternal(O.WARNING,$,"message is too long, it has been truncated to "+Je.MAX_MESSAGE_LENGTH+" characters.",{message:t},!0)),n||t},Je.sanitizeException=function(e,t){var n;return t&&t.length>Je.MAX_EXCEPTION_LENGTH&&(n=t.substring(0,Je.MAX_EXCEPTION_LENGTH),e.throwInternal(O.WARNING,Y,"exception is too long, it has been truncated to "+Je.MAX_EXCEPTION_LENGTH+" characters.",{exception:t},!0)),n||t},Je.sanitizeProperties=function(e,t){if(t){var n={};for(var i in t){var r=t[i];if(U.isObject(r)&&v())try{r=y().stringify(r)}catch(o){e.throwInternal(O.WARNING,J,"custom property is not valid",{exception:o},!0)}r=Je.sanitizeString(e,r,Je.MAX_PROPERTY_LENGTH),n[i=Je.sanitizeKeyAndAddUniqueness(e,i,n)]=r}t=n}return t},Je.sanitizeMeasurements=function(e,t){if(t){var n={};for(var i in t){var r=t[i];n[i=Je.sanitizeKeyAndAddUniqueness(e,i,n)]=r}t=n}return t},Je.sanitizeId=function(e,t){return t?Je.sanitizeInput(e,t,Je.MAX_ID_LENGTH,re).toString():t},Je.sanitizeInput=function(e,t,n,i){var r;return t&&(t=Je.trim(t)).length>n&&(r=t.substring(0,n),e.throwInternal(O.WARNING,i,"input is too long, it has been truncated to "+n+" characters.",{data:t},!0)),r||t},Je.padNumber=function(e){var t="00"+e;return t.substr(t.length-3)},Je.trim=function(e){return U.isString(e)?e.replace(/^\s+|\s+$/g,""):e},Je.MAX_NAME_LENGTH=150,Je.MAX_ID_LENGTH=128,Je.MAX_PROPERTY_LENGTH=8192,Je.MAX_STRING_LENGTH=1024,Je.MAX_URL_LENGTH=2048,Je.MAX_MESSAGE_LENGTH=32768,Je.MAX_EXCEPTION_LENGTH=32768,Je);function Je(){}var Ye="prototype",$e=d(),Ze=U.isString,et=null;var tt=(nt.createDomEvent=function(e){var t=null;if(U.isFunction(Event))t=new Event(e);else{var n=g();n&&n.createEvent&&(t=n.createEvent("Event")).initEvent(e,!0,!0)}return t},nt.disableStorage=function(){nt._canUseLocalStorage=!1,nt._canUseSessionStorage=!1},nt._getLocalStorageObject=function(){return nt.canUseLocalStorage()?nt._getVerifiedStorageObject(We.LocalStorage):null},nt._getVerifiedStorageObject=function(e){var t,n,i=null;try{if(U.isNullOrUndefined(l()))return null;n=new Date,(i=e===We.LocalStorage?f("localStorage"):f("sessionStorage")).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},nt.isInternalApplicationInsightsEndpoint=function(e){return-1!==nt._internalEndpoints.indexOf(e.toLowerCase())},nt.canUseLocalStorage=function(){return nt._canUseLocalStorage===undefined&&(nt._canUseLocalStorage=!!nt._getVerifiedStorageObject(We.LocalStorage)),nt._canUseLocalStorage},nt.getStorage=function(e,t){var n=nt._getLocalStorageObject();if(null!==n)try{return n.getItem(t)}catch(i){nt._canUseLocalStorage=!1,e.throwInternal(O.WARNING,G,"Browser failed read of local storage. "+nt.getExceptionName(i),{exception:nt.dump(i)})}return null},nt.setStorage=function(e,t,n){var i=nt._getLocalStorageObject();if(null!==i)try{return i.setItem(t,n),!0}catch(r){nt._canUseLocalStorage=!1,e.throwInternal(O.WARNING,B,"Browser failed write to local storage. "+nt.getExceptionName(r),{exception:nt.dump(r)})}return!1},nt.removeStorage=function(e,t){var n=nt._getLocalStorageObject();if(null!==n)try{return n.removeItem(t),!0}catch(i){nt._canUseLocalStorage=!1,e.throwInternal(O.WARNING,V,"Browser failed removal of local storage item. "+nt.getExceptionName(i),{exception:nt.dump(i)})}return!1},nt._getSessionStorageObject=function(){return nt.canUseSessionStorage()?nt._getVerifiedStorageObject(We.SessionStorage):null},nt.canUseSessionStorage=function(){return nt._canUseSessionStorage===undefined&&(nt._canUseSessionStorage=!!nt._getVerifiedStorageObject(We.SessionStorage)),nt._canUseSessionStorage},nt.getSessionStorageKeys=function(){var e=[];if(nt.canUseSessionStorage())for(var t in f("sessionStorage"))e.push(t);return e},nt.getSessionStorage=function(e,t){var n=nt._getSessionStorageObject();if(null!==n)try{return n.getItem(t)}catch(i){nt._canUseSessionStorage=!1,e.throwInternal(O.WARNING,W,"Browser failed read of session storage. "+nt.getExceptionName(i),{exception:nt.dump(i)})}return null},nt.setSessionStorage=function(e,t,n){var i=nt._getSessionStorageObject();if(null!==i)try{return i.setItem(t,n),!0}catch(r){nt._canUseSessionStorage=!1,e.throwInternal(O.WARNING,F,"Browser failed write to session storage. "+nt.getExceptionName(r),{exception:nt.dump(r)})}return!1},nt.removeSessionStorage=function(e,t){var n=nt._getSessionStorageObject();if(null!==n)try{return n.removeItem(t),!0}catch(i){nt._canUseSessionStorage=!1,e.throwInternal(O.WARNING,H,"Browser failed removal of session storage item. "+nt.getExceptionName(i),{exception:nt.dump(i)})}return!1},nt.disableCookies=function(){U.disableCookies()},nt.canUseCookies=function(e){if(U._canUseCookies===undefined){U._canUseCookies=!1;try{U._canUseCookies=nt.document.cookie!==undefined}catch(t){e.throwInternal(O.WARNING,ie,"Cannot access document.cookie - "+nt.getExceptionName(t),{exception:nt.dump(t)})}}return U._canUseCookies&&nt.document&&nt.document.cookie},nt.disallowsSameSiteNone=function(e){return!!Ze(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")||!function r(e,t){var n=e.length,i=n-t.length;return e.substring(0<=i?i:0,n)===t}(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"))},nt.setCookie=function(e,t,n,i){if(nt.canUseCookies(e)){var r="",o="";i&&(r=";domain="+i);var a=m();a&&"https:"===a.protocol&&(o=";secure",null===et&&(et=nt.disallowsSameSiteNone((d()||{}).userAgent)),et||(n+=";SameSite=None")),nt.document.cookie=t+"="+n+r+";path=/"+o}},nt.stringToBoolOrDefault=function(e,t){return void 0===t&&(t=!1),e===undefined||null===e?t:"true"===e.toString().toLowerCase()},nt.getCookie=function(e,t){if(nt.canUseCookies(e)){var n="";if(t&&t.length)for(var i=t+"=",r=nt.document.cookie.split(";"),o=0;o<r.length;o++){var a=r[o];if((a=nt.trim(a))&&0===a.indexOf(i)){n=a.substring(i.length,r[o].length);break}}return n}},nt.deleteCookie=function(e,t){nt.canUseCookies(e)&&(nt.document.cookie=t+"=;path=/;expires=Thu, 01 Jan 1970 00:00:01 GMT;")},nt.trim=function(e){return Ze(e)?e.replace(/^\s+|\s+$/g,""):e},nt.newId=function(){for(var e="",t=1073741824*Math.random();0<t;)e+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(t%64),t=Math.floor(t/64);return e},nt.random32=function(){return 4294967296*Math.random()|0},nt.generateW3CId=function(){for(var e,t=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"],n="",i=0;i<4;i++)n+=t[15&(e=nt.random32())]+t[e>>4&15]+t[e>>8&15]+t[e>>12&15]+t[e>>16&15]+t[e>>20&15]+t[e>>24&15]+t[e>>28&15];var r=t[8+4*Math.random()|0];return n.substr(0,8)+n.substr(9,4)+"4"+n.substr(13,3)+r+n.substr(16,3)+n.substr(19,12)},nt.isArray=function(e){return"[object Array]"===Object[Ye].toString.call(e)},nt.isError=function(e){return"[object Error]"===Object[Ye].toString.call(e)},nt.getIEVersion=function(e){void 0===e&&(e=null);var t=e?e.toLowerCase():$e?($e.userAgent||"").toLowerCase():"";return-1!==t.indexOf("msie")?parseInt(t.split("msie")[1]):null},nt.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,(0<o?o+".":"")+(r=r.length<2?"0"+r:r)+":"+i+":"+n+"."+t},nt.isCrossOriginError=function(e,t,n,i,r){return("Script error."===e||"Script error"===e)&&!r},nt.dump=function(e){var t=Object[Ye].toString.call(e),n="";return"[object Error]"===t?n="{ stack: '"+e.stack+"', message: '"+e.message+"', name: '"+e.name+"'":v()&&(n=y().stringify(e)),t+n},nt.getExceptionName=function(e){return"[object Error]"===Object[Ye].toString.call(e)?e.name:""},nt.addEventHandler=function(e,t){return P.Attach(h(),e,t)},nt.IsBeaconApiSupported=function(){return"sendBeacon"in $e&&$e.sendBeacon},nt.getExtension=function(e,t){for(var n=null,i=0;!n&&i<e.length;)e[i]&&e[i].identifier===t&&(n=e[i]),i++;return n},nt.document=g()||{},nt._canUseLocalStorage=undefined,nt._canUseSessionStorage=undefined,nt._internalEndpoints=["https://dc.services.visualstudio.com/v2/track","https://breeze.aimon.applicationinsights.io/v2/track","https://dc-int.services.visualstudio.com/v2/track"],nt.NotSpecified="not_specified",nt.isDate=U.isDate,nt.toISOStringForIE8=U.toISOString,nt);function nt(){}var it=(rt.parseUrl=function(e){return rt.htmlAnchorElement||(rt.htmlAnchorElement=rt.document.createElement?rt.document.createElement("a"):{host:rt.parseHost(e)}),rt.htmlAnchorElement.href=e,rt.htmlAnchorElement},rt.getAbsoluteUrl=function(e){var t,n=rt.parseUrl(e);return n&&(t=n.href),t},rt.getPathName=function(e){var t,n=rt.parseUrl(e);return n&&(t=n.pathname),t},rt.getCompleteUrl=function(e,t){return e?e.toUpperCase()+" "+t:t},rt.parseHost=function(e){if(e){var t=e.match(/:\/\/(www[0-9]?\.)?(.[^/:]+)/i);if(null!=t&&2<t.length&&Ze(t[2])&&0<t[2].length)return t[2]}return null},rt.document=g()||{},rt);function rt(){}var ot=(at.ParseDependencyPath=function(e,t,n,i){var r,o=i,a=i;if(t&&0<t.length){var s=it.parseUrl(t);if(r=s.host,!o)if(null!=s.pathname){var c=0===s.pathname.length?"/":s.pathname;"/"!==c.charAt(0)&&(c="/"+c),a=s.pathname,o=Qe.sanitizeString(e,n?n+" "+c:c)}else o=Qe.sanitizeString(e,t)}else o=r=i;return{target:r,name:o,data:a}},at);function at(){}var st=(ct.Now=function(){var e=function t(){return f("performance")}();return e&&e.now&&e.timing?e.now()+e.timing.navigationStart:(new Date).getTime()},ct.GetDuration=function(e,t){var n=null;return 0===e||0===t||U.isNullOrUndefined(e)||U.isNullOrUndefined(t)||(n=t-e),n},ct);function ct(){}var ut,lt=(t(ft,ut=function Rn(){}),ft);function ft(){return ut.call(this)||this}var pt;t(ht,pt=function zn(){this.ver=1,this.sampleRate=100,this.tags={}});function ht(e,t,n){var i=pt.call(this)||this;return i.name=Qe.sanitizeString(e,n)||tt.NotSpecified,i.data=t,i.time=U.toISOString(new Date),i.aiDataContract={time:Fe.Required,iKey:Fe.Required,name:Fe.Required,sampleRate:function(){return 100===i.sampleRate?Fe.Hidden:Fe.Required},tags:Fe.Required,data:Fe.Required},i}var gt,dt=function Pn(){},mt=(t(vt,gt=dt),vt);function vt(){var e=gt.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}var yt;t(xt,yt=mt),xt.envelopeType="Microsoft.ApplicationInsights.{0}.Event",xt.dataType="EventData";function xt(e,t,n,i){var r=yt.call(this)||this;return r.aiDataContract={ver:Fe.Required,name:Fe.Required,properties:Fe.Default,measurements:Fe.Default},r.name=Qe.sanitizeString(e,t)||tt.NotSpecified,r.properties=Qe.sanitizeProperties(e,n),r.measurements=Qe.sanitizeMeasurements(e,i),r}var St,It=function jn(){},Nt=(t(Ct,St=dt),Ct);function Ct(){var e=St.call(this)||this;return e.ver=2,e.exceptions=[],e.properties={},e.measurements={},e}var wt,_t=function qn(){this.hasFullStack=!0,this.parsedStack=[]};t(Dt,wt=Nt),Dt.CreateFromInterface=function(t,e){var n=e.exceptions&&U.arrMap(e.exceptions,function(e){return bt.CreateFromInterface(t,e)});return new Dt(t,r({},e,{exceptions:n}))},Dt.prototype.toInterface=function(){var e=this,t=e.exceptions,n=e.properties,i=e.measurements,r=e.severityLevel,o=(e.ver,e.problemGroup),a=e.id,s=e.isManual;return{ver:"4.0",exceptions:t instanceof Array&&U.arrMap(t,function(e){return e.toInterface()})||undefined,severityLevel:r,properties:n,measurements:i,problemGroup:o,id:a,isManual:s}},Dt.CreateSimpleException=function(e,t,n,i,r,o){return{exceptions:[{hasFullStack:!0,message:e,stack:r,typeName:t}]}},Dt.envelopeType="Microsoft.ApplicationInsights.{0}.Exception",Dt.dataType="ExceptionData";function Dt(e,t,n,i,r,o){var a=wt.call(this)||this;return a.aiDataContract={ver:Fe.Required,exceptions:Fe.Required,severityLevel:Fe.Default,properties:Fe.Default,measurements:Fe.Default},t instanceof Error?(a.exceptions=[new bt(e,t)],a.properties=Qe.sanitizeProperties(e,n),a.measurements=Qe.sanitizeMeasurements(e,i),r&&(a.severityLevel=r),o&&(a.id=o)):(a.exceptions=t.exceptions,a.properties=t.properties,a.measurements=t.measurements,t.severityLevel&&(a.severityLevel=t.severityLevel),t.id&&(a.id=t.id),t.problemGroup&&(a.problemGroup=t.problemGroup),a.ver=2,U.isNullOrUndefined(t.isManual)||(a.isManual=t.isManual)),a}var Et,bt=(t(Tt,Et=_t),Tt.prototype.toInterface=function(){var e=this.parsedStack instanceof Array&&U.arrMap(this.parsedStack,function(e){return e.toInterface()});return{id:this.id,outerId:this.outerId,typeName:this.typeName,message:this.message,hasFullStack:this.hasFullStack,stack:this.stack,parsedStack:e||undefined}},Tt.CreateFromInterface=function(e,t){var n=t.parsedStack instanceof Array&&U.arrMap(t.parsedStack,function(e){return Mt.CreateFromInterface(e)})||t.parsedStack;return new Tt(e,r({},t,{parsedStack:n}))},Tt.parseStack=function(e){var t;if(U.isString(e)){var n=e.split("\n");t=[];for(var i=0,r=0,o=0;o<=n.length;o++){var a=n[o];if(Mt.regex.test(a)){var s=new Mt(n[o],i++);r+=s.sizeInBytes,t.push(s)}}if(32768<r)for(var c=0,u=t.length-1,l=0,f=c,p=u;c<u;){if(32768<(l+=t[c].sizeInBytes+t[u].sizeInBytes)){var h=p-f+1;t.splice(f,h);break}f=c,p=u,c++,u--}}return t},Tt);function Tt(e,t){var n=Et.call(this)||this;if(n.aiDataContract={id:Fe.Default,outerId:Fe.Default,typeName:Fe.Required,message:Fe.Required,hasFullStack:Fe.Default,stack:Fe.Default,parsedStack:Fe.Array},t instanceof Error){n.typeName=Qe.sanitizeString(e,t.name)||tt.NotSpecified,n.message=Qe.sanitizeMessage(e,t.message)||tt.NotSpecified;var i=t.stack;n.parsedStack=Tt.parseStack(i),n.stack=Qe.sanitizeException(e,i),n.hasFullStack=tt.isArray(n.parsedStack)&&0<n.parsedStack.length}else n.typeName=t.typeName,n.message=t.message,n.stack=t.stack,n.parsedStack=t.parsedStack,n.hasFullStack=t.hasFullStack;return n}var At,Mt=(t(kt,At=It),kt.CreateFromInterface=function(e){return new kt(e,null)},kt.prototype.toInterface=function(){return{level:this.level,method:this.method,assembly:this.assembly,fileName:this.fileName,line:this.line}},kt.regex=/^([\s]+at)?(.*?)(\@|\s\(|\s)([^\(\@\n]+):([0-9]+):([0-9]+)(\)?)$/,kt.baseSize=58,kt);function kt(e,t){var n=At.call(this)||this;if(n.sizeInBytes=0,n.aiDataContract={level:Fe.Required,method:Fe.Required,assembly:Fe.Default,fileName:Fe.Default,line:Fe.Default},"string"==typeof e){var i=e;n.level=t,n.method="<no_method>",n.assembly=tt.trim(i),n.fileName="",n.line=0;var r=i.match(kt.regex);r&&5<=r.length&&(n.method=tt.trim(r[2])||n.method,n.fileName=tt.trim(r[4]),n.line=parseInt(r[5])||0)}else n.level=e.level,n.method=e.method,n.assembly=e.assembly,n.fileName=e.fileName,n.line=e.line,n.sizeInBytes=0;return n.sizeInBytes+=n.method.length,n.sizeInBytes+=n.fileName.length,n.sizeInBytes+=n.assembly.length,n.sizeInBytes+=kt.baseSize,n.sizeInBytes+=n.level.toString().length,n.sizeInBytes+=n.line.toString().length,n}var Ut,Lt,Ot,Rt=(t(zt,Ut=dt),zt);function zt(){var e=Ut.call(this)||this;return e.ver=2,e.metrics=[],e.properties={},e.measurements={},e}(Ot=Lt=Lt||{})[Ot.Measurement=0]="Measurement",Ot[Ot.Aggregation=1]="Aggregation";var Pt,jt=(t(qt,Pt=function Gn(){this.kind=Lt.Measurement}),qt);function qt(){var e=null!==Pt&&Pt.apply(this,arguments)||this;return e.aiDataContract={name:Fe.Required,kind:Fe.Default,value:Fe.Required,count:Fe.Default,min:Fe.Default,max:Fe.Default,stdDev:Fe.Default},e}var Gt;t(Wt,Gt=Rt),Wt.envelopeType="Microsoft.ApplicationInsights.{0}.Metric",Wt.dataType="MetricData";function Wt(e,t,n,i,r,o,a,s){var c=Gt.call(this)||this;c.aiDataContract={ver:Fe.Required,metrics:Fe.Required,properties:Fe.Default};var u=new jt;return u.count=0<i?i:undefined,u.max=isNaN(o)||null===o?undefined:o,u.min=isNaN(r)||null===r?undefined:r,u.name=Qe.sanitizeString(e,t)||tt.NotSpecified,u.value=n,c.metrics=[u],c.properties=Qe.sanitizeProperties(e,a),c.measurements=Qe.sanitizeMeasurements(e,s),c}var Bt,Ft=(t(Vt,Bt=mt),Vt);function Vt(){var e=Bt.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}var Ht,Xt=(t(Kt,Ht=Ft),Kt.envelopeType="Microsoft.ApplicationInsights.{0}.Pageview",Kt.dataType="PageviewData",Kt);function Kt(e,t,n,i,r,o,a){var s=Ht.call(this)||this;return s.aiDataContract={ver:Fe.Required,name:Fe.Default,url:Fe.Default,duration:Fe.Default,properties:Fe.Default,measurements:Fe.Default,id:Fe.Default},s.id=Qe.sanitizeId(e,a),s.url=Qe.sanitizeUrl(e,n),s.name=Qe.sanitizeString(e,t)||tt.NotSpecified,isNaN(i)||(s.duration=tt.msToTimeSpan(i)),s.properties=Qe.sanitizeProperties(e,r),s.measurements=Qe.sanitizeMeasurements(e,o),s}var Qt,Jt=(t(Yt,Qt=dt),Yt);function Yt(){var e=Qt.call(this)||this;return e.ver=2,e.success=!0,e.properties={},e.measurements={},e}var $t;t(Zt,$t=Jt),Zt.envelopeType="Microsoft.ApplicationInsights.{0}.RemoteDependency",Zt.dataType="RemoteDependencyData";function Zt(e,t,n,i,r,o,a,s,c,u,l,f){void 0===c&&(c="Ajax");var p=$t.call(this)||this;p.aiDataContract={id:Fe.Required,ver:Fe.Required,name:Fe.Default,resultCode:Fe.Default,duration:Fe.Default,success:Fe.Default,data:Fe.Default,target:Fe.Default,type:Fe.Default,properties:Fe.Default,measurements:Fe.Default,kind:Fe.Default,value:Fe.Default,count:Fe.Default,min:Fe.Default,max:Fe.Default,stdDev:Fe.Default,dependencyKind:Fe.Default,dependencySource:Fe.Default,commandName:Fe.Default,dependencyTypeName:Fe.Default},p.id=t,p.duration=tt.msToTimeSpan(r),p.success=o,p.resultCode=a+"",p.type=Qe.sanitizeString(e,c);var h=ot.ParseDependencyPath(e,n,s,i);return p.data=Qe.sanitizeUrl(e,i)||h.data,p.target=Qe.sanitizeString(e,h.target),u&&(p.target=p.target+" | "+u),p.name=Qe.sanitizeString(e,h.name),p.properties=Qe.sanitizeProperties(e,l),p.measurements=Qe.sanitizeMeasurements(e,f),p}var en,tn=(t(nn,en=dt),nn);function nn(){var e=en.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}var rn;t(on,rn=tn),on.envelopeType="Microsoft.ApplicationInsights.{0}.Message",on.dataType="MessageData";function on(e,t,n,i,r){var o=rn.call(this)||this;return o.aiDataContract={ver:Fe.Required,message:Fe.Required,severityLevel:Fe.Default,properties:Fe.Default},t=t||tt.NotSpecified,o.message=Qe.sanitizeMessage(e,t),o.properties=Qe.sanitizeProperties(e,i),o.measurements=Qe.sanitizeMeasurements(e,r),n&&(o.severityLevel=n),o}var an,sn=(t(cn,an=Ft),cn);function cn(){var e=an.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}var un;t(ln,un=sn),ln.envelopeType="Microsoft.ApplicationInsights.{0}.PageviewPerformance",ln.dataType="PageviewPerformanceData";function ln(e,t,n,i,r,o,a){var s=un.call(this)||this;return s.aiDataContract={ver:Fe.Required,name:Fe.Default,url:Fe.Default,duration:Fe.Default,perfTotal:Fe.Default,networkConnect:Fe.Default,sentRequest:Fe.Default,receivedResponse:Fe.Default,domProcessing:Fe.Default,properties:Fe.Default,measurements:Fe.Default},s.url=Qe.sanitizeUrl(e,n),s.name=Qe.sanitizeString(e,t)||tt.NotSpecified,s.properties=Qe.sanitizeProperties(e,r),s.measurements=Qe.sanitizeMeasurements(e,o),a&&(s.domProcessing=a.domProcessing,s.duration=a.duration,s.networkConnect=a.networkConnect,s.perfTotal=a.perfTotal,s.receivedResponse=a.receivedResponse,s.sentRequest=a.sentRequest),s}var fn,pn,hn;t(gn,fn=lt);function gn(e,t){var n=fn.call(this)||this;return n.aiDataContract={baseType:Fe.Required,baseData:Fe.Required},n.baseType=e,n.baseData=t,n}(hn=pn=pn||{})[hn.Verbose=0]="Verbose",hn[hn.Information=1]="Information",hn[hn.Warning=2]="Warning",hn[hn.Error=3]="Error",hn[hn.Critical=4]="Critical";var dn=function Wn(){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"},mn=(vn.UserExt="user",vn.DeviceExt="device",vn.TraceExt="trace",vn.WebExt="web",vn.AppExt="app",vn.OSExt="os",vn.SessionExt="ses",vn.SDKExt="sdk",vn);function vn(){}var yn=new dn,xn=function Bn(){},Sn=(In.prototype.update=function(){this.automaticSession.id||this.initializeAutomaticSession();var e=st.Now(),t=0!==this.config.sessionExpirationMs()&&e-this.automaticSession.acquisitionDate>this.config.sessionExpirationMs(),n=0!==this.config.sessionExpirationMs()&&e-this.automaticSession.renewalDate>this.config.sessionRenewalMs();t||n?this.renew():(!this.cookieUpdatedTimestamp||e-this.cookieUpdatedTimestamp>In.cookieUpdateInterval)&&(this.automaticSession.renewalDate=e,this.setCookie(this.automaticSession.id,this.automaticSession.acquisitionDate,this.automaticSession.renewalDate))},In.prototype.backup=function(){this.setStorage(this.automaticSession.id,this.automaticSession.acquisitionDate,this.automaticSession.renewalDate)},In.prototype.initializeAutomaticSession=function(){var e=tt.getCookie(this._logger,this._storageNamePrefix());if(e&&"function"==typeof e.split)this.initializeAutomaticSessionWithData(e);else{var t=tt.getStorage(this._logger,this._storageNamePrefix());t&&this.initializeAutomaticSessionWithData(t)}this.automaticSession.id||this.renew()},In.prototype.initializeAutomaticSessionWithData=function(e){var t=e.split("|");0<t.length&&(this.automaticSession.id=t[0]);try{if(1<t.length){var n=+t[1];this.automaticSession.acquisitionDate=+new Date(n),this.automaticSession.acquisitionDate=0<this.automaticSession.acquisitionDate?this.automaticSession.acquisitionDate:0}if(2<t.length){var i=+t[2];this.automaticSession.renewalDate=+new Date(i),this.automaticSession.renewalDate=0<this.automaticSession.renewalDate?this.automaticSession.renewalDate:0}}catch(r){this._logger.throwInternal(O.CRITICAL,X,"Error parsing ai_session cookie, session will be reset: "+tt.getExceptionName(r),{exception:tt.dump(r)})}0===this.automaticSession.renewalDate&&this._logger.throwInternal(O.WARNING,Q,"AI session renewal date is 0, session will be reset.")},In.prototype.renew=function(){var e=st.Now();this.automaticSession.id=tt.newId(),this.automaticSession.acquisitionDate=e,this.automaticSession.renewalDate=e,this.setCookie(this.automaticSession.id,this.automaticSession.acquisitionDate,this.automaticSession.renewalDate),tt.canUseLocalStorage()||this._logger.throwInternal(O.WARNING,q,"Browser does not support local storage. Session durations will be inaccurate.")},In.prototype.setCookie=function(e,t,n){var i=t+this.config.sessionExpirationMs(),r=n+this.config.sessionRenewalMs(),o=new Date,a=[e,t,n];i<r?o.setTime(i):o.setTime(r);var s=this.config.cookieDomain?this.config.cookieDomain():null,c=0===this.config.sessionExpirationMs()?"0":o.toUTCString();tt.setCookie(this._logger,this._storageNamePrefix(),a.join("|")+";expires="+c,s),this.cookieUpdatedTimestamp=st.Now()},In.prototype.setStorage=function(e,t,n){tt.setStorage(this._logger,this._storageNamePrefix(),[e,t,n].join("|"))},In.acquisitionSpan=864e5,In.renewalSpan=18e5,In.cookieUpdateInterval=6e4,In.cookieNameConst="ai_session",In);function In(e,t){var n=this;U.isNullOrUndefined(t)?this._logger=new ue:this._logger=t,"function"!=typeof(e=e||{}).sessionExpirationMs&&(e.sessionExpirationMs=function(){return In.acquisitionSpan}),"function"!=typeof e.sessionRenewalMs&&(e.sessionRenewalMs=function(){return In.renewalSpan}),this.config=e,this._storageNamePrefix=function(){return n.config.namePrefix&&n.config.namePrefix()?In.cookieNameConst+n.config.namePrefix():In.cookieNameConst},this.automaticSession=new xn}var Nn=function Fn(){},Cn=function Vn(){this.id="browser",this.deviceClass="Browser"},wn=function Hn(e){this.sdkVersion=(e.sdkExtension&&e.sdkExtension()?e.sdkExtension()+"_":"")+"javascript:2.4.2"},_n=(Dn.prototype.setAuthenticatedUserContext=function(e,t,n){if(void 0===n&&(n=!1),!this.validateUserInput(e)||t&&!this.validateUserInput(t))this._logger.throwInternal(O.WARNING,ee,"Setting auth user context failed. User auth/account id should be of type string, and not contain commas, semi-colons, equal signs, spaces, or vertical-bars.",!0);else{this.authenticatedId=e;var i=this.authenticatedId;t&&(this.accountId=t,i=[this.authenticatedId,this.accountId].join(Dn.cookieSeparator)),n&&tt.setCookie(this._logger,Dn.authUserCookieName,encodeURI(i),this.config.cookieDomain())}},Dn.prototype.clearAuthenticatedUserContext=function(){this.authenticatedId=null,this.accountId=null,tt.deleteCookie(this._logger,Dn.authUserCookieName)},Dn.prototype.validateUserInput=function(e){return!("string"!=typeof e||!e||e.match(/,|;|=| |\|/))},Dn.cookieSeparator="|",Dn.userCookieName="ai_user",Dn.authUserCookieName="ai_authUser",Dn);function Dn(e,t){this.isNewUser=!1,this._logger=t;var n=tt.getCookie(this._logger,Dn.userCookieName);if(n){this.isNewUser=!1;var i=n.split(Dn.cookieSeparator);0<i.length&&(this.id=i[0])}if(this.config=e,!this.id){this.id=tt.newId();var r=new Date,o=U.toISOString(r);this.accountAcquisitionDate=o,this.isNewUser=!0,r.setTime(r.getTime()+31536e6);var a=[this.id,o],s=this.config.cookieDomain?this.config.cookieDomain():undefined;tt.setCookie(this._logger,Dn.userCookieName,a.join(Dn.cookieSeparator)+";expires="+r.toUTCString(),s);var c=e.namePrefix&&e.namePrefix()?e.namePrefix()+"ai_session":"ai_session";tt.removeStorage(this._logger,c)}this.accountId=e.accountId?e.accountId():undefined;var u=tt.getCookie(this._logger,Dn.authUserCookieName);if(u){var l=(u=decodeURI(u)).split(Dn.cookieSeparator);l[0]&&(this.authenticatedId=l[0]),1<l.length&&l[1]&&(this.accountId=l[1])}}var En=function Xn(){},bn=function Kn(e,t,n){this.traceID=e||tt.generateW3CId(),this.parentID=t,this.name=n;var i=m();!n&&i&&i.pathname&&(this.name=i.pathname)},Tn=(An.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)},An.prototype.applyOperatingSystemContxt=function(e,t){this.os&&this.os.name&&(e.ext.os=this.os)},An.prototype.applyApplicationContext=function(e,t){this.application&&("string"==typeof this.application.ver&&(e.tags[yn.applicationVersion]=this.application.ver),"string"==typeof this.application.build&&(e.tags[yn.applicationBuild]=this.application.build))},An.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))},An.prototype.applyInternalContext=function(e,t){this.internal&&("string"==typeof this.internal.agentVersion&&(e.tags[yn.internalAgentVersion]=this.internal.agentVersion),"string"==typeof this.internal.sdkVersion&&(e.tags[yn.internalSdkVersion]=this.internal.sdkVersion))},An.prototype.applyLocationContext=function(e,t){this.location&&"string"==typeof this.location.ip&&(e.tags[yn.locationIp]=this.location.ip)},An.prototype.applyOperationContext=function(e,t){if(this.telemetryTrace){var n=e.ext.trace||{traceID:undefined,parentID:undefined};"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}},An.prototype.applyWebContext=function(e,t){this.web&&(e.ext.web=e.ext.web||{},e.ext.web=this.web)},An.prototype.applyUserContext=function(e,t){this.user&&(e.tags||(e.tags=[]),"string"==typeof this.user.accountId&&(e.tags[yn.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))},An.prototype.cleanUp=function(e,t){e.ext[mn.DeviceExt]&&0===U.objKeys(e.ext[mn.DeviceExt]).length&&delete e.ext[mn.DeviceExt],e.ext[mn.UserExt]&&0===U.objKeys(e.ext[mn.UserExt]).length&&delete e.ext[mn.UserExt],e.ext[mn.WebExt]&&0===U.objKeys(e.ext[mn.WebExt]).length&&delete e.ext[mn.WebExt],e.ext[mn.OSExt]&&0===U.objKeys(e.ext[mn.OSExt]).length&&delete e.ext[mn.OSExt],e.ext[mn.AppExt]&&0===U.objKeys(e.ext[mn.AppExt]).length&&delete e.ext[mn.AppExt],e.ext[mn.TraceExt]&&0===U.objKeys(e.ext[mn.TraceExt]).length&&delete e.ext[mn.TraceExt]},An);function An(e,t){p()&&(this.sessionManager=new Sn(t,e),this.application=new Nn,this.device=new Cn,this.internal=new wn(t),this.location=new En,this.user=new _n(t,e),this.telemetryTrace=new bn,this.session=new xn),this.appId=function(){return null}}var Mn,kn=(t(Un,Mn=ye),Un.getDefaultConfig=function(){return{instrumentationKey:function(){return undefined},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 undefined}}},Un.prototype.initialize=function(e,t,n,i){var r=this;Mn.prototype.initialize.call(this,e,t,n,i);var o=this._getTelCtx(),a=this.identifier,s=Un.getDefaultConfig();this._extensionConfig=this._extensionConfig||Un.getDefaultConfig();var c=function(e){u._extensionConfig[e]=function(){return o.getConfig(a,e,s[e]())}},u=this;for(var l in s)c(l);this.context=new Tn(t.logger,this._extensionConfig),this._breezeChannel=tt.getExtension(n,"AppInsightsChannelPlugin"),this.context.appId=function(){return r._breezeChannel?r._breezeChannel._appId:null}},Un.prototype.processTelemetry=function(e,t){if(!U.isNullOrUndefined(e)){if(t=this._getTelCtx(t),e.name===Xt.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 se(oe,(d()||{}).userAgent||"");t.diagLog().logInternalMessage(O.CRITICAL,n)}this.processNext(e,t)}},Un.prototype._processTelemetryInternal=function(e,t){e.tags||(e.tags=[]),e.ext||(e.ext={});var n=e.ext;n[mn.DeviceExt]=n[mn.DeviceExt]||{},n[mn.WebExt]=n[mn.WebExt]||{},n[mn.UserExt]=n[mn.UserExt]||{},n[mn.OSExt]=n[mn.OSExt]||{},n[mn.AppExt]=n[mn.AppExt]||{},n[mn.TraceExt]=n[mn.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)},Un);function Un(){var e=null!==Mn&&Mn.apply(this,arguments)||this;return e.priority=110,e.identifier="AppInsightsPropertiesPlugin",e}e.PropertiesPlugin=kn,e.TelemetryTrace=bn,e.TelemetryContext=Tn,e.Session=xn,e.SessionManager=Sn,function(e,t,n){var i=Object.defineProperty;if(i)try{return i(e,t,n)}catch(r){}typeof n.value!==undefined&&(e[t]=n.value)}(e,"__esModule",{value:!0})}); | ||
//# sourceMappingURL=applicationinsights-properties-js.min.js.map |
{ | ||
"name": "@microsoft/applicationinsights-properties-js", | ||
"version": "2.4.1", | ||
"version": "2.4.2", | ||
"description": "Microsoft Application Insights properties (Part A) plugin", | ||
@@ -21,3 +21,3 @@ "main": "dist/applicationinsights-properties-js.js", | ||
"devDependencies": { | ||
"@microsoft/applicationinsights-rollup-es3" : "1.0.0", | ||
"@microsoft/applicationinsights-rollup-es3" : "1.1.0", | ||
"typescript": "2.5.3", | ||
@@ -36,4 +36,4 @@ "grunt": "1.0.1", | ||
"dependencies": { | ||
"@microsoft/applicationinsights-core-js": "2.4.1", | ||
"@microsoft/applicationinsights-common": "2.4.1", | ||
"@microsoft/applicationinsights-core-js": "2.4.2", | ||
"@microsoft/applicationinsights-common": "2.4.2", | ||
"tslib": "^1.9.3" | ||
@@ -40,0 +40,0 @@ }, |
@@ -7,3 +7,3 @@ // Copyright (c) Microsoft Corporation. All rights reserved. | ||
const Version = "2.4.1"; | ||
const Version = "2.4.2"; | ||
@@ -10,0 +10,0 @@ export class Internal implements IInternal { |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
+ Added@microsoft/applicationinsights-common@2.4.2(transitive)
+ Added@microsoft/applicationinsights-core-js@2.4.2(transitive)
- Removed@microsoft/applicationinsights-common@2.4.1(transitive)
- Removed@microsoft/applicationinsights-core-js@2.4.1(transitive)