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