@microsoft/applicationinsights-dependencies-js 2.8.0-beta.2203-05 → 2.8.0-beta.2203-08
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-dependencies-js.integrity.json +9 -9
- package/browser/applicationinsights-dependencies-js.js +1 -1
- package/browser/applicationinsights-dependencies-js.js.map +1 -1
- package/browser/applicationinsights-dependencies-js.min.js +1 -1
- package/browser/applicationinsights-dependencies-js.min.js.map +1 -1
- package/dist/applicationinsights-dependencies-js.d.ts +1 -1
- package/dist/applicationinsights-dependencies-js.js +1 -1
- package/dist/applicationinsights-dependencies-js.js.map +1 -1
- package/dist/applicationinsights-dependencies-js.min.js +1 -1
- package/dist/applicationinsights-dependencies-js.min.js.map +1 -1
- package/dist/applicationinsights-dependencies-js.rollup.d.ts +1 -1
- package/dist-esm/TraceParent.js +1 -1
- package/dist-esm/ajax.js +1 -1
- package/dist-esm/ajaxRecord.js +1 -1
- package/dist-esm/ajaxUtils.js +1 -1
- package/dist-esm/applicationinsights-dependencies-js.js +1 -1
- package/package.json +3 -3
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Application Insights JavaScript SDK - Dependencies Plugin, 2.8.0-beta.2203-
|
|
2
|
+
* Application Insights JavaScript SDK - Dependencies Plugin, 2.8.0-beta.2203-08
|
|
3
3
|
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
4
4
|
*/
|
|
5
5
|
var e=this,t=function(a){"use strict";var i="function",u="object",o="undefined",N="prototype",d="hasOwnProperty",n=Object,q=n[N],e=n.assign,A=n.create,F=n.defineProperty,p=q[d],t=null;function $(e){return void 0===e&&(e=!0),t&&e||(typeof globalThis!==o&&globalThis&&(t=globalThis),typeof self!==o&&self&&(t=self),typeof window!==o&&window&&(t=window),typeof global!==o&&global&&(t=global)),t}function R(e){throw new TypeError(e)}($()||{}).Symbol,($()||{}).Reflect;var J=e||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])q[d].call(t,o)&&(e[o]=t[o]);return e},D=function(e,t){return(D=n.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t[d](n)&&(e[n]=t[n])})(e,t)};function E(e,t){function n(){this.constructor=e}typeof t!==i&&null!==t&&R("Class extends value "+t+" is not a constructor or null"),D(e,t),e[N]=null===t?function(e){if(A)return A(e);if(null==e)return{};var t=typeof e;function n(){}return t!==u&&t!==i&&R("Object prototype may only be an Object:"+e),n[N]=e,new n}(t):(n[N]=t[N],new n)}var L="constructor",g="prototype",k="function",j="_dynInstFuncs",H="_isDynProxy",h="_dynClass",P="_dynInstChk",Y=P,Z="_dfOpts",Q="_unknown_",ee="__proto__",te="useBaseInst",ne="setInstFuncs",re=Object,oe=re.getPrototypeOf,ae=0;function v(e,t){return e&&re[g].hasOwnProperty.call(e,t)}function ie(e){return e&&(e===re[g]||e===Array[g])}function ue(e){return ie(e)||e===Function[g]}function m(e){if(e){if(oe)return oe(e);e=e[ee]||e[g]||(e[L]?e[L][g]:null);if(e)return e}return null}function se(e,t){var n=[],r=re.getOwnPropertyNames;if(r)n=r(e);else for(var o in e)"string"==typeof o&&v(e,o)&&n.push(o);if(n&&0<n.length)for(var a=0;a<n.length;a++)t(n[a])}function ce(e,t,n){return t!==L&&typeof e[t]===k&&(n||v(e,t))}function le(e){throw new TypeError("DynamicProto: "+e)}function de(e,t){for(var n=e.length-1;0<=n;n--)if(e[n]===t)return 1}function fe(e,t){return v(e,g)?e.name||t||Q:((e||{})[L]||{}).name||t||Q}function x(e,r,t,n){v(e,g)||le("theClass is an invalid class definition.");var o,a,i,u,s,c,l=e[g],d=(function(e){if(oe)for(var t=[],n=m(r);n&&!ue(n)&&!de(t,n);){if(n===e)return 1;t.push(n),n=m(n)}}(l)||le("["+fe(e)+"] is not in class hierarchy of ["+fe(r)+"]"),null),e=(v(l,h)?d=l[h]:(d="_dynCls$"+fe(e,"_")+"$"+ae,ae++,l[h]=d),x[Z]),f=!!e[te],p=(f&&n&&n[te]!==undefined&&(f=!!n[te]),a={},se(o=r,function(e){!a[e]&&ce(o,e,!1)&&(a[e]=o[e])}),a),f=(t(r,function(e,t,n,a){function r(e,t,n){var r,o=t[n];return o[H]&&a&&!1!==(r=e[j]||{})[Y]&&(o=(r[t[h]]||{})[n]||o),function(){return o.apply(e,arguments)}}for(var o={},i=(se(n,function(e){o[e]=r(t,n,e)}),m(e)),u=[];i&&!ue(i)&&!de(u,i);)se(i,function(e){!o[e]&&ce(i,e,!oe)&&(o[e]=r(t,i,e))}),u.push(i),i=m(i);return o}(l,r,p,f)),!!oe&&!!e[ne]);i=l,t=d,u=r,s=p,e=!1!==(f=f&&n?!!n[ne]:f),ie(i)||(l=u[j]=u[j]||{},c=l[t]=l[t]||{},!1!==l[Y]&&(l[Y]=!!e),se(u,function(e){var n,r,o;ce(u,e,!1)&&u[e]!==s[e]&&(c[e]=u[e],delete u[e],v(i,e)&&(!i[e]||i[e][H])||(i[e]=(n=i,r=e,(o=function(){var e,t;return(function(e,t,n,r){var o=null;if(e&&v(n,h)){var a=e[j]||{};if((o=(a[n[h]]||{})[t])||le("Missing ["+t+"] "+k),!o[P]&&!1!==a[Y]){for(var i=!v(e,t),u=m(e),s=[];i&&u&&!ue(u)&&!de(s,u);){var c=u[t];if(c){i=c===r;break}s.push(u),u=m(u)}try{i&&(e[t]=o),o[P]=1}catch(l){a[Y]=!1}}}return o}(this,r,n,o)||(typeof(t=(t=n[e=r])===o?m(n)[e]:t)!==k&&le("["+e+"] is not a "+k),t)).apply(this,arguments)})[H]=1,o)))}))}x[Z]={setInstFuncs:!0,useBaseInst:!0};var f="",pe="isInitialized",y="teardown",C="core",ge="update",he="disabled",ve="_doTeardown",me="toISOString",xe="trim",e="toString",ye="constructor",Ce=F,Te=n.freeze,be=n.keys,Se=String[N][xe],Ie=Date[N][me],we=Array.isArray,Me=q[e],qe=p[e],Ae=qe.call(n),Fe=/-([a-z])/g,Re=/([^\w\d_$])/g,De=/^(\d+[\w\d_$])/,Ee=Object.getPrototypeOf;function Le(e){if(e){if(Ee)return Ee(e);e=e.__proto__||e[N]||e[ye];if(e)return e}return null}function ke(e){return e===undefined||typeof e===o}function _(e){return null===e||ke(e)}function je(e){return!(!e||typeof e!==u)}function O(e){return!(!e||typeof e!==i)}function He(e){var t=e;return e&&B(e)?(t=(t=e.replace(Fe,function(e,t){return t.toUpperCase()})).replace(Re,"_")).replace(De,function(e,t){return"_"+t}):t}function U(e,t){if(e)for(var n in e)p.call(e,n)&&t.call(e,n,e[n])}function Pe(e,t){return!(!e||!t||!~e.indexOf(t))}var V=we||function(e){return!(!e||"[object Array]"!==Me.call(e))};function B(e){return"string"==typeof e}function Ne(e){return e&&"object"==typeof e&&(!(e=(Ee||Le)(e))||typeof(e=e[ye]&&p.call(e,ye)?e[ye]:e)===i&&qe.call(e)===Ae)}function z(e,t,n){var r=e.length;try{for(var o=0;o<r&&!(o in e&&-1===t.call(n||e,e[o],o,e));o++);}catch(a){}}function _e(e){return e&&(Se&&e[xe]?e[xe]():e.replace?e.replace(/^\s+|\s+$/g,""):e)}var Oe=!{toString:null}.propertyIsEnumerable("toString"),Ue=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"];function Ve(e){var t=typeof e;if(t===i||t===u&&null!==e||R("objKeys called on non-object"),!Oe&&be)return be(e);var n,r=[];for(n in e)e&&p.call(e,n)&&r.push(n);if(Oe)for(var o=Ue.length,a=0;a<o;a++)e&&p.call(e,Ue[a])&&r.push(Ue[a]);return r}var Be=Te||function(e){return e};function ze(){var e=Date;return e.now?e.now():(new e).getTime()}function Ke(e){var n={};return U(e,function(e,t){if(n[e]=t,!ke(n[t]))throw Error("["+t+"] exists for "+e);n[t]=e}),Be(n)}var Xe="window",We="documentMode",Ge="console",$e="performance",Je="JSON",Ye="crypto",Ze="msCrypto",Qe="msie",et="trident/",tt="XMLHttpRequest",nt=null,rt=null;function c(e){var t=$();return t&&t[e]?t[e]:e===Xe&&typeof window===u&&window?window:null}function ot(){return typeof document===u&&document?document:c("document")}function at(){return typeof navigator===u&&navigator?navigator:c("navigator")}function it(){return c($e)}function ut(){return typeof JSON===u&&JSON||null!==c(Je)}function st(){return ut()?JSON||c(Je):null}function K(e){var t=Object[N].toString.call(e),n=f;return"[object Error]"===t?n="{ stack: '"+e.stack+"', message: '"+e.message+"', name: '"+e.name+"'":ut()&&(n=st().stringify(e)),t+n}var ct=null;function lt(e){return e?'"'+e.replace(/\"/g,f)+'"':f}function dt(e,t){var n,r=typeof console!==o?console:c(Ge);r&&(n="log",O(r[n=r[e]?e:n])&&r[n](t))}pt.dataType="MessageData";var ft=pt;function pt(e,t,n,r){void 0===n&&(n=!1),this.messageId=e,this.message=(n?"AI: ":"AI (Internal): ")+e;n=f,ut()&&(n=st().stringify(r)),e=(t?" message:"+lt(t):f)+(r?" props:"+lt(n):f);this.message+=e}var gt=function _n(o){this.identifier="DiagnosticLogger",this.queue=[];var u=0,s={};x(_n,this,function(a){function e(e,t){e=o[e];return _(e)?t:e}function i(e,t){var n,r=(n=(n=ct)||!0===o.disableDbgExt?n:ct||(r=c("Microsoft"),ct=r?r.ApplicationInsights:ct))?n.ChromeDbgExt:null;r&&r.diagLog&&r.diagLog(e,t)}_(o)&&(o={}),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,o){t=new ft(t,n,o=void 0!==o&&o,r);if(a.enableDebugExceptions())throw t;n=1===e?"errorToConsole":"warnToConsole";ke(t.message)?i("throw"+(1===e?"Critical":"Warning"),t):(r=a.consoleLoggingLevel(),o?(o=+t.messageId,!s[o]&&e<=r&&(a[n](t.message),s[o]=!0)):e<=r&&a[n](t.message),a.logInternalMessage(e,t))},a.warnToConsole=function(e){dt("warn",e),i("warning",e)},a.errorToConsole=function(e){dt("error",e),i("error",e)},a.resetInternalMessageCount=function(){u=0,s={}},a.logInternalMessage=function(e,t){var n,r;u>=a.maxInternalMessageLimit()||(r=!0,n="AITR_"+t.messageId,s[n]?r=!1:s[n]=!0,r&&(e<=a.telemetryLoggingLevel()&&(a.queue.push(t),u++,i(1===e?"error":"warn",t)),u===a.maxInternalMessageLimit()&&(r=new ft(23,n="Internal events throttle limit per PageView reached for this app.",!1),a.queue.push(r),1===e?a.errorToConsole(n):a.warnToConsole(n))))}})};function T(e,t,n,r,o,a){void 0===a&&(a=!1),(e||new gt).throwInternal(t,n,r,o,a)}s.ParentContextKey="parent",s.ChildrenContextKey="childEvts";var ht=s;function s(e,o,t){var r,a=this,i=!1;a.start=ze(),a.name=e,a.isAsync=t,a.isChildEvt=function(){return!1},O(o)&&(i=function(e){if(Ce)try{var t={enumerable:!0,configurable:!0,get:function(){return!r&&O(o)&&(r=o(),o=null),r}};return Ce(e,"payload",t),!0}catch(n){}return!1}(a)),a.getCtx=function(e){return e?(e===s.ParentContextKey||e===s.ChildrenContextKey?a:a.ctx||{})[e]:null},a.setCtx=function(e,t){e&&(e===s.ParentContextKey?(a[e]||(a.isChildEvt=function(){return!0}),a[e]=t):e===s.ChildrenContextKey?a[e]=t:(a.ctx=a.ctx||{})[e]=t)},a.complete=function(){var e=0,t=a.getCtx(s.ChildrenContextKey);if(V(t))for(var n=0;n<t.length;n++){var r=t[n];r&&(e+=r.time)}a.time=ze()-a.start,a.exTime=a.time-e,a.complete=function(){},!i&&O(o)&&(a.payload=o())}}var vt="CoreUtils.doPerf";function mt(e,t,n,r,o){if(e)if(e=O(e.getPerfMgr)?e.getPerfMgr():e){var a,i=void 0,u=e.getCtx(vt);try{if(i=e.create(t(),r,o))return u&&i.setCtx&&(i.setCtx(ht.ParentContextKey,u),u.getCtx&&u.setCtx&&((a=u.getCtx(ht.ChildrenContextKey))||(a=[],u.setCtx(ht.ChildrenContextKey,a)),a.push(i))),e.setCtx(vt,i),n(i)}catch(s){i&&i.setCtx&&i.setCtx("exception",s)}finally{i&&e.fire(i),e.setCtx(vt,u)}}n()}var xt=4294967296,l=4294967295,yt=!1,Ct=123456789,Tt=987654321;function bt(e){var t,n=0,r=c(Ye)||c(Ze);if(0===(n=r&&r.getRandomValues?r.getRandomValues(new Uint32Array(1))[0]&l:n)&&(!(r=at())||r.userAgent===rt&&null!==nt||(r=((rt=r.userAgent)||f).toLowerCase(),nt=Pe(r,Qe)||Pe(r,et)),nt)){if(!yt)try{var o=2147483647&ze();(t=(Math.random()*xt^o)+o)<0&&(t>>>=0),Ct=123456789+t&l,Tt=987654321-t&l,yt=!0}catch(a){}r=((Tt=36969*(65535&Tt)+(Tt>>16)&l)<<16)+(65535&(Ct=18e3*(65535&Ct)+(Ct>>16)&l))>>>0&l|0,n=(r>>>=0)&l}return 0===n&&(n=Math.floor(xt*Math.random()|0)),e||(n>>>=0),n}var St=F,It="2.7.3",wt="."+function(e){void 0===e&&(e=22);for(var t=bt()>>>0,n=0,r=f;r.length<e;)r+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[0|63&t]||"",t>>>=6,5==++n&&(t=(bt()<<2&4294967295|3&t)>>>0,n=0);return r}(6),Mt=0;function qt(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType}function At(e,t){return He(e+Mt+++((t=void 0!==t&&t)?"."+It:"")+wt)}function Ft(e){var a={id:At("_aiData-"+(e||"")+"."+It),accept:qt,get:function(e,t,n,r){var o=e[a.id];return o?o[He(t)]:(r&&((o=function(e,t){var n=t[e.id];if(!n){n={};try{qt(t)&&!function(e,t,n){if(St)try{return St(e,t,{value:n,enumerable:!1,configurable:!0}),1}catch(r){}}(t,e.id,n)&&(t[e.id]=n)}catch(r){}}return n}(a,e))[He(t)]=n),n)},kill:function(e,t){if(e&&e[t])try{delete e[t]}catch(n){}}};return a}var Rt=Ft("plugin");function Dt(e){return Rt.get(e,"state",{},!0)}var Et="TelemetryPluginChain",Lt="_hasRun",kt="_getTelCtx",jt=0;function Ht(e,i,n,t){var r=null,o=[],a=(null!==t&&(r=t?function(e,t,n,r){for(;e;){if(e.getPlugin()===r)return e;e=e.getNext()}return Nt([r],t,n)}(e,i,n,t):e),{_next:function(){var e,t=r;return r=t?t.getNext():null,t||(e=o)&&0<e.length&&(z(e,function(e){try{e.func.call(e.self,e.args)}catch(t){T(n.logger,2,73,"Unexpected Exception during onComplete - "+K(t))}}),o=[]),t},ctx:{core:function(){return n},diagLog:function(){return(n||{}).logger||new gt(i)},getCfg:function(){return i},getExtCfg:u,getConfig:function(e,t,n){void 0===n&&(n=!1);var r,e=u(e,null);return e&&!_(e[t])?r=e[t]:i&&!_(i[t])&&(r=i[t]),_(r)?n:r},hasNext:function(){return!!r},getNext:function(){return r},setNext:function(e){r=e},iterate:function(e){for(;t=a._next();){var t=t.getPlugin();t&&e(t)}},onComplete:function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];e&&o.push({func:e,self:ke(t)?a.ctx:t,args:n})}}});function u(e,t,n){var r,o,a;return void 0===t&&(t={}),void 0===n&&(n=0),(r=i&&(o=i.extensionConfig)&&e?o[e]:r)?je(t)&&0!==n&&(a=function f(){var e=arguments,t=e[0]||{},n=e.length,r=!1,o=1;for(0<n&&"boolean"==typeof t&&(r=t,t=e[o]||{},o++),je(t)||(t={});o<n;o++){var a,i,u,s,c=e[o],l=V(c),d=je(c);for(a in c)(l&&a in c||d&&p.call(c,a))&&(i=c[a],u=void 0,r&&i&&((u=V(i))||Ne(i))&&(s=t[a],u?V(s)||(s=[]):Ne(s)||(s={}),i=f(r,s,i)),i!==undefined&&(t[a]=i))}return t}(!0,t,r),i&&2===n&&U(t,function(e){var t;_(a[e])&&!_(t=i[e])&&(a[e]=t)})):r=t,r}return a}function Pt(e,n,r,t){var o=Ht(e,n,r,t),a=o.ctx;return a.processNext=function(e){var t=o._next();return t&&t.processTelemetry(e,a),!t},a.createNew=function(e,t){return Pt((e=V(e=void 0===e?null:e)?Nt(e,n,r,t):e)||a.getNext(),n,r,t)},a}function Nt(e,t,n,r){var o,a=null,i=!r;return V(e)&&0<e.length&&(o=null,z(e,function(e){(i=!i&&r===e||i)&&e&&O(e.processTelemetry)&&(e=_t(e,t,n),a=a||e,o&&o._setNext(e),o=e)})),r&&!a?Nt([r],t,n):a}function _t(s,r,o){var c=null,a=O(s.processTelemetry),i=O(s.setNextPlugin),l=s?s.identifier+"-"+s.priority+"-"+jt++:"Unknown-0-"+jt++,u={getPlugin:function(){return s},getNext:function(){return c},processTelemetry:function(n,e){var t;d(e=e||(t=(t=s&&O(s[kt])?s[kt]():t)||Pt(u,r,o)),function(e){if(!s||!a)return!1;var t=Dt(s);return!t[y]&&!t[he]&&(i&&s.setNextPlugin(c),s.processTelemetry(n,e),!0)},"processTelemetry",function(){return{item:n}},!n.sync)||e.processNext(n)},unload:function(r,o){d(r,function(){var e,t,n=!1;return s&&(e=Dt(s),t=s[C]||e.core,!s||t&&t!==r[C]()||e[y]||(e[C]=null,e[y]=!0,e[pe]=!1,s[y]&&!0===s[y](r,o)&&(n=!0))),n},"unload",function(){},o.isAsync)||r.processNext(o)},update:function(r,o){d(r,function(){var e,t,n=!1;return s&&(e=Dt(s),t=s[C]||e.core,!s||t&&t!==r[C]()||e[y]||s[ge]&&!0===s[ge](r,o)&&(n=!0)),n},"update",function(){},!1)||r.processNext(o)},_id:l,_setNext:function(e){c=e}};function d(n,r,o,e,t){var a=!1,i=s?s.identifier:Et,u=(u=n[Lt])||(n[Lt]={});return n.setNext(c),s&&mt(n[C](),function(){return i+":"+o},function(){u[l]=!0;try{var e=c?c._id:f;e&&(u[e]=!1),a=r(n)}catch(t){e=!c||u[c._id];e&&(a=!0),c&&e||T(n.diagLog(),1,73,"Plugin ["+s.identifier+"] failed during "+o+" - "+K(t)+", run flags: "+K(u))}},e,t),a}return Be(u)}function Ot(){var t=[];return{add:function(e){e&&t.push(e)},run:function(n,r){z(t,function(e){try{e(n,r)}catch(t){T(n.diagLog(),2,73,"Unexpected error calling unload handler - "+K(t))}}),t=[]}}}var b="getPlugin",e=function On(){var a,i,c,l,d,u=this;function t(e){var t,e=e=void 0===e?null:e;return e||(t=i||Pt(null,{},u.core),e=c&&c[b]?t.createNew(null,c[b]):t.createNew(null,c)),e}function f(e,t,n){e&&(a="extensionConfig",o=r=[],e&&(o=e[a])!==r&&_(o)&&(e[a]=o=r)),!n&&t&&(n=t.getProcessTelContext().getNext());var r,o,a=c;c&&c[b]&&(a=c[b]()),u.core=t,i=Pt(n,e,t,a)}function p(){a=!1,u.core=null,c=i=null,d=[],l=Ot()}p(),x(On,u,function(s){var e,t,n,r,o;s.initialize=function(e,t,n,r){f(e,t,r),a=!0},s.teardown=function(e,t){var n,r,o,a;if(s.core&&(!e||s.core===e.core()))return r=!1,o=e||function u(e,n,r,t){var o=Ht(e,n,r,t),a=o.ctx;return a.processNext=function(e){var t=o._next();return t&&t.unload(a,e),!t},a.createNew=function(e,t){return u((e=V(e=void 0===e?null:e)?Nt(e,n,r,t):e)||a.getNext(),n,r,t)},a}(null,{},s.core,c&&c[b]?c[b]():c),a=t||{reason:0,isAsync:!1},s[ve]&&!0===s[ve](o,a,i)?n=!0:i(),n;function i(){r||(r=!0,l.run(o,t),z(d,function(e){e.rm()}),d=[],!0===n&&o.processNext(a),p())}},s.update=function(e,t){var n,r,o;if(s.core&&(!e||s.core===e.core()))return r=!1,o=e||function i(e,n,r,t){var o=Ht(e,n,r,t).ctx;return o.processNext=function(t){return o.iterate(function(e){O(e[ge])&&e[ge](o,t)})},o.createNew=function(e,t){return i((e=V(e=void 0===e?null:e)?Nt(e,n,r,t):e)||o.getNext(),n,r,t)},o}(null,{},s.core,c&&c[b]?c[b]():c),s._doUpdate&&!0===s._doUpdate(o,t||{reason:0},a)?n=!0:a(),n;function a(){r||(r=!0,f(o.getCfg(),o.core(),o.getNext()))}},s._addHook=function(e){e&&(V(e)?d=d.concat(e):d.push(e))},e="_addUnloadCb",t=function(){return l},void 0===n&&(n=!0),s&&t&&(n||ke(s[e]))&&(s[e]=(o=r=null,O(n=t)?r=n:o=n,function(){var e=arguments;if(o=r?r():o)return o.add.apply(o,e)}))}),u.diagLog=function(e){return t(e).diagLog()},u[pe]=function(){return a},u.setInitialized=function(e){a=e},u.setNextPlugin=function(e){c=e},u.processNext=function(e,t){t?t.processNext(e):c&&O(c.processTelemetry)&&c.processTelemetry(e,null)},u._getTelCtx=t},Ut="attachEvent",Vt="addEventListener",Bt=(At("aiEvtPageHide"),At("aiEvtPageShow"),1),zt=Ft("events"),Kt=/^([^.]*)(?:\.(.+)|)/;function Xt(e){return e&&e.replace?e.replace(/^\s*\.*|\.*\s*$/g,""):e}function Wt(){for(var e,t=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"],n=f,r=0;r<4;r++)n+=t[15&(e=bt())]+t[e>>4&15]+t[e>>8&15]+t[e>>12&15]+t[e>>16&15]+t[e>>20&15]+t[e>>24&15]+t[e>>28&15];var o=t[8+(3&bt())|0];return n.substr(0,8)+n.substr(9,4)+"4"+n.substr(13,3)+o+n.substr(16,3)+n.substr(19,12)}var Gt=Ke({CRITICAL:1,WARNING:2}),X=Ke({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}),$t="_aiHooks",Jt=["req","rsp","hkErr","fnErr"];function Yt(e,t){if(e)for(var n=0;n<e.length&&!t(e[n],n);n++);}function Zt(e,i,u,s,c){0<=c&&c<=2&&Yt(e,function(e,t){var e=e.cbks,n=e[Jt[c]];if(n){i.ctx=function(){return s[t]=s[t]||{}};try{n.apply(i.inst,u)}catch(o){n=i.err;try{var r=e.hkErr;r&&(i.err=o,r.apply(i.inst,u))}catch(a){}finally{i.err=n}}}})}function Qt(s){return function(){var n=arguments,e=s.h,r={name:s.n,inst:this,ctx:null,set:function(e,t){(n=a([],n))[e]=t,o=a([r],n)}},t=[],o=a([r],n);function a(t,e){return Yt(e,function(e){t.push(e)}),t}r.evt=c("event"),Zt(e,r,o,t,0);var i=s.f;try{r.rslt=i.apply(this,n)}catch(u){throw r.err=u,Zt(e,r,o,t,3),u}return Zt(e,r,o,t,1),r.rslt}}function en(e,t,n,r){if(void 0===r&&(r=!0),e&&t&&n){e=function a(e,t,n){var r=null;return e&&(p.call(e,t)?r=e:n&&(r=a(Le(e),t,!1))),r}(e,t,r);if(e){var o,r=e[t];if(typeof r===i)return(o=r[$t])||((r=Qt(o={i:0,n:t,f:r,h:[]}))[$t]=o,e[t]=r),t={id:o.i,cbks:n,rm:function(){var n=this.id;Yt(o.h,function(e,t){return e.id===n&&(o.h.splice(t,1),1)})}},o.i++,o.h.push(t),t}}return null}function tn(e,t,n){var r,o,a=t.length,i=(e=e,(t=t)&&150<(t=_e(t.toString())).length&&(o=t.substring(0,150),T(e,2,X.NameTooLong,"name is too long. It has been truncated to 150 characters.",{name:t},!0)),o||t);if(i.length!==a){for(var u=0,s=i;n[s]!==undefined;)u++,s=i.substring(0,147)+(r=void 0,(r="00"+u).substr(r.length-3));i=s}return i}function S(e,t,n){var r;return void 0===n&&(n=1024),t&&(n=n||1024,(t=_e(t)).toString().length>n&&(r=t.toString().substring(0,n),T(e,2,X.StringValueTooLong,"string value is too long. It has been truncated to "+n+" characters.",{value:t},!0))),r||t}function nn(e,t){var n,r=X.UrlTooLong;return t&&2048<(t=_e(t)).length&&(n=t.substring(0,2048),T(e,2,r,"input is too long, it has been truncated to 2048 characters.",{data:t},!0)),n||t}function rn(r,e){var o;return e&&(o={},U(e,function(e,t){if(je(t)&&ut())try{t=st().stringify(t)}catch(n){T(r,2,X.CannotSerializeObjectNonSerializable,"custom property is not valid",{exception:n},!0)}t=S(r,t,8192),e=tn(r,e,o),o[e]=t}),e=o),e}var on="";function an(e){var t=on+Math.floor((e=Math.round(e=isNaN(e)||e<0?0:e))/1e3)%60,n=on+Math.floor(e/6e4)%60,r=on+Math.floor(e/36e5)%24,o=Math.floor(e/864e5),e=1===(e=on+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,r=r.length<2?"0"+r:r;return(0<o?o+".":on)+r+":"+n+":"+t+"."+e}var un="Microsoft_ApplicationInsights_BypassAjaxInstrumentation",sn="iKey",cn=ot()||{},ln=0,dn=[null,null,null,null,null];function fn(n){var e=ln,t=dn,r=t[e];return cn.createElement?t[e]||(r=t[e]=cn.createElement("a")):r={host:function(){var e=pn(n,!0)||"";if(e){var t=e.match(/(www[0-9]?\.)?(.[^/:]+)(\:[\d]+)?/i);if(null!=t&&3<t.length&&B(t[2])&&0<t[2].length)return t[2]+(t[3]||"")}return e}()},r.href=n,++e>=t.length&&(e=0),ln=e,r}function pn(e,t){var n=null;return e&&null!=(e=e.match(/(\w*):\/\/(.[^/:]+)(\:[\d]+)?/i))&&2<e.length&&B(e[2])&&0<e[2].length&&(n=e[2]||"",t&&2<e.length&&(t=(e[1]||"").toLowerCase(),e=e[3]||"",n+=e="http"==t&&":80"===e||"https"==t&&":443"===e?"":e)),n}var gn=["https://dc.services.visualstudio.com/v2/track","https://breeze.aimon.applicationinsights.io/v2/track","https://dc-int.services.visualstudio.com/v2/track"],hn={correlationIdPrefix:"cid-v1:",canIncludeCorrelationHeader:function(e,t,n){if(!t||e&&e.disableCorrelationHeaders)return!1;if(e&&e.correlationHeaderExcludePatterns)for(var r=0;r<e.correlationHeaderExcludePatterns.length;r++)if(e.correlationHeaderExcludePatterns[r].test(t))return!1;var o=fn(t).host.toLowerCase();if(o&&(~o.indexOf(":443")||~o.indexOf(":80"))&&(o=(pn(t,!0)||"").toLowerCase()),(!e||!e.enableCorsCorrelation)&&o&&o!==n)return!1;var a,n=e&&e.correlationHeaderDomains;if(n&&(z(n,function(e){e=RegExp(e.toLowerCase().replace(/\\/g,"\\\\").replace(/\./g,"\\.").replace(/\*/g,".*"));a=a||e.test(o)}),!a))return!1;var i=e&&e.correlationHeaderExcludedDomains;if(!i||0===i.length)return!0;for(r=0;r<i.length;r++)if(RegExp(i[r].toLowerCase().replace(/\\/g,"\\\\").replace(/\./g,"\\.").replace(/\*/g,".*")).test(o))return!1;return o&&0<o.length},getCorrelationContext:function(e){if(e){e=hn.getCorrelationContextValue(e,"appId");if(e&&e!==hn.correlationIdPrefix)return e}},getCorrelationContextValue:function(e,t){if(e)for(var n=e.split(","),r=0;r<n.length;++r){var o=n[r].split("=");if(2===o.length&&o[0]===t)return o[1]}}};function vn(){var e=it();if(e&&e.now&&e.timing){e=e.now()+e.timing.navigationStart;if(0<e)return e}return ze()}function mn(e,t){return 0===e||0===t||_(e)||_(t)?null:t-e}E(Cn,xn=function(){this.ver=2,this.success=!0,this.properties={},this.measurements={}}),Cn.envelopeType="Microsoft.ApplicationInsights.{0}.RemoteDependency",Cn.dataType="RemoteDependencyData";var xn,yn=Cn;function Cn(e,t,n,r,o,a,i,u,s,c,l,d){void 0===s&&(s="Ajax");var f,p,g,h,v=xn.call(this)||this,n=(v.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},v.id=t,v.duration=an(o),v.success=a,v.resultCode=i+"",v.type=S(e,s),t=e,o=u,s=i=a=r,i=(u=n)&&0<u.length?(p=(n=fn(u)).host,i||(null!=n.pathname?("/"!=((f=0===n.pathname.length?"/":n.pathname)[0]||"")&&(f="/"+f),s=n.pathname,S(t,o?o+" "+f:f)):S(t,u))):p=a,{target:p,name:i,data:s});return v.data=nn(e,r)||n.data,v.target=S(e,n.target),c&&(v.target="".concat(v.target," | ").concat(c)),v.name=S(e,n.name),v.properties=rn(e,l),v.measurements=(g=e,(o=d)&&(h={},U(o,function(e,t){e=tn(g,e,h),h[e]=t}),o=h),o),v}bn.create=function(e,t,n,r,o,a){if(n=S(r,n)||"not_specified",_(e)||_(t)||_(n))throw Error("Input doesn't contain all required fields");var r="",i=(e[sn]&&(r=e[sn],delete e[sn]),{name:n,time:function(e){if(e){if(Ie)return e[me]();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}}(new Date),iKey:r,ext:a||{},tags:[],data:{},baseType:t,baseData:e});return _(o)||U(o,function(e,t){i.data[e]=t}),i};var Tn=bn;function bn(){}var I="properties";function Sn(e,t,n){t=e[t],n=e[n];return t&&n?mn(t,n):0}function w(e,t,n,r,o){n=Sn(n,r,o);return n?M(e,t,an(n)):0}function M(e,t,n){var r="ajaxPerf",o=0;return e&&t&&n&&((e[r]=e[r]||{})[t]=n,o=1),o}var In=function(){var e=this;e.openDone=!1,e.setRequestHeaderDone=!1,e.sendDone=!1,e.abortDone=!1,e.stateChangeAttached=!1},wn=function Un(e,t,n){var r=this,o=n,y="responseText";r.perfMark=null,r.completed=!1,r.requestHeadersSize=null,r.requestHeaders=null,r.responseReceivingDuration=null,r.callbackDuration=null,r.ajaxTotalDuration=null,r.aborted=0,r.pageUrl=null,r.requestUrl=null,r.requestSize=0,r.method=null,r.status=null,r.requestSentTime=null,r.responseStartedTime=null,r.responseFinishedTime=null,r.callbackFinishedTime=null,r.endTime=null,r.xhrMonitoringState=new In,r.clientFailure=0,r.traceID=e,r.spanID=t,x(Un,r,function(x){x.getAbsoluteUrl=function(){return x.requestUrl?(e=fn(x.requestUrl))?e.href:void 0:null;var e},x.getPathName=function(){return x.requestUrl?nn(o,(e=x.method,t=x.requestUrl,e?e.toUpperCase()+" "+t:t)):null;var e,t},x.CreateTrackItem=function(e,t,n){if(x.ajaxTotalDuration=Math.round(1e3*mn(x.requestSentTime,x.responseFinishedTime))/1e3,x.ajaxTotalDuration<0)return null;(e={id:"|"+x.traceID+"."+x.spanID,target:x.getAbsoluteUrl(),name:x.getPathName(),type:e,startTime:null,duration:x.ajaxTotalDuration,success:200<=+x.status&&+x.status<400,responseCode:+x.status,method:x.method})[I]={HttpMethod:x.method};var r,o,a,i,u,s,c,l,d,f,p,g,h,v,m;return x.requestSentTime&&(e.startTime=new Date,e.startTime.setTime(x.requestSentTime)),i=(r=x).perfTiming,u=(o=e)[I]||{},s=0,h="duration",v="startTime",c="connectEnd",l="requestStart",m="responseEnd",d="transferSize",f="encodedBodySize",p="decodedBodySize",g="serverTiming",i?(s=(s=(s=(s=(s=(s=(s|=w(u,"End",i,"redirectStart","End"))|w(u,"domainLookup",i,"domainLookupStart","domainLookupEnd"))|w(u,"connect",i,"connectStart",c))|w(u,"request",i,l,"requestEnd"))|w(u,"response",i,"responseStart",m))|w(u,"networkConnect",i,v,c))|w(u,"sentRequest",i,l,m),s=(s|=M(u,h,c=i[h]||Sn(i,v,m)||0))|M(u,"perfTotal",c),(l=i[g])&&(a={},z(l,function(e,t){var t=He(e.name||""+t),n=a[t]||{};U(e,function(e,t){!("name"!==e&&B(t)||"number"==typeof t)||!(t=n[e]?n[e]+";"+t:t)&&B(t)||(n[e]=t)}),a[t]=n}),s|=M(u,g,a)),s=(s=(s|=M(u,d,i[d]))|M(u,f,i[f]))|M(u,p,i[p])):r.perfMark&&(s|=M(u,"missing",r.perfAttempts)),s&&(o[I]=u),t&&0<Ve(x.requestHeaders).length&&(e[I]=e[I]||{},e[I].requestHeaders=x.requestHeaders),n&&(h=n())&&((v=h.correlationContext)&&(e.correlationContext=v),h.headerMap&&0<Ve(h.headerMap).length&&(e[I]=e[I]||{},e[I].responseHeaders=h.headerMap),x.errorStatusText&&400<=x.status&&(m=h.type,e[I]=e[I]||{},""!==m&&"text"!==m||(e[I][y]=h[y]?h.statusText+" - "+h[y]:h.statusText),"json"===m&&(e[I][y]=h.response?h.statusText+" - "+JSON.stringify(h.response):h.statusText))),e}})},Mn=(r.isValidTraceId=function(e){return e.match(/^[0-9a-f]{32}$/)&&"00000000000000000000000000000000"!==e},r.isValidSpanId=function(e){return e.match(/^[0-9a-f]{16}$/)&&"0000000000000000"!==e},r.prototype.toString=function(){return"".concat(this.version,"-").concat(this.traceId,"-").concat(this.spanId,"-").concat(this.traceFlag)},r.DEFAULT_TRACE_FLAG="01",r.DEFAULT_VERSION="00",r);function r(e,t){var n=this;n.traceFlag=r.DEFAULT_TRACE_FLAG,n.version=r.DEFAULT_VERSION,e&&r.isValidTraceId(e)?n.traceId=e:n.traceId=Wt(),t&&r.isValidSpanId(t)?n.spanId=t:n.spanId=Wt().substr(0,16)}var qn="ai.ajxmn.",An="diagLog",W="ajaxData",Fn="throwInternal",Rn="fetch",Dn=0;function En(e){var t=!1,n=(function(){var e=!1;try{e=!!c(tt)}catch(t){}return e}()&&(t=!(_(n=XMLHttpRequest[N])||_(n.open)||_(n.send)||_(n.abort))),function(e){var t=((e=(e=void 0===e?null:e)?e:(t=at()||{})?(t.userAgent||f).toLowerCase():f)||f).toLowerCase();if(Pe(t,Qe))return e=ot()||{},Math.max(parseInt(t.split(Qe)[1]),e[We]||0);if(Pe(t,et)){e=parseInt(t.split(et)[1]);if(e)return e+4}return null}());if(t=!(n&&n<9)&&t)try{(new XMLHttpRequest)[W]={};var r=XMLHttpRequest[N].open;XMLHttpRequest[N].open=r}catch(o){t=!1,kn(e,X.FailedMonitorAjaxOpen,"Failed to enable XMLHttpRequest monitoring, extension is not supported",{exception:K(o)})}return t}function Ln(e){var t="";try{_(e)||_(e[W])||_(e[W].requestUrl)||(t+="(url: '"+e[W].requestUrl+"')")}catch(n){}return t}function kn(e,t,n,r,o){e[An]()[Fn](Gt.CRITICAL,t,n,r,o)}function jn(e,t,n,r,o){e[An]()[Fn](Gt.WARNING,t,n,r,o)}function Hn(t,n,r){return function(e){kn(t,n,r,{ajaxDiagnosticsMessage:Ln(e.inst),exception:K(e.err)})}}function Pn(e,t){return e&&t?e.indexOf(t):-1}E(G,Nn=e),G.getDefaultConfig=function(){return{maxAjaxCallsPerView:500,disableAjaxTracking:!1,disableFetchTracking:!0,excludeRequestFromAutoTrackingPatterns:undefined,disableCorrelationHeaders:!1,distributedTracingMode:1,correlationHeaderExcludedDomains:["*.blob.core.windows.net","*.blob.core.chinacloudapi.cn","*.blob.core.cloudapi.de","*.blob.core.usgovcloudapi.net"],correlationHeaderDomains:undefined,correlationHeaderExcludePatterns:undefined,appId:undefined,enableCorsCorrelation:!1,enableRequestHeaderTracking:!1,enableResponseHeaderTracking:!1,enableAjaxErrorStatusText:!1,enableAjaxPerfTracking:!1,maxAjaxPerfLookupAttempts:3,ajaxPerfLookupDelay:25,ignoreHeaders:["Authorization","X-API-Key","WWW-Authenticate"],addRequestContext:undefined}},G.getEmptyConfig=function(){var t=this.getDefaultConfig();return U(t,function(e){t[e]=undefined}),t},G.prototype.processTelemetry=function(e,t){this.processNext(e,t)},G.identifier="AjaxDependencyPlugin";var Nn,we=G;function G(){var C,T,b,S,I,w,M,q,e=Nn.call(this)||this,A=(e.identifier=G.identifier,e.priority=120,"trackDependencyDataInternal"),t=typeof location===u&&location?location:c("location"),F=!1,R=!1,D=t&&t.host&&t.host.toLowerCase(),E=G.getEmptyConfig(),L=!1,r=0,k=!1,j=0,H=!1,P={};return x(G,e,function(l,u){var s=u._addHook;function d(t){var n=!0;return(t||E.ignoreHeaders)&&z(E.ignoreHeaders,function(e){if(e.toLowerCase()==t.toLowerCase())return n=!1,-1}),n}function f(e,t,n){s(e?en(e[N],t,n,!1):null)}function p(e,t,n){var r=!1,o=((B(t)?t:(t||{}).url||"")||"").toLowerCase();if(z(I,function(e){var t=e;B(e)&&(t=RegExp(e)),r=r||t.test(o)}),r)return r;var a=Pn(o,"?"),i=Pn(o,"#");return-1!==(a=-1===a||-1!==i&&i<a?i:a)&&(o=o.substring(0,a)),_(e)?_(t)||(r="object"==typeof t&&!0===t[un]||!!n&&!0===n[un]):r=!0===e[un]||!0===o[un],(r=!(r||!o||(i=o,!~gn.indexOf(i.toLowerCase())))||r)?P[o]||(P[o]=1):P[o]&&(r=!0),r}function g(e,t){var n=!0,r=R;return _(e)||(n=!0===t||!_(e[W])),r&&n}function h(n){n[W].xhrMonitoringState.stateChangeAttached=function(e,t,n,r){void 0===r&&(r=!1);var o,a,i,u,s,c,l,d,f=!1;if(e)try{s="readystatechange",(c=n)&&(l="",V(c)?(l="",z(c,function(e){(e=Xt(e))&&("."!==e[0]&&(e="."+e),l+=e)})):l=Xt(c),l&&(s=(s||"")+(l="."!==l[0]?"."+l:l)));var p,g={type:(d=Kt.exec(s)||[])[1],ns:(d[2]||"").split(".").sort().join(".")},h=g,v=t,m=r,x=!1;(u=e)&&h&&h.type&&v&&(u[Vt]?(u[Vt](h.type,v,m),x=!0):u[Ut]&&(u[Ut]("on"+h.type,v),x=!0)),(f=x)&&zt.accept(e)&&(p={guid:Bt++,evtName:g,handler:t,capture:r},o=g.type,((i=zt.get(e,"events",{},a=void 0===a||a))[o]||(i[o]=[])).push(p))}catch(y){}return f}(n,function(){try{n&&4===n.readyState&&g(n)&&((a=(o=n)[W]).responseFinishedTime=vn(),a.status=o.status,c("xmlhttprequest",a,function(){try{var e=a.CreateTrackItem("Ajax",L,function(){var e,n,t={statusText:o.statusText,headerMap:null,correlationContext:i(o),type:o.responseType,responseText:function(e){try{var t=e.responseType;if(""===t||"text"===t)return e.responseText}catch(n){}return null}(o),response:o.response};return H&&(e=o.getAllResponseHeaders())&&(e=_e(e).split(/[\r\n]+/),n={},z(e,function(e){var e=e.split(": "),t=e.shift(),e=e.join(": ");d(t)&&(n[t]=e)}),t.headerMap=n),t}),t=void 0;try{w&&(t=w({status:o.status,xhr:o}))}catch(n){jn(l,X.FailedAddingCustomDefinedRequestContext,"Failed to add custom defined request context as configured call back may missing a null check.")}e?(t!==undefined&&(e.properties=J(J({},e.properties),t)),l[A](e)):r(null,{requestSentTime:a.requestSentTime,responseFinishedTime:a.responseFinishedTime})}finally{try{o[W]=null}catch(n){}}},function(e){r(e,null)}))}catch(t){var e=K(t);e&&-1!==Pn(e.toLowerCase(),"c00c023f")||kn(l,X.FailedMonitorAjaxRSC,"Failed to monitor XMLHttpRequest 'readystatechange' event handler, monitoring data for this ajax call may be incorrect.",{ajaxDiagnosticsMessage:Ln(n),exception:e})}function r(e,t){t=t||{};t.ajaxDiagnosticsMessage=Ln(o),e&&(t.exception=K(e)),jn(l,X.FailedMonitorAjaxDur,"Failed to calculate the duration of the ajax call, monitoring data for this ajax call won't be sent.",t)}var o,a},M)}function i(e){try{var t,n=e.getAllResponseHeaders();if(null!==n&&-1!==Pn(n.toLowerCase(),"request-context"))return t=e.getResponseHeader("Request-Context"),hn.getCorrelationContext(t)}catch(r){jn(l,X.FailedMonitorAjaxGetCorrelationHeader,"Failed to get Request-Context correlation header as it may be not included in the response or not accessible.",{ajaxDiagnosticsMessage:Ln(e),exception:K(r)})}}function v(e,t){var n;t.requestUrl&&S&&k&&(n=it())&&O(n.mark)&&(e=S+e+"#"+ ++Dn,n.mark(e),(e=n.getEntriesByName(e))&&1===e.length&&(t.perfMark=e[0]))}function c(a,i,u,s){var c=i.perfMark,l=it(),d=E.maxAjaxPerfLookupAttempts,f=E.ajaxPerfLookupDelay,p=i.requestUrl,g=0;!function h(){try{if(l&&c){g++;for(var e=null,t=l.getEntries(),n=t.length-1;0<=n;n--){var r=t[n];if(r){if("resource"===r.entryType)r.initiatorType!==a||-1===Pn(r.name,p)&&-1===Pn(p,r.name)||(e=r);else if("mark"===r.entryType&&r.name===c.name){i.perfTiming=e;break}if(r.startTime<c.startTime-1e3)break}}}!c||i.perfTiming||d<=g||!1===i["async"]?(c&&O(l.clearMarks)&&l.clearMarks(c.name),i.perfAttempts=g,u()):setTimeout(h,f)}catch(o){s(o)}}()}function m(e){var t="";try{_(e)||(t+="(url: '".concat("string"==typeof e?e:e.url,"')"))}catch(n){kn(l,X.FailedMonitorAjaxOpen,"Failed to grab failed fetch diagnostics message",{exception:K(n)})}return t}function x(e,r,o,a,i,u){function s(e,t,n){n=n||{};n.fetchDiagnosticsMessage=m(o),t&&(n.exception=K(t)),jn(l,e,"Failed to calculate the duration of the fetch call, monitoring data for this fetch call won't be sent.",n)}i&&(i.responseFinishedTime=vn(),i.status=r,c("fetch",i,function(){var e,t=i.CreateTrackItem("Fetch",L,u);try{w&&(e=w({status:r,request:o,response:a}))}catch(n){jn(l,X.FailedAddingCustomDefinedRequestContext,"Failed to add custom defined request context as configured call back may missing a null check.")}t?(e!==undefined&&(t.properties=J(J({},t.properties),e)),l[A](t)):s(X.FailedMonitorAjaxDur,null,{requestSentTime:i.requestSentTime,responseFinishedTime:i.responseFinishedTime})},function(e){s(X.FailedMonitorAjaxGetCorrelationHeader,e,null)}))}function y(e){if(e&&e.headers)try{var t=e.headers.get("Request-Context");return hn.getCorrelationContext(t)}catch(n){jn(l,X.FailedMonitorAjaxGetCorrelationHeader,"Failed to get Request-Context correlation header as it may be not included in the response or not accessible.",{fetchDiagnosticsMessage:m(e),exception:K(n)})}}l.initialize=function(e,t,n,r){if(!l.isInitialized()){u.initialize(e,t,n,r);var o=l._getTelCtx(),r=(U(G.getDefaultConfig(),function(e,t){E[e]=o.getConfig(G.identifier,e,t)}),r=At("ajax"),t=(t=t&&t.evtNamespace&&t.evtNamespace())?V(t)?[r].concat(t):[r,t]:r,M=t,E.distributedTracingMode);if(L=E.enableRequestHeaderTracking,q=E.enableAjaxErrorStatusText,k=E.enableAjaxPerfTracking,j=E.maxAjaxCallsPerView,H=E.enableResponseHeaderTracking,I=E.excludeRequestFromAutoTrackingPatterns,w=E.addRequestContext,b=0===r||1===r,T=1===r||2===r,k&&(t=e.instrumentationKey||"unkwn",S=5<t.length?qn+t.substring(t.length-5)+".":qn+t+"."),!1===E.disableAjaxTracking&&En(l)&&!R&&(f(XMLHttpRequest,"open",{req:function(e,t,n,r){var o,a,e=e.inst,i=e[W];!p(e,n)&&g(e,!0)&&(i&&i.xhrMonitoringState.openDone||(i=e,t=t,n=n,r=r,a=C&&C.telemetryTrace&&C.telemetryTrace.traceID||Wt(),o=Wt().substr(0,16),(a=new wn(a,o,l[An]())).method=t,a.requestUrl=n,a.xhrMonitoringState.openDone=!0,a.requestHeaders={},a["async"]=r,a.errorStatusText=q,i[W]=a),h(e))},hkErr:Hn(l,X.FailedMonitorAjaxOpen,"Failed to monitor XMLHttpRequest.open, monitoring data for this ajax call may be incorrect.")}),f(XMLHttpRequest,"send",{req:function(e,t){var e=e.inst,n=e[W];g(e)&&!n.xhrMonitoringState.sendDone&&(v("xhr",n),n.requestSentTime=vn(),l.includeCorrelationHeaders(n,undefined,undefined,e),n.xhrMonitoringState.sendDone=!0)},hkErr:Hn(l,X.FailedMonitorAjaxSend,"Failed to monitor XMLHttpRequest, monitoring data for this ajax call may be incorrect.")}),f(XMLHttpRequest,"abort",{req:function(e){var e=e.inst,t=e[W];g(e)&&!t.xhrMonitoringState.abortDone&&(t.aborted=1,t.xhrMonitoringState.abortDone=!0)},hkErr:Hn(l,X.FailedMonitorAjaxAbort,"Failed to monitor XMLHttpRequest.abort, monitoring data for this ajax call may be incorrect.")}),L&&f(XMLHttpRequest,"setRequestHeader",{req:function(e,t,n){e=e.inst;g(e)&&d(t)&&(e[W].requestHeaders[t]=n)},hkErr:Hn(l,X.FailedMonitorAjaxSetRequestHeader,"Failed to monitor XMLHttpRequest.setRequestHeader, monitoring data for this ajax call may be incorrect.")}),R=!0),(e=!(r=$())||_(r.Request)||_(r.Request[N])||_(r[Rn])?null:r[Rn])&&(t=$(),c=e.polyfill,!1===E.disableFetchTracking?(s(en(t,Rn,{req:function(e,t,n){var r,o,a,i,u,s;!F||p(null,t,n)||c&&R||(r=e.ctx(),o=t,a=n,i=C&&C.telemetryTrace&&C.telemetryTrace.traceID||Wt(),u=Wt().substr(0,16),(i=new wn(i,u,l[An]())).requestSentTime=vn(),i.errorStatusText=q,o instanceof Request?i.requestUrl=o?o.url:"":i.requestUrl=o,u="GET",a&&a.method?u=a.method:o&&o instanceof Request&&(u=o.method),i.method=u,s={},L&&new Headers((a?a.headers:0)||o instanceof Request&&o.headers||{}).forEach(function(e,t){d(t)&&(s[t]=e)}),i.requestHeaders=s,v("fetch",i),u=i,(a=l.includeCorrelationHeaders(u,t,n))!==n&&e.set(1,a),r.data=u)},rsp:function(e,n){var r=e.ctx().data;r&&(e.rslt=e.rslt.then(function(t){return x(0,(t||{}).status,n,t,r,function(){var n,e={statusText:t.statusText,headerMap:null,correlationContext:y(t)};return H&&(n={},t.headers.forEach(function(e,t){d(t)&&(n[t]=e)}),e.headerMap=n),e}),t})["catch"](function(e){throw x(0,0,n,null,r,null,e.message),e}))},hkErr:Hn(l,X.FailedMonitorAjaxOpen,"Failed to monitor Window.fetch, monitoring data for this fetch call may be incorrect.")})),F=!0):c&&s(en(t,Rn,{req:function(e,t,n){p(null,t,n)}})),c&&(t[Rn].polyfill=c)),0<n.length&&n){for(var a=void 0,i=0;!a&&i<n.length;)n[i]&&"AppInsightsPropertiesPlugin"===n[i].identifier&&(a=n[i]),i++;a&&(C=a.context)}}var c},l._doTeardown=function(){R=F=!1},l.trackDependencyData=function(e,t){l[A](e,t)},l.includeCorrelationHeaders=function(e,t,n,r){var o,a,i,u=l._currentWindowHost||D;return t?(hn.canIncludeCorrelationHeader(E,e.getAbsoluteUrl(),u)&&((n=n||{}).headers=new Headers(n.headers||t instanceof Request&&t.headers||{}),b&&(o="|"+e.traceID+"."+e.spanID,n.headers.set("Request-Id",o),L&&(e.requestHeaders["Request-Id"]=o)),(a=E.appId||C&&C.appId())&&(n.headers.set("Request-Context","appId=cid-v1:"+a),L&&(e.requestHeaders["Request-Context"]="appId=cid-v1:"+a)),T&&(i=new Mn(e.traceID,e.spanID),n.headers.set("traceparent",i.toString()),L&&(e.requestHeaders.traceparent=i.toString()))),n):r?(hn.canIncludeCorrelationHeader(E,e.getAbsoluteUrl(),u)&&(b&&(o="|"+e.traceID+"."+e.spanID,r.setRequestHeader("Request-Id",o),L&&(e.requestHeaders["Request-Id"]=o)),(a=E.appId||C&&C.appId())&&(r.setRequestHeader("Request-Context","appId=cid-v1:"+a),L&&(e.requestHeaders["Request-Context"]="appId=cid-v1:"+a)),T&&(i=new Mn(e.traceID,e.spanID),r.setRequestHeader("traceparent",i.toString()),L&&(e.requestHeaders.traceparent=i.toString()))),r):undefined},l[A]=function(e,t,n){-1===j||r<j?(2!==E.distributedTracingMode&&1!==E.distributedTracingMode||"string"!=typeof e.id||"."===e.id[e.id.length-1]||(e.id+="."),_(e.startTime)&&(e.startTime=new Date),e=Tn.create(e,yn.dataType,yn.envelopeType,l[An](),t,n),l.core.track(e)):r===j&&kn(l,X.MaxAjaxPerPVExceeded,"Maximum ajax per page view limit reached, ajax monitoring is paused until the next trackPageView(). In order to increase the limit set the maxAjaxCallsPerView configuration parameter.",!0),++r}}),e}a.AjaxPlugin=we,a.ajaxRecord=wn;Te=a,F="__esModule",e={value:!0},we=Object.defineProperty;if(we)try{return void we(Te,F,e)}catch(Vn){}typeof e.value!==undefined&&(Te[F]=e.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||{}));
|