@microsoft/applicationinsights-react-js 3.3.3 → 3.3.4-nightly.2205-07

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.
@@ -1,6 +1,6 @@
1
1
  /*!
2
- * Application Insights JavaScript SDK - React Plugin, 3.3.3
2
+ * Application Insights JavaScript SDK - React Plugin, 3.3.4-nightly.2205-07
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
- var t=this,e=function(t,u){"use strict";function D(t){return t&&"object"==typeof t&&"default"in t?t:{"default":t}}function j(o){if(o&&o.__esModule)return o;var t,a=(t=Object.create)?t(null):{};return o&&Object.keys(o).forEach(function(t){if("default"!==t){var e=(e=Object.getOwnPropertyDescriptor)?e(o,t):undefined,n=a,r=t,e=e.get?e:{enumerable:!0,get:function(){return o[t]}},i=Object.defineProperty;if(i)try{return void i(n,r,e)}catch(o){}e&&typeof e.value!==undefined&&(n[r]=e.value)}var e}),a["default"]=o,a}var R=j(u),K=D(u),z="function",d="object",i="undefined",r="prototype",V="hasOwnProperty",n=Object,B=n[r],e=n.assign,W=n.create,o=n.defineProperty,J=B[V],a=null;function q(t){return void 0===t&&(t=!0),a&&t||(typeof globalThis!==i&&globalThis&&(a=globalThis),typeof self!==i&&self&&(a=self),typeof window!==i&&window&&(a=window),typeof global!==i&&global&&(a=global)),a}function F(t){throw new TypeError(t)}(q()||{}).Symbol,(q()||{}).Reflect;var $=e||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])B[V].call(e,i)&&(t[i]=e[i]);return t},G=function(t,e){return(G=n.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e[V](n)&&(t[n]=e[n])})(t,e)};function H(t,e){function n(){this.constructor=t}typeof e!==z&&null!==e&&F("Class extends value "+e+" is not a constructor or null"),G(t,e),t[r]=null===e?function(t){if(W)return W(t);if(null==t)return{};var e=typeof t;function n(){}return e!==d&&e!==z&&F("Object prototype may only be an Object:"+t),n[r]=t,new n}(e):(n[r]=e[r],new n)}var X="constructor",g="prototype",Q="function",Y="_dynInstFuncs",Z="_isDynProxy",m="_dynClass",tt="_dynInstChk",v=tt,et="_dfOpts",nt="_unknown_",rt="__proto__",it="_dyn"+rt,ot="_dynInstProto",at="useBaseInst",ut="setInstFuncs",ct=Object,h=ct.getPrototypeOf,st=ct.getOwnPropertyNames,lt=0;function y(t,e){return t&&ct[g].hasOwnProperty.call(t,e)}function ft(t){return t&&(t===ct[g]||t===Array[g])}function pt(t){return ft(t)||t===Function[g]}function T(t){if(t){if(h)return h(t);var e=t[rt]||t[g]||(t[X]?t[X][g]:null),n=t[it]||e;y(t,it)||(delete t[ot],n=t[it]=t[ot]||t[it],t[ot]=e)}return n}function dt(t,e){var n=[];if(st)n=st(t);else for(var r in t)"string"==typeof r&&y(t,r)&&n.push(r);if(n&&0<n.length)for(var i=0;i<n.length;i++)e(n[i])}function gt(t,e,n){return e!==X&&typeof t[e]===Q&&(n||y(t,e))}function mt(t){throw new TypeError("DynamicProto: "+t)}function vt(t,e){for(var n=t.length-1;0<=n;n--)if(t[n]===e)return 1}function ht(t,e){return y(t,g)?t.name||e||nt:((t||{})[X]||{}).name||e||nt}function C(t,r,e,n){y(t,g)||mt("theClass is an invalid class definition.");var i,o,a,u,c,s,l=t[g],f=(function(t){if(!h)return 1;for(var e=[],n=T(r);n&&!pt(n)&&!vt(e,n);){if(n===t)return 1;e.push(n),n=T(n)}}(l)||mt("["+ht(t)+"] is not in class hierarchy of ["+ht(r)+"]"),null),t=(y(l,m)?f=l[m]:(f="_dynCls$"+ht(t,"_")+"$"+lt,lt++,l[m]=f),C[et]),p=!!t[at],d=(p&&n&&n[at]!==undefined&&(p=!!n[at]),o={},dt(i=r,function(t){!o[t]&&gt(i,t,!1)&&(o[t]=i[t])}),o),p=(e(r,function(t,e,n,o){function r(t,e,n){var r,i=e[n];return i[Z]&&o&&!1!==(r=t[Y]||{})[v]&&(i=(r[e[m]]||{})[n]||i),function(){return i.apply(t,arguments)}}for(var i={},a=(dt(n,function(t){i[t]=r(e,n,t)}),T(t)),u=[];a&&!pt(a)&&!vt(u,a);)dt(a,function(t){!i[t]&&gt(a,t,!h)&&(i[t]=r(e,a,t))}),u.push(a),a=T(a);return i}(l,r,d,p)),!!h&&!!t[ut]);a=l,e=f,u=r,c=d,t=!1!==(p=p&&n?!!n[ut]:p),ft(a)||(l=u[Y]=u[Y]||{},s=l[e]=l[e]||{},!1!==l[v]&&(l[v]=!!t),dt(u,function(t){var n,r,i;gt(u,t,!1)&&u[t]!==c[t]&&(s[t]=u[t],delete u[t],y(a,t)&&(!a[t]||a[t][Z])||(a[t]=(n=a,r=t,(i=function(){var t,e;return(function(t,e,n,r){var i=null;if(t&&y(n,m)){var o=t[Y]||{};if((i=(o[n[m]]||{})[e])||mt("Missing ["+e+"] "+Q),!i[tt]&&!1!==o[v]){for(var a=!y(t,e),u=T(t),c=[];a&&u&&!pt(u)&&!vt(c,u);){var s=u[e];if(s){a=s===r;break}c.push(u),u=T(u)}try{a&&(t[e]=i),i[tt]=1}catch(l){o[v]=!1}}}return i}(this,r,n,i)||(typeof(e=(e=n[t=r])===i?T(n)[t]:e)!==Q&&mt("["+t+"] is not a "+Q),e)).apply(this,arguments)})[Z]=1,i)))}))}C[et]={setInstFuncs:!0,useBaseInst:!0};var x="",yt="isInitialized",p="teardown",_="core",Tt="update",Ct="disabled",xt="_doTeardown",_t="endsWith",wt="trim",e="toString",At="constructor",bt=o,It=n.freeze,c=String[r],kt=c[wt],Nt=c[_t],c=Array.isArray,Pt=B[e],Et=J[e],Mt=Et.call(n),St=/-([a-z])/g,Ot=/([^\w\d_$])/g,Lt=/^(\d+[\w\d_$])/,Ut=Object.getPrototypeOf;function w(t){return t===undefined||typeof t===i}function A(t){return null===t||w(t)}function Dt(t){return!A(t)}function jt(t){return!(!t||typeof t!==d)}function b(t){return!(!t||typeof t!==z)}function Rt(t){var e=t;return t&&zt(t)?(e=(e=t.replace(St,function(t,e){return e.toUpperCase()})).replace(Ot,"_")).replace(Lt,function(t,e){return"_"+e}):e}function Kt(t,e){if(t)for(var n in t)J.call(t,n)&&e.call(t,n,t[n])}function I(t,e){return!(!t||!e||!~t.indexOf(e))}var k=c||function(t){return!(!t||"[object Array]"!==Pt.call(t))};function zt(t){return"string"==typeof t}function Vt(t){return t&&"object"==typeof t&&(!(t=(Ut||function(t){if(t){if(Ut)return Ut(t);t=t.__proto__||t[r]||t[At];if(t)return t}return null})(t))||typeof(t=t[At]&&J.call(t,At)?t[At]:t)===z&&Et.call(t)===Mt)}function N(t,e,n){var r=t.length;try{for(var i=0;i<r&&!(i in t&&-1===e.call(n||t,t[i],i,t));i++);}catch(o){}}function P(t){return t&&(kt&&t[wt]?t[wt]():t.replace?t.replace(/^\s+|\s+$/g,""):t)}function Bt(t,e,n,r){if(bt)try{var i={enumerable:!0,configurable:!0};return n&&(i.get=n),r&&(i.set=r),bt(t,e,i),!0}catch(o){}return!1}var Wt=It||function(t){return t};function E(){var t=Date;return t.now?t.now():(new t).getTime()}function M(t,e,n,r,i){var o=n;!t||(o=t[e])===n||i&&!i(o)||r&&!r(n)||(t[e]=o=n)}function Jt(t){return!!t}function qt(t,e,n,r,i){var o,a,u;t&&e&&n&&(!1===i&&!w(t[e])||(t[e]=(o=r,u=a=null,b(i=n)?a=i:u=i,function(){var t=arguments;if(u=a?a():u)return u[o].apply(u,t)})))}var Ft="window",$t="navigator",Gt="location",Ht="JSON",Xt="msie",Qt="trident/",Yt=null,Zt=null;function S(t){var e=q();return e&&e[t]?e[t]:t===Ft&&typeof window===d&&window?window:null}function te(){return typeof navigator===d&&navigator?navigator:S($t)}function ee(){return typeof JSON===d&&JSON||null!==S(Ht)}function ne(){return ee()?JSON||S(Ht):null}function re(){var t=te();return!t||t.userAgent===Zt&&null!==Yt||(t=((Zt=t.userAgent)||x).toLowerCase(),Yt=I(t,Xt)||I(t,Qt)),Yt}function O(t){var e=Object[r].toString.call(t),n=x;return"[object Error]"===e?n="{ stack: '"+t.stack+"', message: '"+t.message+"', name: '"+t.name+"'":ee()&&(n=ne().stringify(t)),e+n}var ie=null;function oe(t){return t?'"'+t.replace(/\"/g,x)+'"':x}function ae(t,e){var n,r=typeof console!==i?console:S("console");r&&(n="log",b(r[n=r[t]?t:n])&&r[n](e))}ce.dataType="MessageData";var ue=ce;function ce(t,e,n,r){void 0===n&&(n=!1),this.messageId=t,this.message=(n?"AI: ":"AI (Internal): ")+t;n=x,ee()&&(n=ne().stringify(r)),t=(e?" message:"+oe(e):x)+(r?" props:"+oe(n):x);this.message+=t}var se=function ln(i){this.identifier="DiagnosticLogger",this.queue=[];var u=0,c={};C(ln,this,function(o){function t(t,e){t=i[t];return A(t)?e:t}function a(t,e){var n,r=(n=(n=ie)||!0===i.disableDbgExt?n:ie||(r=S("Microsoft"),ie=r?r.ApplicationInsights:ie))?n.ChromeDbgExt:null;r&&r.diagLog&&r.diagLog(t,e)}A(i)&&(i={}),o.consoleLoggingLevel=function(){return t("loggingLevelConsole",0)},o.telemetryLoggingLevel=function(){return t("loggingLevelTelemetry",1)},o.maxInternalMessageLimit=function(){return t("maxMessageLimit",25)},o.enableDebugExceptions=function(){return t("enableDebugExceptions",!1)},o.throwInternal=function(t,e,n,r,i){e=new ue(e,n,i=void 0!==i&&i,r);if(o.enableDebugExceptions())throw O(e);n=1===t?"errorToConsole":"warnToConsole";w(e.message)?a("throw"+(1===t?"Critical":"Warning"),e):(r=o.consoleLoggingLevel(),i?(i=+e.messageId,!c[i]&&t<=r&&(o[n](e.message),c[i]=!0)):t<=r&&o[n](e.message),o.logInternalMessage(t,e))},o.warnToConsole=function(t){ae("warn",t),a("warning",t)},o.errorToConsole=function(t){ae("error",t),a("error",t)},o.resetInternalMessageCount=function(){u=0,c={}},o.logInternalMessage=function(t,e){var n,r;u>=o.maxInternalMessageLimit()||(r=!0,n="AITR_"+e.messageId,c[n]?r=!1:c[n]=!0,r&&(t<=o.telemetryLoggingLevel()&&(o.queue.push(e),u++,a(1===t?"error":"warn",e)),u===o.maxInternalMessageLimit()&&(r=new ue(23,n="Internal events throttle limit per PageView reached for this app.",!1),o.queue.push(r),1===t?o.errorToConsole(n):o.warnToConsole(n))))}})};function le(t,e,n,r,i,o){void 0===o&&(o=!1),(t||new se).throwInternal(e,n,r,i,o)}s.ParentContextKey="parent",s.ChildrenContextKey="childEvts";var fe=s;function s(t,i,e){var n,o=this,a=!1;o.start=E(),o.name=t,o.isAsync=e,o.isChildEvt=function(){return!1},b(i)&&(a=Bt(o,"payload",function(){return!n&&b(i)&&(n=i(),i=null),n})),o.getCtx=function(t){return t?(t===s.ParentContextKey||t===s.ChildrenContextKey?o:o.ctx||{})[t]:null},o.setCtx=function(t,e){t&&(t===s.ParentContextKey?(o[t]||(o.isChildEvt=function(){return!0}),o[t]=e):t===s.ChildrenContextKey?o[t]=e:(o.ctx=o.ctx||{})[t]=e)},o.complete=function(){var t=0,e=o.getCtx(s.ChildrenContextKey);if(k(e))for(var n=0;n<e.length;n++){var r=e[n];r&&(t+=r.time)}o.time=E()-o.start,o.exTime=o.time-t,o.complete=function(){},!a&&b(i)&&(o.payload=i())}}var pe="CoreUtils.doPerf";function de(t,e,n,r,i){if(t)if(t=b(t.getPerfMgr)?t.getPerfMgr():t){var o,a=void 0,u=t.getCtx(pe);try{if(a=t.create(e(),r,i))return u&&a.setCtx&&(a.setCtx(fe.ParentContextKey,u),u.getCtx&&u.setCtx&&((o=u.getCtx(fe.ChildrenContextKey))||(o=[],u.setCtx(fe.ChildrenContextKey,o)),o.push(a))),t.setCtx(pe,a),n(a)}catch(c){a&&a.setCtx&&a.setCtx("exception",c)}finally{a&&t.fire(a),t.setCtx(pe,u)}}n()}var ge=4294967296,l=4294967295,me=!1,ve=123456789,he=987654321;function ye(t){var e,n=0,r=S("crypto")||S("msCrypto");if(0===(n=r&&r.getRandomValues?r.getRandomValues(new Uint32Array(1))[0]&l:n)&&re()){if(!me)try{var i=2147483647&E();(e=(Math.random()*ge^i)+i)<0&&(e>>>=0),ve=123456789+e&l,he=987654321-e&l,me=!0}catch(o){}r=((he=36969*(65535&he)+(he>>16)&l)<<16)+(65535&(ve=18e3*(65535&ve)+(ve>>16)&l))>>>0&l|0,n=(r>>>=0)&l}return 0===n&&(n=Math.floor(ge*Math.random()|0)),t||(n>>>=0),n}var Te=o,e="."+function(t){void 0===t&&(t=22);for(var e=ye()>>>0,n=0,r=x;r.length<t;)r+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[0|63&e]||"",e>>>=6,5==++n&&(e=(ye()<<2&4294967295|3&e)>>>0,n=0);return r}(6);function Ce(t){return 1===t.nodeType||9===t.nodeType||!+t.nodeType}var xe,_e=xe={id:Rt("_aiData-plugin.2.8.30"+((f=void 0!==f&&f)?".2.8.3":"")+e),accept:Ce,get:function(t,e,n,r){var i=t[xe.id];return i?i[Rt(e)]:(r&&((i=function(t,e){var n=e[t.id];if(!n){n={};try{Ce(e)&&!function(t,e,n){if(Te)try{return Te(t,e,{value:n,enumerable:!1,configurable:!0}),1}catch(r){}}(e,t.id,n)&&(e[t.id]=n)}catch(r){}}return n}(xe,t))[Rt(e)]=n),n)},kill:function(t,e){if(t&&t[e])try{delete t[e]}catch(n){}}};function we(t){return _e.get(t,"state",{},!0)}var Ae="TelemetryPluginChain",be="_hasRun",Ie="_getTelCtx",ke=0;function Ne(t,a,n,e){var r=null,i=[],o=(null!==e&&(r=e?function(t,e,n){for(;t;){if(t.getPlugin()===n)return t;t=t.getNext()}return Ee([n],e.config||{},e)}(t,n,e):t),{_next:function(){var t,e=r;return r=e?e.getNext():null,e||(t=i)&&0<t.length&&(N(t,function(t){try{t.func.call(t.self,t.args)}catch(e){le(n.logger,2,73,"Unexpected Exception during onComplete - "+O(e))}}),i=[]),e},ctx:{core:function(){return n},diagLog:function(){return(n||{}).logger||new se(a)},getCfg:function(){return a},getExtCfg:u,getConfig:function(t,e,n){void 0===n&&(n=!1);var r,t=u(t,null);return t&&!A(t[e])?r=t[e]:a&&!A(a[e])&&(r=a[e]),A(r)?n:r},hasNext:function(){return!!r},getNext:function(){return r},setNext:function(t){r=t},iterate:function(t){for(;e=o._next();){var e=e.getPlugin();e&&t(e)}},onComplete:function(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];t&&i.push({func:t,self:w(e)?o.ctx:e,args:n})}}});function u(t,e,n){var r,i,o;return void 0===e&&(e={}),void 0===n&&(n=0),(r=a&&(i=a.extensionConfig)&&t?i[t]:r)?jt(e)&&0!==n&&(o=function p(){var t=arguments,e=t[0]||{},n=t.length,r=!1,i=1;for(0<n&&"boolean"==typeof e&&(r=e,e=t[i]||{},i++),jt(e)||(e={});i<n;i++){var o,a,u,c,s=t[i],l=k(s),f=jt(s);for(o in s)(l&&o in s||f&&J.call(s,o))&&(a=s[o],u=void 0,r&&a&&((u=k(a))||Vt(a))&&(c=e[o],u?k(c)||(c=[]):Vt(c)||(c={}),a=p(r,c,a)),a!==undefined&&(e[o]=a))}return e}(!0,e,r),a&&2===n&&Kt(e,function(t){var e;A(o[t])&&!A(e=a[t])&&(o[t]=e)}),r=o):r=e,r}return o}function Pe(t,n,r,e){var i=Ne(t,n,r,e),o=i.ctx;return o.processNext=function(t){var e=i._next();return e&&e.processTelemetry(t,o),!e},o.createNew=function(t,e){return Pe((t=k(t=void 0===t?null:t)?Ee(t,n,r,e):t)||o.getNext(),n,r,e)},o}function Ee(t,e,n,r){var i,o=null,a=!r;return k(t)&&0<t.length&&(i=null,N(t,function(t){(a=!a&&r===t||a)&&t&&b(t.processTelemetry)&&(t=Me(t,e,n),o=o||t,i&&i._setNext(t),i=t)})),r&&!o?Ee([r],e,n):o}function Me(c,r,i){var s=null,o=b(c.processTelemetry),a=b(c.setNextPlugin),l=c?c.identifier+"-"+c.priority+"-"+ke++:"Unknown-0-"+ke++,u={getPlugin:function(){return c},getNext:function(){return s},processTelemetry:function(n,t){var e;f(t=t||(e=(e=c&&b(c[Ie])?c[Ie]():e)||Pe(u,r,i)),function(t){if(!c||!o)return!1;var e=we(c);return!e.teardown&&!e[Ct]&&(a&&c.setNextPlugin(s),c.processTelemetry(n,t),!0)},"processTelemetry",function(){return{item:n}},!n.sync)||t.processNext(n)},unload:function(r,i){f(r,function(){var t,e,n=!1;return c&&(t=we(c),e=c[_]||t.core,!c||e&&e!==r[_]()||t[p]||(t[_]=null,t[p]=!0,t[yt]=!1,c[p]&&!0===c[p](r,i)&&(n=!0))),n},"unload",function(){},i.isAsync)||r.processNext(i)},update:function(r,i){f(r,function(){var t,e,n=!1;return c&&(t=we(c),e=c[_]||t.core,!c||e&&e!==r[_]()||t[p]||c[Tt]&&!0===c[Tt](r,i)&&(n=!0)),n},"update",function(){},!1)||r.processNext(i)},_id:l,_setNext:function(t){s=t}};function f(n,r,i,t,e){var o=!1,a=c?c.identifier:Ae,u=(u=n[be])||(n[be]={});return n.setNext(s),c&&de(n[_](),function(){return a+":"+i},function(){u[l]=!0;try{var t=s?s._id:x;t&&(u[t]=!1),o=r(n)}catch(e){t=!s||u[s._id];t&&(o=!0),s&&t||le(n.diagLog(),1,73,"Plugin ["+a+"] failed during "+i+" - "+O(e)+", run flags: "+O(u))}},t,e),o}return Wt(u)}var Se="toGMTString",Oe="toUTCString",Le="cookie",Ue="expires",De="enabled",je="isCookieUseDisabled",Re="disableCookiesUsage",L="_ckMgr",Ke=null,ze=null,Ve=null,Be=typeof document===d&&document?document:S("document"),We={},Je={};function qe(t){return!t||t.isEnabled()}function Fe(t,i){M(n=(t=t||Je).cookieCfg=t.cookieCfg||{},"domain",t.cookieDomain,Dt,A),M(n,"path",t.cookiePath||"/",null,A),A(n[De])&&(e=void 0,w(t[je])||(e=!t[je]),w(t[Re])||(e=!t[Re]),n[De]=e);var e,n,s=n,l=s.path||"/",f=s.domain,r=!1!==s[De],p={isEnabled:function(){var t=r&&$e(i),e=Je[L];return t&&e&&p!==e?qe(e):t},setEnabled:function(t){r=!1!==t},set:function(t,e,n,r,i){var o,a,u,c=!1;return qe(p)&&(o={},-1!=(u=(a=P(e||x)).indexOf(";"))&&(a=P(e.substring(0,u)),o=Ge(e.substring(1+u))),M(o,"domain",r||f,Jt,w),A(n)||(u=re(),w(o[Ue])&&0<(e=E()+1e3*n)&&((r=new Date).setTime(e),M(o,Ue,He(r,u?Se:Oe)||He(r,u?Se:Oe)||x,Jt)),u||M(o,"max-age",x+n,null,w)),(e=typeof location===d&&location?location:S(Gt))&&"https:"===e.protocol&&(M(o,"secure",null,null,w),(ze=null===ze?!(zt(r=(te()||{}).userAgent)&&(I(r,"CPU iPhone OS 12")||I(r,"iPad; CPU OS 12")||I(r,"Macintosh; Intel Mac OS X 10_14")&&I(r,"Version/")&&I(r,"Safari")||I(r,"Macintosh; Intel Mac OS X 10_14")&&function(t,e){var n=!1;if(!t||(n=t===e))return n;if(Nt)return t[_t](e);var r=t,i=e,n=!1,t=r?r.length:0;if(t&&40<=t&&!(n=r===i)){for(var o=t-1,a=39;0<=a;a--){if(r[o]!=i[a])return;o--}n=!0}return n}(r,"AppleWebKit/605.1.15 (KHTML, like Gecko)")||I(r,"Chrome/5")||I(r,"Chrome/6")||I(r,"UnrealEngine")&&!I(r,"Chrome")||I(r,"UCBrowser/12")||I(r,"UCBrowser/11"))):ze)&&M(o,"SameSite","None",null,w)),M(o,"path",i||l,null,w),(s.setCookie||Qe)(t,Xe(a,o)),c=!0),c},get:function(t){var e=x;return qe(p)?(s.getCookie||function(t){var e,n=x;return Be&&(e=Be[Le]||x,Ve!==e&&(We=Ge(e),Ve=e),n=P(We[t]||x)),n})(t):e},del:function(t,e){return!!qe(p)&&p.purge(t,e)},purge:function(t,e){var n,r=!1;return $e(i)&&((n={}).path=e||"/",n[Ue]="Thu, 01 Jan 1970 00:00:01 GMT",e=n,re()||(e["max-age"]="0"),(s.delCookie||Qe)(t,Xe(x,e)),r=!0),r}};return p[L]=p}function $e(t){if(null===Ke){Ke=!1;try{Ke=(Be||{})[Le]!==undefined}catch(e){le(t,2,68,"Cannot access document.cookie - "+((t=e)&&"[object Error]"===Pt.call(t)?t.name:x),{exception:O(e)})}}return Ke}function Ge(t){var n={};return t&&t.length&&N(P(t).split(";"),function(t){var e;(t=P(t||x))&&(-1==(e=t.indexOf("="))?n[t]=null:n[P(t.substring(0,e))]=P(t.substring(1+e)))}),n}function He(t,e){return b(t[e])?t[e]():null}function Xe(t,e){var n=t||x;return Kt(e,function(t,e){n+="; "+t+(A(e)?x:"="+e)}),n}function Qe(t,e){Be&&(Be[Le]=t+"="+e)}function Ye(){var e=[];return{add:function(t){t&&e.push(t)},run:function(n,r){N(e,function(t){try{t(n,r)}catch(e){le(n.diagLog(),2,73,"Unexpected error calling unload handler - "+O(e))}}),e=[]}}}var Ze,U="getPlugin";function tn(){var u,c,s,l,f=Ze.call(this)||this;return f.priority=185,f.identifier="ReactPlugin",C(tn,f,function(i,t){var e,n,r;function o(){l=s=c=u=null}function a(){return u||le(i.diagLog(),1,64,"Analytics plugin is not available, React plugin telemetry will not be sent: "),u}o(),i.initialize=function(t,e,n,r){Ze.prototype.initialize.call(f,t,e,n,r),c=t.extensionConfig&&t.extensionConfig[i.identifier]?t.extensionConfig[i.identifier]:{history:null},N(n,function(t){"ApplicationInsightsAnalytics"===t.identifier&&(u=t)}),c.history&&(e=c.history,s=e.listen(function(t){var e="location"in t?t.location:t;l=setTimeout(function(){l=null;var t={uri:e.pathname};i.trackPageView(t)},500)}),r={uri:c.history.location.pathname},i.trackPageView(r))},i.getCookieMgr=function(){return(e=(n=i.core)?n.getCookieMgr():e)||(n=(n||{}).logger,(r=Fe[L]||Je[L])||(r=Fe[L]=Fe(t,n),Je[L]=r),e=r),e;var t,e,n,r},i.getAppInsights=a,i.processTelemetry=function(t,e){i.processNext(t,e)},i._doTeardown=function(t,e,n){b(s)&&s(),l&&clearTimeout(l),o()},n=a,r=["trackMetric","trackPageView","trackEvent","trackException","trackTrace"],(e=i)&&n&&jt(e)&&k(r)&&N(r,function(t){zt(t)&&qt(e,t,n,t,void 0)}),Bt(i,"_extensionConfig",function(){return c})}),f}H(tn,Ze=function fn(){var i,o,l,f,p,a=this;function e(t){var e,t=t=void 0===t?null:t;return t||(e=o||Pe(null,{},a.core),t=l&&l[U]?e.createNew(null,l[U]):e.createNew(null,l)),t}function c(t,e,n){t&&M(t,"extensionConfig",[],null,A),!n&&e&&(n=e.getProcessTelContext().getNext());var r=l;l&&l[U]&&(r=l[U]()),a.core=e,o=Pe(n,t,e,r)}function d(){i=!1,a.core=null,l=o=null,p=[],f=Ye()}d(),C(fn,a,function(s){s.initialize=function(t,e,n,r){c(t,e,r),i=!0},s.teardown=function(t,e){var n,r,i,o,a=s.core;if(a&&(!t||a===t.core()))return r=!1,i=t||function c(t,n,e){var r=n.config||{},i=Ne(t,r,n,e),o=i.ctx;return o.processNext=function(t){var e=i._next();return e&&e.unload(o,t),!e},o.createNew=function(t,e){return c((t=k(t=void 0===t?null:t)?Ee(t,r,n,e):t)||o.getNext(),n,e)},o}(null,a,l&&l[U]?l[U]():l),o=e||{reason:0,isAsync:!1},s[xt]&&!0===s[xt](i,o,u)?n=!0:u(),n;function u(){r||(r=!0,f.run(i,e),N(p,function(t){t.rm()}),p=[],!0===n&&i.processNext(o),d())}},s.update=function(t,e){var n,r,i,o=s.core;if(o&&(!t||o===t.core()))return r=!1,i=t||function u(t,n,e){var r=n.config||{},i=Ne(t,r,n,e).ctx;return i.processNext=function(e){return i.iterate(function(t){b(t.update)&&t.update(i,e)})},i.createNew=function(t,e){return u((t=k(t=void 0===t?null:t)?Ee(t,r,n,e):t)||i.getNext(),n,e)},i}(null,o,l&&l[U]?l[U]():l),s._doUpdate&&!0===s._doUpdate(i,e||{reason:0},a)?n=!0:a(),n;function a(){r||(r=!0,c(i.getCfg(),i.core(),i.getNext()))}},s._addHook=function(t){t&&(k(t)?p=p.concat(t):p.push(t))},qt(s,"_addUnloadCb",function(){return f},"add")}),a.diagLog=function(t){return e(t).diagLog()},a[yt]=function(){return i},a.setInitialized=function(t){i=t},a.setNextPlugin=function(t){l=t},a.processNext=function(t,e){e?e.processNext(t):l&&b(l.processTelemetry)&&l.processTelemetry(t,null)},a._getTelCtx=e});var en,c=tn,nn=(H(rn,en=R.Component),rn.prototype.componentDidMount=function(){var t=this;this._mountTimestamp=E(),this._firstActiveTimestamp=0,this._totalIdleTime=0,this._lastActiveTimestamp=0,this._idleStartTimestamp=0,this._idleCount=0,this._intervalId=setInterval(function(){0<t._lastActiveTimestamp&&0===t._idleStartTimestamp&&E()-t._lastActiveTimestamp>=t._idleTimeout&&(t._idleStartTimestamp=E(),t._idleCount++)},100)},rn.prototype.componentWillUnmount=function(){if(0===this._mountTimestamp)throw Error("withAITracking:componentWillUnmount: mountTimestamp is not initialized.");var t,e;this._intervalId&&clearInterval(this._intervalId),0!==this._firstActiveTimestamp&&(t=this.getEngagementTimeSeconds(),e={"Component Name":this._componentName},this._reactPlugin.trackMetric({average:t,name:"React Component Engaged Time (seconds)",sampleCount:1},e))},rn.prototype.getEngagementTimeSeconds=function(){return(E()-this._firstActiveTimestamp-this._totalIdleTime-this._idleCount*this._idleTimeout)/1e3},rn);function rn(t,e,n){var r=en.call(this,t)||this;return r._mountTimestamp=0,r._firstActiveTimestamp=0,r._idleStartTimestamp=0,r._lastActiveTimestamp=0,r._totalIdleTime=0,r._idleCount=0,r._idleTimeout=5e3,r.trackActivity=function(t){var e;0===r._firstActiveTimestamp?(r._firstActiveTimestamp=E(),r._lastActiveTimestamp=r._firstActiveTimestamp):r._lastActiveTimestamp=E(),0<r._idleStartTimestamp&&(e=r._lastActiveTimestamp-r._idleStartTimestamp,r._totalIdleTime+=e,r._idleStartTimestamp=0)},r._reactPlugin=e,r._componentName=n,r}on={},Kt({Verbose:0,Information:1,Warning:2,Error:3,Critical:4},function(t,e){on[t]=e,on[e]=t}),o=on,It&&Kt(o,function(t,e){(k(e)||jt(e))&&It(e)});var on,an,un=Wt(o);function cn(){var t=null!==an&&an.apply(this,arguments)||this;return t.state={hasError:!1},t}H(cn,an=K["default"].Component),cn.prototype.componentDidCatch=function(t,e){this.setState({hasError:!0}),this.props.appInsights.trackException({error:t,exception:t,severityLevel:un.Error,properties:e})},cn.prototype.render=function(){var t;return this.state.hasError?(t=this.props.onError,K["default"].createElement(t)):this.props.children};var f=cn,sn=u.createContext(undefined),e=(t.AITrackedComponentBase=nn,t.AppInsightsContext=sn,t.AppInsightsErrorBoundary=f,t.ReactPlugin=c,t.useAppInsightsContext=function(){return u.useContext(sn)},t.useTrackEvent=function(t,e,n,r){void 0===r&&(r=!0);var n=u.useState(n),i=n[0],n=n[1],o=u.useRef(r);return u.useEffect(function(){o.current?o.current=!1:t.trackEvent({name:e},i)},[t,i,e]),n},t.useTrackMetric=function(r,i,o){var a=u.useRef({hookTimestamp:E(),firstActiveTimestamp:0,totalIdleTime:0,lastActiveTimestamp:0,idleStartTimestamp:0,idleCount:0,idleTimeout:5e3}),t=u.useRef();return t.current=function(){var t=a.current;0<t.lastActiveTimestamp&&0===t.idleStartTimestamp&&E()-t.lastActiveTimestamp>=t.idleTimeout&&(t.idleStartTimestamp=E(),t.idleCount++)},u.useEffect(function(){var n=setInterval(t.current,100);return function(){clearInterval(n);var t,e=a.current;if(0===e.hookTimestamp)throw Error("useAppInsights:unload hook: hookTimestamp is not initialized.");0!==e.firstActiveTimestamp&&(e=e,e={average:(E()-e.firstActiveTimestamp-e.totalIdleTime-e.idleCount*e.idleTimeout)/1e3,name:"React Component Engaged Time (seconds)",sampleCount:1},t=$({"Component Name":i},o),r.trackMetric(e,t))}},[]),function(){var t,e=a.current;0===e.firstActiveTimestamp?(e.firstActiveTimestamp=E(),e.lastActiveTimestamp=e.firstActiveTimestamp):e.lastActiveTimestamp=E(),0<e.idleStartTimestamp&&(t=e.lastActiveTimestamp-e.idleStartTimestamp,e.totalIdleTime+=t,e.idleStartTimestamp=0)}},t.withAITracking=function(e,t,n,r){return n!==undefined&&null!==n&&"string"==typeof n||(n=t.prototype&&t.prototype.constructor&&t.prototype.constructor.name||"Unknown"),r!==undefined&&null!==r&&"string"==typeof r||(r=""),H(i,o=nn),i.prototype.render=function(){return R.createElement("div",{onKeyDown:this.trackActivity,onMouseMove:this.trackActivity,onScroll:this.trackActivity,onMouseDown:this.trackActivity,onTouchStart:this.trackActivity,onTouchMove:this.trackActivity,className:r},R.createElement(t,$({},this.props)))},i;function i(t){return o.call(this,t,e,n)||this}var o},t),o="__esModule",f={value:!0},c=Object.defineProperty;if(c)try{return void c(e,o,f)}catch(pn){}typeof f.value!==undefined&&(e[o]=f.value)};"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("react")):"function"==typeof define&&define.amd?define(["exports","react"],e):e(((t="undefined"!=typeof globalThis?globalThis:t||self).Microsoft=t.Microsoft||{},t.Microsoft.ApplicationInsights=t.Microsoft.ApplicationInsights||{}),t.React);
5
+ var t=this,e=function(t,u){"use strict";function D(t){return t&&"object"==typeof t&&"default"in t?t:{"default":t}}function j(o){if(o&&o.__esModule)return o;var t,a=(t=Object.create)?t(null):{};return o&&Object.keys(o).forEach(function(t){if("default"!==t){var e=(e=Object.getOwnPropertyDescriptor)?e(o,t):undefined,n=a,r=t,e=e.get?e:{enumerable:!0,get:function(){return o[t]}},i=Object.defineProperty;if(i)try{return void i(n,r,e)}catch(o){}e&&typeof e.value!==undefined&&(n[r]=e.value)}var e}),a["default"]=o,a}var R=j(u),K=D(u),z="function",d="object",i="undefined",r="prototype",V="hasOwnProperty",n=Object,B=n[r],e=n.assign,W=n.create,o=n.defineProperty,J=B[V],a=null;function q(t){return void 0===t&&(t=!0),a&&t||(typeof globalThis!==i&&globalThis&&(a=globalThis),typeof self!==i&&self&&(a=self),typeof window!==i&&window&&(a=window),typeof global!==i&&global&&(a=global)),a}function F(t){throw new TypeError(t)}(q()||{}).Symbol,(q()||{}).Reflect;var $=e||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])B[V].call(e,i)&&(t[i]=e[i]);return t},G=function(t,e){return(G=n.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e[V](n)&&(t[n]=e[n])})(t,e)};function H(t,e){function n(){this.constructor=t}typeof e!==z&&null!==e&&F("Class extends value "+e+" is not a constructor or null"),G(t,e),t[r]=null===e?function(t){if(W)return W(t);if(null==t)return{};var e=typeof t;function n(){}return e!==d&&e!==z&&F("Object prototype may only be an Object:"+t),n[r]=t,new n}(e):(n[r]=e[r],new n)}var X="constructor",g="prototype",Q="function",Y="_dynInstFuncs",Z="_isDynProxy",m="_dynClass",tt="_dynInstChk",v=tt,et="_dfOpts",nt="_unknown_",rt="__proto__",it="_dyn"+rt,ot="_dynInstProto",at="useBaseInst",ut="setInstFuncs",ct=Object,h=ct.getPrototypeOf,st=ct.getOwnPropertyNames,lt=0;function y(t,e){return t&&ct[g].hasOwnProperty.call(t,e)}function ft(t){return t&&(t===ct[g]||t===Array[g])}function pt(t){return ft(t)||t===Function[g]}function T(t){if(t){if(h)return h(t);var e=t[rt]||t[g]||(t[X]?t[X][g]:null),n=t[it]||e;y(t,it)||(delete t[ot],n=t[it]=t[ot]||t[it],t[ot]=e)}return n}function dt(t,e){var n=[];if(st)n=st(t);else for(var r in t)"string"==typeof r&&y(t,r)&&n.push(r);if(n&&0<n.length)for(var i=0;i<n.length;i++)e(n[i])}function gt(t,e,n){return e!==X&&typeof t[e]===Q&&(n||y(t,e))}function mt(t){throw new TypeError("DynamicProto: "+t)}function vt(t,e){for(var n=t.length-1;0<=n;n--)if(t[n]===e)return 1}function ht(t,e){return y(t,g)?t.name||e||nt:((t||{})[X]||{}).name||e||nt}function C(t,r,e,n){y(t,g)||mt("theClass is an invalid class definition.");var i,o,a,u,c,s,l=t[g],f=(function(t){if(!h)return 1;for(var e=[],n=T(r);n&&!pt(n)&&!vt(e,n);){if(n===t)return 1;e.push(n),n=T(n)}}(l)||mt("["+ht(t)+"] is not in class hierarchy of ["+ht(r)+"]"),null),t=(y(l,m)?f=l[m]:(f="_dynCls$"+ht(t,"_")+"$"+lt,lt++,l[m]=f),C[et]),p=!!t[at],d=(p&&n&&n[at]!==undefined&&(p=!!n[at]),o={},dt(i=r,function(t){!o[t]&&gt(i,t,!1)&&(o[t]=i[t])}),o),p=(e(r,function(t,e,n,o){function r(t,e,n){var r,i=e[n];return i[Z]&&o&&!1!==(r=t[Y]||{})[v]&&(i=(r[e[m]]||{})[n]||i),function(){return i.apply(t,arguments)}}for(var i={},a=(dt(n,function(t){i[t]=r(e,n,t)}),T(t)),u=[];a&&!pt(a)&&!vt(u,a);)dt(a,function(t){!i[t]&&gt(a,t,!h)&&(i[t]=r(e,a,t))}),u.push(a),a=T(a);return i}(l,r,d,p)),!!h&&!!t[ut]);a=l,e=f,u=r,c=d,t=!1!==(p=p&&n?!!n[ut]:p),ft(a)||(l=u[Y]=u[Y]||{},s=l[e]=l[e]||{},!1!==l[v]&&(l[v]=!!t),dt(u,function(t){var n,r,i;gt(u,t,!1)&&u[t]!==c[t]&&(s[t]=u[t],delete u[t],y(a,t)&&(!a[t]||a[t][Z])||(a[t]=(n=a,r=t,(i=function(){var t,e;return(function(t,e,n,r){var i=null;if(t&&y(n,m)){var o=t[Y]||{};if((i=(o[n[m]]||{})[e])||mt("Missing ["+e+"] "+Q),!i[tt]&&!1!==o[v]){for(var a=!y(t,e),u=T(t),c=[];a&&u&&!pt(u)&&!vt(c,u);){var s=u[e];if(s){a=s===r;break}c.push(u),u=T(u)}try{a&&(t[e]=i),i[tt]=1}catch(l){o[v]=!1}}}return i}(this,r,n,i)||(typeof(e=(e=n[t=r])===i?T(n)[t]:e)!==Q&&mt("["+t+"] is not a "+Q),e)).apply(this,arguments)})[Z]=1,i)))}))}C[et]={setInstFuncs:!0,useBaseInst:!0};var x="",yt="isInitialized",p="teardown",_="core",Tt="update",Ct="disabled",xt="_doTeardown",_t="endsWith",wt="trim",e="toString",At="constructor",bt=o,It=n.freeze,c=String[r],kt=c[wt],Nt=c[_t],c=Array.isArray,Pt=B[e],Et=J[e],Mt=Et.call(n),St=/-([a-z])/g,Ot=/([^\w\d_$])/g,Lt=/^(\d+[\w\d_$])/,Ut=Object.getPrototypeOf;function w(t){return t===undefined||typeof t===i}function A(t){return null===t||w(t)}function Dt(t){return!A(t)}function jt(t){return!(!t||typeof t!==d)}function b(t){return!(!t||typeof t!==z)}function Rt(t){var e=t;return t&&zt(t)?(e=(e=t.replace(St,function(t,e){return e.toUpperCase()})).replace(Ot,"_")).replace(Lt,function(t,e){return"_"+e}):e}function Kt(t,e){if(t)for(var n in t)J.call(t,n)&&e.call(t,n,t[n])}function I(t,e){return!(!t||!e||!~t.indexOf(e))}var k=c||function(t){return!(!t||"[object Array]"!==Pt.call(t))};function zt(t){return"string"==typeof t}function Vt(t){return t&&"object"==typeof t&&(!(t=(Ut||function(t){if(t){if(Ut)return Ut(t);t=t.__proto__||t[r]||t[At];if(t)return t}return null})(t))||typeof(t=t[At]&&J.call(t,At)?t[At]:t)===z&&Et.call(t)===Mt)}function N(t,e,n){var r=t.length;try{for(var i=0;i<r&&!(i in t&&-1===e.call(n||t,t[i],i,t));i++);}catch(o){}}function P(t){return t&&(kt&&t[wt]?t[wt]():t.replace?t.replace(/^\s+|\s+$/g,""):t)}function Bt(t,e,n,r){if(bt)try{var i={enumerable:!0,configurable:!0};return n&&(i.get=n),r&&(i.set=r),bt(t,e,i),!0}catch(o){}return!1}var Wt=It||function(t){return t};function E(){var t=Date;return t.now?t.now():(new t).getTime()}function M(t,e,n,r,i){var o=n;!t||(o=t[e])===n||i&&!i(o)||r&&!r(n)||(t[e]=o=n)}function Jt(t){return!!t}function qt(t,e,n,r,i){var o,a,u;t&&e&&n&&(!1===i&&!w(t[e])||(t[e]=(o=r,u=a=null,b(i=n)?a=i:u=i,function(){var t=arguments;if(u=a?a():u)return u[o].apply(u,t)})))}var Ft="window",$t="navigator",Gt="location",Ht="JSON",Xt="msie",Qt="trident/",Yt=null,Zt=null;function S(t){var e=q();return e&&e[t]?e[t]:t===Ft&&typeof window===d&&window?window:null}function te(){return typeof navigator===d&&navigator?navigator:S($t)}function ee(){return typeof JSON===d&&JSON||null!==S(Ht)}function ne(){return ee()?JSON||S(Ht):null}function re(){var t=te();return!t||t.userAgent===Zt&&null!==Yt||(t=((Zt=t.userAgent)||x).toLowerCase(),Yt=I(t,Xt)||I(t,Qt)),Yt}function O(t){var e=Object[r].toString.call(t),n=x;return"[object Error]"===e?n="{ stack: '"+t.stack+"', message: '"+t.message+"', name: '"+t.name+"'":ee()&&(n=ne().stringify(t)),e+n}var ie=null;function oe(t){return t?'"'+t.replace(/\"/g,x)+'"':x}function ae(t,e){var n,r=typeof console!==i?console:S("console");r&&(n="log",b(r[n=r[t]?t:n])&&r[n](e))}ce.dataType="MessageData";var ue=ce;function ce(t,e,n,r){void 0===n&&(n=!1),this.messageId=t,this.message=(n?"AI: ":"AI (Internal): ")+t;n=x,ee()&&(n=ne().stringify(r)),t=(e?" message:"+oe(e):x)+(r?" props:"+oe(n):x);this.message+=t}var se=function ln(i){this.identifier="DiagnosticLogger",this.queue=[];var u=0,c={};C(ln,this,function(o){function t(t,e){t=i[t];return A(t)?e:t}function a(t,e){var n,r=(n=(n=ie)||!0===i.disableDbgExt?n:ie||(r=S("Microsoft"),ie=r?r.ApplicationInsights:ie))?n.ChromeDbgExt:null;r&&r.diagLog&&r.diagLog(t,e)}A(i)&&(i={}),o.consoleLoggingLevel=function(){return t("loggingLevelConsole",0)},o.telemetryLoggingLevel=function(){return t("loggingLevelTelemetry",1)},o.maxInternalMessageLimit=function(){return t("maxMessageLimit",25)},o.enableDebugExceptions=function(){return t("enableDebugExceptions",!1)},o.throwInternal=function(t,e,n,r,i){e=new ue(e,n,i=void 0!==i&&i,r);if(o.enableDebugExceptions())throw O(e);n=1===t?"errorToConsole":"warnToConsole";w(e.message)?a("throw"+(1===t?"Critical":"Warning"),e):(r=o.consoleLoggingLevel(),i?(i=+e.messageId,!c[i]&&t<=r&&(o[n](e.message),c[i]=!0)):t<=r&&o[n](e.message),o.logInternalMessage(t,e))},o.warnToConsole=function(t){ae("warn",t),a("warning",t)},o.errorToConsole=function(t){ae("error",t),a("error",t)},o.resetInternalMessageCount=function(){u=0,c={}},o.logInternalMessage=function(t,e){var n,r;u>=o.maxInternalMessageLimit()||(r=!0,n="AITR_"+e.messageId,c[n]?r=!1:c[n]=!0,r&&(t<=o.telemetryLoggingLevel()&&(o.queue.push(e),u++,a(1===t?"error":"warn",e)),u===o.maxInternalMessageLimit()&&(r=new ue(23,n="Internal events throttle limit per PageView reached for this app.",!1),o.queue.push(r),1===t?o.errorToConsole(n):o.warnToConsole(n))))}})};function le(t,e,n,r,i,o){void 0===o&&(o=!1),(t||new se).throwInternal(e,n,r,i,o)}s.ParentContextKey="parent",s.ChildrenContextKey="childEvts";var fe=s;function s(t,i,e){var n,o=this,a=!1;o.start=E(),o.name=t,o.isAsync=e,o.isChildEvt=function(){return!1},b(i)&&(a=Bt(o,"payload",function(){return!n&&b(i)&&(n=i(),i=null),n})),o.getCtx=function(t){return t?(t===s.ParentContextKey||t===s.ChildrenContextKey?o:o.ctx||{})[t]:null},o.setCtx=function(t,e){t&&(t===s.ParentContextKey?(o[t]||(o.isChildEvt=function(){return!0}),o[t]=e):t===s.ChildrenContextKey?o[t]=e:(o.ctx=o.ctx||{})[t]=e)},o.complete=function(){var t=0,e=o.getCtx(s.ChildrenContextKey);if(k(e))for(var n=0;n<e.length;n++){var r=e[n];r&&(t+=r.time)}o.time=E()-o.start,o.exTime=o.time-t,o.complete=function(){},!a&&b(i)&&(o.payload=i())}}var pe="CoreUtils.doPerf";function de(t,e,n,r,i){if(t)if(t=b(t.getPerfMgr)?t.getPerfMgr():t){var o,a=void 0,u=t.getCtx(pe);try{if(a=t.create(e(),r,i))return u&&a.setCtx&&(a.setCtx(fe.ParentContextKey,u),u.getCtx&&u.setCtx&&((o=u.getCtx(fe.ChildrenContextKey))||(o=[],u.setCtx(fe.ChildrenContextKey,o)),o.push(a))),t.setCtx(pe,a),n(a)}catch(c){a&&a.setCtx&&a.setCtx("exception",c)}finally{a&&t.fire(a),t.setCtx(pe,u)}}n()}var ge=4294967296,l=4294967295,me=!1,ve=123456789,he=987654321;function ye(t){var e,n=0,r=S("crypto")||S("msCrypto");if(0===(n=r&&r.getRandomValues?r.getRandomValues(new Uint32Array(1))[0]&l:n)&&re()){if(!me)try{var i=2147483647&E();(e=(Math.random()*ge^i)+i)<0&&(e>>>=0),ve=123456789+e&l,he=987654321-e&l,me=!0}catch(o){}r=((he=36969*(65535&he)+(he>>16)&l)<<16)+(65535&(ve=18e3*(65535&ve)+(ve>>16)&l))>>>0&l|0,n=(r>>>=0)&l}return 0===n&&(n=Math.floor(ge*Math.random()|0)),t||(n>>>=0),n}var Te=o,e="2.8.4-nightly.2205-07",c="."+function(t){void 0===t&&(t=22);for(var e=ye()>>>0,n=0,r=x;r.length<t;)r+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[0|63&e]||"",e>>>=6,5==++n&&(e=(ye()<<2&4294967295|3&e)>>>0,n=0);return r}(6);function Ce(t){return 1===t.nodeType||9===t.nodeType||!+t.nodeType}var xe,_e=xe={id:Rt("_aiData-plugin."+e+0+((f=void 0!==f&&f)?"."+e:"")+c),accept:Ce,get:function(t,e,n,r){var i=t[xe.id];return i?i[Rt(e)]:(r&&((i=function(t,e){var n=e[t.id];if(!n){n={};try{Ce(e)&&!function(t,e,n){if(Te)try{return Te(t,e,{value:n,enumerable:!1,configurable:!0}),1}catch(r){}}(e,t.id,n)&&(e[t.id]=n)}catch(r){}}return n}(xe,t))[Rt(e)]=n),n)},kill:function(t,e){if(t&&t[e])try{delete t[e]}catch(n){}}};function we(t){return _e.get(t,"state",{},!0)}var Ae="TelemetryPluginChain",be="_hasRun",Ie="_getTelCtx",ke=0;function Ne(t,a,n,e){var r=null,i=[],o=(null!==e&&(r=e?function(t,e,n){for(;t;){if(t.getPlugin()===n)return t;t=t.getNext()}return Ee([n],e.config||{},e)}(t,n,e):t),{_next:function(){var t,e=r;return r=e?e.getNext():null,e||(t=i)&&0<t.length&&(N(t,function(t){try{t.func.call(t.self,t.args)}catch(e){le(n.logger,2,73,"Unexpected Exception during onComplete - "+O(e))}}),i=[]),e},ctx:{core:function(){return n},diagLog:function(){return(n||{}).logger||new se(a)},getCfg:function(){return a},getExtCfg:u,getConfig:function(t,e,n){void 0===n&&(n=!1);var r,t=u(t,null);return t&&!A(t[e])?r=t[e]:a&&!A(a[e])&&(r=a[e]),A(r)?n:r},hasNext:function(){return!!r},getNext:function(){return r},setNext:function(t){r=t},iterate:function(t){for(;e=o._next();){var e=e.getPlugin();e&&t(e)}},onComplete:function(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];t&&i.push({func:t,self:w(e)?o.ctx:e,args:n})}}});function u(t,e,n){var r,i,o;return void 0===e&&(e={}),void 0===n&&(n=0),(r=a&&(i=a.extensionConfig)&&t?i[t]:r)?jt(e)&&0!==n&&(o=function p(){var t=arguments,e=t[0]||{},n=t.length,r=!1,i=1;for(0<n&&"boolean"==typeof e&&(r=e,e=t[i]||{},i++),jt(e)||(e={});i<n;i++){var o,a,u,c,s=t[i],l=k(s),f=jt(s);for(o in s)(l&&o in s||f&&J.call(s,o))&&(a=s[o],u=void 0,r&&a&&((u=k(a))||Vt(a))&&(c=e[o],u?k(c)||(c=[]):Vt(c)||(c={}),a=p(r,c,a)),a!==undefined&&(e[o]=a))}return e}(!0,e,r),a&&2===n&&Kt(e,function(t){var e;A(o[t])&&!A(e=a[t])&&(o[t]=e)}),r=o):r=e,r}return o}function Pe(t,n,r,e){var i=Ne(t,n,r,e),o=i.ctx;return o.processNext=function(t){var e=i._next();return e&&e.processTelemetry(t,o),!e},o.createNew=function(t,e){return Pe((t=k(t=void 0===t?null:t)?Ee(t,n,r,e):t)||o.getNext(),n,r,e)},o}function Ee(t,e,n,r){var i,o=null,a=!r;return k(t)&&0<t.length&&(i=null,N(t,function(t){(a=!a&&r===t||a)&&t&&b(t.processTelemetry)&&(t=Me(t,e,n),o=o||t,i&&i._setNext(t),i=t)})),r&&!o?Ee([r],e,n):o}function Me(c,r,i){var s=null,o=b(c.processTelemetry),a=b(c.setNextPlugin),l=c?c.identifier+"-"+c.priority+"-"+ke++:"Unknown-0-"+ke++,u={getPlugin:function(){return c},getNext:function(){return s},processTelemetry:function(n,t){var e;f(t=t||(e=(e=c&&b(c[Ie])?c[Ie]():e)||Pe(u,r,i)),function(t){if(!c||!o)return!1;var e=we(c);return!e.teardown&&!e[Ct]&&(a&&c.setNextPlugin(s),c.processTelemetry(n,t),!0)},"processTelemetry",function(){return{item:n}},!n.sync)||t.processNext(n)},unload:function(r,i){f(r,function(){var t,e,n=!1;return c&&(t=we(c),e=c[_]||t.core,!c||e&&e!==r[_]()||t[p]||(t[_]=null,t[p]=!0,t[yt]=!1,c[p]&&!0===c[p](r,i)&&(n=!0))),n},"unload",function(){},i.isAsync)||r.processNext(i)},update:function(r,i){f(r,function(){var t,e,n=!1;return c&&(t=we(c),e=c[_]||t.core,!c||e&&e!==r[_]()||t[p]||c[Tt]&&!0===c[Tt](r,i)&&(n=!0)),n},"update",function(){},!1)||r.processNext(i)},_id:l,_setNext:function(t){s=t}};function f(n,r,i,t,e){var o=!1,a=c?c.identifier:Ae,u=(u=n[be])||(n[be]={});return n.setNext(s),c&&de(n[_](),function(){return a+":"+i},function(){u[l]=!0;try{var t=s?s._id:x;t&&(u[t]=!1),o=r(n)}catch(e){t=!s||u[s._id];t&&(o=!0),s&&t||le(n.diagLog(),1,73,"Plugin ["+a+"] failed during "+i+" - "+O(e)+", run flags: "+O(u))}},t,e),o}return Wt(u)}var Se="toGMTString",Oe="toUTCString",Le="cookie",Ue="expires",De="enabled",je="isCookieUseDisabled",Re="disableCookiesUsage",L="_ckMgr",Ke=null,ze=null,Ve=null,Be=typeof document===d&&document?document:S("document"),We={},Je={};function qe(t){return!t||t.isEnabled()}function Fe(t,i){M(n=(t=t||Je).cookieCfg=t.cookieCfg||{},"domain",t.cookieDomain,Dt,A),M(n,"path",t.cookiePath||"/",null,A),A(n[De])&&(e=void 0,w(t[je])||(e=!t[je]),w(t[Re])||(e=!t[Re]),n[De]=e);var e,n,s=n,l=s.path||"/",f=s.domain,r=!1!==s[De],p={isEnabled:function(){var t=r&&$e(i),e=Je[L];return t&&e&&p!==e?qe(e):t},setEnabled:function(t){r=!1!==t},set:function(t,e,n,r,i){var o,a,u,c=!1;return qe(p)&&(o={},-1!=(u=(a=P(e||x)).indexOf(";"))&&(a=P(e.substring(0,u)),o=Ge(e.substring(1+u))),M(o,"domain",r||f,Jt,w),A(n)||(u=re(),w(o[Ue])&&0<(e=E()+1e3*n)&&((r=new Date).setTime(e),M(o,Ue,He(r,u?Se:Oe)||He(r,u?Se:Oe)||x,Jt)),u||M(o,"max-age",x+n,null,w)),(e=typeof location===d&&location?location:S(Gt))&&"https:"===e.protocol&&(M(o,"secure",null,null,w),(ze=null===ze?!(zt(r=(te()||{}).userAgent)&&(I(r,"CPU iPhone OS 12")||I(r,"iPad; CPU OS 12")||I(r,"Macintosh; Intel Mac OS X 10_14")&&I(r,"Version/")&&I(r,"Safari")||I(r,"Macintosh; Intel Mac OS X 10_14")&&function(t,e){var n=!1;if(!t||(n=t===e))return n;if(Nt)return t[_t](e);var r=t,i=e,n=!1,t=r?r.length:0;if(t&&40<=t&&!(n=r===i)){for(var o=t-1,a=39;0<=a;a--){if(r[o]!=i[a])return;o--}n=!0}return n}(r,"AppleWebKit/605.1.15 (KHTML, like Gecko)")||I(r,"Chrome/5")||I(r,"Chrome/6")||I(r,"UnrealEngine")&&!I(r,"Chrome")||I(r,"UCBrowser/12")||I(r,"UCBrowser/11"))):ze)&&M(o,"SameSite","None",null,w)),M(o,"path",i||l,null,w),(s.setCookie||Qe)(t,Xe(a,o)),c=!0),c},get:function(t){var e=x;return qe(p)?(s.getCookie||function(t){var e,n=x;return Be&&(e=Be[Le]||x,Ve!==e&&(We=Ge(e),Ve=e),n=P(We[t]||x)),n})(t):e},del:function(t,e){return!!qe(p)&&p.purge(t,e)},purge:function(t,e){var n,r=!1;return $e(i)&&((n={}).path=e||"/",n[Ue]="Thu, 01 Jan 1970 00:00:01 GMT",e=n,re()||(e["max-age"]="0"),(s.delCookie||Qe)(t,Xe(x,e)),r=!0),r}};return p[L]=p}function $e(t){if(null===Ke){Ke=!1;try{Ke=(Be||{})[Le]!==undefined}catch(e){le(t,2,68,"Cannot access document.cookie - "+((t=e)&&"[object Error]"===Pt.call(t)?t.name:x),{exception:O(e)})}}return Ke}function Ge(t){var n={};return t&&t.length&&N(P(t).split(";"),function(t){var e;(t=P(t||x))&&(-1==(e=t.indexOf("="))?n[t]=null:n[P(t.substring(0,e))]=P(t.substring(1+e)))}),n}function He(t,e){return b(t[e])?t[e]():null}function Xe(t,e){var n=t||x;return Kt(e,function(t,e){n+="; "+t+(A(e)?x:"="+e)}),n}function Qe(t,e){Be&&(Be[Le]=t+"="+e)}function Ye(){var e=[];return{add:function(t){t&&e.push(t)},run:function(n,r){N(e,function(t){try{t(n,r)}catch(e){le(n.diagLog(),2,73,"Unexpected error calling unload handler - "+O(e))}}),e=[]}}}var Ze,U="getPlugin";function tn(){var u,c,s,l,f=Ze.call(this)||this;return f.priority=185,f.identifier="ReactPlugin",C(tn,f,function(i,t){var e,n,r;function o(){l=s=c=u=null}function a(){return u||le(i.diagLog(),1,64,"Analytics plugin is not available, React plugin telemetry will not be sent: "),u}o(),i.initialize=function(t,e,n,r){Ze.prototype.initialize.call(f,t,e,n,r),c=t.extensionConfig&&t.extensionConfig[i.identifier]?t.extensionConfig[i.identifier]:{history:null},N(n,function(t){"ApplicationInsightsAnalytics"===t.identifier&&(u=t)}),c.history&&(e=c.history,s=e.listen(function(t){var e="location"in t?t.location:t;l=setTimeout(function(){l=null;var t={uri:e.pathname};i.trackPageView(t)},500)}),r={uri:c.history.location.pathname},i.trackPageView(r))},i.getCookieMgr=function(){return(e=(n=i.core)?n.getCookieMgr():e)||(n=(n||{}).logger,(r=Fe[L]||Je[L])||(r=Fe[L]=Fe(t,n),Je[L]=r),e=r),e;var t,e,n,r},i.getAppInsights=a,i.processTelemetry=function(t,e){i.processNext(t,e)},i._doTeardown=function(t,e,n){b(s)&&s(),l&&clearTimeout(l),o()},n=a,r=["trackMetric","trackPageView","trackEvent","trackException","trackTrace"],(e=i)&&n&&jt(e)&&k(r)&&N(r,function(t){zt(t)&&qt(e,t,n,t,void 0)}),Bt(i,"_extensionConfig",function(){return c})}),f}H(tn,Ze=function fn(){var i,o,l,f,p,a=this;function e(t){var e,t=t=void 0===t?null:t;return t||(e=o||Pe(null,{},a.core),t=l&&l[U]?e.createNew(null,l[U]):e.createNew(null,l)),t}function c(t,e,n){t&&M(t,"extensionConfig",[],null,A),!n&&e&&(n=e.getProcessTelContext().getNext());var r=l;l&&l[U]&&(r=l[U]()),a.core=e,o=Pe(n,t,e,r)}function d(){i=!1,a.core=null,l=o=null,p=[],f=Ye()}d(),C(fn,a,function(s){s.initialize=function(t,e,n,r){c(t,e,r),i=!0},s.teardown=function(t,e){var n,r,i,o,a=s.core;if(a&&(!t||a===t.core()))return r=!1,i=t||function c(t,n,e){var r=n.config||{},i=Ne(t,r,n,e),o=i.ctx;return o.processNext=function(t){var e=i._next();return e&&e.unload(o,t),!e},o.createNew=function(t,e){return c((t=k(t=void 0===t?null:t)?Ee(t,r,n,e):t)||o.getNext(),n,e)},o}(null,a,l&&l[U]?l[U]():l),o=e||{reason:0,isAsync:!1},s[xt]&&!0===s[xt](i,o,u)?n=!0:u(),n;function u(){r||(r=!0,f.run(i,e),N(p,function(t){t.rm()}),p=[],!0===n&&i.processNext(o),d())}},s.update=function(t,e){var n,r,i,o=s.core;if(o&&(!t||o===t.core()))return r=!1,i=t||function u(t,n,e){var r=n.config||{},i=Ne(t,r,n,e).ctx;return i.processNext=function(e){return i.iterate(function(t){b(t.update)&&t.update(i,e)})},i.createNew=function(t,e){return u((t=k(t=void 0===t?null:t)?Ee(t,r,n,e):t)||i.getNext(),n,e)},i}(null,o,l&&l[U]?l[U]():l),s._doUpdate&&!0===s._doUpdate(i,e||{reason:0},a)?n=!0:a(),n;function a(){r||(r=!0,c(i.getCfg(),i.core(),i.getNext()))}},s._addHook=function(t){t&&(k(t)?p=p.concat(t):p.push(t))},qt(s,"_addUnloadCb",function(){return f},"add")}),a.diagLog=function(t){return e(t).diagLog()},a[yt]=function(){return i},a.setInitialized=function(t){i=t},a.setNextPlugin=function(t){l=t},a.processNext=function(t,e){e?e.processNext(t):l&&b(l.processTelemetry)&&l.processTelemetry(t,null)},a._getTelCtx=e});var en,o=tn,nn=(H(rn,en=R.Component),rn.prototype.componentDidMount=function(){var t=this;this._mountTimestamp=E(),this._firstActiveTimestamp=0,this._totalIdleTime=0,this._lastActiveTimestamp=0,this._idleStartTimestamp=0,this._idleCount=0,this._intervalId=setInterval(function(){0<t._lastActiveTimestamp&&0===t._idleStartTimestamp&&E()-t._lastActiveTimestamp>=t._idleTimeout&&(t._idleStartTimestamp=E(),t._idleCount++)},100)},rn.prototype.componentWillUnmount=function(){if(0===this._mountTimestamp)throw Error("withAITracking:componentWillUnmount: mountTimestamp is not initialized.");var t,e;this._intervalId&&clearInterval(this._intervalId),0!==this._firstActiveTimestamp&&(t=this.getEngagementTimeSeconds(),e={"Component Name":this._componentName},this._reactPlugin.trackMetric({average:t,name:"React Component Engaged Time (seconds)",sampleCount:1},e))},rn.prototype.getEngagementTimeSeconds=function(){return(E()-this._firstActiveTimestamp-this._totalIdleTime-this._idleCount*this._idleTimeout)/1e3},rn);function rn(t,e,n){var r=en.call(this,t)||this;return r._mountTimestamp=0,r._firstActiveTimestamp=0,r._idleStartTimestamp=0,r._lastActiveTimestamp=0,r._totalIdleTime=0,r._idleCount=0,r._idleTimeout=5e3,r.trackActivity=function(t){var e;0===r._firstActiveTimestamp?(r._firstActiveTimestamp=E(),r._lastActiveTimestamp=r._firstActiveTimestamp):r._lastActiveTimestamp=E(),0<r._idleStartTimestamp&&(e=r._lastActiveTimestamp-r._idleStartTimestamp,r._totalIdleTime+=e,r._idleStartTimestamp=0)},r._reactPlugin=e,r._componentName=n,r}on={},Kt({Verbose:0,Information:1,Warning:2,Error:3,Critical:4},function(t,e){on[t]=e,on[e]=t}),f=on,It&&Kt(f,function(t,e){(k(e)||jt(e))&&It(e)});var on,an,un=Wt(f);function cn(){var t=null!==an&&an.apply(this,arguments)||this;return t.state={hasError:!1},t}H(cn,an=K["default"].Component),cn.prototype.componentDidCatch=function(t,e){this.setState({hasError:!0}),this.props.appInsights.trackException({error:t,exception:t,severityLevel:un.Error,properties:e})},cn.prototype.render=function(){var t;return this.state.hasError?(t=this.props.onError,K["default"].createElement(t)):this.props.children};var e=cn,sn=u.createContext(undefined),c=(t.AITrackedComponentBase=nn,t.AppInsightsContext=sn,t.AppInsightsErrorBoundary=e,t.ReactPlugin=o,t.useAppInsightsContext=function(){return u.useContext(sn)},t.useTrackEvent=function(t,e,n,r){void 0===r&&(r=!0);var n=u.useState(n),i=n[0],n=n[1],o=u.useRef(r);return u.useEffect(function(){o.current?o.current=!1:t.trackEvent({name:e},i)},[t,i,e]),n},t.useTrackMetric=function(r,i,o){var a=u.useRef({hookTimestamp:E(),firstActiveTimestamp:0,totalIdleTime:0,lastActiveTimestamp:0,idleStartTimestamp:0,idleCount:0,idleTimeout:5e3}),t=u.useRef();return t.current=function(){var t=a.current;0<t.lastActiveTimestamp&&0===t.idleStartTimestamp&&E()-t.lastActiveTimestamp>=t.idleTimeout&&(t.idleStartTimestamp=E(),t.idleCount++)},u.useEffect(function(){var n=setInterval(t.current,100);return function(){clearInterval(n);var t,e=a.current;if(0===e.hookTimestamp)throw Error("useAppInsights:unload hook: hookTimestamp is not initialized.");0!==e.firstActiveTimestamp&&(e=e,e={average:(E()-e.firstActiveTimestamp-e.totalIdleTime-e.idleCount*e.idleTimeout)/1e3,name:"React Component Engaged Time (seconds)",sampleCount:1},t=$({"Component Name":i},o),r.trackMetric(e,t))}},[]),function(){var t,e=a.current;0===e.firstActiveTimestamp?(e.firstActiveTimestamp=E(),e.lastActiveTimestamp=e.firstActiveTimestamp):e.lastActiveTimestamp=E(),0<e.idleStartTimestamp&&(t=e.lastActiveTimestamp-e.idleStartTimestamp,e.totalIdleTime+=t,e.idleStartTimestamp=0)}},t.withAITracking=function(e,t,n,r){return n!==undefined&&null!==n&&"string"==typeof n||(n=t.prototype&&t.prototype.constructor&&t.prototype.constructor.name||"Unknown"),r!==undefined&&null!==r&&"string"==typeof r||(r=""),H(i,o=nn),i.prototype.render=function(){return R.createElement("div",{onKeyDown:this.trackActivity,onMouseMove:this.trackActivity,onScroll:this.trackActivity,onMouseDown:this.trackActivity,onTouchStart:this.trackActivity,onTouchMove:this.trackActivity,className:r},R.createElement(t,$({},this.props)))},i;function i(t){return o.call(this,t,e,n)||this}var o},t),f="__esModule",e={value:!0},o=Object.defineProperty;if(o)try{return void o(c,f,e)}catch(pn){}typeof e.value!==undefined&&(c[f]=e.value)};"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("react")):"function"==typeof define&&define.amd?define(["exports","react"],e):e(((t="undefined"!=typeof globalThis?globalThis:t||self).Microsoft=t.Microsoft||{},t.Microsoft.ApplicationInsights=t.Microsoft.ApplicationInsights||{}),t.React);
6
6
  //# sourceMappingURL=applicationinsights-react-js.min.js.map