posthog-react-native 4.7.0 → 4.8.0

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.
@@ -0,0 +1,9 @@
1
+ import { ErrorPropertiesBuilder, EventHint } from '@posthog/core/error-tracking';
2
+ import type { PostHog } from '../posthog-rn';
3
+ import { PostHogEventProperties } from '@posthog/core';
4
+ export declare class ErrorTracking {
5
+ private instance;
6
+ errorPropertiesBuilder: ErrorPropertiesBuilder;
7
+ constructor(instance: PostHog);
8
+ captureException(input: unknown, additionalProperties: PostHogEventProperties, hint: EventHint): void;
9
+ }
@@ -0,0 +1 @@
1
+ "use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.ErrorTracking=void 0;var _defineProperty2=_interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));var _classCallCheck2=_interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));var _createClass2=_interopRequireDefault(require("@babel/runtime/helpers/createClass"));var _errorTracking=require("@posthog/core/error-tracking");function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable;})),t.push.apply(t,o);}return t;}function _objectSpread(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?ownKeys(Object(t),!0).forEach(function(r){(0,_defineProperty2["default"])(e,r,t[r]);}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r));});}return e;}var ErrorTracking=exports.ErrorTracking=function(){function ErrorTracking(instance){(0,_classCallCheck2["default"])(this,ErrorTracking);this.instance=instance;this.errorPropertiesBuilder=new _errorTracking.ErrorPropertiesBuilder([new _errorTracking.PromiseRejectionEventCoercer(),new _errorTracking.ErrorCoercer(),new _errorTracking.ObjectCoercer(),new _errorTracking.StringCoercer(),new _errorTracking.PrimitiveCoercer()],[_errorTracking.chromeStackLineParser,_errorTracking.geckoStackLineParser]);}return(0,_createClass2["default"])(ErrorTracking,[{key:"captureException",value:function captureException(input,additionalProperties,hint){var properties=this.errorPropertiesBuilder.buildFromUnknown(input,hint);return this.instance.capture('$exception',_objectSpread(_objectSpread({},properties),additionalProperties));}}]);}();
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/error-tracking/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,qBAAqB,EACrB,YAAY,EACZ,sBAAsB,EAEtB,oBAAoB,EACpB,aAAa,EACb,gBAAgB,EAChB,4BAA4B,EAC5B,aAAa,GACd,MAAM,8BAA8B,CAAA;AAIrC,MAAM,OAAO,aAAa;IAGxB,YAAoB,QAAiB;QAAjB,aAAQ,GAAR,QAAQ,CAAS;QACnC,IAAI,CAAC,sBAAsB,GAAG,IAAI,sBAAsB,CACtD;YACE,IAAI,4BAA4B,EAAE;YAClC,IAAI,YAAY,EAAE;YAClB,IAAI,aAAa,EAAE;YACnB,IAAI,aAAa,EAAE;YACnB,IAAI,gBAAgB,EAAE;SACvB,EACD,CAAC,qBAAqB,EAAE,oBAAoB,CAAC,CAC9C,CAAA;IACH,CAAC;IAED,gBAAgB,CAAC,KAAc,EAAE,oBAA4C,EAAE,IAAe;QAC5F,MAAM,UAAU,GAAG,IAAI,CAAC,sBAAsB,CAAC,gBAAgB,CAAC,KAAK,EAAE,IAAI,CAAC,CAAA;QAC5E,OAAO,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,YAAY,EAAE;YACzC,GAAG,UAAU;YACb,GAAG,oBAAoB;SACa,CAAC,CAAA;IACzC,CAAC;CACF"}
@@ -45,6 +45,7 @@ export declare class PostHog extends PostHogCore {
45
45
  private _enableSessionReplay?;
46
46
  private _disableSurveys;
47
47
  private _disableRemoteConfig;
48
+ private _errorTracking;
48
49
  /**
49
50
  * Creates a new PostHog instance for React Native. You can find all configuration options in the [React Native SDK docs](https://posthog.com/docs/libraries/react-native#configuration-options).
50
51
  *
@@ -503,6 +504,38 @@ export declare class PostHog extends PostHogCore {
503
504
  * @param options - Optional capture options
504
505
  */
505
506
  identify(distinctId?: string, properties?: PostHogEventProperties, options?: PostHogCaptureOptions): void;
507
+ /**
508
+ * Capture a caught exception manually
509
+ *
510
+ * {@label Error tracking}
511
+ *
512
+ * @public
513
+ *
514
+ * @example
515
+ * ```js
516
+ * // Capture a caught exception
517
+ * try {
518
+ * // something that might throw
519
+ * } catch (error) {
520
+ * posthog.captureException(error)
521
+ * }
522
+ * ```
523
+ *
524
+ * @example
525
+ * ```js
526
+ * // With additional properties
527
+ * posthog.captureException(error, {
528
+ * customProperty: 'value',
529
+ * anotherProperty: ['I', 'can be a list'],
530
+ * ...
531
+ * })
532
+ * ```
533
+ *
534
+ * @param {Error} error The error to capture
535
+ * @param {Object} [additionalProperties] Any additional properties to add to the error event
536
+ * @returns {void}
537
+ */
538
+ captureException(error: Error | unknown, additionalProperties?: PostHogEventProperties): void;
506
539
  initReactNativeNavigation(options: PostHogAutocaptureOptions): boolean;
507
540
  getSurveys(): Promise<SurveyResponse['surveys']>;
508
541
  private startSessionReplay;
@@ -1 +1 @@
1
- "use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");var _typeof3=require("@babel/runtime/helpers/typeof");Object.defineProperty(exports,"__esModule",{value:true});exports.PostHog=void 0;Object.defineProperty(exports,"PostHogPersistedProperty",{enumerable:true,get:function get(){return _core.PostHogPersistedProperty;}});var _typeof2=_interopRequireDefault(require("@babel/runtime/helpers/typeof"));var _defineProperty2=_interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));var _asyncToGenerator2=_interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));var _classCallCheck2=_interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));var _createClass2=_interopRequireDefault(require("@babel/runtime/helpers/createClass"));var _possibleConstructorReturn2=_interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));var _getPrototypeOf2=_interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));var _get2=_interopRequireDefault(require("@babel/runtime/helpers/get"));var _inherits2=_interopRequireDefault(require("@babel/runtime/helpers/inherits"));var _reactNative=require("react-native");var _core=require("@posthog/core");var _storage=require("./storage");var _version=require("./version");var _nativeDeps=require("./native-deps");var _wixNavigation=require("./frameworks/wix-navigation");var _OptionalSessionReplay=require("./optional/OptionalSessionReplay");function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable;})),t.push.apply(t,o);}return t;}function _objectSpread(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?ownKeys(Object(t),!0).forEach(function(r){(0,_defineProperty2["default"])(e,r,t[r]);}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r));});}return e;}function _regeneratorRuntime(){"use strict";_regeneratorRuntime=function _regeneratorRuntime(){return r;};var t,r={},e=Object.prototype,n=e.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(t,r,e,n){return Object.defineProperty(t,r,{value:e,enumerable:!n,configurable:!n,writable:!n});}try{c({},"");}catch(t){c=function c(t,r,e){return t[r]=e;};}function h(r,e,n,o){var i=e&&e.prototype instanceof Generator?e:Generator,a=Object.create(i.prototype);return c(a,"_invoke",function(r,e,n){var o=1;return function(i,a){if(3===o)throw Error("Generator is already running");if(4===o){if("throw"===i)throw a;return{value:t,done:!0};}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=d(u,n);if(c){if(c===f)continue;return c;}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(1===o)throw o=4,n.arg;n.dispatchException(n.arg);}else"return"===n.method&&n.abrupt("return",n.arg);o=3;var h=s(r,e,n);if("normal"===h.type){if(o=n.done?4:2,h.arg===f)continue;return{value:h.arg,done:n.done};}"throw"===h.type&&(o=4,n.method="throw",n.arg=h.arg);}};}(r,n,new Context(o||[])),!0),a;}function s(t,r,e){try{return{type:"normal",arg:t.call(r,e)};}catch(t){return{type:"throw",arg:t};}}r.wrap=h;var f={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var l={};c(l,i,function(){return this;});var p=Object.getPrototypeOf,y=p&&p(p(x([])));y&&y!==e&&n.call(y,i)&&(l=y);var v=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(l);function g(t){["next","throw","return"].forEach(function(r){c(t,r,function(t){return this._invoke(r,t);});});}function AsyncIterator(t,r){function e(o,i,a,u){var c=s(t[o],t,i);if("throw"!==c.type){var h=c.arg,f=h.value;return f&&"object"==_typeof3(f)&&n.call(f,"__await")?r.resolve(f.__await).then(function(t){e("next",t,a,u);},function(t){e("throw",t,a,u);}):r.resolve(f).then(function(t){h.value=t,a(h);},function(t){return e("throw",t,a,u);});}u(c.arg);}var o;c(this,"_invoke",function(t,n){function i(){return new r(function(r,o){e(t,n,r,o);});}return o=o?o.then(i,i):i();},!0);}function d(r,e){var n=e.method,o=r.i[n];if(o===t)return e.delegate=null,"throw"===n&&r.i["return"]&&(e.method="return",e.arg=t,d(r,e),"throw"===e.method)||"return"!==n&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+n+"' method")),f;var i=s(o,r.i,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,f;var a=i.arg;return a?a.done?(e[r.r]=a.value,e.next=r.n,"return"!==e.method&&(e.method="next",e.arg=t),e.delegate=null,f):a:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f);}function w(t){this.tryEntries.push(t);}function m(r){var e=r[4]||{};e.type="normal",e.arg=t,r[4]=e;}function Context(t){this.tryEntries=[[-1]],t.forEach(w,this),this.reset(!0);}function x(r){if(null!=r){var e=r[i];if(e)return e.call(r);if("function"==typeof r.next)return r;if(!isNaN(r.length)){var o=-1,a=function e(){for(;++o<r.length;)if(n.call(r,o))return e.value=r[o],e.done=!1,e;return e.value=t,e.done=!0,e;};return a.next=a;}}throw new TypeError(_typeof3(r)+" is not iterable");}return GeneratorFunction.prototype=GeneratorFunctionPrototype,c(v,"constructor",GeneratorFunctionPrototype),c(GeneratorFunctionPrototype,"constructor",GeneratorFunction),GeneratorFunction.displayName=c(GeneratorFunctionPrototype,u,"GeneratorFunction"),r.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===GeneratorFunction||"GeneratorFunction"===(r.displayName||r.name));},r.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,GeneratorFunctionPrototype):(t.__proto__=GeneratorFunctionPrototype,c(t,u,"GeneratorFunction")),t.prototype=Object.create(v),t;},r.awrap=function(t){return{__await:t};},g(AsyncIterator.prototype),c(AsyncIterator.prototype,a,function(){return this;}),r.AsyncIterator=AsyncIterator,r.async=function(t,e,n,o,i){void 0===i&&(i=Promise);var a=new AsyncIterator(h(t,e,n,o),i);return r.isGeneratorFunction(e)?a:a.next().then(function(t){return t.done?t.value:a.next();});},g(v),c(v,u,"Generator"),c(v,i,function(){return this;}),c(v,"toString",function(){return"[object Generator]";}),r.keys=function(t){var r=Object(t),e=[];for(var n in r)e.unshift(n);return function t(){for(;e.length;)if((n=e.pop())in r)return t.value=n,t.done=!1,t;return t.done=!0,t;};},r.values=x,Context.prototype={constructor:Context,reset:function reset(r){if(this.prev=this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(m),!r)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=t);},stop:function stop(){this.done=!0;var t=this.tryEntries[0][4];if("throw"===t.type)throw t.arg;return this.rval;},dispatchException:function dispatchException(r){if(this.done)throw r;var e=this;function n(t){a.type="throw",a.arg=r,e.next=t;}for(var o=e.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i[4],u=this.prev,c=i[1],h=i[2];if(-1===i[0])return n("end"),!1;if(!c&&!h)throw Error("try statement without catch or finally");if(null!=i[0]&&i[0]<=u){if(u<c)return this.method="next",this.arg=t,n(c),!0;if(u<h)return n(h),!1;}}},abrupt:function abrupt(t,r){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n[0]>-1&&n[0]<=this.prev&&this.prev<n[2]){var o=n;break;}}o&&("break"===t||"continue"===t)&&o[0]<=r&&r<=o[2]&&(o=null);var i=o?o[4]:{};return i.type=t,i.arg=r,o?(this.method="next",this.next=o[2],f):this.complete(i);},complete:function complete(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),f;},finish:function finish(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e[2]===t)return this.complete(e[4],e[3]),m(e),f;}},"catch":function _catch(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e[0]===t){var n=e[4];if("throw"===n.type){var o=n.arg;m(e);}return o;}}throw Error("illegal catch attempt");},delegateYield:function delegateYield(r,e,n){return this.delegate={i:x(r),r:e,n:n},"next"===this.method&&(this.arg=t),f;}},r;}function _callSuper(t,o,e){return o=(0,_getPrototypeOf2["default"])(o),(0,_possibleConstructorReturn2["default"])(t,_isNativeReflectConstruct()?Reflect.construct(o,e||[],(0,_getPrototypeOf2["default"])(t).constructor):o.apply(t,e));}function _isNativeReflectConstruct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch(t){}return(_isNativeReflectConstruct=function _isNativeReflectConstruct(){return!!t;})();}function _superPropGet(t,o,e,r){var p=(0,_get2["default"])((0,_getPrototypeOf2["default"])(1&r?t.prototype:t),o,e);return 2&r&&"function"==typeof p?function(t){return p.apply(e,t);}:p;}var PostHog=exports.PostHog=function(_PostHogCore){function PostHog(apiKey,options){var _this;(0,_classCallCheck2["default"])(this,PostHog);var _a,_b,_c,_d;_this=_callSuper(this,PostHog,[apiKey,options]);_this._appProperties={};_this._isInitialized=false;_this._persistence=(_a=options===null||options===void 0?void 0:options.persistence)!==null&&_a!==void 0?_a:'file';_this._disableSurveys=(_b=options===null||options===void 0?void 0:options.disableSurveys)!==null&&_b!==void 0?_b:false;_this._disableRemoteConfig=(_c=options===null||options===void 0?void 0:options.disableRemoteConfig)!==null&&_c!==void 0?_c:false;_this._appProperties=typeof(options===null||options===void 0?void 0:options.customAppProperties)==='function'?options.customAppProperties((0,_nativeDeps.getAppProperties)()):(options===null||options===void 0?void 0:options.customAppProperties)||(0,_nativeDeps.getAppProperties)();_reactNative.AppState.addEventListener('change',function(state){if(state==='unknown'){return;}void _this.flush()["catch"](function(){var _ref=(0,_asyncToGenerator2["default"])(_regeneratorRuntime().mark(function _callee(err){return _regeneratorRuntime().wrap(function _callee$(_context){while(1)switch(_context.prev=_context.next){case 0:_context.next=2;return(0,_core.logFlushError)(err);case 2:case"end":return _context.stop();}},_callee);}));return function(_x3){return _ref.apply(this,arguments);};}());if(state==='active'){_this.getSessionId();}});var storagePromise;if(_this._persistence==='file'){_this._storage=new _storage.PostHogRNStorage((_d=options===null||options===void 0?void 0:options.customStorage)!==null&&_d!==void 0?_d:(0,_nativeDeps.buildOptimisiticAsyncStorage)());storagePromise=_this._storage.preloadPromise;}else{_this._storage=new _storage.PostHogRNSyncMemoryStorage();}if(storagePromise){storagePromise["catch"](function(error){console.error('PostHog storage initialization failed:',error);});}var initAfterStorage=function initAfterStorage(){var enablePersistSessionIdAcrossRestart=options===null||options===void 0?void 0:options.enablePersistSessionIdAcrossRestart;if(!enablePersistSessionIdAcrossRestart){_this.setPersistedProperty(_core.PostHogPersistedProperty.SessionId,null);_this.setPersistedProperty(_core.PostHogPersistedProperty.SessionLastTimestamp,null);_this.setPersistedProperty(_core.PostHogPersistedProperty.SessionStartTimestamp,null);}_this.setupBootstrap(options);_this._isInitialized=true;if(_this._disableRemoteConfig===false){_this.reloadRemoteConfigAsync();}else{_this.logMsgIfDebug(function(){return console.info('PostHog Debug',"Remote config is disabled.");});if((options===null||options===void 0?void 0:options.preloadFeatureFlags)!==false){_this.logMsgIfDebug(function(){return console.info('PostHog Debug',"Feature flags will be preloaded from Flags API.");});_this.reloadFeatureFlags();}else{_this.logMsgIfDebug(function(){return console.info('PostHog Debug',"preloadFeatureFlags is disabled.");});}}if(options===null||options===void 0?void 0:options.captureAppLifecycleEvents){void _this.captureAppLifecycleEvents();}void _this.persistAppVersion();void _this.startSessionReplay(options);};if(storagePromise){_this._initPromise=storagePromise.then(initAfterStorage);}else{_this._initPromise=Promise.resolve();initAfterStorage();}return _this;}(0,_inherits2["default"])(PostHog,_PostHogCore);return(0,_createClass2["default"])(PostHog,[{key:"ready",value:(function(){var _ready=(0,_asyncToGenerator2["default"])(_regeneratorRuntime().mark(function _callee2(){return _regeneratorRuntime().wrap(function _callee2$(_context2){while(1)switch(_context2.prev=_context2.next){case 0:_context2.next=2;return this._initPromise;case 2:case"end":return _context2.stop();}},_callee2,this);}));function ready(){return _ready.apply(this,arguments);}return ready;}())},{key:"getPersistedProperty",value:function getPersistedProperty(key){return this._storage.getItem(key);}},{key:"setPersistedProperty",value:function setPersistedProperty(key,value){return value!==null?this._storage.setItem(key,value):this._storage.removeItem(key);}},{key:"fetch",value:function(_fetch){function fetch(_x,_x2){return _fetch.apply(this,arguments);}fetch.toString=function(){return _fetch.toString();};return fetch;}(function(url,options){return fetch(url,options);})},{key:"getLibraryId",value:function getLibraryId(){return'posthog-react-native';}},{key:"getLibraryVersion",value:function getLibraryVersion(){return _version.version;}},{key:"getCustomUserAgent",value:function getCustomUserAgent(){if(_reactNative.Platform.OS==='web'){return'';}return"".concat(this.getLibraryId(),"/").concat(this.getLibraryVersion());}},{key:"getCommonEventProperties",value:function getCommonEventProperties(){return _objectSpread(_objectSpread(_objectSpread({},_superPropGet(PostHog,"getCommonEventProperties",this,3)([])),this._appProperties),{},{$screen_height:_reactNative.Dimensions.get('screen').height,$screen_width:_reactNative.Dimensions.get('screen').width});}},{key:"register",value:function register(properties){return _superPropGet(PostHog,"register",this,3)([properties]);}},{key:"unregister",value:function unregister(property){return _superPropGet(PostHog,"unregister",this,3)([property]);}},{key:"reset",value:function reset(){_superPropGet(PostHog,"reset",this,3)([]);}},{key:"flush",value:function flush(){return _superPropGet(PostHog,"flush",this,3)([]);}},{key:"optIn",value:function optIn(){return _superPropGet(PostHog,"optIn",this,3)([]);}},{key:"optOut",value:function optOut(){return _superPropGet(PostHog,"optOut",this,3)([]);}},{key:"isFeatureEnabled",value:function isFeatureEnabled(key){return _superPropGet(PostHog,"isFeatureEnabled",this,3)([key]);}},{key:"getFeatureFlag",value:function getFeatureFlag(key){return _superPropGet(PostHog,"getFeatureFlag",this,3)([key]);}},{key:"getFeatureFlagPayload",value:function getFeatureFlagPayload(key){return _superPropGet(PostHog,"getFeatureFlagPayload",this,3)([key]);}},{key:"reloadFeatureFlags",value:function reloadFeatureFlags(){_superPropGet(PostHog,"reloadFeatureFlags",this,3)([]);}},{key:"reloadFeatureFlagsAsync",value:function reloadFeatureFlagsAsync(){return _superPropGet(PostHog,"reloadFeatureFlagsAsync",this,3)([]);}},{key:"group",value:function group(groupType,groupKey,properties){_superPropGet(PostHog,"group",this,3)([groupType,groupKey,properties]);}},{key:"alias",value:function alias(_alias){_superPropGet(PostHog,"alias",this,3)([_alias]);}},{key:"getDistinctId",value:function getDistinctId(){return _superPropGet(PostHog,"getDistinctId",this,3)([]);}},{key:"setPersonPropertiesForFlags",value:function setPersonPropertiesForFlags(properties){_superPropGet(PostHog,"setPersonPropertiesForFlags",this,3)([properties]);}},{key:"resetPersonPropertiesForFlags",value:function resetPersonPropertiesForFlags(){_superPropGet(PostHog,"resetPersonPropertiesForFlags",this,3)([]);}},{key:"setGroupPropertiesForFlags",value:function setGroupPropertiesForFlags(properties){_superPropGet(PostHog,"setGroupPropertiesForFlags",this,3)([properties]);}},{key:"resetGroupPropertiesForFlags",value:function resetGroupPropertiesForFlags(){_superPropGet(PostHog,"resetGroupPropertiesForFlags",this,3)([]);}},{key:"screen",value:(function(){var _screen=(0,_asyncToGenerator2["default"])(_regeneratorRuntime().mark(function _callee3(name,properties,options){return _regeneratorRuntime().wrap(function _callee3$(_context3){while(1)switch(_context3.prev=_context3.next){case 0:_context3.next=2;return this._initPromise;case 2:this.registerForSession({$screen_name:name});return _context3.abrupt("return",this.capture('$screen',_objectSpread(_objectSpread({},properties),{},{$screen_name:name}),options));case 4:case"end":return _context3.stop();}},_callee3,this);}));function screen(_x4,_x5,_x6){return _screen.apply(this,arguments);}return screen;}())},{key:"_isEnableSessionReplay",value:function _isEnableSessionReplay(){var _a;return!this.isDisabled&&((_a=this._enableSessionReplay)!==null&&_a!==void 0?_a:false);}},{key:"_resetSessionId",value:function _resetSessionId(reactNativeSessionReplay,sessionId){if(reactNativeSessionReplay){reactNativeSessionReplay.endSession();reactNativeSessionReplay.startSession(sessionId);}}},{key:"getSessionId",value:function getSessionId(){var _this2=this;var sessionId=_superPropGet(PostHog,"getSessionId",this,3)([]);if(!this._isEnableSessionReplay()){return sessionId;}if(sessionId.length>0&&this._currentSessionId&&sessionId!==this._currentSessionId){if(_OptionalSessionReplay.OptionalReactNativeSessionReplay){try{this._resetSessionId(_OptionalSessionReplay.OptionalReactNativeSessionReplay,String(sessionId));this.logMsgIfDebug(function(){return console.info('PostHog Debug',"sessionId rotated from ".concat(_this2._currentSessionId," to ").concat(sessionId,"."));});}catch(e){this.logMsgIfDebug(function(){return console.error('PostHog Debug',"Failed to rotate sessionId: ".concat(e,"."));});}}this._currentSessionId=sessionId;}else{this.logMsgIfDebug(function(){return console.log('PostHog Debug',"sessionId not rotated, sessionId ".concat(sessionId," and currentSessionId ").concat(_this2._currentSessionId,"."));});}return sessionId;}},{key:"resetSessionId",value:function resetSessionId(){_superPropGet(PostHog,"resetSessionId",this,3)([]);if(this._isEnableSessionReplay()&&_OptionalSessionReplay.OptionalReactNativeSessionReplay){try{_OptionalSessionReplay.OptionalReactNativeSessionReplay.endSession();this.logMsgIfDebug(function(){return console.info('PostHog Debug',"Session replay ended.");});}catch(e){this.logMsgIfDebug(function(){return console.error('PostHog Debug',"Session replay failed to end: ".concat(e,"."));});}}}},{key:"identify",value:function identify(distinctId,properties,options){var previousDistinctId=this.getDistinctId();_superPropGet(PostHog,"identify",this,3)([distinctId,properties,options]);if(this._isEnableSessionReplay()&&_OptionalSessionReplay.OptionalReactNativeSessionReplay){try{distinctId=distinctId||previousDistinctId;var anonymousId=this.getAnonymousId();_OptionalSessionReplay.OptionalReactNativeSessionReplay.identify(String(distinctId),String(anonymousId));this.logMsgIfDebug(function(){return console.info('PostHog Debug',"Session replay identified with distinctId ".concat(distinctId," and anonymousId ").concat(anonymousId,"."));});}catch(e){this.logMsgIfDebug(function(){return console.error('PostHog Debug',"Session replay failed to identify: ".concat(e,"."));});}}}},{key:"initReactNativeNavigation",value:function initReactNativeNavigation(options){return(0,_wixNavigation.withReactNativeNavigation)(this,options);}},{key:"getSurveys",value:function(){var _getSurveys=(0,_asyncToGenerator2["default"])(_regeneratorRuntime().mark(function _callee4(){var surveys,surveysFromApi;return _regeneratorRuntime().wrap(function _callee4$(_context4){while(1)switch(_context4.prev=_context4.next){case 0:if(!(this._disableSurveys===true)){_context4.next=4;break;}this.logMsgIfDebug(function(){return console.log('PostHog Debug','Loading surveys is disabled.');});this.setPersistedProperty(_core.PostHogPersistedProperty.Surveys,null);return _context4.abrupt("return",[]);case 4:surveys=this.getPersistedProperty(_core.PostHogPersistedProperty.Surveys);if(!(surveys&&surveys.length>0)){_context4.next=10;break;}this.logMsgIfDebug(function(){return console.log('PostHog Debug','Surveys fetched from storage: ',JSON.stringify(surveys));});return _context4.abrupt("return",surveys);case 10:this.logMsgIfDebug(function(){return console.log('PostHog Debug','No surveys found in storage');});case 11:if(!(this._disableRemoteConfig===true)){_context4.next=18;break;}_context4.next=14;return _superPropGet(PostHog,"getSurveysStateless",this,3)([]);case 14:surveysFromApi=_context4.sent;if(!(surveysFromApi&&surveysFromApi.length>0)){_context4.next=18;break;}this.setPersistedProperty(_core.PostHogPersistedProperty.Surveys,surveysFromApi);return _context4.abrupt("return",surveysFromApi);case 18:return _context4.abrupt("return",[]);case 19:case"end":return _context4.stop();}},_callee4,this);}));function getSurveys(){return _getSurveys.apply(this,arguments);}return getSurveys;}()},{key:"startSessionReplay",value:function(){var _startSessionReplay=(0,_asyncToGenerator2["default"])(_regeneratorRuntime().mark(function _callee5(options){var _a,_b,_c,_d,_e,_f,_g,defaultThrottleDelayMs,_ref2,_ref2$maskAllTextInpu,maskAllTextInputs,_ref2$maskAllImages,maskAllImages,_ref2$maskAllSandboxe,maskAllSandboxedViews,_ref2$captureLog,captureLog,_ref2$captureNetworkT,captureNetworkTelemetry,_ref2$iOSdebouncerDel,iOSdebouncerDelayMs,_ref2$androidDebounce,androidDebouncerDelayMs,throttleDelayMs,sdkReplayConfig,sessionReplay,featureFlags,cachedFeatureFlags,cachedSessionReplayConfig,recordingActive,linkedFlag,value,flag,variant,_value,sessionId,sdkOptions;return _regeneratorRuntime().wrap(function _callee5$(_context5){while(1)switch(_context5.prev=_context5.next){case 0:this._enableSessionReplay=options===null||options===void 0?void 0:options.enableSessionReplay;if(this._isEnableSessionReplay()){_context5.next=4;break;}this.logMsgIfDebug(function(){return console.info('PostHog Debug','Session replay is not enabled.');});return _context5.abrupt("return");case 4:defaultThrottleDelayMs=1000;_ref2=(_a=options===null||options===void 0?void 0:options.sessionReplayConfig)!==null&&_a!==void 0?_a:{},_ref2$maskAllTextInpu=_ref2.maskAllTextInputs,maskAllTextInputs=_ref2$maskAllTextInpu===void 0?true:_ref2$maskAllTextInpu,_ref2$maskAllImages=_ref2.maskAllImages,maskAllImages=_ref2$maskAllImages===void 0?true:_ref2$maskAllImages,_ref2$maskAllSandboxe=_ref2.maskAllSandboxedViews,maskAllSandboxedViews=_ref2$maskAllSandboxe===void 0?true:_ref2$maskAllSandboxe,_ref2$captureLog=_ref2.captureLog,captureLog=_ref2$captureLog===void 0?true:_ref2$captureLog,_ref2$captureNetworkT=_ref2.captureNetworkTelemetry,captureNetworkTelemetry=_ref2$captureNetworkT===void 0?true:_ref2$captureNetworkT,_ref2$iOSdebouncerDel=_ref2.iOSdebouncerDelayMs,iOSdebouncerDelayMs=_ref2$iOSdebouncerDel===void 0?defaultThrottleDelayMs:_ref2$iOSdebouncerDel,_ref2$androidDebounce=_ref2.androidDebouncerDelayMs,androidDebouncerDelayMs=_ref2$androidDebounce===void 0?defaultThrottleDelayMs:_ref2$androidDebounce;throttleDelayMs=(_c=(_b=options===null||options===void 0?void 0:options.sessionReplayConfig)===null||_b===void 0?void 0:_b.throttleDelayMs)!==null&&_c!==void 0?_c:defaultThrottleDelayMs;if(throttleDelayMs===defaultThrottleDelayMs&&(iOSdebouncerDelayMs!==defaultThrottleDelayMs||androidDebouncerDelayMs!==defaultThrottleDelayMs)){throttleDelayMs=Math.max(iOSdebouncerDelayMs,androidDebouncerDelayMs);}sdkReplayConfig={maskAllTextInputs:maskAllTextInputs,maskAllImages:maskAllImages,maskAllSandboxedViews:maskAllSandboxedViews,captureLog:captureLog,captureNetworkTelemetry:captureNetworkTelemetry,iOSdebouncerDelayMs:iOSdebouncerDelayMs,androidDebouncerDelayMs:androidDebouncerDelayMs,throttleDelayMs:throttleDelayMs};this.logMsgIfDebug(function(){return console.log('PostHog Debug',"Session replay SDK config: ".concat(JSON.stringify(sdkReplayConfig)));});sessionReplay=(_d=this.getPersistedProperty(_core.PostHogPersistedProperty.SessionReplay))!==null&&_d!==void 0?_d:{};featureFlags=(_e=this.getKnownFeatureFlags())!==null&&_e!==void 0?_e:{};cachedFeatureFlags=(_f=featureFlags)!==null&&_f!==void 0?_f:{};cachedSessionReplayConfig=(_g=sessionReplay)!==null&&_g!==void 0?_g:{};this.logMsgIfDebug(function(){return console.log('PostHog Debug',"Session replay feature flags from flags cached config: ".concat(JSON.stringify(cachedFeatureFlags)));});this.logMsgIfDebug(function(){return console.log('PostHog Debug',"Session replay session recording from flags cached config: ".concat(JSON.stringify(cachedSessionReplayConfig)));});recordingActive=true;linkedFlag=cachedSessionReplayConfig['linkedFlag'];if(typeof linkedFlag==='string'){value=cachedFeatureFlags[linkedFlag];if(typeof value==='boolean'){recordingActive=value;}else if(typeof value==='string'){recordingActive=true;}else{recordingActive=false;}this.logMsgIfDebug(function(){return console.log('PostHog Debug',"Session replay '".concat(linkedFlag,"' linked flag value: '").concat(value,"'"));});}else if(linkedFlag&&(0,_typeof2["default"])(linkedFlag)==='object'){flag=linkedFlag['flag'];variant=linkedFlag['variant'];if(flag&&variant){_value=cachedFeatureFlags[flag];recordingActive=_value===variant;this.logMsgIfDebug(function(){return console.log('PostHog Debug',"Session replay '".concat(flag,"' linked flag variant '").concat(variant,"' and value '").concat(_value,"'"));});}else{this.logMsgIfDebug(function(){return console.log('PostHog Debug',"Session replay '".concat(flag,"' linked flag variant: '").concat(variant,"' does not exist/quota limited."));});recordingActive=false;}}else{this.logMsgIfDebug(function(){return console.log('PostHog Debug',"Session replay has no cached linkedFlag.");});}if(!recordingActive){_context5.next=49;break;}if(!_OptionalSessionReplay.OptionalReactNativeSessionReplay){_context5.next=46;break;}sessionId=this.getSessionId();if(!(sessionId.length===0)){_context5.next=25;break;}this.logMsgIfDebug(function(){return console.warn('PostHog Debug','Session replay enabled but no sessionId found.');});return _context5.abrupt("return");case 25:sdkOptions={apiKey:this.apiKey,host:this.host,debug:this.isDebug,distinctId:this.getDistinctId(),anonymousId:this.getAnonymousId(),sdkVersion:this.getLibraryVersion(),flushAt:this.flushAt};this.logMsgIfDebug(function(){return console.log('PostHog Debug',"Session replay sdk options: ".concat(JSON.stringify(sdkOptions)));});_context5.prev=27;_context5.next=30;return _OptionalSessionReplay.OptionalReactNativeSessionReplay.isEnabled();case 30:if(_context5.sent){_context5.next=36;break;}_context5.next=33;return _OptionalSessionReplay.OptionalReactNativeSessionReplay.start(String(sessionId),sdkOptions,sdkReplayConfig,cachedSessionReplayConfig);case 33:this.logMsgIfDebug(function(){return console.info('PostHog Debug',"Session replay started with sessionId ".concat(sessionId,"."));});_context5.next=38;break;case 36:this._resetSessionId(_OptionalSessionReplay.OptionalReactNativeSessionReplay,String(sessionId));this.logMsgIfDebug(function(){return console.log('PostHog Debug',"Session replay already started with sessionId ".concat(sessionId,"."));});case 38:this._currentSessionId=sessionId;_context5.next=44;break;case 41:_context5.prev=41;_context5.t0=_context5["catch"](27);this.logMsgIfDebug(function(){return console.error('PostHog Debug',"Session replay failed to start: ".concat(_context5.t0,"."));});case 44:_context5.next=47;break;case 46:this.logMsgIfDebug(function(){return console.warn('PostHog Debug','Session replay enabled but not installed.');});case 47:_context5.next=50;break;case 49:this.logMsgIfDebug(function(){return console.info('PostHog Debug','Session replay disabled.');});case 50:case"end":return _context5.stop();}},_callee5,this,[[27,41]]);}));function startSessionReplay(_x7){return _startSessionReplay.apply(this,arguments);}return startSessionReplay;}()},{key:"captureAppLifecycleEvents",value:function(){var _captureAppLifecycleEvents=(0,_asyncToGenerator2["default"])(_regeneratorRuntime().mark(function _callee6(){var _this3=this;var _a,appBuild,appVersion,isMemoryPersistence,properties,prevAppBuild,prevAppVersion,initialUrl;return _regeneratorRuntime().wrap(function _callee6$(_context6){while(1)switch(_context6.prev=_context6.next){case 0:appBuild=this._appProperties.$app_build;appVersion=this._appProperties.$app_version;isMemoryPersistence=this._persistence==='memory';properties={};if(!isMemoryPersistence){prevAppBuild=this.getPersistedProperty(_core.PostHogPersistedProperty.InstalledAppBuild);prevAppVersion=this.getPersistedProperty(_core.PostHogPersistedProperty.InstalledAppVersion);if(!appBuild||!appVersion){this.logMsgIfDebug(function(){return console.warn('PostHog could not track installation/update/open, as the build and version were not set. '+'This can happen if some dependencies are not installed correctly, or if you have provided'+'customAppProperties but not included $app_build or $app_version.');});}if(appBuild){if(!prevAppBuild){this.capture('Application Installed',properties);}else if(prevAppBuild!==appBuild){this.capture('Application Updated',_objectSpread(_objectSpread(_objectSpread({},(0,_core.maybeAdd)('previous_version',prevAppVersion)),(0,_core.maybeAdd)('previous_build',prevAppBuild)),properties));}}}else{this.logMsgIfDebug(function(){return console.warn('PostHog was initialised with persistence set to "memory", capturing native app events (Application Installed and Application Updated) is not supported.');});}_context6.next=7;return _reactNative.Linking.getInitialURL();case 7:_context6.t1=_a=_context6.sent;_context6.t0=_context6.t1!==null;if(!_context6.t0){_context6.next=11;break;}_context6.t0=_a!==void 0;case 11:if(!_context6.t0){_context6.next=15;break;}_context6.t2=_a;_context6.next=16;break;case 15:_context6.t2=undefined;case 16:initialUrl=_context6.t2;this.capture('Application Opened',_objectSpread(_objectSpread({},properties),(0,_core.maybeAdd)('url',initialUrl)));_reactNative.AppState.addEventListener('change',function(state){if(state==='active'){_this3.capture('Application Became Active');}else if(state==='background'){_this3.capture('Application Backgrounded');}});case 19:case"end":return _context6.stop();}},_callee6,this);}));function captureAppLifecycleEvents(){return _captureAppLifecycleEvents.apply(this,arguments);}return captureAppLifecycleEvents;}()},{key:"persistAppVersion",value:function(){var _persistAppVersion=(0,_asyncToGenerator2["default"])(_regeneratorRuntime().mark(function _callee7(){var appBuild,appVersion;return _regeneratorRuntime().wrap(function _callee7$(_context7){while(1)switch(_context7.prev=_context7.next){case 0:appBuild=this._appProperties.$app_build;appVersion=this._appProperties.$app_version;this.setPersistedProperty(_core.PostHogPersistedProperty.InstalledAppBuild,appBuild);this.setPersistedProperty(_core.PostHogPersistedProperty.InstalledAppVersion,appVersion);case 4:case"end":return _context7.stop();}},_callee7,this);}));function persistAppVersion(){return _persistAppVersion.apply(this,arguments);}return persistAppVersion;}()}]);}(_core.PostHogCore);
1
+ "use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");var _typeof3=require("@babel/runtime/helpers/typeof");Object.defineProperty(exports,"__esModule",{value:true});exports.PostHog=void 0;Object.defineProperty(exports,"PostHogPersistedProperty",{enumerable:true,get:function get(){return _core.PostHogPersistedProperty;}});var _typeof2=_interopRequireDefault(require("@babel/runtime/helpers/typeof"));var _defineProperty2=_interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));var _asyncToGenerator2=_interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));var _classCallCheck2=_interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));var _createClass2=_interopRequireDefault(require("@babel/runtime/helpers/createClass"));var _possibleConstructorReturn2=_interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));var _getPrototypeOf2=_interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));var _get2=_interopRequireDefault(require("@babel/runtime/helpers/get"));var _inherits2=_interopRequireDefault(require("@babel/runtime/helpers/inherits"));var _reactNative=require("react-native");var _core=require("@posthog/core");var _storage=require("./storage");var _version=require("./version");var _nativeDeps=require("./native-deps");var _wixNavigation=require("./frameworks/wix-navigation");var _OptionalSessionReplay=require("./optional/OptionalSessionReplay");var _errorTracking=require("./error-tracking");function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable;})),t.push.apply(t,o);}return t;}function _objectSpread(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?ownKeys(Object(t),!0).forEach(function(r){(0,_defineProperty2["default"])(e,r,t[r]);}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r));});}return e;}function _regeneratorRuntime(){"use strict";_regeneratorRuntime=function _regeneratorRuntime(){return r;};var t,r={},e=Object.prototype,n=e.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(t,r,e,n){return Object.defineProperty(t,r,{value:e,enumerable:!n,configurable:!n,writable:!n});}try{c({},"");}catch(t){c=function c(t,r,e){return t[r]=e;};}function h(r,e,n,o){var i=e&&e.prototype instanceof Generator?e:Generator,a=Object.create(i.prototype);return c(a,"_invoke",function(r,e,n){var o=1;return function(i,a){if(3===o)throw Error("Generator is already running");if(4===o){if("throw"===i)throw a;return{value:t,done:!0};}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=d(u,n);if(c){if(c===f)continue;return c;}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(1===o)throw o=4,n.arg;n.dispatchException(n.arg);}else"return"===n.method&&n.abrupt("return",n.arg);o=3;var h=s(r,e,n);if("normal"===h.type){if(o=n.done?4:2,h.arg===f)continue;return{value:h.arg,done:n.done};}"throw"===h.type&&(o=4,n.method="throw",n.arg=h.arg);}};}(r,n,new Context(o||[])),!0),a;}function s(t,r,e){try{return{type:"normal",arg:t.call(r,e)};}catch(t){return{type:"throw",arg:t};}}r.wrap=h;var f={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var l={};c(l,i,function(){return this;});var p=Object.getPrototypeOf,y=p&&p(p(x([])));y&&y!==e&&n.call(y,i)&&(l=y);var v=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(l);function g(t){["next","throw","return"].forEach(function(r){c(t,r,function(t){return this._invoke(r,t);});});}function AsyncIterator(t,r){function e(o,i,a,u){var c=s(t[o],t,i);if("throw"!==c.type){var h=c.arg,f=h.value;return f&&"object"==_typeof3(f)&&n.call(f,"__await")?r.resolve(f.__await).then(function(t){e("next",t,a,u);},function(t){e("throw",t,a,u);}):r.resolve(f).then(function(t){h.value=t,a(h);},function(t){return e("throw",t,a,u);});}u(c.arg);}var o;c(this,"_invoke",function(t,n){function i(){return new r(function(r,o){e(t,n,r,o);});}return o=o?o.then(i,i):i();},!0);}function d(r,e){var n=e.method,o=r.i[n];if(o===t)return e.delegate=null,"throw"===n&&r.i["return"]&&(e.method="return",e.arg=t,d(r,e),"throw"===e.method)||"return"!==n&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+n+"' method")),f;var i=s(o,r.i,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,f;var a=i.arg;return a?a.done?(e[r.r]=a.value,e.next=r.n,"return"!==e.method&&(e.method="next",e.arg=t),e.delegate=null,f):a:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f);}function w(t){this.tryEntries.push(t);}function m(r){var e=r[4]||{};e.type="normal",e.arg=t,r[4]=e;}function Context(t){this.tryEntries=[[-1]],t.forEach(w,this),this.reset(!0);}function x(r){if(null!=r){var e=r[i];if(e)return e.call(r);if("function"==typeof r.next)return r;if(!isNaN(r.length)){var o=-1,a=function e(){for(;++o<r.length;)if(n.call(r,o))return e.value=r[o],e.done=!1,e;return e.value=t,e.done=!0,e;};return a.next=a;}}throw new TypeError(_typeof3(r)+" is not iterable");}return GeneratorFunction.prototype=GeneratorFunctionPrototype,c(v,"constructor",GeneratorFunctionPrototype),c(GeneratorFunctionPrototype,"constructor",GeneratorFunction),GeneratorFunction.displayName=c(GeneratorFunctionPrototype,u,"GeneratorFunction"),r.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===GeneratorFunction||"GeneratorFunction"===(r.displayName||r.name));},r.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,GeneratorFunctionPrototype):(t.__proto__=GeneratorFunctionPrototype,c(t,u,"GeneratorFunction")),t.prototype=Object.create(v),t;},r.awrap=function(t){return{__await:t};},g(AsyncIterator.prototype),c(AsyncIterator.prototype,a,function(){return this;}),r.AsyncIterator=AsyncIterator,r.async=function(t,e,n,o,i){void 0===i&&(i=Promise);var a=new AsyncIterator(h(t,e,n,o),i);return r.isGeneratorFunction(e)?a:a.next().then(function(t){return t.done?t.value:a.next();});},g(v),c(v,u,"Generator"),c(v,i,function(){return this;}),c(v,"toString",function(){return"[object Generator]";}),r.keys=function(t){var r=Object(t),e=[];for(var n in r)e.unshift(n);return function t(){for(;e.length;)if((n=e.pop())in r)return t.value=n,t.done=!1,t;return t.done=!0,t;};},r.values=x,Context.prototype={constructor:Context,reset:function reset(r){if(this.prev=this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(m),!r)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=t);},stop:function stop(){this.done=!0;var t=this.tryEntries[0][4];if("throw"===t.type)throw t.arg;return this.rval;},dispatchException:function dispatchException(r){if(this.done)throw r;var e=this;function n(t){a.type="throw",a.arg=r,e.next=t;}for(var o=e.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i[4],u=this.prev,c=i[1],h=i[2];if(-1===i[0])return n("end"),!1;if(!c&&!h)throw Error("try statement without catch or finally");if(null!=i[0]&&i[0]<=u){if(u<c)return this.method="next",this.arg=t,n(c),!0;if(u<h)return n(h),!1;}}},abrupt:function abrupt(t,r){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n[0]>-1&&n[0]<=this.prev&&this.prev<n[2]){var o=n;break;}}o&&("break"===t||"continue"===t)&&o[0]<=r&&r<=o[2]&&(o=null);var i=o?o[4]:{};return i.type=t,i.arg=r,o?(this.method="next",this.next=o[2],f):this.complete(i);},complete:function complete(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),f;},finish:function finish(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e[2]===t)return this.complete(e[4],e[3]),m(e),f;}},"catch":function _catch(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e[0]===t){var n=e[4];if("throw"===n.type){var o=n.arg;m(e);}return o;}}throw Error("illegal catch attempt");},delegateYield:function delegateYield(r,e,n){return this.delegate={i:x(r),r:e,n:n},"next"===this.method&&(this.arg=t),f;}},r;}function _callSuper(t,o,e){return o=(0,_getPrototypeOf2["default"])(o),(0,_possibleConstructorReturn2["default"])(t,_isNativeReflectConstruct()?Reflect.construct(o,e||[],(0,_getPrototypeOf2["default"])(t).constructor):o.apply(t,e));}function _isNativeReflectConstruct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch(t){}return(_isNativeReflectConstruct=function _isNativeReflectConstruct(){return!!t;})();}function _superPropGet(t,o,e,r){var p=(0,_get2["default"])((0,_getPrototypeOf2["default"])(1&r?t.prototype:t),o,e);return 2&r&&"function"==typeof p?function(t){return p.apply(e,t);}:p;}var PostHog=exports.PostHog=function(_PostHogCore){function PostHog(apiKey,options){var _this;(0,_classCallCheck2["default"])(this,PostHog);var _a,_b,_c,_d;_this=_callSuper(this,PostHog,[apiKey,options]);_this._appProperties={};_this._isInitialized=false;_this._persistence=(_a=options===null||options===void 0?void 0:options.persistence)!==null&&_a!==void 0?_a:'file';_this._disableSurveys=(_b=options===null||options===void 0?void 0:options.disableSurveys)!==null&&_b!==void 0?_b:false;_this._disableRemoteConfig=(_c=options===null||options===void 0?void 0:options.disableRemoteConfig)!==null&&_c!==void 0?_c:false;_this._errorTracking=new _errorTracking.ErrorTracking(_this);_this._appProperties=typeof(options===null||options===void 0?void 0:options.customAppProperties)==='function'?options.customAppProperties((0,_nativeDeps.getAppProperties)()):(options===null||options===void 0?void 0:options.customAppProperties)||(0,_nativeDeps.getAppProperties)();_reactNative.AppState.addEventListener('change',function(state){if(state==='unknown'){return;}void _this.flush()["catch"](function(){var _ref=(0,_asyncToGenerator2["default"])(_regeneratorRuntime().mark(function _callee(err){return _regeneratorRuntime().wrap(function _callee$(_context){while(1)switch(_context.prev=_context.next){case 0:_context.next=2;return(0,_core.logFlushError)(err);case 2:case"end":return _context.stop();}},_callee);}));return function(_x3){return _ref.apply(this,arguments);};}());if(state==='active'){_this.getSessionId();}});var storagePromise;if(_this._persistence==='file'){_this._storage=new _storage.PostHogRNStorage((_d=options===null||options===void 0?void 0:options.customStorage)!==null&&_d!==void 0?_d:(0,_nativeDeps.buildOptimisiticAsyncStorage)());storagePromise=_this._storage.preloadPromise;}else{_this._storage=new _storage.PostHogRNSyncMemoryStorage();}if(storagePromise){storagePromise["catch"](function(error){console.error('PostHog storage initialization failed:',error);});}var initAfterStorage=function initAfterStorage(){var enablePersistSessionIdAcrossRestart=options===null||options===void 0?void 0:options.enablePersistSessionIdAcrossRestart;if(!enablePersistSessionIdAcrossRestart){_this.setPersistedProperty(_core.PostHogPersistedProperty.SessionId,null);_this.setPersistedProperty(_core.PostHogPersistedProperty.SessionLastTimestamp,null);_this.setPersistedProperty(_core.PostHogPersistedProperty.SessionStartTimestamp,null);}_this.setupBootstrap(options);_this._isInitialized=true;if(_this._disableRemoteConfig===false){_this.reloadRemoteConfigAsync();}else{_this.logMsgIfDebug(function(){return console.info('PostHog Debug',"Remote config is disabled.");});if((options===null||options===void 0?void 0:options.preloadFeatureFlags)!==false){_this.logMsgIfDebug(function(){return console.info('PostHog Debug',"Feature flags will be preloaded from Flags API.");});_this.reloadFeatureFlags();}else{_this.logMsgIfDebug(function(){return console.info('PostHog Debug',"preloadFeatureFlags is disabled.");});}}if(options===null||options===void 0?void 0:options.captureAppLifecycleEvents){void _this.captureAppLifecycleEvents();}void _this.persistAppVersion();void _this.startSessionReplay(options);};if(storagePromise){_this._initPromise=storagePromise.then(initAfterStorage);}else{_this._initPromise=Promise.resolve();initAfterStorage();}return _this;}(0,_inherits2["default"])(PostHog,_PostHogCore);return(0,_createClass2["default"])(PostHog,[{key:"ready",value:(function(){var _ready=(0,_asyncToGenerator2["default"])(_regeneratorRuntime().mark(function _callee2(){return _regeneratorRuntime().wrap(function _callee2$(_context2){while(1)switch(_context2.prev=_context2.next){case 0:_context2.next=2;return this._initPromise;case 2:case"end":return _context2.stop();}},_callee2,this);}));function ready(){return _ready.apply(this,arguments);}return ready;}())},{key:"getPersistedProperty",value:function getPersistedProperty(key){return this._storage.getItem(key);}},{key:"setPersistedProperty",value:function setPersistedProperty(key,value){return value!==null?this._storage.setItem(key,value):this._storage.removeItem(key);}},{key:"fetch",value:function(_fetch){function fetch(_x,_x2){return _fetch.apply(this,arguments);}fetch.toString=function(){return _fetch.toString();};return fetch;}(function(url,options){return fetch(url,options);})},{key:"getLibraryId",value:function getLibraryId(){return'posthog-react-native';}},{key:"getLibraryVersion",value:function getLibraryVersion(){return _version.version;}},{key:"getCustomUserAgent",value:function getCustomUserAgent(){if(_reactNative.Platform.OS==='web'){return'';}return"".concat(this.getLibraryId(),"/").concat(this.getLibraryVersion());}},{key:"getCommonEventProperties",value:function getCommonEventProperties(){return _objectSpread(_objectSpread(_objectSpread({},_superPropGet(PostHog,"getCommonEventProperties",this,3)([])),this._appProperties),{},{$screen_height:_reactNative.Dimensions.get('screen').height,$screen_width:_reactNative.Dimensions.get('screen').width});}},{key:"register",value:function register(properties){return _superPropGet(PostHog,"register",this,3)([properties]);}},{key:"unregister",value:function unregister(property){return _superPropGet(PostHog,"unregister",this,3)([property]);}},{key:"reset",value:function reset(){_superPropGet(PostHog,"reset",this,3)([]);}},{key:"flush",value:function flush(){return _superPropGet(PostHog,"flush",this,3)([]);}},{key:"optIn",value:function optIn(){return _superPropGet(PostHog,"optIn",this,3)([]);}},{key:"optOut",value:function optOut(){return _superPropGet(PostHog,"optOut",this,3)([]);}},{key:"isFeatureEnabled",value:function isFeatureEnabled(key){return _superPropGet(PostHog,"isFeatureEnabled",this,3)([key]);}},{key:"getFeatureFlag",value:function getFeatureFlag(key){return _superPropGet(PostHog,"getFeatureFlag",this,3)([key]);}},{key:"getFeatureFlagPayload",value:function getFeatureFlagPayload(key){return _superPropGet(PostHog,"getFeatureFlagPayload",this,3)([key]);}},{key:"reloadFeatureFlags",value:function reloadFeatureFlags(){_superPropGet(PostHog,"reloadFeatureFlags",this,3)([]);}},{key:"reloadFeatureFlagsAsync",value:function reloadFeatureFlagsAsync(){return _superPropGet(PostHog,"reloadFeatureFlagsAsync",this,3)([]);}},{key:"group",value:function group(groupType,groupKey,properties){_superPropGet(PostHog,"group",this,3)([groupType,groupKey,properties]);}},{key:"alias",value:function alias(_alias){_superPropGet(PostHog,"alias",this,3)([_alias]);}},{key:"getDistinctId",value:function getDistinctId(){return _superPropGet(PostHog,"getDistinctId",this,3)([]);}},{key:"setPersonPropertiesForFlags",value:function setPersonPropertiesForFlags(properties){_superPropGet(PostHog,"setPersonPropertiesForFlags",this,3)([properties]);}},{key:"resetPersonPropertiesForFlags",value:function resetPersonPropertiesForFlags(){_superPropGet(PostHog,"resetPersonPropertiesForFlags",this,3)([]);}},{key:"setGroupPropertiesForFlags",value:function setGroupPropertiesForFlags(properties){_superPropGet(PostHog,"setGroupPropertiesForFlags",this,3)([properties]);}},{key:"resetGroupPropertiesForFlags",value:function resetGroupPropertiesForFlags(){_superPropGet(PostHog,"resetGroupPropertiesForFlags",this,3)([]);}},{key:"screen",value:(function(){var _screen=(0,_asyncToGenerator2["default"])(_regeneratorRuntime().mark(function _callee3(name,properties,options){return _regeneratorRuntime().wrap(function _callee3$(_context3){while(1)switch(_context3.prev=_context3.next){case 0:_context3.next=2;return this._initPromise;case 2:this.registerForSession({$screen_name:name});return _context3.abrupt("return",this.capture('$screen',_objectSpread(_objectSpread({},properties),{},{$screen_name:name}),options));case 4:case"end":return _context3.stop();}},_callee3,this);}));function screen(_x4,_x5,_x6){return _screen.apply(this,arguments);}return screen;}())},{key:"_isEnableSessionReplay",value:function _isEnableSessionReplay(){var _a;return!this.isDisabled&&((_a=this._enableSessionReplay)!==null&&_a!==void 0?_a:false);}},{key:"_resetSessionId",value:function _resetSessionId(reactNativeSessionReplay,sessionId){if(reactNativeSessionReplay){reactNativeSessionReplay.endSession();reactNativeSessionReplay.startSession(sessionId);}}},{key:"getSessionId",value:function getSessionId(){var _this2=this;var sessionId=_superPropGet(PostHog,"getSessionId",this,3)([]);if(!this._isEnableSessionReplay()){return sessionId;}if(sessionId.length>0&&this._currentSessionId&&sessionId!==this._currentSessionId){if(_OptionalSessionReplay.OptionalReactNativeSessionReplay){try{this._resetSessionId(_OptionalSessionReplay.OptionalReactNativeSessionReplay,String(sessionId));this.logMsgIfDebug(function(){return console.info('PostHog Debug',"sessionId rotated from ".concat(_this2._currentSessionId," to ").concat(sessionId,"."));});}catch(e){this.logMsgIfDebug(function(){return console.error('PostHog Debug',"Failed to rotate sessionId: ".concat(e,"."));});}}this._currentSessionId=sessionId;}else{this.logMsgIfDebug(function(){return console.log('PostHog Debug',"sessionId not rotated, sessionId ".concat(sessionId," and currentSessionId ").concat(_this2._currentSessionId,"."));});}return sessionId;}},{key:"resetSessionId",value:function resetSessionId(){_superPropGet(PostHog,"resetSessionId",this,3)([]);if(this._isEnableSessionReplay()&&_OptionalSessionReplay.OptionalReactNativeSessionReplay){try{_OptionalSessionReplay.OptionalReactNativeSessionReplay.endSession();this.logMsgIfDebug(function(){return console.info('PostHog Debug',"Session replay ended.");});}catch(e){this.logMsgIfDebug(function(){return console.error('PostHog Debug',"Session replay failed to end: ".concat(e,"."));});}}}},{key:"identify",value:function identify(distinctId,properties,options){var previousDistinctId=this.getDistinctId();_superPropGet(PostHog,"identify",this,3)([distinctId,properties,options]);if(this._isEnableSessionReplay()&&_OptionalSessionReplay.OptionalReactNativeSessionReplay){try{distinctId=distinctId||previousDistinctId;var anonymousId=this.getAnonymousId();_OptionalSessionReplay.OptionalReactNativeSessionReplay.identify(String(distinctId),String(anonymousId));this.logMsgIfDebug(function(){return console.info('PostHog Debug',"Session replay identified with distinctId ".concat(distinctId," and anonymousId ").concat(anonymousId,"."));});}catch(e){this.logMsgIfDebug(function(){return console.error('PostHog Debug',"Session replay failed to identify: ".concat(e,"."));});}}}},{key:"captureException",value:function captureException(error){var additionalProperties=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var syntheticException=new Error('Synthetic Error');this._errorTracking.captureException(error,additionalProperties,{mechanism:{handled:true,type:'generic'},syntheticException:syntheticException});}},{key:"initReactNativeNavigation",value:function initReactNativeNavigation(options){return(0,_wixNavigation.withReactNativeNavigation)(this,options);}},{key:"getSurveys",value:function(){var _getSurveys=(0,_asyncToGenerator2["default"])(_regeneratorRuntime().mark(function _callee4(){var surveys,surveysFromApi;return _regeneratorRuntime().wrap(function _callee4$(_context4){while(1)switch(_context4.prev=_context4.next){case 0:if(!(this._disableSurveys===true)){_context4.next=4;break;}this.logMsgIfDebug(function(){return console.log('PostHog Debug','Loading surveys is disabled.');});this.setPersistedProperty(_core.PostHogPersistedProperty.Surveys,null);return _context4.abrupt("return",[]);case 4:surveys=this.getPersistedProperty(_core.PostHogPersistedProperty.Surveys);if(!(surveys&&surveys.length>0)){_context4.next=10;break;}this.logMsgIfDebug(function(){return console.log('PostHog Debug','Surveys fetched from storage: ',JSON.stringify(surveys));});return _context4.abrupt("return",surveys);case 10:this.logMsgIfDebug(function(){return console.log('PostHog Debug','No surveys found in storage');});case 11:if(!(this._disableRemoteConfig===true)){_context4.next=18;break;}_context4.next=14;return _superPropGet(PostHog,"getSurveysStateless",this,3)([]);case 14:surveysFromApi=_context4.sent;if(!(surveysFromApi&&surveysFromApi.length>0)){_context4.next=18;break;}this.setPersistedProperty(_core.PostHogPersistedProperty.Surveys,surveysFromApi);return _context4.abrupt("return",surveysFromApi);case 18:return _context4.abrupt("return",[]);case 19:case"end":return _context4.stop();}},_callee4,this);}));function getSurveys(){return _getSurveys.apply(this,arguments);}return getSurveys;}()},{key:"startSessionReplay",value:function(){var _startSessionReplay=(0,_asyncToGenerator2["default"])(_regeneratorRuntime().mark(function _callee5(options){var _a,_b,_c,_d,_e,_f,_g,defaultThrottleDelayMs,_ref2,_ref2$maskAllTextInpu,maskAllTextInputs,_ref2$maskAllImages,maskAllImages,_ref2$maskAllSandboxe,maskAllSandboxedViews,_ref2$captureLog,captureLog,_ref2$captureNetworkT,captureNetworkTelemetry,_ref2$iOSdebouncerDel,iOSdebouncerDelayMs,_ref2$androidDebounce,androidDebouncerDelayMs,throttleDelayMs,sdkReplayConfig,sessionReplay,featureFlags,cachedFeatureFlags,cachedSessionReplayConfig,recordingActive,linkedFlag,value,flag,variant,_value,sessionId,sdkOptions;return _regeneratorRuntime().wrap(function _callee5$(_context5){while(1)switch(_context5.prev=_context5.next){case 0:this._enableSessionReplay=options===null||options===void 0?void 0:options.enableSessionReplay;if(this._isEnableSessionReplay()){_context5.next=4;break;}this.logMsgIfDebug(function(){return console.info('PostHog Debug','Session replay is not enabled.');});return _context5.abrupt("return");case 4:defaultThrottleDelayMs=1000;_ref2=(_a=options===null||options===void 0?void 0:options.sessionReplayConfig)!==null&&_a!==void 0?_a:{},_ref2$maskAllTextInpu=_ref2.maskAllTextInputs,maskAllTextInputs=_ref2$maskAllTextInpu===void 0?true:_ref2$maskAllTextInpu,_ref2$maskAllImages=_ref2.maskAllImages,maskAllImages=_ref2$maskAllImages===void 0?true:_ref2$maskAllImages,_ref2$maskAllSandboxe=_ref2.maskAllSandboxedViews,maskAllSandboxedViews=_ref2$maskAllSandboxe===void 0?true:_ref2$maskAllSandboxe,_ref2$captureLog=_ref2.captureLog,captureLog=_ref2$captureLog===void 0?true:_ref2$captureLog,_ref2$captureNetworkT=_ref2.captureNetworkTelemetry,captureNetworkTelemetry=_ref2$captureNetworkT===void 0?true:_ref2$captureNetworkT,_ref2$iOSdebouncerDel=_ref2.iOSdebouncerDelayMs,iOSdebouncerDelayMs=_ref2$iOSdebouncerDel===void 0?defaultThrottleDelayMs:_ref2$iOSdebouncerDel,_ref2$androidDebounce=_ref2.androidDebouncerDelayMs,androidDebouncerDelayMs=_ref2$androidDebounce===void 0?defaultThrottleDelayMs:_ref2$androidDebounce;throttleDelayMs=(_c=(_b=options===null||options===void 0?void 0:options.sessionReplayConfig)===null||_b===void 0?void 0:_b.throttleDelayMs)!==null&&_c!==void 0?_c:defaultThrottleDelayMs;if(throttleDelayMs===defaultThrottleDelayMs&&(iOSdebouncerDelayMs!==defaultThrottleDelayMs||androidDebouncerDelayMs!==defaultThrottleDelayMs)){throttleDelayMs=Math.max(iOSdebouncerDelayMs,androidDebouncerDelayMs);}sdkReplayConfig={maskAllTextInputs:maskAllTextInputs,maskAllImages:maskAllImages,maskAllSandboxedViews:maskAllSandboxedViews,captureLog:captureLog,captureNetworkTelemetry:captureNetworkTelemetry,iOSdebouncerDelayMs:iOSdebouncerDelayMs,androidDebouncerDelayMs:androidDebouncerDelayMs,throttleDelayMs:throttleDelayMs};this.logMsgIfDebug(function(){return console.log('PostHog Debug',"Session replay SDK config: ".concat(JSON.stringify(sdkReplayConfig)));});sessionReplay=(_d=this.getPersistedProperty(_core.PostHogPersistedProperty.SessionReplay))!==null&&_d!==void 0?_d:{};featureFlags=(_e=this.getKnownFeatureFlags())!==null&&_e!==void 0?_e:{};cachedFeatureFlags=(_f=featureFlags)!==null&&_f!==void 0?_f:{};cachedSessionReplayConfig=(_g=sessionReplay)!==null&&_g!==void 0?_g:{};this.logMsgIfDebug(function(){return console.log('PostHog Debug',"Session replay feature flags from flags cached config: ".concat(JSON.stringify(cachedFeatureFlags)));});this.logMsgIfDebug(function(){return console.log('PostHog Debug',"Session replay session recording from flags cached config: ".concat(JSON.stringify(cachedSessionReplayConfig)));});recordingActive=true;linkedFlag=cachedSessionReplayConfig['linkedFlag'];if(typeof linkedFlag==='string'){value=cachedFeatureFlags[linkedFlag];if(typeof value==='boolean'){recordingActive=value;}else if(typeof value==='string'){recordingActive=true;}else{recordingActive=false;}this.logMsgIfDebug(function(){return console.log('PostHog Debug',"Session replay '".concat(linkedFlag,"' linked flag value: '").concat(value,"'"));});}else if(linkedFlag&&(0,_typeof2["default"])(linkedFlag)==='object'){flag=linkedFlag['flag'];variant=linkedFlag['variant'];if(flag&&variant){_value=cachedFeatureFlags[flag];recordingActive=_value===variant;this.logMsgIfDebug(function(){return console.log('PostHog Debug',"Session replay '".concat(flag,"' linked flag variant '").concat(variant,"' and value '").concat(_value,"'"));});}else{this.logMsgIfDebug(function(){return console.log('PostHog Debug',"Session replay '".concat(flag,"' linked flag variant: '").concat(variant,"' does not exist/quota limited."));});recordingActive=false;}}else{this.logMsgIfDebug(function(){return console.log('PostHog Debug',"Session replay has no cached linkedFlag.");});}if(!recordingActive){_context5.next=49;break;}if(!_OptionalSessionReplay.OptionalReactNativeSessionReplay){_context5.next=46;break;}sessionId=this.getSessionId();if(!(sessionId.length===0)){_context5.next=25;break;}this.logMsgIfDebug(function(){return console.warn('PostHog Debug','Session replay enabled but no sessionId found.');});return _context5.abrupt("return");case 25:sdkOptions={apiKey:this.apiKey,host:this.host,debug:this.isDebug,distinctId:this.getDistinctId(),anonymousId:this.getAnonymousId(),sdkVersion:this.getLibraryVersion(),flushAt:this.flushAt};this.logMsgIfDebug(function(){return console.log('PostHog Debug',"Session replay sdk options: ".concat(JSON.stringify(sdkOptions)));});_context5.prev=27;_context5.next=30;return _OptionalSessionReplay.OptionalReactNativeSessionReplay.isEnabled();case 30:if(_context5.sent){_context5.next=36;break;}_context5.next=33;return _OptionalSessionReplay.OptionalReactNativeSessionReplay.start(String(sessionId),sdkOptions,sdkReplayConfig,cachedSessionReplayConfig);case 33:this.logMsgIfDebug(function(){return console.info('PostHog Debug',"Session replay started with sessionId ".concat(sessionId,"."));});_context5.next=38;break;case 36:this._resetSessionId(_OptionalSessionReplay.OptionalReactNativeSessionReplay,String(sessionId));this.logMsgIfDebug(function(){return console.log('PostHog Debug',"Session replay already started with sessionId ".concat(sessionId,"."));});case 38:this._currentSessionId=sessionId;_context5.next=44;break;case 41:_context5.prev=41;_context5.t0=_context5["catch"](27);this.logMsgIfDebug(function(){return console.error('PostHog Debug',"Session replay failed to start: ".concat(_context5.t0,"."));});case 44:_context5.next=47;break;case 46:this.logMsgIfDebug(function(){return console.warn('PostHog Debug','Session replay enabled but not installed.');});case 47:_context5.next=50;break;case 49:this.logMsgIfDebug(function(){return console.info('PostHog Debug','Session replay disabled.');});case 50:case"end":return _context5.stop();}},_callee5,this,[[27,41]]);}));function startSessionReplay(_x7){return _startSessionReplay.apply(this,arguments);}return startSessionReplay;}()},{key:"captureAppLifecycleEvents",value:function(){var _captureAppLifecycleEvents=(0,_asyncToGenerator2["default"])(_regeneratorRuntime().mark(function _callee6(){var _this3=this;var _a,appBuild,appVersion,isMemoryPersistence,properties,prevAppBuild,prevAppVersion,initialUrl;return _regeneratorRuntime().wrap(function _callee6$(_context6){while(1)switch(_context6.prev=_context6.next){case 0:appBuild=this._appProperties.$app_build;appVersion=this._appProperties.$app_version;isMemoryPersistence=this._persistence==='memory';properties={};if(!isMemoryPersistence){prevAppBuild=this.getPersistedProperty(_core.PostHogPersistedProperty.InstalledAppBuild);prevAppVersion=this.getPersistedProperty(_core.PostHogPersistedProperty.InstalledAppVersion);if(!appBuild||!appVersion){this.logMsgIfDebug(function(){return console.warn('PostHog could not track installation/update/open, as the build and version were not set. '+'This can happen if some dependencies are not installed correctly, or if you have provided'+'customAppProperties but not included $app_build or $app_version.');});}if(appBuild){if(!prevAppBuild){this.capture('Application Installed',properties);}else if(prevAppBuild!==appBuild){this.capture('Application Updated',_objectSpread(_objectSpread(_objectSpread({},(0,_core.maybeAdd)('previous_version',prevAppVersion)),(0,_core.maybeAdd)('previous_build',prevAppBuild)),properties));}}}else{this.logMsgIfDebug(function(){return console.warn('PostHog was initialised with persistence set to "memory", capturing native app events (Application Installed and Application Updated) is not supported.');});}_context6.next=7;return _reactNative.Linking.getInitialURL();case 7:_context6.t1=_a=_context6.sent;_context6.t0=_context6.t1!==null;if(!_context6.t0){_context6.next=11;break;}_context6.t0=_a!==void 0;case 11:if(!_context6.t0){_context6.next=15;break;}_context6.t2=_a;_context6.next=16;break;case 15:_context6.t2=undefined;case 16:initialUrl=_context6.t2;this.capture('Application Opened',_objectSpread(_objectSpread({},properties),(0,_core.maybeAdd)('url',initialUrl)));_reactNative.AppState.addEventListener('change',function(state){if(state==='active'){_this3.capture('Application Became Active');}else if(state==='background'){_this3.capture('Application Backgrounded');}});case 19:case"end":return _context6.stop();}},_callee6,this);}));function captureAppLifecycleEvents(){return _captureAppLifecycleEvents.apply(this,arguments);}return captureAppLifecycleEvents;}()},{key:"persistAppVersion",value:function(){var _persistAppVersion=(0,_asyncToGenerator2["default"])(_regeneratorRuntime().mark(function _callee7(){var appBuild,appVersion;return _regeneratorRuntime().wrap(function _callee7$(_context7){while(1)switch(_context7.prev=_context7.next){case 0:appBuild=this._appProperties.$app_build;appVersion=this._appProperties.$app_version;this.setPersistedProperty(_core.PostHogPersistedProperty.InstalledAppBuild,appBuild);this.setPersistedProperty(_core.PostHogPersistedProperty.InstalledAppVersion,appVersion);case 4:case"end":return _context7.stop();}},_callee7,this);}));function persistAppVersion(){return _persistAppVersion.apply(this,arguments);}return persistAppVersion;}()}]);}(_core.PostHogCore);
@@ -1 +1 @@
1
- {"version":3,"file":"posthog-rn.js","sourceRoot":"","sources":["../src/posthog-rn.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAA;AAEtE,OAAO,EAGL,WAAW,EAKX,wBAAwB,EAExB,aAAa,EACb,QAAQ,GAET,MAAM,eAAe,CAAA;AACtB,OAAO,EAAE,gBAAgB,EAAE,0BAA0B,EAAE,MAAM,WAAW,CAAA;AACxE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,EAAE,4BAA4B,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAA;AAO9E,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAA;AACvE,OAAO,EAAE,gCAAgC,EAAE,MAAM,kCAAkC,CAAA;AAEnF,OAAO,EAAE,wBAAwB,EAAE,CAAA;AA4CnC,MAAM,OAAO,OAAQ,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AE,CAAC;gBAClC,IAAI,CAAC,OAAO,CAAC,0BAA0B,CAAC,CAAA;YAC1C,CAAC;QACH,CAAC,CAAC,CAAA;IACJ,CAAC;IAEO,KAAK,CAAC,iBAAiB;QAC7B,MAAM,QAAQ,GAAG,IAAI,CAAC,cAAc,CAAC,UAAU,CAAA;QAC/C,MAAM,UAAU,GAAG,IAAI,CAAC,cAAc,CAAC,YAAY,CAAA;QACnD,IAAI,CAAC,oBAAoB,CAAC,wBAAwB,CAAC,iBAAiB,EAAE,QAAQ,CAAC,CAAA;QAC/E,IAAI,CAAC,oBAAoB,CAAC,wBAAwB,CAAC,mBAAmB,EAAE,UAAU,CAAC,CAAA;IACrF,CAAC;CACF"}
package/dist/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const version = "4.7.0";
1
+ export declare const version = "4.8.0";
package/dist/version.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.version=void 0;var version=exports.version="4.7.0";
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.version=void 0;var version=exports.version="4.8.0";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "posthog-react-native",
3
- "version": "4.7.0",
3
+ "version": "4.8.0",
4
4
  "license": "MIT",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -13,7 +13,7 @@
13
13
  "directory": "packages/react-native"
14
14
  },
15
15
  "dependencies": {
16
- "@posthog/core": "1.2.1"
16
+ "@posthog/core": "1.2.2"
17
17
  },
18
18
  "devDependencies": {
19
19
  "@babel/cli": "^7.19.3",
@@ -101,7 +101,6 @@
101
101
  "prebuild": "node -p \"'export const version = ' + JSON.stringify(require('./package.json').version)\" > src/version.ts",
102
102
  "build": "tsc -b && babel ./dist --out-dir dist --extensions '.js'",
103
103
  "package": "pnpm pack --out $PACKAGE_DEST/%s.tgz",
104
- "gen-specs": "pnpm exec tsc && pnpm exec api-extractor run --config ./api-extractor.json --local",
105
- "parse-specs": "node scripts/generate-docs.js"
104
+ "generate-references": "pnpm exec api-extractor run --config ./api-extractor.json --local && node scripts/generate-docs.js"
106
105
  }
107
106
  }