webtonative 1.0.56 → 1.0.57

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 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.setPrintSize=void 0;var _utills=require("../utills"),setPrintSize=function(a){if(["ANDROID_APP"].includes(_utills.platform)){var b=a.printSize,c=void 0===b?"ISO_A4":b,d=a.label,e=void 0===d?"":d;"ANDROID_APP"===_utills.platform&&_utills.webToNative.setPrintSize(JSON.stringify({printSize:c,label:e}))}};exports.setPrintSize=setPrintSize;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "webtonative",
3
- "version": "1.0.56",
3
+ "version": "1.0.57",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -1 +1 @@
1
- !function(){"use strict";var e={d:function(n,t){for(var i in t)e.o(t,i)&&!e.o(n,i)&&Object.defineProperty(n,i,{enumerable:!0,get:t[i]})},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,{addToSiri:function(){return Q},clearAppCache:function(){return q},closeApp:function(){return K},default:function(){return Z},deviceInfo:function(){return W},downloadBlobFile:function(){return U},downloadFile:function(){return B},enablePullToRefresh:function(){return x},hideSplashScreen:function(){return F},isAndroidApp:function(){return M},isDeviceGPSEnabled:function(){return J},isIosApp:function(){return E},isNativeApp:function(){return R},loadOfferCard:function(){return z},openUrlInBrowser:function(){return H},platform:function(){return w},printFunction:function(){return X},shareFile:function(){return G},shareLink:function(){return V},showDateTimePicker:function(){return j},showInAppReview:function(){return L},statusBar:function(){return C}});var t={};e.r(t),e.d(t,{addTrigger:function(){return te},addTriggers:function(){return ie},getPlayerId:function(){return Y},getTriggerValue:function(){return ae},getTriggers:function(){return se},logoutEmail:function(){return Pe},logoutSMSNumber:function(){return Ae},removeExternalUserId:function(){return ee},removeTrigger:function(){return oe},removeTriggers:function(){return re},setEmail:function(){return ce},setExternalUserId:function(){return $},setSMSNumber:function(){return ue},setTags:function(){return ne}});var i={};e.r(i),e.d(i,{BarcodeScan:function(){return Oe},Format:function(){return fe},Types:function(){return Ie}});var o={};e.r(o),e.d(o,{bannerAd:function(){return pe},fullScreenAd:function(){return _e},rewardsAd:function(){return Se}});var r={};e.r(r),e.d(r,{logEvent:function(){return we},setCustomerUserId:function(){return Ne}});var a={};e.r(a),e.d(a,{send:function(){return Re},sendPurchase:function(){return ye}});var s={};e.r(s),e.d(s,{hide:function(){return Te},show:function(){return he}});var c={};e.r(c),e.d(c,{getAll:function(){return me},getPermissionStatus:function(){return be}});var u={};e.r(u),e.d(u,{start:function(){return ke},stop:function(){return Me}});var P={};e.r(P),e.d(P,{keepScreenNormal:function(){return Fe},keepScreenOn:function(){return Ee}});var A={};e.r(A),e.d(A,{get:function(){return Ce},set:function(){return Be}});var l={};e.r(l),e.d(l,{prompt:function(){return Ue}});var d={};e.r(d),e.d(d,{checkStatus:function(){return We},deleteSecret:function(){return Je},saveSecret:function(){return Le},show:function(){return Ve}});var f={};e.r(f),e.d(f,{request:function(){return He},status:function(){return xe}});var I={};e.r(I),e.d(I,{logEvent:function(){return Xe},logScreen:function(){return ze},setCollection:function(){return qe},setDefaultEventParameters:function(){return je},setUserId:function(){return Ge},setUserProperty:function(){return Ke}});var O={};e.r(O),e.d(O,{events:function(){return I}});var g={};e.r(g),e.d(g,{getFCMToken:function(){return Ye},subscribe:function(){return Qe},unsubscribe:function(){return Ze}});var D={};e.r(D),e.d(D,{Analytics:function(){return I},Messaging:function(){return g}});var p={};e.r(p),e.d(p,{trigger:function(){return $e}});var _={};e.r(_),e.d(_,{pauseMedia:function(){return nn},playMedia:function(){return en},stopMedia:function(){return tn}});var S="undefined"!=typeof window,v=S&&window.WebToNativeInterface||{},N=S&&window.webkit&&window.webkit.messageHandlers&&window.webkit.messageHandlers.webToNativeInterface,w=v.getAndroidVersion?"ANDROID_APP":N?"IOS_APP":"WEBSITE",R=S&&"WEBSITE"!==w,y={},T=1,h=null;R&&(v.androidCBHook=function(e){var n=e;try{n=JSON.parse(e)}catch(e){console.log(e)}for(var t in n.type,y){var i=y[t],o=i.cb,r=i.ignoreDelete,a=void 0!==r&&r;n&&n.reqType?t==n.reqType&&(o(n),a||delete y[t]):(o(n),a||delete y[t])}},window.iOSAdMobCBHook=v.androidAdMobCBHook=function(e){var n=JSON.parse(e);h&&h(n)},window.iosCBHook=function(e){var n=e;try{n=JSON.parse(e)}catch(e){console.log(e)}for(var t in y){var i=y[t],o=i.cb,r=i.ignoreDelete,a=void 0!==r&&r;n&&n.reqType?t==n.reqType&&(o(n),a||delete y[t]):(o(n),a||delete y[t])}});var b=function(e,n){"function"==typeof e&&(n&&n.key?y[n.key]={cb:e,ignoreDelete:!!n.ignoreDelete}:(y[T]={cb:e,ignoreDelete:!(!n||!n.ignoreDelete)},T+=1))},m=function(e){"function"==typeof e&&(h=e)},k=function(){h&&(h=null)},M="ANDROID_APP"===w,E="IOS_APP"===w,F=function(){R&&v.hideSplashScreen()},C=function(e){R&&(M?v.statusBar(JSON.stringify(e)):E&&N.postMessage({action:"statusBar",color:e.color,style:e.style}))},B=function(e){R&&(M||E&&N.postMessage({action:"downloadFile",downloadUrl:e}))},U=function(e){var n=e.fileName,t=e.downloadUrl;["IOS_APP"].includes(w)&&E&&N.postMessage({action:"downloadBlobFile",fileName:n,url:t})},W=function(){return new Promise((function(e,n){b((function(t){t?e(t):n({err:"Error getting device info"})}),{key:"deviceInfo"}),"ANDROID_APP"===w?v.getDeviceInfo():"IOS_APP"===w?N.postMessage({action:"deviceInfo"}):n("This function will work in Native App Powered By WebToNative")}))},L=function(){R&&v.showInAppReview()},J=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.callback;["ANDROID_APP","IOS_APP"].includes(w)&&(b((function(e){"isDeviceGPSEnabled"===e.type&&n&&n(e)})),"ANDROID_APP"===w&&v.isLocationServiceEnabled())},V=function(e){var n=e.url,t=void 0===n?"":n;if(!t)throw"url is mandatory";M&&v.openShareIntent(t),E&&N.postMessage({action:"share",url:t})},H=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";if(!e)throw"url is mandatory";M&&v.openUrlInBrowser(e)},x=function(e){M&&v.enableSwipeRefresh(e)},q=function(e){M&&v.clearWebViewCache(JSON.stringify({reload:e}))},G=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;M&&v.shareFile(e,n,t)},K=function(){M&&v.closeApp()},j=function(e){if(["ANDROID_APP"].includes(w)){var n=e.callback,t=e.showDate,i=e.showTime;b((function(e){"DATE_TIME_PICKER"===e.type&&n&&n(e)})),M&&v.pickDateTime(JSON.stringify({showDate:t,showTime:i}))}},X=function(e){if(["ANDROID_APP"].includes(w)){var n=e.type,t=void 0===n?"url":n,i=e.url,o=void 0===i?"":i;M&&v.print(JSON.stringify({type:t,url:o}))}},z=function(e){["ANDROID_APP","IOS_APP"].includes(w)&&(M&&v.showOfferCard(JSON.stringify(e)),e.data&&(e.data=JSON.stringify(e.data)),E&&N.postMessage(e))},Q=function(e){["IOS_APP"].includes(w)&&(e.data&&(e.data=JSON.stringify(e.data)),E&&N.postMessage(e))},Z={isAndroidApp:M,isIosApp:E,hideSplashScreen:F,statusBar:C,deviceInfo:W,showInAppReview:L,shareLink:V,platform:w,isNativeApp:R,isDeviceGPSEnabled:J,openUrlInBrowser:H,enablePullToRefresh:x,shareFile:G,clearAppCache:q,closeApp:K,showDateTimePicker:j,downloadBlobFile:U,printFunction:X,loadOfferCard:z,addToSiri:Q},Y=function(){return new Promise((function(e,n){b((function(t){t.isSuccess?e(t.playerId):n(t)}),{key:"getPlayerId"}),"ANDROID_APP"===w?v.getOneSignalId():"IOS_APP"===w?N.postMessage({action:"getPlayerId"}):n("This function will work in Native App Powered By WebToNative")}))},$=function(e){if(!e)throw"userId is required";if("ANDROID_APP"===w)return R&&v.setExternalUserId(e);"IOS_APP"===w&&N.postMessage({action:"setExternalUserId",userId:e})},ee=function(){if("ANDROID_APP"===w)return R&&v.removeExternalUserId();"IOS_APP"===w&&N.postMessage({action:"removeExternalUserId"})},ne=function(e){var n=e.tags;if(n){if("ANDROID_APP"===w)return R&&v.setUserTags(JSON.stringify(n));"IOS_APP"===w&&N.postMessage({action:"setUserTags",tags:n})}},te=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.key,t=e.value;"ANDROID_APP"===w?v.addTrigger(JSON.stringify({key:n,value:t})):"IOS_APP"===w&&N.postMessage({action:"addTrigger",key:n,value:t})},ie=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.triggers;"ANDROID_APP"===w?v.addTriggers(JSON.stringify({triggers:n})):"IOS_APP"===w&&N.postMessage({action:"addTriggers",triggers:n})},oe=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.key;"ANDROID_APP"===w?v.removeTriggerForKey(n):"IOS_APP"===w&&N.postMessage({action:"removeTrigger",key:n})},re=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.keys;"ANDROID_APP"===w?v.removeTriggersForKeys(JSON.stringify({keys:n})):"IOS_APP"===w&&N.postMessage({action:"removeTriggers",keys:n})},ae=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.key,t=e.callback;["ANDROID_APP","IOS_APP"].includes(w)&&(b((function(e){"getTriggerValue"===e.type&&t&&t(e)})),"ANDROID_APP"===w?v.getTriggerValueForKey(n):"IOS_APP"===w&&N.postMessage({action:"getTriggerValue",key:n}))},se=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.callback;["ANDROID_APP","IOS_APP"].includes(w)&&(b((function(e){"getTriggers"===e.type&&n&&n(e)})),"ANDROID_APP"===w?v.getTriggers():"IOS_APP"===w&&N.postMessage({action:"getTriggers"}))},ce=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.emailId;["ANDROID_APP","IOS_APP"].includes(w)&&"ANDROID_APP"===w&&v.setEmail(n)},ue=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.smsNumber;["ANDROID_APP","IOS_APP"].includes(w)&&"ANDROID_APP"===w&&v.setSMSNumber(n)},Pe=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.emailId;["ANDROID_APP","IOS_APP"].includes(w)&&"ANDROID_APP"===w&&v.logoutEmail(n)},Ae=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.smsNumber;["ANDROID_APP","IOS_APP"].includes(w)&&"ANDROID_APP"===w&&v.logoutSMSNumber(n)},le=void 0,de=null,fe={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},Ie={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},Oe=function(e){if(["ANDROID_APP","IOS_APP"].includes(w)){var n=e.onBarcodeSearch,t=e.format;b((function(e){var t=e.type,i=e.value;"BARCODE_SCAN"===t&&n&&n(i)})),"ANDROID_APP"===w&&v.startScanner(JSON.stringify({formats:t?[t]:[]})),"IOS_APP"===w&&N.postMessage({action:"barcodeScan",barcodeFormat:String(t||fe.ALL_FORMATS)})}},ge=void 0,De=null,pe=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(["ANDROID_APP","IOS_APP"].includes(w))return"IOS_APP"===w&&N.postMessage({action:"showBannerAd",adId:e.adId||""}),"ANDROID_APP"===w&&v.showBannerAd(JSON.stringify(e)),ge},_e=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(["ANDROID_APP","IOS_APP"].includes(w)){var n=e.fullScreenAdCallback;return m((function(e){var n=e.status;De&&De(e),"adDismissed"===n&&(De=null),["adDismissed","adLoadError","adError"].indexOf(n)>-1&&k()})),"IOS_APP"===w&&N.postMessage({action:"showFullScreenAd",adId:e.adId||""}),"ANDROID_APP"===w&&v.showFullScreenAd(JSON.stringify(e)),"function"==typeof n&&(De=n),ge}},Se=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(["ANDROID_APP","IOS_APP"].includes(w)){var n=e.rewardsAdCallback;return m((function(e){var n=e.status;De&&De(e),"adDismissed"===n&&(De=null),["adDismissed","adLoadError","adError"].indexOf(n)>-1&&k()})),"IOS_APP"===w&&N.postMessage({action:"showRewardAd",adId:e.adId||""}),"ANDROID_APP"===w&&v.showRewardsAd(JSON.stringify(e)),"function"==typeof n&&(De=n),ge}},ve={facebook:{login:function(e){if(["ANDROID_APP","IOS_APP"].includes(w)){var n=e.callback,t=e.scope;b((function(e){"fbLoginToken"===e.type&&n&&n(e)})),"ANDROID_APP"===w&&v.loginWithFacebook(),"IOS_APP"===w&&N.postMessage({action:"fbSignIn",scope:t})}},logout:function(e){if(["ANDROID_APP","IOS_APP"].includes(w)){var n=e.callback,t=e.scope;b((function(e){"fbLogOut"===e.type&&n&&n(e)})),"ANDROID_APP"===w&&v.logoutWithFacebook(),"IOS_APP"===w&&N.postMessage({action:"fbSignOut",scope:t})}}},google:{login:function(e){if(["ANDROID_APP","IOS_APP"].includes(w)){var n=e.callback,t=e.scope;b((function(e){"googleLoginToken"===e.type&&n&&n(e)})),"ANDROID_APP"===w&&v.signInWithGoogle(),"IOS_APP"===w&&N.postMessage({action:"googleSignIn",scope:t})}},logout:function(e){if(["ANDROID_APP","IOS_APP"].includes(w)){var n=e.callback,t=e.scope;b((function(e){"googleLogOut"===e.type&&n&&n(e)})),"ANDROID_APP"===w&&v.signOutWithGoogle(),"IOS_APP"===w&&N.postMessage({action:"googleSignOut",scope:t})}}},apple:{login:function(e){if(["ANDROID_APP","IOS_APP"].includes(w)){var n=e.callback,t=e.scope;b((function(e){"appleLoginToken"===e.type&&n&&n(e)})),"IOS_APP"===w&&N.postMessage({action:"appleSignIn",scope:t})}}}},Ne=function(e){["ANDROID_APP","IOS_APP"].includes(w)&&("ANDROID_APP"===w&&v.setAppsFlyerUserId(e),"IOS_APP"===w&&N.postMessage({action:"setAppsFlyerUserId",userId:e}))},we=function(e,n){["ANDROID_APP","IOS_APP"].includes(w)&&("ANDROID_APP"===w&&v.addEventToAppsFlyer(e,JSON.stringify(n)),"IOS_APP"===w&&N.postMessage({action:"addEventToAppsFlyer",eventName:e,eventValues:n}))},Re=function(e){if(["ANDROID_APP","IOS_APP"].includes(w)){var n=e.event,t=e.valueToSum,i=e.parameters;"ANDROID_APP"===w&&v.addFbEvents(n,i),"IOS_APP"===w&&N.postMessage({action:"sendFBEvent",eventName:n,valueToSum:t,parameters:i})}},ye=function(e){if(["ANDROID_APP","IOS_APP"].includes(w)){var n=e.amount,t=e.currency,i=e.parameters;"ANDROID_APP"===w&&v.addFbPurchaseEvent(n,t,i),"IOS_APP"===w&&N.postMessage({action:"sendFBPurchaseEvent",currency:t,amount:n,parameters:i})}},Te=function(){["ANDROID_APP","IOS_APP"].includes(w)&&("ANDROID_APP"===w&&v.showHideStickyFooter(!1),"IOS_APP"===w&&N.postMessage({action:"showHideStickyFooter",show:!1}))},he=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.key;["ANDROID_APP","IOS_APP"].includes(w)&&("ANDROID_APP"===w&&v.showHideStickyFooter(!0),"IOS_APP"===w&&N.postMessage({action:"showHideStickyFooter",show:!0,key:n}))},be=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.callback;["ANDROID_APP","IOS_APP"].includes(w)&&(b((function(e){"contactPermissionStatus"===e.type&&n&&n(e)})),"ANDROID_APP"===w&&v.getPermissionStatus(),"IOS_APP"===w&&N.postMessage({action:"askUserForContactPermission"}))},me=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.callback;["ANDROID_APP","IOS_APP"].includes(w)&&(b((function(e){"contactDetails"===e.type&&n&&n(e)})),"ANDROID_APP"===w&&v.getAll(),"IOS_APP"===w&&N.postMessage({action:"getUserContactDetails"}))},ke=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(["ANDROID_APP","IOS_APP"].includes(w)){var n=e.data,t=e.callback,i=e.backgroundIndicator,o=void 0!==i&&i,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,l=void 0===A?"other":A,d=e.apiUrl,f=e.timeout;b((function(e){"LOCATION_UPDATE"===e.type&&t&&t(e)}),{key:"LOCATION_UPDATE",ignoreDelete:!0}),"IOS_APP"===w&&N.postMessage({action:"startLocation",data:n,backgroundIndicator:o,pauseAutomatically:a,distanceFilter:c,desiredAccuracy:P,activityType:l,apiUrl:d,timeout:f}),"ANDROID_APP"===w&&v.startTrackingLocation(JSON.stringify({action:"startLocation",data:n,interval:f,callback:t,apiUrl:d,displacement:c}))}},Me=function(){["ANDROID_APP","IOS_APP"].includes(w)&&(delete y["LOCATION_UPDATE"],"IOS_APP"===w&&N.postMessage({action:"stopLocation"}),"ANDROID_APP"===w&&v.stopTrackingLocation())},Ee=function(){["ANDROID_APP","IOS_APP"].includes(w)&&("IOS_APP"===w&&N.postMessage({action:"keepScreenOn",flag:!0}),"ANDROID_APP"===w&&v.keepScreenOn())},Fe=function(){["ANDROID_APP","IOS_APP"].includes(w)&&("IOS_APP"===w&&N.postMessage({action:"keepScreenOn",flag:!1}),"ANDROID_APP"===w&&v.keepScreenNormal())},Ce=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.callback;["ANDROID_APP","IOS_APP"].includes(w)&&(b((function(e){"CLIPBOARD_CONTENT"===e.type&&n&&n(e)})),"IOS_APP"===w&&N.postMessage({action:"getClipBoardData"}),"ANDROID_APP"===w&&v.getText())},Be=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};["ANDROID_APP","IOS_APP"].includes(w)&&("IOS_APP"===w&&N.postMessage({action:"setClipBoardData",text:e.data||""}),"ANDROID_APP"===w&&v.setText(e.data||""))},Ue=function(){["ANDROID_APP","IOS_APP"].includes(w)&&("IOS_APP"===w&&N.postMessage({action:"showAppRating"}),"ANDROID_APP"===w&&v.showInAppReview())},We=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.callback;["ANDROID_APP","IOS_APP"].includes(w)&&(b((function(e){"checkBiometricStatus"===e.type&&n&&n(e)})),"ANDROID_APP"===w&&v.checkBiometricStatus(),"IOS_APP"===w&&N.postMessage({action:"checkBiometricStatus"}))},Le=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.callback,t=e.secret;["ANDROID_APP","IOS_APP"].includes(w)&&(b((function(e){"saveBiometricSecret"===e.type&&n&&n(e)})),"ANDROID_APP"===w&&v.saveSecret(t),"IOS_APP"===w&&N.postMessage({action:"saveBiometricSecret",secret:t}))},Je=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.callback;["ANDROID_APP","IOS_APP"].includes(w)&&(b((function(e){"deleteBiometricSecret"===e.type&&n&&n(e)})),"ANDROID_APP"===w&&v.deleteSecret(),"IOS_APP"===w&&N.postMessage({action:"deleteBiometricSecret"}))},Ve=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.callback,t=e.prompt;["ANDROID_APP","IOS_APP"].includes(w)&&(b((function(e){"showBiometric"===e.type&&n&&n(e)})),"ANDROID_APP"===w&&v.callBiometric(t||"Authenticate to continue!"),"IOS_APP"===w&&N.postMessage({action:"showBiometric",prompt:t||""}))},He=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.callback;["IOS_APP"].includes(w)&&(b((function(e){"requestTrackingConsent"===e.type&&n&&n(e)})),"IOS_APP"===w&&N.postMessage({action:"requestTrackingAuthorization"}))},xe=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.callback;["IOS_APP"].includes(w)&&(b((function(e){"trackingConsentStatus"===e.type&&n&&n(e)})),"IOS_APP"===w&&N.postMessage({action:"trackingConsentStatus"}))},qe=function(e){if(["ANDROID_APP","IOS_APP"].includes(w)){var n=e.enabled;"IOS_APP"===w&&N.postMessage({action:"setFirebaseAnalyticsCollection",enabled:n}),"ANDROID_APP"===w&&v.setFirebaseAnalyticsCollection(n)}},Ge=function(e){if(["ANDROID_APP","IOS_APP"].includes(w)){var n=e.userId;"IOS_APP"===w&&N.postMessage({action:"setFirebaseUserId",userId:n}),"ANDROID_APP"===w&&v.setFirebaseUserId(n)}},Ke=function(e){if(["ANDROID_APP","IOS_APP"].includes(w)){var n=e.key,t=e.value;"IOS_APP"===w&&N.postMessage({action:"setFirebaseUserProp",key:n,value:t}),"ANDROID_APP"===w&&v.setFirebaseUserProp(n,t)}},je=function(e){if(["ANDROID_APP","IOS_APP"].includes(w)){var n=e.parameters;"IOS_APP"===w&&N.postMessage({action:"setFirebaseDefaultParam",parameters:n}),"ANDROID_APP"===w&&v.setFirebaseDefaultParam(n)}},Xe=function(e){if(["ANDROID_APP","IOS_APP"].includes(w)){var n=e.eventName,t=e.parameters;"IOS_APP"===w&&N.postMessage({action:"logFirebaseEvent",eventName:n,parameters:t}),"ANDROID_APP"===w&&v.logFirebaseEvent(n,t)}},ze=function(e){if(["ANDROID_APP","IOS_APP"].includes(w)){var n=e.screenName,t=e.screenClass;"IOS_APP"===w&&N.postMessage({action:"logFirebaseScreenView",screenName:n,screenClass:t}),"ANDROID_APP"===w&&v.logFirebaseScreenView(n,t)}},Qe=function(e){if(["ANDROID_APP","IOS_APP"].includes(w)){var n=e.toTopic;"IOS_APP"===w&&N.postMessage({action:"firebaseSubscribeToTopic",topic:n}),"ANDROID_APP"===w&&v.subscribeToTopic(n)}},Ze=function(e){if(["ANDROID_APP","IOS_APP"].includes(w)){var n=e.fromTopic;"IOS_APP"===w&&N.postMessage({action:"firebaseUnsubscribeFromTopic",topic:n}),"ANDROID_APP"===w&&v.unsubscribeFromTopic(n)}},Ye=function(e){if(["ANDROID_APP","IOS_APP"].includes(w)){var n=e.callback;b((function(e){"getFCMToken"===e.type&&("ANDROID_APP"===w&&(e.token=e.fcm_registration_token),n&&n(e))})),"IOS_APP"===w&&N.postMessage({action:"getFCMToken"}),"ANDROID_APP"===w&&v.getRegistrationToken()}},$e=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};["ANDROID_APP","IOS_APP"].includes(w)&&"IOS_APP"===w&&N.postMessage({action:"haptikEffect",effect:e.effect})},en=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.url,t=e.imageUrl,i=void 0===t?"https://images.freeimages.com/images/large-previews/3b2/prague-conference-center-1056491.jpg":t;["ANDROID_APP","IOS_APP"].includes(w)&&"ANDROID_APP"===w&&v.playMedia(JSON.stringify({url:n,imageUrl:i}))},nn=function(){["ANDROID_APP","IOS_APP"].includes(w)&&"ANDROID_APP"===w&&v.pausePlaying()},tn=function(){["ANDROID_APP","IOS_APP"].includes(w)&&"ANDROID_APP"===w&&v.stopPlaying()};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&&(de&&de(t),de=null)})),R&&v.openVoiceSearch(),"function"==typeof n&&(de=n),le},window.WTN.Barcode=i,window.WTN.AdMob=o,window.WTN.socialLogin=ve,window.WTN.inAppPurchase=function(e){if(["ANDROID_APP","IOS_APP"].includes(w)){var n=e.callback,t=e.productId,i=e.productType,o=e.isConsumable,r=void 0!==o&&o;b((function(e){"inAppPurchase"===e.type&&n&&n(e)})),"IOS_APP"===w&&N.postMessage({action:"inAppPurchase",productId:t}),"ANDROID_APP"===w&&v.inAppPurchase(JSON.stringify({action:"inAppPurchase",productId:t,productType:i,isConsumable:r}))}},window.WTN.getAllPurchases=function(e){if(["ANDROID_APP"].includes(w)){var n=e.callback;b((function(e){"purchaseList"===e.type&&n&&n(e)})),"ANDROID_APP"===w&&v.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=l,window.WTN.Biometric=d,window.WTN.ATTConsent=f,window.WTN.facebook={events:a},window.WTN.firebaseAnalytics=O,window.WTN.haptics=p,window.WTN.Firebase=D,window.WTN.MediaPlayer=_,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){N.postMessage({action:"share",url:e.url}),n()}))})}();
1
+ !function(){"use strict";var e={d:function(n,t){for(var i in t)e.o(t,i)&&!e.o(n,i)&&Object.defineProperty(n,i,{enumerable:!0,get:t[i]})},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,{addToSiri:function(){return Z},clearAppCache:function(){return G},closeApp:function(){return j},default:function(){return Y},deviceInfo:function(){return L},downloadBlobFile:function(){return W},downloadFile:function(){return U},enablePullToRefresh:function(){return q},hideSplashScreen:function(){return C},isAndroidApp:function(){return E},isDeviceGPSEnabled:function(){return V},isIosApp:function(){return F},isNativeApp:function(){return y},loadOfferCard:function(){return Q},openUrlInBrowser:function(){return x},platform:function(){return R},printFunction:function(){return X},shareFile:function(){return K},shareLink:function(){return H},showDateTimePicker:function(){return z},showInAppReview:function(){return J},statusBar:function(){return B}});var t={};e.r(t),e.d(t,{addTrigger:function(){return ie},addTriggers:function(){return oe},getPlayerId:function(){return $},getTriggerValue:function(){return se},getTriggers:function(){return ce},logoutEmail:function(){return Ae},logoutSMSNumber:function(){return le},removeExternalUserId:function(){return ne},removeTrigger:function(){return re},removeTriggers:function(){return ae},setEmail:function(){return ue},setExternalUserId:function(){return ee},setSMSNumber:function(){return Pe},setTags:function(){return te}});var i={};e.r(i),e.d(i,{BarcodeScan:function(){return ge},Format:function(){return Ie},Types:function(){return Oe}});var o={};e.r(o),e.d(o,{bannerAd:function(){return _e},fullScreenAd:function(){return Se},rewardsAd:function(){return ve}});var r={};e.r(r),e.d(r,{logEvent:function(){return Re},setCustomerUserId:function(){return we}});var a={};e.r(a),e.d(a,{send:function(){return ye},sendPurchase:function(){return Te}});var s={};e.r(s),e.d(s,{hide:function(){return he},show:function(){return be}});var c={};e.r(c),e.d(c,{getAll:function(){return ke},getPermissionStatus:function(){return me}});var u={};e.r(u),e.d(u,{start:function(){return Me},stop:function(){return Ee}});var P={};e.r(P),e.d(P,{keepScreenNormal:function(){return Ce},keepScreenOn:function(){return Fe}});var A={};e.r(A),e.d(A,{get:function(){return Be},set:function(){return Ue}});var l={};e.r(l),e.d(l,{prompt:function(){return We}});var d={};e.r(d),e.d(d,{checkStatus:function(){return Le},deleteSecret:function(){return Ve},saveSecret:function(){return Je},show:function(){return He}});var f={};e.r(f),e.d(f,{request:function(){return xe},status:function(){return qe}});var I={};e.r(I),e.d(I,{logEvent:function(){return Xe},logScreen:function(){return Qe},setCollection:function(){return Ge},setDefaultEventParameters:function(){return ze},setUserId:function(){return Ke},setUserProperty:function(){return je}});var O={};e.r(O),e.d(O,{events:function(){return I}});var g={};e.r(g),e.d(g,{getFCMToken:function(){return $e},subscribe:function(){return Ze},unsubscribe:function(){return Ye}});var D={};e.r(D),e.d(D,{Analytics:function(){return I},Messaging:function(){return g}});var p={};e.r(p),e.d(p,{trigger:function(){return en}});var _={};e.r(_),e.d(_,{pauseMedia:function(){return tn},playMedia:function(){return nn},stopMedia:function(){return on}});var S={};e.r(S),e.d(S,{setPrintSize:function(){return rn}});var v="undefined"!=typeof window,N=v&&window.WebToNativeInterface||{},w=v&&window.webkit&&window.webkit.messageHandlers&&window.webkit.messageHandlers.webToNativeInterface,R=N.getAndroidVersion?"ANDROID_APP":w?"IOS_APP":"WEBSITE",y=v&&"WEBSITE"!==R,T={},h=1,b=null;y&&(N.androidCBHook=function(e){var n=e;try{n=JSON.parse(e)}catch(e){console.log(e)}for(var t in n.type,T){var i=T[t],o=i.cb,r=i.ignoreDelete,a=void 0!==r&&r;n&&n.reqType?t==n.reqType&&(o(n),a||delete T[t]):(o(n),a||delete T[t])}},window.iOSAdMobCBHook=N.androidAdMobCBHook=function(e){var n=JSON.parse(e);b&&b(n)},window.iosCBHook=function(e){var n=e;try{n=JSON.parse(e)}catch(e){console.log(e)}for(var t in T){var i=T[t],o=i.cb,r=i.ignoreDelete,a=void 0!==r&&r;n&&n.reqType?t==n.reqType&&(o(n),a||delete T[t]):(o(n),a||delete T[t])}});var m=function(e,n){"function"==typeof e&&(n&&n.key?T[n.key]={cb:e,ignoreDelete:!!n.ignoreDelete}:(T[h]={cb:e,ignoreDelete:!(!n||!n.ignoreDelete)},h+=1))},k=function(e){"function"==typeof e&&(b=e)},M=function(){b&&(b=null)},E="ANDROID_APP"===R,F="IOS_APP"===R,C=function(){y&&N.hideSplashScreen()},B=function(e){y&&(E?N.statusBar(JSON.stringify(e)):F&&w.postMessage({action:"statusBar",color:e.color,style:e.style}))},U=function(e){y&&(E||F&&w.postMessage({action:"downloadFile",downloadUrl:e}))},W=function(e){var n=e.fileName,t=e.downloadUrl;["IOS_APP"].includes(R)&&F&&w.postMessage({action:"downloadBlobFile",fileName:n,url:t})},L=function(){return new Promise((function(e,n){m((function(t){t?e(t):n({err:"Error getting device info"})}),{key:"deviceInfo"}),"ANDROID_APP"===R?N.getDeviceInfo():"IOS_APP"===R?w.postMessage({action:"deviceInfo"}):n("This function will work in Native App Powered By WebToNative")}))},J=function(){y&&N.showInAppReview()},V=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.callback;["ANDROID_APP","IOS_APP"].includes(R)&&(m((function(e){"isDeviceGPSEnabled"===e.type&&n&&n(e)})),"ANDROID_APP"===R&&N.isLocationServiceEnabled())},H=function(e){var n=e.url,t=void 0===n?"":n;if(!t)throw"url is mandatory";E&&N.openShareIntent(t),F&&w.postMessage({action:"share",url:t})},x=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";if(!e)throw"url is mandatory";E&&N.openUrlInBrowser(e)},q=function(e){E&&N.enableSwipeRefresh(e)},G=function(e){E&&N.clearWebViewCache(JSON.stringify({reload:e}))},K=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;E&&N.shareFile(e,n,t)},j=function(){E&&N.closeApp()},z=function(e){if(["ANDROID_APP"].includes(R)){var n=e.callback,t=e.showDate,i=e.showTime;m((function(e){"DATE_TIME_PICKER"===e.type&&n&&n(e)})),E&&N.pickDateTime(JSON.stringify({showDate:t,showTime:i}))}},X=function(e){if(["ANDROID_APP"].includes(R)){var n=e.type,t=void 0===n?"url":n,i=e.url,o=void 0===i?"":i;E&&N.print(JSON.stringify({type:t,url:o}))}},Q=function(e){["ANDROID_APP","IOS_APP"].includes(R)&&(E&&N.showOfferCard(JSON.stringify(e)),e.data&&(e.data=JSON.stringify(e.data)),F&&w.postMessage(e))},Z=function(e){["IOS_APP"].includes(R)&&(e.data&&(e.data=JSON.stringify(e.data)),F&&w.postMessage(e))},Y={isAndroidApp:E,isIosApp:F,hideSplashScreen:C,statusBar:B,deviceInfo:L,showInAppReview:J,shareLink:H,platform:R,isNativeApp:y,isDeviceGPSEnabled:V,openUrlInBrowser:x,enablePullToRefresh:q,shareFile:K,clearAppCache:G,closeApp:j,showDateTimePicker:z,downloadBlobFile:W,printFunction:X,loadOfferCard:Q,addToSiri:Z},$=function(){return new Promise((function(e,n){m((function(t){t.isSuccess?e(t.playerId):n(t)}),{key:"getPlayerId"}),"ANDROID_APP"===R?N.getOneSignalId():"IOS_APP"===R?w.postMessage({action:"getPlayerId"}):n("This function will work in Native App Powered By WebToNative")}))},ee=function(e){if(!e)throw"userId is required";if("ANDROID_APP"===R)return y&&N.setExternalUserId(e);"IOS_APP"===R&&w.postMessage({action:"setExternalUserId",userId:e})},ne=function(){if("ANDROID_APP"===R)return y&&N.removeExternalUserId();"IOS_APP"===R&&w.postMessage({action:"removeExternalUserId"})},te=function(e){var n=e.tags;if(n){if("ANDROID_APP"===R)return y&&N.setUserTags(JSON.stringify(n));"IOS_APP"===R&&w.postMessage({action:"setUserTags",tags:n})}},ie=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.key,t=e.value;"ANDROID_APP"===R?N.addTrigger(JSON.stringify({key:n,value:t})):"IOS_APP"===R&&w.postMessage({action:"addTrigger",key:n,value:t})},oe=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.triggers;"ANDROID_APP"===R?N.addTriggers(JSON.stringify({triggers:n})):"IOS_APP"===R&&w.postMessage({action:"addTriggers",triggers:n})},re=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.key;"ANDROID_APP"===R?N.removeTriggerForKey(n):"IOS_APP"===R&&w.postMessage({action:"removeTrigger",key:n})},ae=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.keys;"ANDROID_APP"===R?N.removeTriggersForKeys(JSON.stringify({keys:n})):"IOS_APP"===R&&w.postMessage({action:"removeTriggers",keys:n})},se=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.key,t=e.callback;["ANDROID_APP","IOS_APP"].includes(R)&&(m((function(e){"getTriggerValue"===e.type&&t&&t(e)})),"ANDROID_APP"===R?N.getTriggerValueForKey(n):"IOS_APP"===R&&w.postMessage({action:"getTriggerValue",key:n}))},ce=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.callback;["ANDROID_APP","IOS_APP"].includes(R)&&(m((function(e){"getTriggers"===e.type&&n&&n(e)})),"ANDROID_APP"===R?N.getTriggers():"IOS_APP"===R&&w.postMessage({action:"getTriggers"}))},ue=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.emailId;["ANDROID_APP","IOS_APP"].includes(R)&&"ANDROID_APP"===R&&N.setEmail(n)},Pe=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.smsNumber;["ANDROID_APP","IOS_APP"].includes(R)&&"ANDROID_APP"===R&&N.setSMSNumber(n)},Ae=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.emailId;["ANDROID_APP","IOS_APP"].includes(R)&&"ANDROID_APP"===R&&N.logoutEmail(n)},le=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.smsNumber;["ANDROID_APP","IOS_APP"].includes(R)&&"ANDROID_APP"===R&&N.logoutSMSNumber(n)},de=void 0,fe=null,Ie={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},Oe={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},ge=function(e){if(["ANDROID_APP","IOS_APP"].includes(R)){var n=e.onBarcodeSearch,t=e.format;m((function(e){var t=e.type,i=e.value;"BARCODE_SCAN"===t&&n&&n(i)})),"ANDROID_APP"===R&&N.startScanner(JSON.stringify({formats:t?[t]:[]})),"IOS_APP"===R&&w.postMessage({action:"barcodeScan",barcodeFormat:String(t||Ie.ALL_FORMATS)})}},De=void 0,pe=null,_e=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(["ANDROID_APP","IOS_APP"].includes(R))return"IOS_APP"===R&&w.postMessage({action:"showBannerAd",adId:e.adId||""}),"ANDROID_APP"===R&&N.showBannerAd(JSON.stringify(e)),De},Se=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(["ANDROID_APP","IOS_APP"].includes(R)){var n=e.fullScreenAdCallback;return k((function(e){var n=e.status;pe&&pe(e),"adDismissed"===n&&(pe=null),["adDismissed","adLoadError","adError"].indexOf(n)>-1&&M()})),"IOS_APP"===R&&w.postMessage({action:"showFullScreenAd",adId:e.adId||""}),"ANDROID_APP"===R&&N.showFullScreenAd(JSON.stringify(e)),"function"==typeof n&&(pe=n),De}},ve=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(["ANDROID_APP","IOS_APP"].includes(R)){var n=e.rewardsAdCallback;return k((function(e){var n=e.status;pe&&pe(e),"adDismissed"===n&&(pe=null),["adDismissed","adLoadError","adError"].indexOf(n)>-1&&M()})),"IOS_APP"===R&&w.postMessage({action:"showRewardAd",adId:e.adId||""}),"ANDROID_APP"===R&&N.showRewardsAd(JSON.stringify(e)),"function"==typeof n&&(pe=n),De}},Ne={facebook:{login:function(e){if(["ANDROID_APP","IOS_APP"].includes(R)){var n=e.callback,t=e.scope;m((function(e){"fbLoginToken"===e.type&&n&&n(e)})),"ANDROID_APP"===R&&N.loginWithFacebook(),"IOS_APP"===R&&w.postMessage({action:"fbSignIn",scope:t})}},logout:function(e){if(["ANDROID_APP","IOS_APP"].includes(R)){var n=e.callback,t=e.scope;m((function(e){"fbLogOut"===e.type&&n&&n(e)})),"ANDROID_APP"===R&&N.logoutWithFacebook(),"IOS_APP"===R&&w.postMessage({action:"fbSignOut",scope:t})}}},google:{login:function(e){if(["ANDROID_APP","IOS_APP"].includes(R)){var n=e.callback,t=e.scope;m((function(e){"googleLoginToken"===e.type&&n&&n(e)})),"ANDROID_APP"===R&&N.signInWithGoogle(),"IOS_APP"===R&&w.postMessage({action:"googleSignIn",scope:t})}},logout:function(e){if(["ANDROID_APP","IOS_APP"].includes(R)){var n=e.callback,t=e.scope;m((function(e){"googleLogOut"===e.type&&n&&n(e)})),"ANDROID_APP"===R&&N.signOutWithGoogle(),"IOS_APP"===R&&w.postMessage({action:"googleSignOut",scope:t})}}},apple:{login:function(e){if(["ANDROID_APP","IOS_APP"].includes(R)){var n=e.callback,t=e.scope;m((function(e){"appleLoginToken"===e.type&&n&&n(e)})),"IOS_APP"===R&&w.postMessage({action:"appleSignIn",scope:t})}}}},we=function(e){["ANDROID_APP","IOS_APP"].includes(R)&&("ANDROID_APP"===R&&N.setAppsFlyerUserId(e),"IOS_APP"===R&&w.postMessage({action:"setAppsFlyerUserId",userId:e}))},Re=function(e,n){["ANDROID_APP","IOS_APP"].includes(R)&&("ANDROID_APP"===R&&N.addEventToAppsFlyer(e,JSON.stringify(n)),"IOS_APP"===R&&w.postMessage({action:"addEventToAppsFlyer",eventName:e,eventValues:n}))},ye=function(e){if(["ANDROID_APP","IOS_APP"].includes(R)){var n=e.event,t=e.valueToSum,i=e.parameters;"ANDROID_APP"===R&&N.addFbEvents(n,i),"IOS_APP"===R&&w.postMessage({action:"sendFBEvent",eventName:n,valueToSum:t,parameters:i})}},Te=function(e){if(["ANDROID_APP","IOS_APP"].includes(R)){var n=e.amount,t=e.currency,i=e.parameters;"ANDROID_APP"===R&&N.addFbPurchaseEvent(n,t,i),"IOS_APP"===R&&w.postMessage({action:"sendFBPurchaseEvent",currency:t,amount:n,parameters:i})}},he=function(){["ANDROID_APP","IOS_APP"].includes(R)&&("ANDROID_APP"===R&&N.showHideStickyFooter(!1),"IOS_APP"===R&&w.postMessage({action:"showHideStickyFooter",show:!1}))},be=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.key;["ANDROID_APP","IOS_APP"].includes(R)&&("ANDROID_APP"===R&&N.showHideStickyFooter(!0),"IOS_APP"===R&&w.postMessage({action:"showHideStickyFooter",show:!0,key:n}))},me=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.callback;["ANDROID_APP","IOS_APP"].includes(R)&&(m((function(e){"contactPermissionStatus"===e.type&&n&&n(e)})),"ANDROID_APP"===R&&N.getPermissionStatus(),"IOS_APP"===R&&w.postMessage({action:"askUserForContactPermission"}))},ke=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.callback;["ANDROID_APP","IOS_APP"].includes(R)&&(m((function(e){"contactDetails"===e.type&&n&&n(e)})),"ANDROID_APP"===R&&N.getAll(),"IOS_APP"===R&&w.postMessage({action:"getUserContactDetails"}))},Me=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(["ANDROID_APP","IOS_APP"].includes(R)){var n=e.data,t=e.callback,i=e.backgroundIndicator,o=void 0!==i&&i,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,l=void 0===A?"other":A,d=e.apiUrl,f=e.timeout;m((function(e){"LOCATION_UPDATE"===e.type&&t&&t(e)}),{key:"LOCATION_UPDATE",ignoreDelete:!0}),"IOS_APP"===R&&w.postMessage({action:"startLocation",data:n,backgroundIndicator:o,pauseAutomatically:a,distanceFilter:c,desiredAccuracy:P,activityType:l,apiUrl:d,timeout:f}),"ANDROID_APP"===R&&N.startTrackingLocation(JSON.stringify({action:"startLocation",data:n,interval:f,callback:t,apiUrl:d,displacement:c}))}},Ee=function(){["ANDROID_APP","IOS_APP"].includes(R)&&(delete T["LOCATION_UPDATE"],"IOS_APP"===R&&w.postMessage({action:"stopLocation"}),"ANDROID_APP"===R&&N.stopTrackingLocation())},Fe=function(){["ANDROID_APP","IOS_APP"].includes(R)&&("IOS_APP"===R&&w.postMessage({action:"keepScreenOn",flag:!0}),"ANDROID_APP"===R&&N.keepScreenOn())},Ce=function(){["ANDROID_APP","IOS_APP"].includes(R)&&("IOS_APP"===R&&w.postMessage({action:"keepScreenOn",flag:!1}),"ANDROID_APP"===R&&N.keepScreenNormal())},Be=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.callback;["ANDROID_APP","IOS_APP"].includes(R)&&(m((function(e){"CLIPBOARD_CONTENT"===e.type&&n&&n(e)})),"IOS_APP"===R&&w.postMessage({action:"getClipBoardData"}),"ANDROID_APP"===R&&N.getText())},Ue=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};["ANDROID_APP","IOS_APP"].includes(R)&&("IOS_APP"===R&&w.postMessage({action:"setClipBoardData",text:e.data||""}),"ANDROID_APP"===R&&N.setText(e.data||""))},We=function(){["ANDROID_APP","IOS_APP"].includes(R)&&("IOS_APP"===R&&w.postMessage({action:"showAppRating"}),"ANDROID_APP"===R&&N.showInAppReview())},Le=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.callback;["ANDROID_APP","IOS_APP"].includes(R)&&(m((function(e){"checkBiometricStatus"===e.type&&n&&n(e)})),"ANDROID_APP"===R&&N.checkBiometricStatus(),"IOS_APP"===R&&w.postMessage({action:"checkBiometricStatus"}))},Je=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.callback,t=e.secret;["ANDROID_APP","IOS_APP"].includes(R)&&(m((function(e){"saveBiometricSecret"===e.type&&n&&n(e)})),"ANDROID_APP"===R&&N.saveSecret(t),"IOS_APP"===R&&w.postMessage({action:"saveBiometricSecret",secret:t}))},Ve=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.callback;["ANDROID_APP","IOS_APP"].includes(R)&&(m((function(e){"deleteBiometricSecret"===e.type&&n&&n(e)})),"ANDROID_APP"===R&&N.deleteSecret(),"IOS_APP"===R&&w.postMessage({action:"deleteBiometricSecret"}))},He=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.callback,t=e.prompt;["ANDROID_APP","IOS_APP"].includes(R)&&(m((function(e){"showBiometric"===e.type&&n&&n(e)})),"ANDROID_APP"===R&&N.callBiometric(t||"Authenticate to continue!"),"IOS_APP"===R&&w.postMessage({action:"showBiometric",prompt:t||""}))},xe=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.callback;["IOS_APP"].includes(R)&&(m((function(e){"requestTrackingConsent"===e.type&&n&&n(e)})),"IOS_APP"===R&&w.postMessage({action:"requestTrackingAuthorization"}))},qe=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.callback;["IOS_APP"].includes(R)&&(m((function(e){"trackingConsentStatus"===e.type&&n&&n(e)})),"IOS_APP"===R&&w.postMessage({action:"trackingConsentStatus"}))},Ge=function(e){if(["ANDROID_APP","IOS_APP"].includes(R)){var n=e.enabled;"IOS_APP"===R&&w.postMessage({action:"setFirebaseAnalyticsCollection",enabled:n}),"ANDROID_APP"===R&&N.setFirebaseAnalyticsCollection(n)}},Ke=function(e){if(["ANDROID_APP","IOS_APP"].includes(R)){var n=e.userId;"IOS_APP"===R&&w.postMessage({action:"setFirebaseUserId",userId:n}),"ANDROID_APP"===R&&N.setFirebaseUserId(n)}},je=function(e){if(["ANDROID_APP","IOS_APP"].includes(R)){var n=e.key,t=e.value;"IOS_APP"===R&&w.postMessage({action:"setFirebaseUserProp",key:n,value:t}),"ANDROID_APP"===R&&N.setFirebaseUserProp(n,t)}},ze=function(e){if(["ANDROID_APP","IOS_APP"].includes(R)){var n=e.parameters;"IOS_APP"===R&&w.postMessage({action:"setFirebaseDefaultParam",parameters:n}),"ANDROID_APP"===R&&N.setFirebaseDefaultParam(n)}},Xe=function(e){if(["ANDROID_APP","IOS_APP"].includes(R)){var n=e.eventName,t=e.parameters;"IOS_APP"===R&&w.postMessage({action:"logFirebaseEvent",eventName:n,parameters:t}),"ANDROID_APP"===R&&N.logFirebaseEvent(n,t)}},Qe=function(e){if(["ANDROID_APP","IOS_APP"].includes(R)){var n=e.screenName,t=e.screenClass;"IOS_APP"===R&&w.postMessage({action:"logFirebaseScreenView",screenName:n,screenClass:t}),"ANDROID_APP"===R&&N.logFirebaseScreenView(n,t)}},Ze=function(e){if(["ANDROID_APP","IOS_APP"].includes(R)){var n=e.toTopic;"IOS_APP"===R&&w.postMessage({action:"firebaseSubscribeToTopic",topic:n}),"ANDROID_APP"===R&&N.subscribeToTopic(n)}},Ye=function(e){if(["ANDROID_APP","IOS_APP"].includes(R)){var n=e.fromTopic;"IOS_APP"===R&&w.postMessage({action:"firebaseUnsubscribeFromTopic",topic:n}),"ANDROID_APP"===R&&N.unsubscribeFromTopic(n)}},$e=function(e){if(["ANDROID_APP","IOS_APP"].includes(R)){var n=e.callback;m((function(e){"getFCMToken"===e.type&&("ANDROID_APP"===R&&(e.token=e.fcm_registration_token),n&&n(e))})),"IOS_APP"===R&&w.postMessage({action:"getFCMToken"}),"ANDROID_APP"===R&&N.getRegistrationToken()}},en=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};["ANDROID_APP","IOS_APP"].includes(R)&&"IOS_APP"===R&&w.postMessage({action:"haptikEffect",effect:e.effect})},nn=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.url,t=e.imageUrl,i=void 0===t?"https://images.freeimages.com/images/large-previews/3b2/prague-conference-center-1056491.jpg":t;["ANDROID_APP","IOS_APP"].includes(R)&&"ANDROID_APP"===R&&N.playMedia(JSON.stringify({url:n,imageUrl:i}))},tn=function(){["ANDROID_APP","IOS_APP"].includes(R)&&"ANDROID_APP"===R&&N.pausePlaying()},on=function(){["ANDROID_APP","IOS_APP"].includes(R)&&"ANDROID_APP"===R&&N.stopPlaying()},rn=function(e){if(["ANDROID_APP"].includes(R)){var n=e.printSize,t=void 0===n?"ISO_A4":n,i=e.label,o=void 0===i?"":i;"ANDROID_APP"===R&&N.setPrintSize(JSON.stringify({printSize:t,label:o}))}};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 m((function(e){var n=e.type,t=e.results;"VOICE_SEARCH_RESULT"===n&&(fe&&fe(t),fe=null)})),y&&N.openVoiceSearch(),"function"==typeof n&&(fe=n),de},window.WTN.Barcode=i,window.WTN.AdMob=o,window.WTN.socialLogin=Ne,window.WTN.inAppPurchase=function(e){if(["ANDROID_APP","IOS_APP"].includes(R)){var n=e.callback,t=e.productId,i=e.productType,o=e.isConsumable,r=void 0!==o&&o;m((function(e){"inAppPurchase"===e.type&&n&&n(e)})),"IOS_APP"===R&&w.postMessage({action:"inAppPurchase",productId:t}),"ANDROID_APP"===R&&N.inAppPurchase(JSON.stringify({action:"inAppPurchase",productId:t,productType:i,isConsumable:r}))}},window.WTN.getAllPurchases=function(e){if(["ANDROID_APP"].includes(R)){var n=e.callback;m((function(e){"purchaseList"===e.type&&n&&n(e)})),"ANDROID_APP"===R&&N.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=l,window.WTN.Biometric=d,window.WTN.ATTConsent=f,window.WTN.facebook={events:a},window.WTN.firebaseAnalytics=O,window.WTN.haptics=p,window.WTN.Firebase=D,window.WTN.MediaPlayer=_,window.WTN.Printing=S,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){w.postMessage({action:"share",url:e.url}),n()}))})}();