Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@vkontakte/vk-bridge

Package Overview
Dependencies
Maintainers
9
Versions
81
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vkontakte/vk-bridge - npm Package Compare versions

Comparing version 2.11.0 to 2.11.1

2

dist/browser.min.js

@@ -1,2 +0,2 @@

!function(){"use strict";var e=function(){return e=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var p in t=arguments[n])Object.prototype.hasOwnProperty.call(t,p)&&(e[p]=t[p]);return e},e.apply(this,arguments)};function t(e,t,n){if(n||2===arguments.length)for(var o,p=0,r=t.length;p<r;p++)!o&&p in t||(o||(o=Array.prototype.slice.call(t,0,p)),o[p]=t[p]);return e.concat(o||Array.prototype.slice.call(t))}function n(t,n){var o,p,r=(o={current:0,next:function(){return++this.current}},p={},{add:function(e,t){var n=null!=t?t:o.next();return p[n]=e,n},resolve:function(e,t,n){var o=p[e];o&&(n(t)?o.resolve(t):o.reject(t),p[e]=null)}});return n((function(e){if(e.detail&&e.detail.data&&"object"==typeof e.detail.data&&"request_id"in e.detail.data){var t=e.detail.data,n=t.request_id,o=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var p=0;for(o=Object.getOwnPropertySymbols(e);p<o.length;p++)t.indexOf(o[p])<0&&Object.prototype.propertyIsEnumerable.call(e,o[p])&&(n[o[p]]=e[o[p]])}return n}(t,["request_id"]);n&&r.resolve(n,o,(function(e){return!("error_type"in e)}))}})),function(n,o){return void 0===o&&(o={}),new Promise((function(p,i){var a=r.add({resolve:p,reject:i},o.request_id);t(n,e(e({},o),{request_id:a}))}))}}var o="undefined"!=typeof window,p=Boolean(o&&window.AndroidBridge),r=Boolean(o&&window.webkit&&window.webkit.messageHandlers&&window.webkit.messageHandlers.VKWebAppClose),i=Boolean(o&&window.ReactNativeWebView&&"function"==typeof window.ReactNativeWebView.postMessage),a=o&&!p&&!r,s=a&&/(^\?|&)vk_platform=mobile_web(&|$)/.test(location.search),d=a?"message":"VKWebAppEvent",b=t(["VKWebAppInit","VKWebAppGetCommunityAuthToken","VKWebAppAddToCommunity","VKWebAppAddToHomeScreenInfo","VKWebAppClose","VKWebAppCopyText","VKWebAppCreateHash","VKWebAppGetUserInfo","VKWebAppSetLocation","VKWebAppSendToClient","VKWebAppGetClientVersion","VKWebAppGetPhoneNumber","VKWebAppGetEmail","VKWebAppGetGroupInfo","VKWebAppGetGeodata","VKWebAppGetCommunityToken","VKWebAppGetConfig","VKWebAppGetLaunchParams","VKWebAppSetTitle","VKWebAppGetAuthToken","VKWebAppCallAPIMethod","VKWebAppJoinGroup","VKWebAppLeaveGroup","VKWebAppAllowMessagesFromGroup","VKWebAppDenyNotifications","VKWebAppAllowNotifications","VKWebAppOpenPayForm","VKWebAppOpenApp","VKWebAppShare","VKWebAppShowWallPostBox","VKWebAppScroll","VKWebAppShowOrderBox","VKWebAppShowLeaderBoardBox","VKWebAppShowInviteBox","VKWebAppShowRequestBox","VKWebAppAddToFavorites","VKWebAppShowStoryBox","VKWebAppStorageGet","VKWebAppStorageGetKeys","VKWebAppStorageSet","VKWebAppFlashGetInfo","VKWebAppSubscribeStoryApp","VKWebAppOpenWallPost","VKWebAppCheckAllowedScopes","VKWebAppCheckBannerAd","VKWebAppHideBannerAd","VKWebAppShowBannerAd","VKWebAppCheckNativeAds","VKWebAppShowNativeAds","VKWebAppRetargetingPixel","VKWebAppConversionHit","VKWebAppShowSubscriptionBox","VKWebAppCheckSurvey","VKWebAppShowSurvey","VKWebAppScrollTop","VKWebAppScrollTopStart","VKWebAppScrollTopStop","VKWebAppShowSlidesSheet","VKWebAppTranslate","VKWebAppRecommend"],a&&!s?["VKWebAppResizeWindow","VKWebAppAddToMenu","VKWebAppShowInstallPushBox","VKWebAppGetFriends","VKWebAppShowCommunityWidgetPreviewBox","VKWebAppCallStart","VKWebAppCallJoin","VKWebAppCallGetStatus"]:["VKWebAppShowImages"],!0),A=o?window.AndroidBridge:void 0,l=r?window.webkit.messageHandlers:void 0,u=a?parent:void 0;var c,W,V,K,f,w,S;!function(e){e.REWARD="reward",e.INTERSTITIAL="interstitial"}(c||(c={})),function(e){e.RESIZE="resize",e.OVERLAY="overlay"}(W||(W={})),function(e){e.TOP="top",e.BOTTOM="bottom"}(V||(V={})),function(e){e.CAMERA="camera",e.LOCATION="location",e.PHOTO="photo"}(K||(K={})),function(e){e.RU="ru",e.UK="uk",e.UA="ua",e.EN="en",e.BE="be",e.KZ="kz",e.PT="pt",e.ES="es"}(f||(f={})),function(e){e.ADMIN="admin",e.EDITOR="editor",e.MEMBER="member",e.MODER="moder",e.NONE="none"}(w||(w={})),function(e){e.DESKTOP_WEB="desktop_web",e.DESKTOP_WEB_MESSENGER="desktop_web_messenger",e.DESKTOP_APP_MESSENGER="desktop_app_messenger",e.MOBILE_WEB="mobile_web",e.MOBILE_ANDROID="mobile_android",e.MOBILE_ANDROID_MESSENGER="mobile_android_messenger",e.MOBILE_IPHONE="mobile_iphone",e.MOBILE_IPHONE_MESSENGER="mobile_iphone_messenger",e.MOBILE_IPAD="mobile_ipad"}(S||(S={}));var m=function(e){var o=void 0,s=[];function c(e){s.push(e)}function W(){return r||p}function V(){return a&&window.parent!==window}function K(){return W()||V()}function f(e){if(r||p)return t([],s,!0).map((function(t){return t.call(null,e)}));var n=null==e?void 0:e.data;if(a&&n){if(i&&"string"==typeof n)try{n=JSON.parse(n)}catch(e){}var d=n.type,b=n.data,A=n.frameId;d&&("VKWebAppSettings"!==d?t([],s,!0).map((function(e){return e({detail:{type:d,data:b}})})):o=A)}}i&&/(android)/i.test(navigator.userAgent)?document.addEventListener(d,f):"undefined"!=typeof window&&"addEventListener"in window&&window.addEventListener(d,f);var w=n((function(t,n){A&&A[t]?A[t](JSON.stringify(n)):l&&l[t]&&"function"==typeof l[t].postMessage?l[t].postMessage(n):i?window.ReactNativeWebView.postMessage(JSON.stringify({handler:t,params:n})):u&&"function"==typeof u.postMessage&&u.postMessage({handler:t,params:n,type:"vk-connect",webFrameId:o,connectVersion:e},"*")}),c);return{send:w,sendPromise:w,subscribe:c,unsubscribe:function(e){var t=s.indexOf(e);t>-1&&s.splice(t,1)},supports:function(e){return p?!(!A||"function"!=typeof A[e]):r?!(!l||!l[e]||"function"!=typeof l[e].postMessage):!!a&&b.includes(e)},isWebView:W,isIframe:V,isEmbedded:K,isStandalone:function(){return!K()}}}("2.11.0");window.vkBridge=window.vkConnect=m}();
!function(){"use strict";var e=function(){return e=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var p in t=arguments[n])Object.prototype.hasOwnProperty.call(t,p)&&(e[p]=t[p]);return e},e.apply(this,arguments)};function t(e,t,n){if(n||2===arguments.length)for(var o,p=0,r=t.length;p<r;p++)!o&&p in t||(o||(o=Array.prototype.slice.call(t,0,p)),o[p]=t[p]);return e.concat(o||Array.prototype.slice.call(t))}function n(t,n){var o,p,r=(o={current:0,next:function(){return++this.current}},p={},{add:function(e,t){var n=null!=t?t:o.next();return p[n]=e,n},resolve:function(e,t,n){var o=p[e];o&&(n(t)?o.resolve(t):o.reject(t),p[e]=null)}});return n((function(e){if(e.detail&&e.detail.data&&"object"==typeof e.detail.data&&"request_id"in e.detail.data){var t=e.detail.data,n=t.request_id,o=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var p=0;for(o=Object.getOwnPropertySymbols(e);p<o.length;p++)t.indexOf(o[p])<0&&Object.prototype.propertyIsEnumerable.call(e,o[p])&&(n[o[p]]=e[o[p]])}return n}(t,["request_id"]);n&&r.resolve(n,o,(function(e){return!("error_type"in e)}))}})),function(n,o){return void 0===o&&(o={}),new Promise((function(p,i){var a=r.add({resolve:p,reject:i},o.request_id);t(n,e(e({},o),{request_id:a}))}))}}var o="undefined"!=typeof window,p=Boolean(o&&window.AndroidBridge),r=Boolean(o&&window.webkit&&window.webkit.messageHandlers&&window.webkit.messageHandlers.VKWebAppClose),i=Boolean(o&&window.ReactNativeWebView&&"function"==typeof window.ReactNativeWebView.postMessage),a=o&&!p&&!r,s=a&&/(^\?|&)vk_platform=mobile_web(&|$)/.test(location.search),d=a?"message":"VKWebAppEvent",b=t(["VKWebAppInit","VKWebAppGetCommunityAuthToken","VKWebAppAddToCommunity","VKWebAppAddToHomeScreenInfo","VKWebAppClose","VKWebAppCopyText","VKWebAppCreateHash","VKWebAppGetUserInfo","VKWebAppSetLocation","VKWebAppSendToClient","VKWebAppGetClientVersion","VKWebAppGetPhoneNumber","VKWebAppGetEmail","VKWebAppGetGroupInfo","VKWebAppGetGeodata","VKWebAppGetCommunityToken","VKWebAppGetConfig","VKWebAppGetLaunchParams","VKWebAppSetTitle","VKWebAppGetAuthToken","VKWebAppCallAPIMethod","VKWebAppJoinGroup","VKWebAppLeaveGroup","VKWebAppAllowMessagesFromGroup","VKWebAppDenyNotifications","VKWebAppAllowNotifications","VKWebAppOpenPayForm","VKWebAppOpenApp","VKWebAppShare","VKWebAppShowWallPostBox","VKWebAppScroll","VKWebAppShowOrderBox","VKWebAppShowLeaderBoardBox","VKWebAppShowInviteBox","VKWebAppShowRequestBox","VKWebAppAddToFavorites","VKWebAppShowStoryBox","VKWebAppStorageGet","VKWebAppStorageGetKeys","VKWebAppStorageSet","VKWebAppFlashGetInfo","VKWebAppSubscribeStoryApp","VKWebAppOpenWallPost","VKWebAppCheckAllowedScopes","VKWebAppCheckBannerAd","VKWebAppHideBannerAd","VKWebAppShowBannerAd","VKWebAppCheckNativeAds","VKWebAppShowNativeAds","VKWebAppRetargetingPixel","VKWebAppConversionHit","VKWebAppShowSubscriptionBox","VKWebAppCheckSurvey","VKWebAppShowSurvey","VKWebAppScrollTop","VKWebAppScrollTopStart","VKWebAppScrollTopStop","VKWebAppShowSlidesSheet","VKWebAppTranslate","VKWebAppRecommend"],a&&!s?["VKWebAppResizeWindow","VKWebAppAddToMenu","VKWebAppShowInstallPushBox","VKWebAppGetFriends","VKWebAppShowCommunityWidgetPreviewBox","VKWebAppCallStart","VKWebAppCallJoin","VKWebAppCallGetStatus"]:["VKWebAppShowImages"],!0),A=o?window.AndroidBridge:void 0,l=r?window.webkit.messageHandlers:void 0,u=a?parent:void 0;var c,W,V,K,f,w,S;!function(e){e.REWARD="reward",e.INTERSTITIAL="interstitial"}(c||(c={})),function(e){e.RESIZE="resize",e.OVERLAY="overlay"}(W||(W={})),function(e){e.TOP="top",e.BOTTOM="bottom"}(V||(V={})),function(e){e.CAMERA="camera",e.LOCATION="location",e.PHOTO="photo"}(K||(K={})),function(e){e.RU="ru",e.UK="uk",e.UA="ua",e.EN="en",e.BE="be",e.KZ="kz",e.PT="pt",e.ES="es"}(f||(f={})),function(e){e.ADMIN="admin",e.EDITOR="editor",e.MEMBER="member",e.MODER="moder",e.NONE="none"}(w||(w={})),function(e){e.DESKTOP_WEB="desktop_web",e.DESKTOP_WEB_MESSENGER="desktop_web_messenger",e.DESKTOP_APP_MESSENGER="desktop_app_messenger",e.MOBILE_WEB="mobile_web",e.MOBILE_ANDROID="mobile_android",e.MOBILE_ANDROID_MESSENGER="mobile_android_messenger",e.MOBILE_IPHONE="mobile_iphone",e.MOBILE_IPHONE_MESSENGER="mobile_iphone_messenger",e.MOBILE_IPAD="mobile_ipad"}(S||(S={}));var m=function(e){var o=void 0,s=[];function c(e){s.push(e)}function W(){return r||p}function V(){return a&&window.parent!==window}function K(){return W()||V()}function f(e){if(r||p)return t([],s,!0).map((function(t){return t.call(null,e)}));var n=null==e?void 0:e.data;if(a&&n){if(i&&"string"==typeof n)try{n=JSON.parse(n)}catch(e){}var d=n.type,b=n.data,A=n.frameId;d&&("VKWebAppSettings"!==d?t([],s,!0).map((function(e){return e({detail:{type:d,data:b}})})):o=A)}}i&&/(android)/i.test(navigator.userAgent)?document.addEventListener(d,f):"undefined"!=typeof window&&"addEventListener"in window&&window.addEventListener(d,f);var w=n((function(t,n){A&&A[t]?A[t](JSON.stringify(n)):l&&l[t]&&"function"==typeof l[t].postMessage?l[t].postMessage(n):i?window.ReactNativeWebView.postMessage(JSON.stringify({handler:t,params:n})):u&&"function"==typeof u.postMessage&&u.postMessage({handler:t,params:n,type:"vk-connect",webFrameId:o,connectVersion:e},"*")}),c);return{send:w,sendPromise:w,subscribe:c,unsubscribe:function(e){var t=s.indexOf(e);t>-1&&s.splice(t,1)},supports:function(e){return p?!(!A||"function"!=typeof A[e]):r?!(!l||!l[e]||"function"!=typeof l[e].postMessage):!!a&&b.includes(e)},isWebView:W,isIframe:V,isEmbedded:K,isStandalone:function(){return!K()}}}("2.11.1");window.vkBridge=window.vkConnect=m}();
//# sourceMappingURL=browser.min.js.map

@@ -422,3 +422,3 @@ /******************************************************************************

var version = "2.11.0";
var version = "2.11.1";

@@ -425,0 +425,0 @@ var EAdsFormats;

@@ -1,2 +0,2 @@

"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=function(){return e=Object.assign||function(e){for(var t,o=1,n=arguments.length;o<n;o++)for(var r in t=arguments[o])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},e.apply(this,arguments)};function t(e,t,o){if(o||2===arguments.length)for(var n,r=0,a=t.length;r<a;r++)!n&&r in t||(n||(n=Array.prototype.slice.call(t,0,r)),n[r]=t[r]);return e.concat(n||Array.prototype.slice.call(t))}function o(t,o){var n,r,a=(n={current:0,next:function(){return++this.current}},r={},{add:function(e,t){var o=null!=t?t:n.next();return r[o]=e,o},resolve:function(e,t,o){var n=r[e];n&&(o(t)?n.resolve(t):n.reject(t),r[e]=null)}});return o((function(e){if(e.detail&&e.detail.data&&"object"==typeof e.detail.data&&"request_id"in e.detail.data){var t=e.detail.data,o=t.request_id,n=function(e,t){var o={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(o[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(n=Object.getOwnPropertySymbols(e);r<n.length;r++)t.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(e,n[r])&&(o[n[r]]=e[n[r]])}return o}(t,["request_id"]);o&&a.resolve(o,n,(function(e){return!("error_type"in e)}))}})),function(o,n){return void 0===n&&(n={}),new Promise((function(r,p){var s=a.add({resolve:r,reject:p},n.request_id);t(o,e(e({},n),{request_id:s}))}))}}var n="undefined"!=typeof window,r=Boolean(n&&window.AndroidBridge),a=Boolean(n&&window.webkit&&window.webkit.messageHandlers&&window.webkit.messageHandlers.VKWebAppClose),p=Boolean(n&&window.ReactNativeWebView&&"function"==typeof window.ReactNativeWebView.postMessage),s=n&&!r&&!a,i=s&&/(^\?|&)vk_platform=mobile_web(&|$)/.test(location.search),u=s?"message":"VKWebAppEvent",d=t(["VKWebAppInit","VKWebAppGetCommunityAuthToken","VKWebAppAddToCommunity","VKWebAppAddToHomeScreenInfo","VKWebAppClose","VKWebAppCopyText","VKWebAppCreateHash","VKWebAppGetUserInfo","VKWebAppSetLocation","VKWebAppSendToClient","VKWebAppGetClientVersion","VKWebAppGetPhoneNumber","VKWebAppGetEmail","VKWebAppGetGroupInfo","VKWebAppGetGeodata","VKWebAppGetCommunityToken","VKWebAppGetConfig","VKWebAppGetLaunchParams","VKWebAppSetTitle","VKWebAppGetAuthToken","VKWebAppCallAPIMethod","VKWebAppJoinGroup","VKWebAppLeaveGroup","VKWebAppAllowMessagesFromGroup","VKWebAppDenyNotifications","VKWebAppAllowNotifications","VKWebAppOpenPayForm","VKWebAppOpenApp","VKWebAppShare","VKWebAppShowWallPostBox","VKWebAppScroll","VKWebAppShowOrderBox","VKWebAppShowLeaderBoardBox","VKWebAppShowInviteBox","VKWebAppShowRequestBox","VKWebAppAddToFavorites","VKWebAppShowStoryBox","VKWebAppStorageGet","VKWebAppStorageGetKeys","VKWebAppStorageSet","VKWebAppFlashGetInfo","VKWebAppSubscribeStoryApp","VKWebAppOpenWallPost","VKWebAppCheckAllowedScopes","VKWebAppCheckBannerAd","VKWebAppHideBannerAd","VKWebAppShowBannerAd","VKWebAppCheckNativeAds","VKWebAppShowNativeAds","VKWebAppRetargetingPixel","VKWebAppConversionHit","VKWebAppShowSubscriptionBox","VKWebAppCheckSurvey","VKWebAppShowSurvey","VKWebAppScrollTop","VKWebAppScrollTopStart","VKWebAppScrollTopStop","VKWebAppShowSlidesSheet","VKWebAppTranslate","VKWebAppRecommend"],s&&!i?["VKWebAppResizeWindow","VKWebAppAddToMenu","VKWebAppShowInstallPushBox","VKWebAppGetFriends","VKWebAppShowCommunityWidgetPreviewBox","VKWebAppCallStart","VKWebAppCallJoin","VKWebAppCallGetStatus"]:["VKWebAppShowImages"],!0),c=n?window.AndroidBridge:void 0,l=a?window.webkit.messageHandlers:void 0,b=s?parent:void 0;var A,f,v,m,W,V,_;exports.EAdsFormats=void 0,(A=exports.EAdsFormats||(exports.EAdsFormats={})).REWARD="reward",A.INTERSTITIAL="interstitial",exports.BannerAdLayoutType=void 0,(f=exports.BannerAdLayoutType||(exports.BannerAdLayoutType={})).RESIZE="resize",f.OVERLAY="overlay",exports.BannerAdLocation=void 0,(v=exports.BannerAdLocation||(exports.BannerAdLocation={})).TOP="top",v.BOTTOM="bottom",exports.EGrantedPermission=void 0,(m=exports.EGrantedPermission||(exports.EGrantedPermission={})).CAMERA="camera",m.LOCATION="location",m.PHOTO="photo",exports.EGetLaunchParamsResponseLanguages=void 0,(W=exports.EGetLaunchParamsResponseLanguages||(exports.EGetLaunchParamsResponseLanguages={})).RU="ru",W.UK="uk",W.UA="ua",W.EN="en",W.BE="be",W.KZ="kz",W.PT="pt",W.ES="es",exports.EGetLaunchParamsResponseGroupRole=void 0,(V=exports.EGetLaunchParamsResponseGroupRole||(exports.EGetLaunchParamsResponseGroupRole={})).ADMIN="admin",V.EDITOR="editor",V.MEMBER="member",V.MODER="moder",V.NONE="none",exports.EGetLaunchParamsResponsePlatforms=void 0,(_=exports.EGetLaunchParamsResponsePlatforms||(exports.EGetLaunchParamsResponsePlatforms={})).DESKTOP_WEB="desktop_web",_.DESKTOP_WEB_MESSENGER="desktop_web_messenger",_.DESKTOP_APP_MESSENGER="desktop_app_messenger",_.MOBILE_WEB="mobile_web",_.MOBILE_ANDROID="mobile_android",_.MOBILE_ANDROID_MESSENGER="mobile_android_messenger",_.MOBILE_IPHONE="mobile_iphone",_.MOBILE_IPHONE_MESSENGER="mobile_iphone_messenger",_.MOBILE_IPAD="mobile_ipad";var K=function(e){var n=void 0,i=[];function A(e){i.push(e)}function f(){return a||r}function v(){return s&&window.parent!==window}function m(){return f()||v()}function W(e){if(a||r)return t([],i,!0).map((function(t){return t.call(null,e)}));var o=null==e?void 0:e.data;if(s&&o){if(p&&"string"==typeof o)try{o=JSON.parse(o)}catch(e){}var u=o.type,d=o.data,c=o.frameId;u&&("VKWebAppSettings"!==u?t([],i,!0).map((function(e){return e({detail:{type:u,data:d}})})):n=c)}}p&&/(android)/i.test(navigator.userAgent)?document.addEventListener(u,W):"undefined"!=typeof window&&"addEventListener"in window&&window.addEventListener(u,W);var V=o((function(t,o){c&&c[t]?c[t](JSON.stringify(o)):l&&l[t]&&"function"==typeof l[t].postMessage?l[t].postMessage(o):p?window.ReactNativeWebView.postMessage(JSON.stringify({handler:t,params:o})):b&&"function"==typeof b.postMessage&&b.postMessage({handler:t,params:o,type:"vk-connect",webFrameId:n,connectVersion:e},"*")}),A);return{send:V,sendPromise:V,subscribe:A,unsubscribe:function(e){var t=i.indexOf(e);t>-1&&i.splice(t,1)},supports:function(e){return r?!(!c||"function"!=typeof c[e]):a?!(!l||!l[e]||"function"!=typeof l[e].postMessage):!!s&&d.includes(e)},isWebView:f,isIframe:v,isEmbedded:m,isStandalone:function(){return!m()}}}("2.11.0");exports.applyMiddleware=function t(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return o.includes(void 0)||o.includes(null)?t.apply(void 0,o.filter((function(e){return"function"==typeof e}))):function(t){if(0===o.length)return t;var n,r={subscribe:t.subscribe,send:function(){for(var e=[],o=0;o<arguments.length;o++)e[o]=arguments[o];return t.send.apply(t,e)}},a=o.filter((function(e){return"function"==typeof e})).map((function(e){return e(r)})).reduce((function(e,t){return function(o){return e(t(o))}}));return n=a(t.send),e(e({},t),{send:n})}},exports.default=K,exports.parseURLSearchParamsForGetLaunchParams=function(e){var t={};try{var o=new URLSearchParams(e);o.forEach((function(e,o){switch(o){case"vk_ts":case"vk_is_recommended":case"vk_profile_id":case"vk_has_profile_button":case"vk_testing_group_id":case"vk_user_id":case"vk_app_id":case"vk_group_id":t[o]=Number(e);break;case"sign":case"vk_chat_id":case"vk_ref":case"vk_access_token_settings":t[o]=e;break;case"odr_enabled":t.odr_enabled="1"===e?1:void 0;break;case"vk_is_app_user":case"vk_are_notifications_enabled":case"vk_is_favorite":t[o]=function(e){switch(e){case"0":return 0;case"1":return 1;default:return}}(e);break;case"vk_language":t.vk_language=function(e){return Object.values(exports.EGetLaunchParamsResponseLanguages).some((function(t){return t===e}))}(e)?e:void 0;break;case"vk_viewer_group_role":t.vk_viewer_group_role=function(e){return Object.values(exports.EGetLaunchParamsResponseGroupRole).some((function(t){return t===e}))}(e)?e:void 0;break;case"vk_platform":t.vk_platform=function(e){return Object.values(exports.EGetLaunchParamsResponsePlatforms).some((function(t){return t===e}))}(e)?e:void 0}}))}catch(e){console.warn(e)}return t};
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=function(){return e=Object.assign||function(e){for(var t,o=1,n=arguments.length;o<n;o++)for(var r in t=arguments[o])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},e.apply(this,arguments)};function t(e,t,o){if(o||2===arguments.length)for(var n,r=0,a=t.length;r<a;r++)!n&&r in t||(n||(n=Array.prototype.slice.call(t,0,r)),n[r]=t[r]);return e.concat(n||Array.prototype.slice.call(t))}function o(t,o){var n,r,a=(n={current:0,next:function(){return++this.current}},r={},{add:function(e,t){var o=null!=t?t:n.next();return r[o]=e,o},resolve:function(e,t,o){var n=r[e];n&&(o(t)?n.resolve(t):n.reject(t),r[e]=null)}});return o((function(e){if(e.detail&&e.detail.data&&"object"==typeof e.detail.data&&"request_id"in e.detail.data){var t=e.detail.data,o=t.request_id,n=function(e,t){var o={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(o[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(n=Object.getOwnPropertySymbols(e);r<n.length;r++)t.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(e,n[r])&&(o[n[r]]=e[n[r]])}return o}(t,["request_id"]);o&&a.resolve(o,n,(function(e){return!("error_type"in e)}))}})),function(o,n){return void 0===n&&(n={}),new Promise((function(r,p){var s=a.add({resolve:r,reject:p},n.request_id);t(o,e(e({},n),{request_id:s}))}))}}var n="undefined"!=typeof window,r=Boolean(n&&window.AndroidBridge),a=Boolean(n&&window.webkit&&window.webkit.messageHandlers&&window.webkit.messageHandlers.VKWebAppClose),p=Boolean(n&&window.ReactNativeWebView&&"function"==typeof window.ReactNativeWebView.postMessage),s=n&&!r&&!a,i=s&&/(^\?|&)vk_platform=mobile_web(&|$)/.test(location.search),u=s?"message":"VKWebAppEvent",d=t(["VKWebAppInit","VKWebAppGetCommunityAuthToken","VKWebAppAddToCommunity","VKWebAppAddToHomeScreenInfo","VKWebAppClose","VKWebAppCopyText","VKWebAppCreateHash","VKWebAppGetUserInfo","VKWebAppSetLocation","VKWebAppSendToClient","VKWebAppGetClientVersion","VKWebAppGetPhoneNumber","VKWebAppGetEmail","VKWebAppGetGroupInfo","VKWebAppGetGeodata","VKWebAppGetCommunityToken","VKWebAppGetConfig","VKWebAppGetLaunchParams","VKWebAppSetTitle","VKWebAppGetAuthToken","VKWebAppCallAPIMethod","VKWebAppJoinGroup","VKWebAppLeaveGroup","VKWebAppAllowMessagesFromGroup","VKWebAppDenyNotifications","VKWebAppAllowNotifications","VKWebAppOpenPayForm","VKWebAppOpenApp","VKWebAppShare","VKWebAppShowWallPostBox","VKWebAppScroll","VKWebAppShowOrderBox","VKWebAppShowLeaderBoardBox","VKWebAppShowInviteBox","VKWebAppShowRequestBox","VKWebAppAddToFavorites","VKWebAppShowStoryBox","VKWebAppStorageGet","VKWebAppStorageGetKeys","VKWebAppStorageSet","VKWebAppFlashGetInfo","VKWebAppSubscribeStoryApp","VKWebAppOpenWallPost","VKWebAppCheckAllowedScopes","VKWebAppCheckBannerAd","VKWebAppHideBannerAd","VKWebAppShowBannerAd","VKWebAppCheckNativeAds","VKWebAppShowNativeAds","VKWebAppRetargetingPixel","VKWebAppConversionHit","VKWebAppShowSubscriptionBox","VKWebAppCheckSurvey","VKWebAppShowSurvey","VKWebAppScrollTop","VKWebAppScrollTopStart","VKWebAppScrollTopStop","VKWebAppShowSlidesSheet","VKWebAppTranslate","VKWebAppRecommend"],s&&!i?["VKWebAppResizeWindow","VKWebAppAddToMenu","VKWebAppShowInstallPushBox","VKWebAppGetFriends","VKWebAppShowCommunityWidgetPreviewBox","VKWebAppCallStart","VKWebAppCallJoin","VKWebAppCallGetStatus"]:["VKWebAppShowImages"],!0),c=n?window.AndroidBridge:void 0,l=a?window.webkit.messageHandlers:void 0,b=s?parent:void 0;var A,f,v,m,W,V,_;exports.EAdsFormats=void 0,(A=exports.EAdsFormats||(exports.EAdsFormats={})).REWARD="reward",A.INTERSTITIAL="interstitial",exports.BannerAdLayoutType=void 0,(f=exports.BannerAdLayoutType||(exports.BannerAdLayoutType={})).RESIZE="resize",f.OVERLAY="overlay",exports.BannerAdLocation=void 0,(v=exports.BannerAdLocation||(exports.BannerAdLocation={})).TOP="top",v.BOTTOM="bottom",exports.EGrantedPermission=void 0,(m=exports.EGrantedPermission||(exports.EGrantedPermission={})).CAMERA="camera",m.LOCATION="location",m.PHOTO="photo",exports.EGetLaunchParamsResponseLanguages=void 0,(W=exports.EGetLaunchParamsResponseLanguages||(exports.EGetLaunchParamsResponseLanguages={})).RU="ru",W.UK="uk",W.UA="ua",W.EN="en",W.BE="be",W.KZ="kz",W.PT="pt",W.ES="es",exports.EGetLaunchParamsResponseGroupRole=void 0,(V=exports.EGetLaunchParamsResponseGroupRole||(exports.EGetLaunchParamsResponseGroupRole={})).ADMIN="admin",V.EDITOR="editor",V.MEMBER="member",V.MODER="moder",V.NONE="none",exports.EGetLaunchParamsResponsePlatforms=void 0,(_=exports.EGetLaunchParamsResponsePlatforms||(exports.EGetLaunchParamsResponsePlatforms={})).DESKTOP_WEB="desktop_web",_.DESKTOP_WEB_MESSENGER="desktop_web_messenger",_.DESKTOP_APP_MESSENGER="desktop_app_messenger",_.MOBILE_WEB="mobile_web",_.MOBILE_ANDROID="mobile_android",_.MOBILE_ANDROID_MESSENGER="mobile_android_messenger",_.MOBILE_IPHONE="mobile_iphone",_.MOBILE_IPHONE_MESSENGER="mobile_iphone_messenger",_.MOBILE_IPAD="mobile_ipad";var K=function(e){var n=void 0,i=[];function A(e){i.push(e)}function f(){return a||r}function v(){return s&&window.parent!==window}function m(){return f()||v()}function W(e){if(a||r)return t([],i,!0).map((function(t){return t.call(null,e)}));var o=null==e?void 0:e.data;if(s&&o){if(p&&"string"==typeof o)try{o=JSON.parse(o)}catch(e){}var u=o.type,d=o.data,c=o.frameId;u&&("VKWebAppSettings"!==u?t([],i,!0).map((function(e){return e({detail:{type:u,data:d}})})):n=c)}}p&&/(android)/i.test(navigator.userAgent)?document.addEventListener(u,W):"undefined"!=typeof window&&"addEventListener"in window&&window.addEventListener(u,W);var V=o((function(t,o){c&&c[t]?c[t](JSON.stringify(o)):l&&l[t]&&"function"==typeof l[t].postMessage?l[t].postMessage(o):p?window.ReactNativeWebView.postMessage(JSON.stringify({handler:t,params:o})):b&&"function"==typeof b.postMessage&&b.postMessage({handler:t,params:o,type:"vk-connect",webFrameId:n,connectVersion:e},"*")}),A);return{send:V,sendPromise:V,subscribe:A,unsubscribe:function(e){var t=i.indexOf(e);t>-1&&i.splice(t,1)},supports:function(e){return r?!(!c||"function"!=typeof c[e]):a?!(!l||!l[e]||"function"!=typeof l[e].postMessage):!!s&&d.includes(e)},isWebView:f,isIframe:v,isEmbedded:m,isStandalone:function(){return!m()}}}("2.11.1");exports.applyMiddleware=function t(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return o.includes(void 0)||o.includes(null)?t.apply(void 0,o.filter((function(e){return"function"==typeof e}))):function(t){if(0===o.length)return t;var n,r={subscribe:t.subscribe,send:function(){for(var e=[],o=0;o<arguments.length;o++)e[o]=arguments[o];return t.send.apply(t,e)}},a=o.filter((function(e){return"function"==typeof e})).map((function(e){return e(r)})).reduce((function(e,t){return function(o){return e(t(o))}}));return n=a(t.send),e(e({},t),{send:n})}},exports.default=K,exports.parseURLSearchParamsForGetLaunchParams=function(e){var t={};try{var o=new URLSearchParams(e);o.forEach((function(e,o){switch(o){case"vk_ts":case"vk_is_recommended":case"vk_profile_id":case"vk_has_profile_button":case"vk_testing_group_id":case"vk_user_id":case"vk_app_id":case"vk_group_id":t[o]=Number(e);break;case"sign":case"vk_chat_id":case"vk_ref":case"vk_access_token_settings":t[o]=e;break;case"odr_enabled":t.odr_enabled="1"===e?1:void 0;break;case"vk_is_app_user":case"vk_are_notifications_enabled":case"vk_is_favorite":t[o]=function(e){switch(e){case"0":return 0;case"1":return 1;default:return}}(e);break;case"vk_language":t.vk_language=function(e){return Object.values(exports.EGetLaunchParamsResponseLanguages).some((function(t){return t===e}))}(e)?e:void 0;break;case"vk_viewer_group_role":t.vk_viewer_group_role=function(e){return Object.values(exports.EGetLaunchParamsResponseGroupRole).some((function(t){return t===e}))}(e)?e:void 0;break;case"vk_platform":t.vk_platform=function(e){return Object.values(exports.EGetLaunchParamsResponsePlatforms).some((function(t){return t===e}))}(e)?e:void 0}}))}catch(e){console.warn(e)}return t};
//# sourceMappingURL=index.js.map

@@ -1,2 +0,2 @@

!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n((e="undefined"!=typeof globalThis?globalThis:e||self).vkBridge={})}(this,(function(e){"use strict";var n=function(){return n=Object.assign||function(e){for(var n,t=1,o=arguments.length;t<o;t++)for(var r in n=arguments[t])Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);return e},n.apply(this,arguments)};function t(e,n,t){if(t||2===arguments.length)for(var o,r=0,a=n.length;r<a;r++)!o&&r in n||(o||(o=Array.prototype.slice.call(n,0,r)),o[r]=n[r]);return e.concat(o||Array.prototype.slice.call(n))}function o(e,t){var o,r,a=(o={current:0,next:function(){return++this.current}},r={},{add:function(e,n){var t=null!=n?n:o.next();return r[t]=e,t},resolve:function(e,n,t){var o=r[e];o&&(t(n)?o.resolve(n):o.reject(n),r[e]=null)}});return t((function(e){if(e.detail&&e.detail.data&&"object"==typeof e.detail.data&&"request_id"in e.detail.data){var n=e.detail.data,t=n.request_id,o=function(e,n){var t={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&n.indexOf(o)<0&&(t[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(e);r<o.length;r++)n.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(t[o[r]]=e[o[r]])}return t}(n,["request_id"]);t&&a.resolve(t,o,(function(e){return!("error_type"in e)}))}})),function(t,o){return void 0===o&&(o={}),new Promise((function(r,p){var i=a.add({resolve:r,reject:p},o.request_id);e(t,n(n({},o),{request_id:i}))}))}}var r="undefined"!=typeof window,a=Boolean(r&&window.AndroidBridge),p=Boolean(r&&window.webkit&&window.webkit.messageHandlers&&window.webkit.messageHandlers.VKWebAppClose),i=Boolean(r&&window.ReactNativeWebView&&"function"==typeof window.ReactNativeWebView.postMessage),s=r&&!a&&!p,u=s&&/(^\?|&)vk_platform=mobile_web(&|$)/.test(location.search),d=s?"message":"VKWebAppEvent",c=t(["VKWebAppInit","VKWebAppGetCommunityAuthToken","VKWebAppAddToCommunity","VKWebAppAddToHomeScreenInfo","VKWebAppClose","VKWebAppCopyText","VKWebAppCreateHash","VKWebAppGetUserInfo","VKWebAppSetLocation","VKWebAppSendToClient","VKWebAppGetClientVersion","VKWebAppGetPhoneNumber","VKWebAppGetEmail","VKWebAppGetGroupInfo","VKWebAppGetGeodata","VKWebAppGetCommunityToken","VKWebAppGetConfig","VKWebAppGetLaunchParams","VKWebAppSetTitle","VKWebAppGetAuthToken","VKWebAppCallAPIMethod","VKWebAppJoinGroup","VKWebAppLeaveGroup","VKWebAppAllowMessagesFromGroup","VKWebAppDenyNotifications","VKWebAppAllowNotifications","VKWebAppOpenPayForm","VKWebAppOpenApp","VKWebAppShare","VKWebAppShowWallPostBox","VKWebAppScroll","VKWebAppShowOrderBox","VKWebAppShowLeaderBoardBox","VKWebAppShowInviteBox","VKWebAppShowRequestBox","VKWebAppAddToFavorites","VKWebAppShowStoryBox","VKWebAppStorageGet","VKWebAppStorageGetKeys","VKWebAppStorageSet","VKWebAppFlashGetInfo","VKWebAppSubscribeStoryApp","VKWebAppOpenWallPost","VKWebAppCheckAllowedScopes","VKWebAppCheckBannerAd","VKWebAppHideBannerAd","VKWebAppShowBannerAd","VKWebAppCheckNativeAds","VKWebAppShowNativeAds","VKWebAppRetargetingPixel","VKWebAppConversionHit","VKWebAppShowSubscriptionBox","VKWebAppCheckSurvey","VKWebAppShowSurvey","VKWebAppScrollTop","VKWebAppScrollTopStart","VKWebAppScrollTopStop","VKWebAppShowSlidesSheet","VKWebAppTranslate","VKWebAppRecommend"],s&&!u?["VKWebAppResizeWindow","VKWebAppAddToMenu","VKWebAppShowInstallPushBox","VKWebAppGetFriends","VKWebAppShowCommunityWidgetPreviewBox","VKWebAppCallStart","VKWebAppCallJoin","VKWebAppCallGetStatus"]:["VKWebAppShowImages"],!0),l=r?window.AndroidBridge:void 0,b=p?window.webkit.messageHandlers:void 0,f=s?parent:void 0;var A,v,m,W,V,_,K;e.EAdsFormats=void 0,(A=e.EAdsFormats||(e.EAdsFormats={})).REWARD="reward",A.INTERSTITIAL="interstitial",e.BannerAdLayoutType=void 0,(v=e.BannerAdLayoutType||(e.BannerAdLayoutType={})).RESIZE="resize",v.OVERLAY="overlay",e.BannerAdLocation=void 0,(m=e.BannerAdLocation||(e.BannerAdLocation={})).TOP="top",m.BOTTOM="bottom",e.EGrantedPermission=void 0,(W=e.EGrantedPermission||(e.EGrantedPermission={})).CAMERA="camera",W.LOCATION="location",W.PHOTO="photo",e.EGetLaunchParamsResponseLanguages=void 0,(V=e.EGetLaunchParamsResponseLanguages||(e.EGetLaunchParamsResponseLanguages={})).RU="ru",V.UK="uk",V.UA="ua",V.EN="en",V.BE="be",V.KZ="kz",V.PT="pt",V.ES="es",e.EGetLaunchParamsResponseGroupRole=void 0,(_=e.EGetLaunchParamsResponseGroupRole||(e.EGetLaunchParamsResponseGroupRole={})).ADMIN="admin",_.EDITOR="editor",_.MEMBER="member",_.MODER="moder",_.NONE="none",e.EGetLaunchParamsResponsePlatforms=void 0,(K=e.EGetLaunchParamsResponsePlatforms||(e.EGetLaunchParamsResponsePlatforms={})).DESKTOP_WEB="desktop_web",K.DESKTOP_WEB_MESSENGER="desktop_web_messenger",K.DESKTOP_APP_MESSENGER="desktop_app_messenger",K.MOBILE_WEB="mobile_web",K.MOBILE_ANDROID="mobile_android",K.MOBILE_ANDROID_MESSENGER="mobile_android_messenger",K.MOBILE_IPHONE="mobile_iphone",K.MOBILE_IPHONE_MESSENGER="mobile_iphone_messenger",K.MOBILE_IPAD="mobile_ipad";var w=function(e){var n=void 0,r=[];function u(e){r.push(e)}function A(){return p||a}function v(){return s&&window.parent!==window}function m(){return A()||v()}function W(e){if(p||a)return t([],r,!0).map((function(n){return n.call(null,e)}));var o=null==e?void 0:e.data;if(s&&o){if(i&&"string"==typeof o)try{o=JSON.parse(o)}catch(e){}var u=o.type,d=o.data,c=o.frameId;u&&("VKWebAppSettings"!==u?t([],r,!0).map((function(e){return e({detail:{type:u,data:d}})})):n=c)}}i&&/(android)/i.test(navigator.userAgent)?document.addEventListener(d,W):"undefined"!=typeof window&&"addEventListener"in window&&window.addEventListener(d,W);var V=o((function(t,o){l&&l[t]?l[t](JSON.stringify(o)):b&&b[t]&&"function"==typeof b[t].postMessage?b[t].postMessage(o):i?window.ReactNativeWebView.postMessage(JSON.stringify({handler:t,params:o})):f&&"function"==typeof f.postMessage&&f.postMessage({handler:t,params:o,type:"vk-connect",webFrameId:n,connectVersion:e},"*")}),u);return{send:V,sendPromise:V,subscribe:u,unsubscribe:function(e){var n=r.indexOf(e);n>-1&&r.splice(n,1)},supports:function(e){return a?!(!l||"function"!=typeof l[e]):p?!(!b||!b[e]||"function"!=typeof b[e].postMessage):!!s&&c.includes(e)},isWebView:A,isIframe:v,isEmbedded:m,isStandalone:function(){return!m()}}}("2.11.0");e.applyMiddleware=function e(){for(var t=[],o=0;o<arguments.length;o++)t[o]=arguments[o];return t.includes(void 0)||t.includes(null)?e.apply(void 0,t.filter((function(e){return"function"==typeof e}))):function(e){if(0===t.length)return e;var o,r={subscribe:e.subscribe,send:function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];return e.send.apply(e,n)}},a=t.filter((function(e){return"function"==typeof e})).map((function(e){return e(r)})).reduce((function(e,n){return function(t){return e(n(t))}}));return o=a(e.send),n(n({},e),{send:o})}},e.default=w,e.parseURLSearchParamsForGetLaunchParams=function(n){var t={};try{var o=new URLSearchParams(n);o.forEach((function(n,o){switch(o){case"vk_ts":case"vk_is_recommended":case"vk_profile_id":case"vk_has_profile_button":case"vk_testing_group_id":case"vk_user_id":case"vk_app_id":case"vk_group_id":t[o]=Number(n);break;case"sign":case"vk_chat_id":case"vk_ref":case"vk_access_token_settings":t[o]=n;break;case"odr_enabled":t.odr_enabled="1"===n?1:void 0;break;case"vk_is_app_user":case"vk_are_notifications_enabled":case"vk_is_favorite":t[o]=function(e){switch(e){case"0":return 0;case"1":return 1;default:return}}(n);break;case"vk_language":t.vk_language=function(n){return Object.values(e.EGetLaunchParamsResponseLanguages).some((function(e){return e===n}))}(n)?n:void 0;break;case"vk_viewer_group_role":t.vk_viewer_group_role=function(n){return Object.values(e.EGetLaunchParamsResponseGroupRole).some((function(e){return e===n}))}(n)?n:void 0;break;case"vk_platform":t.vk_platform=function(n){return Object.values(e.EGetLaunchParamsResponsePlatforms).some((function(e){return e===n}))}(n)?n:void 0}}))}catch(e){console.warn(e)}return t},Object.defineProperty(e,"__esModule",{value:!0})}));
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n((e="undefined"!=typeof globalThis?globalThis:e||self).vkBridge={})}(this,(function(e){"use strict";var n=function(){return n=Object.assign||function(e){for(var n,t=1,o=arguments.length;t<o;t++)for(var r in n=arguments[t])Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);return e},n.apply(this,arguments)};function t(e,n,t){if(t||2===arguments.length)for(var o,r=0,a=n.length;r<a;r++)!o&&r in n||(o||(o=Array.prototype.slice.call(n,0,r)),o[r]=n[r]);return e.concat(o||Array.prototype.slice.call(n))}function o(e,t){var o,r,a=(o={current:0,next:function(){return++this.current}},r={},{add:function(e,n){var t=null!=n?n:o.next();return r[t]=e,t},resolve:function(e,n,t){var o=r[e];o&&(t(n)?o.resolve(n):o.reject(n),r[e]=null)}});return t((function(e){if(e.detail&&e.detail.data&&"object"==typeof e.detail.data&&"request_id"in e.detail.data){var n=e.detail.data,t=n.request_id,o=function(e,n){var t={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&n.indexOf(o)<0&&(t[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(e);r<o.length;r++)n.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(t[o[r]]=e[o[r]])}return t}(n,["request_id"]);t&&a.resolve(t,o,(function(e){return!("error_type"in e)}))}})),function(t,o){return void 0===o&&(o={}),new Promise((function(r,p){var i=a.add({resolve:r,reject:p},o.request_id);e(t,n(n({},o),{request_id:i}))}))}}var r="undefined"!=typeof window,a=Boolean(r&&window.AndroidBridge),p=Boolean(r&&window.webkit&&window.webkit.messageHandlers&&window.webkit.messageHandlers.VKWebAppClose),i=Boolean(r&&window.ReactNativeWebView&&"function"==typeof window.ReactNativeWebView.postMessage),s=r&&!a&&!p,u=s&&/(^\?|&)vk_platform=mobile_web(&|$)/.test(location.search),d=s?"message":"VKWebAppEvent",c=t(["VKWebAppInit","VKWebAppGetCommunityAuthToken","VKWebAppAddToCommunity","VKWebAppAddToHomeScreenInfo","VKWebAppClose","VKWebAppCopyText","VKWebAppCreateHash","VKWebAppGetUserInfo","VKWebAppSetLocation","VKWebAppSendToClient","VKWebAppGetClientVersion","VKWebAppGetPhoneNumber","VKWebAppGetEmail","VKWebAppGetGroupInfo","VKWebAppGetGeodata","VKWebAppGetCommunityToken","VKWebAppGetConfig","VKWebAppGetLaunchParams","VKWebAppSetTitle","VKWebAppGetAuthToken","VKWebAppCallAPIMethod","VKWebAppJoinGroup","VKWebAppLeaveGroup","VKWebAppAllowMessagesFromGroup","VKWebAppDenyNotifications","VKWebAppAllowNotifications","VKWebAppOpenPayForm","VKWebAppOpenApp","VKWebAppShare","VKWebAppShowWallPostBox","VKWebAppScroll","VKWebAppShowOrderBox","VKWebAppShowLeaderBoardBox","VKWebAppShowInviteBox","VKWebAppShowRequestBox","VKWebAppAddToFavorites","VKWebAppShowStoryBox","VKWebAppStorageGet","VKWebAppStorageGetKeys","VKWebAppStorageSet","VKWebAppFlashGetInfo","VKWebAppSubscribeStoryApp","VKWebAppOpenWallPost","VKWebAppCheckAllowedScopes","VKWebAppCheckBannerAd","VKWebAppHideBannerAd","VKWebAppShowBannerAd","VKWebAppCheckNativeAds","VKWebAppShowNativeAds","VKWebAppRetargetingPixel","VKWebAppConversionHit","VKWebAppShowSubscriptionBox","VKWebAppCheckSurvey","VKWebAppShowSurvey","VKWebAppScrollTop","VKWebAppScrollTopStart","VKWebAppScrollTopStop","VKWebAppShowSlidesSheet","VKWebAppTranslate","VKWebAppRecommend"],s&&!u?["VKWebAppResizeWindow","VKWebAppAddToMenu","VKWebAppShowInstallPushBox","VKWebAppGetFriends","VKWebAppShowCommunityWidgetPreviewBox","VKWebAppCallStart","VKWebAppCallJoin","VKWebAppCallGetStatus"]:["VKWebAppShowImages"],!0),l=r?window.AndroidBridge:void 0,b=p?window.webkit.messageHandlers:void 0,f=s?parent:void 0;var A,v,m,W,V,_,K;e.EAdsFormats=void 0,(A=e.EAdsFormats||(e.EAdsFormats={})).REWARD="reward",A.INTERSTITIAL="interstitial",e.BannerAdLayoutType=void 0,(v=e.BannerAdLayoutType||(e.BannerAdLayoutType={})).RESIZE="resize",v.OVERLAY="overlay",e.BannerAdLocation=void 0,(m=e.BannerAdLocation||(e.BannerAdLocation={})).TOP="top",m.BOTTOM="bottom",e.EGrantedPermission=void 0,(W=e.EGrantedPermission||(e.EGrantedPermission={})).CAMERA="camera",W.LOCATION="location",W.PHOTO="photo",e.EGetLaunchParamsResponseLanguages=void 0,(V=e.EGetLaunchParamsResponseLanguages||(e.EGetLaunchParamsResponseLanguages={})).RU="ru",V.UK="uk",V.UA="ua",V.EN="en",V.BE="be",V.KZ="kz",V.PT="pt",V.ES="es",e.EGetLaunchParamsResponseGroupRole=void 0,(_=e.EGetLaunchParamsResponseGroupRole||(e.EGetLaunchParamsResponseGroupRole={})).ADMIN="admin",_.EDITOR="editor",_.MEMBER="member",_.MODER="moder",_.NONE="none",e.EGetLaunchParamsResponsePlatforms=void 0,(K=e.EGetLaunchParamsResponsePlatforms||(e.EGetLaunchParamsResponsePlatforms={})).DESKTOP_WEB="desktop_web",K.DESKTOP_WEB_MESSENGER="desktop_web_messenger",K.DESKTOP_APP_MESSENGER="desktop_app_messenger",K.MOBILE_WEB="mobile_web",K.MOBILE_ANDROID="mobile_android",K.MOBILE_ANDROID_MESSENGER="mobile_android_messenger",K.MOBILE_IPHONE="mobile_iphone",K.MOBILE_IPHONE_MESSENGER="mobile_iphone_messenger",K.MOBILE_IPAD="mobile_ipad";var w=function(e){var n=void 0,r=[];function u(e){r.push(e)}function A(){return p||a}function v(){return s&&window.parent!==window}function m(){return A()||v()}function W(e){if(p||a)return t([],r,!0).map((function(n){return n.call(null,e)}));var o=null==e?void 0:e.data;if(s&&o){if(i&&"string"==typeof o)try{o=JSON.parse(o)}catch(e){}var u=o.type,d=o.data,c=o.frameId;u&&("VKWebAppSettings"!==u?t([],r,!0).map((function(e){return e({detail:{type:u,data:d}})})):n=c)}}i&&/(android)/i.test(navigator.userAgent)?document.addEventListener(d,W):"undefined"!=typeof window&&"addEventListener"in window&&window.addEventListener(d,W);var V=o((function(t,o){l&&l[t]?l[t](JSON.stringify(o)):b&&b[t]&&"function"==typeof b[t].postMessage?b[t].postMessage(o):i?window.ReactNativeWebView.postMessage(JSON.stringify({handler:t,params:o})):f&&"function"==typeof f.postMessage&&f.postMessage({handler:t,params:o,type:"vk-connect",webFrameId:n,connectVersion:e},"*")}),u);return{send:V,sendPromise:V,subscribe:u,unsubscribe:function(e){var n=r.indexOf(e);n>-1&&r.splice(n,1)},supports:function(e){return a?!(!l||"function"!=typeof l[e]):p?!(!b||!b[e]||"function"!=typeof b[e].postMessage):!!s&&c.includes(e)},isWebView:A,isIframe:v,isEmbedded:m,isStandalone:function(){return!m()}}}("2.11.1");e.applyMiddleware=function e(){for(var t=[],o=0;o<arguments.length;o++)t[o]=arguments[o];return t.includes(void 0)||t.includes(null)?e.apply(void 0,t.filter((function(e){return"function"==typeof e}))):function(e){if(0===t.length)return e;var o,r={subscribe:e.subscribe,send:function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];return e.send.apply(e,n)}},a=t.filter((function(e){return"function"==typeof e})).map((function(e){return e(r)})).reduce((function(e,n){return function(t){return e(n(t))}}));return o=a(e.send),n(n({},e),{send:o})}},e.default=w,e.parseURLSearchParamsForGetLaunchParams=function(n){var t={};try{var o=new URLSearchParams(n);o.forEach((function(n,o){switch(o){case"vk_ts":case"vk_is_recommended":case"vk_profile_id":case"vk_has_profile_button":case"vk_testing_group_id":case"vk_user_id":case"vk_app_id":case"vk_group_id":t[o]=Number(n);break;case"sign":case"vk_chat_id":case"vk_ref":case"vk_access_token_settings":t[o]=n;break;case"odr_enabled":t.odr_enabled="1"===n?1:void 0;break;case"vk_is_app_user":case"vk_are_notifications_enabled":case"vk_is_favorite":t[o]=function(e){switch(e){case"0":return 0;case"1":return 1;default:return}}(n);break;case"vk_language":t.vk_language=function(n){return Object.values(e.EGetLaunchParamsResponseLanguages).some((function(e){return e===n}))}(n)?n:void 0;break;case"vk_viewer_group_role":t.vk_viewer_group_role=function(n){return Object.values(e.EGetLaunchParamsResponseGroupRole).some((function(e){return e===n}))}(n)?n:void 0;break;case"vk_platform":t.vk_platform=function(n){return Object.values(e.EGetLaunchParamsResponsePlatforms).some((function(e){return e===n}))}(n)?n:void 0}}))}catch(e){console.warn(e)}return t},Object.defineProperty(e,"__esModule",{value:!0})}));
//# sourceMappingURL=index.umd.js.map

@@ -262,3 +262,2 @@ /** Type of the Personal Card */

export type DefaultUpdateConfigData = {
api_host: string;
/** App_id of opened app */

@@ -265,0 +264,0 @@ app_id: string;

@@ -262,3 +262,2 @@ /** Type of the Personal Card */

export declare type DefaultUpdateConfigData = {
api_host: string;
/** App_id of opened app */

@@ -265,0 +264,0 @@ app_id: string;

{
"name": "@vkontakte/vk-bridge",
"version": "2.11.0",
"version": "2.11.1",
"description": "Connects a Mini App with VK client",

@@ -5,0 +5,0 @@ "license": "MIT",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc