@microsoft/applicationinsights-react-native 2.5.0-beta.2203-12 → 2.5.0-beta.2203-13

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 Native Plugin, 2.5.0-beta.2203-12
2
+ * Application Insights JavaScript SDK - React Native Plugin, 2.5.0-beta.2203-13
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
- var e=this,n=function(R,e){"use strict";function k(e){return e&&"object"==typeof e&&"default"in e?e:{"default":e}}var j=k(e),U="function",a="object",u="undefined",r="prototype",B="hasOwnProperty",t=Object,e=t[r],n=(t.create,t.defineProperty),v=e[B],o=null;function p(e){return void 0===e&&(e=!0),o&&e||(typeof globalThis!==u&&globalThis&&(o=globalThis),typeof self!==u&&self&&(o=self),typeof window!==u&&window&&(o=window),typeof global!==u&&global&&(o=global)),o}function z(e){throw new TypeError(e)}(p()||{}).Symbol,(p()||{}).Reflect;var V=function(e,n){return(V=t.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,n){e.__proto__=n}||function(e,n){for(var t in n)n[B](t)&&(e[t]=n[t])})(e,n)},i="constructor",x="prototype",y="function",C="_dynInstFuncs",H="_isDynProxy",h="_dynClass",K="_dynInstChk",m=K,q="_dfOpts",W="_unknown_",G="__proto__",J="useBaseInst",$="setInstFuncs",l=Object,T=l.getPrototypeOf,Q=0;function w(e,n){return e&&l[x].hasOwnProperty.call(e,n)}function Z(e){return e&&(e===l[x]||e===Array[x])}function X(e){return Z(e)||e===Function[x]}function I(e){if(e){if(T)return T(e);e=e[G]||e[x]||(e[i]?e[i][x]:null);if(e)return e}return null}function b(e,n){var t=[],r=l.getOwnPropertyNames;if(r)t=r(e);else for(var o in e)"string"==typeof o&&w(e,o)&&t.push(o);if(t&&0<t.length)for(var i=0;i<t.length;i++)n(t[i])}function Y(e,n,t){return n!==i&&typeof e[n]===y&&(t||w(e,n))}function ee(e){throw new TypeError("DynamicProto: "+e)}function ne(e,n){for(var t=e.length-1;0<=t;t--)if(e[t]===n)return 1}function te(e,n){return w(e,x)?e.name||n||W:((e||{})[i]||{}).name||n||W}function _(e,r,n,t){w(e,x)||ee("theClass is an invalid class definition.");var o,i,a,l,u,c,f=e[x],s=(function(e){if(T)for(var n=[],t=I(r);t&&!X(t)&&!ne(n,t);){if(t===e)return 1;n.push(t),t=I(t)}}(f)||ee("["+te(e)+"] is not in class hierarchy of ["+te(r)+"]"),null),e=(w(f,h)?s=f[h]:(s="_dynCls$"+te(e,"_")+"$"+Q,Q++,f[h]=s),_[q]),d=!!e[J],g=(d&&t&&t[J]!==undefined&&(d=!!t[J]),i={},b(o=r,function(e){!i[e]&&Y(o,e,!1)&&(i[e]=o[e])}),i),d=(n(r,function(e,n,t,i){function r(e,n,t){var r,o=n[t];return o[H]&&i&&!1!==(r=e[C]||{})[m]&&(o=(r[n[h]]||{})[t]||o),function(){return o.apply(e,arguments)}}for(var o={},a=(b(t,function(e){o[e]=r(n,t,e)}),I(e)),l=[];a&&!X(a)&&!ne(l,a);)b(a,function(e){!o[e]&&Y(a,e,!T)&&(o[e]=r(n,a,e))}),l.push(a),a=I(a);return o}(f,r,g,d)),!!T&&!!e[$]);a=f,n=s,l=r,u=g,e=!1!==(d=d&&t?!!t[$]:d),Z(a)||(f=l[C]=l[C]||{},c=f[n]=f[n]||{},!1!==f[m]&&(f[m]=!!e),b(l,function(e){var t,r,o;Y(l,e,!1)&&l[e]!==u[e]&&(c[e]=l[e],delete l[e],w(a,e)&&(!a[e]||a[e][H])||(a[e]=(t=a,r=e,(o=function(){var e,n;return(function(e,n,t,r){var o=null;if(e&&w(t,h)){var i=e[C]||{};if((o=(i[t[h]]||{})[n])||ee("Missing ["+n+"] "+y),!o[K]&&!1!==i[m]){for(var a=!w(e,n),l=I(e),u=[];a&&l&&!X(l)&&!ne(u,l);){var c=l[n];if(c){a=c===r;break}u.push(l),l=I(l)}try{a&&(e[n]=o),o[K]=1}catch(f){i[m]=!1}}}return o}(this,r,t,o)||(typeof(n=(n=t[e=r])===o?I(t)[e]:n)!==y&&ee("["+e+"] is not a "+y),n)).apply(this,arguments)})[H]=1,o)))}))}_[q]={setInstFuncs:!0,useBaseInst:!0};var N="",re="isInitialized",d="teardown",g="core",oe="update",ie="disabled",ae="_doTeardown",le="toString",ue="constructor",ce=n,c=t.freeze,fe=Array.isArray,se=e[le],de=v[le],ge=de.call(t),ve=/-([a-z])/g,pe=/([^\w\d_$])/g,xe=/^(\d+[\w\d_$])/,ye=Object.getPrototypeOf;function S(e){return e===undefined||typeof e===u}function E(e){return null===e||S(e)}function Ce(e){return!(!e||typeof e!==a)}function F(e){return!(!e||typeof e!==U)}function he(e){var n=e;return e&&"string"==typeof e?(n=(n=e.replace(ve,function(e,n){return n.toUpperCase()})).replace(pe,"_")).replace(xe,function(e,n){return"_"+n}):n}function me(e,n){if(e)for(var t in e)v.call(e,t)&&n.call(e,t,e[t])}function Te(e,n){return!(!e||!n||!~e.indexOf(n))}var A=fe||function(e){return!(!e||"[object Array]"!==se.call(e))};function we(e){return e&&"object"==typeof e&&(!(e=(ye||function(e){if(e){if(ye)return ye(e);e=e.__proto__||e[r]||e[ue];if(e)return e}return null})(e))||typeof(e=e[ue]&&v.call(e,ue)?e[ue]:e)===U&&de.call(e)===ge)}function P(e,n,t){var r=e.length;try{for(var o=0;o<r&&!(o in e&&-1===n.call(t||e,e[o],o,e));o++);}catch(i){}}var Ie=c||function(e){return e};function be(){var e=Date;return e.now?e.now():(new e).getTime()}function _e(e){var t={};return me(e,function(e,n){if(t[e]=n,!S(t[n]))throw Error("["+n+"] exists for "+e);t[n]=e}),Ie(t)}var Ne="window",Se="console",Ee="JSON",Fe=null,Ae=null;function f(e){var n=p();return n&&n[e]?n[e]:e===Ne&&typeof window===a&&window?window:null}function Pe(){return typeof JSON===a&&JSON||null!==f(Ee)}function Le(){return Pe()?JSON||f(Ee):null}function L(e){var n=Object[r].toString.call(e),t=N;return"[object Error]"===n?t="{ stack: '"+e.stack+"', message: '"+e.message+"', name: '"+e.name+"'":Pe()&&(t=Le().stringify(e)),n+t}var Me=null;function De(e){return e?'"'+e.replace(/\"/g,N)+'"':N}function Oe(e,n){var t,r=typeof console!==u?console:f(Se);r&&(t="log",F(r[t=r[e]?e:t])&&r[t](n))}ke.dataType="MessageData";var Re=ke;function ke(e,n,t,r){void 0===t&&(t=!1),this.messageId=e,this.message=(t?"AI: ":"AI (Internal): ")+e;t=N,Pe()&&(t=Le().stringify(r)),e=(n?" message:"+De(n):N)+(r?" props:"+De(t):N);this.message+=e}var je=function Cn(o){this.identifier="DiagnosticLogger",this.queue=[];var l=0,u={};_(Cn,this,function(i){function e(e,n){e=o[e];return E(e)?n:e}function a(e,n){var t,r=(t=(t=Me)||!0===o.disableDbgExt?t:Me||(r=f("Microsoft"),Me=r?r.ApplicationInsights:Me))?t.ChromeDbgExt:null;r&&r.diagLog&&r.diagLog(e,n)}E(o)&&(o={}),i.consoleLoggingLevel=function(){return e("loggingLevelConsole",0)},i.telemetryLoggingLevel=function(){return e("loggingLevelTelemetry",1)},i.maxInternalMessageLimit=function(){return e("maxMessageLimit",25)},i.enableDebugExceptions=function(){return e("enableDebugExceptions",!1)},i.throwInternal=function(e,n,t,r,o){n=new Re(n,t,o=void 0!==o&&o,r);if(i.enableDebugExceptions())throw n;t=1===e?"errorToConsole":"warnToConsole";S(n.message)?a("throw"+(1===e?"Critical":"Warning"),n):(r=i.consoleLoggingLevel(),o?(o=+n.messageId,!u[o]&&e<=r&&(i[t](n.message),u[o]=!0)):e<=r&&i[t](n.message),i.logInternalMessage(e,n))},i.warnToConsole=function(e){Oe("warn",e),a("warning",e)},i.errorToConsole=function(e){Oe("error",e),a("error",e)},i.resetInternalMessageCount=function(){l=0,u={}},i.logInternalMessage=function(e,n){var t,r;l>=i.maxInternalMessageLimit()||(r=!0,t="AITR_"+n.messageId,u[t]?r=!1:u[t]=!0,r&&(e<=i.telemetryLoggingLevel()&&(i.queue.push(n),l++,a(1===e?"error":"warn",n)),l===i.maxInternalMessageLimit()&&(r=new Re(23,t="Internal events throttle limit per PageView reached for this app.",!1),i.queue.push(r),1===e?i.errorToConsole(t):i.warnToConsole(t))))}})};function Ue(e,n,t,r,o,i){void 0===i&&(i=!1),(e||new je).throwInternal(n,t,r,o,i)}s.ParentContextKey="parent",s.ChildrenContextKey="childEvts";var Be=s;function s(e,o,n){var r,i=this,a=!1;i.start=be(),i.name=e,i.isAsync=n,i.isChildEvt=function(){return!1},F(o)&&(a=function(e){if(ce)try{var n={enumerable:!0,configurable:!0,get:function(){return!r&&F(o)&&(r=o(),o=null),r}};return ce(e,"payload",n),!0}catch(t){}return!1}(i)),i.getCtx=function(e){return e?(e===s.ParentContextKey||e===s.ChildrenContextKey?i:i.ctx||{})[e]:null},i.setCtx=function(e,n){e&&(e===s.ParentContextKey?(i[e]||(i.isChildEvt=function(){return!0}),i[e]=n):e===s.ChildrenContextKey?i[e]=n:(i.ctx=i.ctx||{})[e]=n)},i.complete=function(){var e=0,n=i.getCtx(s.ChildrenContextKey);if(A(n))for(var t=0;t<n.length;t++){var r=n[t];r&&(e+=r.time)}i.time=be()-i.start,i.exTime=i.time-e,i.complete=function(){},!a&&F(o)&&(i.payload=o())}}var ze="CoreUtils.doPerf";function Ve(e,n,t,r,o){if(e)if(e=F(e.getPerfMgr)?e.getPerfMgr():e){var i,a=void 0,l=e.getCtx(ze);try{if(a=e.create(n(),r,o))return l&&a.setCtx&&(a.setCtx(Be.ParentContextKey,l),l.getCtx&&l.setCtx&&((i=l.getCtx(Be.ChildrenContextKey))||(i=[],l.setCtx(Be.ChildrenContextKey,i)),i.push(a))),e.setCtx(ze,a),t(a)}catch(u){a&&a.setCtx&&a.setCtx("exception",u)}finally{a&&e.fire(a),e.setCtx(ze,l)}}t()}var He=4294967296,M=4294967295,Ke=!1,qe=123456789,We=987654321;function Ge(e){var n,t=0,r=f("crypto")||f("msCrypto");if(0===(t=r&&r.getRandomValues?r.getRandomValues(new Uint32Array(1))[0]&M:t)&&(!(r=typeof navigator===a&&navigator?navigator:f("navigator"))||r.userAgent===Ae&&null!==Fe||(r=((Ae=r.userAgent)||N).toLowerCase(),Fe=Te(r,"msie")||Te(r,"trident/")),Fe)){if(!Ke)try{var o=2147483647&be();(n=(Math.random()*He^o)+o)<0&&(n>>>=0),qe=123456789+n&M,We=987654321-n&M,Ke=!0}catch(i){}r=((We=36969*(65535&We)+(We>>16)&M)<<16)+(65535&(qe=18e3*(65535&qe)+(qe>>16)&M))>>>0&M|0,t=(r>>>=0)&M}return 0===t&&(t=Math.floor(He*Math.random()|0)),e||(t>>>=0),t}var Je=n,e="2.8.0-beta.2203-12",le="."+function(e){void 0===e&&(e=22);for(var n=Ge()>>>0,t=0,r=N;r.length<e;)r+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[0|63&n]||"",n>>>=6,5==++t&&(n=(Ge()<<2&4294967295|3&n)>>>0,t=0);return r}(6);function $e(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType}var Qe,Ze,Xe=Ze={id:he("_aiData-plugin."+e+0+((Qe=void 0!==Qe&&Qe)?"."+e:"")+le),accept:$e,get:function(e,n,t,r){var o=e[Ze.id];return o?o[he(n)]:(r&&((o=function(e,n){var t=n[e.id];if(!t){t={};try{$e(n)&&!function(e,n,t){if(Je)try{return Je(e,n,{value:t,enumerable:!1,configurable:!0}),1}catch(r){}}(n,e.id,t)&&(n[e.id]=t)}catch(r){}}return t}(Ze,e))[he(n)]=t),t)},kill:function(e,n){if(e&&e[n])try{delete e[n]}catch(t){}}};function Ye(e){return Xe.get(e,"state",{},!0)}var en="TelemetryPluginChain",nn="_hasRun",tn="_getTelCtx",rn=0;function on(e,a,t,n){var r=null,o=[],i=(null!==n&&(r=n?function(e,n,t,r){for(;e;){if(e.getPlugin()===r)return e;e=e.getNext()}return D([r],n,t)}(e,a,t,n):e),{_next:function(){var e,n=r;return r=n?n.getNext():null,n||(e=o)&&0<e.length&&(P(e,function(e){try{e.func.call(e.self,e.args)}catch(n){Ue(t.logger,2,73,"Unexpected Exception during onComplete - "+L(n))}}),o=[]),n},ctx:{core:function(){return t},diagLog:function(){return(t||{}).logger||new je(a)},getCfg:function(){return a},getExtCfg:l,getConfig:function(e,n,t){void 0===t&&(t=!1);var r,e=l(e,null);return e&&!E(e[n])?r=e[n]:a&&!E(a[n])&&(r=a[n]),E(r)?t:r},hasNext:function(){return!!r},getNext:function(){return r},setNext:function(e){r=e},iterate:function(e){for(;n=i._next();){var n=n.getPlugin();n&&e(n)}},onComplete:function(e,n){for(var t=[],r=2;r<arguments.length;r++)t[r-2]=arguments[r];e&&o.push({func:e,self:S(n)?i.ctx:n,args:t})}}});function l(e,n,t){var r,o,i;return void 0===n&&(n={}),void 0===t&&(t=0),(r=a&&(o=a.extensionConfig)&&e?o[e]:r)?Ce(n)&&0!==t&&(i=function d(){var e=arguments,n=e[0]||{},t=e.length,r=!1,o=1;for(0<t&&"boolean"==typeof n&&(r=n,n=e[o]||{},o++),Ce(n)||(n={});o<t;o++){var i,a,l,u,c=e[o],f=A(c),s=Ce(c);for(i in c)(f&&i in c||s&&v.call(c,i))&&(a=c[i],l=void 0,r&&a&&((l=A(a))||we(a))&&(u=n[i],l?A(u)||(u=[]):we(u)||(u={}),a=d(r,u,a)),a!==undefined&&(n[i]=a))}return n}(!0,n,r),a&&2===t&&me(n,function(e){var n;E(i[e])&&!E(n=a[e])&&(i[e]=n)})):r=n,r}return i}function an(e,t,r,n){var o=on(e,t,r,n),i=o.ctx;return i.processNext=function(e){var n=o._next();return n&&n.processTelemetry(e,i),!n},i.createNew=function(e,n){return an((e=A(e=void 0===e?null:e)?D(e,t,r,n):e)||i.getNext(),t,r,n)},i}function D(e,n,t,r){var o,i=null,a=!r;return A(e)&&0<e.length&&(o=null,P(e,function(e){(a=!a&&r===e||a)&&e&&F(e.processTelemetry)&&(e=ln(e,n,t),i=i||e,o&&o._setNext(e),o=e)})),r&&!i?D([r],n,t):i}function ln(u,r,o){var c=null,i=F(u.processTelemetry),a=F(u.setNextPlugin),f=u?u.identifier+"-"+u.priority+"-"+rn++:"Unknown-0-"+rn++,l={getPlugin:function(){return u},getNext:function(){return c},processTelemetry:function(t,e){var n;s(e=e||(n=(n=u&&F(u[tn])?u[tn]():n)||an(l,r,o)),function(e){if(!u||!i)return!1;var n=Ye(u);return!n[d]&&!n[ie]&&(a&&u.setNextPlugin(c),u.processTelemetry(t,e),!0)},"processTelemetry",function(){return{item:t}},!t.sync)||e.processNext(t)},unload:function(r,o){s(r,function(){var e,n,t=!1;return u&&(e=Ye(u),n=u[g]||e.core,!u||n&&n!==r[g]()||e[d]||(e[g]=null,e[d]=!0,e[re]=!1,u[d]&&!0===u[d](r,o)&&(t=!0))),t},"unload",function(){},o.isAsync)||r.processNext(o)},update:function(r,o){s(r,function(){var e,n,t=!1;return u&&(e=Ye(u),n=u[g]||e.core,!u||n&&n!==r[g]()||e[d]||u[oe]&&!0===u[oe](r,o)&&(t=!0)),t},"update",function(){},!1)||r.processNext(o)},_id:f,_setNext:function(e){c=e}};function s(t,r,o,e,n){var i=!1,a=u?u.identifier:en,l=(l=t[nn])||(t[nn]={});return t.setNext(c),u&&Ve(t[g](),function(){return a+":"+o},function(){l[f]=!0;try{var e=c?c._id:N;e&&(l[e]=!1),i=r(t)}catch(n){e=!c||l[c._id];e&&(i=!0),c&&e||Ue(t.diagLog(),1,73,"Plugin ["+u.identifier+"] failed during "+o+" - "+L(n)+", run flags: "+L(l))}},e,n),i}return Ie(l)}function un(){var n=[];return{add:function(e){e&&n.push(e)},run:function(t,r){P(n,function(e){try{e(t,r)}catch(n){Ue(t.diagLog(),2,73,"Unexpected error calling unload handler - "+L(n))}}),n=[]}}}var cn,fn,sn,O="getPlugin",fe=function hn(){var i,a,c,f,s,l=this;function n(e){var n,e=e=void 0===e?null:e;return e||(n=a||an(null,{},l.core),e=c&&c[O]?n.createNew(null,c[O]):n.createNew(null,c)),e}function d(e,n,t){e&&(i="extensionConfig",o=r=[],e&&(o=e[i])!==r&&E(o)&&(e[i]=o=r)),!t&&n&&(t=n.getProcessTelContext().getNext());var r,o,i=c;c&&c[O]&&(i=c[O]()),l.core=n,a=an(t,e,n,i)}function g(){i=!1,l.core=null,c=a=null,s=[],f=un()}g(),_(hn,l,function(u){var e,n,t,r,o;u.initialize=function(e,n,t,r){d(e,n,r),i=!0},u.teardown=function(e,n){var t,r,o,i;if(u.core&&(!e||u.core===e.core()))return r=!1,o=e||function l(e,t,r,n){var o=on(e,t,r,n),i=o.ctx;return i.processNext=function(e){var n=o._next();return n&&n.unload(i,e),!n},i.createNew=function(e,n){return l((e=A(e=void 0===e?null:e)?D(e,t,r,n):e)||i.getNext(),t,r,n)},i}(null,{},u.core,c&&c[O]?c[O]():c),i=n||{reason:0,isAsync:!1},u[ae]&&!0===u[ae](o,i,a)?t=!0:a(),t;function a(){r||(r=!0,f.run(o,n),P(s,function(e){e.rm()}),s=[],!0===t&&o.processNext(i),g())}},u.update=function(e,n){var t,r,o;if(u.core&&(!e||u.core===e.core()))return r=!1,o=e||function a(e,t,r,n){var o=on(e,t,r,n).ctx;return o.processNext=function(n){return o.iterate(function(e){F(e[oe])&&e[oe](o,n)})},o.createNew=function(e,n){return a((e=A(e=void 0===e?null:e)?D(e,t,r,n):e)||o.getNext(),t,r,n)},o}(null,{},u.core,c&&c[O]?c[O]():c),u._doUpdate&&!0===u._doUpdate(o,n||{reason:0},i)?t=!0:i(),t;function i(){r||(r=!0,d(o.getCfg(),o.core(),o.getNext()))}},u._addHook=function(e){e&&(A(e)?s=s.concat(e):s.push(e))},e="_addUnloadCb",n=function(){return f},void 0===t&&(t=!0),u&&n&&(t||S(u[e]))&&(u[e]=(o=r=null,F(t=n)?r=t:o=t,function(){var e=arguments;if(o=r?r():o)return o.add.apply(o,e)}))}),l.diagLog=function(e){return n(e).diagLog()},l[re]=function(){return i},l.setInitialized=function(e){i=e},l.setNextPlugin=function(e){c=e},l.processNext=function(e,n){n?n.processNext(e):c&&F(c.processTelemetry)&&c.processTelemetry(e,null)},l._getTelCtx=n},dn=_e({CRITICAL:1,WARNING:2}),gn=_e({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}),vn=((c=cn={})[c.Verbose=0]="Verbose",c[c.Information=1]="Information",c[c.Warning=2]="Warning",c[c.Error=3]="Error",c[c.Critical=4]="Critical",pn.getConfig=function(e,n,t,r){return void 0===r&&(r=!1),t=(t&&e.extensionConfig&&e.extensionConfig[t]&&!E(e.extensionConfig[t][n])?e.extensionConfig[t]:e)[n],E(t)?r:t},pn);function pn(){}function xn(){this.constructor=fn}function yn(e){var r,s,d,l,n=sn.call(this)||this;function g(){return{disableDeviceCollection:!1,disableExceptionCollection:!1}}return n.identifier="AppInsightsReactNativePlugin",n.priority=140,_(yn,n,function(c,f){function o(){r={},s=e||g(),l=d=null}function i(){return typeof global!==u&&global?global:p()}function a(e,n){var t={exception:e,severityLevel:cn.Error};d?d.trackException(t):c.diagLog().throwInternal(dn.CRITICAL,gn.TelemetryInitializerFailed,"Analytics plugin is not available, ReactNative plugin telemetry will not be sent: "),l&&l.call(global,e,n)}o(),c.initialize=function(e,n,t){var r,o;if(!c.isInitialized()){f.initialize(e,n,t);var i=e||{},a=g(),l=function(e,n){s[e]=vn.getConfig(i,e,c.identifier,S(s[e])?n:s[e])};if(Ce(a))for(var u in a)o=u,(r=a)&&v.call(r,o)&&l(u,a[u]);s.disableDeviceCollection||c._collectDeviceInfo(),t&&P(t,function(e){"ApplicationInsightsAnalytics"===e.identifier&&(d=e)}),s.disableExceptionCollection||c._setExceptionHandler()}},c.processTelemetry=function(e,n){var t=e;r&&(t.ext=t.ext||{},t.ext.device=t.ext.device||{},"string"==typeof r.id&&(t.ext.device.localId=r.id),"string"==typeof r.model&&(t.ext.device.model=r.model),"string"==typeof r.deviceClass&&(t.ext.device.deviceClass=r.deviceClass)),c.processNext(e,n)},c.setDeviceId=function(e){r.id=e},c.setDeviceModel=function(e){r.model=e},c.setDeviceType=function(e){r.deviceClass=e},c._collectDeviceInfo=function(){try{r.deviceClass=j["default"].getDeviceType(),r.id=j["default"].getUniqueId(),r.model=j["default"].getModel()}catch(n){c.diagLog().warnToConsole("Failed to get DeviceInfo: "+((e=n)&&"[object Error]"===se.call(e)?e.name:N)+" - "+L(n))}var e},c._doTeardown=function(e,n,t){var r;(r=i())&&r.ErrorUtils&&r.ErrorUtils.getGlobalHandler()===a&&r.ErrorUtils.setGlobalHandler(l||null),o()},c._setExceptionHandler=function(){var e=i();e&&e.ErrorUtils&&(l="function"==typeof e.ErrorUtils.getGlobalHandler&&e.ErrorUtils.getGlobalHandler()||e.ErrorUtils._globalHandler,e.ErrorUtils.setGlobalHandler(a))},c._config=s,c._getDbgPlgTargets=function(){return[r]}}),n}fn=yn,typeof(n=sn=fe)!==U&&null!==n&&z("Class extends value "+n+" is not a constructor or null"),V(fn,n),fn[r]=(xn[r]=n[r],new xn),R.ReactNativePlugin=yn,Object.defineProperty(R,"__esModule",{value:!0})};"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("react-native-device-info")):"function"==typeof define&&define.amd?define(["exports","react-native-device-info"],n):n(((e="undefined"!=typeof globalThis?globalThis:e||self).Microsoft=e.Microsoft||{},e.Microsoft.ApplicationInsights=e.Microsoft.ApplicationInsights||{}),e.DeviceInfo);
5
+ var e=this,n=function(R,e){"use strict";function k(e){return e&&"object"==typeof e&&"default"in e?e:{"default":e}}var j=k(e),U="function",a="object",u="undefined",r="prototype",B="hasOwnProperty",t=Object,e=t[r],n=(t.create,t.defineProperty),v=e[B],o=null;function p(e){return void 0===e&&(e=!0),o&&e||(typeof globalThis!==u&&globalThis&&(o=globalThis),typeof self!==u&&self&&(o=self),typeof window!==u&&window&&(o=window),typeof global!==u&&global&&(o=global)),o}function z(e){throw new TypeError(e)}(p()||{}).Symbol,(p()||{}).Reflect;var V=function(e,n){return(V=t.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,n){e.__proto__=n}||function(e,n){for(var t in n)n[B](t)&&(e[t]=n[t])})(e,n)},i="constructor",x="prototype",y="function",C="_dynInstFuncs",H="_isDynProxy",h="_dynClass",K="_dynInstChk",m=K,q="_dfOpts",W="_unknown_",G="__proto__",J="useBaseInst",$="setInstFuncs",l=Object,T=l.getPrototypeOf,Q=0;function w(e,n){return e&&l[x].hasOwnProperty.call(e,n)}function Z(e){return e&&(e===l[x]||e===Array[x])}function X(e){return Z(e)||e===Function[x]}function I(e){if(e){if(T)return T(e);e=e[G]||e[x]||(e[i]?e[i][x]:null);if(e)return e}return null}function b(e,n){var t=[],r=l.getOwnPropertyNames;if(r)t=r(e);else for(var o in e)"string"==typeof o&&w(e,o)&&t.push(o);if(t&&0<t.length)for(var i=0;i<t.length;i++)n(t[i])}function Y(e,n,t){return n!==i&&typeof e[n]===y&&(t||w(e,n))}function ee(e){throw new TypeError("DynamicProto: "+e)}function ne(e,n){for(var t=e.length-1;0<=t;t--)if(e[t]===n)return 1}function te(e,n){return w(e,x)?e.name||n||W:((e||{})[i]||{}).name||n||W}function _(e,r,n,t){w(e,x)||ee("theClass is an invalid class definition.");var o,i,a,l,u,c,f=e[x],s=(function(e){if(T)for(var n=[],t=I(r);t&&!X(t)&&!ne(n,t);){if(t===e)return 1;n.push(t),t=I(t)}}(f)||ee("["+te(e)+"] is not in class hierarchy of ["+te(r)+"]"),null),e=(w(f,h)?s=f[h]:(s="_dynCls$"+te(e,"_")+"$"+Q,Q++,f[h]=s),_[q]),d=!!e[J],g=(d&&t&&t[J]!==undefined&&(d=!!t[J]),i={},b(o=r,function(e){!i[e]&&Y(o,e,!1)&&(i[e]=o[e])}),i),d=(n(r,function(e,n,t,i){function r(e,n,t){var r,o=n[t];return o[H]&&i&&!1!==(r=e[C]||{})[m]&&(o=(r[n[h]]||{})[t]||o),function(){return o.apply(e,arguments)}}for(var o={},a=(b(t,function(e){o[e]=r(n,t,e)}),I(e)),l=[];a&&!X(a)&&!ne(l,a);)b(a,function(e){!o[e]&&Y(a,e,!T)&&(o[e]=r(n,a,e))}),l.push(a),a=I(a);return o}(f,r,g,d)),!!T&&!!e[$]);a=f,n=s,l=r,u=g,e=!1!==(d=d&&t?!!t[$]:d),Z(a)||(f=l[C]=l[C]||{},c=f[n]=f[n]||{},!1!==f[m]&&(f[m]=!!e),b(l,function(e){var t,r,o;Y(l,e,!1)&&l[e]!==u[e]&&(c[e]=l[e],delete l[e],w(a,e)&&(!a[e]||a[e][H])||(a[e]=(t=a,r=e,(o=function(){var e,n;return(function(e,n,t,r){var o=null;if(e&&w(t,h)){var i=e[C]||{};if((o=(i[t[h]]||{})[n])||ee("Missing ["+n+"] "+y),!o[K]&&!1!==i[m]){for(var a=!w(e,n),l=I(e),u=[];a&&l&&!X(l)&&!ne(u,l);){var c=l[n];if(c){a=c===r;break}u.push(l),l=I(l)}try{a&&(e[n]=o),o[K]=1}catch(f){i[m]=!1}}}return o}(this,r,t,o)||(typeof(n=(n=t[e=r])===o?I(t)[e]:n)!==y&&ee("["+e+"] is not a "+y),n)).apply(this,arguments)})[H]=1,o)))}))}_[q]={setInstFuncs:!0,useBaseInst:!0};var N="",re="isInitialized",d="teardown",g="core",oe="update",ie="disabled",ae="_doTeardown",le="toString",ue="constructor",ce=n,c=t.freeze,fe=Array.isArray,se=e[le],de=v[le],ge=de.call(t),ve=/-([a-z])/g,pe=/([^\w\d_$])/g,xe=/^(\d+[\w\d_$])/,ye=Object.getPrototypeOf;function S(e){return e===undefined||typeof e===u}function E(e){return null===e||S(e)}function Ce(e){return!(!e||typeof e!==a)}function F(e){return!(!e||typeof e!==U)}function he(e){var n=e;return e&&"string"==typeof e?(n=(n=e.replace(ve,function(e,n){return n.toUpperCase()})).replace(pe,"_")).replace(xe,function(e,n){return"_"+n}):n}function me(e,n){if(e)for(var t in e)v.call(e,t)&&n.call(e,t,e[t])}function Te(e,n){return!(!e||!n||!~e.indexOf(n))}var A=fe||function(e){return!(!e||"[object Array]"!==se.call(e))};function we(e){return e&&"object"==typeof e&&(!(e=(ye||function(e){if(e){if(ye)return ye(e);e=e.__proto__||e[r]||e[ue];if(e)return e}return null})(e))||typeof(e=e[ue]&&v.call(e,ue)?e[ue]:e)===U&&de.call(e)===ge)}function P(e,n,t){var r=e.length;try{for(var o=0;o<r&&!(o in e&&-1===n.call(t||e,e[o],o,e));o++);}catch(i){}}var Ie=c||function(e){return e};function be(){var e=Date;return e.now?e.now():(new e).getTime()}function _e(e){var t={};return me(e,function(e,n){if(t[e]=n,!S(t[n]))throw Error("["+n+"] exists for "+e);t[n]=e}),Ie(t)}var Ne="window",Se="console",Ee="JSON",Fe=null,Ae=null;function f(e){var n=p();return n&&n[e]?n[e]:e===Ne&&typeof window===a&&window?window:null}function Pe(){return typeof JSON===a&&JSON||null!==f(Ee)}function Le(){return Pe()?JSON||f(Ee):null}function L(e){var n=Object[r].toString.call(e),t=N;return"[object Error]"===n?t="{ stack: '"+e.stack+"', message: '"+e.message+"', name: '"+e.name+"'":Pe()&&(t=Le().stringify(e)),n+t}var Me=null;function De(e){return e?'"'+e.replace(/\"/g,N)+'"':N}function Oe(e,n){var t,r=typeof console!==u?console:f(Se);r&&(t="log",F(r[t=r[e]?e:t])&&r[t](n))}ke.dataType="MessageData";var Re=ke;function ke(e,n,t,r){void 0===t&&(t=!1),this.messageId=e,this.message=(t?"AI: ":"AI (Internal): ")+e;t=N,Pe()&&(t=Le().stringify(r)),e=(n?" message:"+De(n):N)+(r?" props:"+De(t):N);this.message+=e}var je=function Cn(o){this.identifier="DiagnosticLogger",this.queue=[];var l=0,u={};_(Cn,this,function(i){function e(e,n){e=o[e];return E(e)?n:e}function a(e,n){var t,r=(t=(t=Me)||!0===o.disableDbgExt?t:Me||(r=f("Microsoft"),Me=r?r.ApplicationInsights:Me))?t.ChromeDbgExt:null;r&&r.diagLog&&r.diagLog(e,n)}E(o)&&(o={}),i.consoleLoggingLevel=function(){return e("loggingLevelConsole",0)},i.telemetryLoggingLevel=function(){return e("loggingLevelTelemetry",1)},i.maxInternalMessageLimit=function(){return e("maxMessageLimit",25)},i.enableDebugExceptions=function(){return e("enableDebugExceptions",!1)},i.throwInternal=function(e,n,t,r,o){n=new Re(n,t,o=void 0!==o&&o,r);if(i.enableDebugExceptions())throw n;t=1===e?"errorToConsole":"warnToConsole";S(n.message)?a("throw"+(1===e?"Critical":"Warning"),n):(r=i.consoleLoggingLevel(),o?(o=+n.messageId,!u[o]&&e<=r&&(i[t](n.message),u[o]=!0)):e<=r&&i[t](n.message),i.logInternalMessage(e,n))},i.warnToConsole=function(e){Oe("warn",e),a("warning",e)},i.errorToConsole=function(e){Oe("error",e),a("error",e)},i.resetInternalMessageCount=function(){l=0,u={}},i.logInternalMessage=function(e,n){var t,r;l>=i.maxInternalMessageLimit()||(r=!0,t="AITR_"+n.messageId,u[t]?r=!1:u[t]=!0,r&&(e<=i.telemetryLoggingLevel()&&(i.queue.push(n),l++,a(1===e?"error":"warn",n)),l===i.maxInternalMessageLimit()&&(r=new Re(23,t="Internal events throttle limit per PageView reached for this app.",!1),i.queue.push(r),1===e?i.errorToConsole(t):i.warnToConsole(t))))}})};function Ue(e,n,t,r,o,i){void 0===i&&(i=!1),(e||new je).throwInternal(n,t,r,o,i)}s.ParentContextKey="parent",s.ChildrenContextKey="childEvts";var Be=s;function s(e,o,n){var r,i=this,a=!1;i.start=be(),i.name=e,i.isAsync=n,i.isChildEvt=function(){return!1},F(o)&&(a=function(e){if(ce)try{var n={enumerable:!0,configurable:!0,get:function(){return!r&&F(o)&&(r=o(),o=null),r}};return ce(e,"payload",n),!0}catch(t){}return!1}(i)),i.getCtx=function(e){return e?(e===s.ParentContextKey||e===s.ChildrenContextKey?i:i.ctx||{})[e]:null},i.setCtx=function(e,n){e&&(e===s.ParentContextKey?(i[e]||(i.isChildEvt=function(){return!0}),i[e]=n):e===s.ChildrenContextKey?i[e]=n:(i.ctx=i.ctx||{})[e]=n)},i.complete=function(){var e=0,n=i.getCtx(s.ChildrenContextKey);if(A(n))for(var t=0;t<n.length;t++){var r=n[t];r&&(e+=r.time)}i.time=be()-i.start,i.exTime=i.time-e,i.complete=function(){},!a&&F(o)&&(i.payload=o())}}var ze="CoreUtils.doPerf";function Ve(e,n,t,r,o){if(e)if(e=F(e.getPerfMgr)?e.getPerfMgr():e){var i,a=void 0,l=e.getCtx(ze);try{if(a=e.create(n(),r,o))return l&&a.setCtx&&(a.setCtx(Be.ParentContextKey,l),l.getCtx&&l.setCtx&&((i=l.getCtx(Be.ChildrenContextKey))||(i=[],l.setCtx(Be.ChildrenContextKey,i)),i.push(a))),e.setCtx(ze,a),t(a)}catch(u){a&&a.setCtx&&a.setCtx("exception",u)}finally{a&&e.fire(a),e.setCtx(ze,l)}}t()}var He=4294967296,M=4294967295,Ke=!1,qe=123456789,We=987654321;function Ge(e){var n,t=0,r=f("crypto")||f("msCrypto");if(0===(t=r&&r.getRandomValues?r.getRandomValues(new Uint32Array(1))[0]&M:t)&&(!(r=typeof navigator===a&&navigator?navigator:f("navigator"))||r.userAgent===Ae&&null!==Fe||(r=((Ae=r.userAgent)||N).toLowerCase(),Fe=Te(r,"msie")||Te(r,"trident/")),Fe)){if(!Ke)try{var o=2147483647&be();(n=(Math.random()*He^o)+o)<0&&(n>>>=0),qe=123456789+n&M,We=987654321-n&M,Ke=!0}catch(i){}r=((We=36969*(65535&We)+(We>>16)&M)<<16)+(65535&(qe=18e3*(65535&qe)+(qe>>16)&M))>>>0&M|0,t=(r>>>=0)&M}return 0===t&&(t=Math.floor(He*Math.random()|0)),e||(t>>>=0),t}var Je=n,e="2.8.0-beta.2203-13",le="."+function(e){void 0===e&&(e=22);for(var n=Ge()>>>0,t=0,r=N;r.length<e;)r+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[0|63&n]||"",n>>>=6,5==++t&&(n=(Ge()<<2&4294967295|3&n)>>>0,t=0);return r}(6);function $e(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType}var Qe,Ze,Xe=Ze={id:he("_aiData-plugin."+e+0+((Qe=void 0!==Qe&&Qe)?"."+e:"")+le),accept:$e,get:function(e,n,t,r){var o=e[Ze.id];return o?o[he(n)]:(r&&((o=function(e,n){var t=n[e.id];if(!t){t={};try{$e(n)&&!function(e,n,t){if(Je)try{return Je(e,n,{value:t,enumerable:!1,configurable:!0}),1}catch(r){}}(n,e.id,t)&&(n[e.id]=t)}catch(r){}}return t}(Ze,e))[he(n)]=t),t)},kill:function(e,n){if(e&&e[n])try{delete e[n]}catch(t){}}};function Ye(e){return Xe.get(e,"state",{},!0)}var en="TelemetryPluginChain",nn="_hasRun",tn="_getTelCtx",rn=0;function on(e,a,t,n){var r=null,o=[],i=(null!==n&&(r=n?function(e,n,t,r){for(;e;){if(e.getPlugin()===r)return e;e=e.getNext()}return D([r],n,t)}(e,a,t,n):e),{_next:function(){var e,n=r;return r=n?n.getNext():null,n||(e=o)&&0<e.length&&(P(e,function(e){try{e.func.call(e.self,e.args)}catch(n){Ue(t.logger,2,73,"Unexpected Exception during onComplete - "+L(n))}}),o=[]),n},ctx:{core:function(){return t},diagLog:function(){return(t||{}).logger||new je(a)},getCfg:function(){return a},getExtCfg:l,getConfig:function(e,n,t){void 0===t&&(t=!1);var r,e=l(e,null);return e&&!E(e[n])?r=e[n]:a&&!E(a[n])&&(r=a[n]),E(r)?t:r},hasNext:function(){return!!r},getNext:function(){return r},setNext:function(e){r=e},iterate:function(e){for(;n=i._next();){var n=n.getPlugin();n&&e(n)}},onComplete:function(e,n){for(var t=[],r=2;r<arguments.length;r++)t[r-2]=arguments[r];e&&o.push({func:e,self:S(n)?i.ctx:n,args:t})}}});function l(e,n,t){var r,o,i;return void 0===n&&(n={}),void 0===t&&(t=0),(r=a&&(o=a.extensionConfig)&&e?o[e]:r)?Ce(n)&&0!==t&&(i=function d(){var e=arguments,n=e[0]||{},t=e.length,r=!1,o=1;for(0<t&&"boolean"==typeof n&&(r=n,n=e[o]||{},o++),Ce(n)||(n={});o<t;o++){var i,a,l,u,c=e[o],f=A(c),s=Ce(c);for(i in c)(f&&i in c||s&&v.call(c,i))&&(a=c[i],l=void 0,r&&a&&((l=A(a))||we(a))&&(u=n[i],l?A(u)||(u=[]):we(u)||(u={}),a=d(r,u,a)),a!==undefined&&(n[i]=a))}return n}(!0,n,r),a&&2===t&&me(n,function(e){var n;E(i[e])&&!E(n=a[e])&&(i[e]=n)})):r=n,r}return i}function an(e,t,r,n){var o=on(e,t,r,n),i=o.ctx;return i.processNext=function(e){var n=o._next();return n&&n.processTelemetry(e,i),!n},i.createNew=function(e,n){return an((e=A(e=void 0===e?null:e)?D(e,t,r,n):e)||i.getNext(),t,r,n)},i}function D(e,n,t,r){var o,i=null,a=!r;return A(e)&&0<e.length&&(o=null,P(e,function(e){(a=!a&&r===e||a)&&e&&F(e.processTelemetry)&&(e=ln(e,n,t),i=i||e,o&&o._setNext(e),o=e)})),r&&!i?D([r],n,t):i}function ln(u,r,o){var c=null,i=F(u.processTelemetry),a=F(u.setNextPlugin),f=u?u.identifier+"-"+u.priority+"-"+rn++:"Unknown-0-"+rn++,l={getPlugin:function(){return u},getNext:function(){return c},processTelemetry:function(t,e){var n;s(e=e||(n=(n=u&&F(u[tn])?u[tn]():n)||an(l,r,o)),function(e){if(!u||!i)return!1;var n=Ye(u);return!n[d]&&!n[ie]&&(a&&u.setNextPlugin(c),u.processTelemetry(t,e),!0)},"processTelemetry",function(){return{item:t}},!t.sync)||e.processNext(t)},unload:function(r,o){s(r,function(){var e,n,t=!1;return u&&(e=Ye(u),n=u[g]||e.core,!u||n&&n!==r[g]()||e[d]||(e[g]=null,e[d]=!0,e[re]=!1,u[d]&&!0===u[d](r,o)&&(t=!0))),t},"unload",function(){},o.isAsync)||r.processNext(o)},update:function(r,o){s(r,function(){var e,n,t=!1;return u&&(e=Ye(u),n=u[g]||e.core,!u||n&&n!==r[g]()||e[d]||u[oe]&&!0===u[oe](r,o)&&(t=!0)),t},"update",function(){},!1)||r.processNext(o)},_id:f,_setNext:function(e){c=e}};function s(t,r,o,e,n){var i=!1,a=u?u.identifier:en,l=(l=t[nn])||(t[nn]={});return t.setNext(c),u&&Ve(t[g](),function(){return a+":"+o},function(){l[f]=!0;try{var e=c?c._id:N;e&&(l[e]=!1),i=r(t)}catch(n){e=!c||l[c._id];e&&(i=!0),c&&e||Ue(t.diagLog(),1,73,"Plugin ["+u.identifier+"] failed during "+o+" - "+L(n)+", run flags: "+L(l))}},e,n),i}return Ie(l)}function un(){var n=[];return{add:function(e){e&&n.push(e)},run:function(t,r){P(n,function(e){try{e(t,r)}catch(n){Ue(t.diagLog(),2,73,"Unexpected error calling unload handler - "+L(n))}}),n=[]}}}var cn,fn,sn,O="getPlugin",fe=function hn(){var i,a,c,f,s,l=this;function n(e){var n,e=e=void 0===e?null:e;return e||(n=a||an(null,{},l.core),e=c&&c[O]?n.createNew(null,c[O]):n.createNew(null,c)),e}function d(e,n,t){e&&(i="extensionConfig",o=r=[],e&&(o=e[i])!==r&&E(o)&&(e[i]=o=r)),!t&&n&&(t=n.getProcessTelContext().getNext());var r,o,i=c;c&&c[O]&&(i=c[O]()),l.core=n,a=an(t,e,n,i)}function g(){i=!1,l.core=null,c=a=null,s=[],f=un()}g(),_(hn,l,function(u){var e,n,t,r,o;u.initialize=function(e,n,t,r){d(e,n,r),i=!0},u.teardown=function(e,n){var t,r,o,i;if(u.core&&(!e||u.core===e.core()))return r=!1,o=e||function l(e,t,r,n){var o=on(e,t,r,n),i=o.ctx;return i.processNext=function(e){var n=o._next();return n&&n.unload(i,e),!n},i.createNew=function(e,n){return l((e=A(e=void 0===e?null:e)?D(e,t,r,n):e)||i.getNext(),t,r,n)},i}(null,{},u.core,c&&c[O]?c[O]():c),i=n||{reason:0,isAsync:!1},u[ae]&&!0===u[ae](o,i,a)?t=!0:a(),t;function a(){r||(r=!0,f.run(o,n),P(s,function(e){e.rm()}),s=[],!0===t&&o.processNext(i),g())}},u.update=function(e,n){var t,r,o;if(u.core&&(!e||u.core===e.core()))return r=!1,o=e||function a(e,t,r,n){var o=on(e,t,r,n).ctx;return o.processNext=function(n){return o.iterate(function(e){F(e[oe])&&e[oe](o,n)})},o.createNew=function(e,n){return a((e=A(e=void 0===e?null:e)?D(e,t,r,n):e)||o.getNext(),t,r,n)},o}(null,{},u.core,c&&c[O]?c[O]():c),u._doUpdate&&!0===u._doUpdate(o,n||{reason:0},i)?t=!0:i(),t;function i(){r||(r=!0,d(o.getCfg(),o.core(),o.getNext()))}},u._addHook=function(e){e&&(A(e)?s=s.concat(e):s.push(e))},e="_addUnloadCb",n=function(){return f},void 0===t&&(t=!0),u&&n&&(t||S(u[e]))&&(u[e]=(o=r=null,F(t=n)?r=t:o=t,function(){var e=arguments;if(o=r?r():o)return o.add.apply(o,e)}))}),l.diagLog=function(e){return n(e).diagLog()},l[re]=function(){return i},l.setInitialized=function(e){i=e},l.setNextPlugin=function(e){c=e},l.processNext=function(e,n){n?n.processNext(e):c&&F(c.processTelemetry)&&c.processTelemetry(e,null)},l._getTelCtx=n},dn=_e({CRITICAL:1,WARNING:2}),gn=_e({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}),vn=((c=cn={})[c.Verbose=0]="Verbose",c[c.Information=1]="Information",c[c.Warning=2]="Warning",c[c.Error=3]="Error",c[c.Critical=4]="Critical",pn.getConfig=function(e,n,t,r){return void 0===r&&(r=!1),t=(t&&e.extensionConfig&&e.extensionConfig[t]&&!E(e.extensionConfig[t][n])?e.extensionConfig[t]:e)[n],E(t)?r:t},pn);function pn(){}function xn(){this.constructor=fn}function yn(e){var r,s,d,l,n=sn.call(this)||this;function g(){return{disableDeviceCollection:!1,disableExceptionCollection:!1}}return n.identifier="AppInsightsReactNativePlugin",n.priority=140,_(yn,n,function(c,f){function o(){r={},s=e||g(),l=d=null}function i(){return typeof global!==u&&global?global:p()}function a(e,n){var t={exception:e,severityLevel:cn.Error};d?d.trackException(t):c.diagLog().throwInternal(dn.CRITICAL,gn.TelemetryInitializerFailed,"Analytics plugin is not available, ReactNative plugin telemetry will not be sent: "),l&&l.call(global,e,n)}o(),c.initialize=function(e,n,t){var r,o;if(!c.isInitialized()){f.initialize(e,n,t);var i=e||{},a=g(),l=function(e,n){s[e]=vn.getConfig(i,e,c.identifier,S(s[e])?n:s[e])};if(Ce(a))for(var u in a)o=u,(r=a)&&v.call(r,o)&&l(u,a[u]);s.disableDeviceCollection||c._collectDeviceInfo(),t&&P(t,function(e){"ApplicationInsightsAnalytics"===e.identifier&&(d=e)}),s.disableExceptionCollection||c._setExceptionHandler()}},c.processTelemetry=function(e,n){var t=e;r&&(t.ext=t.ext||{},t.ext.device=t.ext.device||{},"string"==typeof r.id&&(t.ext.device.localId=r.id),"string"==typeof r.model&&(t.ext.device.model=r.model),"string"==typeof r.deviceClass&&(t.ext.device.deviceClass=r.deviceClass)),c.processNext(e,n)},c.setDeviceId=function(e){r.id=e},c.setDeviceModel=function(e){r.model=e},c.setDeviceType=function(e){r.deviceClass=e},c._collectDeviceInfo=function(){try{r.deviceClass=j["default"].getDeviceType(),r.id=j["default"].getUniqueId(),r.model=j["default"].getModel()}catch(n){c.diagLog().warnToConsole("Failed to get DeviceInfo: "+((e=n)&&"[object Error]"===se.call(e)?e.name:N)+" - "+L(n))}var e},c._doTeardown=function(e,n,t){var r;(r=i())&&r.ErrorUtils&&r.ErrorUtils.getGlobalHandler()===a&&r.ErrorUtils.setGlobalHandler(l||null),o()},c._setExceptionHandler=function(){var e=i();e&&e.ErrorUtils&&(l="function"==typeof e.ErrorUtils.getGlobalHandler&&e.ErrorUtils.getGlobalHandler()||e.ErrorUtils._globalHandler,e.ErrorUtils.setGlobalHandler(a))},c._config=s,c._getDbgPlgTargets=function(){return[r]}}),n}fn=yn,typeof(n=sn=fe)!==U&&null!==n&&z("Class extends value "+n+" is not a constructor or null"),V(fn,n),fn[r]=(xn[r]=n[r],new xn),R.ReactNativePlugin=yn,Object.defineProperty(R,"__esModule",{value:!0})};"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("react-native-device-info")):"function"==typeof define&&define.amd?define(["exports","react-native-device-info"],n):n(((e="undefined"!=typeof globalThis?globalThis:e||self).Microsoft=e.Microsoft||{},e.Microsoft.ApplicationInsights=e.Microsoft.ApplicationInsights||{}),e.DeviceInfo);
6
6
  //# sourceMappingURL=applicationinsights-react-native.min.js.map