@microsoft/applicationinsights-channel-js 2.7.3 → 2.7.4-nightly.2202-03
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/browser/applicationinsights-channel-js.integrity.json +9 -9
- package/browser/applicationinsights-channel-js.js +74 -54
- package/browser/applicationinsights-channel-js.js.map +1 -1
- package/browser/applicationinsights-channel-js.min.js +2 -2
- package/browser/applicationinsights-channel-js.min.js.map +1 -1
- package/dist/applicationinsights-channel-js.d.ts +1 -1
- package/dist/applicationinsights-channel-js.js +74 -54
- package/dist/applicationinsights-channel-js.js.map +1 -1
- package/dist/applicationinsights-channel-js.min.js +2 -2
- package/dist/applicationinsights-channel-js.min.js.map +1 -1
- package/dist/applicationinsights-channel-js.rollup.d.ts +1 -1
- package/dist-esm/EnvelopeCreator.js +2 -2
- package/dist-esm/EnvelopeCreator.js.map +1 -1
- package/dist-esm/Interfaces.js +1 -1
- package/dist-esm/Offline.js +1 -1
- package/dist-esm/SendBuffer.js +1 -1
- package/dist-esm/Sender.js +1 -1
- package/dist-esm/Serializer.js +1 -1
- package/dist-esm/TelemetryProcessors/Sample.js +1 -1
- package/dist-esm/TelemetryProcessors/SamplingScoreGenerators/HashCodeScoreGenerator.js +1 -1
- package/dist-esm/TelemetryProcessors/SamplingScoreGenerators/SamplingScoreGenerator.js +1 -1
- package/dist-esm/applicationinsights-channel-js.js +1 -1
- package/package.json +57 -54
- package/src/EnvelopeCreator.ts +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Application Insights JavaScript SDK - Channel, 2.7.
|
|
2
|
+
* Application Insights JavaScript SDK - Channel, 2.7.4-nightly.2202-03
|
|
3
3
|
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
4
4
|
*/
|
|
5
|
-
var e=this,t=function(n){"use strict";var o="function",s="object",i="undefined",a="prototype",l="hasOwnProperty",r=Object,u=r[a],m=r.assign,h=r.create,e=r.defineProperty,v=u[l],y=null;function I(e){return void 0===e&&(e=!0),y&&e||(typeof globalThis!==i&&globalThis&&(y=globalThis),typeof self!==i&&self&&(y=self),typeof window!==i&&window&&(y=window),typeof global!==i&&global&&(y=global)),y}function C(e){throw new TypeError(e)}(I()||{}).Symbol,(I()||{}).Reflect;var S=m||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])u[l].call(t,i)&&(e[i]=t[i]);return e},T=function(e,t){return(T=r.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t[l](n)&&(e[n]=t[n])})(e,t)};function t(e,t){function n(){this.constructor=e}typeof t!==o&&null!==t&&C("Class extends value "+t+" is not a constructor or null"),T(e,t),e[a]=null===t?function(e){if(h)return h(e);if(null==e)return{};var t=typeof e;function n(){}return t!==s&&t!==o&&C("Object prototype may only be an Object:"+e),n[a]=e,new n}(t):(n[a]=t[a],new n)}var w="constructor",b="prototype",x="function",N="_dynInstFuncs",_="_isDynProxy",R="_dynClass",A="_dynInstChk",L=A,F="_dfOpts",E="_unknown_",k="__proto__",P="useBaseInst",O="setInstFuncs",U=Object,z=U.getPrototypeOf,j=0;function K(e,t){return e&&U[b].hasOwnProperty.call(e,t)}function q(e){return e&&(e===U[b]||e===Array[b])}function V(e){return q(e)||e===Function[b]}function G(e){if(e){if(z)return z(e);e=e[k]||e[b]||(e[w]?e[w][b]:null);if(e)return e}return null}function W(e,t){var n=[],r=U.getOwnPropertyNames;if(r)n=r(e);else for(var i in e)"string"==typeof i&&K(e,i)&&n.push(i);if(n&&0<n.length)for(var a=0;a<n.length;a++)t(n[a])}function H(e,t,n){return t!==w&&typeof e[t]===x&&(n||K(e,t))}function X(e){throw new TypeError("DynamicProto: "+e)}function Y(e,t){for(var n=e.length-1;0<=n;n--)if(e[n]===t)return 1}function J(e,t){return K(e,b)?e.name||t||E:((e||{})[w]||{}).name||t||E}function Z(e,r,t,n){K(e,b)||X("theClass is an invalid class definition.");var c,i,a,o,f,d,s=e[b],l=(function(e){if(z)for(var t=[],n=G(r);n&&!V(n)&&!Y(t,n);){if(n===e)return 1;t.push(n),n=G(n)}}(s)||X("["+J(e)+"] is not in class hierarchy of ["+J(r)+"]"),null),e=(K(s,R)?l=s[R]:(l="_dynCls$"+J(e,"_")+"$"+j,j++,s[R]=l),Z[F]),u=!!e[P],p=(u&&n&&n[P]!==undefined&&(u=!!n[P]),i={},W(c=r,function(e){!i[e]&&H(c,e,!1)&&(i[e]=c[e])}),i),u=(t(r,function(e,t,n,a){function r(e,t,n){var r,i=t[n];return i[_]&&a&&!1!==(r=e[N]||{})[L]&&(i=(r[t[R]]||{})[n]||i),function(){return i.apply(e,arguments)}}for(var i={},o=(W(n,function(e){i[e]=r(t,n,e)}),G(e)),s=[];o&&!V(o)&&!Y(s,o);)W(o,function(e){!i[e]&&H(o,e,!z)&&(i[e]=r(t,o,e))}),s.push(o),o=G(o);return i}(s,r,p,u)),!!z&&!!e[O]);a=s,t=l,o=r,f=p,e=!1!==(u=u&&n?!!n[O]:u),q(a)||(s=o[N]=o[N]||{},d=s[t]=s[t]||{},!1!==s[L]&&(s[L]=!!e),W(o,function(e){var n,r,i;H(o,e,!1)&&o[e]!==f[e]&&(d[e]=o[e],delete o[e],K(a,e)&&(!a[e]||a[e][_])||(a[e]=(n=a,r=e,(i=function(){var e,t;return(function(e,t,n,c){var r=null;if(e&&K(n,R)){var i=e[N]||{};if((r=(i[n[R]]||{})[t])||X("Missing ["+t+"] "+x),!r[A]&&!1!==i[L]){for(var a=!K(e,t),o=G(e),s=[];a&&o&&!V(o)&&!Y(s,o);){var l=o[t];if(l){a=l===c;break}s.push(o),o=G(o)}try{a&&(e[t]=r),r[A]=1}catch(u){i[L]=!1}}}return r}(this,r,n,i)||(typeof(t=(t=n[e=r])===i?G(n)[e]:t)!==x&&X("["+e+"] is not a "+x),t)).apply(this,arguments)})[_]=1,i)))}))}Z[F]={setInstFuncs:!0,useBaseInst:!0},(ot=M=M||{})[ot.CRITICAL=1]="CRITICAL",ot[ot.WARNING=2]="WARNING";var M,D={BrowserDoesNotSupportLocalStorage:0,BrowserCannotReadLocalStorage:1,BrowserCannotReadSessionStorage:2,BrowserCannotWriteLocalStorage:3,BrowserCannotWriteSessionStorage:4,BrowserFailedRemovalFromLocalStorage:5,BrowserFailedRemovalFromSessionStorage:6,CannotSendEmptyTelemetry:7,ClientPerformanceMathError:8,ErrorParsingAISessionCookie:9,ErrorPVCalc:10,ExceptionWhileLoggingError:11,FailedAddingTelemetryToBuffer:12,FailedMonitorAjaxAbort:13,FailedMonitorAjaxDur:14,FailedMonitorAjaxOpen:15,FailedMonitorAjaxRSC:16,FailedMonitorAjaxSend:17,FailedMonitorAjaxGetCorrelationHeader:18,FailedToAddHandlerForOnBeforeUnload:19,FailedToSendQueuedTelemetry:20,FailedToReportDataLoss:21,FlushFailed:22,MessageLimitPerPVExceeded:23,MissingRequiredFieldSpecification:24,NavigationTimingNotSupported:25,OnError:26,SessionRenewalDateIsZero:27,SenderNotInitialized:28,StartTrackEventFailed:29,StopTrackEventFailed:30,StartTrackFailed:31,StopTrackFailed:32,TelemetrySampledAndNotSent:33,TrackEventFailed:34,TrackExceptionFailed:35,TrackMetricFailed:36,TrackPVFailed:37,TrackPVFailedCalc:38,TrackTraceFailed:39,TransmissionFailed:40,FailedToSetStorageBuffer:41,FailedToRestoreStorageBuffer:42,InvalidBackendResponse:43,FailedToFixDepricatedValues:44,InvalidDurationValue:45,TelemetryEnvelopeInvalid:46,CreateEnvelopeError:47,CannotSerializeObject:48,CannotSerializeObjectNonSerializable:49,CircularReferenceDetected:50,ClearAuthContextFailed:51,ExceptionTruncated:52,IllegalCharsInName:53,ItemNotInArray:54,MaxAjaxPerPVExceeded:55,MessageTruncated:56,NameTooLong:57,SampleRateOutOfRange:58,SetAuthContextFailed:59,SetAuthContextFailedAccountName:60,StringValueTooLong:61,StartCalledMoreThanOnce:62,StopCalledWithoutStart:63,TelemetryInitializerFailed:64,TrackArgumentsNotSpecified:65,UrlTooLong:66,SessionStorageBufferFull:67,CannotAccessCookie:68,IdTooLong:69,InvalidEvent:70,FailedMonitorAjaxSetRequestHeader:71,SendBrowserInfoOnUserInit:72,PluginException:73,NotificationException:74,SnippetScriptLoadFailure:99,InvalidInstrumentationKey:100,CannotParseAiBlobValue:101,InvalidContentBlob:102,TrackPageActionEventFailed:103,FailedAddingCustomDefinedRequestContext:104,InMemoryStorageBufferFull:105},$="on",Q="attachEvent",ee="addEventListener",te="toISOString",ne=e;function re(e){return u.toString.call(e)}function ie(e){return e===undefined||typeof e===i}function B(e){return null===e||ie(e)}function ae(e){return typeof e===s}function oe(e){return typeof e===o}function se(e,t,n,r){void 0===r&&(r=!1);var i=!1;if(!B(e))try{B(e[ee])?B(e[Q])||(e[Q]($+t,n),i=!0):(e[ee](t,n,r),i=!0)}catch(a){}return i}function le(e,t){if(e)for(var n in e)v.call(e,n)&&t.call(e,n,e[n])}function ue(e,t){return e&&t&&~e.indexOf(t)}function ce(e){return"[object Array]"===re(e)}function fe(e){return"[object Error]"===re(e)}function de(e){return"string"==typeof e}function pe(e){var t;if(e)return e[te]?e[te]():"[object Date]"===re(e)?(t=function(e){e=""+e;return 1===e.length?"0"+e:e},e.getUTCFullYear()+"-"+t(1+e.getUTCMonth())+"-"+t(e.getUTCDate())+"T"+t(e.getUTCHours())+":"+t(e.getUTCMinutes())+":"+t(e.getUTCSeconds())+"."+(""+(e.getUTCMilliseconds()/1e3).toFixed(3)).slice(2,5)+"Z"):void 0}function ge(e,t,n){var r=e.length;try{for(var i=0;i<r&&!(i in e&&-1===t.call(n||e,e[i],i,e));i++);}catch(a){}}function me(e,t,n){var r=e.length,i=n||e,a=Array(r);try{for(var o=0;o<r;o++)o in e&&(a[o]=t.call(i,e[o],e))}catch(s){}return a}function he(e){return"string"!=typeof e?e:e.replace(/^\s+|\s+$/g,"")}var ve=!{toString:null}.propertyIsEnumerable("toString"),ye=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"];function Ie(e){var t,n=typeof e,r=(n===o||n===s&&null!==e||C("objKeys called on non-object"),[]);for(t in e)e&&v.call(e,t)&&r.push(t);if(ve)for(var i=ye.length,a=0;a<i;a++)e&&v.call(e,ye[a])&&r.push(ye[a]);return r}function Ce(){var e=Date;return e.now?e.now():(new e).getTime()}function Se(e){return fe(e)?e.name:""}function Te(e,t,n,r,i){var a=n;return e&&((a=e[t])===n||i&&!i(a)||r&&!r(n)||(e[t]=a=n)),a}function we(e){return!!e}function be(e){return e&&r(m?m({},e):e)}var xe="window",Ne="navigator",_e="JSON",Re="trident/",Ae=null,Le=null;function Fe(e,t){var n,r=!1;if(e){try{(r=t in e)||(n=e[a])&&(r=t in n)}catch(i){}if(!r)try{r=!ie((new e)[t])}catch(i){}}return r}function Ee(e){var t=I();return t&&t[e]?t[e]:e===xe&&Me()?window:null}function Me(){return typeof window===s&&window}function De(){return Me()?window:Ee(xe)}function Be(){return typeof document===s&&document?document:Ee("document")}function ke(){return!(typeof navigator!==s||!navigator)}function Pe(){return ke()?navigator:Ee(Ne)}function Oe(){return typeof JSON===s&&JSON||null!==Ee(_e)}function Ue(){return Oe()?JSON||Ee(_e):null}function ze(e){var t=Object[a].toString.call(e),n="";return"[object Error]"===t?n="{ stack: '"+e.stack+"', message: '"+e.message+"', name: '"+e.name+"'":Oe()&&(n=Ue().stringify(e)),t+n}function je(){return Le=null===Le?ke()&&!!Pe().sendBeacon:Le}function Ke(e){var t=!1;try{var t=!!Ee("fetch"),n=Ee("Request");t&&e&&n&&(t=Fe(n,"keepalive"))}catch(r){}return t}function qe(){return Ae=null===Ae&&(Ae="undefined"!=typeof XDomainRequest)&&Ve()?Ae&&!Fe(Ee("XMLHttpRequest"),"withCredentials"):Ae}function Ve(){var e=!1;try{e=!!Ee("XMLHttpRequest")}catch(t){}return e}var Ge=null;function We(e){return e?'"'+e.replace(/\"/g,"")+'"':""}function He(e,t){var n,r=typeof console!==i?console:Ee("console");r&&(n="log",oe(r[n=r[e]?e:n])&&r[n](t))}Ye.dataType="MessageData";var Xe=Ye;function Ye(e,t,n,r){void 0===n&&(n=!1),this.messageId=e,this.message=(n?"AI: ":"AI (Internal): ")+e;n="",Oe()&&(n=Ue().stringify(r)),e=(t?" message:"+We(t):"")+(r?" props:"+We(n):"");this.message+=e}function Je(e,t){return(e||{}).logger||new Ze(t)}var Ze=function Cr(i){this.identifier="DiagnosticLogger",this.queue=[];var s=0,l={};Z(Cr,this,function(a){function e(e,t){e=i[e];return B(e)?t:e}function o(e,t){var n,r=(n=(n=Ge)||!0===i.disableDbgExt?n:Ge||(r=Ee("Microsoft"),Ge=r?r.ApplicationInsights:Ge))?n.ChromeDbgExt:null;r&&r.diagLog&&r.diagLog(e,t)}B(i)&&(i={}),a.consoleLoggingLevel=function(){return e("loggingLevelConsole",0)},a.telemetryLoggingLevel=function(){return e("loggingLevelTelemetry",1)},a.maxInternalMessageLimit=function(){return e("maxMessageLimit",25)},a.enableDebugExceptions=function(){return e("enableDebugExceptions",!1)},a.throwInternal=function(e,t,n,r,i){t=new Xe(t,n,i=void 0!==i&&i,r);if(a.enableDebugExceptions())throw t;n=e===M.CRITICAL?"errorToConsole":"warnToConsole";ie(t.message)?o("throw"+(e===M.CRITICAL?"Critical":"Warning"),t):(r=a.consoleLoggingLevel(),i?(i=+t.messageId,!l[i]&&e<=r&&(a[n](t.message),l[i]=!0)):e<=r&&a[n](t.message),a.logInternalMessage(e,t))},a.warnToConsole=function(e){He("warn",e),o("warning",e)},a.errorToConsole=function(e){He("error",e),o("error",e)},a.resetInternalMessageCount=function(){s=0,l={}},a.logInternalMessage=function(e,t){var n,r;s>=a.maxInternalMessageLimit()||(r=!0,n="AITR_"+t.messageId,l[n]?r=!1:l[n]=!0,r&&(e<=a.telemetryLoggingLevel()&&(a.queue.push(t),s++,o(e===M.CRITICAL?"error":"warn",t)),s===a.maxInternalMessageLimit()&&(r=new Xe(D.MessageLimitPerPVExceeded,n="Internal events throttle limit per PageView reached for this app.",!1),a.queue.push(r),e===M.CRITICAL?a.errorToConsole(n):a.warnToConsole(n))))}})},$e=(Qe.ParentContextKey="parent",Qe.ChildrenContextKey="childEvts",Qe);function Qe(e,i,t){var r,a=this,o=!1;a.start=Ce(),a.name=e,a.isAsync=t,a.isChildEvt=function(){return!1},oe(i)&&(o=function(e){if(ne)try{var t={enumerable:!0,configurable:!0,get:function(){return!r&&oe(i)&&(r=i(),i=null),r}};return ne(e,"payload",t),!0}catch(n){}return!1}(a)),a.getCtx=function(e){return e?(e===Qe.ParentContextKey||e===Qe.ChildrenContextKey?a:a.ctx||{})[e]:null},a.setCtx=function(e,t){e&&(e===Qe.ParentContextKey?(a[e]||(a.isChildEvt=function(){return!0}),a[e]=t):e===Qe.ChildrenContextKey?a[e]=t:(a.ctx=a.ctx||{})[e]=t)},a.complete=function(){var e=0,t=a.getCtx(Qe.ChildrenContextKey);if(ce(t))for(var n=0;n<t.length;n++){var r=t[n];r&&(e+=r.time)}a.time=Ce()-a.start,a.exTime=a.time-e,a.complete=function(){},!o&&oe(i)&&(a.payload=i())}}var et="CoreUtils.doPerf";function tt(e,t,n,r,i){if(e)if(e=oe(e.getPerfMgr)?e.getPerfMgr():e){var a,o=void 0,s=e.getCtx(et);try{if(o=e.create(t(),r,i))return s&&o.setCtx&&(o.setCtx($e.ParentContextKey,s),s.getCtx&&s.setCtx&&((a=s.getCtx($e.ChildrenContextKey))||(a=[],s.setCtx($e.ChildrenContextKey,a)),a.push(o))),e.setCtx(et,o),n(o)}catch(l){o&&o.setCtx&&o.setCtx("exception",l)}finally{o&&e.fire(o),e.setCtx(et,s)}}return n()}var nt=function(i,t){var a=this,o=null,s=oe(i.processTelemetry),l=oe(i.setNextPlugin);a._hasRun=!1,a.getPlugin=function(){return i},a.getNext=function(){return o},a.setNext=function(e){o=e},a.processTelemetry=function(n,r){r=r||t;var e=i?i.identifier:"TelemetryPluginChain";tt(r?r.core():null,function(){return e+":processTelemetry"},function(){if(i&&s){a._hasRun=!0;try{r.setNext(o),l&&i.setNextPlugin(o),o&&(o._hasRun=!1),i.processTelemetry(n,r)}catch(t){var e=o&&o._hasRun;o&&e||r.diagLog().throwInternal(M.CRITICAL,D.PluginException,"Plugin ["+i.identifier+"] failed during processTelemetry - "+ze(t)),o&&!e&&o.processTelemetry(n,r)}}else o&&(a._hasRun=!0,o.processTelemetry(n,r))},function(){return{item:n}},!n.sync)}};function rt(e,t){var n=[];if(e&&0<e.length)for(var r=null,i=0;i<e.length;i++){var a=e[i];a&&oe(a.processTelemetry)&&(a=new nt(a,t),n.push(a),r&&r.setNext(a),r=a)}return 0<n.length?n[0]:null}var it=function Sr(e,i,n,t){var r,a,o,s,l=this,u=null;null!==t&&(e&&oe(e.getPlugin)?u=function(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),rt(r,t)}(e,l,t||e.getPlugin()):t?(r=l,o=e,s=!1,(a=t)&&e&&(o=[],ge(e,function(e){!s&&e!==a||(s=!0,o.push(e))})),a&&!s&&(o=o||[]).push(a),u=rt(o,r)):ie(t)&&(u=rt(e,l))),l.core=function(){return n},l.diagLog=function(){return Je(n,i)},l.getCfg=function(){return i},l.getExtCfg=function(e,t){var n,r;return void 0===t&&(t={}),!i||(r=i.extensionConfig)&&e&&(n=r[e]),n||t},l.getConfig=function(e,t,n){void 0===n&&(n=!1);var r,e=l.getExtCfg(e,null);return e&&!B(e[t])?r=e[t]:i&&!B(i[t])&&(r=i[t]),B(r)?n:r},l.hasNext=function(){return null!=u},l.getNext=function(){return u},l.setNext=function(e){u=e},l.processNext=function(e){var t=u;t&&(u=t.getNext(),t.processTelemetry(e,l))},l.createNew=function(e,t){return new Sr((e=void 0===e?null:e)||u,i,n,t)}},at="getPlugin",ot=(st.prototype.initialize=function(e,t,n,r){this._baseTelInit(e,t,n,r)},st);function st(){var a=this,o=!1,s=null,l=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){l=e},a.processNext=function(e,t){t?t.processNext(e):l&&oe(l.processTelemetry)&&l.processTelemetry(e,null)},a._getTelCtx=function(e){var t,e=e=void 0===e?null:e;return e||(t=s||new it(null,{},a.core),e=l&&l[at]?t.createNew(null,l[at]):t.createNew(null,l)),e},a._baseTelInit=function(e,t,n,r){e&&Te(e,"extensionConfig",[],null,B),!r&&t&&(r=t.getProcessTelContext().getNext());var i=l;l&&l[at]&&(i=l[at]()),a.core=t,s=new it(r,e,t,i),o=!0}}function lt(e,t,n){var r,i,a=t.length,o=(e=e,(t=t)&&150<(t=he(t.toString())).length&&(i=t.substring(0,150),e&&e.throwInternal(M.WARNING,D.NameTooLong,"name is too long. It has been truncated to 150 characters.",{name:t},!0)),i||t);if(o.length!==a){for(var s=0,l=o;n[l]!==undefined;)s++,l=o.substring(0,147)+(r=void 0,(r="00"+s).substr(r.length-3));o=l}return o}function ut(e,t,n){var r;return void 0===n&&(n=1024),t&&(n=n||1024,(t=he(t)).toString().length>n&&(r=t.toString().substring(0,n),e&&e.throwInternal(M.WARNING,D.StringValueTooLong,"string value is too long. It has been truncated to "+n+" characters.",{value:t},!0))),r||t}function ct(e,t){return gt(e,t,2048,D.UrlTooLong)}function ft(e,t){var n;return t&&32768<t.length&&(n=t.substring(0,32768),e&&e.throwInternal(M.WARNING,D.MessageTruncated,"message is too long, it has been truncated to 32768 characters.",{message:t},!0)),n||t}function dt(r,e){var i;return e&&(i={},le(e,function(e,t){if(ae(t)&&Oe())try{t=Ue().stringify(t)}catch(n){r&&r.throwInternal(M.WARNING,D.CannotSerializeObjectNonSerializable,"custom property is not valid",{exception:n},!0)}t=ut(r,t,8192),e=lt(r,e,i),i[e]=t}),e=i),e}function pt(n,e){var r;return e&&(r={},le(e,function(e,t){e=lt(n,e,r),r[e]=t}),e=r),e}function gt(e,t,n,r){var i;return t&&(t=he(t)).length>n&&(i=t.substring(0,n),e&&e.throwInternal(M.WARNING,r,"input is too long, it has been truncated to "+n+" characters.",{data:t},!0)),i||t}function mt(e){var t=""+Math.floor((e=Math.round(e=isNaN(e)||e<0?0:e))/1e3)%60,n=""+Math.floor(e/6e4)%60,r=""+Math.floor(e/36e5)%24,i=Math.floor(e/864e5),e=1===(e=""+e%1e3).length?"00"+e:2===e.length?"0"+e:e,t=t.length<2?"0"+t:t,n=n.length<2?"0"+n:n;return(0<i?i+".":"")+(r=r.length<2?"0"+r:r)+":"+n+":"+t+"."+e}var ht,vt="Microsoft_ApplicationInsights_BypassAjaxInstrumentation",yt="sampleRate",It="ProcessLegacy",Ct="http.method",St="not_specified",Tt=((e=ht=ht||{})[e.LocalStorage=0]="LocalStorage",e[e.SessionStorage=1]="SessionStorage",undefined);function wt(e){try{if(B(I()))return null;var t=new Date,n=Ee(e===ht.LocalStorage?"localStorage":"sessionStorage"),r=(n.setItem(t.toString(),t.toString()),n.getItem(t.toString())!==t.toString());if(n.removeItem(t.toString()),!r)return n}catch(i){}return null}function bt(){return xt()?wt(ht.SessionStorage):null}function xt(){return Tt=Tt===undefined?!!wt(ht.SessionStorage):Tt}function Nt(e,t){var n=bt();if(null!==n)try{return n.getItem(t)}catch(r){Tt=!1,e.throwInternal(M.WARNING,D.BrowserCannotReadSessionStorage,"Browser failed read of session storage. "+Se(r),{exception:ze(r)})}return null}function _t(e,t,n){var r=bt();if(null!==r)try{return r.setItem(t,n),1}catch(i){Tt=!1,e.throwInternal(M.WARNING,D.BrowserCannotWriteSessionStorage,"Browser failed write to session storage. "+Se(i),{exception:ze(i)})}}var Rt=Be()||{},At=0,Lt=[null,null,null,null,null];var Ft=["https://dc.services.visualstudio.com/v2/track","https://breeze.aimon.applicationinsights.io/v2/track","https://dc-int.services.visualstudio.com/v2/track"];function Et(e){return~Ft.indexOf(e.toLowerCase())}t(Dt,Mt=function(){});var Mt,e=Dt;function Dt(){return Mt.call(this)||this}t(Pt,Bt=function(){this.ver=1,this.sampleRate=100,this.tags={}});var Bt,kt=Pt;function Pt(e,t,n){var r=Bt.call(this)||this;return r.name=ut(e,n)||St,r.data=t,r.time=pe(new Date),r.aiDataContract={time:1,iKey:1,name:1,sampleRate:function(){return 100===r.sampleRate?4:1},tags:1,data:1},r}var Ot,Ut=function(){this.ver=2,this.properties={},this.measurements={}},zt=(t(jt,Ot=Ut),jt.envelopeType="Microsoft.ApplicationInsights.{0}.Event",jt.dataType="EventData",jt);function jt(e,t,n,r){var i=Ot.call(this)||this;return i.aiDataContract={ver:1,name:1,properties:0,measurements:0},i.name=ut(e,t)||St,i.properties=dt(e,n),i.measurements=pt(e,r),i}var Kt="error",qt="stack",Vt="stackDetails",Gt="errorSrc",Wt="message",Ht="description";function Xt(e,t){var n=e;return n&&!de(n)&&(JSON&&JSON.stringify?(n=JSON.stringify(e),!t||n&&"{}"!==n||(n=oe(e.toString)?e.toString():""+e)):n=e+" - (Missing JSON.stringify)"),n||""}function Yt(e,t){var n=e;return e&&((n=n&&!de(n)&&(e[Wt]||e[Ht])||n)&&!de(n)&&(n=Xt(n,!0)),e.filename&&(n=n+" @"+(e.filename||"")+":"+(e.lineno||"?")+":"+(e.colno||"?"))),(t&&"String"!==t&&"Object"!==t&&"Error"!==t&&!~(n||"").indexOf(t)?t+": "+n:n)||""}function Jt(e){return e&&e.src&&de(e.src)&&e.obj&&ce(e.obj)}function Zt(e){var e=e||"",t=(e=de(e)?e:de(e[qt])?e[qt]:""+e).split("\n");return{src:e,obj:t}}function $t(e){var t,n=null;if(e)try{e[qt]?n=Zt(e[qt]):e[Kt]&&e[Kt][qt]?n=Zt(e[Kt][qt]):e.exception&&e.exception[qt]?n=Zt(e.exception[qt]):Jt(e)?n=e:Jt(e[Vt])?n=e[Vt]:window&&window.opera&&e[Wt]?n=function(e){for(var t=[],n=e.split("\n"),r=0;r<n.length;r++){var i=n[r];n[r+1]&&(i+="@"+n[r+1],r++),t.push(i)}return{src:e,obj:t}}(e.message):de(e)?n=Zt(e):(t=e[Wt]||e[Ht]||"",de(e[Gt])&&(t&&(t+="\n"),t+=" from "+e[Gt]),t&&(n=Zt(t)))}catch(r){n=Zt(r)}return n||{src:"",obj:null}}function Qt(e){var t="";if(e&&!(t=e.typeName||e.name||""))try{var n=/function (.{1,200})\(/.exec(e.constructor.toString()),t=n&&1<n.length?n[1]:""}catch(r){}return t}function en(e){if(e)try{var t,n;if(!de(e))return t=Qt(e),(n=Xt(e,!1))&&"{}"!==n||(e[Kt]&&(t=Qt(e=e[Kt])),n=Xt(e,!0)),n.indexOf(t)&&"String"!==t?t+":"+n:n}catch(r){}return""+(e||"")}t(rn,tn=function(){this.ver=2,this.exceptions=[],this.properties={},this.measurements={}}),rn.CreateAutoException=function(e,t,n,r,i,a,o,s){var l=Qt(i||a||e);return{message:Yt(e,l),url:t,lineNumber:n,columnNumber:r,error:en(i||a||e),evt:en(a||e),typeName:l,stackDetails:$t(o||i||a),errorSrc:s}},rn.CreateFromInterface=function(t,e,n,r){var i=e.exceptions&&me(e.exceptions,function(e){return on.CreateFromInterface(t,e)});return new rn(t,S(S({},e),{exceptions:i}),n,r)},rn.prototype.toInterface=function(){var e=this,t=e.exceptions,n=e.properties,r=e.measurements,i=e.severityLevel,a=e.problemGroup,o=e.id,e=e.isManual;return{ver:"4.0",exceptions:t instanceof Array&&me(t,function(e){return e.toInterface()})||undefined,severityLevel:i,properties:n,measurements:r,problemGroup:a,id:o,isManual:e}},rn.CreateSimpleException=function(e,t,n,r,i,a){return{exceptions:[{hasFullStack:!0,message:e,stack:i,typeName:t}]}},rn.envelopeType="Microsoft.ApplicationInsights.{0}.Exception",rn.dataType="ExceptionData",rn.formatError=en;var tn,nn=rn;function rn(e,t,n,r,i,a){var o=tn.call(this)||this;return o.aiDataContract={ver:1,exceptions:1,severityLevel:0,properties:0,measurements:0},function(e){try{if(ae(e))return"ver"in e&&"exceptions"in e&&"properties"in e}catch(t){}}(t)?(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,B(t.isManual)||(o.isManual=t.isManual)):(o.exceptions=[new on(e,t,n=n||{})],o.properties=dt(e,n),o.measurements=pt(e,r),i&&(o.severityLevel=i),a&&(o.id=a)),o}t(sn,an=function(){this.hasFullStack=!0,this.parsedStack=[]}),sn.prototype.toInterface=function(){var e=this.parsedStack instanceof Array&&me(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[qt],parsedStack:e||undefined}},sn.CreateFromInterface=function(e,t){var n=t.parsedStack instanceof Array&&me(t.parsedStack,function(e){return cn.CreateFromInterface(e)})||t.parsedStack;return new sn(e,S(S({},t),{parsedStack:n}))};var an,on=sn;function sn(e,t,n){var u,r,i,a,o,s=an.call(this)||this;return s.aiDataContract={id:0,outerId:0,typeName:1,message:1,hasFullStack:0,stack:0,parsedStack:2},function(e){try{if(ae(e))return"hasFullStack"in e&&"typeName"in e}catch(t){}}(t)?(s.typeName=t.typeName,s.message=t.message,s[qt]=t[qt],s.parsedStack=t.parsedStack,s.hasFullStack=t.hasFullStack):(r=(a=t)&&a.evt,fe(a)||(a=a[Kt]||r||a),s.typeName=ut(e,Qt(a))||St,s.message=ft(e,Yt(t||a,s.typeName))||St,u=t[Vt]||$t(t),s.parsedStack=function(){var e=u.obj;if(e&&0<e.length){var t=[],n=0,r=0;if(ge(e,function(e){var e=e.toString();cn.regex.test(e)&&(e=new cn(e,n++),r+=e.sizeInBytes,t.push(e))}),32768<r)for(var i=0,a=t.length-1,o=0,s=i,l=a;i<a;){if(32768<(o+=t[i].sizeInBytes+t[a].sizeInBytes)){t.splice(s,l-s+1);break}s=i,l=a,i++,a--}}return t}(),s[qt]=(r=e,o="",(a=u)&&(a.obj?ge(a.obj,function(e){o+=e+"\n"}):o=a.src||""),!(t=o)||32768<(e=""+t).length&&(i=e.substring(0,32768),r&&r.throwInternal(M.WARNING,D.ExceptionTruncated,"exception is too long, it has been truncated to 32768 characters.",{exception:t},!0)),i||t),s.hasFullStack=ce(s.parsedStack)&&0<s.parsedStack.length,n&&(n.typeName=n.typeName||s.typeName)),s}t(fn,ln=function(){}),fn.CreateFromInterface=function(e){return new fn(e,null)},fn.prototype.toInterface=function(){return{level:this.level,method:this.method,assembly:this.assembly,fileName:this.fileName,line:this.line}},fn.regex=/^([\s]+at)?[\s]{0,50}([^\@\()]+?)[\s]{0,50}(\@|\()([^\(\n]+):([0-9]+):([0-9]+)(\)?)$/,fn.baseSize=58;var ln,un,cn=fn;function fn(e,t){var n,r=ln.call(this)||this;return r.sizeInBytes=0,r.aiDataContract={level:1,method:1,assembly:0,fileName:0,line:0},"string"==typeof e?(n=e,r.level=t,r.method="<no_method>",r.assembly=he(n),r.fileName="",r.line=0,(t=n.match(fn.regex))&&5<=t.length&&(r.method=he(t[2])||r.method,r.fileName=he(t[4]),r.line=parseInt(t[5])||0)):(r.level=e.level,r.method=e.method,r.assembly=e.assembly,r.fileName=e.fileName,r.line=e.line,r.sizeInBytes=0),r.sizeInBytes+=r.method.length,r.sizeInBytes+=r.fileName.length,r.sizeInBytes+=r.assembly.length,r.sizeInBytes+=fn.baseSize,r.sizeInBytes+=r.level.toString().length,r.sizeInBytes+=r.line.toString().length,r}un=0,t(gn,dn=function(){this.kind=un});var dn,pn=gn;function gn(){var e=null!==dn&&dn.apply(this,arguments)||this;return e.aiDataContract={name:1,kind:0,value:1,count:0,min:0,max:0,stdDev:0},e}t(vn,mn=function(){this.ver=2,this.metrics=[],this.properties={},this.measurements={}}),vn.envelopeType="Microsoft.ApplicationInsights.{0}.Metric",vn.dataType="MetricData";var mn,hn=vn;function vn(e,t,n,r,i,a,o,s,c){var l=mn.call(this)||this,u=(l.aiDataContract={ver:1,metrics:1,properties:0},new pn);return u.count=0<r?r:undefined,u.max=isNaN(a)||null===a?undefined:a,u.min=isNaN(i)||null===i?undefined:i,u.name=ut(e,t)||St,u.value=n,u.stdDev=isNaN(o)||null===o?undefined:o,l.metrics=[u],l.properties=dt(e,s),l.measurements=pt(e,c),l}t(In,yn=Ut);var yn,Ut=In;function In(){var e=yn.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}t(Tn,Cn=Ut),Tn.envelopeType="Microsoft.ApplicationInsights.{0}.Pageview",Tn.dataType="PageviewData";var Cn,Sn=Tn;function Tn(e,t,n,r,i,a,o){var s=Cn.call(this)||this;return s.aiDataContract={ver:1,name:0,url:0,duration:0,properties:0,measurements:0,id:0},s.id=o&>(e,o,128,D.IdTooLong).toString(),s.url=ct(e,n),s.name=ut(e,t)||St,isNaN(r)||(s.duration=mt(r)),s.properties=dt(e,i),s.measurements=pt(e,a),s}t(xn,wn=function(){this.ver=2,this.success=!0,this.properties={},this.measurements={}}),xn.envelopeType="Microsoft.ApplicationInsights.{0}.RemoteDependency",xn.dataType="RemoteDependencyData";var wn,bn=xn;function xn(e,t,n,c,r,f,i,a,o,d,p,g){void 0===o&&(o="Ajax");var m,s,l,u=wn.call(this)||this,n=(u.aiDataContract={id:1,ver:1,name:0,resultCode:0,duration:0,success:0,data:0,target:0,type:0,properties:0,measurements:0,kind:0,value:0,count:0,min:0,max:0,stdDev:0,dependencyKind:0,dependencySource:0,commandName:0,dependencyTypeName:0},u.id=t,u.duration=mt(r),u.success=f,u.resultCode=i+"",u.type=ut(e,o),t=e,r=a,o=i=f=c,i=(a=n)&&0<a.length?(m=a,l=(n=Lt)[s=At],Rt.createElement?n[s]||(l=n[s]=Rt.createElement("a")):l={host:function(){e=null,!m||null!=(n=m.match(/(\w*):\/\/(.[^/:]+)(\:[\d]+)?/i))&&2<n.length&&de(n[2])&&0<n[2].length&&(e=n[2]||"",2<n.length&&(t=(n[1]||"").toLowerCase(),n=n[3]||"",e+=n="http"==t&&":80"===n||"https"==t&&":443"===n?"":n));var e,t=e||"";if(t){var n=t.match(/(www[0-9]?\.)?(.[^/:]+)(\:[\d]+)?/i);if(null!=n&&3<n.length&&de(n[2])&&0<n[2].length)return n[2]+(n[3]||"")}return t}()},l.href=m,++s>=n.length&&(s=0),At=s,s=(n=l).host,i||(null!=n.pathname?("/"!=((l=0===n.pathname.length?"/":n.pathname)[0]||"")&&(l="/"+l),o=n.pathname,ut(t,r?r+" "+l:l)):ut(t,a))):s=f,{target:s,name:i,data:o});return u.data=ct(e,c)||n.data,u.target=ut(e,n.target),d&&(u.target="".concat(u.target," | ").concat(d)),u.name=ut(e,n.name),u.properties=dt(e,p),u.measurements=pt(e,g),u}t(An,Nn=function(){this.ver=2,this.properties={},this.measurements={}}),An.envelopeType="Microsoft.ApplicationInsights.{0}.Message",An.dataType="MessageData";var Nn,_n,Rn=An;function An(e,t,n,r,i){var a=Nn.call(this)||this;return a.aiDataContract={ver:1,message:1,severityLevel:0,properties:0},a.message=ft(e,t=t||St),a.properties=dt(e,r),a.measurements=pt(e,i),n&&(a.severityLevel=n),a}function Ln(){var e=_n.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}t(Ln,_n=Ut),t(Mn,Fn=Ln),Mn.envelopeType="Microsoft.ApplicationInsights.{0}.PageviewPerformance",Mn.dataType="PageviewPerformanceData";var Fn,En=Mn;function Mn(e,t,n,r,i,a,o){var s=Fn.call(this)||this;return s.aiDataContract={ver:1,name:0,url:0,duration:0,perfTotal:0,networkConnect:0,sentRequest:0,receivedResponse:0,domProcessing:0,properties:0,measurements:0},s.url=ct(e,n),s.name=ut(e,t)||St,s.properties=dt(e,i),s.measurements=pt(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}t(kn,Dn=e);var Dn,Bn=kn;function kn(e,t){var n=Dn.call(this)||this;return n.aiDataContract={baseType:1,baseData:1},n.baseType=e,n.baseData=t,n}function Pn(e){var t="ai."+e+".";return function(e){return t+e}}var On,Un,Ut=Pn("application"),e=Pn("device"),zn=Pn("location"),jn=Pn("operation"),Kn=Pn("session"),qn=Pn("user"),Vn=Pn("cloud"),Gn=Pn("internal"),Wn=(Un={applicationVersion:Ut("ver"),applicationBuild:Ut("build"),applicationTypeId:Ut("typeId"),applicationId:Ut("applicationId"),applicationLayer:Ut("layer"),deviceId:e("id"),deviceIp:e("ip"),deviceLanguage:e("language"),deviceLocale:e("locale"),deviceModel:e("model"),deviceFriendlyName:e("friendlyName"),deviceNetwork:e("network"),deviceNetworkName:e("networkName"),deviceOEMName:e("oemName"),deviceOS:e("os"),deviceOSVersion:e("osVersion"),deviceRoleInstance:e("roleInstance"),deviceRoleName:e("roleName"),deviceScreenResolution:e("screenResolution"),deviceType:e("type"),deviceMachineName:e("machineName"),deviceVMName:e("vmName"),deviceBrowser:e("browser"),deviceBrowserVersion:e("browserVersion"),locationIp:zn("ip"),locationCountry:zn("country"),locationProvince:zn("province"),locationCity:zn("city"),operationId:jn("id"),operationName:jn("name"),operationParentId:jn("parentId"),operationRootId:jn("rootId"),operationSyntheticSource:jn("syntheticSource"),operationCorrelationVector:jn("correlationVector"),sessionId:Kn("id"),sessionIsFirst:Kn("isFirst"),sessionIsNew:Kn("isNew"),userAccountAcquisitionDate:qn("accountAcquisitionDate"),userAccountId:qn("accountId"),userAgent:qn("userAgent"),userId:qn("id"),userStoreRegion:qn("storeRegion"),userAuthUserId:qn("authUserId"),userAnonymousUserAcquisitionDate:qn("anonUserAcquisitionDate"),userAuthenticatedUserAcquisitionDate:qn("authUserAcquisitionDate"),cloudName:Vn("name"),cloudRole:Vn("role"),cloudRoleVer:Vn("roleVer"),cloudRoleInstance:Vn("roleInstance"),cloudEnvironment:Vn("environment"),cloudLocation:Vn("location"),cloudDeploymentUnit:Vn("deploymentUnit"),internalNodeName:Gn("nodeName"),internalSdkVersion:Gn("sdkVersion"),internalAgentVersion:Gn("agentVersion"),internalSnippet:Gn("snippet"),internalSdkSrc:Gn("sdkSrc")},t(Hn,On=function(){var n=this;le(Un,function(e,t){n[e]=t})}),Hn);function Hn(){return On.call(this)||this}var Xn,f=new Wn,Ut=function Tr(n,r){var i=[],a=!1;this._get=function(){return i},this._set=function(e){return i=e},Z(Tr,this,function(t){t.enqueue=function(e){t.count()>=r.eventsLimitInMem()?a||(n.throwInternal(M.WARNING,D.InMemoryStorageBufferFull,"Maximum in-memory buffer size reached: "+t.count(),!0),a=!0):i.push(e)},t.count=function(){return i.length},t.size=function(){for(var e=i.length,t=0;t<i.length;t++)e+=i[t].length;return r.emitLineDelimitedJson()||(e+=2),e},t.clear=function(){a=!(i=[])},t.getItems=function(){return i.slice(0)},t.batchPayloads=function(e){return e&&0<e.length?r.emitLineDelimitedJson()?e.join("\n"):"["+e.join(",")+"]":null}})},Yn=(t(Jn,Xn=Ut),Jn);function Jn(e,t){e=Xn.call(this,e,t)||this;return Z(Jn,e,function(e,t){e.markAsSent=function(e){t.clear()},e.clearSent=function(e){}}),e}t(c,Zn=Ut),c.BUFFER_KEY="AI_buffer",c.SENT_BUFFER_KEY="AI_sentBuffer",c.MAX_BUFFER_SIZE=2e3;var Zn,$n=c;function c(s,l){var e=Zn.call(this,s,l)||this,u=!1;return Z(c,e,function(n,t){var e=a(c.BUFFER_KEY),r=a(c.SENT_BUFFER_KEY),r=n._set(e.concat(r));function i(t,e){var n=[];return ge(e,function(e){oe(e)||-1!==function(e,t){var n=e.length;try{for(var r=0;r<n;r++)if(r in e&&e[r]===t)return r}catch(i){}return-1}(t,e)||n.push(e)}),n}function a(e){try{var e=l.namePrefix&&l.namePrefix()?l.namePrefix()+"_"+e:e,t=Nt(s,e);if(t){var n=Ue().parse(t);if((n=de(n)?Ue().parse(n):n)&&ce(n))return n}}catch(r){s.throwInternal(M.CRITICAL,D.FailedToRestoreStorageBuffer," storage key: "+e+", "+Se(r),{exception:ze(r)})}return[]}function o(e,t){try{var e=l.namePrefix&&l.namePrefix()?l.namePrefix()+"_"+e:e,n=JSON.stringify(t);_t(s,e,n)}catch(r){_t(s,e,JSON.stringify([])),s.throwInternal(M.WARNING,D.FailedToSetStorageBuffer," storage key: "+e+", "+Se(r)+". Buffer cleared",{exception:ze(r)})}}r.length>c.MAX_BUFFER_SIZE&&(r.length=c.MAX_BUFFER_SIZE),o(c.SENT_BUFFER_KEY,[]),o(c.BUFFER_KEY,r),n.enqueue=function(e){n.count()>=c.MAX_BUFFER_SIZE?u||(s.throwInternal(M.WARNING,D.SessionStorageBufferFull,"Maximum buffer size reached: "+n.count(),!0),u=!0):(t.enqueue(e),o(c.BUFFER_KEY,n._get()))},n.clear=function(){t.clear(),o(c.BUFFER_KEY,n._get()),o(c.SENT_BUFFER_KEY,[]),u=!1},n.markAsSent=function(e){o(c.BUFFER_KEY,n._set(i(e,n._get())));var t=a(c.SENT_BUFFER_KEY);t instanceof Array&&e instanceof Array&&((t=t.concat(e)).length>c.MAX_BUFFER_SIZE&&(s.throwInternal(M.CRITICAL,D.SessionStorageBufferFull,"Sent buffer reached its maximum size: "+t.length,!0),t.length=c.MAX_BUFFER_SIZE),o(c.SENT_BUFFER_KEY,t))},n.clearSent=function(e){e=i(e,a(c.SENT_BUFFER_KEY));o(c.SENT_BUFFER_KEY,e)}}),e}var Qn="baseType",d="baseData",p="properties",er="true";function g(e,t,n){return Te(e,t,n,we)}function tr(e,n,r){B(e)||le(e,function(e,t){"number"==typeof t?r[e]=t:de(t)?n[e]=t:Oe()&&(n[e]=Ue().stringify(t))})}function nr(n,r){B(n)||le(n,function(e,t){n[e]=t||r})}function rr(e,t,n,r){for(var r=new kt(e,r,t),t=(g(r,"sampleRate",n[yt]),(n[d]||{}).startTime&&(r.time=pe(n[d].startTime)),r.iKey=n.iKey,n.iKey.replace(/-/g,"")),t=(r.name=r.name.replace("{0}",t),e),e=n,i=r,a=i.tags=i.tags||{},o=e.ext=e.ext||{},s=e.tags=e.tags||[],l=o.user,l=(l&&(g(a,f.userAuthUserId,l.authId),g(a,f.userId,l.id||l.localId)),o.app),l=(l&&g(a,f.sessionId,l.sesId),o.device),l=(l&&(g(a,f.deviceId,l.id||l.localId),g(a,f.deviceType,l.deviceClass),g(a,f.deviceIp,l.ip),g(a,f.deviceModel,l.model),g(a,f.deviceType,l.deviceType)),e.ext.web),e=(l&&(g(a,f.deviceLanguage,l.browserLang),g(a,f.deviceBrowserVersion,l.browserVer),g(a,f.deviceBrowser,l.browser),g(e=(e=(e=i.data=i.data||{})[d]=e[d]||{})[p]=e[p]||{},"domain",l.domain),g(e,"isManual",l.isManual?er:null),g(e,"screenRes",l.screenRes),g(e,"userConsent",l.userConsent?er:null)),o.os),l=(e&&g(a,f.deviceOS,e.name),o.trace),c=(l&&(g(a,f.operationParentId,l.parentID),g(a,f.operationName,ut(t,l.name)),g(a,f.operationId,l.traceID)),{}),u=s.length-1;0<=u;u--)le(s[u],function(e,t){c[e]=t}),s.splice(u,1);le(s,function(e,t){c[e]=t});e=S(S({},a),c);return e[f.internalSdkVersion]||(e[f.internalSdkVersion]="javascript:".concat(ar.Version)),i.tags=be(e),n.tags=n.tags||[],be(r)}function ir(e,t){B(t[d])&&e.throwInternal(M.CRITICAL,D.TelemetryEnvelopeInvalid,"telemetryItem.baseData cannot be null.")}var ar={Version:"2.7.3"};function or(e,t,n){ir(e,t);var r={},i={},n=(t[Qn]!==zt.dataType&&(r.baseTypeSource=t[Qn]),t[Qn]===zt.dataType?(r=t[d][p]||{},i=t[d].measurements||{}):t[d]&&tr(t[d],r,i),tr(t.data,r,i),B(n)||nr(r,n),t[d].name),n=new zt(e,n,r,i),r=new Bn(zt.dataType,n);return rr(e,zt.envelopeType,t,r)}var sr=function wr(f){Z(wr,this,function(e){function u(o,s){var e="__aiCircularRefCheck",l={};if(!o)return f.throwInternal(M.CRITICAL,D.CannotSerializeObject,"cannot serialize object because it is null or undefined",{name:s},!0),l;if(o[e])return f.throwInternal(M.WARNING,D.CircularReferenceDetected,"Circular reference detected while serializing object",{name:s},!0),l;if(o.aiDataContract)return o[e]=!0,le(o.aiDataContract,function(e,t){var n=oe(t)?1&t():1&t,r=oe(t)?4&t():4&t,t=2&t,i=o[e]!==undefined,a=ae(o[e])&&null!==o[e];!n||i||t?r||(n=a?(t?c:u)(o[e],e):o[e])!==undefined&&(l[e]=n):f.throwInternal(M.CRITICAL,D.MissingRequiredFieldSpecification,"Missing required field specification. The field is required but not present on source",{field:e,name:s})}),delete o[e],l;if("measurements"===s)l=n(o,"number",s);else if("properties"===s)l=n(o,"string",s);else if("tags"===s)l=n(o,"string",s);else if(ce(o))l=c(o,s);else{f.throwInternal(M.WARNING,D.CannotSerializeObjectNonSerializable,"Attempting to serialize an object which does not implement ISerializable",{name:s},!0);try{Ue().stringify(o),l=o}catch(t){f.throwInternal(M.CRITICAL,D.CannotSerializeObject,t&&oe(t.toString)?t.toString():"Error serializing object",null,!0)}}return l}function c(e,t){if(e)if(ce(e))for(var n=[],r=0;r<e.length;r++){var i=u(e[r],t+"["+r+"]");n.push(i)}else f.throwInternal(M.CRITICAL,D.ItemNotInArray,"This field was specified as an array in the contract but the item is not an array.\r\n",{name:t},!0);return n}function n(e,n,r){var i;return e&&(i={},le(e,function(e,t){"string"===n?t===undefined?i[e]="undefined":null===t?i[e]="null":t.toString?i[e]=t.toString():i[e]="invalid field: toString() is not defined.":"number"===n?t===undefined?i[e]="undefined":i[e]=null===t?"null":isNaN(t=parseFloat(t))?"NaN":t:(i[e]="invalid field: "+r+" is of unknown type.",f.throwInternal(M.CRITICAL,i[e],null,!0))})),i}e.serialize=function(e){e=u(e,"root");try{return Ue().stringify(e)}catch(t){f.throwInternal(M.CRITICAL,D.CannotSerializeObject,t&&oe(t.toString)?t.toString():"Error serializing object",null,!0)}}})};function lr(){var o=De(),s=Be(),l=!1,u=!0;Z(lr,this,function(e){try{var t,n;o&&se(o,"online",r)&&(se(o,"offline",i),l=!0),s&&(ie((t=s.body||s).ononline)||(t.ononline=r,t.onoffline=i,l=!0)),!l||(n=Pe())&&!B(n.onLine)&&(u=n.onLine)}catch(a){l=!1}function r(){u=!0}function i(){u=!1}e.isListening=l,e.isOnline=function(){var e=!0,t=Pe();return l?e=u:t&&!B(t.onLine)&&(e=t.onLine),e},e.isOffline=function(){return!e.isOnline()}})}var ur=lr.Offline=new lr,cr=(fr.prototype.getHashCodeScore=function(e){return this.getHashCode(e)/fr.INT_MAX_VALUE*100},fr.prototype.getHashCode=function(e){if(""===e)return 0;for(;e.length<8;)e=e.concat(e);for(var t=5381,n=0;n<e.length;++n)t=(t<<5)+t+e.charCodeAt(n),t&=t;return Math.abs(t)},fr.INT_MAX_VALUE=2147483647,fr);function fr(){}var dr=function(){var t=new cr,n=new Wn;this.getSamplingScore=function(e){return e.tags&&e.tags[n.userId]?t.getHashCodeScore(e.tags[n.userId]):e.ext&&e.ext.user&&e.ext.user.id?t.getHashCodeScore(e.ext.user.id):e.tags&&e.tags[n.operationId]?t.getHashCodeScore(e.tags[n.operationId]):e.ext&&e.ext.telemetryTrace&&e.ext.telemetryTrace.traceID?t.getHashCodeScore(e.ext.telemetryTrace.traceID):100*Math.random()}},pr=(gr.prototype.isSampledIn=function(e){var t=this.sampleRate;return null===t||t===undefined||100<=t||e.baseType===hn.dataType||this.samplingScoreGenerator.getSamplingScore(e)<t},gr);function gr(e,t){this.INT_MAX_VALUE=2147483647;t=t||Je(null);(100<e||e<0)&&(t.throwInternal(M.WARNING,D.SampleRateOutOfRange,"Sampling rate is out of range (0..100). Sampling will be disabled, you may be sending too much data which may affect your AI service level.",{samplingRate:e},!0),e=100),this.sampleRate=e,this.samplingScoreGenerator=new dr}function mr(e){try{return e.responseText}catch(t){}return null}function hr(){return{endpointUrl:function(){return"https://dc.services.visualstudio.com/v2/track"},emitLineDelimitedJson:function(){return!1},maxBatchInterval:function(){return 15e3},maxBatchSizeInBytes:function(){return 102400},disableTelemetry:function(){return!1},enableSessionStorageBuffer:function(){return!0},isRetryDisabled:function(){return!1},isBeaconApiDisabled:function(){return!0},disableXhr:function(){return!1},onunloadDisableFetch:function(){return!1},onunloadDisableBeacon:function(){return!1},instrumentationKey:function(){return undefined},namePrefix:function(){return undefined},samplingPercentage:function(){return 100},customHeaders:function(){return undefined},convertUndefined:function(){return undefined},eventsLimitInMem:function(){return 1e4}}}(e={})[zt.dataType]=or,e[Rn.dataType]=function(e,t,n){ir(e,t);var r=t[d].message,i=t[d].severityLevel,a=t[d][p]||{},o=t[d].measurements||{},n=(tr(t.data,a,o),B(n)||nr(a,n),new Rn(e,r,i,a,o)),r=new Bn(Rn.dataType,n);return rr(e,Rn.envelopeType,t,r)},e[Sn.dataType]=function(e,t,n){ir(e,t);var r,i="duration",a=t[d],i=(B(a)||B(a[p])||B(a[p][i])?B(t.data)||B(t.data[i])||(r=t.data[i],delete t.data[i]):(r=a[p][i],delete a[p][i]),t[d]),a=(((t.ext||{}).trace||{}).traceID&&(o=t.ext.trace.traceID),i.id||o),o=i.name,s=i.uri,l=i[p]||{},u=i.measurements||{},i=(B(i.refUri)||(l.refUri=i.refUri),B(i.pageType)||(l.pageType=i.pageType),B(i.isLoggedIn)||(l.isLoggedIn=i.isLoggedIn.toString()),B(i[p])||le(i[p],function(e,t){l[e]=t}),tr(t.data,l,u),B(n)||nr(l,n),new Sn(e,o,s,r,l,u,a)),n=new Bn(Sn.dataType,i);return rr(e,Sn.envelopeType,t,n)},e[En.dataType]=function(e,t,n){ir(e,t);var r=t[d],i=r.name,a=r.uri||r.url,o=r[p]||{},s=r.measurements||{},n=(tr(t.data,o,s),B(n)||nr(o,n),new En(e,i,a,undefined,o,s,r)),i=new Bn(En.dataType,n);return rr(e,En.envelopeType,t,i)},e[nn.dataType]=function(e,t,n){ir(e,t);var r=t[d].measurements||{},i=t[d][p]||{},n=(tr(t.data,i,r),B(n)||nr(i,n),t[d]),n=nn.CreateFromInterface(e,n,i,r),i=new Bn(nn.dataType,n);return rr(e,nn.envelopeType,t,i)},e[hn.dataType]=function(e,t,n){ir(e,t);var r=t[d],i=r[p]||{},a=r.measurements||{},n=(tr(t.data,i,a),B(n)||nr(i,n),new hn(e,r.name,r.average,r.sampleCount,r.min,r.max,r.stdDev,i,a)),r=new Bn(hn.dataType,n);return rr(e,hn.envelopeType,t,r)},e[bn.dataType]=function(e,t,n){ir(e,t);var r=t[d].measurements||{},i=t[d][p]||{},n=(tr(t.data,i,r),B(n)||nr(i,n),t[d]);if(B(n))return e.warnToConsole("Invalid input for dependency data"),null;var a=n[p]&&n[p][Ct]?n[p][Ct]:"GET",a=new bn(e,n.id,n.target,n.name,n.duration,n.success,n.responseCode,a,n.type,n.correlationContext,i,r),n=new Bn(bn.dataType,a);return rr(e,bn.envelopeType,t,n)};var vr,yr=e;function Ir(){var w,b,n,E,x,N,_,R=vr.call(this)||this,A=(R.priority=1001,!(R.identifier="AppInsightsChannelPlugin")),L={},F=0;return R._senderConfig=hr(),Z(Ir,R,function(u,h){function c(e,t,n,r,i,a){var o=null;u._appId||(o=f(a))&&o.appId&&(u._appId=o.appId),(e<200||300<=e)&&0!==e?(301!==e&&307!==e&&308!==e||s(n))&&!u._senderConfig.isRetryDisabled()&&I(e)?(d(t),u.diagLog().throwInternal(M.WARNING,D.TransmissionFailed,". Response code "+e+". Will retry to send "+t.length+" items.")):u._onError(t,i):ur.isOffline()?u._senderConfig.isRetryDisabled()||(d(t,10),u.diagLog().throwInternal(M.WARNING,D.TransmissionFailed,". Offline - Response Code: ".concat(e,". Offline status: ").concat(ur.isOffline(),". Will retry to send ").concat(t.length," items."))):(s(n),206===e?(o=o||f(a))&&!u._senderConfig.isRetryDisabled()?u._onPartialSuccess(t,o):u._onError(t,i):(w=0,u._onSuccess(t,r)))}function s(e){return!(10<=x)&&!B(e)&&""!==e&&e!==u._senderConfig.endpointUrl()&&(u._senderConfig.endpointUrl=function(){return e},++x,1)}function t(e,t){_?_(e,!1):o(e)}function a(e){var t=Pe(),n=u._buffer,r=u._senderConfig.endpointUrl(),i=u._buffer.batchPayloads(e),i=new Blob([i],{type:"text/plain;charset=UTF-8"}),r=t.sendBeacon(r,i);return r&&(n.markAsSent(e),u._onSuccess(e,e.length)),r}function o(e,t){if(ce(e)&&0<e.length&&!a(e)){for(var n=[],r=0;r<e.length;r++){var i=e[r];a([i])||n.push(i)}0<n.length&&(N(n,!0),u.diagLog().throwInternal(M.WARNING,D.TransmissionFailed,". Failed to send telemetry with Beacon API, retried with normal sender."))}}function l(t,e){var n=new XMLHttpRequest,r=u._senderConfig.endpointUrl();try{n[vt]=!0}catch(i){}n.open("POST",r,e),n.setRequestHeader("Content-type","application/json"),Et(r)&&n.setRequestHeader("Sdk-Context","appId"),ge(Ie(L),function(e){n.setRequestHeader(e,L[e])}),n.onreadystatechange=function(){return u._xhrReadyStateChange(n,t,t.length)},n.onerror=function(e){return u._onError(t,m(n),e)};e=u._buffer.batchPayloads(t);n.send(e),u._buffer.markAsSent(t)}function v(e,t){if(ce(e)){for(var n=e.length,r=0;r<e.length;r++)n+=e[r].length;F+n<=65e3?i(e,!1):je()?o(e):(N&&N(e,!0),u.diagLog().throwInternal(M.WARNING,D.TransmissionFailed,". Failed to send telemetry with Beacon API, retried with xhrSender."))}}function y(e,t){i(e,!0)}function i(n,r){var e=u._senderConfig.endpointUrl(),t=u._buffer.batchPayloads(n),i=new Blob([t],{type:"application/json"}),a=new Headers,o=t.length,t=!1,s=!1,e=(Et(e)&&a.append("Sdk-Context","appId"),ge(Ie(L),function(e){a.append(e,L[e])}),(i={method:"POST",headers:a,body:i})[vt]=!0,r||(t=i.keepalive=!0,F+=o),new Request(e,i));try{e[vt]=!0}catch(l){}u._buffer.markAsSent(n);try{fetch(e).then(function(t){r||(F-=o,o=0),s||(s=!0,t.ok?t.text().then(function(e){c(t.status,n,t.url,n.length,t.statusText,e)}):u._onError(n,t.statusText))})["catch"](function(e){r||(F-=o,o=0),s||(s=!0,u._onError(n,e.message))})}catch(l){s||u._onError(n,ze(l))}t&&!s&&(s=!0,u._onSuccess(n,n.length))}function f(e){try{if(e&&""!==e){var t=Ue().parse(e);if(t&&t.itemsReceived&&t.itemsReceived>=t.itemsAccepted&&t.itemsReceived-t.itemsAccepted===t.errors.length)return t}}catch(n){u.diagLog().throwInternal(M.CRITICAL,D.InvalidBackendResponse,"Cannot parse the response. "+Se(n),{response:e})}return null}function d(e,t){if(void 0===t&&(t=1),e&&0!==e.length){var n=u._buffer;n.clearSent(e),w++;for(var r=0,i=e;r<i.length;r++){var a=i[r];n.enqueue(a)}t=w<=1?10:(e=1+Math.floor((Math.pow(2,w)-1)/2*Math.random()*10),Math.max(Math.min(e*=t,3600),10)),e=Ce()+1e3*t;b=e,p()}}function p(){var e;n||A||(e=b?Math.max(0,b-Ce()):0,e=Math.max(u._senderConfig.maxBatchInterval(),e),n=setTimeout(function(){n=null,u.triggerSend(!0,null,1)},e))}function g(){clearTimeout(n),b=n=null}function I(e){return 408===e||429===e||500===e||503===e}function m(e,t){return e?"XMLHttpRequest,Status:"+e.status+",Response:"+mr(e)||e.response||"":t}function C(t,e){var n=u._buffer,r=De(),i=new XDomainRequest,r=(i.onload=function(){return u._xdrOnLoad(i,t)},i.onerror=function(e){return u._onError(t,S(i),e)},r&&r.location&&r.location.protocol||"");if(u._senderConfig.endpointUrl().lastIndexOf(r,0))return u.diagLog().throwInternal(M.WARNING,D.TransmissionFailed,". Cannot send XDomain request. The endpoint URL protocol doesn't match the hosting page protocol."),void n.clear();r=u._senderConfig.endpointUrl().replace(/^(https?:)/,""),i.open("POST",r),r=n.batchPayloads(t);i.send(r),n.markAsSent(t)}function S(e,t){return e?"XDomainRequest,Response:"+mr(e)||"":t}function T(e,t){var n="getNotifyMgr",n=u.core[n]?u.core[n]():u.core._notificationManager;if(n&&n.eventsSendRequest)try{n.eventsSendRequest(e,t)}catch(r){u.diagLog().throwInternal(M.CRITICAL,D.NotificationException,"send request notification failed: "+Se(r),{exception:ze(r)})}}u.pause=function(){g(),A=!0},u.resume=function(){A&&(A=!1,b=null,u._buffer.size()>u._senderConfig.maxBatchSizeInBytes()&&u.triggerSend(!0,null,10),p())},u.flush=function(){if(!A){g();try{u.triggerSend(!0,null,1)}catch(e){u.diagLog().throwInternal(M.CRITICAL,D.FlushFailed,"flush failed, telemetry will not be collected: "+Se(e),{exception:ze(e)})}}},u.onunloadFlush=function(){if(!A)if(!1!==u._senderConfig.onunloadDisableBeacon()&&!1!==u._senderConfig.isBeaconApiDisabled()||!je())u.flush();else try{u.triggerSend(!0,t,2)}catch(e){u.diagLog().throwInternal(M.CRITICAL,D.FailedToSendQueuedTelemetry,"failed to flush with beacon sender on page unload, telemetry will not be collected: "+Se(e),{exception:ze(e)})}},u.teardown=function(){throw Error("Method not implemented.")},u.addHeader=function(e,t){L[e]=t},u.initialize=function(e,t,n,r){h.initialize(e,t,n,r);var i=u._getTelCtx(),a=u.identifier,n=(E=new sr(t.logger),b=null,w=0,u._sender=null,x=0,u.diagLog()),r=(le(hr(),function(e,t){u._senderConfig[e]=function(){return i.getConfig(a,e,t())}}),u._buffer=new(u._senderConfig.enableSessionStorageBuffer()&&xt()?$n:Yn)(n,u._senderConfig),u._sample=new pr(u._senderConfig.samplingPercentage(),n),!B(e.disableInstrumentationKeyValidation)&&e.disableInstrumentationKeyValidation||/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/.test(e.instrumentationKey)||n.throwInternal(M.CRITICAL,D.InvalidInstrumentationKey,"Invalid Instrumentation key "+e.instrumentationKey),!Et(u._senderConfig.endpointUrl())&&u._senderConfig.customHeaders()&&0<u._senderConfig.customHeaders().length&&ge(u._senderConfig.customHeaders(),function(e){R.addHeader(e.header,e.value)}),u._senderConfig),t=null;!r.disableXhr()&&qe()?t=C:!r.disableXhr()&&Ve()&&(t=l),!t&&Ke()&&(t=y),N=t||l,!r.isBeaconApiDisabled()&&je()&&(t=o),u._sender=t||l,_=!r.onunloadDisableFetch()&&Ke(!0)?v:je()?o:!r.disableXhr()&&qe()?C:!r.disableXhr()&&Ve()?l:N},u.processTelemetry=function(e,n){n=u._getTelCtx(n);try{if(u._senderConfig.disableTelemetry())return;if(!e)return void n.diagLog().throwInternal(M.CRITICAL,D.CannotSendEmptyTelemetry,"Cannot send empty telemetry");if(e.baseData&&!e.baseType)return void n.diagLog().throwInternal(M.CRITICAL,D.InvalidEvent,"Cannot send telemetry without baseData and baseType");if(e.baseType||(e.baseType="EventData"),!u._sender)return void n.diagLog().throwInternal(M.CRITICAL,D.SenderNotInitialized,"Sender was not initialized");if(!u._sample.isSampledIn(e))return void n.diagLog().throwInternal(M.WARNING,D.TelemetrySampledAndNotSent,"Telemetry item was sampled out and not sent",{SampleRate:u._sample.sampleRate});e[yt]=u._sample.sampleRate;var t=u._senderConfig.convertUndefined()||undefined,r=e.iKey||u._senderConfig.instrumentationKey(),i=Ir.constructEnvelope(e,r,n.diagLog(),t);if(!i)return void n.diagLog().throwInternal(M.CRITICAL,D.CreateEnvelopeError,"Unable to create an AppInsights envelope");var a=!1;if(e.tags&&e.tags[It]&&(ge(e.tags[It],function(e){try{e&&!1===e(i)&&(a=!0,n.diagLog().warnToConsole("Telemetry processor check returns false"))}catch(t){n.diagLog().throwInternal(M.CRITICAL,D.TelemetryInitializerFailed,"One of telemetry initializers failed, telemetry item will not be sent: "+Se(t),{exception:ze(t)},!0)}}),delete e.tags[It]),a)return;var o=E.serialize(i),s=u._buffer;s.size()+o.length>u._senderConfig.maxBatchSizeInBytes()&&u.triggerSend(!0,null,10),s.enqueue(o),p()}catch(l){n.diagLog().throwInternal(M.WARNING,D.FailedAddingTelemetryToBuffer,"Failed adding telemetry to the sender's buffer, some telemetry will be lost: "+Se(l),{exception:ze(l)})}u.processNext(e,n)},u._xhrReadyStateChange=function(e,t,n){4===e.readyState&&c(e.status,t,e.responseURL,n,m(e),mr(e)||e.response)},u.triggerSend=function(e,t,n){if(void 0===e&&(e=!0),!A)try{var r,i=u._buffer;u._senderConfig.disableTelemetry()?i.clear():0<i.count()&&(r=i.getItems(),T(n||0,e),t?t.call(R,r,e):u._sender(r,e)),g()}catch(a){i=function(e){var t=((e=(e=void 0===e?null:e)?e:(t=Pe()||{})?(t.userAgent||"").toLowerCase():"")||"").toLowerCase();if(ue(t,"msie"))return e=Be()||{},Math.max(parseInt(t.split("msie")[1]),e.documentMode||0);if(ue(t,Re)){e=parseInt(t.split(Re)[1]);if(e)return e+4}return null}();(!i||9<i)&&u.diagLog().throwInternal(M.CRITICAL,D.TransmissionFailed,"Telemetry transmission failed, some telemetry will be lost: "+Se(a),{exception:ze(a)})}},u._onError=function(e,t,n){u.diagLog().throwInternal(M.WARNING,D.OnError,"Failed to send telemetry.",{message:t}),u._buffer.clearSent(e)},u._onPartialSuccess=function(e,t){for(var n=[],r=[],i=0,a=t.errors.reverse();i<a.length;i++){var o=a[i],s=e.splice(o.index,1)[0];(I(o.statusCode)?r:n).push(s)}0<e.length&&u._onSuccess(e,t.itemsAccepted),0<n.length&&u._onError(n,m(null,["partial success",t.itemsAccepted,"of",t.itemsReceived].join(" "))),0<r.length&&(d(r),u.diagLog().throwInternal(M.WARNING,D.TransmissionFailed,"Partial success. Delivered: "+e.length+", Failed: "+n.length+". Will retry to send "+r.length+" our of "+t.itemsReceived+" items"))},u._onSuccess=function(e,t){u._buffer.clearSent(e)},u._xdrOnLoad=function(e,t){var n=mr(e);!e||n+""!="200"&&""!==n?(n=f(n))&&n.itemsReceived&&n.itemsReceived>n.itemsAccepted&&!u._senderConfig.isRetryDisabled()?u._onPartialSuccess(t,n):u._onError(t,S(e)):(w=0,u._onSuccess(t,0))}}),R}t(Ir,vr=ot),Ir.constructEnvelope=function(e,t,n,r){e=t===e.iKey||B(t)?e:S(S({},e),{iKey:t});return(yr[e.baseType]||or)(n,e,r)},n.Sender=Ir;zn=n,jn="__esModule",Kn={value:!0},qn=Object.defineProperty;if(qn)try{return void qn(zn,jn,Kn)}catch(br){}typeof Kn.value!==undefined&&(zn[jn]=Kn.value)};"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).Microsoft=e.Microsoft||{},e.Microsoft.ApplicationInsights=e.Microsoft.ApplicationInsights||{}));
|
|
5
|
+
var e=this,t=function(n){"use strict";var o="function",s="object",i="undefined",a="prototype",l="hasOwnProperty",r=Object,u=r[a],m=r.assign,h=r.create,e=r.defineProperty,v=u[l],y=null;function I(e){return void 0===e&&(e=!0),y&&e||(typeof globalThis!==i&&globalThis&&(y=globalThis),typeof self!==i&&self&&(y=self),typeof window!==i&&window&&(y=window),typeof global!==i&&global&&(y=global)),y}function C(e){throw new TypeError(e)}(I()||{}).Symbol,(I()||{}).Reflect;var S=m||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])u[l].call(t,i)&&(e[i]=t[i]);return e},T=function(e,t){return(T=r.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t[l](n)&&(e[n]=t[n])})(e,t)};function t(e,t){function n(){this.constructor=e}typeof t!==o&&null!==t&&C("Class extends value "+t+" is not a constructor or null"),T(e,t),e[a]=null===t?function(e){if(h)return h(e);if(null==e)return{};var t=typeof e;function n(){}return t!==s&&t!==o&&C("Object prototype may only be an Object:"+e),n[a]=e,new n}(t):(n[a]=t[a],new n)}var w="constructor",b="prototype",x="function",N="_dynInstFuncs",_="_isDynProxy",R="_dynClass",A="_dynInstChk",L=A,F="_dfOpts",E="_unknown_",k="__proto__",P="useBaseInst",O="setInstFuncs",U=Object,z=U.getPrototypeOf,j=0;function K(e,t){return e&&U[b].hasOwnProperty.call(e,t)}function q(e){return e&&(e===U[b]||e===Array[b])}function V(e){return q(e)||e===Function[b]}function G(e){if(e){if(z)return z(e);e=e[k]||e[b]||(e[w]?e[w][b]:null);if(e)return e}return null}function W(e,t){var n=[],r=U.getOwnPropertyNames;if(r)n=r(e);else for(var i in e)"string"==typeof i&&K(e,i)&&n.push(i);if(n&&0<n.length)for(var a=0;a<n.length;a++)t(n[a])}function H(e,t,n){return t!==w&&typeof e[t]===x&&(n||K(e,t))}function X(e){throw new TypeError("DynamicProto: "+e)}function Y(e,t){for(var n=e.length-1;0<=n;n--)if(e[n]===t)return 1}function J(e,t){return K(e,b)?e.name||t||E:((e||{})[w]||{}).name||t||E}function Z(e,r,t,n){K(e,b)||X("theClass is an invalid class definition.");var c,i,a,o,f,d,s=e[b],l=(function(e){if(z)for(var t=[],n=G(r);n&&!V(n)&&!Y(t,n);){if(n===e)return 1;t.push(n),n=G(n)}}(s)||X("["+J(e)+"] is not in class hierarchy of ["+J(r)+"]"),null),e=(K(s,R)?l=s[R]:(l="_dynCls$"+J(e,"_")+"$"+j,j++,s[R]=l),Z[F]),u=!!e[P],p=(u&&n&&n[P]!==undefined&&(u=!!n[P]),i={},W(c=r,function(e){!i[e]&&H(c,e,!1)&&(i[e]=c[e])}),i),u=(t(r,function(e,t,n,a){function r(e,t,n){var r,i=t[n];return i[_]&&a&&!1!==(r=e[N]||{})[L]&&(i=(r[t[R]]||{})[n]||i),function(){return i.apply(e,arguments)}}for(var i={},o=(W(n,function(e){i[e]=r(t,n,e)}),G(e)),s=[];o&&!V(o)&&!Y(s,o);)W(o,function(e){!i[e]&&H(o,e,!z)&&(i[e]=r(t,o,e))}),s.push(o),o=G(o);return i}(s,r,p,u)),!!z&&!!e[O]);a=s,t=l,o=r,f=p,e=!1!==(u=u&&n?!!n[O]:u),q(a)||(s=o[N]=o[N]||{},d=s[t]=s[t]||{},!1!==s[L]&&(s[L]=!!e),W(o,function(e){var n,r,i;H(o,e,!1)&&o[e]!==f[e]&&(d[e]=o[e],delete o[e],K(a,e)&&(!a[e]||a[e][_])||(a[e]=(n=a,r=e,(i=function(){var e,t;return(function(e,t,n,c){var r=null;if(e&&K(n,R)){var i=e[N]||{};if((r=(i[n[R]]||{})[t])||X("Missing ["+t+"] "+x),!r[A]&&!1!==i[L]){for(var a=!K(e,t),o=G(e),s=[];a&&o&&!V(o)&&!Y(s,o);){var l=o[t];if(l){a=l===c;break}s.push(o),o=G(o)}try{a&&(e[t]=r),r[A]=1}catch(u){i[L]=!1}}}return r}(this,r,n,i)||(typeof(t=(t=n[e=r])===i?G(n)[e]:t)!==x&&X("["+e+"] is not a "+x),t)).apply(this,arguments)})[_]=1,i)))}))}Z[F]={setInstFuncs:!0,useBaseInst:!0},(pt=M=M||{})[pt.CRITICAL=1]="CRITICAL",pt[pt.WARNING=2]="WARNING";var M,D={BrowserDoesNotSupportLocalStorage:0,BrowserCannotReadLocalStorage:1,BrowserCannotReadSessionStorage:2,BrowserCannotWriteLocalStorage:3,BrowserCannotWriteSessionStorage:4,BrowserFailedRemovalFromLocalStorage:5,BrowserFailedRemovalFromSessionStorage:6,CannotSendEmptyTelemetry:7,ClientPerformanceMathError:8,ErrorParsingAISessionCookie:9,ErrorPVCalc:10,ExceptionWhileLoggingError:11,FailedAddingTelemetryToBuffer:12,FailedMonitorAjaxAbort:13,FailedMonitorAjaxDur:14,FailedMonitorAjaxOpen:15,FailedMonitorAjaxRSC:16,FailedMonitorAjaxSend:17,FailedMonitorAjaxGetCorrelationHeader:18,FailedToAddHandlerForOnBeforeUnload:19,FailedToSendQueuedTelemetry:20,FailedToReportDataLoss:21,FlushFailed:22,MessageLimitPerPVExceeded:23,MissingRequiredFieldSpecification:24,NavigationTimingNotSupported:25,OnError:26,SessionRenewalDateIsZero:27,SenderNotInitialized:28,StartTrackEventFailed:29,StopTrackEventFailed:30,StartTrackFailed:31,StopTrackFailed:32,TelemetrySampledAndNotSent:33,TrackEventFailed:34,TrackExceptionFailed:35,TrackMetricFailed:36,TrackPVFailed:37,TrackPVFailedCalc:38,TrackTraceFailed:39,TransmissionFailed:40,FailedToSetStorageBuffer:41,FailedToRestoreStorageBuffer:42,InvalidBackendResponse:43,FailedToFixDepricatedValues:44,InvalidDurationValue:45,TelemetryEnvelopeInvalid:46,CreateEnvelopeError:47,CannotSerializeObject:48,CannotSerializeObjectNonSerializable:49,CircularReferenceDetected:50,ClearAuthContextFailed:51,ExceptionTruncated:52,IllegalCharsInName:53,ItemNotInArray:54,MaxAjaxPerPVExceeded:55,MessageTruncated:56,NameTooLong:57,SampleRateOutOfRange:58,SetAuthContextFailed:59,SetAuthContextFailedAccountName:60,StringValueTooLong:61,StartCalledMoreThanOnce:62,StopCalledWithoutStart:63,TelemetryInitializerFailed:64,TrackArgumentsNotSpecified:65,UrlTooLong:66,SessionStorageBufferFull:67,CannotAccessCookie:68,IdTooLong:69,InvalidEvent:70,FailedMonitorAjaxSetRequestHeader:71,SendBrowserInfoOnUserInit:72,PluginException:73,NotificationException:74,SnippetScriptLoadFailure:99,InvalidInstrumentationKey:100,CannotParseAiBlobValue:101,InvalidContentBlob:102,TrackPageActionEventFailed:103,FailedAddingCustomDefinedRequestContext:104,InMemoryStorageBufferFull:105},$="on",Q="attachEvent",ee="addEventListener",te="toISOString",ne="indexOf",re="trim",ie="keys",ae="toString",oe=e,se=String[a][re],le=Date[a][te],ue=Array.isArray;function ce(e){return u[ae].call(e)}function fe(e){return e===undefined||typeof e===i}function B(e){return null===e||fe(e)}function de(e){return!(!e||typeof e!==s)}function pe(e){return!(!e||typeof e!==o)}function ge(e,t,n,r){void 0===r&&(r=!1);var i=!1;if(!B(e))try{B(e[ee])?B(e[Q])||(e[Q]($+t,n),i=!0):(e[ee](t,n,r),i=!0)}catch(a){}return i}function me(e,t){if(e)for(var n in e)v.call(e,n)&&t.call(e,n,e[n])}function he(e,t){return e&&t&&~e.indexOf(t)}function ve(e){return ue?ue(e):!(!e||"[object Array]"!==ce(e))}function ye(e){return e&&"[object Error]"===ce(e)}function Ie(e){return"string"==typeof e}function Ce(e){if(e){if(le)return e[te]();var t;return e&&e.getUTCFullYear?(t=function(e){e=""+e;return 1===e.length?"0"+e:e},e.getUTCFullYear()+"-"+t(1+e.getUTCMonth())+"-"+t(e.getUTCDate())+"T"+t(e.getUTCHours())+":"+t(e.getUTCMinutes())+":"+t(e.getUTCSeconds())+"."+(""+(e.getUTCMilliseconds()/1e3).toFixed(3)).slice(2,5)+"Z"):void 0}}function Se(e,t,n){var r=e.length;try{for(var i=0;i<r&&!(i in e&&-1===t.call(n||e,e[i],i,e));i++);}catch(a){}}function Te(e,t,n){if(e){if(e.map)return e.map(t,n);var r=e.length,i=n||e,a=Array(r);try{for(var o=0;o<r;o++)o in e&&(a[o]=t.call(i,e[o],e))}catch(s){}}return a}function we(e){return e&&(se&&e[re]?e[re]():e.replace?e.replace(/^\s+|\s+$/g,""):e)}v[ae].call(r);var be=!{toString:null}.propertyIsEnumerable("toString"),xe=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"];function Ne(e){var t=typeof e;if(t===o||t===s&&null!==e||C("objKeys called on non-object"),!be&&e[ie])return e[ie];var n,r=[];for(n in e)e&&v.call(e,n)&&r.push(n);if(be)for(var i=xe.length,a=0;a<i;a++)e&&v.call(e,xe[a])&&r.push(xe[a]);return r}function _e(){var e=Date;return e.now?e.now():(new e).getTime()}function Re(e){return ye(e)?e.name:""}function Ae(e,t,n,r,i){var a=n;return e&&((a=e[t])===n||i&&!i(a)||r&&!r(n)||(e[t]=a=n)),a}function Le(e){return!!e}function Fe(e){return e&&r(m?m({},e):e)}var Ee="window",Me="navigator",De="JSON",Be="trident/",ke=null,Pe=null;function Oe(e,t){var n,r=!1;if(e){try{(r=t in e)||(n=e[a])&&(r=t in n)}catch(i){}if(!r)try{r=!fe((new e)[t])}catch(i){}}return r}function Ue(e){var t=I();return t&&t[e]?t[e]:e===Ee&&ze()?window:null}function ze(){return typeof window===s&&window}function je(){return ze()?window:Ue(Ee)}function Ke(){return typeof document===s&&document?document:Ue("document")}function qe(){return!(typeof navigator!==s||!navigator)}function Ve(){return qe()?navigator:Ue(Me)}function Ge(){return typeof JSON===s&&JSON||null!==Ue(De)}function We(){return Ge()?JSON||Ue(De):null}function He(e){var t=Object[a].toString.call(e),n="";return"[object Error]"===t?n="{ stack: '"+e.stack+"', message: '"+e.message+"', name: '"+e.name+"'":Ge()&&(n=We().stringify(e)),t+n}function Xe(){return Pe=null===Pe?qe()&&!!Ve().sendBeacon:Pe}function Ye(e){var t=!1;try{var t=!!Ue("fetch"),n=Ue("Request");t&&e&&n&&(t=Oe(n,"keepalive"))}catch(r){}return t}function Je(){return ke=null===ke&&(ke="undefined"!=typeof XDomainRequest)&&Ze()?ke&&!Oe(Ue("XMLHttpRequest"),"withCredentials"):ke}function Ze(){var e=!1;try{e=!!Ue("XMLHttpRequest")}catch(t){}return e}var $e=null;function Qe(e){return e?'"'+e.replace(/\"/g,"")+'"':""}function et(e,t){var n,r=typeof console!==i?console:Ue("console");r&&(n="log",pe(r[n=r[e]?e:n])&&r[n](t))}nt.dataType="MessageData";var tt=nt;function nt(e,t,n,r){void 0===n&&(n=!1),this.messageId=e,this.message=(n?"AI: ":"AI (Internal): ")+e;n="",Ge()&&(n=We().stringify(r)),e=(t?" message:"+Qe(t):"")+(r?" props:"+Qe(n):"");this.message+=e}function rt(e,t){return(e||{}).logger||new it(t)}var it=function _r(i){this.identifier="DiagnosticLogger",this.queue=[];var s=0,l={};Z(_r,this,function(a){function e(e,t){e=i[e];return B(e)?t:e}function o(e,t){var n,r=(n=(n=$e)||!0===i.disableDbgExt?n:$e||(r=Ue("Microsoft"),$e=r?r.ApplicationInsights:$e))?n.ChromeDbgExt:null;r&&r.diagLog&&r.diagLog(e,t)}B(i)&&(i={}),a.consoleLoggingLevel=function(){return e("loggingLevelConsole",0)},a.telemetryLoggingLevel=function(){return e("loggingLevelTelemetry",1)},a.maxInternalMessageLimit=function(){return e("maxMessageLimit",25)},a.enableDebugExceptions=function(){return e("enableDebugExceptions",!1)},a.throwInternal=function(e,t,n,r,i){t=new tt(t,n,i=void 0!==i&&i,r);if(a.enableDebugExceptions())throw t;n=e===M.CRITICAL?"errorToConsole":"warnToConsole";fe(t.message)?o("throw"+(e===M.CRITICAL?"Critical":"Warning"),t):(r=a.consoleLoggingLevel(),i?(i=+t.messageId,!l[i]&&e<=r&&(a[n](t.message),l[i]=!0)):e<=r&&a[n](t.message),a.logInternalMessage(e,t))},a.warnToConsole=function(e){et("warn",e),o("warning",e)},a.errorToConsole=function(e){et("error",e),o("error",e)},a.resetInternalMessageCount=function(){s=0,l={}},a.logInternalMessage=function(e,t){var n,r;s>=a.maxInternalMessageLimit()||(r=!0,n="AITR_"+t.messageId,l[n]?r=!1:l[n]=!0,r&&(e<=a.telemetryLoggingLevel()&&(a.queue.push(t),s++,o(e===M.CRITICAL?"error":"warn",t)),s===a.maxInternalMessageLimit()&&(r=new tt(D.MessageLimitPerPVExceeded,n="Internal events throttle limit per PageView reached for this app.",!1),a.queue.push(r),e===M.CRITICAL?a.errorToConsole(n):a.warnToConsole(n))))}})},at=(ot.ParentContextKey="parent",ot.ChildrenContextKey="childEvts",ot);function ot(e,i,t){var r,a=this,o=!1;a.start=_e(),a.name=e,a.isAsync=t,a.isChildEvt=function(){return!1},pe(i)&&(o=function(e){if(oe)try{var t={enumerable:!0,configurable:!0,get:function(){return!r&&pe(i)&&(r=i(),i=null),r}};return oe(e,"payload",t),!0}catch(n){}return!1}(a)),a.getCtx=function(e){return e?(e===ot.ParentContextKey||e===ot.ChildrenContextKey?a:a.ctx||{})[e]:null},a.setCtx=function(e,t){e&&(e===ot.ParentContextKey?(a[e]||(a.isChildEvt=function(){return!0}),a[e]=t):e===ot.ChildrenContextKey?a[e]=t:(a.ctx=a.ctx||{})[e]=t)},a.complete=function(){var e=0,t=a.getCtx(ot.ChildrenContextKey);if(ve(t))for(var n=0;n<t.length;n++){var r=t[n];r&&(e+=r.time)}a.time=_e()-a.start,a.exTime=a.time-e,a.complete=function(){},!o&&pe(i)&&(a.payload=i())}}var st="CoreUtils.doPerf";function lt(e,t,n,r,i){if(e)if(e=pe(e.getPerfMgr)?e.getPerfMgr():e){var a,o=void 0,s=e.getCtx(st);try{if(o=e.create(t(),r,i))return s&&o.setCtx&&(o.setCtx(at.ParentContextKey,s),s.getCtx&&s.setCtx&&((a=s.getCtx(at.ChildrenContextKey))||(a=[],s.setCtx(at.ChildrenContextKey,a)),a.push(o))),e.setCtx(st,o),n(o)}catch(l){o&&o.setCtx&&o.setCtx("exception",l)}finally{o&&e.fire(o),e.setCtx(st,s)}}return n()}var ut=function(i,t){var a=this,o=null,s=pe(i.processTelemetry),l=pe(i.setNextPlugin);a._hasRun=!1,a.getPlugin=function(){return i},a.getNext=function(){return o},a.setNext=function(e){o=e},a.processTelemetry=function(n,r){r=r||t;var e=i?i.identifier:"TelemetryPluginChain";lt(r?r.core():null,function(){return e+":processTelemetry"},function(){if(i&&s){a._hasRun=!0;try{r.setNext(o),l&&i.setNextPlugin(o),o&&(o._hasRun=!1),i.processTelemetry(n,r)}catch(t){var e=o&&o._hasRun;o&&e||r.diagLog().throwInternal(M.CRITICAL,D.PluginException,"Plugin ["+i.identifier+"] failed during processTelemetry - "+He(t)),o&&!e&&o.processTelemetry(n,r)}}else o&&(a._hasRun=!0,o.processTelemetry(n,r))},function(){return{item:n}},!n.sync)}};function ct(e,t){var n=[];if(e&&0<e.length)for(var r=null,i=0;i<e.length;i++){var a=e[i];a&&pe(a.processTelemetry)&&(a=new ut(a,t),n.push(a),r&&r.setNext(a),r=a)}return 0<n.length?n[0]:null}var ft=function Rr(e,i,n,t){var r,a,o,s,l=this,u=null;null!==t&&(e&&pe(e.getPlugin)?u=function(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),ct(r,t)}(e,l,t||e.getPlugin()):t?(r=l,o=e,s=!1,(a=t)&&e&&(o=[],Se(e,function(e){!s&&e!==a||(s=!0,o.push(e))})),a&&!s&&(o=o||[]).push(a),u=ct(o,r)):fe(t)&&(u=ct(e,l))),l.core=function(){return n},l.diagLog=function(){return rt(n,i)},l.getCfg=function(){return i},l.getExtCfg=function(e,t){var n,r;return void 0===t&&(t={}),!i||(r=i.extensionConfig)&&e&&(n=r[e]),n||t},l.getConfig=function(e,t,n){void 0===n&&(n=!1);var r,e=l.getExtCfg(e,null);return e&&!B(e[t])?r=e[t]:i&&!B(i[t])&&(r=i[t]),B(r)?n:r},l.hasNext=function(){return null!=u},l.getNext=function(){return u},l.setNext=function(e){u=e},l.processNext=function(e){var t=u;t&&(u=t.getNext(),t.processTelemetry(e,l))},l.createNew=function(e,t){return new Rr((e=void 0===e?null:e)||u,i,n,t)}},dt="getPlugin",pt=(gt.prototype.initialize=function(e,t,n,r){this._baseTelInit(e,t,n,r)},gt);function gt(){var a=this,o=!1,s=null,l=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){l=e},a.processNext=function(e,t){t?t.processNext(e):l&&pe(l.processTelemetry)&&l.processTelemetry(e,null)},a._getTelCtx=function(e){var t,e=e=void 0===e?null:e;return e||(t=s||new ft(null,{},a.core),e=l&&l[dt]?t.createNew(null,l[dt]):t.createNew(null,l)),e},a._baseTelInit=function(e,t,n,r){e&&Ae(e,"extensionConfig",[],null,B),!r&&t&&(r=t.getProcessTelContext().getNext());var i=l;l&&l[dt]&&(i=l[dt]()),a.core=t,s=new ft(r,e,t,i),o=!0}}function mt(e,t,n){var r,i,a=t.length,o=(e=e,(t=t)&&150<(t=we(t.toString())).length&&(i=t.substring(0,150),e&&e.throwInternal(M.WARNING,D.NameTooLong,"name is too long. It has been truncated to 150 characters.",{name:t},!0)),i||t);if(o.length!==a){for(var s=0,l=o;n[l]!==undefined;)s++,l=o.substring(0,147)+(r=void 0,(r="00"+s).substr(r.length-3));o=l}return o}function ht(e,t,n){var r;return void 0===n&&(n=1024),t&&(n=n||1024,(t=we(t)).toString().length>n&&(r=t.toString().substring(0,n),e&&e.throwInternal(M.WARNING,D.StringValueTooLong,"string value is too long. It has been truncated to "+n+" characters.",{value:t},!0))),r||t}function vt(e,t){return St(e,t,2048,D.UrlTooLong)}function yt(e,t){var n;return t&&32768<t.length&&(n=t.substring(0,32768),e&&e.throwInternal(M.WARNING,D.MessageTruncated,"message is too long, it has been truncated to 32768 characters.",{message:t},!0)),n||t}function It(r,e){var i;return e&&(i={},me(e,function(e,t){if(de(t)&&Ge())try{t=We().stringify(t)}catch(n){r&&r.throwInternal(M.WARNING,D.CannotSerializeObjectNonSerializable,"custom property is not valid",{exception:n},!0)}t=ht(r,t,8192),e=mt(r,e,i),i[e]=t}),e=i),e}function Ct(n,e){var r;return e&&(r={},me(e,function(e,t){e=mt(n,e,r),r[e]=t}),e=r),e}function St(e,t,n,r){var i;return t&&(t=we(t)).length>n&&(i=t.substring(0,n),e&&e.throwInternal(M.WARNING,r,"input is too long, it has been truncated to "+n+" characters.",{data:t},!0)),i||t}function Tt(e){var t=""+Math.floor((e=Math.round(e=isNaN(e)||e<0?0:e))/1e3)%60,n=""+Math.floor(e/6e4)%60,r=""+Math.floor(e/36e5)%24,i=Math.floor(e/864e5),e=1===(e=""+e%1e3).length?"00"+e:2===e.length?"0"+e:e,t=t.length<2?"0"+t:t,n=n.length<2?"0"+n:n;return(0<i?i+".":"")+(r=r.length<2?"0"+r:r)+":"+n+":"+t+"."+e}var wt,bt="Microsoft_ApplicationInsights_BypassAjaxInstrumentation",xt="sampleRate",Nt="ProcessLegacy",_t="http.method",Rt="not_specified",At=((e=wt=wt||{})[e.LocalStorage=0]="LocalStorage",e[e.SessionStorage=1]="SessionStorage",undefined);function Lt(e){try{if(B(I()))return null;var t=new Date,n=Ue(e===wt.LocalStorage?"localStorage":"sessionStorage"),r=(n.setItem(t.toString(),t.toString()),n.getItem(t.toString())!==t.toString());if(n.removeItem(t.toString()),!r)return n}catch(i){}return null}function Ft(){return Et()?Lt(wt.SessionStorage):null}function Et(){return At=At===undefined?!!Lt(wt.SessionStorage):At}function Mt(e,t){var n=Ft();if(null!==n)try{return n.getItem(t)}catch(r){At=!1,e.throwInternal(M.WARNING,D.BrowserCannotReadSessionStorage,"Browser failed read of session storage. "+Re(r),{exception:He(r)})}return null}function Dt(e,t,n){var r=Ft();if(null!==r)try{return r.setItem(t,n),1}catch(i){At=!1,e.throwInternal(M.WARNING,D.BrowserCannotWriteSessionStorage,"Browser failed write to session storage. "+Re(i),{exception:He(i)})}}var Bt=Ke()||{},kt=0,Pt=[null,null,null,null,null];var Ot=["https://dc.services.visualstudio.com/v2/track","https://breeze.aimon.applicationinsights.io/v2/track","https://dc-int.services.visualstudio.com/v2/track"];function Ut(e){return~Ot.indexOf(e.toLowerCase())}t(jt,zt=function(){});var zt,e=jt;function jt(){return zt.call(this)||this}t(Vt,Kt=function(){this.ver=1,this.sampleRate=100,this.tags={}});var Kt,qt=Vt;function Vt(e,t,n){var r=Kt.call(this)||this;return r.name=ht(e,n)||Rt,r.data=t,r.time=Ce(new Date),r.aiDataContract={time:1,iKey:1,name:1,sampleRate:function(){return 100===r.sampleRate?4:1},tags:1,data:1},r}var Gt,Wt=function(){this.ver=2,this.properties={},this.measurements={}},Ht=(t(Xt,Gt=Wt),Xt.envelopeType="Microsoft.ApplicationInsights.{0}.Event",Xt.dataType="EventData",Xt);function Xt(e,t,n,r){var i=Gt.call(this)||this;return i.aiDataContract={ver:1,name:1,properties:0,measurements:0},i.name=ht(e,t)||Rt,i.properties=It(e,n),i.measurements=Ct(e,r),i}var Yt="error",Jt="stack",Zt="stackDetails",$t="errorSrc",Qt="message",en="description";function tn(e,t){var n=e;return n&&!Ie(n)&&(JSON&&JSON.stringify?(n=JSON.stringify(e),!t||n&&"{}"!==n||(n=pe(e.toString)?e.toString():""+e)):n=e+" - (Missing JSON.stringify)"),n||""}function nn(e,t){var n=e;return e&&((n=n&&!Ie(n)&&(e[Qt]||e[en])||n)&&!Ie(n)&&(n=tn(n,!0)),e.filename&&(n=n+" @"+(e.filename||"")+":"+(e.lineno||"?")+":"+(e.colno||"?"))),(t&&"String"!==t&&"Object"!==t&&"Error"!==t&&!~(n||"").indexOf(t)?t+": "+n:n)||""}function rn(e){return e&&e.src&&Ie(e.src)&&e.obj&&ve(e.obj)}function an(e){var e=e||"",t=(e=Ie(e)?e:Ie(e[Jt])?e[Jt]:""+e).split("\n");return{src:e,obj:t}}function on(e){var t,n=null;if(e)try{e[Jt]?n=an(e[Jt]):e[Yt]&&e[Yt][Jt]?n=an(e[Yt][Jt]):e.exception&&e.exception[Jt]?n=an(e.exception[Jt]):rn(e)?n=e:rn(e[Zt])?n=e[Zt]:window&&window.opera&&e[Qt]?n=function(e){for(var t=[],n=e.split("\n"),r=0;r<n.length;r++){var i=n[r];n[r+1]&&(i+="@"+n[r+1],r++),t.push(i)}return{src:e,obj:t}}(e.message):Ie(e)?n=an(e):(t=e[Qt]||e[en]||"",Ie(e[$t])&&(t&&(t+="\n"),t+=" from "+e[$t]),t&&(n=an(t)))}catch(r){n=an(r)}return n||{src:"",obj:null}}function sn(e){var t="";if(e&&!(t=e.typeName||e.name||""))try{var n=/function (.{1,200})\(/.exec(e.constructor.toString()),t=n&&1<n.length?n[1]:""}catch(r){}return t}function ln(e){if(e)try{var t,n;if(!Ie(e))return t=sn(e),(n=tn(e,!1))&&"{}"!==n||(e[Yt]&&(t=sn(e=e[Yt])),n=tn(e,!0)),n.indexOf(t)&&"String"!==t?t+":"+n:n}catch(r){}return""+(e||"")}t(fn,un=function(){this.ver=2,this.exceptions=[],this.properties={},this.measurements={}}),fn.CreateAutoException=function(e,t,n,r,i,a,o,s){var l=sn(i||a||e);return{message:nn(e,l),url:t,lineNumber:n,columnNumber:r,error:ln(i||a||e),evt:ln(a||e),typeName:l,stackDetails:on(o||i||a),errorSrc:s}},fn.CreateFromInterface=function(t,e,n,r){var i=e.exceptions&&Te(e.exceptions,function(e){return pn.CreateFromInterface(t,e)});return new fn(t,S(S({},e),{exceptions:i}),n,r)},fn.prototype.toInterface=function(){var e=this,t=e.exceptions,n=e.properties,r=e.measurements,i=e.severityLevel,a=e.problemGroup,o=e.id,e=e.isManual;return{ver:"4.0",exceptions:t instanceof Array&&Te(t,function(e){return e.toInterface()})||undefined,severityLevel:i,properties:n,measurements:r,problemGroup:a,id:o,isManual:e}},fn.CreateSimpleException=function(e,t,n,r,i,a){return{exceptions:[{hasFullStack:!0,message:e,stack:i,typeName:t}]}},fn.envelopeType="Microsoft.ApplicationInsights.{0}.Exception",fn.dataType="ExceptionData",fn.formatError=ln;var un,cn=fn;function fn(e,t,n,r,i,a){var o=un.call(this)||this;return o.aiDataContract={ver:1,exceptions:1,severityLevel:0,properties:0,measurements:0},function(e){try{if(de(e))return"ver"in e&&"exceptions"in e&&"properties"in e}catch(t){}}(t)?(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,B(t.isManual)||(o.isManual=t.isManual)):(o.exceptions=[new pn(e,t,n=n||{})],o.properties=It(e,n),o.measurements=Ct(e,r),i&&(o.severityLevel=i),a&&(o.id=a)),o}t(gn,dn=function(){this.hasFullStack=!0,this.parsedStack=[]}),gn.prototype.toInterface=function(){var e=this.parsedStack instanceof Array&&Te(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[Jt],parsedStack:e||undefined}},gn.CreateFromInterface=function(e,t){var n=t.parsedStack instanceof Array&&Te(t.parsedStack,function(e){return vn.CreateFromInterface(e)})||t.parsedStack;return new gn(e,S(S({},t),{parsedStack:n}))};var dn,pn=gn;function gn(e,t,n){var u,r,i,a,o,s=dn.call(this)||this;return s.aiDataContract={id:0,outerId:0,typeName:1,message:1,hasFullStack:0,stack:0,parsedStack:2},function(e){try{if(de(e))return"hasFullStack"in e&&"typeName"in e}catch(t){}}(t)?(s.typeName=t.typeName,s.message=t.message,s[Jt]=t[Jt],s.parsedStack=t.parsedStack,s.hasFullStack=t.hasFullStack):(r=(a=t)&&a.evt,ye(a)||(a=a[Yt]||r||a),s.typeName=ht(e,sn(a))||Rt,s.message=yt(e,nn(t||a,s.typeName))||Rt,u=t[Zt]||on(t),s.parsedStack=function(){var e=u.obj;if(e&&0<e.length){var t=[],n=0,r=0;if(Se(e,function(e){var e=e.toString();vn.regex.test(e)&&(e=new vn(e,n++),r+=e.sizeInBytes,t.push(e))}),32768<r)for(var i=0,a=t.length-1,o=0,s=i,l=a;i<a;){if(32768<(o+=t[i].sizeInBytes+t[a].sizeInBytes)){t.splice(s,l-s+1);break}s=i,l=a,i++,a--}}return t}(),s[Jt]=(r=e,o="",(a=u)&&(a.obj?Se(a.obj,function(e){o+=e+"\n"}):o=a.src||""),!(t=o)||32768<(e=""+t).length&&(i=e.substring(0,32768),r&&r.throwInternal(M.WARNING,D.ExceptionTruncated,"exception is too long, it has been truncated to 32768 characters.",{exception:t},!0)),i||t),s.hasFullStack=ve(s.parsedStack)&&0<s.parsedStack.length,n&&(n.typeName=n.typeName||s.typeName)),s}t(yn,mn=function(){}),yn.CreateFromInterface=function(e){return new yn(e,null)},yn.prototype.toInterface=function(){return{level:this.level,method:this.method,assembly:this.assembly,fileName:this.fileName,line:this.line}},yn.regex=/^([\s]+at)?[\s]{0,50}([^\@\()]+?)[\s]{0,50}(\@|\()([^\(\n]+):([0-9]+):([0-9]+)(\)?)$/,yn.baseSize=58;var mn,hn,vn=yn;function yn(e,t){var n,r=mn.call(this)||this;return r.sizeInBytes=0,r.aiDataContract={level:1,method:1,assembly:0,fileName:0,line:0},"string"==typeof e?(n=e,r.level=t,r.method="<no_method>",r.assembly=we(n),r.fileName="",r.line=0,(t=n.match(yn.regex))&&5<=t.length&&(r.method=we(t[2])||r.method,r.fileName=we(t[4]),r.line=parseInt(t[5])||0)):(r.level=e.level,r.method=e.method,r.assembly=e.assembly,r.fileName=e.fileName,r.line=e.line,r.sizeInBytes=0),r.sizeInBytes+=r.method.length,r.sizeInBytes+=r.fileName.length,r.sizeInBytes+=r.assembly.length,r.sizeInBytes+=yn.baseSize,r.sizeInBytes+=r.level.toString().length,r.sizeInBytes+=r.line.toString().length,r}hn=0,t(Sn,In=function(){this.kind=hn});var In,Cn=Sn;function Sn(){var e=null!==In&&In.apply(this,arguments)||this;return e.aiDataContract={name:1,kind:0,value:1,count:0,min:0,max:0,stdDev:0},e}t(bn,Tn=function(){this.ver=2,this.metrics=[],this.properties={},this.measurements={}}),bn.envelopeType="Microsoft.ApplicationInsights.{0}.Metric",bn.dataType="MetricData";var Tn,wn=bn;function bn(e,t,n,r,i,a,o,s,c){var l=Tn.call(this)||this,u=(l.aiDataContract={ver:1,metrics:1,properties:0},new Cn);return u.count=0<r?r:undefined,u.max=isNaN(a)||null===a?undefined:a,u.min=isNaN(i)||null===i?undefined:i,u.name=ht(e,t)||Rt,u.value=n,u.stdDev=isNaN(o)||null===o?undefined:o,l.metrics=[u],l.properties=It(e,s),l.measurements=Ct(e,c),l}t(Nn,xn=Wt);var xn,Wt=Nn;function Nn(){var e=xn.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}t(An,_n=Wt),An.envelopeType="Microsoft.ApplicationInsights.{0}.Pageview",An.dataType="PageviewData";var _n,Rn=An;function An(e,t,n,r,i,a,o){var s=_n.call(this)||this;return s.aiDataContract={ver:1,name:0,url:0,duration:0,properties:0,measurements:0,id:0},s.id=o&&St(e,o,128,D.IdTooLong).toString(),s.url=vt(e,n),s.name=ht(e,t)||Rt,isNaN(r)||(s.duration=Tt(r)),s.properties=It(e,i),s.measurements=Ct(e,a),s}t(En,Ln=function(){this.ver=2,this.success=!0,this.properties={},this.measurements={}}),En.envelopeType="Microsoft.ApplicationInsights.{0}.RemoteDependency",En.dataType="RemoteDependencyData";var Ln,Fn=En;function En(e,t,n,c,r,f,i,a,o,d,p,g){void 0===o&&(o="Ajax");var m,s,l,u=Ln.call(this)||this,n=(u.aiDataContract={id:1,ver:1,name:0,resultCode:0,duration:0,success:0,data:0,target:0,type:0,properties:0,measurements:0,kind:0,value:0,count:0,min:0,max:0,stdDev:0,dependencyKind:0,dependencySource:0,commandName:0,dependencyTypeName:0},u.id=t,u.duration=Tt(r),u.success=f,u.resultCode=i+"",u.type=ht(e,o),t=e,r=a,o=i=f=c,i=(a=n)&&0<a.length?(m=a,l=(n=Pt)[s=kt],Bt.createElement?n[s]||(l=n[s]=Bt.createElement("a")):l={host:function(){e=null,!m||null!=(n=m.match(/(\w*):\/\/(.[^/:]+)(\:[\d]+)?/i))&&2<n.length&&Ie(n[2])&&0<n[2].length&&(e=n[2]||"",2<n.length&&(t=(n[1]||"").toLowerCase(),n=n[3]||"",e+=n="http"==t&&":80"===n||"https"==t&&":443"===n?"":n));var e,t=e||"";if(t){var n=t.match(/(www[0-9]?\.)?(.[^/:]+)(\:[\d]+)?/i);if(null!=n&&3<n.length&&Ie(n[2])&&0<n[2].length)return n[2]+(n[3]||"")}return t}()},l.href=m,++s>=n.length&&(s=0),kt=s,s=(n=l).host,i||(null!=n.pathname?("/"!=((l=0===n.pathname.length?"/":n.pathname)[0]||"")&&(l="/"+l),o=n.pathname,ht(t,r?r+" "+l:l)):ht(t,a))):s=f,{target:s,name:i,data:o});return u.data=vt(e,c)||n.data,u.target=ht(e,n.target),d&&(u.target="".concat(u.target," | ").concat(d)),u.name=ht(e,n.name),u.properties=It(e,p),u.measurements=Ct(e,g),u}t(kn,Mn=function(){this.ver=2,this.properties={},this.measurements={}}),kn.envelopeType="Microsoft.ApplicationInsights.{0}.Message",kn.dataType="MessageData";var Mn,Dn,Bn=kn;function kn(e,t,n,r,i){var a=Mn.call(this)||this;return a.aiDataContract={ver:1,message:1,severityLevel:0,properties:0},a.message=yt(e,t=t||Rt),a.properties=It(e,r),a.measurements=Ct(e,i),n&&(a.severityLevel=n),a}function Pn(){var e=Dn.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}t(Pn,Dn=Wt),t(zn,On=Pn),zn.envelopeType="Microsoft.ApplicationInsights.{0}.PageviewPerformance",zn.dataType="PageviewPerformanceData";var On,Un=zn;function zn(e,t,n,r,i,a,o){var s=On.call(this)||this;return s.aiDataContract={ver:1,name:0,url:0,duration:0,perfTotal:0,networkConnect:0,sentRequest:0,receivedResponse:0,domProcessing:0,properties:0,measurements:0},s.url=vt(e,n),s.name=ht(e,t)||Rt,s.properties=It(e,i),s.measurements=Ct(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}t(qn,jn=e);var jn,Kn=qn;function qn(e,t){var n=jn.call(this)||this;return n.aiDataContract={baseType:1,baseData:1},n.baseType=e,n.baseData=t,n}function Vn(e){var t="ai."+e+".";return function(e){return t+e}}var Gn,Wn,Wt=Vn("application"),e=Vn("device"),Hn=Vn("location"),Xn=Vn("operation"),Yn=Vn("session"),Jn=Vn("user"),Zn=Vn("cloud"),$n=Vn("internal"),Qn=(Wn={applicationVersion:Wt("ver"),applicationBuild:Wt("build"),applicationTypeId:Wt("typeId"),applicationId:Wt("applicationId"),applicationLayer:Wt("layer"),deviceId:e("id"),deviceIp:e("ip"),deviceLanguage:e("language"),deviceLocale:e("locale"),deviceModel:e("model"),deviceFriendlyName:e("friendlyName"),deviceNetwork:e("network"),deviceNetworkName:e("networkName"),deviceOEMName:e("oemName"),deviceOS:e("os"),deviceOSVersion:e("osVersion"),deviceRoleInstance:e("roleInstance"),deviceRoleName:e("roleName"),deviceScreenResolution:e("screenResolution"),deviceType:e("type"),deviceMachineName:e("machineName"),deviceVMName:e("vmName"),deviceBrowser:e("browser"),deviceBrowserVersion:e("browserVersion"),locationIp:Hn("ip"),locationCountry:Hn("country"),locationProvince:Hn("province"),locationCity:Hn("city"),operationId:Xn("id"),operationName:Xn("name"),operationParentId:Xn("parentId"),operationRootId:Xn("rootId"),operationSyntheticSource:Xn("syntheticSource"),operationCorrelationVector:Xn("correlationVector"),sessionId:Yn("id"),sessionIsFirst:Yn("isFirst"),sessionIsNew:Yn("isNew"),userAccountAcquisitionDate:Jn("accountAcquisitionDate"),userAccountId:Jn("accountId"),userAgent:Jn("userAgent"),userId:Jn("id"),userStoreRegion:Jn("storeRegion"),userAuthUserId:Jn("authUserId"),userAnonymousUserAcquisitionDate:Jn("anonUserAcquisitionDate"),userAuthenticatedUserAcquisitionDate:Jn("authUserAcquisitionDate"),cloudName:Zn("name"),cloudRole:Zn("role"),cloudRoleVer:Zn("roleVer"),cloudRoleInstance:Zn("roleInstance"),cloudEnvironment:Zn("environment"),cloudLocation:Zn("location"),cloudDeploymentUnit:Zn("deploymentUnit"),internalNodeName:$n("nodeName"),internalSdkVersion:$n("sdkVersion"),internalAgentVersion:$n("agentVersion"),internalSnippet:$n("snippet"),internalSdkSrc:$n("sdkSrc")},t(er,Gn=function(){var n=this;me(Wn,function(e,t){n[e]=t})}),er);function er(){return Gn.call(this)||this}var tr,f=new Qn,Wt=function Ar(n,r){var i=[],a=!1;this._get=function(){return i},this._set=function(e){return i=e},Z(Ar,this,function(t){t.enqueue=function(e){t.count()>=r.eventsLimitInMem()?a||(n.throwInternal(M.WARNING,D.InMemoryStorageBufferFull,"Maximum in-memory buffer size reached: "+t.count(),!0),a=!0):i.push(e)},t.count=function(){return i.length},t.size=function(){for(var e=i.length,t=0;t<i.length;t++)e+=i[t].length;return r.emitLineDelimitedJson()||(e+=2),e},t.clear=function(){a=!(i=[])},t.getItems=function(){return i.slice(0)},t.batchPayloads=function(e){return e&&0<e.length?r.emitLineDelimitedJson()?e.join("\n"):"["+e.join(",")+"]":null}})},nr=(t(rr,tr=Wt),rr);function rr(e,t){e=tr.call(this,e,t)||this;return Z(rr,e,function(e,t){e.markAsSent=function(e){t.clear()},e.clearSent=function(e){}}),e}t(c,ir=Wt),c.BUFFER_KEY="AI_buffer",c.SENT_BUFFER_KEY="AI_sentBuffer",c.MAX_BUFFER_SIZE=2e3;var ir,ar=c;function c(s,l){var e=ir.call(this,s,l)||this,u=!1;return Z(c,e,function(n,t){var e=a(c.BUFFER_KEY),r=a(c.SENT_BUFFER_KEY),r=n._set(e.concat(r));function i(t,e){var n=[];return Se(e,function(e){pe(e)||-1!==function(e,t){if(e){if(e[ne])return e[ne](t,void 0);var n=e.length;try{for(var r=0;r<n;r++)if(r in e&&e[r]===t)return r}catch(i){}}return-1}(t,e)||n.push(e)}),n}function a(e){try{var e=l.namePrefix&&l.namePrefix()?l.namePrefix()+"_"+e:e,t=Mt(s,e);if(t){var n=We().parse(t);if((n=Ie(n)?We().parse(n):n)&&ve(n))return n}}catch(r){s.throwInternal(M.CRITICAL,D.FailedToRestoreStorageBuffer," storage key: "+e+", "+Re(r),{exception:He(r)})}return[]}function o(e,t){try{var e=l.namePrefix&&l.namePrefix()?l.namePrefix()+"_"+e:e,n=JSON.stringify(t);Dt(s,e,n)}catch(r){Dt(s,e,JSON.stringify([])),s.throwInternal(M.WARNING,D.FailedToSetStorageBuffer," storage key: "+e+", "+Re(r)+". Buffer cleared",{exception:He(r)})}}r.length>c.MAX_BUFFER_SIZE&&(r.length=c.MAX_BUFFER_SIZE),o(c.SENT_BUFFER_KEY,[]),o(c.BUFFER_KEY,r),n.enqueue=function(e){n.count()>=c.MAX_BUFFER_SIZE?u||(s.throwInternal(M.WARNING,D.SessionStorageBufferFull,"Maximum buffer size reached: "+n.count(),!0),u=!0):(t.enqueue(e),o(c.BUFFER_KEY,n._get()))},n.clear=function(){t.clear(),o(c.BUFFER_KEY,n._get()),o(c.SENT_BUFFER_KEY,[]),u=!1},n.markAsSent=function(e){o(c.BUFFER_KEY,n._set(i(e,n._get())));var t=a(c.SENT_BUFFER_KEY);t instanceof Array&&e instanceof Array&&((t=t.concat(e)).length>c.MAX_BUFFER_SIZE&&(s.throwInternal(M.CRITICAL,D.SessionStorageBufferFull,"Sent buffer reached its maximum size: "+t.length,!0),t.length=c.MAX_BUFFER_SIZE),o(c.SENT_BUFFER_KEY,t))},n.clearSent=function(e){e=i(e,a(c.SENT_BUFFER_KEY));o(c.SENT_BUFFER_KEY,e)}}),e}var or="baseType",d="baseData",p="properties",sr="true";function g(e,t,n){return Ae(e,t,n,Le)}function lr(e,n,r){B(e)||me(e,function(e,t){"number"==typeof t?r[e]=t:Ie(t)?n[e]=t:Ge()&&(n[e]=We().stringify(t))})}function ur(n,r){B(n)||me(n,function(e,t){n[e]=t||r})}function cr(e,t,n,r){for(var r=new qt(e,r,t),t=(g(r,"sampleRate",n[xt]),(n[d]||{}).startTime&&(r.time=Ce(n[d].startTime)),r.iKey=n.iKey,n.iKey.replace(/-/g,"")),t=(r.name=r.name.replace("{0}",t),e),e=n,i=r,a=i.tags=i.tags||{},o=e.ext=e.ext||{},s=e.tags=e.tags||[],l=o.user,l=(l&&(g(a,f.userAuthUserId,l.authId),g(a,f.userId,l.id||l.localId)),o.app),l=(l&&g(a,f.sessionId,l.sesId),o.device),l=(l&&(g(a,f.deviceId,l.id||l.localId),g(a,f.deviceType,l.deviceClass),g(a,f.deviceIp,l.ip),g(a,f.deviceModel,l.model),g(a,f.deviceType,l.deviceType)),e.ext.web),e=(l&&(g(a,f.deviceLanguage,l.browserLang),g(a,f.deviceBrowserVersion,l.browserVer),g(a,f.deviceBrowser,l.browser),g(e=(e=(e=i.data=i.data||{})[d]=e[d]||{})[p]=e[p]||{},"domain",l.domain),g(e,"isManual",l.isManual?sr:null),g(e,"screenRes",l.screenRes),g(e,"userConsent",l.userConsent?sr:null)),o.os),l=(e&&g(a,f.deviceOS,e.name),o.trace),c=(l&&(g(a,f.operationParentId,l.parentID),g(a,f.operationName,ht(t,l.name)),g(a,f.operationId,l.traceID)),{}),u=s.length-1;0<=u;u--)me(s[u],function(e,t){c[e]=t}),s.splice(u,1);me(s,function(e,t){c[e]=t});e=S(S({},a),c);return e[f.internalSdkVersion]||(e[f.internalSdkVersion]="javascript:".concat(dr.Version)),i.tags=Fe(e),n.tags=n.tags||[],Fe(r)}function fr(e,t){B(t[d])&&e.throwInternal(M.CRITICAL,D.TelemetryEnvelopeInvalid,"telemetryItem.baseData cannot be null.")}var dr={Version:"2.7.4-nightly.2202-03"};function pr(e,t,n){fr(e,t);var r={},i={},n=(t[or]!==Ht.dataType&&(r.baseTypeSource=t[or]),t[or]===Ht.dataType?(r=t[d][p]||{},i=t[d].measurements||{}):t[d]&&lr(t[d],r,i),lr(t.data,r,i),B(n)||ur(r,n),t[d].name),n=new Ht(e,n,r,i),r=new Kn(Ht.dataType,n);return cr(e,Ht.envelopeType,t,r)}var gr=function Lr(f){Z(Lr,this,function(e){function u(o,s){var e="__aiCircularRefCheck",l={};if(!o)return f.throwInternal(M.CRITICAL,D.CannotSerializeObject,"cannot serialize object because it is null or undefined",{name:s},!0),l;if(o[e])return f.throwInternal(M.WARNING,D.CircularReferenceDetected,"Circular reference detected while serializing object",{name:s},!0),l;if(o.aiDataContract)return o[e]=!0,me(o.aiDataContract,function(e,t){var n=pe(t)?1&t():1&t,r=pe(t)?4&t():4&t,t=2&t,i=o[e]!==undefined,a=de(o[e])&&null!==o[e];!n||i||t?r||(n=a?(t?c:u)(o[e],e):o[e])!==undefined&&(l[e]=n):f.throwInternal(M.CRITICAL,D.MissingRequiredFieldSpecification,"Missing required field specification. The field is required but not present on source",{field:e,name:s})}),delete o[e],l;if("measurements"===s)l=n(o,"number",s);else if("properties"===s)l=n(o,"string",s);else if("tags"===s)l=n(o,"string",s);else if(ve(o))l=c(o,s);else{f.throwInternal(M.WARNING,D.CannotSerializeObjectNonSerializable,"Attempting to serialize an object which does not implement ISerializable",{name:s},!0);try{We().stringify(o),l=o}catch(t){f.throwInternal(M.CRITICAL,D.CannotSerializeObject,t&&pe(t.toString)?t.toString():"Error serializing object",null,!0)}}return l}function c(e,t){if(e)if(ve(e))for(var n=[],r=0;r<e.length;r++){var i=u(e[r],t+"["+r+"]");n.push(i)}else f.throwInternal(M.CRITICAL,D.ItemNotInArray,"This field was specified as an array in the contract but the item is not an array.\r\n",{name:t},!0);return n}function n(e,n,r){var i;return e&&(i={},me(e,function(e,t){"string"===n?t===undefined?i[e]="undefined":null===t?i[e]="null":t.toString?i[e]=t.toString():i[e]="invalid field: toString() is not defined.":"number"===n?t===undefined?i[e]="undefined":i[e]=null===t?"null":isNaN(t=parseFloat(t))?"NaN":t:(i[e]="invalid field: "+r+" is of unknown type.",f.throwInternal(M.CRITICAL,i[e],null,!0))})),i}e.serialize=function(e){e=u(e,"root");try{return We().stringify(e)}catch(t){f.throwInternal(M.CRITICAL,D.CannotSerializeObject,t&&pe(t.toString)?t.toString():"Error serializing object",null,!0)}}})};function mr(){var o=je(),s=Ke(),l=!1,u=!0;Z(mr,this,function(e){try{var t,n;o&&ge(o,"online",r)&&(ge(o,"offline",i),l=!0),s&&(fe((t=s.body||s).ononline)||(t.ononline=r,t.onoffline=i,l=!0)),!l||(n=Ve())&&!B(n.onLine)&&(u=n.onLine)}catch(a){l=!1}function r(){u=!0}function i(){u=!1}e.isListening=l,e.isOnline=function(){var e=!0,t=Ve();return l?e=u:t&&!B(t.onLine)&&(e=t.onLine),e},e.isOffline=function(){return!e.isOnline()}})}var hr=mr.Offline=new mr,vr=(yr.prototype.getHashCodeScore=function(e){return this.getHashCode(e)/yr.INT_MAX_VALUE*100},yr.prototype.getHashCode=function(e){if(""===e)return 0;for(;e.length<8;)e=e.concat(e);for(var t=5381,n=0;n<e.length;++n)t=(t<<5)+t+e.charCodeAt(n),t&=t;return Math.abs(t)},yr.INT_MAX_VALUE=2147483647,yr);function yr(){}var Ir=function(){var t=new vr,n=new Qn;this.getSamplingScore=function(e){return e.tags&&e.tags[n.userId]?t.getHashCodeScore(e.tags[n.userId]):e.ext&&e.ext.user&&e.ext.user.id?t.getHashCodeScore(e.ext.user.id):e.tags&&e.tags[n.operationId]?t.getHashCodeScore(e.tags[n.operationId]):e.ext&&e.ext.telemetryTrace&&e.ext.telemetryTrace.traceID?t.getHashCodeScore(e.ext.telemetryTrace.traceID):100*Math.random()}},Cr=(Sr.prototype.isSampledIn=function(e){var t=this.sampleRate;return null===t||t===undefined||100<=t||e.baseType===wn.dataType||this.samplingScoreGenerator.getSamplingScore(e)<t},Sr);function Sr(e,t){this.INT_MAX_VALUE=2147483647;t=t||rt(null);(100<e||e<0)&&(t.throwInternal(M.WARNING,D.SampleRateOutOfRange,"Sampling rate is out of range (0..100). Sampling will be disabled, you may be sending too much data which may affect your AI service level.",{samplingRate:e},!0),e=100),this.sampleRate=e,this.samplingScoreGenerator=new Ir}function Tr(e){try{return e.responseText}catch(t){}return null}function wr(){return{endpointUrl:function(){return"https://dc.services.visualstudio.com/v2/track"},emitLineDelimitedJson:function(){return!1},maxBatchInterval:function(){return 15e3},maxBatchSizeInBytes:function(){return 102400},disableTelemetry:function(){return!1},enableSessionStorageBuffer:function(){return!0},isRetryDisabled:function(){return!1},isBeaconApiDisabled:function(){return!0},disableXhr:function(){return!1},onunloadDisableFetch:function(){return!1},onunloadDisableBeacon:function(){return!1},instrumentationKey:function(){return undefined},namePrefix:function(){return undefined},samplingPercentage:function(){return 100},customHeaders:function(){return undefined},convertUndefined:function(){return undefined},eventsLimitInMem:function(){return 1e4}}}(e={})[Ht.dataType]=pr,e[Bn.dataType]=function(e,t,n){fr(e,t);var r=t[d].message,i=t[d].severityLevel,a=t[d][p]||{},o=t[d].measurements||{},n=(lr(t.data,a,o),B(n)||ur(a,n),new Bn(e,r,i,a,o)),r=new Kn(Bn.dataType,n);return cr(e,Bn.envelopeType,t,r)},e[Rn.dataType]=function(e,t,n){fr(e,t);var r,i="duration",a=t[d],i=(B(a)||B(a[p])||B(a[p][i])?B(t.data)||B(t.data[i])||(r=t.data[i],delete t.data[i]):(r=a[p][i],delete a[p][i]),t[d]),a=(((t.ext||{}).trace||{}).traceID&&(o=t.ext.trace.traceID),i.id||o),o=i.name,s=i.uri,l=i[p]||{},u=i.measurements||{},i=(B(i.refUri)||(l.refUri=i.refUri),B(i.pageType)||(l.pageType=i.pageType),B(i.isLoggedIn)||(l.isLoggedIn=i.isLoggedIn.toString()),B(i[p])||me(i[p],function(e,t){l[e]=t}),lr(t.data,l,u),B(n)||ur(l,n),new Rn(e,o,s,r,l,u,a)),n=new Kn(Rn.dataType,i);return cr(e,Rn.envelopeType,t,n)},e[Un.dataType]=function(e,t,n){fr(e,t);var r=t[d],i=r.name,a=r.uri||r.url,o=r[p]||{},s=r.measurements||{},n=(lr(t.data,o,s),B(n)||ur(o,n),new Un(e,i,a,undefined,o,s,r)),i=new Kn(Un.dataType,n);return cr(e,Un.envelopeType,t,i)},e[cn.dataType]=function(e,t,n){fr(e,t);var r=t[d].measurements||{},i=t[d][p]||{},n=(lr(t.data,i,r),B(n)||ur(i,n),t[d]),n=cn.CreateFromInterface(e,n,i,r),i=new Kn(cn.dataType,n);return cr(e,cn.envelopeType,t,i)},e[wn.dataType]=function(e,t,n){fr(e,t);var r=t[d],i=r[p]||{},a=r.measurements||{},n=(lr(t.data,i,a),B(n)||ur(i,n),new wn(e,r.name,r.average,r.sampleCount,r.min,r.max,r.stdDev,i,a)),r=new Kn(wn.dataType,n);return cr(e,wn.envelopeType,t,r)},e[Fn.dataType]=function(e,t,n){fr(e,t);var r=t[d].measurements||{},i=t[d][p]||{},n=(lr(t.data,i,r),B(n)||ur(i,n),t[d]);if(B(n))return e.warnToConsole("Invalid input for dependency data"),null;var a=n[p]&&n[p][_t]?n[p][_t]:"GET",a=new Fn(e,n.id,n.target,n.name,n.duration,n.success,n.responseCode,a,n.type,n.correlationContext,i,r),n=new Kn(Fn.dataType,a);return cr(e,Fn.envelopeType,t,n)};var br,xr=e;function Nr(){var w,b,n,E,x,N,_,R=br.call(this)||this,A=(R.priority=1001,!(R.identifier="AppInsightsChannelPlugin")),L={},F=0;return R._senderConfig=wr(),Z(Nr,R,function(u,h){function c(e,t,n,r,i,a){var o=null;u._appId||(o=f(a))&&o.appId&&(u._appId=o.appId),(e<200||300<=e)&&0!==e?(301!==e&&307!==e&&308!==e||s(n))&&!u._senderConfig.isRetryDisabled()&&I(e)?(d(t),u.diagLog().throwInternal(M.WARNING,D.TransmissionFailed,". Response code "+e+". Will retry to send "+t.length+" items.")):u._onError(t,i):hr.isOffline()?u._senderConfig.isRetryDisabled()||(d(t,10),u.diagLog().throwInternal(M.WARNING,D.TransmissionFailed,". Offline - Response Code: ".concat(e,". Offline status: ").concat(hr.isOffline(),". Will retry to send ").concat(t.length," items."))):(s(n),206===e?(o=o||f(a))&&!u._senderConfig.isRetryDisabled()?u._onPartialSuccess(t,o):u._onError(t,i):(w=0,u._onSuccess(t,r)))}function s(e){return!(10<=x)&&!B(e)&&""!==e&&e!==u._senderConfig.endpointUrl()&&(u._senderConfig.endpointUrl=function(){return e},++x,1)}function t(e,t){_?_(e,!1):o(e)}function a(e){var t=Ve(),n=u._buffer,r=u._senderConfig.endpointUrl(),i=u._buffer.batchPayloads(e),i=new Blob([i],{type:"text/plain;charset=UTF-8"}),r=t.sendBeacon(r,i);return r&&(n.markAsSent(e),u._onSuccess(e,e.length)),r}function o(e,t){if(ve(e)&&0<e.length&&!a(e)){for(var n=[],r=0;r<e.length;r++){var i=e[r];a([i])||n.push(i)}0<n.length&&(N(n,!0),u.diagLog().throwInternal(M.WARNING,D.TransmissionFailed,". Failed to send telemetry with Beacon API, retried with normal sender."))}}function l(t,e){var n=new XMLHttpRequest,r=u._senderConfig.endpointUrl();try{n[bt]=!0}catch(i){}n.open("POST",r,e),n.setRequestHeader("Content-type","application/json"),Ut(r)&&n.setRequestHeader("Sdk-Context","appId"),Se(Ne(L),function(e){n.setRequestHeader(e,L[e])}),n.onreadystatechange=function(){return u._xhrReadyStateChange(n,t,t.length)},n.onerror=function(e){return u._onError(t,m(n),e)};e=u._buffer.batchPayloads(t);n.send(e),u._buffer.markAsSent(t)}function v(e,t){if(ve(e)){for(var n=e.length,r=0;r<e.length;r++)n+=e[r].length;F+n<=65e3?i(e,!1):Xe()?o(e):(N&&N(e,!0),u.diagLog().throwInternal(M.WARNING,D.TransmissionFailed,". Failed to send telemetry with Beacon API, retried with xhrSender."))}}function y(e,t){i(e,!0)}function i(n,r){var e=u._senderConfig.endpointUrl(),t=u._buffer.batchPayloads(n),i=new Blob([t],{type:"application/json"}),a=new Headers,o=t.length,t=!1,s=!1,e=(Ut(e)&&a.append("Sdk-Context","appId"),Se(Ne(L),function(e){a.append(e,L[e])}),(i={method:"POST",headers:a,body:i})[bt]=!0,r||(t=i.keepalive=!0,F+=o),new Request(e,i));try{e[bt]=!0}catch(l){}u._buffer.markAsSent(n);try{fetch(e).then(function(t){r||(F-=o,o=0),s||(s=!0,t.ok?t.text().then(function(e){c(t.status,n,t.url,n.length,t.statusText,e)}):u._onError(n,t.statusText))})["catch"](function(e){r||(F-=o,o=0),s||(s=!0,u._onError(n,e.message))})}catch(l){s||u._onError(n,He(l))}t&&!s&&(s=!0,u._onSuccess(n,n.length))}function f(e){try{if(e&&""!==e){var t=We().parse(e);if(t&&t.itemsReceived&&t.itemsReceived>=t.itemsAccepted&&t.itemsReceived-t.itemsAccepted===t.errors.length)return t}}catch(n){u.diagLog().throwInternal(M.CRITICAL,D.InvalidBackendResponse,"Cannot parse the response. "+Re(n),{response:e})}return null}function d(e,t){if(void 0===t&&(t=1),e&&0!==e.length){var n=u._buffer;n.clearSent(e),w++;for(var r=0,i=e;r<i.length;r++){var a=i[r];n.enqueue(a)}t=w<=1?10:(e=1+Math.floor((Math.pow(2,w)-1)/2*Math.random()*10),Math.max(Math.min(e*=t,3600),10)),e=_e()+1e3*t;b=e,p()}}function p(){var e;n||A||(e=b?Math.max(0,b-_e()):0,e=Math.max(u._senderConfig.maxBatchInterval(),e),n=setTimeout(function(){n=null,u.triggerSend(!0,null,1)},e))}function g(){clearTimeout(n),b=n=null}function I(e){return 408===e||429===e||500===e||503===e}function m(e,t){return e?"XMLHttpRequest,Status:"+e.status+",Response:"+Tr(e)||e.response||"":t}function C(t,e){var n=u._buffer,r=je(),i=new XDomainRequest,r=(i.onload=function(){return u._xdrOnLoad(i,t)},i.onerror=function(e){return u._onError(t,S(i),e)},r&&r.location&&r.location.protocol||"");if(u._senderConfig.endpointUrl().lastIndexOf(r,0))return u.diagLog().throwInternal(M.WARNING,D.TransmissionFailed,". Cannot send XDomain request. The endpoint URL protocol doesn't match the hosting page protocol."),void n.clear();r=u._senderConfig.endpointUrl().replace(/^(https?:)/,""),i.open("POST",r),r=n.batchPayloads(t);i.send(r),n.markAsSent(t)}function S(e,t){return e?"XDomainRequest,Response:"+Tr(e)||"":t}function T(e,t){var n="getNotifyMgr",n=u.core[n]?u.core[n]():u.core._notificationManager;if(n&&n.eventsSendRequest)try{n.eventsSendRequest(e,t)}catch(r){u.diagLog().throwInternal(M.CRITICAL,D.NotificationException,"send request notification failed: "+Re(r),{exception:He(r)})}}u.pause=function(){g(),A=!0},u.resume=function(){A&&(A=!1,b=null,u._buffer.size()>u._senderConfig.maxBatchSizeInBytes()&&u.triggerSend(!0,null,10),p())},u.flush=function(){if(!A){g();try{u.triggerSend(!0,null,1)}catch(e){u.diagLog().throwInternal(M.CRITICAL,D.FlushFailed,"flush failed, telemetry will not be collected: "+Re(e),{exception:He(e)})}}},u.onunloadFlush=function(){if(!A)if(!1!==u._senderConfig.onunloadDisableBeacon()&&!1!==u._senderConfig.isBeaconApiDisabled()||!Xe())u.flush();else try{u.triggerSend(!0,t,2)}catch(e){u.diagLog().throwInternal(M.CRITICAL,D.FailedToSendQueuedTelemetry,"failed to flush with beacon sender on page unload, telemetry will not be collected: "+Re(e),{exception:He(e)})}},u.teardown=function(){throw Error("Method not implemented.")},u.addHeader=function(e,t){L[e]=t},u.initialize=function(e,t,n,r){h.initialize(e,t,n,r);var i=u._getTelCtx(),a=u.identifier,n=(E=new gr(t.logger),b=null,w=0,u._sender=null,x=0,u.diagLog()),r=(me(wr(),function(e,t){u._senderConfig[e]=function(){return i.getConfig(a,e,t())}}),u._buffer=new(u._senderConfig.enableSessionStorageBuffer()&&Et()?ar:nr)(n,u._senderConfig),u._sample=new Cr(u._senderConfig.samplingPercentage(),n),!B(e.disableInstrumentationKeyValidation)&&e.disableInstrumentationKeyValidation||/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/.test(e.instrumentationKey)||n.throwInternal(M.CRITICAL,D.InvalidInstrumentationKey,"Invalid Instrumentation key "+e.instrumentationKey),!Ut(u._senderConfig.endpointUrl())&&u._senderConfig.customHeaders()&&0<u._senderConfig.customHeaders().length&&Se(u._senderConfig.customHeaders(),function(e){R.addHeader(e.header,e.value)}),u._senderConfig),t=null;!r.disableXhr()&&Je()?t=C:!r.disableXhr()&&Ze()&&(t=l),!t&&Ye()&&(t=y),N=t||l,!r.isBeaconApiDisabled()&&Xe()&&(t=o),u._sender=t||l,_=!r.onunloadDisableFetch()&&Ye(!0)?v:Xe()?o:!r.disableXhr()&&Je()?C:!r.disableXhr()&&Ze()?l:N},u.processTelemetry=function(e,n){n=u._getTelCtx(n);try{if(u._senderConfig.disableTelemetry())return;if(!e)return void n.diagLog().throwInternal(M.CRITICAL,D.CannotSendEmptyTelemetry,"Cannot send empty telemetry");if(e.baseData&&!e.baseType)return void n.diagLog().throwInternal(M.CRITICAL,D.InvalidEvent,"Cannot send telemetry without baseData and baseType");if(e.baseType||(e.baseType="EventData"),!u._sender)return void n.diagLog().throwInternal(M.CRITICAL,D.SenderNotInitialized,"Sender was not initialized");if(!u._sample.isSampledIn(e))return void n.diagLog().throwInternal(M.WARNING,D.TelemetrySampledAndNotSent,"Telemetry item was sampled out and not sent",{SampleRate:u._sample.sampleRate});e[xt]=u._sample.sampleRate;var t=u._senderConfig.convertUndefined()||undefined,r=e.iKey||u._senderConfig.instrumentationKey(),i=Nr.constructEnvelope(e,r,n.diagLog(),t);if(!i)return void n.diagLog().throwInternal(M.CRITICAL,D.CreateEnvelopeError,"Unable to create an AppInsights envelope");var a=!1;if(e.tags&&e.tags[Nt]&&(Se(e.tags[Nt],function(e){try{e&&!1===e(i)&&(a=!0,n.diagLog().warnToConsole("Telemetry processor check returns false"))}catch(t){n.diagLog().throwInternal(M.CRITICAL,D.TelemetryInitializerFailed,"One of telemetry initializers failed, telemetry item will not be sent: "+Re(t),{exception:He(t)},!0)}}),delete e.tags[Nt]),a)return;var o=E.serialize(i),s=u._buffer;s.size()+o.length>u._senderConfig.maxBatchSizeInBytes()&&u.triggerSend(!0,null,10),s.enqueue(o),p()}catch(l){n.diagLog().throwInternal(M.WARNING,D.FailedAddingTelemetryToBuffer,"Failed adding telemetry to the sender's buffer, some telemetry will be lost: "+Re(l),{exception:He(l)})}u.processNext(e,n)},u._xhrReadyStateChange=function(e,t,n){4===e.readyState&&c(e.status,t,e.responseURL,n,m(e),Tr(e)||e.response)},u.triggerSend=function(e,t,n){if(void 0===e&&(e=!0),!A)try{var r,i=u._buffer;u._senderConfig.disableTelemetry()?i.clear():0<i.count()&&(r=i.getItems(),T(n||0,e),t?t.call(R,r,e):u._sender(r,e)),g()}catch(a){i=function(e){var t=((e=(e=void 0===e?null:e)?e:(t=Ve()||{})?(t.userAgent||"").toLowerCase():"")||"").toLowerCase();if(he(t,"msie"))return e=Ke()||{},Math.max(parseInt(t.split("msie")[1]),e.documentMode||0);if(he(t,Be)){e=parseInt(t.split(Be)[1]);if(e)return e+4}return null}();(!i||9<i)&&u.diagLog().throwInternal(M.CRITICAL,D.TransmissionFailed,"Telemetry transmission failed, some telemetry will be lost: "+Re(a),{exception:He(a)})}},u._onError=function(e,t,n){u.diagLog().throwInternal(M.WARNING,D.OnError,"Failed to send telemetry.",{message:t}),u._buffer.clearSent(e)},u._onPartialSuccess=function(e,t){for(var n=[],r=[],i=0,a=t.errors.reverse();i<a.length;i++){var o=a[i],s=e.splice(o.index,1)[0];(I(o.statusCode)?r:n).push(s)}0<e.length&&u._onSuccess(e,t.itemsAccepted),0<n.length&&u._onError(n,m(null,["partial success",t.itemsAccepted,"of",t.itemsReceived].join(" "))),0<r.length&&(d(r),u.diagLog().throwInternal(M.WARNING,D.TransmissionFailed,"Partial success. Delivered: "+e.length+", Failed: "+n.length+". Will retry to send "+r.length+" our of "+t.itemsReceived+" items"))},u._onSuccess=function(e,t){u._buffer.clearSent(e)},u._xdrOnLoad=function(e,t){var n=Tr(e);!e||n+""!="200"&&""!==n?(n=f(n))&&n.itemsReceived&&n.itemsReceived>n.itemsAccepted&&!u._senderConfig.isRetryDisabled()?u._onPartialSuccess(t,n):u._onError(t,S(e)):(w=0,u._onSuccess(t,0))}}),R}t(Nr,br=pt),Nr.constructEnvelope=function(e,t,n,r){e=t===e.iKey||B(t)?e:S(S({},e),{iKey:t});return(xr[e.baseType]||pr)(n,e,r)},n.Sender=Nr;Hn=n,Xn="__esModule",Yn={value:!0},Jn=Object.defineProperty;if(Jn)try{return void Jn(Hn,Xn,Yn)}catch(Fr){}typeof Yn.value!==undefined&&(Hn[Xn]=Yn.value)};"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).Microsoft=e.Microsoft||{},e.Microsoft.ApplicationInsights=e.Microsoft.ApplicationInsights||{}));
|
|
6
6
|
//# sourceMappingURL=applicationinsights-channel-js.min.js.map
|