natively 2.7.0 → 2.7.2
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/natively-frontend.js +4 -0
- package/natively-frontend.min.js +1 -1
- package/package.json +1 -1
package/natively-frontend.js
CHANGED
package/natively-frontend.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function generateID(){return Date.now().toString(36)+Math.random().toString(36).substring(2)}window.natively={isDebug:!1,min_app_version:0,app_version:0,injected:!1,observers:[],setDebug:function(t){window.natively.isDebug=t},notify:function(t,i){window.natively.injected=!0,t&&(window.natively.min_app_version=t),i&&(window.natively.app_version=i);const e=window.natively.observers;for(natively.isDebug&&console.log("[INFO] Notify observers: ",e.length);e.length>0;){const t=e.shift();t()}},addObserver:function(t){window.natively.injected?t():(window.natively.isDebug&&console.log(`[DEBUG] addObserver: ${t}`),window.natively.observers.push(t))},trigger:function(t,i,e,n,o){const r=window.natively.isDebug;if(window.natively.injected)if(i>window.natively.app_version)r&&alert(`[ERROR] Please rebuild the app to use this functionality. App Version: ${window.natively.app_version}, feature version: ${i}`);else{if(e){let i;i=t?n+"_response_"+t:n+"_response",window[i]=function(n,o){$agent.response(),o.message&&r?alert(`[ERROR] Error message: ${o.message}`):(r&&console.log(`[DEBUG] Callback method: ${i}, body: ${JSON.stringify(n)}, respId: ${t}`),e(n))},o?o.response_id=t:o={response_id:t}}r&&console.log(`[DEBUG] Trigger method: ${n}, body: ${JSON.stringify(o)}`),$agent.trigger(n,o)}else window.natively.addObserver(()=>{window.natively.trigger(t,i,e,n,o)})},closeApp:function(){window.natively.trigger(void 0,11,void 0,"app_close")},showProgress:function(t){window.natively.trigger(void 0,11,void 0,"app_show_progress",{toggle:t})},shareImage(t){window.natively.trigger(void 0,0,void 0,"share_image",{url:t})},shareText(t){window.natively.trigger(void 0,0,void 0,"share_text",{text:t})},shareTextAndImage(t,i){window.natively.trigger(void 0,0,void 0,"share_text_and_image",{url:i,text:t})},shareFile(t){window.natively.trigger(void 0,2,void 0,"share_file",{url:t})},openExternalURL(t){window.natively.trigger(void 0,0,void 0,"open_link",{url:t})},openExternalAppIOS(t){window.natively.trigger(void 0,0,void 0,"open_app",{url:t})},openAppSettings(){window.natively.trigger(void 0,0,void 0,"open_appsettings")},hapticPatternIOS(t,i){window.natively.trigger(void 0,7,void 0,"haptic_pattern",{pattern:t,delay:i})},hapticImpactIOS(t){window.natively.trigger(void 0,7,void 0,"haptic_impact",{type:t})},hapticNotificationIOS(t){window.natively.trigger(void 0,7,void 0,"haptic_notification",{type:t})},showAppToast(t,i){const e={};e.text=void 0===i?"":i,e.type=void 0===t?"DEFAULT":t,window.natively.trigger(void 0,0,void 0,"show_toast",e)},showAppBanner(t,i,e){const n={};n.type=void 0===t?"INFO":t,n.title=void 0===i?"":i,n.description=void 0===e?"":e,window.natively.trigger(void 0,0,void 0,"show_banner",n)},requestAppReview(){window.natively.trigger(void 0,0,void 0,"request_review")},setAppBackgroundColor(t){const i={color:t};window.natively.trigger(void 0,1,void 0,"app_background",i)},setAppProgressColor(t){const i={color:t};window.natively.trigger(void 0,1,void 0,"app_progress",i)},setAppSwipeNavigationIOS(t){const i={toggle:t};window.natively.trigger(void 0,1,void 0,"app_navigation",i)},setAppPullToRefresh(t){const i={toggle:t};window.natively.trigger(void 0,1,void 0,"app_pull",i)},setAppOrientation(t){const i={orientation:t};window.natively.trigger(void 0,3,void 0,"app_orientation",i)},setAppStatusBarStyleIOS(t){const i={style:t};window.natively.trigger(void 0,2,void 0,"status_bar_style",i)},async sendPushNotification(t,i,e,n){const o=e.filter(t=>t.length>0),r=[...new Set(o)];let a={app_id:n?"be83022a-1d08-45d0-a07a-0c3655666e17":t,include_player_ids:r};i.template_id?a.template_id=i.template_id:(a.headings={},a.headings.en=i.title||"Empty Title",a.contents={},a.contents.en=i.message||"Empty Message",i.subtitle&&(a.subtitle={},a.subtitle.en=i.subtitle),i.redirect_url&&(a.url=i.redirect_url));const s={method:"POST",headers:{"Content-type":"application/json"},body:JSON.stringify(a)};return await fetch("https://onesignal.com/api/v1/notifications",s)}},window.natively.addObserver(()=>window.natively.trigger(void 0,0,t=>{window.natively.min_app_version=t.minSDKVersion,window.natively.app_version=t.sdkVersion},"app_info",{}));class NativelyInfo{constructor(){const t=generateID();this.browserInfo=function(){const t="undefined"!=typeof $agent,i=window.navigator.userAgent.includes("Natively/iOS"),e=window.navigator.userAgent.includes("Natively/Android");return{isNativeApp:t,isIOSApp:i,isAndroidApp:e}},this.getAppInfo=function(i){window.natively.trigger(t,0,i,"app_info")},this.connectivity=function(t){window.natively.trigger(void 0,0,t,"connectivity")}}}class NativelyClipboard{constructor(){const t=generateID();this.copy=function(t){window.natively.trigger(void 0,11,void 0,"clipboard_copy",{text:t})},this.paste=function(i){window.natively.trigger(t,11,i,"clipboard_paste")}}}class NativelyPagesCache{constructor(){const t=generateID();this.currentPageCached=function(i){window.natively.trigger(t,4,i,"current_page_cached")},this.storeCurrentPage=function(i){window.natively.trigger(t,4,i,"store_current_page")},this.resetCurrentPage=function(i){window.natively.trigger(t,4,i,"reset_current_page")},this.resetAll=function(i){window.natively.trigger(t,4,i,"reset_all")}}}class NativelyNotifications{constructor(){const t=generateID();this.getOneSignalId=function(i){window.natively.trigger(t,0,i,"onesignal_playerid")},this.requestPermission=function(i,e){window.natively.trigger(t,0,e,"push_register",{fallbackToSettings:i})},this.getPermissionStatus=function(i){window.natively.trigger(t,0,i,"push_permission")}}}class NativelyGeolocation{constructor(){const t=generateID();this.getUserGeolocation=function(i,e){window.natively.trigger(t,0,e,"geolocation",{distance:i})},this.requestPermission=function(i){window.natively.trigger(t,0,i,"geo_register")},this.getPermissionStatus=function(i){window.natively.trigger(t,0,i,"geo_permission")}}}class NativelyLocation{constructor(){const t=generateID();this.current=function(i,e,n,o){window.natively.trigger(t,12,o,"location_current",{minAccuracy:i,accuracyType:e,priority:n})},this.permission=function(i){window.natively.trigger(t,6,i,"location_permission")},this.start=function(i,e,n,o,r){window.natively.trigger(t,12,r,"location_start",{minAccuracy:e,accuracyType:n,priority:o,interval:i})},this.stop=function(){window.natively.trigger(t,3,void 0,"location_stop",{})},this.startBackground=function(i,e,n,o,r,a){const s={};s.identifier=void 0===r?"empty":r,s.interval=void 0===i?6e4:i,s.minAccuracy=void 0===e?50:e,s.accuracyType=void 0===n?"Best":n,s.priority=void 0===o?"BALANCED":o,window.natively.trigger(t,12,a,"location_start_bg",s)},this.stopBackground=function(i){window.natively.trigger(t,4,i,"location_stop_bg",{})}}}class NativelyMessage{constructor(){const t=generateID();this.sendSMS=function(i,e,n){const o={};o.body=void 0===i?"":i,o.recipient=void 0===e?"":e,window.natively.trigger(t,0,n,"send_sms",o)},this.sendEmail=function(i,e,n,o){const r={};r.subject=void 0===i?"":i,r.body=void 0===e?"":e,r.recipient=void 0===n?"":n,window.natively.trigger(t,0,o,"send_email",r)}}}class NativelyStorage{constructor(){const t=generateID();this.setStorageValue=function(i,e){window.natively.trigger(t,0,void 0,"set_storage_value",{key:i,value:e})},this.getStorageValue=function(i,e){window.natively.trigger(t,0,e,"get_storage_value",{key:i})},this.removeStorageValue=function(i){window.natively.trigger(t,0,void 0,"remove_storage_value",{key:i})},this.resetStorage=function(){window.natively.trigger(t,0,void 0,"reset_storage")}}}class NativelyBiometrics{constructor(t){this.allowPass=t;const i=generateID();this.checkBiometricsSupport=function(e){window.natively.trigger(i,0,e,"biometrics_support",{allowPass:t})},this.checkCredentials=function(t){window.natively.trigger(i,0,t,"biometrics_has_credentials")},this.verifyUserIdentify=function(e){window.natively.trigger(i,0,e,"biometrics_verify",{allowPass:t})},this.getUserCredentials=function(e){window.natively.trigger(i,0,e,"biometrics_auth",{allowPass:t})},this.removeUserCredentials=function(t){window.natively.trigger(i,0,t,"biometrics_remove_credentials")},this.saveUserCredentials=function(e,n,o){window.natively.trigger(i,0,o,"biometrics_auth",{allowPass:t,login:e,password:n})}}}class NativelyDatePicker{constructor(){const t=generateID();this.showDatePicker=function(i,e,n,o,r){let a={};a.type=void 0===n?"DATE":n,a.style=void 0===o?"LIGHT":o,a.title=void 0===i?"":i,a.description=void 0===e?"":e,window.natively.trigger(t,0,r,"datepicker",a)}}}class NativelyCamera{constructor(){const t=generateID();this.showCamera=function(i,e,n,o){let r={};r.type=void 0===i?"photo":i,r.quality=void 0===e?"high":e,r.camera=void 0===n?"BACK":n,window.natively.trigger(t,2,o,"open_camera",r)}}}class NativelyHealth{constructor(){const t=generateID();this.available=function(i){window.natively.trigger(t,10,i,"health_available",{})},this.requestAuthorization=function(i,e,n){window.natively.trigger(t,10,n,"health_register",{write_data_types:i,read_data_types:e})},this.permissionStatus=function(i,e){window.natively.trigger(t,10,e,"health_permission",{data_type:i})},this.getAllCharacteristics=function(i){window.natively.trigger(t,10,i,"health_get_all_characteristics",{})},this.getStatisticQuantity=function(i,e,n,o,r){const a={data_type:i,interval:e};void 0!==n&&(a.start_date=n.getTime()),void 0!==o&&(a.end_date=o.getTime()),window.natively.trigger(t,10,r,"health_get_statistic_quantity",a)},this.getDailySleepAnalysis=function(i,e,n,o){const r={limit:n||100};void 0!==i&&(r.start_date=i.getTime()),void 0!==e&&(r.end_date=e.getTime()),window.natively.trigger(t,10,o,"health_get_daily_sleep_analysis",r)},this.getActivitySummary=function(i,e,n){const o={};void 0!==i&&(o.start_date=i.getTime()),void 0!==e&&(o.end_date=e.getTime()),window.natively.trigger(t,10,n,"health_get_activity_summary",o)}}}class NativelyScanner{constructor(){const t=generateID();this.showScanner=function(i){window.natively.trigger(t,2,i,"open_scanner",{})}}}class NativelyPurchases{constructor(){const t=generateID();this.login=function(i,e,n){const o=void 0===e?"":e;window.natively.trigger(t,3,n,"purchases_login",{login:i,email:o})},this.logout=function(i){window.natively.trigger(t,3,i,"purchases_logout",{})},this.customerId=function(i){window.natively.trigger(t,3,i,"purchases_customerid",{})},this.restore=function(i){window.natively.trigger(t,10,i,"purchases_restore",{})},this.purchasePackage=function(i,e){window.natively.trigger(t,3,e,"purchases_package",{packageId:i})},this.packagePrice=function(i,e){window.natively.trigger(t,8,e,"purchases_price",{packageId:i})}}}class NativelyContacts{constructor(){const t=generateID();this.getAllContacts=function(i){window.natively.trigger(t,3,i,"contacts_all",{})},this.createContact=function(i,e,n,o,r){let a={firstName:i};a.lastName=void 0===e?"":e,a.email=void 0===n?"":n,a.phone=void 0===o?"":o,window.natively.trigger(t,3,r,"contacts_save",a)}}}class NativelyMediaPicker{constructor(){const t=generateID();this.showMediaPicker=function(i){window.natively.trigger(t,8,i,"mediapicker",{})}}}
|
|
1
|
+
function generateID(){return Date.now().toString(36)+Math.random().toString(36).substring(2)}window.natively={isDebug:!1,min_app_version:0,app_version:0,injected:!1,observers:[],setDebug:function(t){window.natively.isDebug=t},notify:function(t,i){window.natively.injected=!0,t&&(window.natively.min_app_version=t),i&&(window.natively.app_version=i);const e=window.natively.observers;for(natively.isDebug&&console.log("[INFO] Notify observers: ",e.length);e.length>0;){const t=e.shift();t()}},addObserver:function(t){window.natively.injected?t():(window.natively.isDebug&&console.log(`[DEBUG] addObserver: ${t}`),window.natively.observers.push(t))},trigger:function(t,i,e,n,o){const r=window.natively.isDebug;if(window.natively.injected)if(i>window.natively.app_version)r&&alert(`[ERROR] Please rebuild the app to use this functionality. App Version: ${window.natively.app_version}, feature version: ${i}`);else{if(e){let i;i=t?n+"_response_"+t:n+"_response",window[i]=function(n,o){$agent.response(),o.message&&r?alert(`[ERROR] Error message: ${o.message}`):(r&&console.log(`[DEBUG] Callback method: ${i}, body: ${JSON.stringify(n)}, respId: ${t}`),e(n))},o?o.response_id=t:o={response_id:t}}r&&console.log(`[DEBUG] Trigger method: ${n}, body: ${JSON.stringify(o)}`),$agent.trigger(n,o)}else window.natively.addObserver(()=>{window.natively.trigger(t,i,e,n,o)})},openLogger:function(){$agent.natively_logger()},closeApp:function(){window.natively.trigger(void 0,11,void 0,"app_close")},showProgress:function(t){window.natively.trigger(void 0,11,void 0,"app_show_progress",{toggle:t})},shareImage(t){window.natively.trigger(void 0,0,void 0,"share_image",{url:t})},shareText(t){window.natively.trigger(void 0,0,void 0,"share_text",{text:t})},shareTextAndImage(t,i){window.natively.trigger(void 0,0,void 0,"share_text_and_image",{url:i,text:t})},shareFile(t){window.natively.trigger(void 0,2,void 0,"share_file",{url:t})},openExternalURL(t){window.natively.trigger(void 0,0,void 0,"open_link",{url:t})},openExternalAppIOS(t){window.natively.trigger(void 0,0,void 0,"open_app",{url:t})},openAppSettings(){window.natively.trigger(void 0,0,void 0,"open_appsettings")},hapticPatternIOS(t,i){window.natively.trigger(void 0,7,void 0,"haptic_pattern",{pattern:t,delay:i})},hapticImpactIOS(t){window.natively.trigger(void 0,7,void 0,"haptic_impact",{type:t})},hapticNotificationIOS(t){window.natively.trigger(void 0,7,void 0,"haptic_notification",{type:t})},showAppToast(t,i){const e={};e.text=void 0===i?"":i,e.type=void 0===t?"DEFAULT":t,window.natively.trigger(void 0,0,void 0,"show_toast",e)},showAppBanner(t,i,e){const n={};n.type=void 0===t?"INFO":t,n.title=void 0===i?"":i,n.description=void 0===e?"":e,window.natively.trigger(void 0,0,void 0,"show_banner",n)},requestAppReview(){window.natively.trigger(void 0,0,void 0,"request_review")},setAppBackgroundColor(t){const i={color:t};window.natively.trigger(void 0,1,void 0,"app_background",i)},setAppProgressColor(t){const i={color:t};window.natively.trigger(void 0,1,void 0,"app_progress",i)},setAppSwipeNavigationIOS(t){const i={toggle:t};window.natively.trigger(void 0,1,void 0,"app_navigation",i)},setAppPullToRefresh(t){const i={toggle:t};window.natively.trigger(void 0,1,void 0,"app_pull",i)},setAppOrientation(t){const i={orientation:t};window.natively.trigger(void 0,3,void 0,"app_orientation",i)},setAppStatusBarStyleIOS(t){const i={style:t};window.natively.trigger(void 0,2,void 0,"status_bar_style",i)},async sendPushNotification(t,i,e,n){const o=e.filter(t=>t.length>0),r=[...new Set(o)];let a={app_id:n?"be83022a-1d08-45d0-a07a-0c3655666e17":t,include_player_ids:r};i.template_id?a.template_id=i.template_id:(a.headings={},a.headings.en=i.title||"Empty Title",a.contents={},a.contents.en=i.message||"Empty Message",i.subtitle&&(a.subtitle={},a.subtitle.en=i.subtitle),i.redirect_url&&(a.url=i.redirect_url));const s={method:"POST",headers:{"Content-type":"application/json"},body:JSON.stringify(a)};return await fetch("https://onesignal.com/api/v1/notifications",s)}},window.natively.addObserver(()=>window.natively.trigger(void 0,0,t=>{window.natively.min_app_version=t.minSDKVersion,window.natively.app_version=t.sdkVersion},"app_info",{}));class NativelyInfo{constructor(){const t=generateID();this.browserInfo=function(){const t="undefined"!=typeof $agent,i=window.navigator.userAgent.includes("Natively/iOS"),e=window.navigator.userAgent.includes("Natively/Android");return{isNativeApp:t,isIOSApp:i,isAndroidApp:e}},this.getAppInfo=function(i){window.natively.trigger(t,0,i,"app_info")},this.connectivity=function(t){window.natively.trigger(void 0,0,t,"connectivity")}}}class NativelyClipboard{constructor(){const t=generateID();this.copy=function(t){window.natively.trigger(void 0,11,void 0,"clipboard_copy",{text:t})},this.paste=function(i){window.natively.trigger(t,11,i,"clipboard_paste")}}}class NativelyPagesCache{constructor(){const t=generateID();this.currentPageCached=function(i){window.natively.trigger(t,4,i,"current_page_cached")},this.storeCurrentPage=function(i){window.natively.trigger(t,4,i,"store_current_page")},this.resetCurrentPage=function(i){window.natively.trigger(t,4,i,"reset_current_page")},this.resetAll=function(i){window.natively.trigger(t,4,i,"reset_all")}}}class NativelyNotifications{constructor(){const t=generateID();this.getOneSignalId=function(i){window.natively.trigger(t,0,i,"onesignal_playerid")},this.requestPermission=function(i,e){window.natively.trigger(t,0,e,"push_register",{fallbackToSettings:i})},this.getPermissionStatus=function(i){window.natively.trigger(t,0,i,"push_permission")}}}class NativelyGeolocation{constructor(){const t=generateID();this.getUserGeolocation=function(i,e){window.natively.trigger(t,0,e,"geolocation",{distance:i})},this.requestPermission=function(i){window.natively.trigger(t,0,i,"geo_register")},this.getPermissionStatus=function(i){window.natively.trigger(t,0,i,"geo_permission")}}}class NativelyLocation{constructor(){const t=generateID();this.current=function(i,e,n,o){window.natively.trigger(t,12,o,"location_current",{minAccuracy:i,accuracyType:e,priority:n})},this.permission=function(i){window.natively.trigger(t,6,i,"location_permission")},this.start=function(i,e,n,o,r){window.natively.trigger(t,12,r,"location_start",{minAccuracy:e,accuracyType:n,priority:o,interval:i})},this.stop=function(){window.natively.trigger(t,3,void 0,"location_stop",{})},this.startBackground=function(i,e,n,o,r,a){const s={};s.identifier=void 0===r?"empty":r,s.interval=void 0===i?6e4:i,s.minAccuracy=void 0===e?50:e,s.accuracyType=void 0===n?"Best":n,s.priority=void 0===o?"BALANCED":o,window.natively.trigger(t,12,a,"location_start_bg",s)},this.stopBackground=function(i){window.natively.trigger(t,4,i,"location_stop_bg",{})}}}class NativelyMessage{constructor(){const t=generateID();this.sendSMS=function(i,e,n){const o={};o.body=void 0===i?"":i,o.recipient=void 0===e?"":e,window.natively.trigger(t,0,n,"send_sms",o)},this.sendEmail=function(i,e,n,o){const r={};r.subject=void 0===i?"":i,r.body=void 0===e?"":e,r.recipient=void 0===n?"":n,window.natively.trigger(t,0,o,"send_email",r)}}}class NativelyStorage{constructor(){const t=generateID();this.setStorageValue=function(i,e){window.natively.trigger(t,0,void 0,"set_storage_value",{key:i,value:e})},this.getStorageValue=function(i,e){window.natively.trigger(t,0,e,"get_storage_value",{key:i})},this.removeStorageValue=function(i){window.natively.trigger(t,0,void 0,"remove_storage_value",{key:i})},this.resetStorage=function(){window.natively.trigger(t,0,void 0,"reset_storage")}}}class NativelyBiometrics{constructor(t){this.allowPass=t;const i=generateID();this.checkBiometricsSupport=function(e){window.natively.trigger(i,0,e,"biometrics_support",{allowPass:t})},this.checkCredentials=function(t){window.natively.trigger(i,0,t,"biometrics_has_credentials")},this.verifyUserIdentify=function(e){window.natively.trigger(i,0,e,"biometrics_verify",{allowPass:t})},this.getUserCredentials=function(e){window.natively.trigger(i,0,e,"biometrics_auth",{allowPass:t})},this.removeUserCredentials=function(t){window.natively.trigger(i,0,t,"biometrics_remove_credentials")},this.saveUserCredentials=function(e,n,o){window.natively.trigger(i,0,o,"biometrics_auth",{allowPass:t,login:e,password:n})}}}class NativelyDatePicker{constructor(){const t=generateID();this.showDatePicker=function(i,e,n,o,r){let a={};a.type=void 0===n?"DATE":n,a.style=void 0===o?"LIGHT":o,a.title=void 0===i?"":i,a.description=void 0===e?"":e,window.natively.trigger(t,0,r,"datepicker",a)}}}class NativelyCamera{constructor(){const t=generateID();this.showCamera=function(i,e,n,o){let r={};r.type=void 0===i?"photo":i,r.quality=void 0===e?"high":e,r.camera=void 0===n?"BACK":n,window.natively.trigger(t,2,o,"open_camera",r)}}}class NativelyHealth{constructor(){const t=generateID();this.available=function(i){window.natively.trigger(t,10,i,"health_available",{})},this.requestAuthorization=function(i,e,n){window.natively.trigger(t,10,n,"health_register",{write_data_types:i,read_data_types:e})},this.permissionStatus=function(i,e){window.natively.trigger(t,10,e,"health_permission",{data_type:i})},this.getAllCharacteristics=function(i){window.natively.trigger(t,10,i,"health_get_all_characteristics",{})},this.getStatisticQuantity=function(i,e,n,o,r){const a={data_type:i,interval:e};void 0!==n&&(a.start_date=n.getTime()),void 0!==o&&(a.end_date=o.getTime()),window.natively.trigger(t,10,r,"health_get_statistic_quantity",a)},this.getDailySleepAnalysis=function(i,e,n,o){const r={limit:n||100};void 0!==i&&(r.start_date=i.getTime()),void 0!==e&&(r.end_date=e.getTime()),window.natively.trigger(t,10,o,"health_get_daily_sleep_analysis",r)},this.getActivitySummary=function(i,e,n){const o={};void 0!==i&&(o.start_date=i.getTime()),void 0!==e&&(o.end_date=e.getTime()),window.natively.trigger(t,10,n,"health_get_activity_summary",o)}}}class NativelyScanner{constructor(){const t=generateID();this.showScanner=function(i){window.natively.trigger(t,2,i,"open_scanner",{})}}}class NativelyPurchases{constructor(){const t=generateID();this.login=function(i,e,n){const o=void 0===e?"":e;window.natively.trigger(t,3,n,"purchases_login",{login:i,email:o})},this.logout=function(i){window.natively.trigger(t,3,i,"purchases_logout",{})},this.customerId=function(i){window.natively.trigger(t,3,i,"purchases_customerid",{})},this.restore=function(i){window.natively.trigger(t,10,i,"purchases_restore",{})},this.purchasePackage=function(i,e){window.natively.trigger(t,3,e,"purchases_package",{packageId:i})},this.packagePrice=function(i,e){window.natively.trigger(t,8,e,"purchases_price",{packageId:i})}}}class NativelyContacts{constructor(){const t=generateID();this.getAllContacts=function(i){window.natively.trigger(t,3,i,"contacts_all",{})},this.createContact=function(i,e,n,o,r){let a={firstName:i};a.lastName=void 0===e?"":e,a.email=void 0===n?"":n,a.phone=void 0===o?"":o,window.natively.trigger(t,3,r,"contacts_save",a)}}}class NativelyMediaPicker{constructor(){const t=generateID();this.showMediaPicker=function(i){window.natively.trigger(t,8,i,"mediapicker",{})}}}
|