webtonative 1.0.31 → 1.0.32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/AdMob/index.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.rewardsAd=exports.fullScreenAd=exports.bannerAd=void 0;var _utills=require("../utills"),_this=void 0,adMobCb=null,bannerAd=function(){var a=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};return _utills.isNativeApp&&_utills.webToNative.showBannerAd(JSON.stringify(a)),_this};exports.bannerAd=bannerAd;var fullScreenAd=function(){var a=0<arguments.length&&arguments[0]!==void 0?arguments[0]:{};if("ANDROID_APP"==_utills.platform){var b=a.fullScreenAdCallback;return(0,_utills.registerForAbMobCb)(function(a){var b=a.status;adMobCb&&adMobCb(a),"adDismissed"===b&&(adMobCb=null),-1<["adDismissed","adLoadError","adError"].indexOf(b)&&(0,_utills.deRegisterForAbMobCb)()}),_utills.isNativeApp&&_utills.webToNative.showFullScreenAd(JSON.stringify(a)),"function"==typeof b&&(adMobCb=b),_this}};exports.fullScreenAd=fullScreenAd;var rewardsAd=function(){var a=0<arguments.length&&arguments[0]!==void 0?arguments[0]:{};if("ANDROID_APP"==_utills.platform){var b=a.rewardsAdCallback;return(0,_utills.registerForAbMobCb)(function(a){var b=a.status;adMobCb&&adMobCb(a),"adDismissed"===b&&(adMobCb=null),-1<["adDismissed","adLoadError","adError"].indexOf(b)&&(0,_utills.deRegisterForAbMobCb)()}),_utills.isNativeApp&&_utills.webToNative.showRewardsAd(JSON.stringify(a)),"function"==typeof b&&(adMobCb=b),_this}};exports.rewardsAd=rewardsAd;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.rewardsAd=exports.fullScreenAd=exports.bannerAd=void 0;var _utills=require("../utills"),_this=void 0,adMobCb=null,bannerAd=function(){var a=0<arguments.length&&arguments[0]!==void 0?arguments[0]:{};if(["ANDROID_APP","IOS_APP"].includes(_utills.platform))return"IOS_APP"===_utills.platform&&_utills.webToNativeIos.postMessage({action:"showBannerAd",adId:a.adId||""}),"ANDROID_APP"===_utills.platform&&_utills.webToNative.showBannerAd(JSON.stringify(a)),_this};exports.bannerAd=bannerAd;var fullScreenAd=function(){var a=0<arguments.length&&arguments[0]!==void 0?arguments[0]:{};if(["ANDROID_APP","IOS_APP"].includes(_utills.platform)){var b=a.fullScreenAdCallback;return(0,_utills.registerForAbMobCb)(function(a){var b=a.status;adMobCb&&adMobCb(a),"adDismissed"===b&&(adMobCb=null),-1<["adDismissed","adLoadError","adError"].indexOf(b)&&(0,_utills.deRegisterForAbMobCb)()}),"IOS_APP"===_utills.platform&&_utills.webToNativeIos.postMessage({action:"showFullScreenAd",adId:a.adId||""}),"ANDROID_APP"===_utills.platform&&_utills.webToNative.showFullScreenAd(JSON.stringify(a)),"function"==typeof b&&(adMobCb=b),_this}};exports.fullScreenAd=fullScreenAd;var rewardsAd=function(){var a=0<arguments.length&&arguments[0]!==void 0?arguments[0]:{};if(["ANDROID_APP","IOS_APP"].includes(_utills.platform)){var b=a.rewardsAdCallback;return(0,_utills.registerForAbMobCb)(function(a){var b=a.status;adMobCb&&adMobCb(a),"adDismissed"===b&&(adMobCb=null),-1<["adDismissed","adLoadError","adError"].indexOf(b)&&(0,_utills.deRegisterForAbMobCb)()}),"IOS_APP"===_utills.platform&&_utills.webToNativeIos.postMessage({action:"showRewardAd",adId:a.adId||""}),"ANDROID_APP"===_utills.platform&&_utills.webToNative.showRewardsAd(JSON.stringify(a)),"function"==typeof b&&(adMobCb=b),_this}};exports.rewardsAd=rewardsAd;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "webtonative",
3
- "version": "1.0.31",
3
+ "version": "1.0.32",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/utills.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.webToNativeIos=exports.webToNative=exports.registerForAbMobCb=exports.registerCb=exports.platform=exports.isNativeApp=exports.isClient=exports.deRegisterForAbMobCb=exports.deRegisterCbByKey=void 0;var isClient="undefined"!=typeof window;exports.isClient=isClient;var webToNative=isClient&&window.WebToNativeInterface||{};exports.webToNative=webToNative;var webToNativeIos=isClient&&window.webkit&&window.webkit.messageHandlers&&window.webkit.messageHandlers.webToNativeInterface;exports.webToNativeIos=webToNativeIos;var platform=webToNative.getAndroidVersion?"ANDROID_APP":webToNativeIos?"IOS_APP":"WEBSITE";exports.platform=platform;var isNativeApp=isClient&&"WEBSITE"!==platform;exports.isNativeApp=isNativeApp;var cbObj={},counter=1,abMobCb=null;isNativeApp&&(webToNative.androidCBHook=function(a){var b=a;try{b=JSON.parse(a)}catch(a){console.log(a)}var c=b,d=c.type;for(var e in cbObj){var f=cbObj[e],g=f.cb,h=f.ignoreDelete,i=void 0!==h&&h;b&&b.reqType?e==b.reqType&&(g(b),!i&&delete cbObj[e]):(g(b),!i&&delete cbObj[e])}},webToNative.androidAdMobCBHook=function(a){var b=JSON.parse(a);abMobCb&&abMobCb(b)},window.iosCBHook=function(a){var b=a;try{b=JSON.parse(a)}catch(a){console.log(a)}for(var c in cbObj){var d=cbObj[c],e=d.cb,f=d.ignoreDelete,g=void 0!==f&&f;b&&b.reqType?c==b.reqType&&(e(b),!g&&delete cbObj[c]):(e(b),!g&&delete cbObj[c])}});var registerCb=function(a,b){"function"==typeof a&&(b&&b.key?cbObj[b.key]={cb:a,ignoreDelete:!!b.ignoreDelete}:(cbObj[counter]={cb:a,ignoreDelete:!!(b&&b.ignoreDelete)},counter+=1))};exports.registerCb=registerCb;var registerForAbMobCb=function(a){"function"==typeof a&&(abMobCb=a)};exports.registerForAbMobCb=registerForAbMobCb;var deRegisterForAbMobCb=function(){abMobCb&&(abMobCb=null)};exports.deRegisterForAbMobCb=deRegisterForAbMobCb;var deRegisterCbByKey=function(a){delete cbObj[a]};exports.deRegisterCbByKey=deRegisterCbByKey;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.webToNativeIos=exports.webToNative=exports.registerForAbMobCb=exports.registerCb=exports.platform=exports.isNativeApp=exports.isClient=exports.deRegisterForAbMobCb=exports.deRegisterCbByKey=void 0;var isClient="undefined"!=typeof window;exports.isClient=isClient;var webToNative=isClient&&window.WebToNativeInterface||{};exports.webToNative=webToNative;var webToNativeIos=isClient&&window.webkit&&window.webkit.messageHandlers&&window.webkit.messageHandlers.webToNativeInterface;exports.webToNativeIos=webToNativeIos;var platform=webToNative.getAndroidVersion?"ANDROID_APP":webToNativeIos?"IOS_APP":"WEBSITE";exports.platform=platform;var isNativeApp=isClient&&"WEBSITE"!==platform;exports.isNativeApp=isNativeApp;var cbObj={},counter=1,abMobCb=null;isNativeApp&&(webToNative.androidCBHook=function(a){var b=a;try{b=JSON.parse(a)}catch(a){console.log(a)}var c=b,d=c.type;for(var e in cbObj){var f=cbObj[e],g=f.cb,h=f.ignoreDelete,i=void 0!==h&&h;b&&b.reqType?e==b.reqType&&(g(b),!i&&delete cbObj[e]):(g(b),!i&&delete cbObj[e])}},window.iOSAdMobCBHook=webToNative.androidAdMobCBHook=function(a){var b=JSON.parse(a);abMobCb&&abMobCb(b)},window.iosCBHook=function(a){var b=a;try{b=JSON.parse(a)}catch(a){console.log(a)}for(var c in cbObj){var d=cbObj[c],e=d.cb,f=d.ignoreDelete,g=void 0!==f&&f;b&&b.reqType?c==b.reqType&&(e(b),!g&&delete cbObj[c]):(e(b),!g&&delete cbObj[c])}});var registerCb=function(a,b){"function"==typeof a&&(b&&b.key?cbObj[b.key]={cb:a,ignoreDelete:!!b.ignoreDelete}:(cbObj[counter]={cb:a,ignoreDelete:!!(b&&b.ignoreDelete)},counter+=1))};exports.registerCb=registerCb;var registerForAbMobCb=function(a){"function"==typeof a&&(abMobCb=a)};exports.registerForAbMobCb=registerForAbMobCb;var deRegisterForAbMobCb=function(){abMobCb&&(abMobCb=null)};exports.deRegisterForAbMobCb=deRegisterForAbMobCb;var deRegisterCbByKey=function(a){delete cbObj[a]};exports.deRegisterCbByKey=deRegisterCbByKey;
@@ -1 +1 @@
1
- !function(){"use strict";var e={d:function(n,t){for(var o in t)e.o(t,o)&&!e.o(n,o)&&Object.defineProperty(n,o,{enumerable:!0,get:t[o]})},o:function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},r:function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},n={};e.r(n),e.d(n,{default:function(){return U},deviceInfo:function(){return C},hideSplashScreen:function(){return M},isAndroidApp:function(){return k},isIosApp:function(){return m},isNativeApp:function(){return N},platform:function(){return S},shareLink:function(){return W},showInAppReview:function(){return F},statusBar:function(){return E}});var t={};e.r(t),e.d(t,{getPlayerId:function(){return L},removeExternalUserId:function(){return x},setExternalUserId:function(){return B},setTags:function(){return J}});var o={};e.r(o),e.d(o,{BarcodeScan:function(){return G},Format:function(){return q},Types:function(){return j}});var i={};e.r(i),e.d(i,{bannerAd:function(){return z},fullScreenAd:function(){return Q},rewardsAd:function(){return Z}});var r={};e.r(r),e.d(r,{logEvent:function(){return ee},setCustomerUserId:function(){return $}});var a={};e.r(a),e.d(a,{send:function(){return ne},sendPurchase:function(){return te}});var s={};e.r(s),e.d(s,{hide:function(){return oe},show:function(){return ie}});var c={};e.r(c),e.d(c,{getAll:function(){return ae},getPermissionStatus:function(){return re}});var u={};e.r(u),e.d(u,{start:function(){return se},stop:function(){return ce}});var P={};e.r(P),e.d(P,{keepScreenNormal:function(){return Pe},keepScreenOn:function(){return ue}});var A={};e.r(A),e.d(A,{get:function(){return Ae},set:function(){return de}});var d={};e.r(d),e.d(d,{prompt:function(){return le}});var l={};e.r(l),e.d(l,{request:function(){return fe},status:function(){return Ie}});var f={};e.r(f),e.d(f,{logEvent:function(){return _e},logScreen:function(){return ve},setCollection:function(){return pe},setDefaultEventParameters:function(){return De},setUserId:function(){return Oe},setUserProperty:function(){return ge}});var I={};e.r(I),e.d(I,{events:function(){return f}});var p={};e.r(p),e.d(p,{getFCMToken:function(){return we},subscribe:function(){return Se},unsubscribe:function(){return Ne}});var O={};e.r(O),e.d(O,{Analytics:function(){return f},Messaging:function(){return p}});var g={};e.r(g),e.d(g,{trigger:function(){return Te}});var D="undefined"!=typeof window,_=D&&window.WebToNativeInterface||{},v=D&&window.webkit&&window.webkit.messageHandlers&&window.webkit.messageHandlers.webToNativeInterface,S=_.getAndroidVersion?"ANDROID_APP":v?"IOS_APP":"WEBSITE",N=D&&"WEBSITE"!==S,w={},T=1,y=null;N&&(_.androidCBHook=function(e){var n=e;try{n=JSON.parse(e)}catch(e){console.log(e)}for(var t in n.type,w){var o=w[t],i=o.cb,r=o.ignoreDelete,a=void 0!==r&&r;n&&n.reqType?t==n.reqType&&(i(n),a||delete w[t]):(i(n),a||delete w[t])}},_.androidAdMobCBHook=function(e){var n=JSON.parse(e);y&&y(n)},window.iosCBHook=function(e){var n=e;try{n=JSON.parse(e)}catch(e){console.log(e)}for(var t in w){var o=w[t],i=o.cb,r=o.ignoreDelete,a=void 0!==r&&r;n&&n.reqType?t==n.reqType&&(i(n),a||delete w[t]):(i(n),a||delete w[t])}});var b=function(e,n){"function"==typeof e&&(n&&n.key?w[n.key]={cb:e,ignoreDelete:!!n.ignoreDelete}:(w[T]={cb:e,ignoreDelete:!(!n||!n.ignoreDelete)},T+=1))},R=function(e){"function"==typeof e&&(y=e)},h=function(){y&&(y=null)},k="ANDROID_APP"===S,m="IOS_APP"===S,M=function(){N&&_.hideSplashScreen()},E=function(e){N&&(k?_.statusBar(JSON.stringify(e)):m&&v.postMessage({action:"statusBar",color:e.color,style:e.style}))},C=function(){return new Promise((function(e,n){b((function(t){t?e(t):n({err:"Error getting device info"})}),{key:"deviceInfo"}),"ANDROID_APP"===S?_.getDeviceInfo():"IOS_APP"===S?v.postMessage({action:"deviceInfo"}):n("This function will work in Native App Powered By WebToNative")}))},F=function(){N&&_.showInAppReview()},W=function(e){var n=e.url,t=void 0===n?"":n;if(!t)throw"url is mandatory";k&&_.openShareIntent(t),m&&v.postMessage({action:"share",url:t})},U={isAndroidApp:k,isIosApp:m,hideSplashScreen:M,statusBar:E,deviceInfo:C,showInAppReview:F,shareLink:W,platform:S,isNativeApp:N},L=function(){return new Promise((function(e,n){b((function(t){t.isSuccess?e(t.playerId):n(t)}),{key:"getPlayerId"}),"ANDROID_APP"===S?_.getOneSignalId():"IOS_APP"===S?v.postMessage({action:"getPlayerId"}):n("This function will work in Native App Powered By WebToNative")}))},B=function(e){if(!e)throw"userId is required";if("ANDROID_APP"===S)return N&&_.setExternalUserId(e);"IOS_APP"===S&&v.postMessage({action:"setExternalUserId",userId:e})},x=function(){if("ANDROID_APP"===S)return N&&_.removeExternalUserId();"IOS_APP"===S&&v.postMessage({action:"removeExternalUserId"})},J=function(e){var n=e.tags;if(n){if("ANDROID_APP"===S)return N&&_.setUserTags(JSON.stringify(n));"IOS_APP"===S&&v.postMessage({action:"setUserTags",tags:n})}},V=void 0,H=null,q={UNKNOWN:-1,ALL_FORMATS:0,CODE_128:1,CODE_39:2,CODE_93:4,CODABAR:8,DATA_MATRIX:16,EAN_13:32,EAN_8:64,ITF:128,QR_CODE:256,UPC_A:512,UPC_E:1024,PDF417:2048,AZTEC:4096},j={UNKNOWN:0,CONTACT_INFO:1,EMAIL:2,ISBN:3,PHONE:4,PRODUCT:5,SMS:6,TEXT:7,URL:8,WIFI:9,GEO:10,CALENDAR_EVENT:11,DRIVER_LICENSE:12},G=function(e){if(["ANDROID_APP","IOS_APP"].includes(S)){var n=e.onBarcodeSearch,t=e.format;b((function(e){var t=e.type,o=e.value;"BARCODE_SCAN"===t&&n&&n(o)})),"ANDROID_APP"===S&&_.startScanner(JSON.stringify({formats:t?[t]:[]})),"IOS_APP"===S&&v.postMessage({action:"barcodeScan",barcodeFormat:String(t||q.ALL_FORMATS)})}},K=void 0,X=null,z=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return N&&_.showBannerAd(JSON.stringify(e)),K},Q=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if("ANDROID_APP"==S){var n=e.fullScreenAdCallback;return R((function(e){var n=e.status;X&&X(e),"adDismissed"===n&&(X=null),["adDismissed","adLoadError","adError"].indexOf(n)>-1&&h()})),N&&_.showFullScreenAd(JSON.stringify(e)),"function"==typeof n&&(X=n),K}},Z=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if("ANDROID_APP"==S){var n=e.rewardsAdCallback;return R((function(e){var n=e.status;X&&X(e),"adDismissed"===n&&(X=null),["adDismissed","adLoadError","adError"].indexOf(n)>-1&&h()})),N&&_.showRewardsAd(JSON.stringify(e)),"function"==typeof n&&(X=n),K}},Y={facebook:{login:function(e){if(["ANDROID_APP","IOS_APP"].includes(S)){var n=e.callback,t=e.scope;b((function(e){"fbLoginToken"===e.type&&n&&n(e)})),"ANDROID_APP"===S&&_.loginWithFacebook(),"IOS_APP"===S&&v.postMessage({action:"fbSignIn",scope:t})}},logout:function(e){if(["ANDROID_APP","IOS_APP"].includes(S)){var n=e.callback,t=e.scope;b((function(e){"fbLogOut"===e.type&&n&&n(e)})),"ANDROID_APP"===S&&_.logoutWithFacebook(),"IOS_APP"===S&&v.postMessage({action:"fbSignOut",scope:t})}}},google:{login:function(e){if(["ANDROID_APP","IOS_APP"].includes(S)){var n=e.callback,t=e.scope;b((function(e){"googleLoginToken"===e.type&&n&&n(e)})),"ANDROID_APP"===S&&_.signInWithGoogle(),"IOS_APP"===S&&v.postMessage({action:"googleSignIn",scope:t})}},logout:function(e){if(["ANDROID_APP","IOS_APP"].includes(S)){var n=e.callback,t=e.scope;b((function(e){"googleLogOut"===e.type&&n&&n(e)})),"ANDROID_APP"===S&&_.signOutWithGoogle(),"IOS_APP"===S&&v.postMessage({action:"googleSignOut",scope:t})}}},apple:{login:function(e){if(["ANDROID_APP","IOS_APP"].includes(S)){var n=e.callback,t=e.scope;b((function(e){"appleLoginToken"===e.type&&n&&n(e)})),"IOS_APP"===S&&v.postMessage({action:"appleSignIn",scope:t})}}}},$=function(e){["ANDROID_APP","IOS_APP"].includes(S)&&("ANDROID_APP"===S&&_.setAppsFlyerUserId(e),"IOS_APP"===S&&v.postMessage({action:"setAppsFlyerUserId",userId:e}))},ee=function(e,n){["ANDROID_APP","IOS_APP"].includes(S)&&("ANDROID_APP"===S&&_.addEventToAppsFlyer(e,n),"IOS_APP"===S&&v.postMessage({action:"addEventToAppsFlyer",eventName:e,eventValues:n}))},ne=function(e){if(["ANDROID_APP","IOS_APP"].includes(S)){var n=e.event,t=e.valueToSum,o=e.parameters;"ANDROID_APP"===S&&_.addFbEvents(n,o),"IOS_APP"===S&&v.postMessage({action:"sendFBEvent",eventName:n,valueToSum:t,parameters:o})}},te=function(e){if(["ANDROID_APP","IOS_APP"].includes(S)){var n=e.amount,t=e.currency,o=e.parameters;"ANDROID_APP"===S&&_.addFbPurchaseEvent(n,t,o),"IOS_APP"===S&&v.postMessage({action:"sendFBPurchaseEvent",currency:t,amount:n,parameters:o})}},oe=function(){["ANDROID_APP","IOS_APP"].includes(S)&&"IOS_APP"===S&&v.postMessage({action:"showHideStickyFooter",show:!1})},ie=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.key;["ANDROID_APP","IOS_APP"].includes(S)&&"IOS_APP"===S&&v.postMessage({action:"showHideStickyFooter",show:!0,key:n})},re=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.callback;["ANDROID_APP","IOS_APP"].includes(S)&&(b((function(e){console.log(e),"contactPermissionStatus"===e.type&&n&&n(e)})),"IOS_APP"===S&&v.postMessage({action:"askUserForContactPermission"}))},ae=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.callback;["ANDROID_APP","IOS_APP"].includes(S)&&(b((function(e){var t=e.type;console.log(e),"contactDetails"===t&&n&&n(e)})),"IOS_APP"===S&&v.postMessage({action:"getUserContactDetails"}))},se=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(["ANDROID_APP","IOS_APP"].includes(S)){var n=e.data,t=e.callback,o=e.backgroundIndicator,i=void 0!==o&&o,r=e.pauseAutomatically,a=void 0===r||r,s=e.distanceFilter,c=void 0===s?0:s,u=e.desiredAccuracy,P=void 0===u?"best":u,A=e.activityType,d=void 0===A?"other":A,l=e.apiUrl,f=e.timeout;b((function(e){"LOCATION_UPDATE"===e.type&&t&&t(e)}),{key:"LOCATION_UPDATE",ignoreDelete:!0}),"IOS_APP"===S&&v.postMessage({action:"startLocation",data:n,backgroundIndicator:i,pauseAutomatically:a,distanceFilter:c,desiredAccuracy:P,activityType:d,apiUrl:l,timeout:f}),"ANDROID_APP"===S&&_.startTrackingLocation(JSON.stringify({action:"startLocation",data:n,interval:f,callback:t,apiUrl:l,displacement:c}))}},ce=function(){["ANDROID_APP","IOS_APP"].includes(S)&&(delete w["LOCATION_UPDATE"],"IOS_APP"===S&&v.postMessage({action:"stopLocation"}),"ANDROID_APP"===S&&_.stopTrackingLocation())},ue=function(){["ANDROID_APP","IOS_APP"].includes(S)&&("IOS_APP"===S&&v.postMessage({action:"keepScreenOn",flag:!0}),"ANDROID_APP"===S&&_.keepScreenOn())},Pe=function(){["ANDROID_APP","IOS_APP"].includes(S)&&("IOS_APP"===S&&v.postMessage({action:"keepScreenOn",flag:!1}),"ANDROID_APP"===S&&_.keepScreenNormal())},Ae=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.callback;["ANDROID_APP","IOS_APP"].includes(S)&&(b((function(e){"CLIPBOARD_CONTENT"===e.type&&n&&n(e)})),"IOS_APP"===S&&v.postMessage({action:"getClipBoardData"}),"ANDROID_APP"===S&&_.getText())},de=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};["ANDROID_APP","IOS_APP"].includes(S)&&("IOS_APP"===S&&v.postMessage({action:"setClipBoardData",text:e.data||""}),"ANDROID_APP"===S&&_.setText(e.data||""))},le=function(){["ANDROID_APP","IOS_APP"].includes(S)&&"IOS_APP"===S&&v.postMessage({action:"showAppRating"})},fe=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.callback;["IOS_APP"].includes(S)&&(b((function(e){"requestTrackingConsent"===e.type&&n&&n(e)})),"IOS_APP"===S&&v.postMessage({action:"requestTrackingAuthorization"}))},Ie=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.callback;["IOS_APP"].includes(S)&&(b((function(e){"trackingConsentStatus"===e.type&&n&&n(e)})),"IOS_APP"===S&&v.postMessage({action:"trackingConsentStatus"}))},pe=function(e){if(["ANDROID_APP","IOS_APP"].includes(S)){var n=e.enabled;"IOS_APP"===S&&v.postMessage({action:"setFirebaseAnalyticsCollection",enabled:n}),"ANDROID_APP"===S&&_.setFirebaseAnalyticsCollection(n)}},Oe=function(e){if(["ANDROID_APP","IOS_APP"].includes(S)){var n=e.userId;"IOS_APP"===S&&v.postMessage({action:"setFirebaseUserId",userId:n}),"ANDROID_APP"===S&&_.setFirebaseUserId(n)}},ge=function(e){if(["ANDROID_APP","IOS_APP"].includes(S)){var n=e.key,t=e.value;"IOS_APP"===S&&v.postMessage({action:"setFirebaseUserProp",key:n,value:t}),"ANDROID_APP"===S&&_.setFirebaseUserProp(n,t)}},De=function(e){if(["ANDROID_APP","IOS_APP"].includes(S)){var n=e.parameters;"IOS_APP"===S&&v.postMessage({action:"setFirebaseDefaultParam",parameters:n}),"ANDROID_APP"===S&&_.setFirebaseDefaultParam(n)}},_e=function(e){if(["ANDROID_APP","IOS_APP"].includes(S)){var n=e.eventName,t=e.parameters;"IOS_APP"===S&&v.postMessage({action:"logFirebaseEvent",eventName:n,parameters:t}),"ANDROID_APP"===S&&_.logFirebaseEvent(n,t)}},ve=function(e){if(["ANDROID_APP","IOS_APP"].includes(S)){var n=e.screenName,t=e.screenClass;"IOS_APP"===S&&v.postMessage({action:"logFirebaseScreenView",screenName:n,screenClass:t}),"ANDROID_APP"===S&&_.logFirebaseScreenView(n,t)}},Se=function(e){if(["ANDROID_APP","IOS_APP"].includes(S)){var n=e.toTopic;"IOS_APP"===S&&v.postMessage({action:"firebaseSubscribeToTopic",topic:n})}},Ne=function(e){if(["ANDROID_APP","IOS_APP"].includes(S)){var n=e.fromTopic;"IOS_APP"===S&&v.postMessage({action:"firebaseUnsubscribeFromTopic",topic:n})}},we=function(e){if(["ANDROID_APP","IOS_APP"].includes(S)){var n=e.callback;b((function(e){"getFCMToken"===e.type&&n&&n(e)})),"IOS_APP"===S&&v.postMessage({action:"getFCMToken"})}},Te=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};["ANDROID_APP","IOS_APP"].includes(S)&&"IOS_APP"===S&&v.postMessage({action:"haptikEffect",effect:e.effect})};window.WTN=n,window.WTN.OneSignal=t,window.WTN.VoiceSearch=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.onVoiceSearch;return b((function(e){var n=e.type,t=e.results;"VOICE_SEARCH_RESULT"===n&&(H&&H(t),H=null)})),N&&_.openVoiceSearch(),"function"==typeof n&&(H=n),V},window.WTN.Barcode=o,window.WTN.AdMob=i,window.WTN.socialLogin=Y,window.WTN.inAppPurchase=function(e){if(["ANDROID_APP","IOS_APP"].includes(S)){var n=e.callback,t=e.productId,o=e.productType,i=e.isConsumable,r=void 0!==i&&i;b((function(e){"inAppPurchase"===e.type&&n&&n(e)})),"IOS_APP"===S&&v.postMessage({action:"inAppPurchase",productId:t}),"ANDROID_APP"===S&&_.inAppPurchase(JSON.stringify({action:"inAppPurchase",productId:t,productType:o,isConsumable:r}))}},window.WTN.getAllPurchases=function(e){if(["ANDROID_APP"].includes(S)){var n=e.callback;b((function(e){"purchaseList"===e.type&&n&&n(e)})),"ANDROID_APP"===S&&_.getAllPurchases({action:"purchaseList"})}},window.WTN.appsflyer=r,window.WTN.bottomNavigation=s,window.WTN.contacts=c,window.WTN.screen=P,window.WTN.backgroundLocation=u,window.WTN.clipboard=A,window.WTN.appReview=d,window.WTN.ATTConsent=l,window.WTN.facebook={events:a},window.WTN.firebaseAnalytics=I,window.WTN.haptics=g,window.WTN.Firebase=O,window&&window.WebToNativeInterface&&window.WebToNativeInterface.getAndroidVersion?window.navigator.share=function(e){return new Promise((function(n,t){window.WebToNativeInterface.openShareIntent(e.url),n()}))}:WTN.isIosApp&&(window.navigator.share=function(e){return new Promise((function(n,t){v.postMessage({action:"share",url:e.url}),n()}))})}();
1
+ !function(){"use strict";var e={d:function(n,t){for(var o in t)e.o(t,o)&&!e.o(n,o)&&Object.defineProperty(n,o,{enumerable:!0,get:t[o]})},o:function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},r:function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},n={};e.r(n),e.d(n,{default:function(){return U},deviceInfo:function(){return C},hideSplashScreen:function(){return M},isAndroidApp:function(){return k},isIosApp:function(){return m},isNativeApp:function(){return N},platform:function(){return v},shareLink:function(){return W},showInAppReview:function(){return F},statusBar:function(){return E}});var t={};e.r(t),e.d(t,{getPlayerId:function(){return L},removeExternalUserId:function(){return x},setExternalUserId:function(){return B},setTags:function(){return J}});var o={};e.r(o),e.d(o,{BarcodeScan:function(){return G},Format:function(){return q},Types:function(){return j}});var i={};e.r(i),e.d(i,{bannerAd:function(){return z},fullScreenAd:function(){return Q},rewardsAd:function(){return Z}});var r={};e.r(r),e.d(r,{logEvent:function(){return ee},setCustomerUserId:function(){return $}});var a={};e.r(a),e.d(a,{send:function(){return ne},sendPurchase:function(){return te}});var s={};e.r(s),e.d(s,{hide:function(){return oe},show:function(){return ie}});var c={};e.r(c),e.d(c,{getAll:function(){return ae},getPermissionStatus:function(){return re}});var u={};e.r(u),e.d(u,{start:function(){return se},stop:function(){return ce}});var P={};e.r(P),e.d(P,{keepScreenNormal:function(){return Pe},keepScreenOn:function(){return ue}});var A={};e.r(A),e.d(A,{get:function(){return Ae},set:function(){return de}});var d={};e.r(d),e.d(d,{prompt:function(){return le}});var l={};e.r(l),e.d(l,{request:function(){return fe},status:function(){return Ie}});var f={};e.r(f),e.d(f,{logEvent:function(){return ge},logScreen:function(){return Se},setCollection:function(){return pe},setDefaultEventParameters:function(){return De},setUserId:function(){return Oe},setUserProperty:function(){return _e}});var I={};e.r(I),e.d(I,{events:function(){return f}});var p={};e.r(p),e.d(p,{getFCMToken:function(){return we},subscribe:function(){return ve},unsubscribe:function(){return Ne}});var O={};e.r(O),e.d(O,{Analytics:function(){return f},Messaging:function(){return p}});var _={};e.r(_),e.d(_,{trigger:function(){return Re}});var D="undefined"!=typeof window,g=D&&window.WebToNativeInterface||{},S=D&&window.webkit&&window.webkit.messageHandlers&&window.webkit.messageHandlers.webToNativeInterface,v=g.getAndroidVersion?"ANDROID_APP":S?"IOS_APP":"WEBSITE",N=D&&"WEBSITE"!==v,w={},R=1,T=null;N&&(g.androidCBHook=function(e){var n=e;try{n=JSON.parse(e)}catch(e){console.log(e)}for(var t in n.type,w){var o=w[t],i=o.cb,r=o.ignoreDelete,a=void 0!==r&&r;n&&n.reqType?t==n.reqType&&(i(n),a||delete w[t]):(i(n),a||delete w[t])}},window.iOSAdMobCBHook=g.androidAdMobCBHook=function(e){var n=JSON.parse(e);T&&T(n)},window.iosCBHook=function(e){var n=e;try{n=JSON.parse(e)}catch(e){console.log(e)}for(var t in w){var o=w[t],i=o.cb,r=o.ignoreDelete,a=void 0!==r&&r;n&&n.reqType?t==n.reqType&&(i(n),a||delete w[t]):(i(n),a||delete w[t])}});var b=function(e,n){"function"==typeof e&&(n&&n.key?w[n.key]={cb:e,ignoreDelete:!!n.ignoreDelete}:(w[R]={cb:e,ignoreDelete:!(!n||!n.ignoreDelete)},R+=1))},y=function(e){"function"==typeof e&&(T=e)},h=function(){T&&(T=null)},k="ANDROID_APP"===v,m="IOS_APP"===v,M=function(){N&&g.hideSplashScreen()},E=function(e){N&&(k?g.statusBar(JSON.stringify(e)):m&&S.postMessage({action:"statusBar",color:e.color,style:e.style}))},C=function(){return new Promise((function(e,n){b((function(t){t?e(t):n({err:"Error getting device info"})}),{key:"deviceInfo"}),"ANDROID_APP"===v?g.getDeviceInfo():"IOS_APP"===v?S.postMessage({action:"deviceInfo"}):n("This function will work in Native App Powered By WebToNative")}))},F=function(){N&&g.showInAppReview()},W=function(e){var n=e.url,t=void 0===n?"":n;if(!t)throw"url is mandatory";k&&g.openShareIntent(t),m&&S.postMessage({action:"share",url:t})},U={isAndroidApp:k,isIosApp:m,hideSplashScreen:M,statusBar:E,deviceInfo:C,showInAppReview:F,shareLink:W,platform:v,isNativeApp:N},L=function(){return new Promise((function(e,n){b((function(t){t.isSuccess?e(t.playerId):n(t)}),{key:"getPlayerId"}),"ANDROID_APP"===v?g.getOneSignalId():"IOS_APP"===v?S.postMessage({action:"getPlayerId"}):n("This function will work in Native App Powered By WebToNative")}))},B=function(e){if(!e)throw"userId is required";if("ANDROID_APP"===v)return N&&g.setExternalUserId(e);"IOS_APP"===v&&S.postMessage({action:"setExternalUserId",userId:e})},x=function(){if("ANDROID_APP"===v)return N&&g.removeExternalUserId();"IOS_APP"===v&&S.postMessage({action:"removeExternalUserId"})},J=function(e){var n=e.tags;if(n){if("ANDROID_APP"===v)return N&&g.setUserTags(JSON.stringify(n));"IOS_APP"===v&&S.postMessage({action:"setUserTags",tags:n})}},V=void 0,H=null,q={UNKNOWN:-1,ALL_FORMATS:0,CODE_128:1,CODE_39:2,CODE_93:4,CODABAR:8,DATA_MATRIX:16,EAN_13:32,EAN_8:64,ITF:128,QR_CODE:256,UPC_A:512,UPC_E:1024,PDF417:2048,AZTEC:4096},j={UNKNOWN:0,CONTACT_INFO:1,EMAIL:2,ISBN:3,PHONE:4,PRODUCT:5,SMS:6,TEXT:7,URL:8,WIFI:9,GEO:10,CALENDAR_EVENT:11,DRIVER_LICENSE:12},G=function(e){if(["ANDROID_APP","IOS_APP"].includes(v)){var n=e.onBarcodeSearch,t=e.format;b((function(e){var t=e.type,o=e.value;"BARCODE_SCAN"===t&&n&&n(o)})),"ANDROID_APP"===v&&g.startScanner(JSON.stringify({formats:t?[t]:[]})),"IOS_APP"===v&&S.postMessage({action:"barcodeScan",barcodeFormat:String(t||q.ALL_FORMATS)})}},K=void 0,X=null,z=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(["ANDROID_APP","IOS_APP"].includes(v))return"IOS_APP"===v&&S.postMessage({action:"showBannerAd",adId:e.adId||""}),"ANDROID_APP"===v&&g.showBannerAd(JSON.stringify(e)),K},Q=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(["ANDROID_APP","IOS_APP"].includes(v)){var n=e.fullScreenAdCallback;return y((function(e){var n=e.status;X&&X(e),"adDismissed"===n&&(X=null),["adDismissed","adLoadError","adError"].indexOf(n)>-1&&h()})),"IOS_APP"===v&&S.postMessage({action:"showFullScreenAd",adId:e.adId||""}),"ANDROID_APP"===v&&g.showFullScreenAd(JSON.stringify(e)),"function"==typeof n&&(X=n),K}},Z=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(["ANDROID_APP","IOS_APP"].includes(v)){var n=e.rewardsAdCallback;return y((function(e){var n=e.status;X&&X(e),"adDismissed"===n&&(X=null),["adDismissed","adLoadError","adError"].indexOf(n)>-1&&h()})),"IOS_APP"===v&&S.postMessage({action:"showRewardAd",adId:e.adId||""}),"ANDROID_APP"===v&&g.showRewardsAd(JSON.stringify(e)),"function"==typeof n&&(X=n),K}},Y={facebook:{login:function(e){if(["ANDROID_APP","IOS_APP"].includes(v)){var n=e.callback,t=e.scope;b((function(e){"fbLoginToken"===e.type&&n&&n(e)})),"ANDROID_APP"===v&&g.loginWithFacebook(),"IOS_APP"===v&&S.postMessage({action:"fbSignIn",scope:t})}},logout:function(e){if(["ANDROID_APP","IOS_APP"].includes(v)){var n=e.callback,t=e.scope;b((function(e){"fbLogOut"===e.type&&n&&n(e)})),"ANDROID_APP"===v&&g.logoutWithFacebook(),"IOS_APP"===v&&S.postMessage({action:"fbSignOut",scope:t})}}},google:{login:function(e){if(["ANDROID_APP","IOS_APP"].includes(v)){var n=e.callback,t=e.scope;b((function(e){"googleLoginToken"===e.type&&n&&n(e)})),"ANDROID_APP"===v&&g.signInWithGoogle(),"IOS_APP"===v&&S.postMessage({action:"googleSignIn",scope:t})}},logout:function(e){if(["ANDROID_APP","IOS_APP"].includes(v)){var n=e.callback,t=e.scope;b((function(e){"googleLogOut"===e.type&&n&&n(e)})),"ANDROID_APP"===v&&g.signOutWithGoogle(),"IOS_APP"===v&&S.postMessage({action:"googleSignOut",scope:t})}}},apple:{login:function(e){if(["ANDROID_APP","IOS_APP"].includes(v)){var n=e.callback,t=e.scope;b((function(e){"appleLoginToken"===e.type&&n&&n(e)})),"IOS_APP"===v&&S.postMessage({action:"appleSignIn",scope:t})}}}},$=function(e){["ANDROID_APP","IOS_APP"].includes(v)&&("ANDROID_APP"===v&&g.setAppsFlyerUserId(e),"IOS_APP"===v&&S.postMessage({action:"setAppsFlyerUserId",userId:e}))},ee=function(e,n){["ANDROID_APP","IOS_APP"].includes(v)&&("ANDROID_APP"===v&&g.addEventToAppsFlyer(e,n),"IOS_APP"===v&&S.postMessage({action:"addEventToAppsFlyer",eventName:e,eventValues:n}))},ne=function(e){if(["ANDROID_APP","IOS_APP"].includes(v)){var n=e.event,t=e.valueToSum,o=e.parameters;"ANDROID_APP"===v&&g.addFbEvents(n,o),"IOS_APP"===v&&S.postMessage({action:"sendFBEvent",eventName:n,valueToSum:t,parameters:o})}},te=function(e){if(["ANDROID_APP","IOS_APP"].includes(v)){var n=e.amount,t=e.currency,o=e.parameters;"ANDROID_APP"===v&&g.addFbPurchaseEvent(n,t,o),"IOS_APP"===v&&S.postMessage({action:"sendFBPurchaseEvent",currency:t,amount:n,parameters:o})}},oe=function(){["ANDROID_APP","IOS_APP"].includes(v)&&"IOS_APP"===v&&S.postMessage({action:"showHideStickyFooter",show:!1})},ie=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.key;["ANDROID_APP","IOS_APP"].includes(v)&&"IOS_APP"===v&&S.postMessage({action:"showHideStickyFooter",show:!0,key:n})},re=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.callback;["ANDROID_APP","IOS_APP"].includes(v)&&(b((function(e){console.log(e),"contactPermissionStatus"===e.type&&n&&n(e)})),"IOS_APP"===v&&S.postMessage({action:"askUserForContactPermission"}))},ae=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.callback;["ANDROID_APP","IOS_APP"].includes(v)&&(b((function(e){var t=e.type;console.log(e),"contactDetails"===t&&n&&n(e)})),"IOS_APP"===v&&S.postMessage({action:"getUserContactDetails"}))},se=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(["ANDROID_APP","IOS_APP"].includes(v)){var n=e.data,t=e.callback,o=e.backgroundIndicator,i=void 0!==o&&o,r=e.pauseAutomatically,a=void 0===r||r,s=e.distanceFilter,c=void 0===s?0:s,u=e.desiredAccuracy,P=void 0===u?"best":u,A=e.activityType,d=void 0===A?"other":A,l=e.apiUrl,f=e.timeout;b((function(e){"LOCATION_UPDATE"===e.type&&t&&t(e)}),{key:"LOCATION_UPDATE",ignoreDelete:!0}),"IOS_APP"===v&&S.postMessage({action:"startLocation",data:n,backgroundIndicator:i,pauseAutomatically:a,distanceFilter:c,desiredAccuracy:P,activityType:d,apiUrl:l,timeout:f}),"ANDROID_APP"===v&&g.startTrackingLocation(JSON.stringify({action:"startLocation",data:n,interval:f,callback:t,apiUrl:l,displacement:c}))}},ce=function(){["ANDROID_APP","IOS_APP"].includes(v)&&(delete w["LOCATION_UPDATE"],"IOS_APP"===v&&S.postMessage({action:"stopLocation"}),"ANDROID_APP"===v&&g.stopTrackingLocation())},ue=function(){["ANDROID_APP","IOS_APP"].includes(v)&&("IOS_APP"===v&&S.postMessage({action:"keepScreenOn",flag:!0}),"ANDROID_APP"===v&&g.keepScreenOn())},Pe=function(){["ANDROID_APP","IOS_APP"].includes(v)&&("IOS_APP"===v&&S.postMessage({action:"keepScreenOn",flag:!1}),"ANDROID_APP"===v&&g.keepScreenNormal())},Ae=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.callback;["ANDROID_APP","IOS_APP"].includes(v)&&(b((function(e){"CLIPBOARD_CONTENT"===e.type&&n&&n(e)})),"IOS_APP"===v&&S.postMessage({action:"getClipBoardData"}),"ANDROID_APP"===v&&g.getText())},de=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};["ANDROID_APP","IOS_APP"].includes(v)&&("IOS_APP"===v&&S.postMessage({action:"setClipBoardData",text:e.data||""}),"ANDROID_APP"===v&&g.setText(e.data||""))},le=function(){["ANDROID_APP","IOS_APP"].includes(v)&&"IOS_APP"===v&&S.postMessage({action:"showAppRating"})},fe=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.callback;["IOS_APP"].includes(v)&&(b((function(e){"requestTrackingConsent"===e.type&&n&&n(e)})),"IOS_APP"===v&&S.postMessage({action:"requestTrackingAuthorization"}))},Ie=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.callback;["IOS_APP"].includes(v)&&(b((function(e){"trackingConsentStatus"===e.type&&n&&n(e)})),"IOS_APP"===v&&S.postMessage({action:"trackingConsentStatus"}))},pe=function(e){if(["ANDROID_APP","IOS_APP"].includes(v)){var n=e.enabled;"IOS_APP"===v&&S.postMessage({action:"setFirebaseAnalyticsCollection",enabled:n}),"ANDROID_APP"===v&&g.setFirebaseAnalyticsCollection(n)}},Oe=function(e){if(["ANDROID_APP","IOS_APP"].includes(v)){var n=e.userId;"IOS_APP"===v&&S.postMessage({action:"setFirebaseUserId",userId:n}),"ANDROID_APP"===v&&g.setFirebaseUserId(n)}},_e=function(e){if(["ANDROID_APP","IOS_APP"].includes(v)){var n=e.key,t=e.value;"IOS_APP"===v&&S.postMessage({action:"setFirebaseUserProp",key:n,value:t}),"ANDROID_APP"===v&&g.setFirebaseUserProp(n,t)}},De=function(e){if(["ANDROID_APP","IOS_APP"].includes(v)){var n=e.parameters;"IOS_APP"===v&&S.postMessage({action:"setFirebaseDefaultParam",parameters:n}),"ANDROID_APP"===v&&g.setFirebaseDefaultParam(n)}},ge=function(e){if(["ANDROID_APP","IOS_APP"].includes(v)){var n=e.eventName,t=e.parameters;"IOS_APP"===v&&S.postMessage({action:"logFirebaseEvent",eventName:n,parameters:t}),"ANDROID_APP"===v&&g.logFirebaseEvent(n,t)}},Se=function(e){if(["ANDROID_APP","IOS_APP"].includes(v)){var n=e.screenName,t=e.screenClass;"IOS_APP"===v&&S.postMessage({action:"logFirebaseScreenView",screenName:n,screenClass:t}),"ANDROID_APP"===v&&g.logFirebaseScreenView(n,t)}},ve=function(e){if(["ANDROID_APP","IOS_APP"].includes(v)){var n=e.toTopic;"IOS_APP"===v&&S.postMessage({action:"firebaseSubscribeToTopic",topic:n})}},Ne=function(e){if(["ANDROID_APP","IOS_APP"].includes(v)){var n=e.fromTopic;"IOS_APP"===v&&S.postMessage({action:"firebaseUnsubscribeFromTopic",topic:n})}},we=function(e){if(["ANDROID_APP","IOS_APP"].includes(v)){var n=e.callback;b((function(e){"getFCMToken"===e.type&&n&&n(e)})),"IOS_APP"===v&&S.postMessage({action:"getFCMToken"})}},Re=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};["ANDROID_APP","IOS_APP"].includes(v)&&"IOS_APP"===v&&S.postMessage({action:"haptikEffect",effect:e.effect})};window.WTN=n,window.WTN.OneSignal=t,window.WTN.VoiceSearch=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.onVoiceSearch;return b((function(e){var n=e.type,t=e.results;"VOICE_SEARCH_RESULT"===n&&(H&&H(t),H=null)})),N&&g.openVoiceSearch(),"function"==typeof n&&(H=n),V},window.WTN.Barcode=o,window.WTN.AdMob=i,window.WTN.socialLogin=Y,window.WTN.inAppPurchase=function(e){if(["ANDROID_APP","IOS_APP"].includes(v)){var n=e.callback,t=e.productId,o=e.productType,i=e.isConsumable,r=void 0!==i&&i;b((function(e){"inAppPurchase"===e.type&&n&&n(e)})),"IOS_APP"===v&&S.postMessage({action:"inAppPurchase",productId:t}),"ANDROID_APP"===v&&g.inAppPurchase(JSON.stringify({action:"inAppPurchase",productId:t,productType:o,isConsumable:r}))}},window.WTN.getAllPurchases=function(e){if(["ANDROID_APP"].includes(v)){var n=e.callback;b((function(e){"purchaseList"===e.type&&n&&n(e)})),"ANDROID_APP"===v&&g.getAllPurchases({action:"purchaseList"})}},window.WTN.appsflyer=r,window.WTN.bottomNavigation=s,window.WTN.contacts=c,window.WTN.screen=P,window.WTN.backgroundLocation=u,window.WTN.clipboard=A,window.WTN.appReview=d,window.WTN.ATTConsent=l,window.WTN.facebook={events:a},window.WTN.firebaseAnalytics=I,window.WTN.haptics=_,window.WTN.Firebase=O,window&&window.WebToNativeInterface&&window.WebToNativeInterface.getAndroidVersion?window.navigator.share=function(e){return new Promise((function(n,t){window.WebToNativeInterface.openShareIntent(e.url),n()}))}:WTN.isIosApp&&(window.navigator.share=function(e){return new Promise((function(n,t){S.postMessage({action:"share",url:e.url}),n()}))})}();