New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@microsoft/applicationinsights-analytics-js

Package Overview
Dependencies
Maintainers
5
Versions
605
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

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

Comparing version 2.4.3 to 2.4.4

4

browser/applicationinsights-analytics-js.min.js
/*!
* Application Insights JavaScript SDK - Web Analytics, 2.4.3
* Application Insights JavaScript SDK - Web Analytics, 2.4.4
* 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 r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function t(e,t){function n(){this.constructor=e}r(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 r(){}return r.prototype=e,new r}(t):(n.prototype=t.prototype,new n)}var a,n,d,i,o,s,c=function(){return(c=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};(n=a=a||{})[n.LocalStorage=0]="LocalStorage",n[n.SessionStorage=1]="SessionStorage",(i=d=d||{})[i.Default=0]="Default",i[i.Required=1]="Required",i[i.Array=2]="Array",i[i.Hidden=4]="Hidden",(s=o=o||{})[s.AI=0]="AI",s[s.AI_AND_W3C=1]="AI_AND_W3C",s[s.W3C=2]="W3C";var l=2,u="undefined",g="object",f="window",p="location",h="JSON";function m(){return typeof globalThis!==u&&globalThis?globalThis:typeof self!==u&&self?self:typeof window!==u&&window?window:typeof global!==u&&global?global:null}function v(e){var t=m();return t&&t[e]?t[e]:e===f&&y()?window:null}function y(){return Boolean(typeof window===g&&window)}function I(){return y()?window:v(f)}function T(){return function e(){return Boolean(typeof document===g&&document)}()?document:v("document")}function S(){return function e(){return Boolean(typeof navigator===g&&navigator)}()?navigator:v("navigator")}function w(){return function e(){return Boolean(typeof history===g&&history)}()?history:v("history")}function _(){return typeof location===g&&location?location:v(p)}function N(){return v("performance")}function x(){return Boolean(typeof JSON===g&&JSON||null!==v(h))}function E(){return x()?JSON||v(h):null}var b=u,D="prototype",C="attachEvent",P="addEventListener",k="detachEvent",L="removeEventListener";function A(e,t){return typeof e===t}function M(e){return e===undefined||A(e,b)}function O(e){return M(e)||null===e}function U(e,t){return e&&Object[D].hasOwnProperty.call(e,t)}function R(e){return A(e,"object")}function z(e){return A(e,"function")}function V(e,t,n,r){void 0===r&&(r=!1);var i=!1;if(!O(e))try{O(e[P])?O(e[C])||(e[C]("on"+t,n),i=!0):(e[P](t,n,r),i=!0)}catch(a){}return i}function G(e,t,n,r){if(void 0===r&&(r=!1),!O(e))try{O(e[L])?O(e[k])||e[k]("on"+t,n):e[L](t,n,r)}catch(i){}}var j=(q.isDate=function(e){return"[object Date]"===Object[D].toString.call(e)},q.isString=function(e){return A(e,"string")},q.isNumber=function(e){return A(e,"number")},q.isBoolean=function(e){return A(e,"boolean")},q.disableCookies=function(){q._canUseCookies=!1},q.newGuid=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(W,function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})},q.toISOString=function(e){if(q.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"}},q.arrForEach=function(e,t,n){for(var r=e.length,i=0;i<r;++i)i in e&&t.call(n||e,e[i],i,e)},q.arrIndexOf=function(e,t,n){for(var r=e.length,i=n||0,a=Math.max(0<=i?i:r-Math.abs(i),0);a<r;a++)if(a in e&&e[a]===t)return a;return-1},q.arrMap=function(e,t,n){for(var r=e.length,i=n||e,a=new Array(r),o=0;o<r;o++)o in e&&(a[o]=t.call(i,e[o],e));return a},q.arrReduce=function(e,t,n){var r,i=e.length,a=0;if(3<=arguments.length)r=n;else{for(;a<i&&!(a in e);)a++;r=e[a++]}for(;a<i;)a in e&&(r=t(r,e[a],a,e)),a++;return r},q.objCreate=function(e){if(null==e)return{};if(!R(e)&&!z(e))throw new TypeError("Object prototype may only be an Object: "+e);function t(){}return t[D]=e,new t},q.objKeys=function(e){var t=!{toString:null}.propertyIsEnumerable("toString");if(!(z(e)||R(e)&&null!==e))throw new TypeError("objKeys called on non-object");var n=[];for(var r in e)U(e,r)&&n.push(r);if(t)for(var i=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],a=i.length,o=0;o<a;o++)U(e,i[o])&&n.push(i[o]);return n},q.objDefineAccessors=function(e,t,n,r){var i=Object.defineProperty;if(i)try{var a={enumerable:!0,configurable:!0};return n&&(a.get=n),r&&(a.set=r),i(e,t,a),!0}catch(o){}return!1},q.addEventHandler=function(e,t){var n=!1,r=I();r&&(n=V(r,e,t),n=V(r.body,e,t)||n);var i=T();return i&&(n=H.Attach(i,e,t)||n),n},q.isTypeof=A,q.isUndefined=M,q.isNullOrUndefined=O,q.hasOwnProperty=U,q.isFunction=z,q.isObject=R,q);function q(){}var B,F,W=/[xy]/g,H=(X.Attach=V,X.AttachEvent=V,X.Detach=G,X.DetachEvent=G,X);function X(){}(F=B=B||{})[F.CRITICAL=1]="CRITICAL",F[F.WARNING=2]="WARNING";var K=1,Q=2,J=3,Y=4,$=5,Z=6,ee=8,te=10,ne=11,re=23,ie=25,ae=29,oe=30,se=31,ce=32,le=35,ue=36,ge=37,fe=38,pe=39,de=45,he=49,me=52,ve=56,ye=57,Ie=61,Te=62,Se=63,we=64,_e=66,Ne=68,xe=69,Ee=73,be=(De.sanitizeDiagnosticText=function(e){return e?'"'+e.replace(/\"/g,"")+'"':""},De.dataType="MessageData",De.AiNonUserActionablePrefix="AI (Internal): ",De.AiUserActionablePrefix="AI: ",De);function De(e,t,n,r){void 0===n&&(n=!1),this.messageId=e,this.message=(n?De.AiUserActionablePrefix:De.AiNonUserActionablePrefix)+e;var i="";x()&&(i=E().stringify(r));var a=(t?" message:"+De.sanitizeDiagnosticText(t):"")+(r?" props:"+De.sanitizeDiagnosticText(i):"");this.message+=a}var Ce=(Pe.prototype.throwInternal=function(e,t,n,r,i){void 0===i&&(i=!1);var a=new be(t,n,i,r),o=this;if(o.enableDebugExceptions())throw a;if(!j.isUndefined(a)&&a&&!j.isUndefined(a.message)){if(i){var s=+a.messageId;!o._messageLogged[s]&&o.consoleLoggingLevel()>=B.WARNING&&(o.warnToConsole(a.message),o._messageLogged[s]=!0)}else o.consoleLoggingLevel()>=B.WARNING&&o.warnToConsole(a.message);o.logInternalMessage(e,a)}},Pe.prototype.warnToConsole=function(e){!j.isUndefined(console)&&console&&(j.isFunction(console.warn)?console.warn(e):j.isFunction(console.log)&&console.log(e))},Pe.prototype.resetInternalMessageCount=function(){this._messageCount=0,this._messageLogged={}},Pe.prototype.logInternalMessage=function(e,t){var n=this;if(!n._areInternalMessagesThrottled()){var r=!0,i=n.AIInternalMessagePrefix+t.messageId;if(n._messageLogged[i]?r=!1:n._messageLogged[i]=!0,r&&(e<=n.telemetryLoggingLevel()&&(n.queue.push(t),n._messageCount++),n._messageCount===n.maxInternalMessageLimit())){var a="Internal events throttle limit per PageView reached for this app.",o=new be(re,a,!1);n.queue.push(o),n.warnToConsole(a)}}},Pe.prototype._areInternalMessagesThrottled=function(){return this._messageCount>=this.maxInternalMessageLimit()},Pe);function Pe(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},j.isNullOrUndefined(e)||(j.isNullOrUndefined(e.loggingLevelConsole)||(this.consoleLoggingLevel=function(){return e.loggingLevelConsole}),j.isNullOrUndefined(e.loggingLevelTelemetry)||(this.telemetryLoggingLevel=function(){return e.loggingLevelTelemetry}),j.isNullOrUndefined(e.maxMessageLimit)||(this.maxInternalMessageLimit=function(){return e.maxMessageLimit}),j.isNullOrUndefined(e.enableDebugExceptions)||(this.enableDebugExceptions=function(){return e.enableDebugExceptions}))}var ke=j.isFunction,Le=function Yn(i,a){var o=this,s=null,c=ke(i.processTelemetry),l=ke(i.setNextPlugin);o._hasRun=!1,o.getPlugin=function(){return i},o.getNext=function(){return s},o.setNext=function(e){s=e},o.processTelemetry=function(e,t){if(t=t||a,i&&c){o._hasRun=!0;try{t.setNext(s),l&&i.setNextPlugin(s),s&&(s._hasRun=!1),i.processTelemetry(e,t)}catch(r){var n=s&&s._hasRun;s&&n||t.diagLog().throwInternal(B.CRITICAL,Ee,"Plugin ["+i.identifier+"] failed during processTelemetry - "+r),s&&!n&&s.processTelemetry(e,t)}}else s&&(o._hasRun=!0,s.processTelemetry(e,t))}},Ae=j.isNullOrUndefined;function Me(e,t){var n=[];if(e&&0<e.length)for(var r=null,i=0;i<e.length;i++){var a=e[i];if(a&&j.isFunction(a.processTelemetry)){var o=new Le(a,t);n.push(o),r&&r.setNext(o),r=o}}return 0<n.length?n[0]:null}var Oe=function $n(e,a,n,t){var o=this,r=null;null!==t&&(e&&j.isFunction(e.getPlugin)?r=function s(e,t,n){var r=[],i=!n;if(e)for(;e;){var a=e.getPlugin();!i&&a!==n||(i=!0,r.push(a)),e=e.getNext()}return i||r.push(n),Me(r,t)}(e,o,t||e.getPlugin()):t?r=function c(e,t,n){var r=e,i=!1;return n&&e&&(r=[],j.arrForEach(e,function(e){!i&&e!==n||(i=!0,r.push(e))})),n&&!i&&(r=r||[]).push(n),Me(r,t)}(e,o,t):j.isUndefined(t)&&(r=Me(e,o))),o.core=function(){return n},o.diagLog=function(){var e=(n||{}).logger;return e=e||new Ce(a||{})},o.getCfg=function(){return a},o.getExtCfg=function(e,t){var n;if(void 0===t&&(t={}),a){var r=a.extensionConfig;r&&e&&(n=r[e])}return n||t},o.getConfig=function(e,t,n){var r;void 0===n&&(n=!1);var i=o.getExtCfg(e,null);return i&&!Ae(i[t])?r=i[t]:a&&!Ae(a[t])&&(r=a[t]),Ae(r)?n:r},o.hasNext=function(){return null!=r},o.getNext=function(){return r},o.setNext=function(e){r=e},o.processNext=function(e){var t=r;t&&(r=t.getNext(),t.processTelemetry(e,o))},o.createNew=function(e,t){return void 0===e&&(e=null),new $n(e||r,a,n,t)}},Ue=j.isFunction,Re="getPlugin",ze=(Ve.prototype.initialize=function(e,t,n,r){this._baseTelInit(e,t,n,r)},Ve);function Ve(){var a=this,o=!1,s=null,c=null;a.core=null,a.diagLog=function(e){return a._getTelCtx(e).diagLog()},a.isInitialized=function(){return o},a.setInitialized=function(e){o=e},a.setNextPlugin=function(e){c=e},a.processNext=function(e,t){t?t.processNext(e):c&&Ue(c.processTelemetry)&&c.processTelemetry(e,null)},a._getTelCtx=function(e){void 0===e&&(e=null);var t=e;if(!t){var n=s||new Oe(null,{},a.core);t=c&&c[Re]?n.createNew(null,c[Re]):n.createNew(null,c)}return t},a._baseTelInit=function(e,t,n,r){e&&(e.extensionConfig=e.extensionConfig||[]),!r&&t&&(r=t.getProcessTelContext().getNext());var i=c;c&&c[Re]&&(i=c[Re]()),a.core=t,s=new Oe(r,e,t,i),o=!0}}var Ge=j.isFunction,je="processTelemetry",qe="priority",Be="setNextPlugin",Fe="isInitialized";function We(t,n){for(var e=[],r=null,i=t.getNext();i;){var a=i.getPlugin();a&&(r&&Ge(r[Be])&&Ge(a[je])&&r[Be](a),Ge(a[Fe])&&a[Fe]()||e.push(a),r=a,i=i.getNext())}j.arrForEach(e,function(e){e.initialize(t.getCfg(),t.core(),n,t.getNext())})}function He(e){return e.sort(function(e,t){var n=0,r=Ge(t[je]);return Ge(e[je])?n=r?e[qe]-t[qe]:1:r&&(n=-1),n})}var Xe=500,Ke="Channel has invalid priority",Qe=j.arrForEach,Je=j.objDefineAccessors;function Ye(e,t){t&&0<t.length&&(function n(e){Qe(e,function(e){if(e.priority<Xe)throw Error(Ke+e.identifier)})}(t=t.sort(function(e,t){return e.priority-t.priority})),e.push(t))}var $e,Ze=(t(et,$e=ze),et.prototype.processTelemetry=function(t,n){var r=this;this._channelQueue&&Qe(this._channelQueue,function(e){0<e.length&&r._getTelCtx(n).createNew(e).processNext(t)})},et.prototype.getChannelControls=function(){return this._channelQueue},et.prototype.initialize=function(t,n,r){if(!this.isInitialized()){$e.prototype.initialize.call(this,t,n,r),t.isCookieUseDisabled&&j.disableCookies();var e=this._channelQueue=function i(e,t){var n=[];if(e&&Qe(e,function(e){return Ye(n,e)}),t){var r=[];Qe(t,function(e){e.priority>Xe&&r.push(e)}),Ye(n,r)}return n}((t||{}).channels,r);Qe(e,function(e){return We(new Oe(e,t,n),r)})}},et._staticInit=(Je(et.prototype,"ChannelControls",et.prototype.getChannelControls),void Je(et.prototype,"channelQueue",et.prototype.getChannelControls)),et);function et(){var e=null!==$e&&$e.apply(this,arguments)||this;return e.identifier="ChannelControllerPlugin",e.priority=Xe,e}var tt=j.arrForEach,nt=j.isNullOrUndefined,rt=(it.prototype.initialize=function(e,t,r,n){var i=this;if(i.isInitialized())throw Error("Core should not be initialized more than once");if(!e||nt(e.instrumentationKey))throw Error("Please provide instrumentation key");i.config=e;var a=i._channelController;n=n||j.objCreate({addNotificationListener:function(e){},removeNotificationListener:function(e){},eventsSent:function(e){},eventsDiscarded:function(e,t){}}),i._notificationManager=n,e.extensions=nt(e.extensions)?[]:e.extensions,(e.extensionConfig=nt(e.extensionConfig)?{}:e.extensionConfig).NotificationManager=n,r=r||j.objCreate({throwInternal:function(e,t,n,r,i){void 0===i&&(i=!1)},warnToConsole:function(e){},resetInternalMessageCount:function(){}}),i.logger=r;var o=[];o.push.apply(o,t.concat(e.extensions)),o=He(o);var s=[],c={};if(tt(o,function(e){if(nt(e)||nt(e.initialize))throw Error("Extensions must provide callback to initialize");var t=e.priority,n=e.identifier;e&&t&&(nt(c[t])?c[t]=n:r.warnToConsole("Two extensions have same priority #"+t+" - "+c[t]+", "+n)),(!t||t<a.priority)&&s.push(e)}),o.push(a),s.push(a),o=He(o),i._extensions=o,We(new Oe([a],e,i),o),We(new Oe(s,e,i),o),i._extensions=s,0===i.getTransmissionControls().length)throw new Error("No channels available");i._setInit(!0)},it.prototype.getTransmissionControls=function(){return this._channelController.getChannelControls()},it.prototype.track=function(e){var t=this;e.iKey||(e.iKey=t.config.instrumentationKey),e.time||(e.time=j.toISOString(new Date)),nt(e.ver)&&(e.ver="4.0"),t.isInitialized()?(0<t._eventQueue.length&&(tt(t._eventQueue,function(e){t.getProcessTelContext().processNext(e)}),t._eventQueue=[]),t.getProcessTelContext().processNext(e)):t._eventQueue.push(e)},it.prototype.getProcessTelContext=function(){var e=this._extensions,t=e;return e&&0!==e.length||(t=[this._channelController]),new Oe(t,this.config,this)},it);function it(){var t=!1,e=this;e._extensions=new Array,e._channelController=new Ze,e.isInitialized=function(){return t},e._setInit=function(e){t=e},e._eventQueue=[]}var at=(ot.prototype.addNotificationListener=function(e){this.listeners.push(e)},ot.prototype.removeNotificationListener=function(e){for(var t=j.arrIndexOf(this.listeners,e);-1<t;)this.listeners.splice(t,1),t=j.arrIndexOf(this.listeners,e)},ot.prototype.eventsSent=function(t){for(var n=this,e=function(e){r.listeners[e].eventsSent&&setTimeout(function(){return n.listeners[e].eventsSent(t)},0)},r=this,i=0;i<this.listeners.length;++i)e(i)},ot.prototype.eventsDiscarded=function(t,n){for(var r=this,e=function(e){i.listeners[e].eventsDiscarded&&setTimeout(function(){return r.listeners[e].eventsDiscarded(t,n)},0)},i=this,a=0;a<this.listeners.length;++a)e(a)},ot);function ot(){this.listeners=[]}var st;t(ct,st=rt),ct.prototype.initialize=function(e,t){var n=this;n._notificationManager=new at,n.logger=new Ce(e),n.config=e,st.prototype.initialize.call(this,e,t,n.logger,n._notificationManager)},ct.prototype.getTransmissionControls=function(){return st.prototype.getTransmissionControls.call(this)},ct.prototype.track=function(e){if(null===e)throw this._notifyInvalidEvent(e),Error("Invalid telemetry item");this._validateTelemetryItem(e),st.prototype.track.call(this,e)},ct.prototype.addNotificationListener=function(e){this._notificationManager&&this._notificationManager.addNotificationListener(e)},ct.prototype.removeNotificationListener=function(e){this._notificationManager&&this._notificationManager.removeNotificationListener(e)},ct.prototype.pollInternalLogs=function(r){var t=this,e=this.config.diagnosticLogInterval;return 0<e||(e=1e4),setInterval(function(){var n=t,e=n.logger?n.logger.queue:[];j.arrForEach(e,function(e){var t={name:r||"InternalMessageId: "+e.messageId,iKey:n.config.instrumentationKey,time:j.toISOString(new Date),baseType:be.dataType,baseData:{message:e.message}};n.track(t)}),e.length=0},e)},ct.prototype._validateTelemetryItem=function(e){if(j.isNullOrUndefined(e.name))throw this._notifyInvalidEvent(e),Error("telemetry name required")},ct.prototype._notifyInvalidEvent=function(e){this._notificationManager&&this._notificationManager.eventsDiscarded([e],l)};function ct(){return st.call(this)||this}var lt=(ut.sanitizeKeyAndAddUniqueness=function(e,t,n){var r=t.length,i=ut.sanitizeKey(e,t);if(i.length!==r){for(var a=0,o=i;n[o]!==undefined;)a++,o=i.substring(0,ut.MAX_NAME_LENGTH-3)+ut.padNumber(a);i=o}return i},ut.sanitizeKey=function(e,t){var n;return t&&(t=ut.trim(t.toString())).length>ut.MAX_NAME_LENGTH&&(n=t.substring(0,ut.MAX_NAME_LENGTH),e.throwInternal(B.WARNING,ye,"name is too long. It has been truncated to "+ut.MAX_NAME_LENGTH+" characters.",{name:t},!0)),n||t},ut.sanitizeString=function(e,t,n){var r;return void 0===n&&(n=ut.MAX_STRING_LENGTH),t&&(n=n||ut.MAX_STRING_LENGTH,(t=ut.trim(t)).toString().length>n&&(r=t.toString().substring(0,n),e.throwInternal(B.WARNING,Ie,"string value is too long. It has been truncated to "+n+" characters.",{value:t},!0))),r||t},ut.sanitizeUrl=function(e,t){return ut.sanitizeInput(e,t,ut.MAX_URL_LENGTH,_e)},ut.sanitizeMessage=function(e,t){var n;return t&&t.length>ut.MAX_MESSAGE_LENGTH&&(n=t.substring(0,ut.MAX_MESSAGE_LENGTH),e.throwInternal(B.WARNING,ve,"message is too long, it has been truncated to "+ut.MAX_MESSAGE_LENGTH+" characters.",{message:t},!0)),n||t},ut.sanitizeException=function(e,t){var n;return t&&t.length>ut.MAX_EXCEPTION_LENGTH&&(n=t.substring(0,ut.MAX_EXCEPTION_LENGTH),e.throwInternal(B.WARNING,me,"exception is too long, it has been truncated to "+ut.MAX_EXCEPTION_LENGTH+" characters.",{exception:t},!0)),n||t},ut.sanitizeProperties=function(e,t){if(t){var n={};for(var r in t){var i=t[r];if(j.isObject(i)&&x())try{i=E().stringify(i)}catch(a){e.throwInternal(B.WARNING,he,"custom property is not valid",{exception:a},!0)}i=ut.sanitizeString(e,i,ut.MAX_PROPERTY_LENGTH),n[r=ut.sanitizeKeyAndAddUniqueness(e,r,n)]=i}t=n}return t},ut.sanitizeMeasurements=function(e,t){if(t){var n={};for(var r in t){var i=t[r];n[r=ut.sanitizeKeyAndAddUniqueness(e,r,n)]=i}t=n}return t},ut.sanitizeId=function(e,t){return t?ut.sanitizeInput(e,t,ut.MAX_ID_LENGTH,xe).toString():t},ut.sanitizeInput=function(e,t,n,r){var i;return t&&(t=ut.trim(t)).length>n&&(i=t.substring(0,n),e.throwInternal(B.WARNING,r,"input is too long, it has been truncated to "+n+" characters.",{data:t},!0)),i||t},ut.padNumber=function(e){var t="00"+e;return t.substr(t.length-3)},ut.trim=function(e){return j.isString(e)?e.replace(/^\s+|\s+$/g,""):e},ut.MAX_NAME_LENGTH=150,ut.MAX_ID_LENGTH=128,ut.MAX_PROPERTY_LENGTH=8192,ut.MAX_STRING_LENGTH=1024,ut.MAX_URL_LENGTH=2048,ut.MAX_MESSAGE_LENGTH=32768,ut.MAX_EXCEPTION_LENGTH=32768,ut);function ut(){}var gt="prototype",ft=S(),pt=j.isString,dt=null;var ht=(mt.createDomEvent=function(e){var t=null;if(j.isFunction(Event))t=new Event(e);else{var n=T();n&&n.createEvent&&(t=n.createEvent("Event")).initEvent(e,!0,!0)}return t},mt.disableStorage=function(){mt._canUseLocalStorage=!1,mt._canUseSessionStorage=!1},mt._getLocalStorageObject=function(){return mt.canUseLocalStorage()?mt._getVerifiedStorageObject(a.LocalStorage):null},mt._getVerifiedStorageObject=function(e){var t,n,r=null;try{if(j.isNullOrUndefined(m()))return null;n=new Date,(r=e===a.LocalStorage?v("localStorage"):v("sessionStorage")).setItem(n.toString(),n.toString()),t=r.getItem(n.toString())!==n.toString(),r.removeItem(n.toString()),t&&(r=null)}catch(i){r=null}return r},mt.isInternalApplicationInsightsEndpoint=function(e){return-1!==mt._internalEndpoints.indexOf(e.toLowerCase())},mt.canUseLocalStorage=function(){return mt._canUseLocalStorage===undefined&&(mt._canUseLocalStorage=!!mt._getVerifiedStorageObject(a.LocalStorage)),mt._canUseLocalStorage},mt.getStorage=function(e,t){var n=mt._getLocalStorageObject();if(null!==n)try{return n.getItem(t)}catch(r){mt._canUseLocalStorage=!1,e.throwInternal(B.WARNING,K,"Browser failed read of local storage. "+mt.getExceptionName(r),{exception:mt.dump(r)})}return null},mt.setStorage=function(e,t,n){var r=mt._getLocalStorageObject();if(null!==r)try{return r.setItem(t,n),!0}catch(i){mt._canUseLocalStorage=!1,e.throwInternal(B.WARNING,J,"Browser failed write to local storage. "+mt.getExceptionName(i),{exception:mt.dump(i)})}return!1},mt.removeStorage=function(e,t){var n=mt._getLocalStorageObject();if(null!==n)try{return n.removeItem(t),!0}catch(r){mt._canUseLocalStorage=!1,e.throwInternal(B.WARNING,$,"Browser failed removal of local storage item. "+mt.getExceptionName(r),{exception:mt.dump(r)})}return!1},mt._getSessionStorageObject=function(){return mt.canUseSessionStorage()?mt._getVerifiedStorageObject(a.SessionStorage):null},mt.canUseSessionStorage=function(){return mt._canUseSessionStorage===undefined&&(mt._canUseSessionStorage=!!mt._getVerifiedStorageObject(a.SessionStorage)),mt._canUseSessionStorage},mt.getSessionStorageKeys=function(){var e=[];if(mt.canUseSessionStorage())for(var t in v("sessionStorage"))e.push(t);return e},mt.getSessionStorage=function(e,t){var n=mt._getSessionStorageObject();if(null!==n)try{return n.getItem(t)}catch(r){mt._canUseSessionStorage=!1,e.throwInternal(B.WARNING,Q,"Browser failed read of session storage. "+mt.getExceptionName(r),{exception:mt.dump(r)})}return null},mt.setSessionStorage=function(e,t,n){var r=mt._getSessionStorageObject();if(null!==r)try{return r.setItem(t,n),!0}catch(i){mt._canUseSessionStorage=!1,e.throwInternal(B.WARNING,Y,"Browser failed write to session storage. "+mt.getExceptionName(i),{exception:mt.dump(i)})}return!1},mt.removeSessionStorage=function(e,t){var n=mt._getSessionStorageObject();if(null!==n)try{return n.removeItem(t),!0}catch(r){mt._canUseSessionStorage=!1,e.throwInternal(B.WARNING,Z,"Browser failed removal of session storage item. "+mt.getExceptionName(r),{exception:mt.dump(r)})}return!1},mt.disableCookies=function(){j.disableCookies()},mt.canUseCookies=function(e){if(j._canUseCookies===undefined){j._canUseCookies=!1;try{j._canUseCookies=mt.document.cookie!==undefined}catch(t){e.throwInternal(B.WARNING,Ne,"Cannot access document.cookie - "+mt.getExceptionName(t),{exception:mt.dump(t)})}}return j._canUseCookies&&mt.document&&mt.document.cookie},mt.disallowsSameSiteNone=function(e){return!!pt(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 i(e,t){var n=e.length,r=n-t.length;return e.substring(0<=r?r: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"))},mt.setCookie=function(e,t,n,r){if(mt.canUseCookies(e)){var i="",a="";r&&(i=";domain="+r);var o=_();o&&"https:"===o.protocol&&(a=";secure",null===dt&&(dt=mt.disallowsSameSiteNone((S()||{}).userAgent)),dt||(n+=";SameSite=None")),mt.document.cookie=t+"="+n+i+";path=/"+a}},mt.stringToBoolOrDefault=function(e,t){return void 0===t&&(t=!1),e===undefined||null===e?t:"true"===e.toString().toLowerCase()},mt.getCookie=function(e,t){if(mt.canUseCookies(e)){var n="";if(t&&t.length)for(var r=t+"=",i=mt.document.cookie.split(";"),a=0;a<i.length;a++){var o=i[a];if((o=mt.trim(o))&&0===o.indexOf(r)){n=o.substring(r.length,i[a].length);break}}return n}},mt.deleteCookie=function(e,t){mt.canUseCookies(e)&&(mt.document.cookie=t+"=;path=/;expires=Thu, 01 Jan 1970 00:00:01 GMT;")},mt.trim=function(e){return pt(e)?e.replace(/^\s+|\s+$/g,""):e},mt.newId=function(){for(var e="",t=1073741824*Math.random();0<t;)e+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(t%64),t=Math.floor(t/64);return e},mt.random32=function(){return 4294967296*Math.random()|0},mt.generateW3CId=function(){for(var e,t=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"],n="",r=0;r<4;r++)n+=t[15&(e=mt.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 i=t[8+4*Math.random()|0];return n.substr(0,8)+n.substr(9,4)+"4"+n.substr(13,3)+i+n.substr(16,3)+n.substr(19,12)},mt.isArray=function(e){return"[object Array]"===Object[gt].toString.call(e)},mt.isError=function(e){return"[object Error]"===Object[gt].toString.call(e)},mt.getIEVersion=function(e){void 0===e&&(e=null);var t=e?e.toLowerCase():ft?(ft.userAgent||"").toLowerCase():"";return-1!==t.indexOf("msie")?parseInt(t.split("msie")[1]):null},mt.msToTimeSpan=function(e){(isNaN(e)||e<0)&&(e=0);var t=""+(e=Math.round(e))%1e3,n=""+Math.floor(e/1e3)%60,r=""+Math.floor(e/6e4)%60,i=""+Math.floor(e/36e5)%24,a=Math.floor(e/864e5);return t=1===t.length?"00"+t:2===t.length?"0"+t:t,n=n.length<2?"0"+n:n,r=r.length<2?"0"+r:r,(0<a?a+".":"")+(i=i.length<2?"0"+i:i)+":"+r+":"+n+"."+t},mt.isCrossOriginError=function(e,t,n,r,i){return("Script error."===e||"Script error"===e)&&!i},mt.dump=function(e){var t=Object[gt].toString.call(e),n="";return"[object Error]"===t?n="{ stack: '"+e.stack+"', message: '"+e.message+"', name: '"+e.name+"'":x()&&(n=E().stringify(e)),t+n},mt.getExceptionName=function(e){return"[object Error]"===Object[gt].toString.call(e)?e.name:""},mt.addEventHandler=function(e,t){return H.Attach(I(),e,t)},mt.IsBeaconApiSupported=function(){return"sendBeacon"in ft&&ft.sendBeacon},mt.getExtension=function(e,t){for(var n=null,r=0;!n&&r<e.length;)e[r]&&e[r].identifier===t&&(n=e[r]),r++;return n},mt.document=T()||{},mt._canUseLocalStorage=undefined,mt._canUseSessionStorage=undefined,mt._internalEndpoints=["https://dc.services.visualstudio.com/v2/track","https://breeze.aimon.applicationinsights.io/v2/track","https://dc-int.services.visualstudio.com/v2/track"],mt.NotSpecified="not_specified",mt.isDate=j.isDate,mt.toISOStringForIE8=j.toISOString,mt);function mt(){}var vt=(yt.parseUrl=function(e){return yt.htmlAnchorElement||(yt.htmlAnchorElement=yt.document.createElement?yt.document.createElement("a"):{host:yt.parseHost(e)}),yt.htmlAnchorElement.href=e,yt.htmlAnchorElement},yt.getAbsoluteUrl=function(e){var t,n=yt.parseUrl(e);return n&&(t=n.href),t},yt.getPathName=function(e){var t,n=yt.parseUrl(e);return n&&(t=n.pathname),t},yt.getCompleteUrl=function(e,t){return e?e.toUpperCase()+" "+t:t},yt.parseHost=function(e){if(e){var t=e.match(/:\/\/(www[0-9]?\.)?(.[^/:]+)/i);if(null!=t&&2<t.length&&pt(t[2])&&0<t[2].length)return t[2]}return null},yt.document=T()||{},yt);function yt(){}var It=(Tt.ParseDependencyPath=function(e,t,n,r){var i,a=r,o=r;if(t&&0<t.length){var s=vt.parseUrl(t);if(i=s.host,!a)if(null!=s.pathname){var c=0===s.pathname.length?"/":s.pathname;"/"!==c.charAt(0)&&(c="/"+c),o=s.pathname,a=lt.sanitizeString(e,n?n+" "+c:c)}else a=lt.sanitizeString(e,t)}else a=i=r;return{target:i,name:a,data:o}},Tt);function Tt(){}var St=(wt.Now=function(){var e=N();return e&&e.now&&e.timing?e.now()+e.timing.navigationStart:(new Date).getTime()},wt.GetDuration=function(e,t){var n=null;return 0===e||0===t||j.isNullOrUndefined(e)||j.isNullOrUndefined(t)||(n=t-e),n},wt);function wt(){}var _t,Nt=(t(xt,_t=function Zn(){}),xt);function xt(){return _t.call(this)||this}var Et;t(bt,Et=function er(){this.ver=1,this.sampleRate=100,this.tags={}});function bt(e,t,n){var r=Et.call(this)||this;return r.name=lt.sanitizeString(e,n)||ht.NotSpecified,r.data=t,r.time=j.toISOString(new Date),r.aiDataContract={time:d.Required,iKey:d.Required,name:d.Required,sampleRate:function(){return 100===r.sampleRate?d.Hidden:d.Required},tags:d.Required,data:d.Required},r}var Dt,Ct=function tr(){},Pt=(t(kt,Dt=Ct),kt);function kt(){var e=Dt.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}var Lt,At=(t(Mt,Lt=Pt),Mt.envelopeType="Microsoft.ApplicationInsights.{0}.Event",Mt.dataType="EventData",Mt);function Mt(e,t,n,r){var i=Lt.call(this)||this;return i.aiDataContract={ver:d.Required,name:d.Required,properties:d.Default,measurements:d.Default},i.name=lt.sanitizeString(e,t)||ht.NotSpecified,i.properties=lt.sanitizeProperties(e,n),i.measurements=lt.sanitizeMeasurements(e,r),i}var Ot,Ut=function nr(){},Rt=(t(zt,Ot=Ct),zt);function zt(){var e=Ot.call(this)||this;return e.ver=2,e.exceptions=[],e.properties={},e.measurements={},e}var Vt,Gt=function rr(){this.hasFullStack=!0,this.parsedStack=[]},jt=(t(qt,Vt=Rt),qt.CreateFromInterface=function(t,e){var n=e.exceptions&&j.arrMap(e.exceptions,function(e){return Ft.CreateFromInterface(t,e)});return new qt(t,c({},e,{exceptions:n}))},qt.prototype.toInterface=function(){var e=this,t=e.exceptions,n=e.properties,r=e.measurements,i=e.severityLevel,a=(e.ver,e.problemGroup),o=e.id,s=e.isManual;return{ver:"4.0",exceptions:t instanceof Array&&j.arrMap(t,function(e){return e.toInterface()})||undefined,severityLevel:i,properties:n,measurements:r,problemGroup:a,id:o,isManual:s}},qt.CreateSimpleException=function(e,t,n,r,i,a){return{exceptions:[{hasFullStack:!0,message:e,stack:i,typeName:t}]}},qt.envelopeType="Microsoft.ApplicationInsights.{0}.Exception",qt.dataType="ExceptionData",qt);function qt(e,t,n,r,i,a){var o=Vt.call(this)||this;return o.aiDataContract={ver:d.Required,exceptions:d.Required,severityLevel:d.Default,properties:d.Default,measurements:d.Default},t instanceof Error?(o.exceptions=[new Ft(e,t)],o.properties=lt.sanitizeProperties(e,n),o.measurements=lt.sanitizeMeasurements(e,r),i&&(o.severityLevel=i),a&&(o.id=a)):(o.exceptions=t.exceptions,o.properties=t.properties,o.measurements=t.measurements,t.severityLevel&&(o.severityLevel=t.severityLevel),t.id&&(o.id=t.id),t.problemGroup&&(o.problemGroup=t.problemGroup),o.ver=2,j.isNullOrUndefined(t.isManual)||(o.isManual=t.isManual)),o}var Bt,Ft=(t(Wt,Bt=Gt),Wt.prototype.toInterface=function(){var e=this.parsedStack instanceof Array&&j.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}},Wt.CreateFromInterface=function(e,t){var n=t.parsedStack instanceof Array&&j.arrMap(t.parsedStack,function(e){return Xt.CreateFromInterface(e)})||t.parsedStack;return new Wt(e,c({},t,{parsedStack:n}))},Wt.parseStack=function(e){var t;if(j.isString(e)){var n=e.split("\n");t=[];for(var r=0,i=0,a=0;a<=n.length;a++){var o=n[a];if(Xt.regex.test(o)){var s=new Xt(n[a],r++);i+=s.sizeInBytes,t.push(s)}}if(32768<i)for(var c=0,l=t.length-1,u=0,g=c,f=l;c<l;){if(32768<(u+=t[c].sizeInBytes+t[l].sizeInBytes)){var p=f-g+1;t.splice(g,p);break}g=c,f=l,c++,l--}}return t},Wt);function Wt(e,t){var n=Bt.call(this)||this;if(n.aiDataContract={id:d.Default,outerId:d.Default,typeName:d.Required,message:d.Required,hasFullStack:d.Default,stack:d.Default,parsedStack:d.Array},t instanceof Error){n.typeName=lt.sanitizeString(e,t.name)||ht.NotSpecified,n.message=lt.sanitizeMessage(e,t.message)||ht.NotSpecified;var r=t.stack;n.parsedStack=Wt.parseStack(r),n.stack=lt.sanitizeException(e,r),n.hasFullStack=ht.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 Ht,Xt=(t(Kt,Ht=Ut),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=Ht.call(this)||this;if(n.sizeInBytes=0,n.aiDataContract={level:d.Required,method:d.Required,assembly:d.Default,fileName:d.Default,line:d.Default},"string"==typeof e){var r=e;n.level=t,n.method="<no_method>",n.assembly=ht.trim(r),n.fileName="",n.line=0;var i=r.match(Kt.regex);i&&5<=i.length&&(n.method=ht.trim(i[2])||n.method,n.fileName=ht.trim(i[4]),n.line=parseInt(i[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 Qt,Jt,Yt,$t=(t(Zt,Qt=Ct),Zt);function Zt(){var e=Qt.call(this)||this;return e.ver=2,e.metrics=[],e.properties={},e.measurements={},e}(Yt=Jt=Jt||{})[Yt.Measurement=0]="Measurement",Yt[Yt.Aggregation=1]="Aggregation";var en,tn=(t(nn,en=function ir(){this.kind=Jt.Measurement}),nn);function nn(){var e=null!==en&&en.apply(this,arguments)||this;return e.aiDataContract={name:d.Required,kind:d.Default,value:d.Required,count:d.Default,min:d.Default,max:d.Default,stdDev:d.Default},e}var rn,an=(t(on,rn=$t),on.envelopeType="Microsoft.ApplicationInsights.{0}.Metric",on.dataType="MetricData",on);function on(e,t,n,r,i,a,o,s){var c=rn.call(this)||this;c.aiDataContract={ver:d.Required,metrics:d.Required,properties:d.Default};var l=new tn;return l.count=0<r?r:undefined,l.max=isNaN(a)||null===a?undefined:a,l.min=isNaN(i)||null===i?undefined:i,l.name=lt.sanitizeString(e,t)||ht.NotSpecified,l.value=n,c.metrics=[l],c.properties=lt.sanitizeProperties(e,o),c.measurements=lt.sanitizeMeasurements(e,s),c}var sn,cn=(t(ln,sn=Pt),ln);function ln(){var e=sn.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}var un,gn=(t(fn,un=cn),fn.envelopeType="Microsoft.ApplicationInsights.{0}.Pageview",fn.dataType="PageviewData",fn);function fn(e,t,n,r,i,a,o){var s=un.call(this)||this;return s.aiDataContract={ver:d.Required,name:d.Default,url:d.Default,duration:d.Default,properties:d.Default,measurements:d.Default,id:d.Default},s.id=lt.sanitizeId(e,o),s.url=lt.sanitizeUrl(e,n),s.name=lt.sanitizeString(e,t)||ht.NotSpecified,isNaN(r)||(s.duration=ht.msToTimeSpan(r)),s.properties=lt.sanitizeProperties(e,i),s.measurements=lt.sanitizeMeasurements(e,a),s}var pn,dn=(t(hn,pn=Ct),hn);function hn(){var e=pn.call(this)||this;return e.ver=2,e.success=!0,e.properties={},e.measurements={},e}var mn,vn=(t(yn,mn=dn),yn.envelopeType="Microsoft.ApplicationInsights.{0}.RemoteDependency",yn.dataType="RemoteDependencyData",yn);function yn(e,t,n,r,i,a,o,s,c,l,u,g){void 0===c&&(c="Ajax");var f=mn.call(this)||this;f.aiDataContract={id:d.Required,ver:d.Required,name:d.Default,resultCode:d.Default,duration:d.Default,success:d.Default,data:d.Default,target:d.Default,type:d.Default,properties:d.Default,measurements:d.Default,kind:d.Default,value:d.Default,count:d.Default,min:d.Default,max:d.Default,stdDev:d.Default,dependencyKind:d.Default,dependencySource:d.Default,commandName:d.Default,dependencyTypeName:d.Default},f.id=t,f.duration=ht.msToTimeSpan(i),f.success=a,f.resultCode=o+"",f.type=lt.sanitizeString(e,c);var p=It.ParseDependencyPath(e,n,s,r);return f.data=lt.sanitizeUrl(e,r)||p.data,f.target=lt.sanitizeString(e,p.target),l&&(f.target=f.target+" | "+l),f.name=lt.sanitizeString(e,p.name),f.properties=lt.sanitizeProperties(e,u),f.measurements=lt.sanitizeMeasurements(e,g),f}var In,Tn=(t(Sn,In=Ct),Sn);function Sn(){var e=In.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}var wn,_n=(t(Nn,wn=Tn),Nn.envelopeType="Microsoft.ApplicationInsights.{0}.Message",Nn.dataType="MessageData",Nn);function Nn(e,t,n,r,i){var a=wn.call(this)||this;return a.aiDataContract={ver:d.Required,message:d.Required,severityLevel:d.Default,properties:d.Default},t=t||ht.NotSpecified,a.message=lt.sanitizeMessage(e,t),a.properties=lt.sanitizeProperties(e,r),a.measurements=lt.sanitizeMeasurements(e,i),n&&(a.severityLevel=n),a}var xn,En=(t(bn,xn=cn),bn);function bn(){var e=xn.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}var Dn,Cn=(t(Pn,Dn=En),Pn.envelopeType="Microsoft.ApplicationInsights.{0}.PageviewPerformance",Pn.dataType="PageviewPerformanceData",Pn);function Pn(e,t,n,r,i,a,o){var s=Dn.call(this)||this;return s.aiDataContract={ver:d.Required,name:d.Default,url:d.Default,duration:d.Default,perfTotal:d.Default,networkConnect:d.Default,sentRequest:d.Default,receivedResponse:d.Default,domProcessing:d.Default,properties:d.Default,measurements:d.Default},s.url=lt.sanitizeUrl(e,n),s.name=lt.sanitizeString(e,t)||ht.NotSpecified,s.properties=lt.sanitizeProperties(e,i),s.measurements=lt.sanitizeMeasurements(e,a),o&&(s.domProcessing=o.domProcessing,s.duration=o.duration,s.networkConnect=o.networkConnect,s.perfTotal=o.perfTotal,s.receivedResponse=o.receivedResponse,s.sentRequest=o.sentRequest),s}var kn,Ln,An;t(Mn,kn=Nt);function Mn(e,t){var n=kn.call(this)||this;return n.aiDataContract={baseType:d.Required,baseData:d.Required},n.baseType=e,n.baseData=t,n}(An=Ln=Ln||{})[An.Verbose=0]="Verbose",An[An.Information=1]="Information",An[An.Warning=2]="Warning",An[An.Error=3]="Error",An[An.Critical=4]="Critical";var On=(Un.create=function(e,t,n,r,i,a){if(n=lt.sanitizeString(r,n)||ht.NotSpecified,j.isNullOrUndefined(e)||j.isNullOrUndefined(t)||j.isNullOrUndefined(n))throw Error("Input doesn't contain all required fields");var o={name:n,time:j.toISOString(new Date),iKey:"",ext:a||{},tags:[],data:{},baseType:t,baseData:e};if(!j.isNullOrUndefined(i))for(var s in i)i.hasOwnProperty(s)&&(o.data[s]=i[s]);return o},Un);function Un(){}var Rn=(zn.prototype.trackPageView=function(n,r){var i=this,a=n.name;if(j.isNullOrUndefined(a)||"string"!=typeof a){var e=T();a=n.name=e&&e.title||""}var o=n.uri;if(j.isNullOrUndefined(o)||"string"!=typeof o){var t=_();o=n.uri=t&&t.href||""}if(!this._pageViewPerformanceManager.isPerformanceTimingSupported())return this.appInsights.sendPageViewInternal(n,r),j.arrForEach(this._channel(),function(e){j.arrForEach(e,function(e){return e.flush(!0)})}),void this._logger.throwInternal(B.WARNING,ie,"trackPageView: navigation timing API used for calculation of page duration is not supported in this browser. This page view will be collected without duration and timing info.");var s,c,l=!1,u=this._pageViewPerformanceManager.getPerformanceTiming().navigationStart;s=St.GetDuration(u,+new Date),this._pageViewPerformanceManager.shouldCollectDuration(s)||(s=undefined),j.isNullOrUndefined(r)||j.isNullOrUndefined(r.duration)||(c=r.duration),!this.overridePageViewDuration&&isNaN(c)||(isNaN(c)&&((r=r||{}).duration=s),this.appInsights.sendPageViewInternal(n,r),j.arrForEach(this._channel(),function(e){j.arrForEach(e,function(e){return e.flush(!0)})}),l=!0),r=r||{};var g=setInterval(function(){try{if(i._pageViewPerformanceManager.isPerformanceTimingDataReady()){clearInterval(g);var e={name:a,uri:o};i._pageViewPerformanceManager.populatePageViewPerformanceEvent(e),e.isValid||l?(l||(r.duration=e.durationMs,i.appInsights.sendPageViewInternal(n,r)),i.pageViewPerformanceSent||(i.appInsights.sendPageViewPerformanceInternal(e,r),i.pageViewPerformanceSent=!0),j.arrForEach(i._channel(),function(e){j.arrForEach(e,function(e){return e.flush(!0)})})):(r.duration=s,i.appInsights.sendPageViewInternal(n,r),j.arrForEach(i._channel(),function(e){j.arrForEach(e,function(e){return e.flush(!0)})}))}else 6e4<St.GetDuration(u,+new Date)&&(clearInterval(g),l||(r.duration=6e4,i.appInsights.sendPageViewInternal(n,r),j.arrForEach(i._channel(),function(e){j.arrForEach(e,function(e){return e.flush(!0)})})))}catch(t){i._logger.throwInternal(B.CRITICAL,fe,"trackPageView failed on page load calculation: "+ht.getExceptionName(t),{exception:ht.dump(t)})}},100)},zn);function zn(e,t,n,r){this.pageViewPerformanceSent=!1,this.overridePageViewDuration=!1,this.overridePageViewDuration=t,this.appInsights=e,this._pageViewPerformanceManager=r,n&&(this._channel=function(){return n.getTransmissionControls()},this._logger=n.logger)}var Vn=(Gn.prototype.trackPreviousPageVisit=function(e,t){try{var n=this.restartPageVisitTimer(e,t);n&&this.pageVisitTimeTrackingHandler(n.pageName,n.pageUrl,n.pageVisitTime)}catch(r){this._logger.warnToConsole("Auto track page visit time failed, metric will not be collected: "+ht.dump(r))}},Gn.prototype.restartPageVisitTimer=function(e,t){try{var n=this.stopPageVisitTimer();return this.startPageVisitTimer(e,t),n}catch(r){return this._logger.warnToConsole("Call to restart failed: "+ht.dump(r)),null}},Gn.prototype.startPageVisitTimer=function(e,t){try{if(ht.canUseSessionStorage()){if(null!=ht.getSessionStorage(this._logger,this.prevPageVisitDataKeyName))throw new Error("Cannot call startPageVisit consecutively without first calling stopPageVisit");var n=new jn(e,t),r=E().stringify(n);ht.setSessionStorage(this._logger,this.prevPageVisitDataKeyName,r)}}catch(i){this._logger.warnToConsole("Call to start failed: "+ht.dump(i))}},Gn.prototype.stopPageVisitTimer=function(){try{if(ht.canUseSessionStorage()){var e=Date.now(),t=ht.getSessionStorage(this._logger,this.prevPageVisitDataKeyName);if(t&&x()){var n=E().parse(t);return n.pageVisitTime=e-n.pageVisitStartTime,ht.removeSessionStorage(this._logger,this.prevPageVisitDataKeyName),n}return null}return null}catch(r){return this._logger.warnToConsole("Stop page visit timer failed: "+ht.dump(r)),null}},Gn);function Gn(e,t){this.prevPageVisitDataKeyName="prevPageVisitData",this.pageVisitTimeTrackingHandler=t,this._logger=e}var jn=function ar(e,t){this.pageVisitStartTime=Date.now(),this.pageName=e,this.pageUrl=t},qn=(Bn.prototype.populatePageViewPerformanceEvent=function(e){e.isValid=!1;var t=this.getPerformanceNavigationTiming(),n=this.getPerformanceTiming();if(t||n){if(t)var r=t.duration,i=St.GetDuration(t.startTime,t.connectEnd),a=St.GetDuration(t.requestStart,t.responseStart),o=St.GetDuration(t.responseStart,t.responseEnd),s=St.GetDuration(t.responseEnd,t.loadEventEnd);else r=St.GetDuration(n.navigationStart,n.loadEventEnd),i=St.GetDuration(n.navigationStart,n.connectEnd),a=St.GetDuration(n.requestStart,n.responseStart),o=St.GetDuration(n.responseStart,n.responseEnd),s=St.GetDuration(n.responseEnd,n.loadEventEnd);0===r?this._logger.throwInternal(B.WARNING,te,"error calculating page view performance.",{total:r,network:i,request:a,response:o,dom:s}):this.shouldCollectDuration(r,i,a,o,s)?r<Math.floor(i)+Math.floor(a)+Math.floor(o)+Math.floor(s)?this._logger.throwInternal(B.WARNING,ee,"client performance math error.",{total:r,network:i,request:a,response:o,dom:s}):(e.durationMs=r,e.perfTotal=e.duration=ht.msToTimeSpan(r),e.networkConnect=ht.msToTimeSpan(i),e.sentRequest=ht.msToTimeSpan(a),e.receivedResponse=ht.msToTimeSpan(o),e.domProcessing=ht.msToTimeSpan(s),e.isValid=!0):this._logger.throwInternal(B.WARNING,de,"Invalid page load duration value. Browser perf data won't be sent.",{total:r,network:i,request:a,response:o,dom:s})}},Bn.prototype.getPerformanceTiming=function(){return this.isPerformanceTimingSupported()?N().timing:null},Bn.prototype.getPerformanceNavigationTiming=function(){return this.isPerformanceNavigationTimingSupported()?N().getEntriesByType("navigation")[0]:null},Bn.prototype.isPerformanceNavigationTimingSupported=function(){var e=N();return e&&e.getEntriesByType&&0<e.getEntriesByType("navigation").length},Bn.prototype.isPerformanceTimingSupported=function(){var e=N();return e&&e.timing},Bn.prototype.isPerformanceTimingDataReady=function(){var e=N(),t=e?e.timing:0;return t&&0<t.domainLookupStart&&0<t.navigationStart&&0<t.responseStart&&0<t.requestStart&&0<t.loadEventEnd&&0<t.responseEnd&&0<t.connectEnd&&0<t.domLoading},Bn.prototype.shouldCollectDuration=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=["googlebot","adsbot-google","apis-google","mediapartners-google"],r=(S()||{}).userAgent,i=!1;if(r)for(var a=0;a<n.length;a++)i=i||-1!==r.toLowerCase().indexOf(n[a]);if(i)return!1;for(a=0;a<e.length;a++)if(e[a]>=this.MAX_DURATION_ALLOWED)return!1;return!0},Bn);function Bn(e){this.MAX_DURATION_ALLOWED=36e5,e&&(this._logger=e.logger)}var Fn="duration";function Wn(e,t){e&&e.dispatchEvent&&t&&e.dispatchEvent(t)}var Hn,Xn=(t(Kn,Hn=ze),Kn.getDefaultConfig=function(e){return(e=e||{}).sessionRenewalMs=18e5,e.sessionExpirationMs=864e5,e.disableExceptionTracking=ht.stringToBoolOrDefault(e.disableExceptionTracking),e.autoTrackPageVisitTime=ht.stringToBoolOrDefault(e.autoTrackPageVisitTime),e.overridePageViewDuration=ht.stringToBoolOrDefault(e.overridePageViewDuration),e.enableUnhandledPromiseRejectionTracking=ht.stringToBoolOrDefault(e.enableUnhandledPromiseRejectionTracking),(isNaN(e.samplingPercentage)||e.samplingPercentage<=0||100<=e.samplingPercentage)&&(e.samplingPercentage=100),e.isCookieUseDisabled=ht.stringToBoolOrDefault(e.isCookieUseDisabled),e.isStorageUseDisabled=ht.stringToBoolOrDefault(e.isStorageUseDisabled),e.isBrowserLinkTrackingEnabled=ht.stringToBoolOrDefault(e.isBrowserLinkTrackingEnabled),e.enableAutoRouteTracking=ht.stringToBoolOrDefault(e.enableAutoRouteTracking),e.namePrefix=e.namePrefix||"",e},Kn.prototype.processTelemetry=function(e,t){var n=!1,r=this._telemetryInitializers.length;t=this._getTelCtx(t);for(var i=0;i<r;++i){var a=this._telemetryInitializers[i];if(a)try{if(!1===a.apply(null,[e])){n=!0;break}}catch(o){t.diagLog().throwInternal(B.CRITICAL,we,"One of telemetry initializers failed, telemetry item will not be sent: "+ht.getExceptionName(o),{exception:ht.dump(o)},!0)}}n||this.processNext(e,t)},Kn.prototype.trackEvent=function(e,t){try{var n=On.create(e,At.dataType,At.envelopeType,this.diagLog(),t);this.core.track(n)}catch(r){this.diagLog().throwInternal(B.WARNING,pe,"trackTrace failed, trace will not be collected: "+ht.getExceptionName(r),{exception:ht.dump(r)})}},Kn.prototype.startTrackEvent=function(e){try{this._eventTracking.start(e)}catch(t){this.diagLog().throwInternal(B.CRITICAL,ae,"startTrackEvent failed, event will not be collected: "+ht.getExceptionName(t),{exception:ht.dump(t)})}},Kn.prototype.stopTrackEvent=function(e,t,n){try{this._eventTracking.stop(e,undefined,t)}catch(r){this.diagLog().throwInternal(B.CRITICAL,oe,"stopTrackEvent failed, event will not be collected: "+ht.getExceptionName(r),{exception:ht.dump(r)})}},Kn.prototype.trackTrace=function(e,t){try{var n=On.create(e,_n.dataType,_n.envelopeType,this.diagLog(),t);this.core.track(n)}catch(r){this.diagLog().throwInternal(B.WARNING,pe,"trackTrace failed, trace will not be collected: "+ht.getExceptionName(r),{exception:ht.dump(r)})}},Kn.prototype.trackMetric=function(e,t){try{var n=On.create(e,an.dataType,an.envelopeType,this.diagLog(),t);this.core.track(n)}catch(r){this.diagLog().throwInternal(B.CRITICAL,ue,"trackMetric failed, metric will not be collected: "+ht.getExceptionName(r),{exception:ht.dump(r)})}},Kn.prototype.trackPageView=function(e,t){try{var n=e||{};this._pageViewManager.trackPageView(n,c({},n.properties,n.measurements,t)),this.config.autoTrackPageVisitTime&&this._pageVisitTimeManager.trackPreviousPageVisit(n.name,n.uri)}catch(r){this.diagLog().throwInternal(B.CRITICAL,ge,"trackPageView failed, page view will not be collected: "+ht.getExceptionName(r),{exception:ht.dump(r)})}},Kn.prototype.sendPageViewInternal=function(e,t,n){var r=T();r&&(e.refUri=e.refUri===undefined?r.referrer:e.refUri);var i=On.create(e,gn.dataType,gn.envelopeType,this.diagLog(),t,n);this.core.track(i),this._trackAjaxAttempts=0},Kn.prototype.sendPageViewPerformanceInternal=function(e,t,n){var r=On.create(e,Cn.dataType,Cn.envelopeType,this.diagLog(),t,n);this.core.track(r)},Kn.prototype.trackPageViewPerformance=function(e,t){try{this._pageViewPerformanceManager.populatePageViewPerformanceEvent(e),this.sendPageViewPerformanceInternal(e,t)}catch(n){this.diagLog().throwInternal(B.CRITICAL,ge,"trackPageViewPerformance failed, page view will not be collected: "+ht.getExceptionName(n),{exception:ht.dump(n)})}},Kn.prototype.startTrackPage=function(e){try{if("string"!=typeof e){var t=T();e=t&&t.title||""}this._pageTracking.start(e)}catch(n){this.diagLog().throwInternal(B.CRITICAL,se,"startTrackPage failed, page view may not be collected: "+ht.getExceptionName(n),{exception:ht.dump(n)})}},Kn.prototype.stopTrackPage=function(e,t,n,r){try{if("string"!=typeof e){var i=T();e=i&&i.title||""}if("string"!=typeof t){var a=_();t=a&&a.href||""}this._pageTracking.stop(e,t,n,r),this.config.autoTrackPageVisitTime&&this._pageVisitTimeManager.trackPreviousPageVisit(e,t)}catch(o){this.diagLog().throwInternal(B.CRITICAL,ce,"stopTrackPage failed, page view will not be collected: "+ht.getExceptionName(o),{exception:ht.dump(o)})}},Kn.prototype.sendExceptionInternal=function(e,t,n){var r=new jt(this.diagLog(),e.exception||new Error(ht.NotSpecified),e.properties,e.measurements,e.severityLevel,e.id).toInterface(),i=On.create(r,jt.dataType,jt.envelopeType,this.diagLog(),t,n);this.core.track(i)},Kn.prototype.trackException=function(e,t){try{this.sendExceptionInternal(e,t)}catch(n){this.diagLog().throwInternal(B.CRITICAL,le,"trackException failed, exception will not be collected: "+ht.getExceptionName(n),{exception:ht.dump(n)})}},Kn.prototype._onerror=function(e){try{var t={url:e&&e.url||(T()||{}).URL,lineNumber:e.lineNumber,columnNumber:e.columnNumber,message:e.message};if(ht.isCrossOriginError(e.message,e.url,e.lineNumber,e.columnNumber,e.error))this._sendCORSException(t.url);else{if(!ht.isError(e.error)){var n="window.onerror@"+t.url+":"+e.lineNumber+":"+(e.columnNumber||0);e.error=new Error(e.message),e.error.stack=n}this.trackException({exception:e.error,severityLevel:Ln.Error},t)}}catch(i){var r=e.error?e.error.name+", "+e.error.message:"null";this.diagLog().throwInternal(B.CRITICAL,ne,"_onError threw exception while logging error, error will not be collected: "+ht.getExceptionName(i),{exception:ht.dump(i),errorString:r})}},Kn.prototype.addTelemetryInitializer=function(e){this._telemetryInitializers.push(e)},Kn.prototype.initialize=function(e,t,n,r){var o=this;if(!this.isInitialized()){if(j.isNullOrUndefined(t))throw Error("Error initializing");Hn.prototype.initialize.call(this,e,t,n,r),this.setInitialized(!1);var i=this._getTelCtx(),a=this.identifier;this._globalconfig={instrumentationKey:e.instrumentationKey,endpointUrl:e.endpointUrl||"https://dc.services.visualstudio.com/v2/track"},this.config=i.getExtCfg(a);var s=Kn.getDefaultConfig();if(s!==undefined){for(var c in s)this.config[c]=i.getConfig(a,c,s[c]);if(this._globalconfig)for(var c in s)this._globalconfig[c]===undefined&&(this._globalconfig[c]=s[c])}this.config.isCookieUseDisabled&&ht.disableCookies(),this.config.isStorageUseDisabled&&ht.disableStorage();var l={instrumentationKey:function(){return e.instrumentationKey},accountId:function(){return o.config.accountId||e.accountId},sessionRenewalMs:function(){return o.config.sessionRenewalMs||e.sessionRenewalMs},sessionExpirationMs:function(){return o.config.sessionExpirationMs||e.sessionExpirationMs},sampleRate:function(){return o.config.samplingPercentage||e.samplingPercentage},cookieDomain:function(){return o.config.cookieDomain||e.cookieDomain},sdkExtension:function(){return o.config.sdkExtension||e.sdkExtension},isBrowserLinkTrackingEnabled:function(){return o.config.isBrowserLinkTrackingEnabled||e.isBrowserLinkTrackingEnabled},appId:function(){return o.config.appId||e.appId}};this._pageViewPerformanceManager=new qn(this.core),this._pageViewManager=new Rn(this,this.config.overridePageViewDuration,this.core,this._pageViewPerformanceManager),this._pageVisitTimeManager=new Vn(this.diagLog(),function(e,t,n){return o.trackPageVisitTime(e,t,n)}),this._telemetryInitializers=this._telemetryInitializers||[],this._addDefaultTelemetryInitializers(l),this._eventTracking=new Qn(this.diagLog(),"trackEvent"),this._eventTracking.action=function(e,t,n,r){(r=r||{})[Fn]=n.toString(),o.trackEvent({name:e,properties:r})},this._pageTracking=new Qn(this.diagLog(),"trackPageView"),this._pageTracking.action=function(e,t,n,r,i){j.isNullOrUndefined(r)&&(r={}),r[Fn]=n.toString();var a={name:e,uri:t,properties:r,measurements:i};o.sendPageViewInternal(a)};var u,g,f=I(),p=w(),d=_(),h=this;if(!1===this.config.disableExceptionTracking&&!this.config.autoExceptionInstrumented&&f){var m=f.onerror;f.onerror=function(e,t,n,r,i){var a=m&&m(e,t,n,r,i);return!0!==a&&h._onerror({message:e,url:t,lineNumber:n,columnNumber:r,error:i}),a},this.config.autoExceptionInstrumented=!0}if(!1===this.config.disableExceptionTracking&&!0===this.config.enableUnhandledPromiseRejectionTracking&&!this.config.autoUnhandledPromiseInstrumented&&f){var v=f.onunhandledrejection;f.onunhandledrejection=function(e){var t=v&&v.call(f,e);return!0!==t&&h._onerror({message:e.reason.toString(),error:e.reason instanceof Error?e.reason:new Error(e.reason.toString()),url:d?d.href:"",lineNumber:0,columnNumber:0}),t},this.config.autoUnhandledPromiseInstrumented=!0}if(!0===this.config.enableAutoRouteTracking&&p&&j.isFunction(p.pushState)&&j.isFunction(p.replaceState)&&f&&"undefined"!=typeof Event){var y=this;j.arrForEach(n,function(e){"AppInsightsPropertiesPlugin"===e.identifier&&(o._properties=e)}),p.pushState=(g=p.pushState,function(){var e=g.apply(this,arguments);return Wn(f,ht.createDomEvent(y.config.namePrefix+"pushState")),Wn(f,ht.createDomEvent(y.config.namePrefix+"locationchange")),e}),p.replaceState=(u=p.replaceState,function(){var e=u.apply(this,arguments);return Wn(f,ht.createDomEvent(y.config.namePrefix+"replaceState")),Wn(f,ht.createDomEvent(y.config.namePrefix+"locationchange")),e}),f.addEventListener&&(f.addEventListener(y.config.namePrefix+"popstate",function(){Wn(f,ht.createDomEvent(y.config.namePrefix+"locationchange"))}),f.addEventListener(y.config.namePrefix+"locationchange",function(){y._properties&&y._properties.context&&y._properties.context.telemetryTrace&&(y._properties.context.telemetryTrace.traceID=ht.generateW3CId(),y._properties.context.telemetryTrace.name=d&&d.pathname||"_unknown_"),o._currUri&&(o._prevUri=o._currUri),o._currUri=d&&d.href||"",setTimeout(function(e){y.trackPageView({refUri:e,properties:{duration:0}})}.bind(o,o._prevUri),y.autoRoutePVDelay)}))}this.setInitialized(!0)}},Kn.prototype.trackPageVisitTime=function(e,t,n){var r={PageName:e,PageUrl:t};this.trackMetric({name:"PageVisitTime",average:n,max:n,min:n,sampleCount:1},r)},Kn.prototype._addDefaultTelemetryInitializers=function(e){if(!e.isBrowserLinkTrackingEnabled()){var r=["/browserLinkSignalR/","/__browserLink/"];this._addTelemetryInitializer(function(e){if(e.baseType===vn.dataType){var t=e.baseData;if(t)for(var n=0;n<r.length;n++)if(t.target&&0<=t.target.indexOf(r[n]))return!1}return!0})}},Kn.prototype._addTelemetryInitializer=function(e){this._telemetryInitializers.push(e)},Kn.prototype._sendCORSException=function(e){var t={message:"Script error: The browser's same-origin policy prevents us from getting the details of this exception. Consider using the 'crossorigin' attribute.",url:e,lineNumber:0,columnNumber:0,error:undefined},n=On.create(t,jt.dataType,jt.envelopeType,this.diagLog(),{url:e});this.core.track(n)},Kn.Version="2.4.3",Kn);function Kn(){var e=Hn.call(this)||this;e.identifier="ApplicationInsightsAnalytics",e.priority=180,e.autoRoutePVDelay=500,e._trackAjaxAttempts=0;var t=_();return e._prevUri=t&&t.href||"",e}var Qn=(Jn.prototype.start=function(e){"undefined"!=typeof this._events[e]&&this._logger.throwInternal(B.WARNING,Te,"start was called more than once for this event without calling stop.",{name:this._name,key:e},!0),this._events[e]=+new Date},Jn.prototype.stop=function(e,t,n,r){var i=this._events[e];if(isNaN(i))this._logger.throwInternal(B.WARNING,Se,"stop was called without a corresponding start.",{name:this._name,key:e},!0);else{var a=+new Date,o=St.GetDuration(i,a);this.action(e,t,o,n,r)}delete this._events[e],this._events[e]=undefined},Jn);function Jn(e,t){this._name=t,this._events={},this._logger=e}e.ApplicationInsights=Xn,function(e,t,n){var r=Object.defineProperty;if(r)try{return r(e,t,n)}catch(i){}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 r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function t(e,t){function n(){this.constructor=e}r(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 r(){}return r.prototype=e,new r}(t):(n.prototype=t.prototype,new n)}var a,n,d,i,o,s,c=function(){return(c=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};(n=a=a||{})[n.LocalStorage=0]="LocalStorage",n[n.SessionStorage=1]="SessionStorage",(i=d=d||{})[i.Default=0]="Default",i[i.Required=1]="Required",i[i.Array=2]="Array",i[i.Hidden=4]="Hidden",(s=o=o||{})[s.AI=0]="AI",s[s.AI_AND_W3C=1]="AI_AND_W3C",s[s.W3C=2]="W3C";var l=2,u="undefined",g="object",f="window",p="location",h="JSON";function m(){return typeof globalThis!==u&&globalThis?globalThis:typeof self!==u&&self?self:typeof window!==u&&window?window:typeof global!==u&&global?global:null}function v(e){var t=m();return t&&t[e]?t[e]:e===f&&y()?window:null}function y(){return Boolean(typeof window===g&&window)}function T(){return y()?window:v(f)}function I(){return function e(){return Boolean(typeof document===g&&document)}()?document:v("document")}function S(){return function e(){return Boolean(typeof navigator===g&&navigator)}()?navigator:v("navigator")}function w(){return function e(){return Boolean(typeof history===g&&history)}()?history:v("history")}function _(){return typeof location===g&&location?location:v(p)}function N(){return v("performance")}function x(){return Boolean(typeof JSON===g&&JSON||null!==v(h))}function E(){return x()?JSON||v(h):null}var b=u,D="prototype",C="attachEvent",P="addEventListener",k="detachEvent",L="removeEventListener";function A(e,t){return typeof e===t}function M(e){return e===undefined||A(e,b)}function O(e){return M(e)||null===e}function U(e,t){return e&&Object[D].hasOwnProperty.call(e,t)}function R(e){return A(e,"object")}function z(e){return A(e,"function")}function V(e,t,n,r){void 0===r&&(r=!1);var i=!1;if(!O(e))try{O(e[P])?O(e[C])||(e[C]("on"+t,n),i=!0):(e[P](t,n,r),i=!0)}catch(a){}return i}function G(e,t,n,r){if(void 0===r&&(r=!1),!O(e))try{O(e[L])?O(e[k])||e[k]("on"+t,n):e[L](t,n,r)}catch(i){}}var j=(q.isDate=function(e){return"[object Date]"===Object[D].toString.call(e)},q.isString=function(e){return A(e,"string")},q.isNumber=function(e){return A(e,"number")},q.isBoolean=function(e){return A(e,"boolean")},q.disableCookies=function(){q._canUseCookies=!1},q.newGuid=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(W,function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})},q.toISOString=function(e){if(q.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"}},q.arrForEach=function(e,t,n){for(var r=e.length,i=0;i<r;++i)i in e&&t.call(n||e,e[i],i,e)},q.arrIndexOf=function(e,t,n){for(var r=e.length,i=n||0,a=Math.max(0<=i?i:r-Math.abs(i),0);a<r;a++)if(a in e&&e[a]===t)return a;return-1},q.arrMap=function(e,t,n){for(var r=e.length,i=n||e,a=new Array(r),o=0;o<r;o++)o in e&&(a[o]=t.call(i,e[o],e));return a},q.arrReduce=function(e,t,n){var r,i=e.length,a=0;if(3<=arguments.length)r=n;else{for(;a<i&&!(a in e);)a++;r=e[a++]}for(;a<i;)a in e&&(r=t(r,e[a],a,e)),a++;return r},q.objCreate=function(e){if(null==e)return{};if(!R(e)&&!z(e))throw new TypeError("Object prototype may only be an Object: "+e);function t(){}return t[D]=e,new t},q.objKeys=function(e){var t=!{toString:null}.propertyIsEnumerable("toString");if(!(z(e)||R(e)&&null!==e))throw new TypeError("objKeys called on non-object");var n=[];for(var r in e)U(e,r)&&n.push(r);if(t)for(var i=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],a=i.length,o=0;o<a;o++)U(e,i[o])&&n.push(i[o]);return n},q.objDefineAccessors=function(e,t,n,r){var i=Object.defineProperty;if(i)try{var a={enumerable:!0,configurable:!0};return n&&(a.get=n),r&&(a.set=r),i(e,t,a),!0}catch(o){}return!1},q.addEventHandler=function(e,t){var n=!1,r=T();r&&(n=V(r,e,t),n=V(r.body,e,t)||n);var i=I();return i&&(n=H.Attach(i,e,t)||n),n},q.isTypeof=A,q.isUndefined=M,q.isNullOrUndefined=O,q.hasOwnProperty=U,q.isFunction=z,q.isObject=R,q);function q(){}var B,F,W=/[xy]/g,H=(X.Attach=V,X.AttachEvent=V,X.Detach=G,X.DetachEvent=G,X);function X(){}(F=B=B||{})[F.CRITICAL=1]="CRITICAL",F[F.WARNING=2]="WARNING";var K=1,Q=2,J=3,Y=4,$=5,Z=6,ee=8,te=10,ne=11,re=23,ie=25,ae=29,oe=30,se=31,ce=32,le=35,ue=36,ge=37,fe=38,pe=39,de=45,he=49,me=52,ve=56,ye=57,Ie=61,Te=62,Se=63,we=64,_e=66,Ne=68,xe=69,Ee=73,be=(De.sanitizeDiagnosticText=function(e){return e?'"'+e.replace(/\"/g,"")+'"':""},De.dataType="MessageData",De.AiNonUserActionablePrefix="AI (Internal): ",De.AiUserActionablePrefix="AI: ",De);function De(e,t,n,r){void 0===n&&(n=!1),this.messageId=e,this.message=(n?De.AiUserActionablePrefix:De.AiNonUserActionablePrefix)+e;var i="";x()&&(i=E().stringify(r));var a=(t?" message:"+De.sanitizeDiagnosticText(t):"")+(r?" props:"+De.sanitizeDiagnosticText(i):"");this.message+=a}var Ce=(Pe.prototype.throwInternal=function(e,t,n,r,i){void 0===i&&(i=!1);var a=new be(t,n,i,r),o=this;if(o.enableDebugExceptions())throw a;if(!j.isUndefined(a)&&a&&!j.isUndefined(a.message)){if(i){var s=+a.messageId;!o._messageLogged[s]&&o.consoleLoggingLevel()>=B.WARNING&&(o.warnToConsole(a.message),o._messageLogged[s]=!0)}else o.consoleLoggingLevel()>=B.WARNING&&o.warnToConsole(a.message);o.logInternalMessage(e,a)}},Pe.prototype.warnToConsole=function(e){!j.isUndefined(console)&&console&&(j.isFunction(console.warn)?console.warn(e):j.isFunction(console.log)&&console.log(e))},Pe.prototype.resetInternalMessageCount=function(){this._messageCount=0,this._messageLogged={}},Pe.prototype.logInternalMessage=function(e,t){var n=this;if(!n._areInternalMessagesThrottled()){var r=!0,i=n.AIInternalMessagePrefix+t.messageId;if(n._messageLogged[i]?r=!1:n._messageLogged[i]=!0,r&&(e<=n.telemetryLoggingLevel()&&(n.queue.push(t),n._messageCount++),n._messageCount===n.maxInternalMessageLimit())){var a="Internal events throttle limit per PageView reached for this app.",o=new be(re,a,!1);n.queue.push(o),n.warnToConsole(a)}}},Pe.prototype._areInternalMessagesThrottled=function(){return this._messageCount>=this.maxInternalMessageLimit()},Pe);function Pe(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},j.isNullOrUndefined(e)||(j.isNullOrUndefined(e.loggingLevelConsole)||(this.consoleLoggingLevel=function(){return e.loggingLevelConsole}),j.isNullOrUndefined(e.loggingLevelTelemetry)||(this.telemetryLoggingLevel=function(){return e.loggingLevelTelemetry}),j.isNullOrUndefined(e.maxMessageLimit)||(this.maxInternalMessageLimit=function(){return e.maxMessageLimit}),j.isNullOrUndefined(e.enableDebugExceptions)||(this.enableDebugExceptions=function(){return e.enableDebugExceptions}))}var ke=j.isFunction,Le=function Yn(i,a){var o=this,s=null,c=ke(i.processTelemetry),l=ke(i.setNextPlugin);o._hasRun=!1,o.getPlugin=function(){return i},o.getNext=function(){return s},o.setNext=function(e){s=e},o.processTelemetry=function(e,t){if(t=t||a,i&&c){o._hasRun=!0;try{t.setNext(s),l&&i.setNextPlugin(s),s&&(s._hasRun=!1),i.processTelemetry(e,t)}catch(r){var n=s&&s._hasRun;s&&n||t.diagLog().throwInternal(B.CRITICAL,Ee,"Plugin ["+i.identifier+"] failed during processTelemetry - "+r),s&&!n&&s.processTelemetry(e,t)}}else s&&(o._hasRun=!0,s.processTelemetry(e,t))}},Ae=j.isNullOrUndefined;function Me(e,t){var n=[];if(e&&0<e.length)for(var r=null,i=0;i<e.length;i++){var a=e[i];if(a&&j.isFunction(a.processTelemetry)){var o=new Le(a,t);n.push(o),r&&r.setNext(o),r=o}}return 0<n.length?n[0]:null}var Oe=function $n(e,a,n,t){var o=this,r=null;null!==t&&(e&&j.isFunction(e.getPlugin)?r=function s(e,t,n){var r=[],i=!n;if(e)for(;e;){var a=e.getPlugin();!i&&a!==n||(i=!0,r.push(a)),e=e.getNext()}return i||r.push(n),Me(r,t)}(e,o,t||e.getPlugin()):t?r=function c(e,t,n){var r=e,i=!1;return n&&e&&(r=[],j.arrForEach(e,function(e){!i&&e!==n||(i=!0,r.push(e))})),n&&!i&&(r=r||[]).push(n),Me(r,t)}(e,o,t):j.isUndefined(t)&&(r=Me(e,o))),o.core=function(){return n},o.diagLog=function(){var e=(n||{}).logger;return e=e||new Ce(a||{})},o.getCfg=function(){return a},o.getExtCfg=function(e,t){var n;if(void 0===t&&(t={}),a){var r=a.extensionConfig;r&&e&&(n=r[e])}return n||t},o.getConfig=function(e,t,n){var r;void 0===n&&(n=!1);var i=o.getExtCfg(e,null);return i&&!Ae(i[t])?r=i[t]:a&&!Ae(a[t])&&(r=a[t]),Ae(r)?n:r},o.hasNext=function(){return null!=r},o.getNext=function(){return r},o.setNext=function(e){r=e},o.processNext=function(e){var t=r;t&&(r=t.getNext(),t.processTelemetry(e,o))},o.createNew=function(e,t){return void 0===e&&(e=null),new $n(e||r,a,n,t)}},Ue=j.isFunction,Re="getPlugin",ze=(Ve.prototype.initialize=function(e,t,n,r){this._baseTelInit(e,t,n,r)},Ve);function Ve(){var a=this,o=!1,s=null,c=null;a.core=null,a.diagLog=function(e){return a._getTelCtx(e).diagLog()},a.isInitialized=function(){return o},a.setInitialized=function(e){o=e},a.setNextPlugin=function(e){c=e},a.processNext=function(e,t){t?t.processNext(e):c&&Ue(c.processTelemetry)&&c.processTelemetry(e,null)},a._getTelCtx=function(e){void 0===e&&(e=null);var t=e;if(!t){var n=s||new Oe(null,{},a.core);t=c&&c[Re]?n.createNew(null,c[Re]):n.createNew(null,c)}return t},a._baseTelInit=function(e,t,n,r){e&&(e.extensionConfig=e.extensionConfig||[]),!r&&t&&(r=t.getProcessTelContext().getNext());var i=c;c&&c[Re]&&(i=c[Re]()),a.core=t,s=new Oe(r,e,t,i),o=!0}}var Ge=j.isFunction,je="processTelemetry",qe="priority",Be="setNextPlugin",Fe="isInitialized";function We(t,n){for(var e=[],r=null,i=t.getNext();i;){var a=i.getPlugin();a&&(r&&Ge(r[Be])&&Ge(a[je])&&r[Be](a),Ge(a[Fe])&&a[Fe]()||e.push(a),r=a,i=i.getNext())}j.arrForEach(e,function(e){e.initialize(t.getCfg(),t.core(),n,t.getNext())})}function He(e){return e.sort(function(e,t){var n=0,r=Ge(t[je]);return Ge(e[je])?n=r?e[qe]-t[qe]:1:r&&(n=-1),n})}var Xe=500,Ke="Channel has invalid priority",Qe=j.arrForEach,Je=j.objDefineAccessors;function Ye(e,t){t&&0<t.length&&(function n(e){Qe(e,function(e){if(e.priority<Xe)throw Error(Ke+e.identifier)})}(t=t.sort(function(e,t){return e.priority-t.priority})),e.push(t))}var $e,Ze=(t(et,$e=ze),et.prototype.processTelemetry=function(t,n){var r=this;this._channelQueue&&Qe(this._channelQueue,function(e){0<e.length&&r._getTelCtx(n).createNew(e).processNext(t)})},et.prototype.getChannelControls=function(){return this._channelQueue},et.prototype.initialize=function(t,n,r){if(!this.isInitialized()){$e.prototype.initialize.call(this,t,n,r),t.isCookieUseDisabled&&j.disableCookies();var e=this._channelQueue=function i(e,t){var n=[];if(e&&Qe(e,function(e){return Ye(n,e)}),t){var r=[];Qe(t,function(e){e.priority>Xe&&r.push(e)}),Ye(n,r)}return n}((t||{}).channels,r);Qe(e,function(e){return We(new Oe(e,t,n),r)})}},et._staticInit=(Je(et.prototype,"ChannelControls",et.prototype.getChannelControls),void Je(et.prototype,"channelQueue",et.prototype.getChannelControls)),et);function et(){var e=null!==$e&&$e.apply(this,arguments)||this;return e.identifier="ChannelControllerPlugin",e.priority=Xe,e}var tt=j.arrForEach,nt=j.isNullOrUndefined,rt=(it.prototype.initialize=function(e,t,r,n){var i=this;if(i.isInitialized())throw Error("Core should not be initialized more than once");if(!e||nt(e.instrumentationKey))throw Error("Please provide instrumentation key");i.config=e;var a=i._channelController;n=n||j.objCreate({addNotificationListener:function(e){},removeNotificationListener:function(e){},eventsSent:function(e){},eventsDiscarded:function(e,t){}}),i._notificationManager=n,e.extensions=nt(e.extensions)?[]:e.extensions,(e.extensionConfig=nt(e.extensionConfig)?{}:e.extensionConfig).NotificationManager=n,r=r||j.objCreate({throwInternal:function(e,t,n,r,i){void 0===i&&(i=!1)},warnToConsole:function(e){},resetInternalMessageCount:function(){}}),i.logger=r;var o=[];o.push.apply(o,t.concat(e.extensions)),o=He(o);var s=[],c={};if(tt(o,function(e){if(nt(e)||nt(e.initialize))throw Error("Extensions must provide callback to initialize");var t=e.priority,n=e.identifier;e&&t&&(nt(c[t])?c[t]=n:r.warnToConsole("Two extensions have same priority #"+t+" - "+c[t]+", "+n)),(!t||t<a.priority)&&s.push(e)}),o.push(a),s.push(a),o=He(o),i._extensions=o,We(new Oe([a],e,i),o),We(new Oe(s,e,i),o),i._extensions=s,0===i.getTransmissionControls().length)throw new Error("No channels available");i._setInit(!0)},it.prototype.getTransmissionControls=function(){return this._channelController.getChannelControls()},it.prototype.track=function(e){var t=this;e.iKey||(e.iKey=t.config.instrumentationKey),e.time||(e.time=j.toISOString(new Date)),nt(e.ver)&&(e.ver="4.0"),t.isInitialized()?(0<t._eventQueue.length&&(tt(t._eventQueue,function(e){t.getProcessTelContext().processNext(e)}),t._eventQueue=[]),t.getProcessTelContext().processNext(e)):t._eventQueue.push(e)},it.prototype.getProcessTelContext=function(){var e=this._extensions,t=e;return e&&0!==e.length||(t=[this._channelController]),new Oe(t,this.config,this)},it);function it(){var t=!1,e=this;e._extensions=new Array,e._channelController=new Ze,e.isInitialized=function(){return t},e._setInit=function(e){t=e},e._eventQueue=[]}var at=(ot.prototype.addNotificationListener=function(e){this.listeners.push(e)},ot.prototype.removeNotificationListener=function(e){for(var t=j.arrIndexOf(this.listeners,e);-1<t;)this.listeners.splice(t,1),t=j.arrIndexOf(this.listeners,e)},ot.prototype.eventsSent=function(t){for(var n=this,e=function(e){r.listeners[e].eventsSent&&setTimeout(function(){return n.listeners[e].eventsSent(t)},0)},r=this,i=0;i<this.listeners.length;++i)e(i)},ot.prototype.eventsDiscarded=function(t,n){for(var r=this,e=function(e){i.listeners[e].eventsDiscarded&&setTimeout(function(){return r.listeners[e].eventsDiscarded(t,n)},0)},i=this,a=0;a<this.listeners.length;++a)e(a)},ot);function ot(){this.listeners=[]}var st;t(ct,st=rt),ct.prototype.initialize=function(e,t){var n=this;n._notificationManager=new at,n.logger=new Ce(e),n.config=e,st.prototype.initialize.call(this,e,t,n.logger,n._notificationManager)},ct.prototype.getTransmissionControls=function(){return st.prototype.getTransmissionControls.call(this)},ct.prototype.track=function(e){if(null===e)throw this._notifyInvalidEvent(e),Error("Invalid telemetry item");this._validateTelemetryItem(e),st.prototype.track.call(this,e)},ct.prototype.addNotificationListener=function(e){this._notificationManager&&this._notificationManager.addNotificationListener(e)},ct.prototype.removeNotificationListener=function(e){this._notificationManager&&this._notificationManager.removeNotificationListener(e)},ct.prototype.pollInternalLogs=function(r){var t=this,e=this.config.diagnosticLogInterval;return 0<e||(e=1e4),setInterval(function(){var n=t,e=n.logger?n.logger.queue:[];j.arrForEach(e,function(e){var t={name:r||"InternalMessageId: "+e.messageId,iKey:n.config.instrumentationKey,time:j.toISOString(new Date),baseType:be.dataType,baseData:{message:e.message}};n.track(t)}),e.length=0},e)},ct.prototype._validateTelemetryItem=function(e){if(j.isNullOrUndefined(e.name))throw this._notifyInvalidEvent(e),Error("telemetry name required")},ct.prototype._notifyInvalidEvent=function(e){this._notificationManager&&this._notificationManager.eventsDiscarded([e],l)};function ct(){return st.call(this)||this}var lt=(ut.sanitizeKeyAndAddUniqueness=function(e,t,n){var r=t.length,i=ut.sanitizeKey(e,t);if(i.length!==r){for(var a=0,o=i;n[o]!==undefined;)a++,o=i.substring(0,ut.MAX_NAME_LENGTH-3)+ut.padNumber(a);i=o}return i},ut.sanitizeKey=function(e,t){var n;return t&&(t=ut.trim(t.toString())).length>ut.MAX_NAME_LENGTH&&(n=t.substring(0,ut.MAX_NAME_LENGTH),e.throwInternal(B.WARNING,ye,"name is too long. It has been truncated to "+ut.MAX_NAME_LENGTH+" characters.",{name:t},!0)),n||t},ut.sanitizeString=function(e,t,n){var r;return void 0===n&&(n=ut.MAX_STRING_LENGTH),t&&(n=n||ut.MAX_STRING_LENGTH,(t=ut.trim(t)).toString().length>n&&(r=t.toString().substring(0,n),e.throwInternal(B.WARNING,Ie,"string value is too long. It has been truncated to "+n+" characters.",{value:t},!0))),r||t},ut.sanitizeUrl=function(e,t){return ut.sanitizeInput(e,t,ut.MAX_URL_LENGTH,_e)},ut.sanitizeMessage=function(e,t){var n;return t&&t.length>ut.MAX_MESSAGE_LENGTH&&(n=t.substring(0,ut.MAX_MESSAGE_LENGTH),e.throwInternal(B.WARNING,ve,"message is too long, it has been truncated to "+ut.MAX_MESSAGE_LENGTH+" characters.",{message:t},!0)),n||t},ut.sanitizeException=function(e,t){var n;return t&&t.length>ut.MAX_EXCEPTION_LENGTH&&(n=t.substring(0,ut.MAX_EXCEPTION_LENGTH),e.throwInternal(B.WARNING,me,"exception is too long, it has been truncated to "+ut.MAX_EXCEPTION_LENGTH+" characters.",{exception:t},!0)),n||t},ut.sanitizeProperties=function(e,t){if(t){var n={};for(var r in t){var i=t[r];if(j.isObject(i)&&x())try{i=E().stringify(i)}catch(a){e.throwInternal(B.WARNING,he,"custom property is not valid",{exception:a},!0)}i=ut.sanitizeString(e,i,ut.MAX_PROPERTY_LENGTH),n[r=ut.sanitizeKeyAndAddUniqueness(e,r,n)]=i}t=n}return t},ut.sanitizeMeasurements=function(e,t){if(t){var n={};for(var r in t){var i=t[r];n[r=ut.sanitizeKeyAndAddUniqueness(e,r,n)]=i}t=n}return t},ut.sanitizeId=function(e,t){return t?ut.sanitizeInput(e,t,ut.MAX_ID_LENGTH,xe).toString():t},ut.sanitizeInput=function(e,t,n,r){var i;return t&&(t=ut.trim(t)).length>n&&(i=t.substring(0,n),e.throwInternal(B.WARNING,r,"input is too long, it has been truncated to "+n+" characters.",{data:t},!0)),i||t},ut.padNumber=function(e){var t="00"+e;return t.substr(t.length-3)},ut.trim=function(e){return j.isString(e)?e.replace(/^\s+|\s+$/g,""):e},ut.MAX_NAME_LENGTH=150,ut.MAX_ID_LENGTH=128,ut.MAX_PROPERTY_LENGTH=8192,ut.MAX_STRING_LENGTH=1024,ut.MAX_URL_LENGTH=2048,ut.MAX_MESSAGE_LENGTH=32768,ut.MAX_EXCEPTION_LENGTH=32768,ut);function ut(){}var gt="prototype",ft=S(),pt=j.isString,dt=null;var ht=(mt.createDomEvent=function(e){var t=null;if(j.isFunction(Event))t=new Event(e);else{var n=I();n&&n.createEvent&&(t=n.createEvent("Event")).initEvent(e,!0,!0)}return t},mt.disableStorage=function(){mt._canUseLocalStorage=!1,mt._canUseSessionStorage=!1},mt._getLocalStorageObject=function(){return mt.canUseLocalStorage()?mt._getVerifiedStorageObject(a.LocalStorage):null},mt._getVerifiedStorageObject=function(e){var t,n,r=null;try{if(j.isNullOrUndefined(m()))return null;n=new Date,(r=e===a.LocalStorage?v("localStorage"):v("sessionStorage")).setItem(n.toString(),n.toString()),t=r.getItem(n.toString())!==n.toString(),r.removeItem(n.toString()),t&&(r=null)}catch(i){r=null}return r},mt.isInternalApplicationInsightsEndpoint=function(e){return-1!==mt._internalEndpoints.indexOf(e.toLowerCase())},mt.canUseLocalStorage=function(){return mt._canUseLocalStorage===undefined&&(mt._canUseLocalStorage=!!mt._getVerifiedStorageObject(a.LocalStorage)),mt._canUseLocalStorage},mt.getStorage=function(e,t){var n=mt._getLocalStorageObject();if(null!==n)try{return n.getItem(t)}catch(r){mt._canUseLocalStorage=!1,e.throwInternal(B.WARNING,K,"Browser failed read of local storage. "+mt.getExceptionName(r),{exception:mt.dump(r)})}return null},mt.setStorage=function(e,t,n){var r=mt._getLocalStorageObject();if(null!==r)try{return r.setItem(t,n),!0}catch(i){mt._canUseLocalStorage=!1,e.throwInternal(B.WARNING,J,"Browser failed write to local storage. "+mt.getExceptionName(i),{exception:mt.dump(i)})}return!1},mt.removeStorage=function(e,t){var n=mt._getLocalStorageObject();if(null!==n)try{return n.removeItem(t),!0}catch(r){mt._canUseLocalStorage=!1,e.throwInternal(B.WARNING,$,"Browser failed removal of local storage item. "+mt.getExceptionName(r),{exception:mt.dump(r)})}return!1},mt._getSessionStorageObject=function(){return mt.canUseSessionStorage()?mt._getVerifiedStorageObject(a.SessionStorage):null},mt.canUseSessionStorage=function(){return mt._canUseSessionStorage===undefined&&(mt._canUseSessionStorage=!!mt._getVerifiedStorageObject(a.SessionStorage)),mt._canUseSessionStorage},mt.getSessionStorageKeys=function(){var e=[];if(mt.canUseSessionStorage())for(var t in v("sessionStorage"))e.push(t);return e},mt.getSessionStorage=function(e,t){var n=mt._getSessionStorageObject();if(null!==n)try{return n.getItem(t)}catch(r){mt._canUseSessionStorage=!1,e.throwInternal(B.WARNING,Q,"Browser failed read of session storage. "+mt.getExceptionName(r),{exception:mt.dump(r)})}return null},mt.setSessionStorage=function(e,t,n){var r=mt._getSessionStorageObject();if(null!==r)try{return r.setItem(t,n),!0}catch(i){mt._canUseSessionStorage=!1,e.throwInternal(B.WARNING,Y,"Browser failed write to session storage. "+mt.getExceptionName(i),{exception:mt.dump(i)})}return!1},mt.removeSessionStorage=function(e,t){var n=mt._getSessionStorageObject();if(null!==n)try{return n.removeItem(t),!0}catch(r){mt._canUseSessionStorage=!1,e.throwInternal(B.WARNING,Z,"Browser failed removal of session storage item. "+mt.getExceptionName(r),{exception:mt.dump(r)})}return!1},mt.disableCookies=function(){j.disableCookies()},mt.canUseCookies=function(e){if(j._canUseCookies===undefined){j._canUseCookies=!1;try{j._canUseCookies=mt.document.cookie!==undefined}catch(t){e.throwInternal(B.WARNING,Ne,"Cannot access document.cookie - "+mt.getExceptionName(t),{exception:mt.dump(t)})}}return j._canUseCookies&&mt.document&&mt.document.cookie},mt.disallowsSameSiteNone=function(e){return!!pt(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 i(e,t){var n=e.length,r=n-t.length;return e.substring(0<=r?r: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"))},mt.setCookie=function(e,t,n,r){if(mt.canUseCookies(e)){var i="",a="";r&&(i=";domain="+r);var o=_();o&&"https:"===o.protocol&&(a=";secure",null===dt&&(dt=mt.disallowsSameSiteNone((S()||{}).userAgent)),dt||(n+=";SameSite=None")),mt.document.cookie=t+"="+n+i+";path=/"+a}},mt.stringToBoolOrDefault=function(e,t){return void 0===t&&(t=!1),e===undefined||null===e?t:"true"===e.toString().toLowerCase()},mt.getCookie=function(e,t){if(mt.canUseCookies(e)){var n="";if(t&&t.length)for(var r=t+"=",i=mt.document.cookie.split(";"),a=0;a<i.length;a++){var o=i[a];if((o=mt.trim(o))&&0===o.indexOf(r)){n=o.substring(r.length,i[a].length);break}}return n}},mt.deleteCookie=function(e,t){mt.canUseCookies(e)&&(mt.document.cookie=t+"=;path=/;expires=Thu, 01 Jan 1970 00:00:01 GMT;")},mt.trim=function(e){return pt(e)?e.replace(/^\s+|\s+$/g,""):e},mt.newId=function(){for(var e="",t=1073741824*Math.random();0<t;)e+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(t%64),t=Math.floor(t/64);return e},mt.random32=function(){return 4294967296*Math.random()|0},mt.generateW3CId=function(){for(var e,t=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"],n="",r=0;r<4;r++)n+=t[15&(e=mt.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 i=t[8+4*Math.random()|0];return n.substr(0,8)+n.substr(9,4)+"4"+n.substr(13,3)+i+n.substr(16,3)+n.substr(19,12)},mt.isArray=function(e){return"[object Array]"===Object[gt].toString.call(e)},mt.isError=function(e){return"[object Error]"===Object[gt].toString.call(e)},mt.getIEVersion=function(e){void 0===e&&(e=null);var t=e?e.toLowerCase():ft?(ft.userAgent||"").toLowerCase():"";return-1!==t.indexOf("msie")?parseInt(t.split("msie")[1]):null},mt.msToTimeSpan=function(e){(isNaN(e)||e<0)&&(e=0);var t=""+(e=Math.round(e))%1e3,n=""+Math.floor(e/1e3)%60,r=""+Math.floor(e/6e4)%60,i=""+Math.floor(e/36e5)%24,a=Math.floor(e/864e5);return t=1===t.length?"00"+t:2===t.length?"0"+t:t,n=n.length<2?"0"+n:n,r=r.length<2?"0"+r:r,(0<a?a+".":"")+(i=i.length<2?"0"+i:i)+":"+r+":"+n+"."+t},mt.isCrossOriginError=function(e,t,n,r,i){return("Script error."===e||"Script error"===e)&&!i},mt.dump=function(e){var t=Object[gt].toString.call(e),n="";return"[object Error]"===t?n="{ stack: '"+e.stack+"', message: '"+e.message+"', name: '"+e.name+"'":x()&&(n=E().stringify(e)),t+n},mt.getExceptionName=function(e){return"[object Error]"===Object[gt].toString.call(e)?e.name:""},mt.addEventHandler=function(e,t){return H.Attach(T(),e,t)},mt.IsBeaconApiSupported=function(){return"sendBeacon"in ft&&ft.sendBeacon},mt.getExtension=function(e,t){for(var n=null,r=0;!n&&r<e.length;)e[r]&&e[r].identifier===t&&(n=e[r]),r++;return n},mt.document=I()||{},mt._canUseLocalStorage=undefined,mt._canUseSessionStorage=undefined,mt._internalEndpoints=["https://dc.services.visualstudio.com/v2/track","https://breeze.aimon.applicationinsights.io/v2/track","https://dc-int.services.visualstudio.com/v2/track"],mt.NotSpecified="not_specified",mt.isDate=j.isDate,mt.toISOStringForIE8=j.toISOString,mt);function mt(){}var vt=(yt.parseUrl=function(e){return yt.htmlAnchorElement||(yt.htmlAnchorElement=yt.document.createElement?yt.document.createElement("a"):{host:yt.parseHost(e)}),yt.htmlAnchorElement.href=e,yt.htmlAnchorElement},yt.getAbsoluteUrl=function(e){var t,n=yt.parseUrl(e);return n&&(t=n.href),t},yt.getPathName=function(e){var t,n=yt.parseUrl(e);return n&&(t=n.pathname),t},yt.getCompleteUrl=function(e,t){return e?e.toUpperCase()+" "+t:t},yt.parseHost=function(e){if(e){var t=e.match(/:\/\/(www[0-9]?\.)?(.[^/:]+)/i);if(null!=t&&2<t.length&&pt(t[2])&&0<t[2].length)return t[2]}return null},yt.document=I()||{},yt);function yt(){}var It=(Tt.ParseDependencyPath=function(e,t,n,r){var i,a=r,o=r;if(t&&0<t.length){var s=vt.parseUrl(t);if(i=s.host,!a)if(null!=s.pathname){var c=0===s.pathname.length?"/":s.pathname;"/"!==c.charAt(0)&&(c="/"+c),o=s.pathname,a=lt.sanitizeString(e,n?n+" "+c:c)}else a=lt.sanitizeString(e,t)}else a=i=r;return{target:i,name:a,data:o}},Tt);function Tt(){}var St=(wt.Now=function(){var e=N();return e&&e.now&&e.timing?e.now()+e.timing.navigationStart:(new Date).getTime()},wt.GetDuration=function(e,t){var n=null;return 0===e||0===t||j.isNullOrUndefined(e)||j.isNullOrUndefined(t)||(n=t-e),n},wt);function wt(){}var _t,Nt=(t(xt,_t=function Zn(){}),xt);function xt(){return _t.call(this)||this}var Et;t(bt,Et=function er(){this.ver=1,this.sampleRate=100,this.tags={}});function bt(e,t,n){var r=Et.call(this)||this;return r.name=lt.sanitizeString(e,n)||ht.NotSpecified,r.data=t,r.time=j.toISOString(new Date),r.aiDataContract={time:d.Required,iKey:d.Required,name:d.Required,sampleRate:function(){return 100===r.sampleRate?d.Hidden:d.Required},tags:d.Required,data:d.Required},r}var Dt,Ct=function tr(){},Pt=(t(kt,Dt=Ct),kt);function kt(){var e=Dt.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}var Lt,At=(t(Mt,Lt=Pt),Mt.envelopeType="Microsoft.ApplicationInsights.{0}.Event",Mt.dataType="EventData",Mt);function Mt(e,t,n,r){var i=Lt.call(this)||this;return i.aiDataContract={ver:d.Required,name:d.Required,properties:d.Default,measurements:d.Default},i.name=lt.sanitizeString(e,t)||ht.NotSpecified,i.properties=lt.sanitizeProperties(e,n),i.measurements=lt.sanitizeMeasurements(e,r),i}var Ot,Ut=function nr(){},Rt=(t(zt,Ot=Ct),zt);function zt(){var e=Ot.call(this)||this;return e.ver=2,e.exceptions=[],e.properties={},e.measurements={},e}var Vt,Gt=function rr(){this.hasFullStack=!0,this.parsedStack=[]},jt=(t(qt,Vt=Rt),qt.CreateFromInterface=function(t,e){var n=e.exceptions&&j.arrMap(e.exceptions,function(e){return Ft.CreateFromInterface(t,e)});return new qt(t,c({},e,{exceptions:n}))},qt.prototype.toInterface=function(){var e=this,t=e.exceptions,n=e.properties,r=e.measurements,i=e.severityLevel,a=(e.ver,e.problemGroup),o=e.id,s=e.isManual;return{ver:"4.0",exceptions:t instanceof Array&&j.arrMap(t,function(e){return e.toInterface()})||undefined,severityLevel:i,properties:n,measurements:r,problemGroup:a,id:o,isManual:s}},qt.CreateSimpleException=function(e,t,n,r,i,a){return{exceptions:[{hasFullStack:!0,message:e,stack:i,typeName:t}]}},qt.envelopeType="Microsoft.ApplicationInsights.{0}.Exception",qt.dataType="ExceptionData",qt);function qt(e,t,n,r,i,a){var o=Vt.call(this)||this;return o.aiDataContract={ver:d.Required,exceptions:d.Required,severityLevel:d.Default,properties:d.Default,measurements:d.Default},t instanceof Error?(o.exceptions=[new Ft(e,t)],o.properties=lt.sanitizeProperties(e,n),o.measurements=lt.sanitizeMeasurements(e,r),i&&(o.severityLevel=i),a&&(o.id=a)):(o.exceptions=t.exceptions,o.properties=t.properties,o.measurements=t.measurements,t.severityLevel&&(o.severityLevel=t.severityLevel),t.id&&(o.id=t.id),t.problemGroup&&(o.problemGroup=t.problemGroup),o.ver=2,j.isNullOrUndefined(t.isManual)||(o.isManual=t.isManual)),o}var Bt,Ft=(t(Wt,Bt=Gt),Wt.prototype.toInterface=function(){var e=this.parsedStack instanceof Array&&j.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}},Wt.CreateFromInterface=function(e,t){var n=t.parsedStack instanceof Array&&j.arrMap(t.parsedStack,function(e){return Xt.CreateFromInterface(e)})||t.parsedStack;return new Wt(e,c({},t,{parsedStack:n}))},Wt.parseStack=function(e){var t;if(j.isString(e)){var n=e.split("\n");t=[];for(var r=0,i=0,a=0;a<=n.length;a++){var o=n[a];if(Xt.regex.test(o)){var s=new Xt(n[a],r++);i+=s.sizeInBytes,t.push(s)}}if(32768<i)for(var c=0,l=t.length-1,u=0,g=c,f=l;c<l;){if(32768<(u+=t[c].sizeInBytes+t[l].sizeInBytes)){var p=f-g+1;t.splice(g,p);break}g=c,f=l,c++,l--}}return t},Wt);function Wt(e,t){var n=Bt.call(this)||this;if(n.aiDataContract={id:d.Default,outerId:d.Default,typeName:d.Required,message:d.Required,hasFullStack:d.Default,stack:d.Default,parsedStack:d.Array},t instanceof Error){n.typeName=lt.sanitizeString(e,t.name)||ht.NotSpecified,n.message=lt.sanitizeMessage(e,t.message)||ht.NotSpecified;var r=t.stack;n.parsedStack=Wt.parseStack(r),n.stack=lt.sanitizeException(e,r),n.hasFullStack=ht.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 Ht,Xt=(t(Kt,Ht=Ut),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=Ht.call(this)||this;if(n.sizeInBytes=0,n.aiDataContract={level:d.Required,method:d.Required,assembly:d.Default,fileName:d.Default,line:d.Default},"string"==typeof e){var r=e;n.level=t,n.method="<no_method>",n.assembly=ht.trim(r),n.fileName="",n.line=0;var i=r.match(Kt.regex);i&&5<=i.length&&(n.method=ht.trim(i[2])||n.method,n.fileName=ht.trim(i[4]),n.line=parseInt(i[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 Qt,Jt,Yt,$t=(t(Zt,Qt=Ct),Zt);function Zt(){var e=Qt.call(this)||this;return e.ver=2,e.metrics=[],e.properties={},e.measurements={},e}(Yt=Jt=Jt||{})[Yt.Measurement=0]="Measurement",Yt[Yt.Aggregation=1]="Aggregation";var en,tn=(t(nn,en=function ir(){this.kind=Jt.Measurement}),nn);function nn(){var e=null!==en&&en.apply(this,arguments)||this;return e.aiDataContract={name:d.Required,kind:d.Default,value:d.Required,count:d.Default,min:d.Default,max:d.Default,stdDev:d.Default},e}var rn,an=(t(on,rn=$t),on.envelopeType="Microsoft.ApplicationInsights.{0}.Metric",on.dataType="MetricData",on);function on(e,t,n,r,i,a,o,s){var c=rn.call(this)||this;c.aiDataContract={ver:d.Required,metrics:d.Required,properties:d.Default};var l=new tn;return l.count=0<r?r:undefined,l.max=isNaN(a)||null===a?undefined:a,l.min=isNaN(i)||null===i?undefined:i,l.name=lt.sanitizeString(e,t)||ht.NotSpecified,l.value=n,c.metrics=[l],c.properties=lt.sanitizeProperties(e,o),c.measurements=lt.sanitizeMeasurements(e,s),c}var sn,cn=(t(ln,sn=Pt),ln);function ln(){var e=sn.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}var un,gn=(t(fn,un=cn),fn.envelopeType="Microsoft.ApplicationInsights.{0}.Pageview",fn.dataType="PageviewData",fn);function fn(e,t,n,r,i,a,o){var s=un.call(this)||this;return s.aiDataContract={ver:d.Required,name:d.Default,url:d.Default,duration:d.Default,properties:d.Default,measurements:d.Default,id:d.Default},s.id=lt.sanitizeId(e,o),s.url=lt.sanitizeUrl(e,n),s.name=lt.sanitizeString(e,t)||ht.NotSpecified,isNaN(r)||(s.duration=ht.msToTimeSpan(r)),s.properties=lt.sanitizeProperties(e,i),s.measurements=lt.sanitizeMeasurements(e,a),s}var pn,dn=(t(hn,pn=Ct),hn);function hn(){var e=pn.call(this)||this;return e.ver=2,e.success=!0,e.properties={},e.measurements={},e}var mn,vn=(t(yn,mn=dn),yn.envelopeType="Microsoft.ApplicationInsights.{0}.RemoteDependency",yn.dataType="RemoteDependencyData",yn);function yn(e,t,n,r,i,a,o,s,c,l,u,g){void 0===c&&(c="Ajax");var f=mn.call(this)||this;f.aiDataContract={id:d.Required,ver:d.Required,name:d.Default,resultCode:d.Default,duration:d.Default,success:d.Default,data:d.Default,target:d.Default,type:d.Default,properties:d.Default,measurements:d.Default,kind:d.Default,value:d.Default,count:d.Default,min:d.Default,max:d.Default,stdDev:d.Default,dependencyKind:d.Default,dependencySource:d.Default,commandName:d.Default,dependencyTypeName:d.Default},f.id=t,f.duration=ht.msToTimeSpan(i),f.success=a,f.resultCode=o+"",f.type=lt.sanitizeString(e,c);var p=It.ParseDependencyPath(e,n,s,r);return f.data=lt.sanitizeUrl(e,r)||p.data,f.target=lt.sanitizeString(e,p.target),l&&(f.target=f.target+" | "+l),f.name=lt.sanitizeString(e,p.name),f.properties=lt.sanitizeProperties(e,u),f.measurements=lt.sanitizeMeasurements(e,g),f}var In,Tn=(t(Sn,In=Ct),Sn);function Sn(){var e=In.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}var wn,_n=(t(Nn,wn=Tn),Nn.envelopeType="Microsoft.ApplicationInsights.{0}.Message",Nn.dataType="MessageData",Nn);function Nn(e,t,n,r,i){var a=wn.call(this)||this;return a.aiDataContract={ver:d.Required,message:d.Required,severityLevel:d.Default,properties:d.Default},t=t||ht.NotSpecified,a.message=lt.sanitizeMessage(e,t),a.properties=lt.sanitizeProperties(e,r),a.measurements=lt.sanitizeMeasurements(e,i),n&&(a.severityLevel=n),a}var xn,En=(t(bn,xn=cn),bn);function bn(){var e=xn.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}var Dn,Cn=(t(Pn,Dn=En),Pn.envelopeType="Microsoft.ApplicationInsights.{0}.PageviewPerformance",Pn.dataType="PageviewPerformanceData",Pn);function Pn(e,t,n,r,i,a,o){var s=Dn.call(this)||this;return s.aiDataContract={ver:d.Required,name:d.Default,url:d.Default,duration:d.Default,perfTotal:d.Default,networkConnect:d.Default,sentRequest:d.Default,receivedResponse:d.Default,domProcessing:d.Default,properties:d.Default,measurements:d.Default},s.url=lt.sanitizeUrl(e,n),s.name=lt.sanitizeString(e,t)||ht.NotSpecified,s.properties=lt.sanitizeProperties(e,i),s.measurements=lt.sanitizeMeasurements(e,a),o&&(s.domProcessing=o.domProcessing,s.duration=o.duration,s.networkConnect=o.networkConnect,s.perfTotal=o.perfTotal,s.receivedResponse=o.receivedResponse,s.sentRequest=o.sentRequest),s}var kn,Ln,An;t(Mn,kn=Nt);function Mn(e,t){var n=kn.call(this)||this;return n.aiDataContract={baseType:d.Required,baseData:d.Required},n.baseType=e,n.baseData=t,n}(An=Ln=Ln||{})[An.Verbose=0]="Verbose",An[An.Information=1]="Information",An[An.Warning=2]="Warning",An[An.Error=3]="Error",An[An.Critical=4]="Critical";var On=(Un.create=function(e,t,n,r,i,a){if(n=lt.sanitizeString(r,n)||ht.NotSpecified,j.isNullOrUndefined(e)||j.isNullOrUndefined(t)||j.isNullOrUndefined(n))throw Error("Input doesn't contain all required fields");var o={name:n,time:j.toISOString(new Date),iKey:"",ext:a||{},tags:[],data:{},baseType:t,baseData:e};if(!j.isNullOrUndefined(i))for(var s in i)i.hasOwnProperty(s)&&(o.data[s]=i[s]);return o},Un);function Un(){}var Rn=(zn.prototype.trackPageView=function(n,r){var i=this,a=n.name;if(j.isNullOrUndefined(a)||"string"!=typeof a){var e=I();a=n.name=e&&e.title||""}var o=n.uri;if(j.isNullOrUndefined(o)||"string"!=typeof o){var t=_();o=n.uri=t&&t.href||""}if(!this._pageViewPerformanceManager.isPerformanceTimingSupported())return this.appInsights.sendPageViewInternal(n,r),j.arrForEach(this._channel(),function(e){j.arrForEach(e,function(e){return e.flush(!0)})}),void this._logger.throwInternal(B.WARNING,ie,"trackPageView: navigation timing API used for calculation of page duration is not supported in this browser. This page view will be collected without duration and timing info.");var s,c,l=!1,u=this._pageViewPerformanceManager.getPerformanceTiming().navigationStart;s=St.GetDuration(u,+new Date),this._pageViewPerformanceManager.shouldCollectDuration(s)||(s=undefined),j.isNullOrUndefined(r)||j.isNullOrUndefined(r.duration)||(c=r.duration),!this.overridePageViewDuration&&isNaN(c)||(isNaN(c)&&((r=r||{}).duration=s),this.appInsights.sendPageViewInternal(n,r),j.arrForEach(this._channel(),function(e){j.arrForEach(e,function(e){return e.flush(!0)})}),l=!0),r=r||{};var g=setInterval(function(){try{if(i._pageViewPerformanceManager.isPerformanceTimingDataReady()){clearInterval(g);var e={name:a,uri:o};i._pageViewPerformanceManager.populatePageViewPerformanceEvent(e),e.isValid||l?(l||(r.duration=e.durationMs,i.appInsights.sendPageViewInternal(n,r)),i.pageViewPerformanceSent||(i.appInsights.sendPageViewPerformanceInternal(e,r),i.pageViewPerformanceSent=!0),j.arrForEach(i._channel(),function(e){j.arrForEach(e,function(e){return e.flush(!0)})})):(r.duration=s,i.appInsights.sendPageViewInternal(n,r),j.arrForEach(i._channel(),function(e){j.arrForEach(e,function(e){return e.flush(!0)})}))}else 6e4<St.GetDuration(u,+new Date)&&(clearInterval(g),l||(r.duration=6e4,i.appInsights.sendPageViewInternal(n,r),j.arrForEach(i._channel(),function(e){j.arrForEach(e,function(e){return e.flush(!0)})})))}catch(t){i._logger.throwInternal(B.CRITICAL,fe,"trackPageView failed on page load calculation: "+ht.getExceptionName(t),{exception:ht.dump(t)})}},100)},zn);function zn(e,t,n,r){this.pageViewPerformanceSent=!1,this.overridePageViewDuration=!1,this.overridePageViewDuration=t,this.appInsights=e,this._pageViewPerformanceManager=r,n&&(this._channel=function(){return n.getTransmissionControls()},this._logger=n.logger)}var Vn=(Gn.prototype.trackPreviousPageVisit=function(e,t){try{var n=this.restartPageVisitTimer(e,t);n&&this.pageVisitTimeTrackingHandler(n.pageName,n.pageUrl,n.pageVisitTime)}catch(r){this._logger.warnToConsole("Auto track page visit time failed, metric will not be collected: "+ht.dump(r))}},Gn.prototype.restartPageVisitTimer=function(e,t){try{var n=this.stopPageVisitTimer();return this.startPageVisitTimer(e,t),n}catch(r){return this._logger.warnToConsole("Call to restart failed: "+ht.dump(r)),null}},Gn.prototype.startPageVisitTimer=function(e,t){try{if(ht.canUseSessionStorage()){if(null!=ht.getSessionStorage(this._logger,this.prevPageVisitDataKeyName))throw new Error("Cannot call startPageVisit consecutively without first calling stopPageVisit");var n=new jn(e,t),r=E().stringify(n);ht.setSessionStorage(this._logger,this.prevPageVisitDataKeyName,r)}}catch(i){this._logger.warnToConsole("Call to start failed: "+ht.dump(i))}},Gn.prototype.stopPageVisitTimer=function(){try{if(ht.canUseSessionStorage()){var e=Date.now(),t=ht.getSessionStorage(this._logger,this.prevPageVisitDataKeyName);if(t&&x()){var n=E().parse(t);return n.pageVisitTime=e-n.pageVisitStartTime,ht.removeSessionStorage(this._logger,this.prevPageVisitDataKeyName),n}return null}return null}catch(r){return this._logger.warnToConsole("Stop page visit timer failed: "+ht.dump(r)),null}},Gn);function Gn(e,t){this.prevPageVisitDataKeyName="prevPageVisitData",this.pageVisitTimeTrackingHandler=t,this._logger=e}var jn=function ar(e,t){this.pageVisitStartTime=Date.now(),this.pageName=e,this.pageUrl=t},qn=(Bn.prototype.populatePageViewPerformanceEvent=function(e){e.isValid=!1;var t=this.getPerformanceNavigationTiming(),n=this.getPerformanceTiming();if(t||n){if(t)var r=t.duration,i=St.GetDuration(t.startTime,t.connectEnd),a=St.GetDuration(t.requestStart,t.responseStart),o=St.GetDuration(t.responseStart,t.responseEnd),s=St.GetDuration(t.responseEnd,t.loadEventEnd);else r=St.GetDuration(n.navigationStart,n.loadEventEnd),i=St.GetDuration(n.navigationStart,n.connectEnd),a=St.GetDuration(n.requestStart,n.responseStart),o=St.GetDuration(n.responseStart,n.responseEnd),s=St.GetDuration(n.responseEnd,n.loadEventEnd);0===r?this._logger.throwInternal(B.WARNING,te,"error calculating page view performance.",{total:r,network:i,request:a,response:o,dom:s}):this.shouldCollectDuration(r,i,a,o,s)?r<Math.floor(i)+Math.floor(a)+Math.floor(o)+Math.floor(s)?this._logger.throwInternal(B.WARNING,ee,"client performance math error.",{total:r,network:i,request:a,response:o,dom:s}):(e.durationMs=r,e.perfTotal=e.duration=ht.msToTimeSpan(r),e.networkConnect=ht.msToTimeSpan(i),e.sentRequest=ht.msToTimeSpan(a),e.receivedResponse=ht.msToTimeSpan(o),e.domProcessing=ht.msToTimeSpan(s),e.isValid=!0):this._logger.throwInternal(B.WARNING,de,"Invalid page load duration value. Browser perf data won't be sent.",{total:r,network:i,request:a,response:o,dom:s})}},Bn.prototype.getPerformanceTiming=function(){return this.isPerformanceTimingSupported()?N().timing:null},Bn.prototype.getPerformanceNavigationTiming=function(){return this.isPerformanceNavigationTimingSupported()?N().getEntriesByType("navigation")[0]:null},Bn.prototype.isPerformanceNavigationTimingSupported=function(){var e=N();return e&&e.getEntriesByType&&0<e.getEntriesByType("navigation").length},Bn.prototype.isPerformanceTimingSupported=function(){var e=N();return e&&e.timing},Bn.prototype.isPerformanceTimingDataReady=function(){var e=N(),t=e?e.timing:0;return t&&0<t.domainLookupStart&&0<t.navigationStart&&0<t.responseStart&&0<t.requestStart&&0<t.loadEventEnd&&0<t.responseEnd&&0<t.connectEnd&&0<t.domLoading},Bn.prototype.shouldCollectDuration=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=["googlebot","adsbot-google","apis-google","mediapartners-google"],r=(S()||{}).userAgent,i=!1;if(r)for(var a=0;a<n.length;a++)i=i||-1!==r.toLowerCase().indexOf(n[a]);if(i)return!1;for(a=0;a<e.length;a++)if(e[a]>=this.MAX_DURATION_ALLOWED)return!1;return!0},Bn);function Bn(e){this.MAX_DURATION_ALLOWED=36e5,e&&(this._logger=e.logger)}var Fn="duration";function Wn(e,t){e&&e.dispatchEvent&&t&&e.dispatchEvent(t)}var Hn,Xn=(t(Kn,Hn=ze),Kn.getDefaultConfig=function(e){return(e=e||{}).sessionRenewalMs=18e5,e.sessionExpirationMs=864e5,e.disableExceptionTracking=ht.stringToBoolOrDefault(e.disableExceptionTracking),e.autoTrackPageVisitTime=ht.stringToBoolOrDefault(e.autoTrackPageVisitTime),e.overridePageViewDuration=ht.stringToBoolOrDefault(e.overridePageViewDuration),e.enableUnhandledPromiseRejectionTracking=ht.stringToBoolOrDefault(e.enableUnhandledPromiseRejectionTracking),(isNaN(e.samplingPercentage)||e.samplingPercentage<=0||100<=e.samplingPercentage)&&(e.samplingPercentage=100),e.isCookieUseDisabled=ht.stringToBoolOrDefault(e.isCookieUseDisabled),e.isStorageUseDisabled=ht.stringToBoolOrDefault(e.isStorageUseDisabled),e.isBrowserLinkTrackingEnabled=ht.stringToBoolOrDefault(e.isBrowserLinkTrackingEnabled),e.enableAutoRouteTracking=ht.stringToBoolOrDefault(e.enableAutoRouteTracking),e.namePrefix=e.namePrefix||"",e},Kn.prototype.processTelemetry=function(e,t){var n=!1,r=this._telemetryInitializers.length;t=this._getTelCtx(t);for(var i=0;i<r;++i){var a=this._telemetryInitializers[i];if(a)try{if(!1===a.apply(null,[e])){n=!0;break}}catch(o){t.diagLog().throwInternal(B.CRITICAL,we,"One of telemetry initializers failed, telemetry item will not be sent: "+ht.getExceptionName(o),{exception:ht.dump(o)},!0)}}n||this.processNext(e,t)},Kn.prototype.trackEvent=function(e,t){try{var n=On.create(e,At.dataType,At.envelopeType,this.diagLog(),t);this.core.track(n)}catch(r){this.diagLog().throwInternal(B.WARNING,pe,"trackTrace failed, trace will not be collected: "+ht.getExceptionName(r),{exception:ht.dump(r)})}},Kn.prototype.startTrackEvent=function(e){try{this._eventTracking.start(e)}catch(t){this.diagLog().throwInternal(B.CRITICAL,ae,"startTrackEvent failed, event will not be collected: "+ht.getExceptionName(t),{exception:ht.dump(t)})}},Kn.prototype.stopTrackEvent=function(e,t,n){try{this._eventTracking.stop(e,undefined,t)}catch(r){this.diagLog().throwInternal(B.CRITICAL,oe,"stopTrackEvent failed, event will not be collected: "+ht.getExceptionName(r),{exception:ht.dump(r)})}},Kn.prototype.trackTrace=function(e,t){try{var n=On.create(e,_n.dataType,_n.envelopeType,this.diagLog(),t);this.core.track(n)}catch(r){this.diagLog().throwInternal(B.WARNING,pe,"trackTrace failed, trace will not be collected: "+ht.getExceptionName(r),{exception:ht.dump(r)})}},Kn.prototype.trackMetric=function(e,t){try{var n=On.create(e,an.dataType,an.envelopeType,this.diagLog(),t);this.core.track(n)}catch(r){this.diagLog().throwInternal(B.CRITICAL,ue,"trackMetric failed, metric will not be collected: "+ht.getExceptionName(r),{exception:ht.dump(r)})}},Kn.prototype.trackPageView=function(e,t){try{var n=e||{};this._pageViewManager.trackPageView(n,c({},n.properties,n.measurements,t)),this.config.autoTrackPageVisitTime&&this._pageVisitTimeManager.trackPreviousPageVisit(n.name,n.uri)}catch(r){this.diagLog().throwInternal(B.CRITICAL,ge,"trackPageView failed, page view will not be collected: "+ht.getExceptionName(r),{exception:ht.dump(r)})}},Kn.prototype.sendPageViewInternal=function(e,t,n){var r=I();r&&(e.refUri=e.refUri===undefined?r.referrer:e.refUri);var i=On.create(e,gn.dataType,gn.envelopeType,this.diagLog(),t,n);this.core.track(i),this._trackAjaxAttempts=0},Kn.prototype.sendPageViewPerformanceInternal=function(e,t,n){var r=On.create(e,Cn.dataType,Cn.envelopeType,this.diagLog(),t,n);this.core.track(r)},Kn.prototype.trackPageViewPerformance=function(e,t){try{this._pageViewPerformanceManager.populatePageViewPerformanceEvent(e),this.sendPageViewPerformanceInternal(e,t)}catch(n){this.diagLog().throwInternal(B.CRITICAL,ge,"trackPageViewPerformance failed, page view will not be collected: "+ht.getExceptionName(n),{exception:ht.dump(n)})}},Kn.prototype.startTrackPage=function(e){try{if("string"!=typeof e){var t=I();e=t&&t.title||""}this._pageTracking.start(e)}catch(n){this.diagLog().throwInternal(B.CRITICAL,se,"startTrackPage failed, page view may not be collected: "+ht.getExceptionName(n),{exception:ht.dump(n)})}},Kn.prototype.stopTrackPage=function(e,t,n,r){try{if("string"!=typeof e){var i=I();e=i&&i.title||""}if("string"!=typeof t){var a=_();t=a&&a.href||""}this._pageTracking.stop(e,t,n,r),this.config.autoTrackPageVisitTime&&this._pageVisitTimeManager.trackPreviousPageVisit(e,t)}catch(o){this.diagLog().throwInternal(B.CRITICAL,ce,"stopTrackPage failed, page view will not be collected: "+ht.getExceptionName(o),{exception:ht.dump(o)})}},Kn.prototype.sendExceptionInternal=function(e,t,n){var r=new jt(this.diagLog(),e.exception||new Error(ht.NotSpecified),e.properties,e.measurements,e.severityLevel,e.id).toInterface(),i=On.create(r,jt.dataType,jt.envelopeType,this.diagLog(),t,n);this.core.track(i)},Kn.prototype.trackException=function(e,t){try{this.sendExceptionInternal(e,t)}catch(n){this.diagLog().throwInternal(B.CRITICAL,le,"trackException failed, exception will not be collected: "+ht.getExceptionName(n),{exception:ht.dump(n)})}},Kn.prototype._onerror=function(e){try{var t={url:e&&e.url||(I()||{}).URL,lineNumber:e.lineNumber,columnNumber:e.columnNumber,message:e.message};if(ht.isCrossOriginError(e.message,e.url,e.lineNumber,e.columnNumber,e.error))this._sendCORSException(t.url);else{if(!ht.isError(e.error)){var n="window.onerror@"+t.url+":"+e.lineNumber+":"+(e.columnNumber||0);e.error=new Error(e.message),e.error.stack=n}this.trackException({exception:e.error,severityLevel:Ln.Error},t)}}catch(i){var r=e.error?e.error.name+", "+e.error.message:"null";this.diagLog().throwInternal(B.CRITICAL,ne,"_onError threw exception while logging error, error will not be collected: "+ht.getExceptionName(i),{exception:ht.dump(i),errorString:r})}},Kn.prototype.addTelemetryInitializer=function(e){this._telemetryInitializers.push(e)},Kn.prototype.initialize=function(e,t,n,r){var o=this;if(!this.isInitialized()){if(j.isNullOrUndefined(t))throw Error("Error initializing");Hn.prototype.initialize.call(this,e,t,n,r),this.setInitialized(!1);var i=this._getTelCtx(),a=this.identifier;this._globalconfig={instrumentationKey:e.instrumentationKey,endpointUrl:e.endpointUrl||"https://dc.services.visualstudio.com/v2/track"},this.config=i.getExtCfg(a);var s=Kn.getDefaultConfig();if(s!==undefined){for(var c in s)this.config[c]=i.getConfig(a,c,s[c]);if(this._globalconfig)for(var c in s)this._globalconfig[c]===undefined&&(this._globalconfig[c]=s[c])}this.config.isCookieUseDisabled&&ht.disableCookies(),this.config.isStorageUseDisabled&&ht.disableStorage();var l={instrumentationKey:function(){return e.instrumentationKey},accountId:function(){return o.config.accountId||e.accountId},sessionRenewalMs:function(){return o.config.sessionRenewalMs||e.sessionRenewalMs},sessionExpirationMs:function(){return o.config.sessionExpirationMs||e.sessionExpirationMs},sampleRate:function(){return o.config.samplingPercentage||e.samplingPercentage},cookieDomain:function(){return o.config.cookieDomain||e.cookieDomain},sdkExtension:function(){return o.config.sdkExtension||e.sdkExtension},isBrowserLinkTrackingEnabled:function(){return o.config.isBrowserLinkTrackingEnabled||e.isBrowserLinkTrackingEnabled},appId:function(){return o.config.appId||e.appId}};this._pageViewPerformanceManager=new qn(this.core),this._pageViewManager=new Rn(this,this.config.overridePageViewDuration,this.core,this._pageViewPerformanceManager),this._pageVisitTimeManager=new Vn(this.diagLog(),function(e,t,n){return o.trackPageVisitTime(e,t,n)}),this._telemetryInitializers=this._telemetryInitializers||[],this._addDefaultTelemetryInitializers(l),this._eventTracking=new Qn(this.diagLog(),"trackEvent"),this._eventTracking.action=function(e,t,n,r){(r=r||{})[Fn]=n.toString(),o.trackEvent({name:e,properties:r})},this._pageTracking=new Qn(this.diagLog(),"trackPageView"),this._pageTracking.action=function(e,t,n,r,i){j.isNullOrUndefined(r)&&(r={}),r[Fn]=n.toString();var a={name:e,uri:t,properties:r,measurements:i};o.sendPageViewInternal(a)};var u,g,f=T(),p=w(),d=_(),h=this;if(!1===this.config.disableExceptionTracking&&!this.config.autoExceptionInstrumented&&f){var m=f.onerror;f.onerror=function(e,t,n,r,i){var a=m&&m(e,t,n,r,i);return!0!==a&&h._onerror({message:e,url:t,lineNumber:n,columnNumber:r,error:i}),a},this.config.autoExceptionInstrumented=!0}if(!1===this.config.disableExceptionTracking&&!0===this.config.enableUnhandledPromiseRejectionTracking&&!this.config.autoUnhandledPromiseInstrumented&&f){var v="onunhandledrejection",y=f[v];f[v]=function(e){var t=y&&y.call(f,e);return!0!==t&&h._onerror({message:e.reason.toString(),error:e.reason instanceof Error?e.reason:new Error(e.reason.toString()),url:d?d.href:"",lineNumber:0,columnNumber:0}),t},this.config.autoUnhandledPromiseInstrumented=!0}if(!0===this.config.enableAutoRouteTracking&&p&&j.isFunction(p.pushState)&&j.isFunction(p.replaceState)&&f&&"undefined"!=typeof Event){var I=this;j.arrForEach(n,function(e){"AppInsightsPropertiesPlugin"===e.identifier&&(o._properties=e)}),p.pushState=(g=p.pushState,function(){var e=g.apply(this,arguments);return Wn(f,ht.createDomEvent(I.config.namePrefix+"pushState")),Wn(f,ht.createDomEvent(I.config.namePrefix+"locationchange")),e}),p.replaceState=(u=p.replaceState,function(){var e=u.apply(this,arguments);return Wn(f,ht.createDomEvent(I.config.namePrefix+"replaceState")),Wn(f,ht.createDomEvent(I.config.namePrefix+"locationchange")),e}),f.addEventListener&&(f.addEventListener(I.config.namePrefix+"popstate",function(){Wn(f,ht.createDomEvent(I.config.namePrefix+"locationchange"))}),f.addEventListener(I.config.namePrefix+"locationchange",function(){I._properties&&I._properties.context&&I._properties.context.telemetryTrace&&(I._properties.context.telemetryTrace.traceID=ht.generateW3CId(),I._properties.context.telemetryTrace.name=d&&d.pathname||"_unknown_"),o._currUri&&(o._prevUri=o._currUri),o._currUri=d&&d.href||"",setTimeout(function(e){I.trackPageView({refUri:e,properties:{duration:0}})}.bind(o,o._prevUri),I.autoRoutePVDelay)}))}this.setInitialized(!0)}},Kn.prototype.trackPageVisitTime=function(e,t,n){var r={PageName:e,PageUrl:t};this.trackMetric({name:"PageVisitTime",average:n,max:n,min:n,sampleCount:1},r)},Kn.prototype._addDefaultTelemetryInitializers=function(e){if(!e.isBrowserLinkTrackingEnabled()){var r=["/browserLinkSignalR/","/__browserLink/"];this._addTelemetryInitializer(function(e){if(e.baseType===vn.dataType){var t=e.baseData;if(t)for(var n=0;n<r.length;n++)if(t.target&&0<=t.target.indexOf(r[n]))return!1}return!0})}},Kn.prototype._addTelemetryInitializer=function(e){this._telemetryInitializers.push(e)},Kn.prototype._sendCORSException=function(e){var t={message:"Script error: The browser's same-origin policy prevents us from getting the details of this exception. Consider using the 'crossorigin' attribute.",url:e,lineNumber:0,columnNumber:0,error:undefined},n=On.create(t,jt.dataType,jt.envelopeType,this.diagLog(),{url:e});this.core.track(n)},Kn.Version="2.4.4",Kn);function Kn(){var e=Hn.call(this)||this;e.identifier="ApplicationInsightsAnalytics",e.priority=180,e.autoRoutePVDelay=500,e._trackAjaxAttempts=0;var t=_();return e._prevUri=t&&t.href||"",e}var Qn=(Jn.prototype.start=function(e){"undefined"!=typeof this._events[e]&&this._logger.throwInternal(B.WARNING,Te,"start was called more than once for this event without calling stop.",{name:this._name,key:e},!0),this._events[e]=+new Date},Jn.prototype.stop=function(e,t,n,r){var i=this._events[e];if(isNaN(i))this._logger.throwInternal(B.WARNING,Se,"stop was called without a corresponding start.",{name:this._name,key:e},!0);else{var a=+new Date,o=St.GetDuration(i,a);this.action(e,t,o,n,r)}delete this._events[e],this._events[e]=undefined},Jn);function Jn(e,t){this._name=t,this._events={},this._logger=e}e.ApplicationInsights=Xn,function(e,t,n){var r=Object.defineProperty;if(r)try{return r(e,t,n)}catch(i){}typeof n.value!==undefined&&(e[t]=n.value)}(e,"__esModule",{value:!0})});
//# sourceMappingURL=applicationinsights-analytics-js.min.js.map

@@ -426,3 +426,3 @@ /**

var originalOnUnhandledRejection_1 = _window[onunhandledrejection];
_window.onunhandledrejection = function (error) {
_window[onunhandledrejection] = function (error) {
var handled = originalOnUnhandledRejection_1 && originalOnUnhandledRejection_1.call(_window, error);

@@ -541,3 +541,3 @@ if (handled !== true) {

};
ApplicationInsights.Version = "2.4.3"; // Not currently used anywhere
ApplicationInsights.Version = "2.4.4"; // Not currently used anywhere
return ApplicationInsights;

@@ -544,0 +544,0 @@ }(BaseTelemetryPlugin));

/*!
* Application Insights JavaScript SDK - Web Analytics, 2.4.3
* Application Insights JavaScript SDK - Web Analytics, 2.4.4
* 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 r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function t(e,t){function n(){this.constructor=e}r(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 r(){}return r.prototype=e,new r}(t):(n.prototype=t.prototype,new n)}var a,n,d,i,o,s,c=function(){return(c=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};(n=a=a||{})[n.LocalStorage=0]="LocalStorage",n[n.SessionStorage=1]="SessionStorage",(i=d=d||{})[i.Default=0]="Default",i[i.Required=1]="Required",i[i.Array=2]="Array",i[i.Hidden=4]="Hidden",(s=o=o||{})[s.AI=0]="AI",s[s.AI_AND_W3C=1]="AI_AND_W3C",s[s.W3C=2]="W3C";var l=2,u="undefined",g="object",f="window",p="location",h="JSON";function m(){return typeof globalThis!==u&&globalThis?globalThis:typeof self!==u&&self?self:typeof window!==u&&window?window:typeof global!==u&&global?global:null}function v(e){var t=m();return t&&t[e]?t[e]:e===f&&y()?window:null}function y(){return Boolean(typeof window===g&&window)}function I(){return y()?window:v(f)}function T(){return function e(){return Boolean(typeof document===g&&document)}()?document:v("document")}function S(){return function e(){return Boolean(typeof navigator===g&&navigator)}()?navigator:v("navigator")}function w(){return function e(){return Boolean(typeof history===g&&history)}()?history:v("history")}function _(){return typeof location===g&&location?location:v(p)}function N(){return v("performance")}function x(){return Boolean(typeof JSON===g&&JSON||null!==v(h))}function E(){return x()?JSON||v(h):null}var b=u,D="prototype",C="attachEvent",P="addEventListener",k="detachEvent",L="removeEventListener";function A(e,t){return typeof e===t}function M(e){return e===undefined||A(e,b)}function O(e){return M(e)||null===e}function U(e,t){return e&&Object[D].hasOwnProperty.call(e,t)}function R(e){return A(e,"object")}function z(e){return A(e,"function")}function V(e,t,n,r){void 0===r&&(r=!1);var i=!1;if(!O(e))try{O(e[P])?O(e[C])||(e[C]("on"+t,n),i=!0):(e[P](t,n,r),i=!0)}catch(a){}return i}function G(e,t,n,r){if(void 0===r&&(r=!1),!O(e))try{O(e[L])?O(e[k])||e[k]("on"+t,n):e[L](t,n,r)}catch(i){}}var j=(q.isDate=function(e){return"[object Date]"===Object[D].toString.call(e)},q.isString=function(e){return A(e,"string")},q.isNumber=function(e){return A(e,"number")},q.isBoolean=function(e){return A(e,"boolean")},q.disableCookies=function(){q._canUseCookies=!1},q.newGuid=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(W,function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})},q.toISOString=function(e){if(q.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"}},q.arrForEach=function(e,t,n){for(var r=e.length,i=0;i<r;++i)i in e&&t.call(n||e,e[i],i,e)},q.arrIndexOf=function(e,t,n){for(var r=e.length,i=n||0,a=Math.max(0<=i?i:r-Math.abs(i),0);a<r;a++)if(a in e&&e[a]===t)return a;return-1},q.arrMap=function(e,t,n){for(var r=e.length,i=n||e,a=new Array(r),o=0;o<r;o++)o in e&&(a[o]=t.call(i,e[o],e));return a},q.arrReduce=function(e,t,n){var r,i=e.length,a=0;if(3<=arguments.length)r=n;else{for(;a<i&&!(a in e);)a++;r=e[a++]}for(;a<i;)a in e&&(r=t(r,e[a],a,e)),a++;return r},q.objCreate=function(e){if(null==e)return{};if(!R(e)&&!z(e))throw new TypeError("Object prototype may only be an Object: "+e);function t(){}return t[D]=e,new t},q.objKeys=function(e){var t=!{toString:null}.propertyIsEnumerable("toString");if(!(z(e)||R(e)&&null!==e))throw new TypeError("objKeys called on non-object");var n=[];for(var r in e)U(e,r)&&n.push(r);if(t)for(var i=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],a=i.length,o=0;o<a;o++)U(e,i[o])&&n.push(i[o]);return n},q.objDefineAccessors=function(e,t,n,r){var i=Object.defineProperty;if(i)try{var a={enumerable:!0,configurable:!0};return n&&(a.get=n),r&&(a.set=r),i(e,t,a),!0}catch(o){}return!1},q.addEventHandler=function(e,t){var n=!1,r=I();r&&(n=V(r,e,t),n=V(r.body,e,t)||n);var i=T();return i&&(n=H.Attach(i,e,t)||n),n},q.isTypeof=A,q.isUndefined=M,q.isNullOrUndefined=O,q.hasOwnProperty=U,q.isFunction=z,q.isObject=R,q);function q(){}var B,F,W=/[xy]/g,H=(X.Attach=V,X.AttachEvent=V,X.Detach=G,X.DetachEvent=G,X);function X(){}(F=B=B||{})[F.CRITICAL=1]="CRITICAL",F[F.WARNING=2]="WARNING";var K=1,Q=2,J=3,Y=4,$=5,Z=6,ee=8,te=10,ne=11,re=23,ie=25,ae=29,oe=30,se=31,ce=32,le=35,ue=36,ge=37,fe=38,pe=39,de=45,he=49,me=52,ve=56,ye=57,Ie=61,Te=62,Se=63,we=64,_e=66,Ne=68,xe=69,Ee=73,be=(De.sanitizeDiagnosticText=function(e){return e?'"'+e.replace(/\"/g,"")+'"':""},De.dataType="MessageData",De.AiNonUserActionablePrefix="AI (Internal): ",De.AiUserActionablePrefix="AI: ",De);function De(e,t,n,r){void 0===n&&(n=!1),this.messageId=e,this.message=(n?De.AiUserActionablePrefix:De.AiNonUserActionablePrefix)+e;var i="";x()&&(i=E().stringify(r));var a=(t?" message:"+De.sanitizeDiagnosticText(t):"")+(r?" props:"+De.sanitizeDiagnosticText(i):"");this.message+=a}var Ce=(Pe.prototype.throwInternal=function(e,t,n,r,i){void 0===i&&(i=!1);var a=new be(t,n,i,r),o=this;if(o.enableDebugExceptions())throw a;if(!j.isUndefined(a)&&a&&!j.isUndefined(a.message)){if(i){var s=+a.messageId;!o._messageLogged[s]&&o.consoleLoggingLevel()>=B.WARNING&&(o.warnToConsole(a.message),o._messageLogged[s]=!0)}else o.consoleLoggingLevel()>=B.WARNING&&o.warnToConsole(a.message);o.logInternalMessage(e,a)}},Pe.prototype.warnToConsole=function(e){!j.isUndefined(console)&&console&&(j.isFunction(console.warn)?console.warn(e):j.isFunction(console.log)&&console.log(e))},Pe.prototype.resetInternalMessageCount=function(){this._messageCount=0,this._messageLogged={}},Pe.prototype.logInternalMessage=function(e,t){var n=this;if(!n._areInternalMessagesThrottled()){var r=!0,i=n.AIInternalMessagePrefix+t.messageId;if(n._messageLogged[i]?r=!1:n._messageLogged[i]=!0,r&&(e<=n.telemetryLoggingLevel()&&(n.queue.push(t),n._messageCount++),n._messageCount===n.maxInternalMessageLimit())){var a="Internal events throttle limit per PageView reached for this app.",o=new be(re,a,!1);n.queue.push(o),n.warnToConsole(a)}}},Pe.prototype._areInternalMessagesThrottled=function(){return this._messageCount>=this.maxInternalMessageLimit()},Pe);function Pe(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},j.isNullOrUndefined(e)||(j.isNullOrUndefined(e.loggingLevelConsole)||(this.consoleLoggingLevel=function(){return e.loggingLevelConsole}),j.isNullOrUndefined(e.loggingLevelTelemetry)||(this.telemetryLoggingLevel=function(){return e.loggingLevelTelemetry}),j.isNullOrUndefined(e.maxMessageLimit)||(this.maxInternalMessageLimit=function(){return e.maxMessageLimit}),j.isNullOrUndefined(e.enableDebugExceptions)||(this.enableDebugExceptions=function(){return e.enableDebugExceptions}))}var ke=j.isFunction,Le=function Yn(i,a){var o=this,s=null,c=ke(i.processTelemetry),l=ke(i.setNextPlugin);o._hasRun=!1,o.getPlugin=function(){return i},o.getNext=function(){return s},o.setNext=function(e){s=e},o.processTelemetry=function(e,t){if(t=t||a,i&&c){o._hasRun=!0;try{t.setNext(s),l&&i.setNextPlugin(s),s&&(s._hasRun=!1),i.processTelemetry(e,t)}catch(r){var n=s&&s._hasRun;s&&n||t.diagLog().throwInternal(B.CRITICAL,Ee,"Plugin ["+i.identifier+"] failed during processTelemetry - "+r),s&&!n&&s.processTelemetry(e,t)}}else s&&(o._hasRun=!0,s.processTelemetry(e,t))}},Ae=j.isNullOrUndefined;function Me(e,t){var n=[];if(e&&0<e.length)for(var r=null,i=0;i<e.length;i++){var a=e[i];if(a&&j.isFunction(a.processTelemetry)){var o=new Le(a,t);n.push(o),r&&r.setNext(o),r=o}}return 0<n.length?n[0]:null}var Oe=function $n(e,a,n,t){var o=this,r=null;null!==t&&(e&&j.isFunction(e.getPlugin)?r=function s(e,t,n){var r=[],i=!n;if(e)for(;e;){var a=e.getPlugin();!i&&a!==n||(i=!0,r.push(a)),e=e.getNext()}return i||r.push(n),Me(r,t)}(e,o,t||e.getPlugin()):t?r=function c(e,t,n){var r=e,i=!1;return n&&e&&(r=[],j.arrForEach(e,function(e){!i&&e!==n||(i=!0,r.push(e))})),n&&!i&&(r=r||[]).push(n),Me(r,t)}(e,o,t):j.isUndefined(t)&&(r=Me(e,o))),o.core=function(){return n},o.diagLog=function(){var e=(n||{}).logger;return e=e||new Ce(a||{})},o.getCfg=function(){return a},o.getExtCfg=function(e,t){var n;if(void 0===t&&(t={}),a){var r=a.extensionConfig;r&&e&&(n=r[e])}return n||t},o.getConfig=function(e,t,n){var r;void 0===n&&(n=!1);var i=o.getExtCfg(e,null);return i&&!Ae(i[t])?r=i[t]:a&&!Ae(a[t])&&(r=a[t]),Ae(r)?n:r},o.hasNext=function(){return null!=r},o.getNext=function(){return r},o.setNext=function(e){r=e},o.processNext=function(e){var t=r;t&&(r=t.getNext(),t.processTelemetry(e,o))},o.createNew=function(e,t){return void 0===e&&(e=null),new $n(e||r,a,n,t)}},Ue=j.isFunction,Re="getPlugin",ze=(Ve.prototype.initialize=function(e,t,n,r){this._baseTelInit(e,t,n,r)},Ve);function Ve(){var a=this,o=!1,s=null,c=null;a.core=null,a.diagLog=function(e){return a._getTelCtx(e).diagLog()},a.isInitialized=function(){return o},a.setInitialized=function(e){o=e},a.setNextPlugin=function(e){c=e},a.processNext=function(e,t){t?t.processNext(e):c&&Ue(c.processTelemetry)&&c.processTelemetry(e,null)},a._getTelCtx=function(e){void 0===e&&(e=null);var t=e;if(!t){var n=s||new Oe(null,{},a.core);t=c&&c[Re]?n.createNew(null,c[Re]):n.createNew(null,c)}return t},a._baseTelInit=function(e,t,n,r){e&&(e.extensionConfig=e.extensionConfig||[]),!r&&t&&(r=t.getProcessTelContext().getNext());var i=c;c&&c[Re]&&(i=c[Re]()),a.core=t,s=new Oe(r,e,t,i),o=!0}}var Ge=j.isFunction,je="processTelemetry",qe="priority",Be="setNextPlugin",Fe="isInitialized";function We(t,n){for(var e=[],r=null,i=t.getNext();i;){var a=i.getPlugin();a&&(r&&Ge(r[Be])&&Ge(a[je])&&r[Be](a),Ge(a[Fe])&&a[Fe]()||e.push(a),r=a,i=i.getNext())}j.arrForEach(e,function(e){e.initialize(t.getCfg(),t.core(),n,t.getNext())})}function He(e){return e.sort(function(e,t){var n=0,r=Ge(t[je]);return Ge(e[je])?n=r?e[qe]-t[qe]:1:r&&(n=-1),n})}var Xe=500,Ke="Channel has invalid priority",Qe=j.arrForEach,Je=j.objDefineAccessors;function Ye(e,t){t&&0<t.length&&(function n(e){Qe(e,function(e){if(e.priority<Xe)throw Error(Ke+e.identifier)})}(t=t.sort(function(e,t){return e.priority-t.priority})),e.push(t))}var $e,Ze=(t(et,$e=ze),et.prototype.processTelemetry=function(t,n){var r=this;this._channelQueue&&Qe(this._channelQueue,function(e){0<e.length&&r._getTelCtx(n).createNew(e).processNext(t)})},et.prototype.getChannelControls=function(){return this._channelQueue},et.prototype.initialize=function(t,n,r){if(!this.isInitialized()){$e.prototype.initialize.call(this,t,n,r),t.isCookieUseDisabled&&j.disableCookies();var e=this._channelQueue=function i(e,t){var n=[];if(e&&Qe(e,function(e){return Ye(n,e)}),t){var r=[];Qe(t,function(e){e.priority>Xe&&r.push(e)}),Ye(n,r)}return n}((t||{}).channels,r);Qe(e,function(e){return We(new Oe(e,t,n),r)})}},et._staticInit=(Je(et.prototype,"ChannelControls",et.prototype.getChannelControls),void Je(et.prototype,"channelQueue",et.prototype.getChannelControls)),et);function et(){var e=null!==$e&&$e.apply(this,arguments)||this;return e.identifier="ChannelControllerPlugin",e.priority=Xe,e}var tt=j.arrForEach,nt=j.isNullOrUndefined,rt=(it.prototype.initialize=function(e,t,r,n){var i=this;if(i.isInitialized())throw Error("Core should not be initialized more than once");if(!e||nt(e.instrumentationKey))throw Error("Please provide instrumentation key");i.config=e;var a=i._channelController;n=n||j.objCreate({addNotificationListener:function(e){},removeNotificationListener:function(e){},eventsSent:function(e){},eventsDiscarded:function(e,t){}}),i._notificationManager=n,e.extensions=nt(e.extensions)?[]:e.extensions,(e.extensionConfig=nt(e.extensionConfig)?{}:e.extensionConfig).NotificationManager=n,r=r||j.objCreate({throwInternal:function(e,t,n,r,i){void 0===i&&(i=!1)},warnToConsole:function(e){},resetInternalMessageCount:function(){}}),i.logger=r;var o=[];o.push.apply(o,t.concat(e.extensions)),o=He(o);var s=[],c={};if(tt(o,function(e){if(nt(e)||nt(e.initialize))throw Error("Extensions must provide callback to initialize");var t=e.priority,n=e.identifier;e&&t&&(nt(c[t])?c[t]=n:r.warnToConsole("Two extensions have same priority #"+t+" - "+c[t]+", "+n)),(!t||t<a.priority)&&s.push(e)}),o.push(a),s.push(a),o=He(o),i._extensions=o,We(new Oe([a],e,i),o),We(new Oe(s,e,i),o),i._extensions=s,0===i.getTransmissionControls().length)throw new Error("No channels available");i._setInit(!0)},it.prototype.getTransmissionControls=function(){return this._channelController.getChannelControls()},it.prototype.track=function(e){var t=this;e.iKey||(e.iKey=t.config.instrumentationKey),e.time||(e.time=j.toISOString(new Date)),nt(e.ver)&&(e.ver="4.0"),t.isInitialized()?(0<t._eventQueue.length&&(tt(t._eventQueue,function(e){t.getProcessTelContext().processNext(e)}),t._eventQueue=[]),t.getProcessTelContext().processNext(e)):t._eventQueue.push(e)},it.prototype.getProcessTelContext=function(){var e=this._extensions,t=e;return e&&0!==e.length||(t=[this._channelController]),new Oe(t,this.config,this)},it);function it(){var t=!1,e=this;e._extensions=new Array,e._channelController=new Ze,e.isInitialized=function(){return t},e._setInit=function(e){t=e},e._eventQueue=[]}var at=(ot.prototype.addNotificationListener=function(e){this.listeners.push(e)},ot.prototype.removeNotificationListener=function(e){for(var t=j.arrIndexOf(this.listeners,e);-1<t;)this.listeners.splice(t,1),t=j.arrIndexOf(this.listeners,e)},ot.prototype.eventsSent=function(t){for(var n=this,e=function(e){r.listeners[e].eventsSent&&setTimeout(function(){return n.listeners[e].eventsSent(t)},0)},r=this,i=0;i<this.listeners.length;++i)e(i)},ot.prototype.eventsDiscarded=function(t,n){for(var r=this,e=function(e){i.listeners[e].eventsDiscarded&&setTimeout(function(){return r.listeners[e].eventsDiscarded(t,n)},0)},i=this,a=0;a<this.listeners.length;++a)e(a)},ot);function ot(){this.listeners=[]}var st;t(ct,st=rt),ct.prototype.initialize=function(e,t){var n=this;n._notificationManager=new at,n.logger=new Ce(e),n.config=e,st.prototype.initialize.call(this,e,t,n.logger,n._notificationManager)},ct.prototype.getTransmissionControls=function(){return st.prototype.getTransmissionControls.call(this)},ct.prototype.track=function(e){if(null===e)throw this._notifyInvalidEvent(e),Error("Invalid telemetry item");this._validateTelemetryItem(e),st.prototype.track.call(this,e)},ct.prototype.addNotificationListener=function(e){this._notificationManager&&this._notificationManager.addNotificationListener(e)},ct.prototype.removeNotificationListener=function(e){this._notificationManager&&this._notificationManager.removeNotificationListener(e)},ct.prototype.pollInternalLogs=function(r){var t=this,e=this.config.diagnosticLogInterval;return 0<e||(e=1e4),setInterval(function(){var n=t,e=n.logger?n.logger.queue:[];j.arrForEach(e,function(e){var t={name:r||"InternalMessageId: "+e.messageId,iKey:n.config.instrumentationKey,time:j.toISOString(new Date),baseType:be.dataType,baseData:{message:e.message}};n.track(t)}),e.length=0},e)},ct.prototype._validateTelemetryItem=function(e){if(j.isNullOrUndefined(e.name))throw this._notifyInvalidEvent(e),Error("telemetry name required")},ct.prototype._notifyInvalidEvent=function(e){this._notificationManager&&this._notificationManager.eventsDiscarded([e],l)};function ct(){return st.call(this)||this}var lt=(ut.sanitizeKeyAndAddUniqueness=function(e,t,n){var r=t.length,i=ut.sanitizeKey(e,t);if(i.length!==r){for(var a=0,o=i;n[o]!==undefined;)a++,o=i.substring(0,ut.MAX_NAME_LENGTH-3)+ut.padNumber(a);i=o}return i},ut.sanitizeKey=function(e,t){var n;return t&&(t=ut.trim(t.toString())).length>ut.MAX_NAME_LENGTH&&(n=t.substring(0,ut.MAX_NAME_LENGTH),e.throwInternal(B.WARNING,ye,"name is too long. It has been truncated to "+ut.MAX_NAME_LENGTH+" characters.",{name:t},!0)),n||t},ut.sanitizeString=function(e,t,n){var r;return void 0===n&&(n=ut.MAX_STRING_LENGTH),t&&(n=n||ut.MAX_STRING_LENGTH,(t=ut.trim(t)).toString().length>n&&(r=t.toString().substring(0,n),e.throwInternal(B.WARNING,Ie,"string value is too long. It has been truncated to "+n+" characters.",{value:t},!0))),r||t},ut.sanitizeUrl=function(e,t){return ut.sanitizeInput(e,t,ut.MAX_URL_LENGTH,_e)},ut.sanitizeMessage=function(e,t){var n;return t&&t.length>ut.MAX_MESSAGE_LENGTH&&(n=t.substring(0,ut.MAX_MESSAGE_LENGTH),e.throwInternal(B.WARNING,ve,"message is too long, it has been truncated to "+ut.MAX_MESSAGE_LENGTH+" characters.",{message:t},!0)),n||t},ut.sanitizeException=function(e,t){var n;return t&&t.length>ut.MAX_EXCEPTION_LENGTH&&(n=t.substring(0,ut.MAX_EXCEPTION_LENGTH),e.throwInternal(B.WARNING,me,"exception is too long, it has been truncated to "+ut.MAX_EXCEPTION_LENGTH+" characters.",{exception:t},!0)),n||t},ut.sanitizeProperties=function(e,t){if(t){var n={};for(var r in t){var i=t[r];if(j.isObject(i)&&x())try{i=E().stringify(i)}catch(a){e.throwInternal(B.WARNING,he,"custom property is not valid",{exception:a},!0)}i=ut.sanitizeString(e,i,ut.MAX_PROPERTY_LENGTH),n[r=ut.sanitizeKeyAndAddUniqueness(e,r,n)]=i}t=n}return t},ut.sanitizeMeasurements=function(e,t){if(t){var n={};for(var r in t){var i=t[r];n[r=ut.sanitizeKeyAndAddUniqueness(e,r,n)]=i}t=n}return t},ut.sanitizeId=function(e,t){return t?ut.sanitizeInput(e,t,ut.MAX_ID_LENGTH,xe).toString():t},ut.sanitizeInput=function(e,t,n,r){var i;return t&&(t=ut.trim(t)).length>n&&(i=t.substring(0,n),e.throwInternal(B.WARNING,r,"input is too long, it has been truncated to "+n+" characters.",{data:t},!0)),i||t},ut.padNumber=function(e){var t="00"+e;return t.substr(t.length-3)},ut.trim=function(e){return j.isString(e)?e.replace(/^\s+|\s+$/g,""):e},ut.MAX_NAME_LENGTH=150,ut.MAX_ID_LENGTH=128,ut.MAX_PROPERTY_LENGTH=8192,ut.MAX_STRING_LENGTH=1024,ut.MAX_URL_LENGTH=2048,ut.MAX_MESSAGE_LENGTH=32768,ut.MAX_EXCEPTION_LENGTH=32768,ut);function ut(){}var gt="prototype",ft=S(),pt=j.isString,dt=null;var ht=(mt.createDomEvent=function(e){var t=null;if(j.isFunction(Event))t=new Event(e);else{var n=T();n&&n.createEvent&&(t=n.createEvent("Event")).initEvent(e,!0,!0)}return t},mt.disableStorage=function(){mt._canUseLocalStorage=!1,mt._canUseSessionStorage=!1},mt._getLocalStorageObject=function(){return mt.canUseLocalStorage()?mt._getVerifiedStorageObject(a.LocalStorage):null},mt._getVerifiedStorageObject=function(e){var t,n,r=null;try{if(j.isNullOrUndefined(m()))return null;n=new Date,(r=e===a.LocalStorage?v("localStorage"):v("sessionStorage")).setItem(n.toString(),n.toString()),t=r.getItem(n.toString())!==n.toString(),r.removeItem(n.toString()),t&&(r=null)}catch(i){r=null}return r},mt.isInternalApplicationInsightsEndpoint=function(e){return-1!==mt._internalEndpoints.indexOf(e.toLowerCase())},mt.canUseLocalStorage=function(){return mt._canUseLocalStorage===undefined&&(mt._canUseLocalStorage=!!mt._getVerifiedStorageObject(a.LocalStorage)),mt._canUseLocalStorage},mt.getStorage=function(e,t){var n=mt._getLocalStorageObject();if(null!==n)try{return n.getItem(t)}catch(r){mt._canUseLocalStorage=!1,e.throwInternal(B.WARNING,K,"Browser failed read of local storage. "+mt.getExceptionName(r),{exception:mt.dump(r)})}return null},mt.setStorage=function(e,t,n){var r=mt._getLocalStorageObject();if(null!==r)try{return r.setItem(t,n),!0}catch(i){mt._canUseLocalStorage=!1,e.throwInternal(B.WARNING,J,"Browser failed write to local storage. "+mt.getExceptionName(i),{exception:mt.dump(i)})}return!1},mt.removeStorage=function(e,t){var n=mt._getLocalStorageObject();if(null!==n)try{return n.removeItem(t),!0}catch(r){mt._canUseLocalStorage=!1,e.throwInternal(B.WARNING,$,"Browser failed removal of local storage item. "+mt.getExceptionName(r),{exception:mt.dump(r)})}return!1},mt._getSessionStorageObject=function(){return mt.canUseSessionStorage()?mt._getVerifiedStorageObject(a.SessionStorage):null},mt.canUseSessionStorage=function(){return mt._canUseSessionStorage===undefined&&(mt._canUseSessionStorage=!!mt._getVerifiedStorageObject(a.SessionStorage)),mt._canUseSessionStorage},mt.getSessionStorageKeys=function(){var e=[];if(mt.canUseSessionStorage())for(var t in v("sessionStorage"))e.push(t);return e},mt.getSessionStorage=function(e,t){var n=mt._getSessionStorageObject();if(null!==n)try{return n.getItem(t)}catch(r){mt._canUseSessionStorage=!1,e.throwInternal(B.WARNING,Q,"Browser failed read of session storage. "+mt.getExceptionName(r),{exception:mt.dump(r)})}return null},mt.setSessionStorage=function(e,t,n){var r=mt._getSessionStorageObject();if(null!==r)try{return r.setItem(t,n),!0}catch(i){mt._canUseSessionStorage=!1,e.throwInternal(B.WARNING,Y,"Browser failed write to session storage. "+mt.getExceptionName(i),{exception:mt.dump(i)})}return!1},mt.removeSessionStorage=function(e,t){var n=mt._getSessionStorageObject();if(null!==n)try{return n.removeItem(t),!0}catch(r){mt._canUseSessionStorage=!1,e.throwInternal(B.WARNING,Z,"Browser failed removal of session storage item. "+mt.getExceptionName(r),{exception:mt.dump(r)})}return!1},mt.disableCookies=function(){j.disableCookies()},mt.canUseCookies=function(e){if(j._canUseCookies===undefined){j._canUseCookies=!1;try{j._canUseCookies=mt.document.cookie!==undefined}catch(t){e.throwInternal(B.WARNING,Ne,"Cannot access document.cookie - "+mt.getExceptionName(t),{exception:mt.dump(t)})}}return j._canUseCookies&&mt.document&&mt.document.cookie},mt.disallowsSameSiteNone=function(e){return!!pt(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 i(e,t){var n=e.length,r=n-t.length;return e.substring(0<=r?r: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"))},mt.setCookie=function(e,t,n,r){if(mt.canUseCookies(e)){var i="",a="";r&&(i=";domain="+r);var o=_();o&&"https:"===o.protocol&&(a=";secure",null===dt&&(dt=mt.disallowsSameSiteNone((S()||{}).userAgent)),dt||(n+=";SameSite=None")),mt.document.cookie=t+"="+n+i+";path=/"+a}},mt.stringToBoolOrDefault=function(e,t){return void 0===t&&(t=!1),e===undefined||null===e?t:"true"===e.toString().toLowerCase()},mt.getCookie=function(e,t){if(mt.canUseCookies(e)){var n="";if(t&&t.length)for(var r=t+"=",i=mt.document.cookie.split(";"),a=0;a<i.length;a++){var o=i[a];if((o=mt.trim(o))&&0===o.indexOf(r)){n=o.substring(r.length,i[a].length);break}}return n}},mt.deleteCookie=function(e,t){mt.canUseCookies(e)&&(mt.document.cookie=t+"=;path=/;expires=Thu, 01 Jan 1970 00:00:01 GMT;")},mt.trim=function(e){return pt(e)?e.replace(/^\s+|\s+$/g,""):e},mt.newId=function(){for(var e="",t=1073741824*Math.random();0<t;)e+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(t%64),t=Math.floor(t/64);return e},mt.random32=function(){return 4294967296*Math.random()|0},mt.generateW3CId=function(){for(var e,t=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"],n="",r=0;r<4;r++)n+=t[15&(e=mt.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 i=t[8+4*Math.random()|0];return n.substr(0,8)+n.substr(9,4)+"4"+n.substr(13,3)+i+n.substr(16,3)+n.substr(19,12)},mt.isArray=function(e){return"[object Array]"===Object[gt].toString.call(e)},mt.isError=function(e){return"[object Error]"===Object[gt].toString.call(e)},mt.getIEVersion=function(e){void 0===e&&(e=null);var t=e?e.toLowerCase():ft?(ft.userAgent||"").toLowerCase():"";return-1!==t.indexOf("msie")?parseInt(t.split("msie")[1]):null},mt.msToTimeSpan=function(e){(isNaN(e)||e<0)&&(e=0);var t=""+(e=Math.round(e))%1e3,n=""+Math.floor(e/1e3)%60,r=""+Math.floor(e/6e4)%60,i=""+Math.floor(e/36e5)%24,a=Math.floor(e/864e5);return t=1===t.length?"00"+t:2===t.length?"0"+t:t,n=n.length<2?"0"+n:n,r=r.length<2?"0"+r:r,(0<a?a+".":"")+(i=i.length<2?"0"+i:i)+":"+r+":"+n+"."+t},mt.isCrossOriginError=function(e,t,n,r,i){return("Script error."===e||"Script error"===e)&&!i},mt.dump=function(e){var t=Object[gt].toString.call(e),n="";return"[object Error]"===t?n="{ stack: '"+e.stack+"', message: '"+e.message+"', name: '"+e.name+"'":x()&&(n=E().stringify(e)),t+n},mt.getExceptionName=function(e){return"[object Error]"===Object[gt].toString.call(e)?e.name:""},mt.addEventHandler=function(e,t){return H.Attach(I(),e,t)},mt.IsBeaconApiSupported=function(){return"sendBeacon"in ft&&ft.sendBeacon},mt.getExtension=function(e,t){for(var n=null,r=0;!n&&r<e.length;)e[r]&&e[r].identifier===t&&(n=e[r]),r++;return n},mt.document=T()||{},mt._canUseLocalStorage=undefined,mt._canUseSessionStorage=undefined,mt._internalEndpoints=["https://dc.services.visualstudio.com/v2/track","https://breeze.aimon.applicationinsights.io/v2/track","https://dc-int.services.visualstudio.com/v2/track"],mt.NotSpecified="not_specified",mt.isDate=j.isDate,mt.toISOStringForIE8=j.toISOString,mt);function mt(){}var vt=(yt.parseUrl=function(e){return yt.htmlAnchorElement||(yt.htmlAnchorElement=yt.document.createElement?yt.document.createElement("a"):{host:yt.parseHost(e)}),yt.htmlAnchorElement.href=e,yt.htmlAnchorElement},yt.getAbsoluteUrl=function(e){var t,n=yt.parseUrl(e);return n&&(t=n.href),t},yt.getPathName=function(e){var t,n=yt.parseUrl(e);return n&&(t=n.pathname),t},yt.getCompleteUrl=function(e,t){return e?e.toUpperCase()+" "+t:t},yt.parseHost=function(e){if(e){var t=e.match(/:\/\/(www[0-9]?\.)?(.[^/:]+)/i);if(null!=t&&2<t.length&&pt(t[2])&&0<t[2].length)return t[2]}return null},yt.document=T()||{},yt);function yt(){}var It=(Tt.ParseDependencyPath=function(e,t,n,r){var i,a=r,o=r;if(t&&0<t.length){var s=vt.parseUrl(t);if(i=s.host,!a)if(null!=s.pathname){var c=0===s.pathname.length?"/":s.pathname;"/"!==c.charAt(0)&&(c="/"+c),o=s.pathname,a=lt.sanitizeString(e,n?n+" "+c:c)}else a=lt.sanitizeString(e,t)}else a=i=r;return{target:i,name:a,data:o}},Tt);function Tt(){}var St=(wt.Now=function(){var e=N();return e&&e.now&&e.timing?e.now()+e.timing.navigationStart:(new Date).getTime()},wt.GetDuration=function(e,t){var n=null;return 0===e||0===t||j.isNullOrUndefined(e)||j.isNullOrUndefined(t)||(n=t-e),n},wt);function wt(){}var _t,Nt=(t(xt,_t=function Zn(){}),xt);function xt(){return _t.call(this)||this}var Et;t(bt,Et=function er(){this.ver=1,this.sampleRate=100,this.tags={}});function bt(e,t,n){var r=Et.call(this)||this;return r.name=lt.sanitizeString(e,n)||ht.NotSpecified,r.data=t,r.time=j.toISOString(new Date),r.aiDataContract={time:d.Required,iKey:d.Required,name:d.Required,sampleRate:function(){return 100===r.sampleRate?d.Hidden:d.Required},tags:d.Required,data:d.Required},r}var Dt,Ct=function tr(){},Pt=(t(kt,Dt=Ct),kt);function kt(){var e=Dt.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}var Lt,At=(t(Mt,Lt=Pt),Mt.envelopeType="Microsoft.ApplicationInsights.{0}.Event",Mt.dataType="EventData",Mt);function Mt(e,t,n,r){var i=Lt.call(this)||this;return i.aiDataContract={ver:d.Required,name:d.Required,properties:d.Default,measurements:d.Default},i.name=lt.sanitizeString(e,t)||ht.NotSpecified,i.properties=lt.sanitizeProperties(e,n),i.measurements=lt.sanitizeMeasurements(e,r),i}var Ot,Ut=function nr(){},Rt=(t(zt,Ot=Ct),zt);function zt(){var e=Ot.call(this)||this;return e.ver=2,e.exceptions=[],e.properties={},e.measurements={},e}var Vt,Gt=function rr(){this.hasFullStack=!0,this.parsedStack=[]},jt=(t(qt,Vt=Rt),qt.CreateFromInterface=function(t,e){var n=e.exceptions&&j.arrMap(e.exceptions,function(e){return Ft.CreateFromInterface(t,e)});return new qt(t,c({},e,{exceptions:n}))},qt.prototype.toInterface=function(){var e=this,t=e.exceptions,n=e.properties,r=e.measurements,i=e.severityLevel,a=(e.ver,e.problemGroup),o=e.id,s=e.isManual;return{ver:"4.0",exceptions:t instanceof Array&&j.arrMap(t,function(e){return e.toInterface()})||undefined,severityLevel:i,properties:n,measurements:r,problemGroup:a,id:o,isManual:s}},qt.CreateSimpleException=function(e,t,n,r,i,a){return{exceptions:[{hasFullStack:!0,message:e,stack:i,typeName:t}]}},qt.envelopeType="Microsoft.ApplicationInsights.{0}.Exception",qt.dataType="ExceptionData",qt);function qt(e,t,n,r,i,a){var o=Vt.call(this)||this;return o.aiDataContract={ver:d.Required,exceptions:d.Required,severityLevel:d.Default,properties:d.Default,measurements:d.Default},t instanceof Error?(o.exceptions=[new Ft(e,t)],o.properties=lt.sanitizeProperties(e,n),o.measurements=lt.sanitizeMeasurements(e,r),i&&(o.severityLevel=i),a&&(o.id=a)):(o.exceptions=t.exceptions,o.properties=t.properties,o.measurements=t.measurements,t.severityLevel&&(o.severityLevel=t.severityLevel),t.id&&(o.id=t.id),t.problemGroup&&(o.problemGroup=t.problemGroup),o.ver=2,j.isNullOrUndefined(t.isManual)||(o.isManual=t.isManual)),o}var Bt,Ft=(t(Wt,Bt=Gt),Wt.prototype.toInterface=function(){var e=this.parsedStack instanceof Array&&j.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}},Wt.CreateFromInterface=function(e,t){var n=t.parsedStack instanceof Array&&j.arrMap(t.parsedStack,function(e){return Xt.CreateFromInterface(e)})||t.parsedStack;return new Wt(e,c({},t,{parsedStack:n}))},Wt.parseStack=function(e){var t;if(j.isString(e)){var n=e.split("\n");t=[];for(var r=0,i=0,a=0;a<=n.length;a++){var o=n[a];if(Xt.regex.test(o)){var s=new Xt(n[a],r++);i+=s.sizeInBytes,t.push(s)}}if(32768<i)for(var c=0,l=t.length-1,u=0,g=c,f=l;c<l;){if(32768<(u+=t[c].sizeInBytes+t[l].sizeInBytes)){var p=f-g+1;t.splice(g,p);break}g=c,f=l,c++,l--}}return t},Wt);function Wt(e,t){var n=Bt.call(this)||this;if(n.aiDataContract={id:d.Default,outerId:d.Default,typeName:d.Required,message:d.Required,hasFullStack:d.Default,stack:d.Default,parsedStack:d.Array},t instanceof Error){n.typeName=lt.sanitizeString(e,t.name)||ht.NotSpecified,n.message=lt.sanitizeMessage(e,t.message)||ht.NotSpecified;var r=t.stack;n.parsedStack=Wt.parseStack(r),n.stack=lt.sanitizeException(e,r),n.hasFullStack=ht.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 Ht,Xt=(t(Kt,Ht=Ut),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=Ht.call(this)||this;if(n.sizeInBytes=0,n.aiDataContract={level:d.Required,method:d.Required,assembly:d.Default,fileName:d.Default,line:d.Default},"string"==typeof e){var r=e;n.level=t,n.method="<no_method>",n.assembly=ht.trim(r),n.fileName="",n.line=0;var i=r.match(Kt.regex);i&&5<=i.length&&(n.method=ht.trim(i[2])||n.method,n.fileName=ht.trim(i[4]),n.line=parseInt(i[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 Qt,Jt,Yt,$t=(t(Zt,Qt=Ct),Zt);function Zt(){var e=Qt.call(this)||this;return e.ver=2,e.metrics=[],e.properties={},e.measurements={},e}(Yt=Jt=Jt||{})[Yt.Measurement=0]="Measurement",Yt[Yt.Aggregation=1]="Aggregation";var en,tn=(t(nn,en=function ir(){this.kind=Jt.Measurement}),nn);function nn(){var e=null!==en&&en.apply(this,arguments)||this;return e.aiDataContract={name:d.Required,kind:d.Default,value:d.Required,count:d.Default,min:d.Default,max:d.Default,stdDev:d.Default},e}var rn,an=(t(on,rn=$t),on.envelopeType="Microsoft.ApplicationInsights.{0}.Metric",on.dataType="MetricData",on);function on(e,t,n,r,i,a,o,s){var c=rn.call(this)||this;c.aiDataContract={ver:d.Required,metrics:d.Required,properties:d.Default};var l=new tn;return l.count=0<r?r:undefined,l.max=isNaN(a)||null===a?undefined:a,l.min=isNaN(i)||null===i?undefined:i,l.name=lt.sanitizeString(e,t)||ht.NotSpecified,l.value=n,c.metrics=[l],c.properties=lt.sanitizeProperties(e,o),c.measurements=lt.sanitizeMeasurements(e,s),c}var sn,cn=(t(ln,sn=Pt),ln);function ln(){var e=sn.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}var un,gn=(t(fn,un=cn),fn.envelopeType="Microsoft.ApplicationInsights.{0}.Pageview",fn.dataType="PageviewData",fn);function fn(e,t,n,r,i,a,o){var s=un.call(this)||this;return s.aiDataContract={ver:d.Required,name:d.Default,url:d.Default,duration:d.Default,properties:d.Default,measurements:d.Default,id:d.Default},s.id=lt.sanitizeId(e,o),s.url=lt.sanitizeUrl(e,n),s.name=lt.sanitizeString(e,t)||ht.NotSpecified,isNaN(r)||(s.duration=ht.msToTimeSpan(r)),s.properties=lt.sanitizeProperties(e,i),s.measurements=lt.sanitizeMeasurements(e,a),s}var pn,dn=(t(hn,pn=Ct),hn);function hn(){var e=pn.call(this)||this;return e.ver=2,e.success=!0,e.properties={},e.measurements={},e}var mn,vn=(t(yn,mn=dn),yn.envelopeType="Microsoft.ApplicationInsights.{0}.RemoteDependency",yn.dataType="RemoteDependencyData",yn);function yn(e,t,n,r,i,a,o,s,c,l,u,g){void 0===c&&(c="Ajax");var f=mn.call(this)||this;f.aiDataContract={id:d.Required,ver:d.Required,name:d.Default,resultCode:d.Default,duration:d.Default,success:d.Default,data:d.Default,target:d.Default,type:d.Default,properties:d.Default,measurements:d.Default,kind:d.Default,value:d.Default,count:d.Default,min:d.Default,max:d.Default,stdDev:d.Default,dependencyKind:d.Default,dependencySource:d.Default,commandName:d.Default,dependencyTypeName:d.Default},f.id=t,f.duration=ht.msToTimeSpan(i),f.success=a,f.resultCode=o+"",f.type=lt.sanitizeString(e,c);var p=It.ParseDependencyPath(e,n,s,r);return f.data=lt.sanitizeUrl(e,r)||p.data,f.target=lt.sanitizeString(e,p.target),l&&(f.target=f.target+" | "+l),f.name=lt.sanitizeString(e,p.name),f.properties=lt.sanitizeProperties(e,u),f.measurements=lt.sanitizeMeasurements(e,g),f}var In,Tn=(t(Sn,In=Ct),Sn);function Sn(){var e=In.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}var wn,_n=(t(Nn,wn=Tn),Nn.envelopeType="Microsoft.ApplicationInsights.{0}.Message",Nn.dataType="MessageData",Nn);function Nn(e,t,n,r,i){var a=wn.call(this)||this;return a.aiDataContract={ver:d.Required,message:d.Required,severityLevel:d.Default,properties:d.Default},t=t||ht.NotSpecified,a.message=lt.sanitizeMessage(e,t),a.properties=lt.sanitizeProperties(e,r),a.measurements=lt.sanitizeMeasurements(e,i),n&&(a.severityLevel=n),a}var xn,En=(t(bn,xn=cn),bn);function bn(){var e=xn.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}var Dn,Cn=(t(Pn,Dn=En),Pn.envelopeType="Microsoft.ApplicationInsights.{0}.PageviewPerformance",Pn.dataType="PageviewPerformanceData",Pn);function Pn(e,t,n,r,i,a,o){var s=Dn.call(this)||this;return s.aiDataContract={ver:d.Required,name:d.Default,url:d.Default,duration:d.Default,perfTotal:d.Default,networkConnect:d.Default,sentRequest:d.Default,receivedResponse:d.Default,domProcessing:d.Default,properties:d.Default,measurements:d.Default},s.url=lt.sanitizeUrl(e,n),s.name=lt.sanitizeString(e,t)||ht.NotSpecified,s.properties=lt.sanitizeProperties(e,i),s.measurements=lt.sanitizeMeasurements(e,a),o&&(s.domProcessing=o.domProcessing,s.duration=o.duration,s.networkConnect=o.networkConnect,s.perfTotal=o.perfTotal,s.receivedResponse=o.receivedResponse,s.sentRequest=o.sentRequest),s}var kn,Ln,An;t(Mn,kn=Nt);function Mn(e,t){var n=kn.call(this)||this;return n.aiDataContract={baseType:d.Required,baseData:d.Required},n.baseType=e,n.baseData=t,n}(An=Ln=Ln||{})[An.Verbose=0]="Verbose",An[An.Information=1]="Information",An[An.Warning=2]="Warning",An[An.Error=3]="Error",An[An.Critical=4]="Critical";var On=(Un.create=function(e,t,n,r,i,a){if(n=lt.sanitizeString(r,n)||ht.NotSpecified,j.isNullOrUndefined(e)||j.isNullOrUndefined(t)||j.isNullOrUndefined(n))throw Error("Input doesn't contain all required fields");var o={name:n,time:j.toISOString(new Date),iKey:"",ext:a||{},tags:[],data:{},baseType:t,baseData:e};if(!j.isNullOrUndefined(i))for(var s in i)i.hasOwnProperty(s)&&(o.data[s]=i[s]);return o},Un);function Un(){}var Rn=(zn.prototype.trackPageView=function(n,r){var i=this,a=n.name;if(j.isNullOrUndefined(a)||"string"!=typeof a){var e=T();a=n.name=e&&e.title||""}var o=n.uri;if(j.isNullOrUndefined(o)||"string"!=typeof o){var t=_();o=n.uri=t&&t.href||""}if(!this._pageViewPerformanceManager.isPerformanceTimingSupported())return this.appInsights.sendPageViewInternal(n,r),j.arrForEach(this._channel(),function(e){j.arrForEach(e,function(e){return e.flush(!0)})}),void this._logger.throwInternal(B.WARNING,ie,"trackPageView: navigation timing API used for calculation of page duration is not supported in this browser. This page view will be collected without duration and timing info.");var s,c,l=!1,u=this._pageViewPerformanceManager.getPerformanceTiming().navigationStart;s=St.GetDuration(u,+new Date),this._pageViewPerformanceManager.shouldCollectDuration(s)||(s=undefined),j.isNullOrUndefined(r)||j.isNullOrUndefined(r.duration)||(c=r.duration),!this.overridePageViewDuration&&isNaN(c)||(isNaN(c)&&((r=r||{}).duration=s),this.appInsights.sendPageViewInternal(n,r),j.arrForEach(this._channel(),function(e){j.arrForEach(e,function(e){return e.flush(!0)})}),l=!0),r=r||{};var g=setInterval(function(){try{if(i._pageViewPerformanceManager.isPerformanceTimingDataReady()){clearInterval(g);var e={name:a,uri:o};i._pageViewPerformanceManager.populatePageViewPerformanceEvent(e),e.isValid||l?(l||(r.duration=e.durationMs,i.appInsights.sendPageViewInternal(n,r)),i.pageViewPerformanceSent||(i.appInsights.sendPageViewPerformanceInternal(e,r),i.pageViewPerformanceSent=!0),j.arrForEach(i._channel(),function(e){j.arrForEach(e,function(e){return e.flush(!0)})})):(r.duration=s,i.appInsights.sendPageViewInternal(n,r),j.arrForEach(i._channel(),function(e){j.arrForEach(e,function(e){return e.flush(!0)})}))}else 6e4<St.GetDuration(u,+new Date)&&(clearInterval(g),l||(r.duration=6e4,i.appInsights.sendPageViewInternal(n,r),j.arrForEach(i._channel(),function(e){j.arrForEach(e,function(e){return e.flush(!0)})})))}catch(t){i._logger.throwInternal(B.CRITICAL,fe,"trackPageView failed on page load calculation: "+ht.getExceptionName(t),{exception:ht.dump(t)})}},100)},zn);function zn(e,t,n,r){this.pageViewPerformanceSent=!1,this.overridePageViewDuration=!1,this.overridePageViewDuration=t,this.appInsights=e,this._pageViewPerformanceManager=r,n&&(this._channel=function(){return n.getTransmissionControls()},this._logger=n.logger)}var Vn=(Gn.prototype.trackPreviousPageVisit=function(e,t){try{var n=this.restartPageVisitTimer(e,t);n&&this.pageVisitTimeTrackingHandler(n.pageName,n.pageUrl,n.pageVisitTime)}catch(r){this._logger.warnToConsole("Auto track page visit time failed, metric will not be collected: "+ht.dump(r))}},Gn.prototype.restartPageVisitTimer=function(e,t){try{var n=this.stopPageVisitTimer();return this.startPageVisitTimer(e,t),n}catch(r){return this._logger.warnToConsole("Call to restart failed: "+ht.dump(r)),null}},Gn.prototype.startPageVisitTimer=function(e,t){try{if(ht.canUseSessionStorage()){if(null!=ht.getSessionStorage(this._logger,this.prevPageVisitDataKeyName))throw new Error("Cannot call startPageVisit consecutively without first calling stopPageVisit");var n=new jn(e,t),r=E().stringify(n);ht.setSessionStorage(this._logger,this.prevPageVisitDataKeyName,r)}}catch(i){this._logger.warnToConsole("Call to start failed: "+ht.dump(i))}},Gn.prototype.stopPageVisitTimer=function(){try{if(ht.canUseSessionStorage()){var e=Date.now(),t=ht.getSessionStorage(this._logger,this.prevPageVisitDataKeyName);if(t&&x()){var n=E().parse(t);return n.pageVisitTime=e-n.pageVisitStartTime,ht.removeSessionStorage(this._logger,this.prevPageVisitDataKeyName),n}return null}return null}catch(r){return this._logger.warnToConsole("Stop page visit timer failed: "+ht.dump(r)),null}},Gn);function Gn(e,t){this.prevPageVisitDataKeyName="prevPageVisitData",this.pageVisitTimeTrackingHandler=t,this._logger=e}var jn=function ar(e,t){this.pageVisitStartTime=Date.now(),this.pageName=e,this.pageUrl=t},qn=(Bn.prototype.populatePageViewPerformanceEvent=function(e){e.isValid=!1;var t=this.getPerformanceNavigationTiming(),n=this.getPerformanceTiming();if(t||n){if(t)var r=t.duration,i=St.GetDuration(t.startTime,t.connectEnd),a=St.GetDuration(t.requestStart,t.responseStart),o=St.GetDuration(t.responseStart,t.responseEnd),s=St.GetDuration(t.responseEnd,t.loadEventEnd);else r=St.GetDuration(n.navigationStart,n.loadEventEnd),i=St.GetDuration(n.navigationStart,n.connectEnd),a=St.GetDuration(n.requestStart,n.responseStart),o=St.GetDuration(n.responseStart,n.responseEnd),s=St.GetDuration(n.responseEnd,n.loadEventEnd);0===r?this._logger.throwInternal(B.WARNING,te,"error calculating page view performance.",{total:r,network:i,request:a,response:o,dom:s}):this.shouldCollectDuration(r,i,a,o,s)?r<Math.floor(i)+Math.floor(a)+Math.floor(o)+Math.floor(s)?this._logger.throwInternal(B.WARNING,ee,"client performance math error.",{total:r,network:i,request:a,response:o,dom:s}):(e.durationMs=r,e.perfTotal=e.duration=ht.msToTimeSpan(r),e.networkConnect=ht.msToTimeSpan(i),e.sentRequest=ht.msToTimeSpan(a),e.receivedResponse=ht.msToTimeSpan(o),e.domProcessing=ht.msToTimeSpan(s),e.isValid=!0):this._logger.throwInternal(B.WARNING,de,"Invalid page load duration value. Browser perf data won't be sent.",{total:r,network:i,request:a,response:o,dom:s})}},Bn.prototype.getPerformanceTiming=function(){return this.isPerformanceTimingSupported()?N().timing:null},Bn.prototype.getPerformanceNavigationTiming=function(){return this.isPerformanceNavigationTimingSupported()?N().getEntriesByType("navigation")[0]:null},Bn.prototype.isPerformanceNavigationTimingSupported=function(){var e=N();return e&&e.getEntriesByType&&0<e.getEntriesByType("navigation").length},Bn.prototype.isPerformanceTimingSupported=function(){var e=N();return e&&e.timing},Bn.prototype.isPerformanceTimingDataReady=function(){var e=N(),t=e?e.timing:0;return t&&0<t.domainLookupStart&&0<t.navigationStart&&0<t.responseStart&&0<t.requestStart&&0<t.loadEventEnd&&0<t.responseEnd&&0<t.connectEnd&&0<t.domLoading},Bn.prototype.shouldCollectDuration=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=["googlebot","adsbot-google","apis-google","mediapartners-google"],r=(S()||{}).userAgent,i=!1;if(r)for(var a=0;a<n.length;a++)i=i||-1!==r.toLowerCase().indexOf(n[a]);if(i)return!1;for(a=0;a<e.length;a++)if(e[a]>=this.MAX_DURATION_ALLOWED)return!1;return!0},Bn);function Bn(e){this.MAX_DURATION_ALLOWED=36e5,e&&(this._logger=e.logger)}var Fn="duration";function Wn(e,t){e&&e.dispatchEvent&&t&&e.dispatchEvent(t)}var Hn,Xn=(t(Kn,Hn=ze),Kn.getDefaultConfig=function(e){return(e=e||{}).sessionRenewalMs=18e5,e.sessionExpirationMs=864e5,e.disableExceptionTracking=ht.stringToBoolOrDefault(e.disableExceptionTracking),e.autoTrackPageVisitTime=ht.stringToBoolOrDefault(e.autoTrackPageVisitTime),e.overridePageViewDuration=ht.stringToBoolOrDefault(e.overridePageViewDuration),e.enableUnhandledPromiseRejectionTracking=ht.stringToBoolOrDefault(e.enableUnhandledPromiseRejectionTracking),(isNaN(e.samplingPercentage)||e.samplingPercentage<=0||100<=e.samplingPercentage)&&(e.samplingPercentage=100),e.isCookieUseDisabled=ht.stringToBoolOrDefault(e.isCookieUseDisabled),e.isStorageUseDisabled=ht.stringToBoolOrDefault(e.isStorageUseDisabled),e.isBrowserLinkTrackingEnabled=ht.stringToBoolOrDefault(e.isBrowserLinkTrackingEnabled),e.enableAutoRouteTracking=ht.stringToBoolOrDefault(e.enableAutoRouteTracking),e.namePrefix=e.namePrefix||"",e},Kn.prototype.processTelemetry=function(e,t){var n=!1,r=this._telemetryInitializers.length;t=this._getTelCtx(t);for(var i=0;i<r;++i){var a=this._telemetryInitializers[i];if(a)try{if(!1===a.apply(null,[e])){n=!0;break}}catch(o){t.diagLog().throwInternal(B.CRITICAL,we,"One of telemetry initializers failed, telemetry item will not be sent: "+ht.getExceptionName(o),{exception:ht.dump(o)},!0)}}n||this.processNext(e,t)},Kn.prototype.trackEvent=function(e,t){try{var n=On.create(e,At.dataType,At.envelopeType,this.diagLog(),t);this.core.track(n)}catch(r){this.diagLog().throwInternal(B.WARNING,pe,"trackTrace failed, trace will not be collected: "+ht.getExceptionName(r),{exception:ht.dump(r)})}},Kn.prototype.startTrackEvent=function(e){try{this._eventTracking.start(e)}catch(t){this.diagLog().throwInternal(B.CRITICAL,ae,"startTrackEvent failed, event will not be collected: "+ht.getExceptionName(t),{exception:ht.dump(t)})}},Kn.prototype.stopTrackEvent=function(e,t,n){try{this._eventTracking.stop(e,undefined,t)}catch(r){this.diagLog().throwInternal(B.CRITICAL,oe,"stopTrackEvent failed, event will not be collected: "+ht.getExceptionName(r),{exception:ht.dump(r)})}},Kn.prototype.trackTrace=function(e,t){try{var n=On.create(e,_n.dataType,_n.envelopeType,this.diagLog(),t);this.core.track(n)}catch(r){this.diagLog().throwInternal(B.WARNING,pe,"trackTrace failed, trace will not be collected: "+ht.getExceptionName(r),{exception:ht.dump(r)})}},Kn.prototype.trackMetric=function(e,t){try{var n=On.create(e,an.dataType,an.envelopeType,this.diagLog(),t);this.core.track(n)}catch(r){this.diagLog().throwInternal(B.CRITICAL,ue,"trackMetric failed, metric will not be collected: "+ht.getExceptionName(r),{exception:ht.dump(r)})}},Kn.prototype.trackPageView=function(e,t){try{var n=e||{};this._pageViewManager.trackPageView(n,c({},n.properties,n.measurements,t)),this.config.autoTrackPageVisitTime&&this._pageVisitTimeManager.trackPreviousPageVisit(n.name,n.uri)}catch(r){this.diagLog().throwInternal(B.CRITICAL,ge,"trackPageView failed, page view will not be collected: "+ht.getExceptionName(r),{exception:ht.dump(r)})}},Kn.prototype.sendPageViewInternal=function(e,t,n){var r=T();r&&(e.refUri=e.refUri===undefined?r.referrer:e.refUri);var i=On.create(e,gn.dataType,gn.envelopeType,this.diagLog(),t,n);this.core.track(i),this._trackAjaxAttempts=0},Kn.prototype.sendPageViewPerformanceInternal=function(e,t,n){var r=On.create(e,Cn.dataType,Cn.envelopeType,this.diagLog(),t,n);this.core.track(r)},Kn.prototype.trackPageViewPerformance=function(e,t){try{this._pageViewPerformanceManager.populatePageViewPerformanceEvent(e),this.sendPageViewPerformanceInternal(e,t)}catch(n){this.diagLog().throwInternal(B.CRITICAL,ge,"trackPageViewPerformance failed, page view will not be collected: "+ht.getExceptionName(n),{exception:ht.dump(n)})}},Kn.prototype.startTrackPage=function(e){try{if("string"!=typeof e){var t=T();e=t&&t.title||""}this._pageTracking.start(e)}catch(n){this.diagLog().throwInternal(B.CRITICAL,se,"startTrackPage failed, page view may not be collected: "+ht.getExceptionName(n),{exception:ht.dump(n)})}},Kn.prototype.stopTrackPage=function(e,t,n,r){try{if("string"!=typeof e){var i=T();e=i&&i.title||""}if("string"!=typeof t){var a=_();t=a&&a.href||""}this._pageTracking.stop(e,t,n,r),this.config.autoTrackPageVisitTime&&this._pageVisitTimeManager.trackPreviousPageVisit(e,t)}catch(o){this.diagLog().throwInternal(B.CRITICAL,ce,"stopTrackPage failed, page view will not be collected: "+ht.getExceptionName(o),{exception:ht.dump(o)})}},Kn.prototype.sendExceptionInternal=function(e,t,n){var r=new jt(this.diagLog(),e.exception||new Error(ht.NotSpecified),e.properties,e.measurements,e.severityLevel,e.id).toInterface(),i=On.create(r,jt.dataType,jt.envelopeType,this.diagLog(),t,n);this.core.track(i)},Kn.prototype.trackException=function(e,t){try{this.sendExceptionInternal(e,t)}catch(n){this.diagLog().throwInternal(B.CRITICAL,le,"trackException failed, exception will not be collected: "+ht.getExceptionName(n),{exception:ht.dump(n)})}},Kn.prototype._onerror=function(e){try{var t={url:e&&e.url||(T()||{}).URL,lineNumber:e.lineNumber,columnNumber:e.columnNumber,message:e.message};if(ht.isCrossOriginError(e.message,e.url,e.lineNumber,e.columnNumber,e.error))this._sendCORSException(t.url);else{if(!ht.isError(e.error)){var n="window.onerror@"+t.url+":"+e.lineNumber+":"+(e.columnNumber||0);e.error=new Error(e.message),e.error.stack=n}this.trackException({exception:e.error,severityLevel:Ln.Error},t)}}catch(i){var r=e.error?e.error.name+", "+e.error.message:"null";this.diagLog().throwInternal(B.CRITICAL,ne,"_onError threw exception while logging error, error will not be collected: "+ht.getExceptionName(i),{exception:ht.dump(i),errorString:r})}},Kn.prototype.addTelemetryInitializer=function(e){this._telemetryInitializers.push(e)},Kn.prototype.initialize=function(e,t,n,r){var o=this;if(!this.isInitialized()){if(j.isNullOrUndefined(t))throw Error("Error initializing");Hn.prototype.initialize.call(this,e,t,n,r),this.setInitialized(!1);var i=this._getTelCtx(),a=this.identifier;this._globalconfig={instrumentationKey:e.instrumentationKey,endpointUrl:e.endpointUrl||"https://dc.services.visualstudio.com/v2/track"},this.config=i.getExtCfg(a);var s=Kn.getDefaultConfig();if(s!==undefined){for(var c in s)this.config[c]=i.getConfig(a,c,s[c]);if(this._globalconfig)for(var c in s)this._globalconfig[c]===undefined&&(this._globalconfig[c]=s[c])}this.config.isCookieUseDisabled&&ht.disableCookies(),this.config.isStorageUseDisabled&&ht.disableStorage();var l={instrumentationKey:function(){return e.instrumentationKey},accountId:function(){return o.config.accountId||e.accountId},sessionRenewalMs:function(){return o.config.sessionRenewalMs||e.sessionRenewalMs},sessionExpirationMs:function(){return o.config.sessionExpirationMs||e.sessionExpirationMs},sampleRate:function(){return o.config.samplingPercentage||e.samplingPercentage},cookieDomain:function(){return o.config.cookieDomain||e.cookieDomain},sdkExtension:function(){return o.config.sdkExtension||e.sdkExtension},isBrowserLinkTrackingEnabled:function(){return o.config.isBrowserLinkTrackingEnabled||e.isBrowserLinkTrackingEnabled},appId:function(){return o.config.appId||e.appId}};this._pageViewPerformanceManager=new qn(this.core),this._pageViewManager=new Rn(this,this.config.overridePageViewDuration,this.core,this._pageViewPerformanceManager),this._pageVisitTimeManager=new Vn(this.diagLog(),function(e,t,n){return o.trackPageVisitTime(e,t,n)}),this._telemetryInitializers=this._telemetryInitializers||[],this._addDefaultTelemetryInitializers(l),this._eventTracking=new Qn(this.diagLog(),"trackEvent"),this._eventTracking.action=function(e,t,n,r){(r=r||{})[Fn]=n.toString(),o.trackEvent({name:e,properties:r})},this._pageTracking=new Qn(this.diagLog(),"trackPageView"),this._pageTracking.action=function(e,t,n,r,i){j.isNullOrUndefined(r)&&(r={}),r[Fn]=n.toString();var a={name:e,uri:t,properties:r,measurements:i};o.sendPageViewInternal(a)};var u,g,f=I(),p=w(),d=_(),h=this;if(!1===this.config.disableExceptionTracking&&!this.config.autoExceptionInstrumented&&f){var m=f.onerror;f.onerror=function(e,t,n,r,i){var a=m&&m(e,t,n,r,i);return!0!==a&&h._onerror({message:e,url:t,lineNumber:n,columnNumber:r,error:i}),a},this.config.autoExceptionInstrumented=!0}if(!1===this.config.disableExceptionTracking&&!0===this.config.enableUnhandledPromiseRejectionTracking&&!this.config.autoUnhandledPromiseInstrumented&&f){var v=f.onunhandledrejection;f.onunhandledrejection=function(e){var t=v&&v.call(f,e);return!0!==t&&h._onerror({message:e.reason.toString(),error:e.reason instanceof Error?e.reason:new Error(e.reason.toString()),url:d?d.href:"",lineNumber:0,columnNumber:0}),t},this.config.autoUnhandledPromiseInstrumented=!0}if(!0===this.config.enableAutoRouteTracking&&p&&j.isFunction(p.pushState)&&j.isFunction(p.replaceState)&&f&&"undefined"!=typeof Event){var y=this;j.arrForEach(n,function(e){"AppInsightsPropertiesPlugin"===e.identifier&&(o._properties=e)}),p.pushState=(g=p.pushState,function(){var e=g.apply(this,arguments);return Wn(f,ht.createDomEvent(y.config.namePrefix+"pushState")),Wn(f,ht.createDomEvent(y.config.namePrefix+"locationchange")),e}),p.replaceState=(u=p.replaceState,function(){var e=u.apply(this,arguments);return Wn(f,ht.createDomEvent(y.config.namePrefix+"replaceState")),Wn(f,ht.createDomEvent(y.config.namePrefix+"locationchange")),e}),f.addEventListener&&(f.addEventListener(y.config.namePrefix+"popstate",function(){Wn(f,ht.createDomEvent(y.config.namePrefix+"locationchange"))}),f.addEventListener(y.config.namePrefix+"locationchange",function(){y._properties&&y._properties.context&&y._properties.context.telemetryTrace&&(y._properties.context.telemetryTrace.traceID=ht.generateW3CId(),y._properties.context.telemetryTrace.name=d&&d.pathname||"_unknown_"),o._currUri&&(o._prevUri=o._currUri),o._currUri=d&&d.href||"",setTimeout(function(e){y.trackPageView({refUri:e,properties:{duration:0}})}.bind(o,o._prevUri),y.autoRoutePVDelay)}))}this.setInitialized(!0)}},Kn.prototype.trackPageVisitTime=function(e,t,n){var r={PageName:e,PageUrl:t};this.trackMetric({name:"PageVisitTime",average:n,max:n,min:n,sampleCount:1},r)},Kn.prototype._addDefaultTelemetryInitializers=function(e){if(!e.isBrowserLinkTrackingEnabled()){var r=["/browserLinkSignalR/","/__browserLink/"];this._addTelemetryInitializer(function(e){if(e.baseType===vn.dataType){var t=e.baseData;if(t)for(var n=0;n<r.length;n++)if(t.target&&0<=t.target.indexOf(r[n]))return!1}return!0})}},Kn.prototype._addTelemetryInitializer=function(e){this._telemetryInitializers.push(e)},Kn.prototype._sendCORSException=function(e){var t={message:"Script error: The browser's same-origin policy prevents us from getting the details of this exception. Consider using the 'crossorigin' attribute.",url:e,lineNumber:0,columnNumber:0,error:undefined},n=On.create(t,jt.dataType,jt.envelopeType,this.diagLog(),{url:e});this.core.track(n)},Kn.Version="2.4.3",Kn);function Kn(){var e=Hn.call(this)||this;e.identifier="ApplicationInsightsAnalytics",e.priority=180,e.autoRoutePVDelay=500,e._trackAjaxAttempts=0;var t=_();return e._prevUri=t&&t.href||"",e}var Qn=(Jn.prototype.start=function(e){"undefined"!=typeof this._events[e]&&this._logger.throwInternal(B.WARNING,Te,"start was called more than once for this event without calling stop.",{name:this._name,key:e},!0),this._events[e]=+new Date},Jn.prototype.stop=function(e,t,n,r){var i=this._events[e];if(isNaN(i))this._logger.throwInternal(B.WARNING,Se,"stop was called without a corresponding start.",{name:this._name,key:e},!0);else{var a=+new Date,o=St.GetDuration(i,a);this.action(e,t,o,n,r)}delete this._events[e],this._events[e]=undefined},Jn);function Jn(e,t){this._name=t,this._events={},this._logger=e}e.ApplicationInsights=Xn,function(e,t,n){var r=Object.defineProperty;if(r)try{return r(e,t,n)}catch(i){}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 r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function t(e,t){function n(){this.constructor=e}r(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 r(){}return r.prototype=e,new r}(t):(n.prototype=t.prototype,new n)}var a,n,d,i,o,s,c=function(){return(c=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};(n=a=a||{})[n.LocalStorage=0]="LocalStorage",n[n.SessionStorage=1]="SessionStorage",(i=d=d||{})[i.Default=0]="Default",i[i.Required=1]="Required",i[i.Array=2]="Array",i[i.Hidden=4]="Hidden",(s=o=o||{})[s.AI=0]="AI",s[s.AI_AND_W3C=1]="AI_AND_W3C",s[s.W3C=2]="W3C";var l=2,u="undefined",g="object",f="window",p="location",h="JSON";function m(){return typeof globalThis!==u&&globalThis?globalThis:typeof self!==u&&self?self:typeof window!==u&&window?window:typeof global!==u&&global?global:null}function v(e){var t=m();return t&&t[e]?t[e]:e===f&&y()?window:null}function y(){return Boolean(typeof window===g&&window)}function T(){return y()?window:v(f)}function I(){return function e(){return Boolean(typeof document===g&&document)}()?document:v("document")}function S(){return function e(){return Boolean(typeof navigator===g&&navigator)}()?navigator:v("navigator")}function w(){return function e(){return Boolean(typeof history===g&&history)}()?history:v("history")}function _(){return typeof location===g&&location?location:v(p)}function N(){return v("performance")}function x(){return Boolean(typeof JSON===g&&JSON||null!==v(h))}function E(){return x()?JSON||v(h):null}var b=u,D="prototype",C="attachEvent",P="addEventListener",k="detachEvent",L="removeEventListener";function A(e,t){return typeof e===t}function M(e){return e===undefined||A(e,b)}function O(e){return M(e)||null===e}function U(e,t){return e&&Object[D].hasOwnProperty.call(e,t)}function R(e){return A(e,"object")}function z(e){return A(e,"function")}function V(e,t,n,r){void 0===r&&(r=!1);var i=!1;if(!O(e))try{O(e[P])?O(e[C])||(e[C]("on"+t,n),i=!0):(e[P](t,n,r),i=!0)}catch(a){}return i}function G(e,t,n,r){if(void 0===r&&(r=!1),!O(e))try{O(e[L])?O(e[k])||e[k]("on"+t,n):e[L](t,n,r)}catch(i){}}var j=(q.isDate=function(e){return"[object Date]"===Object[D].toString.call(e)},q.isString=function(e){return A(e,"string")},q.isNumber=function(e){return A(e,"number")},q.isBoolean=function(e){return A(e,"boolean")},q.disableCookies=function(){q._canUseCookies=!1},q.newGuid=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(W,function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})},q.toISOString=function(e){if(q.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"}},q.arrForEach=function(e,t,n){for(var r=e.length,i=0;i<r;++i)i in e&&t.call(n||e,e[i],i,e)},q.arrIndexOf=function(e,t,n){for(var r=e.length,i=n||0,a=Math.max(0<=i?i:r-Math.abs(i),0);a<r;a++)if(a in e&&e[a]===t)return a;return-1},q.arrMap=function(e,t,n){for(var r=e.length,i=n||e,a=new Array(r),o=0;o<r;o++)o in e&&(a[o]=t.call(i,e[o],e));return a},q.arrReduce=function(e,t,n){var r,i=e.length,a=0;if(3<=arguments.length)r=n;else{for(;a<i&&!(a in e);)a++;r=e[a++]}for(;a<i;)a in e&&(r=t(r,e[a],a,e)),a++;return r},q.objCreate=function(e){if(null==e)return{};if(!R(e)&&!z(e))throw new TypeError("Object prototype may only be an Object: "+e);function t(){}return t[D]=e,new t},q.objKeys=function(e){var t=!{toString:null}.propertyIsEnumerable("toString");if(!(z(e)||R(e)&&null!==e))throw new TypeError("objKeys called on non-object");var n=[];for(var r in e)U(e,r)&&n.push(r);if(t)for(var i=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],a=i.length,o=0;o<a;o++)U(e,i[o])&&n.push(i[o]);return n},q.objDefineAccessors=function(e,t,n,r){var i=Object.defineProperty;if(i)try{var a={enumerable:!0,configurable:!0};return n&&(a.get=n),r&&(a.set=r),i(e,t,a),!0}catch(o){}return!1},q.addEventHandler=function(e,t){var n=!1,r=T();r&&(n=V(r,e,t),n=V(r.body,e,t)||n);var i=I();return i&&(n=H.Attach(i,e,t)||n),n},q.isTypeof=A,q.isUndefined=M,q.isNullOrUndefined=O,q.hasOwnProperty=U,q.isFunction=z,q.isObject=R,q);function q(){}var B,F,W=/[xy]/g,H=(X.Attach=V,X.AttachEvent=V,X.Detach=G,X.DetachEvent=G,X);function X(){}(F=B=B||{})[F.CRITICAL=1]="CRITICAL",F[F.WARNING=2]="WARNING";var K=1,Q=2,J=3,Y=4,$=5,Z=6,ee=8,te=10,ne=11,re=23,ie=25,ae=29,oe=30,se=31,ce=32,le=35,ue=36,ge=37,fe=38,pe=39,de=45,he=49,me=52,ve=56,ye=57,Ie=61,Te=62,Se=63,we=64,_e=66,Ne=68,xe=69,Ee=73,be=(De.sanitizeDiagnosticText=function(e){return e?'"'+e.replace(/\"/g,"")+'"':""},De.dataType="MessageData",De.AiNonUserActionablePrefix="AI (Internal): ",De.AiUserActionablePrefix="AI: ",De);function De(e,t,n,r){void 0===n&&(n=!1),this.messageId=e,this.message=(n?De.AiUserActionablePrefix:De.AiNonUserActionablePrefix)+e;var i="";x()&&(i=E().stringify(r));var a=(t?" message:"+De.sanitizeDiagnosticText(t):"")+(r?" props:"+De.sanitizeDiagnosticText(i):"");this.message+=a}var Ce=(Pe.prototype.throwInternal=function(e,t,n,r,i){void 0===i&&(i=!1);var a=new be(t,n,i,r),o=this;if(o.enableDebugExceptions())throw a;if(!j.isUndefined(a)&&a&&!j.isUndefined(a.message)){if(i){var s=+a.messageId;!o._messageLogged[s]&&o.consoleLoggingLevel()>=B.WARNING&&(o.warnToConsole(a.message),o._messageLogged[s]=!0)}else o.consoleLoggingLevel()>=B.WARNING&&o.warnToConsole(a.message);o.logInternalMessage(e,a)}},Pe.prototype.warnToConsole=function(e){!j.isUndefined(console)&&console&&(j.isFunction(console.warn)?console.warn(e):j.isFunction(console.log)&&console.log(e))},Pe.prototype.resetInternalMessageCount=function(){this._messageCount=0,this._messageLogged={}},Pe.prototype.logInternalMessage=function(e,t){var n=this;if(!n._areInternalMessagesThrottled()){var r=!0,i=n.AIInternalMessagePrefix+t.messageId;if(n._messageLogged[i]?r=!1:n._messageLogged[i]=!0,r&&(e<=n.telemetryLoggingLevel()&&(n.queue.push(t),n._messageCount++),n._messageCount===n.maxInternalMessageLimit())){var a="Internal events throttle limit per PageView reached for this app.",o=new be(re,a,!1);n.queue.push(o),n.warnToConsole(a)}}},Pe.prototype._areInternalMessagesThrottled=function(){return this._messageCount>=this.maxInternalMessageLimit()},Pe);function Pe(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},j.isNullOrUndefined(e)||(j.isNullOrUndefined(e.loggingLevelConsole)||(this.consoleLoggingLevel=function(){return e.loggingLevelConsole}),j.isNullOrUndefined(e.loggingLevelTelemetry)||(this.telemetryLoggingLevel=function(){return e.loggingLevelTelemetry}),j.isNullOrUndefined(e.maxMessageLimit)||(this.maxInternalMessageLimit=function(){return e.maxMessageLimit}),j.isNullOrUndefined(e.enableDebugExceptions)||(this.enableDebugExceptions=function(){return e.enableDebugExceptions}))}var ke=j.isFunction,Le=function Yn(i,a){var o=this,s=null,c=ke(i.processTelemetry),l=ke(i.setNextPlugin);o._hasRun=!1,o.getPlugin=function(){return i},o.getNext=function(){return s},o.setNext=function(e){s=e},o.processTelemetry=function(e,t){if(t=t||a,i&&c){o._hasRun=!0;try{t.setNext(s),l&&i.setNextPlugin(s),s&&(s._hasRun=!1),i.processTelemetry(e,t)}catch(r){var n=s&&s._hasRun;s&&n||t.diagLog().throwInternal(B.CRITICAL,Ee,"Plugin ["+i.identifier+"] failed during processTelemetry - "+r),s&&!n&&s.processTelemetry(e,t)}}else s&&(o._hasRun=!0,s.processTelemetry(e,t))}},Ae=j.isNullOrUndefined;function Me(e,t){var n=[];if(e&&0<e.length)for(var r=null,i=0;i<e.length;i++){var a=e[i];if(a&&j.isFunction(a.processTelemetry)){var o=new Le(a,t);n.push(o),r&&r.setNext(o),r=o}}return 0<n.length?n[0]:null}var Oe=function $n(e,a,n,t){var o=this,r=null;null!==t&&(e&&j.isFunction(e.getPlugin)?r=function s(e,t,n){var r=[],i=!n;if(e)for(;e;){var a=e.getPlugin();!i&&a!==n||(i=!0,r.push(a)),e=e.getNext()}return i||r.push(n),Me(r,t)}(e,o,t||e.getPlugin()):t?r=function c(e,t,n){var r=e,i=!1;return n&&e&&(r=[],j.arrForEach(e,function(e){!i&&e!==n||(i=!0,r.push(e))})),n&&!i&&(r=r||[]).push(n),Me(r,t)}(e,o,t):j.isUndefined(t)&&(r=Me(e,o))),o.core=function(){return n},o.diagLog=function(){var e=(n||{}).logger;return e=e||new Ce(a||{})},o.getCfg=function(){return a},o.getExtCfg=function(e,t){var n;if(void 0===t&&(t={}),a){var r=a.extensionConfig;r&&e&&(n=r[e])}return n||t},o.getConfig=function(e,t,n){var r;void 0===n&&(n=!1);var i=o.getExtCfg(e,null);return i&&!Ae(i[t])?r=i[t]:a&&!Ae(a[t])&&(r=a[t]),Ae(r)?n:r},o.hasNext=function(){return null!=r},o.getNext=function(){return r},o.setNext=function(e){r=e},o.processNext=function(e){var t=r;t&&(r=t.getNext(),t.processTelemetry(e,o))},o.createNew=function(e,t){return void 0===e&&(e=null),new $n(e||r,a,n,t)}},Ue=j.isFunction,Re="getPlugin",ze=(Ve.prototype.initialize=function(e,t,n,r){this._baseTelInit(e,t,n,r)},Ve);function Ve(){var a=this,o=!1,s=null,c=null;a.core=null,a.diagLog=function(e){return a._getTelCtx(e).diagLog()},a.isInitialized=function(){return o},a.setInitialized=function(e){o=e},a.setNextPlugin=function(e){c=e},a.processNext=function(e,t){t?t.processNext(e):c&&Ue(c.processTelemetry)&&c.processTelemetry(e,null)},a._getTelCtx=function(e){void 0===e&&(e=null);var t=e;if(!t){var n=s||new Oe(null,{},a.core);t=c&&c[Re]?n.createNew(null,c[Re]):n.createNew(null,c)}return t},a._baseTelInit=function(e,t,n,r){e&&(e.extensionConfig=e.extensionConfig||[]),!r&&t&&(r=t.getProcessTelContext().getNext());var i=c;c&&c[Re]&&(i=c[Re]()),a.core=t,s=new Oe(r,e,t,i),o=!0}}var Ge=j.isFunction,je="processTelemetry",qe="priority",Be="setNextPlugin",Fe="isInitialized";function We(t,n){for(var e=[],r=null,i=t.getNext();i;){var a=i.getPlugin();a&&(r&&Ge(r[Be])&&Ge(a[je])&&r[Be](a),Ge(a[Fe])&&a[Fe]()||e.push(a),r=a,i=i.getNext())}j.arrForEach(e,function(e){e.initialize(t.getCfg(),t.core(),n,t.getNext())})}function He(e){return e.sort(function(e,t){var n=0,r=Ge(t[je]);return Ge(e[je])?n=r?e[qe]-t[qe]:1:r&&(n=-1),n})}var Xe=500,Ke="Channel has invalid priority",Qe=j.arrForEach,Je=j.objDefineAccessors;function Ye(e,t){t&&0<t.length&&(function n(e){Qe(e,function(e){if(e.priority<Xe)throw Error(Ke+e.identifier)})}(t=t.sort(function(e,t){return e.priority-t.priority})),e.push(t))}var $e,Ze=(t(et,$e=ze),et.prototype.processTelemetry=function(t,n){var r=this;this._channelQueue&&Qe(this._channelQueue,function(e){0<e.length&&r._getTelCtx(n).createNew(e).processNext(t)})},et.prototype.getChannelControls=function(){return this._channelQueue},et.prototype.initialize=function(t,n,r){if(!this.isInitialized()){$e.prototype.initialize.call(this,t,n,r),t.isCookieUseDisabled&&j.disableCookies();var e=this._channelQueue=function i(e,t){var n=[];if(e&&Qe(e,function(e){return Ye(n,e)}),t){var r=[];Qe(t,function(e){e.priority>Xe&&r.push(e)}),Ye(n,r)}return n}((t||{}).channels,r);Qe(e,function(e){return We(new Oe(e,t,n),r)})}},et._staticInit=(Je(et.prototype,"ChannelControls",et.prototype.getChannelControls),void Je(et.prototype,"channelQueue",et.prototype.getChannelControls)),et);function et(){var e=null!==$e&&$e.apply(this,arguments)||this;return e.identifier="ChannelControllerPlugin",e.priority=Xe,e}var tt=j.arrForEach,nt=j.isNullOrUndefined,rt=(it.prototype.initialize=function(e,t,r,n){var i=this;if(i.isInitialized())throw Error("Core should not be initialized more than once");if(!e||nt(e.instrumentationKey))throw Error("Please provide instrumentation key");i.config=e;var a=i._channelController;n=n||j.objCreate({addNotificationListener:function(e){},removeNotificationListener:function(e){},eventsSent:function(e){},eventsDiscarded:function(e,t){}}),i._notificationManager=n,e.extensions=nt(e.extensions)?[]:e.extensions,(e.extensionConfig=nt(e.extensionConfig)?{}:e.extensionConfig).NotificationManager=n,r=r||j.objCreate({throwInternal:function(e,t,n,r,i){void 0===i&&(i=!1)},warnToConsole:function(e){},resetInternalMessageCount:function(){}}),i.logger=r;var o=[];o.push.apply(o,t.concat(e.extensions)),o=He(o);var s=[],c={};if(tt(o,function(e){if(nt(e)||nt(e.initialize))throw Error("Extensions must provide callback to initialize");var t=e.priority,n=e.identifier;e&&t&&(nt(c[t])?c[t]=n:r.warnToConsole("Two extensions have same priority #"+t+" - "+c[t]+", "+n)),(!t||t<a.priority)&&s.push(e)}),o.push(a),s.push(a),o=He(o),i._extensions=o,We(new Oe([a],e,i),o),We(new Oe(s,e,i),o),i._extensions=s,0===i.getTransmissionControls().length)throw new Error("No channels available");i._setInit(!0)},it.prototype.getTransmissionControls=function(){return this._channelController.getChannelControls()},it.prototype.track=function(e){var t=this;e.iKey||(e.iKey=t.config.instrumentationKey),e.time||(e.time=j.toISOString(new Date)),nt(e.ver)&&(e.ver="4.0"),t.isInitialized()?(0<t._eventQueue.length&&(tt(t._eventQueue,function(e){t.getProcessTelContext().processNext(e)}),t._eventQueue=[]),t.getProcessTelContext().processNext(e)):t._eventQueue.push(e)},it.prototype.getProcessTelContext=function(){var e=this._extensions,t=e;return e&&0!==e.length||(t=[this._channelController]),new Oe(t,this.config,this)},it);function it(){var t=!1,e=this;e._extensions=new Array,e._channelController=new Ze,e.isInitialized=function(){return t},e._setInit=function(e){t=e},e._eventQueue=[]}var at=(ot.prototype.addNotificationListener=function(e){this.listeners.push(e)},ot.prototype.removeNotificationListener=function(e){for(var t=j.arrIndexOf(this.listeners,e);-1<t;)this.listeners.splice(t,1),t=j.arrIndexOf(this.listeners,e)},ot.prototype.eventsSent=function(t){for(var n=this,e=function(e){r.listeners[e].eventsSent&&setTimeout(function(){return n.listeners[e].eventsSent(t)},0)},r=this,i=0;i<this.listeners.length;++i)e(i)},ot.prototype.eventsDiscarded=function(t,n){for(var r=this,e=function(e){i.listeners[e].eventsDiscarded&&setTimeout(function(){return r.listeners[e].eventsDiscarded(t,n)},0)},i=this,a=0;a<this.listeners.length;++a)e(a)},ot);function ot(){this.listeners=[]}var st;t(ct,st=rt),ct.prototype.initialize=function(e,t){var n=this;n._notificationManager=new at,n.logger=new Ce(e),n.config=e,st.prototype.initialize.call(this,e,t,n.logger,n._notificationManager)},ct.prototype.getTransmissionControls=function(){return st.prototype.getTransmissionControls.call(this)},ct.prototype.track=function(e){if(null===e)throw this._notifyInvalidEvent(e),Error("Invalid telemetry item");this._validateTelemetryItem(e),st.prototype.track.call(this,e)},ct.prototype.addNotificationListener=function(e){this._notificationManager&&this._notificationManager.addNotificationListener(e)},ct.prototype.removeNotificationListener=function(e){this._notificationManager&&this._notificationManager.removeNotificationListener(e)},ct.prototype.pollInternalLogs=function(r){var t=this,e=this.config.diagnosticLogInterval;return 0<e||(e=1e4),setInterval(function(){var n=t,e=n.logger?n.logger.queue:[];j.arrForEach(e,function(e){var t={name:r||"InternalMessageId: "+e.messageId,iKey:n.config.instrumentationKey,time:j.toISOString(new Date),baseType:be.dataType,baseData:{message:e.message}};n.track(t)}),e.length=0},e)},ct.prototype._validateTelemetryItem=function(e){if(j.isNullOrUndefined(e.name))throw this._notifyInvalidEvent(e),Error("telemetry name required")},ct.prototype._notifyInvalidEvent=function(e){this._notificationManager&&this._notificationManager.eventsDiscarded([e],l)};function ct(){return st.call(this)||this}var lt=(ut.sanitizeKeyAndAddUniqueness=function(e,t,n){var r=t.length,i=ut.sanitizeKey(e,t);if(i.length!==r){for(var a=0,o=i;n[o]!==undefined;)a++,o=i.substring(0,ut.MAX_NAME_LENGTH-3)+ut.padNumber(a);i=o}return i},ut.sanitizeKey=function(e,t){var n;return t&&(t=ut.trim(t.toString())).length>ut.MAX_NAME_LENGTH&&(n=t.substring(0,ut.MAX_NAME_LENGTH),e.throwInternal(B.WARNING,ye,"name is too long. It has been truncated to "+ut.MAX_NAME_LENGTH+" characters.",{name:t},!0)),n||t},ut.sanitizeString=function(e,t,n){var r;return void 0===n&&(n=ut.MAX_STRING_LENGTH),t&&(n=n||ut.MAX_STRING_LENGTH,(t=ut.trim(t)).toString().length>n&&(r=t.toString().substring(0,n),e.throwInternal(B.WARNING,Ie,"string value is too long. It has been truncated to "+n+" characters.",{value:t},!0))),r||t},ut.sanitizeUrl=function(e,t){return ut.sanitizeInput(e,t,ut.MAX_URL_LENGTH,_e)},ut.sanitizeMessage=function(e,t){var n;return t&&t.length>ut.MAX_MESSAGE_LENGTH&&(n=t.substring(0,ut.MAX_MESSAGE_LENGTH),e.throwInternal(B.WARNING,ve,"message is too long, it has been truncated to "+ut.MAX_MESSAGE_LENGTH+" characters.",{message:t},!0)),n||t},ut.sanitizeException=function(e,t){var n;return t&&t.length>ut.MAX_EXCEPTION_LENGTH&&(n=t.substring(0,ut.MAX_EXCEPTION_LENGTH),e.throwInternal(B.WARNING,me,"exception is too long, it has been truncated to "+ut.MAX_EXCEPTION_LENGTH+" characters.",{exception:t},!0)),n||t},ut.sanitizeProperties=function(e,t){if(t){var n={};for(var r in t){var i=t[r];if(j.isObject(i)&&x())try{i=E().stringify(i)}catch(a){e.throwInternal(B.WARNING,he,"custom property is not valid",{exception:a},!0)}i=ut.sanitizeString(e,i,ut.MAX_PROPERTY_LENGTH),n[r=ut.sanitizeKeyAndAddUniqueness(e,r,n)]=i}t=n}return t},ut.sanitizeMeasurements=function(e,t){if(t){var n={};for(var r in t){var i=t[r];n[r=ut.sanitizeKeyAndAddUniqueness(e,r,n)]=i}t=n}return t},ut.sanitizeId=function(e,t){return t?ut.sanitizeInput(e,t,ut.MAX_ID_LENGTH,xe).toString():t},ut.sanitizeInput=function(e,t,n,r){var i;return t&&(t=ut.trim(t)).length>n&&(i=t.substring(0,n),e.throwInternal(B.WARNING,r,"input is too long, it has been truncated to "+n+" characters.",{data:t},!0)),i||t},ut.padNumber=function(e){var t="00"+e;return t.substr(t.length-3)},ut.trim=function(e){return j.isString(e)?e.replace(/^\s+|\s+$/g,""):e},ut.MAX_NAME_LENGTH=150,ut.MAX_ID_LENGTH=128,ut.MAX_PROPERTY_LENGTH=8192,ut.MAX_STRING_LENGTH=1024,ut.MAX_URL_LENGTH=2048,ut.MAX_MESSAGE_LENGTH=32768,ut.MAX_EXCEPTION_LENGTH=32768,ut);function ut(){}var gt="prototype",ft=S(),pt=j.isString,dt=null;var ht=(mt.createDomEvent=function(e){var t=null;if(j.isFunction(Event))t=new Event(e);else{var n=I();n&&n.createEvent&&(t=n.createEvent("Event")).initEvent(e,!0,!0)}return t},mt.disableStorage=function(){mt._canUseLocalStorage=!1,mt._canUseSessionStorage=!1},mt._getLocalStorageObject=function(){return mt.canUseLocalStorage()?mt._getVerifiedStorageObject(a.LocalStorage):null},mt._getVerifiedStorageObject=function(e){var t,n,r=null;try{if(j.isNullOrUndefined(m()))return null;n=new Date,(r=e===a.LocalStorage?v("localStorage"):v("sessionStorage")).setItem(n.toString(),n.toString()),t=r.getItem(n.toString())!==n.toString(),r.removeItem(n.toString()),t&&(r=null)}catch(i){r=null}return r},mt.isInternalApplicationInsightsEndpoint=function(e){return-1!==mt._internalEndpoints.indexOf(e.toLowerCase())},mt.canUseLocalStorage=function(){return mt._canUseLocalStorage===undefined&&(mt._canUseLocalStorage=!!mt._getVerifiedStorageObject(a.LocalStorage)),mt._canUseLocalStorage},mt.getStorage=function(e,t){var n=mt._getLocalStorageObject();if(null!==n)try{return n.getItem(t)}catch(r){mt._canUseLocalStorage=!1,e.throwInternal(B.WARNING,K,"Browser failed read of local storage. "+mt.getExceptionName(r),{exception:mt.dump(r)})}return null},mt.setStorage=function(e,t,n){var r=mt._getLocalStorageObject();if(null!==r)try{return r.setItem(t,n),!0}catch(i){mt._canUseLocalStorage=!1,e.throwInternal(B.WARNING,J,"Browser failed write to local storage. "+mt.getExceptionName(i),{exception:mt.dump(i)})}return!1},mt.removeStorage=function(e,t){var n=mt._getLocalStorageObject();if(null!==n)try{return n.removeItem(t),!0}catch(r){mt._canUseLocalStorage=!1,e.throwInternal(B.WARNING,$,"Browser failed removal of local storage item. "+mt.getExceptionName(r),{exception:mt.dump(r)})}return!1},mt._getSessionStorageObject=function(){return mt.canUseSessionStorage()?mt._getVerifiedStorageObject(a.SessionStorage):null},mt.canUseSessionStorage=function(){return mt._canUseSessionStorage===undefined&&(mt._canUseSessionStorage=!!mt._getVerifiedStorageObject(a.SessionStorage)),mt._canUseSessionStorage},mt.getSessionStorageKeys=function(){var e=[];if(mt.canUseSessionStorage())for(var t in v("sessionStorage"))e.push(t);return e},mt.getSessionStorage=function(e,t){var n=mt._getSessionStorageObject();if(null!==n)try{return n.getItem(t)}catch(r){mt._canUseSessionStorage=!1,e.throwInternal(B.WARNING,Q,"Browser failed read of session storage. "+mt.getExceptionName(r),{exception:mt.dump(r)})}return null},mt.setSessionStorage=function(e,t,n){var r=mt._getSessionStorageObject();if(null!==r)try{return r.setItem(t,n),!0}catch(i){mt._canUseSessionStorage=!1,e.throwInternal(B.WARNING,Y,"Browser failed write to session storage. "+mt.getExceptionName(i),{exception:mt.dump(i)})}return!1},mt.removeSessionStorage=function(e,t){var n=mt._getSessionStorageObject();if(null!==n)try{return n.removeItem(t),!0}catch(r){mt._canUseSessionStorage=!1,e.throwInternal(B.WARNING,Z,"Browser failed removal of session storage item. "+mt.getExceptionName(r),{exception:mt.dump(r)})}return!1},mt.disableCookies=function(){j.disableCookies()},mt.canUseCookies=function(e){if(j._canUseCookies===undefined){j._canUseCookies=!1;try{j._canUseCookies=mt.document.cookie!==undefined}catch(t){e.throwInternal(B.WARNING,Ne,"Cannot access document.cookie - "+mt.getExceptionName(t),{exception:mt.dump(t)})}}return j._canUseCookies&&mt.document&&mt.document.cookie},mt.disallowsSameSiteNone=function(e){return!!pt(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 i(e,t){var n=e.length,r=n-t.length;return e.substring(0<=r?r: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"))},mt.setCookie=function(e,t,n,r){if(mt.canUseCookies(e)){var i="",a="";r&&(i=";domain="+r);var o=_();o&&"https:"===o.protocol&&(a=";secure",null===dt&&(dt=mt.disallowsSameSiteNone((S()||{}).userAgent)),dt||(n+=";SameSite=None")),mt.document.cookie=t+"="+n+i+";path=/"+a}},mt.stringToBoolOrDefault=function(e,t){return void 0===t&&(t=!1),e===undefined||null===e?t:"true"===e.toString().toLowerCase()},mt.getCookie=function(e,t){if(mt.canUseCookies(e)){var n="";if(t&&t.length)for(var r=t+"=",i=mt.document.cookie.split(";"),a=0;a<i.length;a++){var o=i[a];if((o=mt.trim(o))&&0===o.indexOf(r)){n=o.substring(r.length,i[a].length);break}}return n}},mt.deleteCookie=function(e,t){mt.canUseCookies(e)&&(mt.document.cookie=t+"=;path=/;expires=Thu, 01 Jan 1970 00:00:01 GMT;")},mt.trim=function(e){return pt(e)?e.replace(/^\s+|\s+$/g,""):e},mt.newId=function(){for(var e="",t=1073741824*Math.random();0<t;)e+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(t%64),t=Math.floor(t/64);return e},mt.random32=function(){return 4294967296*Math.random()|0},mt.generateW3CId=function(){for(var e,t=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"],n="",r=0;r<4;r++)n+=t[15&(e=mt.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 i=t[8+4*Math.random()|0];return n.substr(0,8)+n.substr(9,4)+"4"+n.substr(13,3)+i+n.substr(16,3)+n.substr(19,12)},mt.isArray=function(e){return"[object Array]"===Object[gt].toString.call(e)},mt.isError=function(e){return"[object Error]"===Object[gt].toString.call(e)},mt.getIEVersion=function(e){void 0===e&&(e=null);var t=e?e.toLowerCase():ft?(ft.userAgent||"").toLowerCase():"";return-1!==t.indexOf("msie")?parseInt(t.split("msie")[1]):null},mt.msToTimeSpan=function(e){(isNaN(e)||e<0)&&(e=0);var t=""+(e=Math.round(e))%1e3,n=""+Math.floor(e/1e3)%60,r=""+Math.floor(e/6e4)%60,i=""+Math.floor(e/36e5)%24,a=Math.floor(e/864e5);return t=1===t.length?"00"+t:2===t.length?"0"+t:t,n=n.length<2?"0"+n:n,r=r.length<2?"0"+r:r,(0<a?a+".":"")+(i=i.length<2?"0"+i:i)+":"+r+":"+n+"."+t},mt.isCrossOriginError=function(e,t,n,r,i){return("Script error."===e||"Script error"===e)&&!i},mt.dump=function(e){var t=Object[gt].toString.call(e),n="";return"[object Error]"===t?n="{ stack: '"+e.stack+"', message: '"+e.message+"', name: '"+e.name+"'":x()&&(n=E().stringify(e)),t+n},mt.getExceptionName=function(e){return"[object Error]"===Object[gt].toString.call(e)?e.name:""},mt.addEventHandler=function(e,t){return H.Attach(T(),e,t)},mt.IsBeaconApiSupported=function(){return"sendBeacon"in ft&&ft.sendBeacon},mt.getExtension=function(e,t){for(var n=null,r=0;!n&&r<e.length;)e[r]&&e[r].identifier===t&&(n=e[r]),r++;return n},mt.document=I()||{},mt._canUseLocalStorage=undefined,mt._canUseSessionStorage=undefined,mt._internalEndpoints=["https://dc.services.visualstudio.com/v2/track","https://breeze.aimon.applicationinsights.io/v2/track","https://dc-int.services.visualstudio.com/v2/track"],mt.NotSpecified="not_specified",mt.isDate=j.isDate,mt.toISOStringForIE8=j.toISOString,mt);function mt(){}var vt=(yt.parseUrl=function(e){return yt.htmlAnchorElement||(yt.htmlAnchorElement=yt.document.createElement?yt.document.createElement("a"):{host:yt.parseHost(e)}),yt.htmlAnchorElement.href=e,yt.htmlAnchorElement},yt.getAbsoluteUrl=function(e){var t,n=yt.parseUrl(e);return n&&(t=n.href),t},yt.getPathName=function(e){var t,n=yt.parseUrl(e);return n&&(t=n.pathname),t},yt.getCompleteUrl=function(e,t){return e?e.toUpperCase()+" "+t:t},yt.parseHost=function(e){if(e){var t=e.match(/:\/\/(www[0-9]?\.)?(.[^/:]+)/i);if(null!=t&&2<t.length&&pt(t[2])&&0<t[2].length)return t[2]}return null},yt.document=I()||{},yt);function yt(){}var It=(Tt.ParseDependencyPath=function(e,t,n,r){var i,a=r,o=r;if(t&&0<t.length){var s=vt.parseUrl(t);if(i=s.host,!a)if(null!=s.pathname){var c=0===s.pathname.length?"/":s.pathname;"/"!==c.charAt(0)&&(c="/"+c),o=s.pathname,a=lt.sanitizeString(e,n?n+" "+c:c)}else a=lt.sanitizeString(e,t)}else a=i=r;return{target:i,name:a,data:o}},Tt);function Tt(){}var St=(wt.Now=function(){var e=N();return e&&e.now&&e.timing?e.now()+e.timing.navigationStart:(new Date).getTime()},wt.GetDuration=function(e,t){var n=null;return 0===e||0===t||j.isNullOrUndefined(e)||j.isNullOrUndefined(t)||(n=t-e),n},wt);function wt(){}var _t,Nt=(t(xt,_t=function Zn(){}),xt);function xt(){return _t.call(this)||this}var Et;t(bt,Et=function er(){this.ver=1,this.sampleRate=100,this.tags={}});function bt(e,t,n){var r=Et.call(this)||this;return r.name=lt.sanitizeString(e,n)||ht.NotSpecified,r.data=t,r.time=j.toISOString(new Date),r.aiDataContract={time:d.Required,iKey:d.Required,name:d.Required,sampleRate:function(){return 100===r.sampleRate?d.Hidden:d.Required},tags:d.Required,data:d.Required},r}var Dt,Ct=function tr(){},Pt=(t(kt,Dt=Ct),kt);function kt(){var e=Dt.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}var Lt,At=(t(Mt,Lt=Pt),Mt.envelopeType="Microsoft.ApplicationInsights.{0}.Event",Mt.dataType="EventData",Mt);function Mt(e,t,n,r){var i=Lt.call(this)||this;return i.aiDataContract={ver:d.Required,name:d.Required,properties:d.Default,measurements:d.Default},i.name=lt.sanitizeString(e,t)||ht.NotSpecified,i.properties=lt.sanitizeProperties(e,n),i.measurements=lt.sanitizeMeasurements(e,r),i}var Ot,Ut=function nr(){},Rt=(t(zt,Ot=Ct),zt);function zt(){var e=Ot.call(this)||this;return e.ver=2,e.exceptions=[],e.properties={},e.measurements={},e}var Vt,Gt=function rr(){this.hasFullStack=!0,this.parsedStack=[]},jt=(t(qt,Vt=Rt),qt.CreateFromInterface=function(t,e){var n=e.exceptions&&j.arrMap(e.exceptions,function(e){return Ft.CreateFromInterface(t,e)});return new qt(t,c({},e,{exceptions:n}))},qt.prototype.toInterface=function(){var e=this,t=e.exceptions,n=e.properties,r=e.measurements,i=e.severityLevel,a=(e.ver,e.problemGroup),o=e.id,s=e.isManual;return{ver:"4.0",exceptions:t instanceof Array&&j.arrMap(t,function(e){return e.toInterface()})||undefined,severityLevel:i,properties:n,measurements:r,problemGroup:a,id:o,isManual:s}},qt.CreateSimpleException=function(e,t,n,r,i,a){return{exceptions:[{hasFullStack:!0,message:e,stack:i,typeName:t}]}},qt.envelopeType="Microsoft.ApplicationInsights.{0}.Exception",qt.dataType="ExceptionData",qt);function qt(e,t,n,r,i,a){var o=Vt.call(this)||this;return o.aiDataContract={ver:d.Required,exceptions:d.Required,severityLevel:d.Default,properties:d.Default,measurements:d.Default},t instanceof Error?(o.exceptions=[new Ft(e,t)],o.properties=lt.sanitizeProperties(e,n),o.measurements=lt.sanitizeMeasurements(e,r),i&&(o.severityLevel=i),a&&(o.id=a)):(o.exceptions=t.exceptions,o.properties=t.properties,o.measurements=t.measurements,t.severityLevel&&(o.severityLevel=t.severityLevel),t.id&&(o.id=t.id),t.problemGroup&&(o.problemGroup=t.problemGroup),o.ver=2,j.isNullOrUndefined(t.isManual)||(o.isManual=t.isManual)),o}var Bt,Ft=(t(Wt,Bt=Gt),Wt.prototype.toInterface=function(){var e=this.parsedStack instanceof Array&&j.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}},Wt.CreateFromInterface=function(e,t){var n=t.parsedStack instanceof Array&&j.arrMap(t.parsedStack,function(e){return Xt.CreateFromInterface(e)})||t.parsedStack;return new Wt(e,c({},t,{parsedStack:n}))},Wt.parseStack=function(e){var t;if(j.isString(e)){var n=e.split("\n");t=[];for(var r=0,i=0,a=0;a<=n.length;a++){var o=n[a];if(Xt.regex.test(o)){var s=new Xt(n[a],r++);i+=s.sizeInBytes,t.push(s)}}if(32768<i)for(var c=0,l=t.length-1,u=0,g=c,f=l;c<l;){if(32768<(u+=t[c].sizeInBytes+t[l].sizeInBytes)){var p=f-g+1;t.splice(g,p);break}g=c,f=l,c++,l--}}return t},Wt);function Wt(e,t){var n=Bt.call(this)||this;if(n.aiDataContract={id:d.Default,outerId:d.Default,typeName:d.Required,message:d.Required,hasFullStack:d.Default,stack:d.Default,parsedStack:d.Array},t instanceof Error){n.typeName=lt.sanitizeString(e,t.name)||ht.NotSpecified,n.message=lt.sanitizeMessage(e,t.message)||ht.NotSpecified;var r=t.stack;n.parsedStack=Wt.parseStack(r),n.stack=lt.sanitizeException(e,r),n.hasFullStack=ht.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 Ht,Xt=(t(Kt,Ht=Ut),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=Ht.call(this)||this;if(n.sizeInBytes=0,n.aiDataContract={level:d.Required,method:d.Required,assembly:d.Default,fileName:d.Default,line:d.Default},"string"==typeof e){var r=e;n.level=t,n.method="<no_method>",n.assembly=ht.trim(r),n.fileName="",n.line=0;var i=r.match(Kt.regex);i&&5<=i.length&&(n.method=ht.trim(i[2])||n.method,n.fileName=ht.trim(i[4]),n.line=parseInt(i[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 Qt,Jt,Yt,$t=(t(Zt,Qt=Ct),Zt);function Zt(){var e=Qt.call(this)||this;return e.ver=2,e.metrics=[],e.properties={},e.measurements={},e}(Yt=Jt=Jt||{})[Yt.Measurement=0]="Measurement",Yt[Yt.Aggregation=1]="Aggregation";var en,tn=(t(nn,en=function ir(){this.kind=Jt.Measurement}),nn);function nn(){var e=null!==en&&en.apply(this,arguments)||this;return e.aiDataContract={name:d.Required,kind:d.Default,value:d.Required,count:d.Default,min:d.Default,max:d.Default,stdDev:d.Default},e}var rn,an=(t(on,rn=$t),on.envelopeType="Microsoft.ApplicationInsights.{0}.Metric",on.dataType="MetricData",on);function on(e,t,n,r,i,a,o,s){var c=rn.call(this)||this;c.aiDataContract={ver:d.Required,metrics:d.Required,properties:d.Default};var l=new tn;return l.count=0<r?r:undefined,l.max=isNaN(a)||null===a?undefined:a,l.min=isNaN(i)||null===i?undefined:i,l.name=lt.sanitizeString(e,t)||ht.NotSpecified,l.value=n,c.metrics=[l],c.properties=lt.sanitizeProperties(e,o),c.measurements=lt.sanitizeMeasurements(e,s),c}var sn,cn=(t(ln,sn=Pt),ln);function ln(){var e=sn.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}var un,gn=(t(fn,un=cn),fn.envelopeType="Microsoft.ApplicationInsights.{0}.Pageview",fn.dataType="PageviewData",fn);function fn(e,t,n,r,i,a,o){var s=un.call(this)||this;return s.aiDataContract={ver:d.Required,name:d.Default,url:d.Default,duration:d.Default,properties:d.Default,measurements:d.Default,id:d.Default},s.id=lt.sanitizeId(e,o),s.url=lt.sanitizeUrl(e,n),s.name=lt.sanitizeString(e,t)||ht.NotSpecified,isNaN(r)||(s.duration=ht.msToTimeSpan(r)),s.properties=lt.sanitizeProperties(e,i),s.measurements=lt.sanitizeMeasurements(e,a),s}var pn,dn=(t(hn,pn=Ct),hn);function hn(){var e=pn.call(this)||this;return e.ver=2,e.success=!0,e.properties={},e.measurements={},e}var mn,vn=(t(yn,mn=dn),yn.envelopeType="Microsoft.ApplicationInsights.{0}.RemoteDependency",yn.dataType="RemoteDependencyData",yn);function yn(e,t,n,r,i,a,o,s,c,l,u,g){void 0===c&&(c="Ajax");var f=mn.call(this)||this;f.aiDataContract={id:d.Required,ver:d.Required,name:d.Default,resultCode:d.Default,duration:d.Default,success:d.Default,data:d.Default,target:d.Default,type:d.Default,properties:d.Default,measurements:d.Default,kind:d.Default,value:d.Default,count:d.Default,min:d.Default,max:d.Default,stdDev:d.Default,dependencyKind:d.Default,dependencySource:d.Default,commandName:d.Default,dependencyTypeName:d.Default},f.id=t,f.duration=ht.msToTimeSpan(i),f.success=a,f.resultCode=o+"",f.type=lt.sanitizeString(e,c);var p=It.ParseDependencyPath(e,n,s,r);return f.data=lt.sanitizeUrl(e,r)||p.data,f.target=lt.sanitizeString(e,p.target),l&&(f.target=f.target+" | "+l),f.name=lt.sanitizeString(e,p.name),f.properties=lt.sanitizeProperties(e,u),f.measurements=lt.sanitizeMeasurements(e,g),f}var In,Tn=(t(Sn,In=Ct),Sn);function Sn(){var e=In.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}var wn,_n=(t(Nn,wn=Tn),Nn.envelopeType="Microsoft.ApplicationInsights.{0}.Message",Nn.dataType="MessageData",Nn);function Nn(e,t,n,r,i){var a=wn.call(this)||this;return a.aiDataContract={ver:d.Required,message:d.Required,severityLevel:d.Default,properties:d.Default},t=t||ht.NotSpecified,a.message=lt.sanitizeMessage(e,t),a.properties=lt.sanitizeProperties(e,r),a.measurements=lt.sanitizeMeasurements(e,i),n&&(a.severityLevel=n),a}var xn,En=(t(bn,xn=cn),bn);function bn(){var e=xn.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}var Dn,Cn=(t(Pn,Dn=En),Pn.envelopeType="Microsoft.ApplicationInsights.{0}.PageviewPerformance",Pn.dataType="PageviewPerformanceData",Pn);function Pn(e,t,n,r,i,a,o){var s=Dn.call(this)||this;return s.aiDataContract={ver:d.Required,name:d.Default,url:d.Default,duration:d.Default,perfTotal:d.Default,networkConnect:d.Default,sentRequest:d.Default,receivedResponse:d.Default,domProcessing:d.Default,properties:d.Default,measurements:d.Default},s.url=lt.sanitizeUrl(e,n),s.name=lt.sanitizeString(e,t)||ht.NotSpecified,s.properties=lt.sanitizeProperties(e,i),s.measurements=lt.sanitizeMeasurements(e,a),o&&(s.domProcessing=o.domProcessing,s.duration=o.duration,s.networkConnect=o.networkConnect,s.perfTotal=o.perfTotal,s.receivedResponse=o.receivedResponse,s.sentRequest=o.sentRequest),s}var kn,Ln,An;t(Mn,kn=Nt);function Mn(e,t){var n=kn.call(this)||this;return n.aiDataContract={baseType:d.Required,baseData:d.Required},n.baseType=e,n.baseData=t,n}(An=Ln=Ln||{})[An.Verbose=0]="Verbose",An[An.Information=1]="Information",An[An.Warning=2]="Warning",An[An.Error=3]="Error",An[An.Critical=4]="Critical";var On=(Un.create=function(e,t,n,r,i,a){if(n=lt.sanitizeString(r,n)||ht.NotSpecified,j.isNullOrUndefined(e)||j.isNullOrUndefined(t)||j.isNullOrUndefined(n))throw Error("Input doesn't contain all required fields");var o={name:n,time:j.toISOString(new Date),iKey:"",ext:a||{},tags:[],data:{},baseType:t,baseData:e};if(!j.isNullOrUndefined(i))for(var s in i)i.hasOwnProperty(s)&&(o.data[s]=i[s]);return o},Un);function Un(){}var Rn=(zn.prototype.trackPageView=function(n,r){var i=this,a=n.name;if(j.isNullOrUndefined(a)||"string"!=typeof a){var e=I();a=n.name=e&&e.title||""}var o=n.uri;if(j.isNullOrUndefined(o)||"string"!=typeof o){var t=_();o=n.uri=t&&t.href||""}if(!this._pageViewPerformanceManager.isPerformanceTimingSupported())return this.appInsights.sendPageViewInternal(n,r),j.arrForEach(this._channel(),function(e){j.arrForEach(e,function(e){return e.flush(!0)})}),void this._logger.throwInternal(B.WARNING,ie,"trackPageView: navigation timing API used for calculation of page duration is not supported in this browser. This page view will be collected without duration and timing info.");var s,c,l=!1,u=this._pageViewPerformanceManager.getPerformanceTiming().navigationStart;s=St.GetDuration(u,+new Date),this._pageViewPerformanceManager.shouldCollectDuration(s)||(s=undefined),j.isNullOrUndefined(r)||j.isNullOrUndefined(r.duration)||(c=r.duration),!this.overridePageViewDuration&&isNaN(c)||(isNaN(c)&&((r=r||{}).duration=s),this.appInsights.sendPageViewInternal(n,r),j.arrForEach(this._channel(),function(e){j.arrForEach(e,function(e){return e.flush(!0)})}),l=!0),r=r||{};var g=setInterval(function(){try{if(i._pageViewPerformanceManager.isPerformanceTimingDataReady()){clearInterval(g);var e={name:a,uri:o};i._pageViewPerformanceManager.populatePageViewPerformanceEvent(e),e.isValid||l?(l||(r.duration=e.durationMs,i.appInsights.sendPageViewInternal(n,r)),i.pageViewPerformanceSent||(i.appInsights.sendPageViewPerformanceInternal(e,r),i.pageViewPerformanceSent=!0),j.arrForEach(i._channel(),function(e){j.arrForEach(e,function(e){return e.flush(!0)})})):(r.duration=s,i.appInsights.sendPageViewInternal(n,r),j.arrForEach(i._channel(),function(e){j.arrForEach(e,function(e){return e.flush(!0)})}))}else 6e4<St.GetDuration(u,+new Date)&&(clearInterval(g),l||(r.duration=6e4,i.appInsights.sendPageViewInternal(n,r),j.arrForEach(i._channel(),function(e){j.arrForEach(e,function(e){return e.flush(!0)})})))}catch(t){i._logger.throwInternal(B.CRITICAL,fe,"trackPageView failed on page load calculation: "+ht.getExceptionName(t),{exception:ht.dump(t)})}},100)},zn);function zn(e,t,n,r){this.pageViewPerformanceSent=!1,this.overridePageViewDuration=!1,this.overridePageViewDuration=t,this.appInsights=e,this._pageViewPerformanceManager=r,n&&(this._channel=function(){return n.getTransmissionControls()},this._logger=n.logger)}var Vn=(Gn.prototype.trackPreviousPageVisit=function(e,t){try{var n=this.restartPageVisitTimer(e,t);n&&this.pageVisitTimeTrackingHandler(n.pageName,n.pageUrl,n.pageVisitTime)}catch(r){this._logger.warnToConsole("Auto track page visit time failed, metric will not be collected: "+ht.dump(r))}},Gn.prototype.restartPageVisitTimer=function(e,t){try{var n=this.stopPageVisitTimer();return this.startPageVisitTimer(e,t),n}catch(r){return this._logger.warnToConsole("Call to restart failed: "+ht.dump(r)),null}},Gn.prototype.startPageVisitTimer=function(e,t){try{if(ht.canUseSessionStorage()){if(null!=ht.getSessionStorage(this._logger,this.prevPageVisitDataKeyName))throw new Error("Cannot call startPageVisit consecutively without first calling stopPageVisit");var n=new jn(e,t),r=E().stringify(n);ht.setSessionStorage(this._logger,this.prevPageVisitDataKeyName,r)}}catch(i){this._logger.warnToConsole("Call to start failed: "+ht.dump(i))}},Gn.prototype.stopPageVisitTimer=function(){try{if(ht.canUseSessionStorage()){var e=Date.now(),t=ht.getSessionStorage(this._logger,this.prevPageVisitDataKeyName);if(t&&x()){var n=E().parse(t);return n.pageVisitTime=e-n.pageVisitStartTime,ht.removeSessionStorage(this._logger,this.prevPageVisitDataKeyName),n}return null}return null}catch(r){return this._logger.warnToConsole("Stop page visit timer failed: "+ht.dump(r)),null}},Gn);function Gn(e,t){this.prevPageVisitDataKeyName="prevPageVisitData",this.pageVisitTimeTrackingHandler=t,this._logger=e}var jn=function ar(e,t){this.pageVisitStartTime=Date.now(),this.pageName=e,this.pageUrl=t},qn=(Bn.prototype.populatePageViewPerformanceEvent=function(e){e.isValid=!1;var t=this.getPerformanceNavigationTiming(),n=this.getPerformanceTiming();if(t||n){if(t)var r=t.duration,i=St.GetDuration(t.startTime,t.connectEnd),a=St.GetDuration(t.requestStart,t.responseStart),o=St.GetDuration(t.responseStart,t.responseEnd),s=St.GetDuration(t.responseEnd,t.loadEventEnd);else r=St.GetDuration(n.navigationStart,n.loadEventEnd),i=St.GetDuration(n.navigationStart,n.connectEnd),a=St.GetDuration(n.requestStart,n.responseStart),o=St.GetDuration(n.responseStart,n.responseEnd),s=St.GetDuration(n.responseEnd,n.loadEventEnd);0===r?this._logger.throwInternal(B.WARNING,te,"error calculating page view performance.",{total:r,network:i,request:a,response:o,dom:s}):this.shouldCollectDuration(r,i,a,o,s)?r<Math.floor(i)+Math.floor(a)+Math.floor(o)+Math.floor(s)?this._logger.throwInternal(B.WARNING,ee,"client performance math error.",{total:r,network:i,request:a,response:o,dom:s}):(e.durationMs=r,e.perfTotal=e.duration=ht.msToTimeSpan(r),e.networkConnect=ht.msToTimeSpan(i),e.sentRequest=ht.msToTimeSpan(a),e.receivedResponse=ht.msToTimeSpan(o),e.domProcessing=ht.msToTimeSpan(s),e.isValid=!0):this._logger.throwInternal(B.WARNING,de,"Invalid page load duration value. Browser perf data won't be sent.",{total:r,network:i,request:a,response:o,dom:s})}},Bn.prototype.getPerformanceTiming=function(){return this.isPerformanceTimingSupported()?N().timing:null},Bn.prototype.getPerformanceNavigationTiming=function(){return this.isPerformanceNavigationTimingSupported()?N().getEntriesByType("navigation")[0]:null},Bn.prototype.isPerformanceNavigationTimingSupported=function(){var e=N();return e&&e.getEntriesByType&&0<e.getEntriesByType("navigation").length},Bn.prototype.isPerformanceTimingSupported=function(){var e=N();return e&&e.timing},Bn.prototype.isPerformanceTimingDataReady=function(){var e=N(),t=e?e.timing:0;return t&&0<t.domainLookupStart&&0<t.navigationStart&&0<t.responseStart&&0<t.requestStart&&0<t.loadEventEnd&&0<t.responseEnd&&0<t.connectEnd&&0<t.domLoading},Bn.prototype.shouldCollectDuration=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=["googlebot","adsbot-google","apis-google","mediapartners-google"],r=(S()||{}).userAgent,i=!1;if(r)for(var a=0;a<n.length;a++)i=i||-1!==r.toLowerCase().indexOf(n[a]);if(i)return!1;for(a=0;a<e.length;a++)if(e[a]>=this.MAX_DURATION_ALLOWED)return!1;return!0},Bn);function Bn(e){this.MAX_DURATION_ALLOWED=36e5,e&&(this._logger=e.logger)}var Fn="duration";function Wn(e,t){e&&e.dispatchEvent&&t&&e.dispatchEvent(t)}var Hn,Xn=(t(Kn,Hn=ze),Kn.getDefaultConfig=function(e){return(e=e||{}).sessionRenewalMs=18e5,e.sessionExpirationMs=864e5,e.disableExceptionTracking=ht.stringToBoolOrDefault(e.disableExceptionTracking),e.autoTrackPageVisitTime=ht.stringToBoolOrDefault(e.autoTrackPageVisitTime),e.overridePageViewDuration=ht.stringToBoolOrDefault(e.overridePageViewDuration),e.enableUnhandledPromiseRejectionTracking=ht.stringToBoolOrDefault(e.enableUnhandledPromiseRejectionTracking),(isNaN(e.samplingPercentage)||e.samplingPercentage<=0||100<=e.samplingPercentage)&&(e.samplingPercentage=100),e.isCookieUseDisabled=ht.stringToBoolOrDefault(e.isCookieUseDisabled),e.isStorageUseDisabled=ht.stringToBoolOrDefault(e.isStorageUseDisabled),e.isBrowserLinkTrackingEnabled=ht.stringToBoolOrDefault(e.isBrowserLinkTrackingEnabled),e.enableAutoRouteTracking=ht.stringToBoolOrDefault(e.enableAutoRouteTracking),e.namePrefix=e.namePrefix||"",e},Kn.prototype.processTelemetry=function(e,t){var n=!1,r=this._telemetryInitializers.length;t=this._getTelCtx(t);for(var i=0;i<r;++i){var a=this._telemetryInitializers[i];if(a)try{if(!1===a.apply(null,[e])){n=!0;break}}catch(o){t.diagLog().throwInternal(B.CRITICAL,we,"One of telemetry initializers failed, telemetry item will not be sent: "+ht.getExceptionName(o),{exception:ht.dump(o)},!0)}}n||this.processNext(e,t)},Kn.prototype.trackEvent=function(e,t){try{var n=On.create(e,At.dataType,At.envelopeType,this.diagLog(),t);this.core.track(n)}catch(r){this.diagLog().throwInternal(B.WARNING,pe,"trackTrace failed, trace will not be collected: "+ht.getExceptionName(r),{exception:ht.dump(r)})}},Kn.prototype.startTrackEvent=function(e){try{this._eventTracking.start(e)}catch(t){this.diagLog().throwInternal(B.CRITICAL,ae,"startTrackEvent failed, event will not be collected: "+ht.getExceptionName(t),{exception:ht.dump(t)})}},Kn.prototype.stopTrackEvent=function(e,t,n){try{this._eventTracking.stop(e,undefined,t)}catch(r){this.diagLog().throwInternal(B.CRITICAL,oe,"stopTrackEvent failed, event will not be collected: "+ht.getExceptionName(r),{exception:ht.dump(r)})}},Kn.prototype.trackTrace=function(e,t){try{var n=On.create(e,_n.dataType,_n.envelopeType,this.diagLog(),t);this.core.track(n)}catch(r){this.diagLog().throwInternal(B.WARNING,pe,"trackTrace failed, trace will not be collected: "+ht.getExceptionName(r),{exception:ht.dump(r)})}},Kn.prototype.trackMetric=function(e,t){try{var n=On.create(e,an.dataType,an.envelopeType,this.diagLog(),t);this.core.track(n)}catch(r){this.diagLog().throwInternal(B.CRITICAL,ue,"trackMetric failed, metric will not be collected: "+ht.getExceptionName(r),{exception:ht.dump(r)})}},Kn.prototype.trackPageView=function(e,t){try{var n=e||{};this._pageViewManager.trackPageView(n,c({},n.properties,n.measurements,t)),this.config.autoTrackPageVisitTime&&this._pageVisitTimeManager.trackPreviousPageVisit(n.name,n.uri)}catch(r){this.diagLog().throwInternal(B.CRITICAL,ge,"trackPageView failed, page view will not be collected: "+ht.getExceptionName(r),{exception:ht.dump(r)})}},Kn.prototype.sendPageViewInternal=function(e,t,n){var r=I();r&&(e.refUri=e.refUri===undefined?r.referrer:e.refUri);var i=On.create(e,gn.dataType,gn.envelopeType,this.diagLog(),t,n);this.core.track(i),this._trackAjaxAttempts=0},Kn.prototype.sendPageViewPerformanceInternal=function(e,t,n){var r=On.create(e,Cn.dataType,Cn.envelopeType,this.diagLog(),t,n);this.core.track(r)},Kn.prototype.trackPageViewPerformance=function(e,t){try{this._pageViewPerformanceManager.populatePageViewPerformanceEvent(e),this.sendPageViewPerformanceInternal(e,t)}catch(n){this.diagLog().throwInternal(B.CRITICAL,ge,"trackPageViewPerformance failed, page view will not be collected: "+ht.getExceptionName(n),{exception:ht.dump(n)})}},Kn.prototype.startTrackPage=function(e){try{if("string"!=typeof e){var t=I();e=t&&t.title||""}this._pageTracking.start(e)}catch(n){this.diagLog().throwInternal(B.CRITICAL,se,"startTrackPage failed, page view may not be collected: "+ht.getExceptionName(n),{exception:ht.dump(n)})}},Kn.prototype.stopTrackPage=function(e,t,n,r){try{if("string"!=typeof e){var i=I();e=i&&i.title||""}if("string"!=typeof t){var a=_();t=a&&a.href||""}this._pageTracking.stop(e,t,n,r),this.config.autoTrackPageVisitTime&&this._pageVisitTimeManager.trackPreviousPageVisit(e,t)}catch(o){this.diagLog().throwInternal(B.CRITICAL,ce,"stopTrackPage failed, page view will not be collected: "+ht.getExceptionName(o),{exception:ht.dump(o)})}},Kn.prototype.sendExceptionInternal=function(e,t,n){var r=new jt(this.diagLog(),e.exception||new Error(ht.NotSpecified),e.properties,e.measurements,e.severityLevel,e.id).toInterface(),i=On.create(r,jt.dataType,jt.envelopeType,this.diagLog(),t,n);this.core.track(i)},Kn.prototype.trackException=function(e,t){try{this.sendExceptionInternal(e,t)}catch(n){this.diagLog().throwInternal(B.CRITICAL,le,"trackException failed, exception will not be collected: "+ht.getExceptionName(n),{exception:ht.dump(n)})}},Kn.prototype._onerror=function(e){try{var t={url:e&&e.url||(I()||{}).URL,lineNumber:e.lineNumber,columnNumber:e.columnNumber,message:e.message};if(ht.isCrossOriginError(e.message,e.url,e.lineNumber,e.columnNumber,e.error))this._sendCORSException(t.url);else{if(!ht.isError(e.error)){var n="window.onerror@"+t.url+":"+e.lineNumber+":"+(e.columnNumber||0);e.error=new Error(e.message),e.error.stack=n}this.trackException({exception:e.error,severityLevel:Ln.Error},t)}}catch(i){var r=e.error?e.error.name+", "+e.error.message:"null";this.diagLog().throwInternal(B.CRITICAL,ne,"_onError threw exception while logging error, error will not be collected: "+ht.getExceptionName(i),{exception:ht.dump(i),errorString:r})}},Kn.prototype.addTelemetryInitializer=function(e){this._telemetryInitializers.push(e)},Kn.prototype.initialize=function(e,t,n,r){var o=this;if(!this.isInitialized()){if(j.isNullOrUndefined(t))throw Error("Error initializing");Hn.prototype.initialize.call(this,e,t,n,r),this.setInitialized(!1);var i=this._getTelCtx(),a=this.identifier;this._globalconfig={instrumentationKey:e.instrumentationKey,endpointUrl:e.endpointUrl||"https://dc.services.visualstudio.com/v2/track"},this.config=i.getExtCfg(a);var s=Kn.getDefaultConfig();if(s!==undefined){for(var c in s)this.config[c]=i.getConfig(a,c,s[c]);if(this._globalconfig)for(var c in s)this._globalconfig[c]===undefined&&(this._globalconfig[c]=s[c])}this.config.isCookieUseDisabled&&ht.disableCookies(),this.config.isStorageUseDisabled&&ht.disableStorage();var l={instrumentationKey:function(){return e.instrumentationKey},accountId:function(){return o.config.accountId||e.accountId},sessionRenewalMs:function(){return o.config.sessionRenewalMs||e.sessionRenewalMs},sessionExpirationMs:function(){return o.config.sessionExpirationMs||e.sessionExpirationMs},sampleRate:function(){return o.config.samplingPercentage||e.samplingPercentage},cookieDomain:function(){return o.config.cookieDomain||e.cookieDomain},sdkExtension:function(){return o.config.sdkExtension||e.sdkExtension},isBrowserLinkTrackingEnabled:function(){return o.config.isBrowserLinkTrackingEnabled||e.isBrowserLinkTrackingEnabled},appId:function(){return o.config.appId||e.appId}};this._pageViewPerformanceManager=new qn(this.core),this._pageViewManager=new Rn(this,this.config.overridePageViewDuration,this.core,this._pageViewPerformanceManager),this._pageVisitTimeManager=new Vn(this.diagLog(),function(e,t,n){return o.trackPageVisitTime(e,t,n)}),this._telemetryInitializers=this._telemetryInitializers||[],this._addDefaultTelemetryInitializers(l),this._eventTracking=new Qn(this.diagLog(),"trackEvent"),this._eventTracking.action=function(e,t,n,r){(r=r||{})[Fn]=n.toString(),o.trackEvent({name:e,properties:r})},this._pageTracking=new Qn(this.diagLog(),"trackPageView"),this._pageTracking.action=function(e,t,n,r,i){j.isNullOrUndefined(r)&&(r={}),r[Fn]=n.toString();var a={name:e,uri:t,properties:r,measurements:i};o.sendPageViewInternal(a)};var u,g,f=T(),p=w(),d=_(),h=this;if(!1===this.config.disableExceptionTracking&&!this.config.autoExceptionInstrumented&&f){var m=f.onerror;f.onerror=function(e,t,n,r,i){var a=m&&m(e,t,n,r,i);return!0!==a&&h._onerror({message:e,url:t,lineNumber:n,columnNumber:r,error:i}),a},this.config.autoExceptionInstrumented=!0}if(!1===this.config.disableExceptionTracking&&!0===this.config.enableUnhandledPromiseRejectionTracking&&!this.config.autoUnhandledPromiseInstrumented&&f){var v="onunhandledrejection",y=f[v];f[v]=function(e){var t=y&&y.call(f,e);return!0!==t&&h._onerror({message:e.reason.toString(),error:e.reason instanceof Error?e.reason:new Error(e.reason.toString()),url:d?d.href:"",lineNumber:0,columnNumber:0}),t},this.config.autoUnhandledPromiseInstrumented=!0}if(!0===this.config.enableAutoRouteTracking&&p&&j.isFunction(p.pushState)&&j.isFunction(p.replaceState)&&f&&"undefined"!=typeof Event){var I=this;j.arrForEach(n,function(e){"AppInsightsPropertiesPlugin"===e.identifier&&(o._properties=e)}),p.pushState=(g=p.pushState,function(){var e=g.apply(this,arguments);return Wn(f,ht.createDomEvent(I.config.namePrefix+"pushState")),Wn(f,ht.createDomEvent(I.config.namePrefix+"locationchange")),e}),p.replaceState=(u=p.replaceState,function(){var e=u.apply(this,arguments);return Wn(f,ht.createDomEvent(I.config.namePrefix+"replaceState")),Wn(f,ht.createDomEvent(I.config.namePrefix+"locationchange")),e}),f.addEventListener&&(f.addEventListener(I.config.namePrefix+"popstate",function(){Wn(f,ht.createDomEvent(I.config.namePrefix+"locationchange"))}),f.addEventListener(I.config.namePrefix+"locationchange",function(){I._properties&&I._properties.context&&I._properties.context.telemetryTrace&&(I._properties.context.telemetryTrace.traceID=ht.generateW3CId(),I._properties.context.telemetryTrace.name=d&&d.pathname||"_unknown_"),o._currUri&&(o._prevUri=o._currUri),o._currUri=d&&d.href||"",setTimeout(function(e){I.trackPageView({refUri:e,properties:{duration:0}})}.bind(o,o._prevUri),I.autoRoutePVDelay)}))}this.setInitialized(!0)}},Kn.prototype.trackPageVisitTime=function(e,t,n){var r={PageName:e,PageUrl:t};this.trackMetric({name:"PageVisitTime",average:n,max:n,min:n,sampleCount:1},r)},Kn.prototype._addDefaultTelemetryInitializers=function(e){if(!e.isBrowserLinkTrackingEnabled()){var r=["/browserLinkSignalR/","/__browserLink/"];this._addTelemetryInitializer(function(e){if(e.baseType===vn.dataType){var t=e.baseData;if(t)for(var n=0;n<r.length;n++)if(t.target&&0<=t.target.indexOf(r[n]))return!1}return!0})}},Kn.prototype._addTelemetryInitializer=function(e){this._telemetryInitializers.push(e)},Kn.prototype._sendCORSException=function(e){var t={message:"Script error: The browser's same-origin policy prevents us from getting the details of this exception. Consider using the 'crossorigin' attribute.",url:e,lineNumber:0,columnNumber:0,error:undefined},n=On.create(t,jt.dataType,jt.envelopeType,this.diagLog(),{url:e});this.core.track(n)},Kn.Version="2.4.4",Kn);function Kn(){var e=Hn.call(this)||this;e.identifier="ApplicationInsightsAnalytics",e.priority=180,e.autoRoutePVDelay=500,e._trackAjaxAttempts=0;var t=_();return e._prevUri=t&&t.href||"",e}var Qn=(Jn.prototype.start=function(e){"undefined"!=typeof this._events[e]&&this._logger.throwInternal(B.WARNING,Te,"start was called more than once for this event without calling stop.",{name:this._name,key:e},!0),this._events[e]=+new Date},Jn.prototype.stop=function(e,t,n,r){var i=this._events[e];if(isNaN(i))this._logger.throwInternal(B.WARNING,Se,"stop was called without a corresponding start.",{name:this._name,key:e},!0);else{var a=+new Date,o=St.GetDuration(i,a);this.action(e,t,o,n,r)}delete this._events[e],this._events[e]=undefined},Jn);function Jn(e,t){this._name=t,this._events={},this._logger=e}e.ApplicationInsights=Xn,function(e,t,n){var r=Object.defineProperty;if(r)try{return r(e,t,n)}catch(i){}typeof n.value!==undefined&&(e[t]=n.value)}(e,"__esModule",{value:!0})});
//# sourceMappingURL=applicationinsights-analytics-js.min.js.map
{
"name": "@microsoft/applicationinsights-analytics-js",
"version": "2.4.3",
"version": "2.4.4",
"description": "Microsoft Application Insights Javascript SDK apis",

@@ -22,3 +22,3 @@ "main": "dist/applicationinsights-analytics-js.js",

"@microsoft/applicationinsights-rollup-es3" : "1.1.1",
"@microsoft/applicationinsights-properties-js": "2.4.3",
"@microsoft/applicationinsights-properties-js": "2.4.4",
"typescript": "2.5.3",

@@ -37,4 +37,4 @@ "rollup-plugin-node-resolve": "^3.4.0",

"dependencies": {
"@microsoft/applicationinsights-core-js": "2.4.3",
"@microsoft/applicationinsights-common": "2.4.3",
"@microsoft/applicationinsights-core-js": "2.4.4",
"@microsoft/applicationinsights-common": "2.4.4",
"tslib": "^1.9.3"

@@ -41,0 +41,0 @@ },

@@ -30,6 +30,2 @@ /**

declare global {
interface Window { onunhandledrejection: ((this: Window, ev: PromiseRejectionEvent) => any) | null; }
}
const durationProperty: string = "duration";

@@ -44,3 +40,3 @@

export class ApplicationInsights extends BaseTelemetryPlugin implements IAppInsights, IAppInsightsInternal {
public static Version = "2.4.3"; // Not currently used anywhere
public static Version = "2.4.4"; // Not currently used anywhere

@@ -59,3 +55,3 @@ public static getDefaultConfig(config?: IConfig): IConfig {

config.enableUnhandledPromiseRejectionTracking = Util.stringToBoolOrDefault(config.enableUnhandledPromiseRejectionTracking);
if (isNaN(config.samplingPercentage) || config.samplingPercentage <= 0 || config.samplingPercentage >= 100) {

@@ -603,3 +599,3 @@ config.samplingPercentage = 100;

const originalOnUnhandledRejection = _window[onunhandledrejection];
_window.onunhandledrejection = (error: PromiseRejectionEvent) => {
_window[onunhandledrejection] = (error: PromiseRejectionEvent) => {
const handled = originalOnUnhandledRejection && (originalOnUnhandledRejection.call(_window, error) as any);

@@ -654,3 +650,3 @@ if (handled !== true) { // handled could be typeof function

});
_window.addEventListener(_self.config.namePrefix + "locationchange", () => {

@@ -657,0 +653,0 @@ if (_self._properties && _self._properties.context && _self._properties.context.telemetryTrace) {

@@ -10,7 +10,2 @@ /**

import { PageViewPerformanceManager } from './Telemetry/PageViewPerformanceManager';
declare global {
interface Window {
onunhandledrejection: ((this: Window, ev: PromiseRejectionEvent) => any) | null;
}
}
export declare class ApplicationInsights extends BaseTelemetryPlugin implements IAppInsights, IAppInsightsInternal {

@@ -17,0 +12,0 @@ static Version: string;

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

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc