PageSourceSearch

https://app.konsol.pro/static/js/max-web-app.1545fd20.js

js konsol.pro collected 2026-10-02 06:37:12 UTC 27,076 bytes, 1 lines download raw bytes

1!function(){var t=class{saveKey;getKey;clearKeys;constructor({saveKey:t,getKey:s,clearKeys:i}){this.saveKey=t,this.getKey=s,this.clearKeys=i}setItem(t,s){return this.saveKey({key:t,value:s})}getItem(t){return this.getKey({key:t})}removeItem(t){return this.saveKey({key:t,value:null})}clear(){return this.clearKeys()}},s=class{saveKey;getKey;clearKeys;constructor({saveKey:t,getKey:s,clearKeys:i}){this.saveKey=t,this.getKey=s,this.clearKeys=i}setItem(t,s){return this.saveKey({key:t,value:s})}getItem(t){return this.getKey({key:t})}removeItem(t){return this.saveKey({key:t,value:null})}clear(){return this.clearKeys()}},i=class{visible=!1;postBackButtonEvent;onClick;offClick;get isVisible(){return this.visible}constructor({postBackButtonEvent:t,onClick:s,offClick:i}){this.postBackButtonEvent=t,this.onClick=s,this.offClick=i}show(){this.visible=!0,this.postBackButtonEvent(!0)}hide(){this.visible=!1,this.postBackButtonEvent(!1)}},r=class e{static WEB_APP_DATA_KEY="WebAppData";static WEB_APP_PLATFORM_KEY="WebAppPlatform";static WEB_APP_VERSION_KEY="WebAppVersion";static WEB_APP_DEVICE_NAME="WebAppDeviceName";static VALID_PLATFORMS=["ios","android","desktop","web"];rawInitData;rawPlatformData;rawVersionData;rawDeviceName;constructor(){this.rawInitData=this.getParamFromHashOrStorage(e.WEB_APP_DATA_KEY),this.rawPlatformData=this.getParamFromHashOrStorage(e.WEB_APP_PLATFORM_KEY),this.rawVersionData=this.getParamFromHashOrStorage(e.WEB_APP_VERSION_KEY),this.rawDeviceName=this.getParamFromHashOrStorage(e.WEB_APP_DEVICE_NAME)}getParamFromHashOrStorage(t){let s=this.extractParamFromHashes(t);return s?(sessionStorage.setItem(t,s),s):sessionStorage.getItem(t)}extractParamFromHashes(t){try{let s=this.getHashParam(location.hash,t);if(s)return s;let i=performance.getEntriesByType("navigation")[0],r=i&&new URL(i.name).hash;return r&&this.getHashParam(r,t)||null}catch(s){return console.warn(`\u041e\u0448\u0438\u0431\u043a\u0430 \u043f\u0440\u0438 \u0438\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 ${t}:`,s),null}}getHashParam(t,s){try{let i=t.replace(/^#/,"");return new URLSearchParams(i).get(s)}catch(t){return console.warn(`\u041e\u0448\u0438\u0431\u043a\u0430 \u043f\u0440\u0438 \u0438\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 ${s}:`,t),null}}get initData(){return this.rawInitData}get platform(){return this.isValidPlatform(this.rawPlatformData)?this.rawPlatformData:null}get version(){return this.rawVersionData}get deviceName(){return this.rawDeviceName}isValidPlatform(t){return null!==t&&e.VALID_PLATFORMS.includes(t)}get initDataUnsafe(){return this.parseInitData(this.rawInitData)}parseInitData(t){let s={};if(!t)return s;try{new URLSearchParams(decodeURIComponent(t)).forEach((t,i)=>{switch(i){case"hash":case"ip":case"query_id":case"start_param":s[i]=t;break;case"auth_date":s[i]=Number(t);break;case"user":s[i]=this.getUserInitData(t);break;case"chat":s[i]=this.getChatInitData(t);break;default:console.warn(`\u041d\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440: ${i}`)}})}catch(t){console.warn("\u041e\u0448\u0438\u0431\u043a\u0430 \u043f\u0440\u0438 \u043f\u0430\u0440\u0441\u0438\u043d\u0433\u0435 init data:",t)}return s}getUserInitData(t){try{let s=JSON.parse(t);if(s&&"object"==typeof s)return{first_name:s.first_name,last_name:s.last_name,username:s.username,language_code:s.language_code,ph
1oto_url:s.photo_url,id:Number(s.id)}}catch(t){console.warn("\u041e\u0448\u0438\u0431\u043a\u0430 \u043f\u0440\u0438 \u043f\u0430\u0440\u0441\u0438\u043d\u0433\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f:",t)}}getChatInitData(t){try{let s=JSON.parse(t);if(s&&"object"==typeof s)return{id:s.id,type:s.type}}catch(t){console.warn("\u041e\u0448\u0438\u0431\u043a\u0430 \u043f\u0440\u0438 \u043f\u0430\u0440\u0441\u0438\u043d\u0433\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0447\u0430\u0442\u0430:",t)}}},a=(t,s)=>{throw console.error(`[WebApp] ${s}`),{error:{code:t}}},o=t=>{let s=t.split("WebApp")[1];return s?s.match(/([A-Z][a-z]*)/g)?.map(t=>t.toLowerCase()).join("_"):"unknown_method"},n=1e4,c=6e4;var l=class{getInfo;requestBiometryAccess;updateToken;requestAuth;_openSettings;inited=!1;biometryInfo={available:!1,accessRequested:!1,accessGranted:!1,type:["unknown"],tokenSaved:!1,deviceId:null};getBiometryInfo(){return{...this.biometryInfo}}setBiometryInfo(t){this.biometryInfo={...this.biometryInfo,...t}}checkInit(t,s="BiometricManager \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d \u043f\u0435\u0440\u0435\u0434 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c."){return this.inited||a(t,s),!0}checkAccessGranted(t,s="\u0411\u0438\u043e\u043c\u0435\u0442\u0440\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0434\u043e\u0441\u0442\u0443\u043f \u043d\u0435 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u043c."){return this.biometryInfo.accessGranted||a(t,s),!0}checkAvailable(t,s="\u0411\u0438\u043e\u043c\u0435\u0442\u0440\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u043d\u0430 \u044d\u0442\u043e\u043c \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0435."){return this.biometryInfo.available||a(t,s),!0}constructor({getInfo:t,requestBiometryAccess:s,updateToken:i,requestAuth:r,openSettings:n}){this.getInfo=t,this.requestBiometryAccess=s,this.updateToken=i,this.requestAuth=r,this._openSettings=n}get isInited(){return this.inited}get isBiometricAvailable(){return this.biometryInfo.available}get isAccessRequested(){return this.biometryInfo.accessRequested}get isAccessGranted(){return this.biometryInfo.accessGranted}get isBiometricTokenSaved(){return this.biometryInfo.tokenSaved}get biometricType(){return this.biometryInfo.type}get deviceId(){return this.biometryInfo.deviceId}
1async init(){if(this.inited)return this.getBiometryInfo();let t=await this.getInfo();return this.setBiometryInfo(t),this.inited=!0,this.getBiometryInfo()}async requestAccess(t){if(this.biometryInfo.accessRequested)return this.getBiometryInfo();this.checkInit("client.biometry_request_access.not_inited"),this.checkAvailable("client.biometry_request_access.not_supported");let s=await this.requestBiometryAccess({reason:t});return this.setBiometryInfo(s),this.getBiometryInfo()}async authenticate(t){return this.checkInit("client.biometry_request_auth.not_inited"),this.checkAvailable("client.biometry_request_auth.not_supported"),this.checkAccessGranted("client.biometry_request_auth.permission_denied"),this.biometryInfo.tokenSaved||a("client.biometry_request_auth.not_found","\u0411\u0438\u043e\u043c\u0435\u0442\u0440\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0442\u043e\u043a\u0435\u043d \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d."),this.requestAuth({reason:t})}async updateBiometricToken(t,s){this.checkInit("client.biometry_update_token.not_inited"),this.checkAvailable("client.biometry_update_token.not_supported"),this.checkAccessGranted("client.biometry_update_token.permission_denied");let i=await this.updateToken({token:t,reason:s});return this.biometryInfo.tokenSaved="updated"===i.status,i}async openSettings(){return this.checkInit("client.biometry_open_settings.not_inited"),this.checkAvailable("client.biometry_open_settings.not_supported"),this.biometryInfo.accessGranted&&a("client.biometry_open_settings.permission_denied","\u0411\u0438\u043e\u043c\u0435\u0442\u0440\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0434\u043e\u0441\u0442\u0443\u043f \u0443\u0436\u0435 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u043c. \u041d\u0435\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0442\u044c \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438."),this._openSettings()}},h=class{_impactOccurred;_notificationOccurred;_selectionChanged;constructor({impactOccurred:t,notificationOccurred:s,selectionChanged:i}){this._impactOccurred=t,this._notificationOccurred=s,this._selectionChanged=i}impactOccurred(t,s=!1){return this._impactOccurred({impactStyle:t,disableVibrationFallback:s})}notificationOccurred(t,s=!1){return this._notificationOccurred({notificationType:t,disableVibrationFallback:s})}selectionChanged(t=!1){return this._selectionChanged({disableVibrationFallback:t})}},u=class{enabled=!0;postSwipesBehaviorEvent;get isEnabled(){return this.enabled}constructor({postSwipesBehaviorEvent:t}){this.postSwipesBehaviorEvent=t}async enable(){let t=await this.postSwipesBehaviorEvent({allowVerticalSwipes:!0});return this.enabled=t.allowVerticalSwipes,t}async disable(){let t=await this.postSwipesBehaviorEvent({allowVerticalSwipes:!1});return this.enabled=t.allowVerticalSwipes,t}},p=class{enabled=!1;postScreenCaptureEvent;get isScreenCaptureEnabled(){return this.enabled}constructor({postScreenCaptureEvent:t}){this.postScreenCaptureEvent=t}async enableScreenCapture(){let t=await this.postScreenCaptureEvent({isScreenCaptureEnabled:!0});return this.enabled=t.isScreenCaptureEnabled,t}async disableScreenCapture(){let t=await this.postScreenCaptureEvent({isScreenCaptureEnabled:!1});return this.enabled=t.isScreenCaptureEnabled,t}},m=class{getInfo;_emulateNfcTag;_openSystemSettings;inited=!1;nfcInfo={available:!1,enabled:!1,accessRevoked:!1};getNfcInfo(){return{...this.nfcInfo}}setNfcInfo(t){this.nfcInfo={...this.nfcInfo,...t}}checkInit(t,s="NfcManager \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d \u043f\u0435\u0440\u0435\u0434 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c."){return this.inited||a(t,s),!0}checkAccessIsNotRevoked(t,s="\u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043e\u0442\u043e\u0437\u0432\u0430\u043b \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c NFC \u043c\u043e\u0434\u0443\u043b\u044c \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043c\u0438\u043d\u0438-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f."){return this.nfcInfo.accessRevoked&&a(t,s),!0}checkIsEnabled(t,s="NFC \u043c\u043e\u0434\u0443\u043b\u044c \u0432\u044b\u043a\u043b\u044e\u0447\u0435\u043d \u0432 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u0445 \u0441\u0438\u0441\u0442\u0435\u043c\u044b."){return this.nfcInfo.enabled||a(t,s),!0}checkIsAvailable(t,s="NFC \u043c\u043e\u0434\u0443\u043b\u044c \u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u043d\u0430 \u044d\u0442\u043e\u043c \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0435."){return this.nfcInfo.available||a(t,s),!0}constructor({getInfo:t,openSystemSettings:s,emulateNfcTag:i}){this.getInfo=t,this._openSystemSettings=s,this._emulateNfcTag=i}get isInited(){return this.inited}
1async init(){let t=await this.getInfo();return this.setNfcInfo(t),this.inited=!0,this.getNfcInfo()}async emulateNfcTag(t){return this.checkInit("client.nfc_emulate_nfc_tag.not_inited"),this.checkIsAvailable("client.nfc_emulate_nfc_tag.not_supported"),this.checkIsEnabled("client.nfc_emulate_nfc_tag.not_enabled"),this.checkAccessIsNotRevoked("client.nfc_emulate_nfc_tag.access_revoked"),this._emulateNfcTag({nfctag:t})}async openSystemSettings(){return this.checkInit("client.nfc_open_system_settings.not_inited"),this.checkIsAvailable("client.nfc_open_system_settings.not_supported"),this.nfcInfo.enabled&&a("client.nfc_open_system_settings.permission_denied","\u0414\u043e\u0441\u0442\u0443\u043f \u043a NFC \u043c\u043e\u0434\u0443\u043b\u044e \u0443\u0436\u0435 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u043c. \u041d\u0435\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0442\u044c \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438."),this._openSystemSettings()}},g=class{getPlatform;getInfo;requestPermissionsAccess;_openMaxSettings;_openSystemSettings;inited=!1;permissionsInfo={camera:{available:!1,systemAccessGranted:!1,systemAccessRequested:!1,appAccessGranted:!1,appAccessRequested:!1},mic:{available:!1,systemAccessGranted:!1,systemAccessRequested:!1,appAccessGranted:!1,appAccessRequested:!1}};getPermissionsInfo(){return{camera:{...this.permissionsInfo.camera},mic:{...this.permissionsInfo.mic}}}setPermissionsInfo(t){this.permissionsInfo={camera:{...this.permissionsInfo.camera,...t.camera},mic:{...this.permissionsInfo.mic,...t.mic}}}checkInit(t,s="PermissionsManager \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d \u043f\u0435\u0440\u0435\u0434 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c."){return this.inited||a(t,s),!0}isWebPlatform(){return"web"===this.getPlatform()}checkAlreadyEnabled(t,s,i){let r=[this.permissionsInfo.camera,this.permissionsInfo.mic];if(this.isWebPlatform())return void("app"===i&&r.every(t=>t.appAccessGranted)&&a(t,s));let n=r.filter(t=>t.available);n.length>0&&n.every(t=>"app"===i?t.appAccessGranted:t.systemAccessGranted)&&a(t,s)}constructor({getPlatform:t,getInfo:s,requestAccess:i,openMaxSettings:r,openSystemSettings:n}){this.getPlatform=t,this.getInfo=s,this.requestPermissionsAccess=i,this._openMaxSettings=r,this._openSystemSettings=n}get isInited(){return this.inited}get isCameraAvailable(){return this.permissionsInfo.camera.available}get isCameraSystemAccessGranted(){return this.permissionsInfo.camera.systemAccessGranted}get isCameraSystemAccessRequested(){return this.permissionsInfo.camera.systemAccessRequested}get isCameraAppAccessGranted(){return this.permissionsInfo.camera.appAccessGranted}get isCameraAppAccessRequested(){return this.permissionsInfo.camera.appAccessRequested}get isMicAvailable(){return this.permissionsInfo.mic.available}get isMicSystemAccessGranted(){return this.permissionsInfo.mic.systemAccessGranted}get isMicSystemAccessRequested(){return this.permissionsInfo.mic.systemAccessRequested}get isMicAppAccessGranted(){return this.permissionsInfo.mic.appAccessGranted}get isMicAppAccessRequested(){return this.permissionsInfo.mic.appAccessRequested}
1async init(){let t=await this.getInfo();return this.setPermissionsInfo(t),this.inited=!0,this.getPermissionsInfo()}async requestAccess(t,s){this.checkInit("client.permissions_request_access.not_inited");let i=Array.isArray(t)?Array.from(new Set(t)):[t];this.isWebPlatform()||(i.includes("camera")&&!this.permissionsInfo.camera.available&&a("client.permissions_request_access.camera_not_supported","\u041a\u0430\u043c\u0435\u0440\u0430 \u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430 \u043d\u0430 \u044d\u0442\u043e\u043c \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0435."),i.includes("mic")&&!this.permissionsInfo.mic.available&&a("client.permissions_request_access.mic_not_supported","\u041c\u0438\u043a\u0440\u043e\u0444\u043e\u043d \u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u043d\u0430 \u044d\u0442\u043e\u043c \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0435."));let r=await this.requestPermissionsAccess({reason:s?.slice(0,128),permissions:i.map(t=>"camera"===t?{camera:!0}:{mic:!0})});return this.setPermissionsInfo(r),this.getPermissionsInfo()}async openMaxSettings(){return this.checkInit("client.permissions_open_max_settings.not_inited"),this.checkAlreadyEnabled("client.permissions_open_max_settings.already_enabled","\u0414\u043e\u0441\u0442\u0443\u043f \u043a \u043a\u0430\u043c\u0435\u0440\u0435 \u0438 \u043c\u0438\u043a\u0440\u043e\u0444\u043e\u043d\u0443 \u0443\u0436\u0435 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d. \u041d\u0435\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0442\u044c \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 Max.","app"),this._openMaxSettings()}async openSystemSettings(){return this.checkInit("client.permissions_open_settings.not_inited"),this.checkAlreadyEnabled("client.permissions_open_settings.already_enabled","\u0414\u043e\u0441\u0442\u0443\u043f \u043a \u043a\u0430\u043c\u0435\u0440\u0435 \u0438 \u043c\u0438\u043a\u0440\u043e\u0444\u043e\u043d\u0443 \u0443\u0436\u0435 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d. \u041d\u0435\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0442\u044c \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438.","system"),this._openSystemSettings()}},y=/^https:\/\/.*\.(?:max|oneme)\.ru$/,f=class{webviewBridge;messageCallback;isIframe(){return typeof window<"u"&&window.self!==window.top}sendEvent;constructor(t){this.messageCallback=t,this.isIframe()?(this.sendEvent=this.sendOverIframe,this.initializeIframeTransport()):typeof window<"u"&&window.WebViewHandler?(this.webviewBridge=window.WebViewHandler,this.sendEvent=this.sendOverWebView):this.sendEvent=this.sendFallback}initializeIframeTransport(){window.addEventListener("message",async t=>{if(y.test(t.origin)&&"string"==typeof t.data)try{let{type:s,...i}=JSON.parse(t.data);s?.startsWith("WebApp")&&this.messageCallback&&this.messageCallback(s,i)}catch(t){console.error("[WebApp] \u041e\u0448\u0438\u0431\u043a\u0430 \u043f\u0440\u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f: ",t)}})}sendOverIframe(t,s){window.parent.postMessage(JSON.stringify({type:t,...s}),"*")}sendOverWebView(t,s){this.webviewBridge?.postEvent(t,JSON.stringify(s))}sendFallback(t){console.warn("[WebApp] \u0421\u043e\u0431\u044b\u0442\u0438\u0435 \u043d\u0435 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u043e - \u0442\u0440\u0430\u043d\u0441\u043f\u043e\u0440\u0442 \u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d:",t)}},b=class{pendingRequests=new Map;sendEvent;constructor(t){this.sendEvent=t}createRequest(t,s={},i={}){let{timeout:r=n}=i;return new Promise((i,n)=>{let c=function d(){if(crypto&&crypto?.randomUUID)return crypto.randomUUID();if(crypto&&crypto?.getRandomValues){let t=new Uint8Array(16);crypto.getRandomValues(t);let s="";for(let i=0;i<t.length;i++)s+=t[i].toString(16).padStart(2,"0");return s}let t=Date.now().toString(36);for(;t.length<32;)t+=Math.random().toString(36).slice(2);return t.slice(0,32)}(),l=setTimeout(()=>{this.deletePendingRequest(c),n({error:{code:`client.${o(t)}.request_timeout`}})},r);this.pendingRequests.set(c,{resolve:i,reject:n,timeoutId:l}),this.sendEvent(t,{...s,requestId:c})})}handleResponse(t,s){let{requestId:i,...r}=s,n=this.pendingRequests.get(i);n?("error"in r?(console.error(`[WebApp] \u041f\u043e\u043b\u0443\u0447\u0435\u043d\u0430 \u043e\u0448\u0438\u0431\u043a\u0430: ${t}`,r),n.reject(r)):(console.log(`[WebApp] \u041f\u043e\u043b\u0443\u0447\u0435\u043d\u043e \u0441\u043e\u0431\u044b\u0442\u0438\u0435: ${t}`,r),n.resolve(r)),this.clearTimeout(i),this.deletePendingRequest(i)):console.warn(`[WebApp] \u041f\u043e\u043b\u0443\u0447\u0435\u043d \u043e\u0442\u0432\u0435\u0442 \u043d\u0430 \u043d\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u0439 \u0437\u0430\u043f\u0440\u043e\u0441: ${t}`)}clearTimeout(t){let s=this.pendingRequests.get(t);s&&clearTimeout(s.timeoutId)}deletePendingRequest(t){this.pendingRequests.get(t)&&this.pendingRequests.delete(t)}},I=new class{eventHandlers=new Map;transport;requestController;initDataManager;swipesBehaviorManager;SecureStorage;DeviceStorage;BackButton;BiometricManager;NfcManager;HapticFeedback;ScreenCapture;PermissionsManager;get initData(){return this.initDataManager.initData}get initDataUnsafe(){return this.initDataManager.initDataUnsafe}get platform(){return this.initDataManager.platform}get version(){return this.initDataManager.version}get deviceName(){return this.initDataManager.deviceName}get isVerticalSwipesEnabled(){return this.swipesBehaviorManager.isEnabled}withQueryId=t=>(s={})=>{let i=this.initDataUnsafe?.query_id;return t({...s||{},queryId:i})};constructor(){this.transport=new f(async(t,s)=>{await this.receiveEvent(t,s)}),this.requestController=new b((t,s)=>{this.transport.sendEvent(t,s)}),this.BackButton=new i({postBackButtonEvent:t=>this.postEvent("WebAppSetupBackButton",{isVisible:t}),onClick:t=>this.onEvent("WebAppBackButtonPressed",t),offClick:t=>this.offEvent("WebAppBackButtonPressed",t)}),this.initDataManager=new r,this.SecureStorage=new s({saveKey:this.withQueryId(t=>this.requestController.createRequest("WebAppSecureStorageSaveKey",t)),getKey:this.withQueryId(t=>this.requestController.createRequest("WebAppSecureStorageGetKey",t)),clearKeys:this.withQueryId(t=>this.requestController.createRequest("WebAppSecureStorageClear",t))}),this.DeviceStorage=new t({saveKey:this.withQueryId(t=>this.requestController.createRequest("WebAppDeviceStorageSaveKey",t)),getKey:this.withQueryId(t=>this.requestController.createRequest("WebAppDeviceStorageGetKey",t)),clearKeys:this.withQueryId(t=>this.requestController.createRequest("WebAppDeviceStorageClear",t))}),this.NfcManager=new m({getInfo:this.withQueryId(t=>this.requestController.createRequest("WebAppNfcGetInfo",t)),openSystemSettings:this.withQueryId(t=>
1this.requestController.createRequest("WebAppNfcOpenSystemSettings",t)),emulateNfcTag:this.withQueryId(t=>this.requestController.createRequest("WebAppNfcEmulateNfcTag",t,{timeout:3e4}))}),this.BiometricManager=new l({getInfo:this.withQueryId(t=>this.requestController.createRequest("WebAppBiometryGetInfo",t)),requestBiometryAccess:this.withQueryId(t=>this.requestController.createRequest("WebAppBiometryRequestAccess",t,{timeout:c})),updateToken:this.withQueryId(t=>this.requestController.createRequest("WebAppBiometryUpdateToken",t,{timeout:c})),requestAuth:this.withQueryId(t=>this.requestController.createRequest("WebAppBiometryRequestAuth",t,{timeout:c})),openSettings:this.withQueryId(t=>this.requestController.createRequest("WebAppBiometryOpenSettings",t,{timeout:c}))}),this.HapticFeedback=new h({impactOccurred:t=>this.requestController.createRequest("WebAppHapticFeedbackImpact",t),notificationOccurred:t=>this.requestController.createRequest("WebAppHapticFeedbackNotification",t),selectionChanged:t=>this.requestController.createRequest("WebAppHapticFeedbackSelectionChange",t)}),this.swipesBehaviorManager=new u({postSwipesBehaviorEvent:t=>this.requestController.createRequest("WebAppSetupSwipesBehavior",t)}),this.ScreenCapture=new p({postScreenCaptureEvent:t=>this.requestController.createRequest("WebAppSetupScreenCaptureBehavior",t)}),this.PermissionsManager=new g({getPlatform:()=>this.platform,getInfo:this.withQueryId(t=>this.requestController.createRequest("WebAppPermissionsGetInfo",t)),requestAccess:this.withQueryId(t=>this.requestController.createRequest("WebAppPermissionsRequestAccess",t,{timeout:c})),openMaxSettings:this.withQueryId(t=>this.requestController.createRequest("WebAppPermissionsOpenMaxSettings",t,{timeout:c})),openSystemSettings:this.withQueryId(t=>this.requestController.createRequest("WebAppPermissionsOpenSystemSettings",t,{timeout:c}))})}postEvent(t,s={},i){this.transport.sendEvent(t,s),i?.()}async receiveEvent(t,s){(t=>"string"==typeof t.requestId&&t.requestId.length>0)(s)?this.requestController.handleResponse(t,s):this.eventHandlers.get(t)?.forEach(i=>{try{i(s)}catch(s){console.error(`\u041e\u0448\u0438\u0431\u043a\u0430 \u0432 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u0441\u043e\u0431\u044b\u0442\u0438\u044f "${t}":`,s)}})}async sendEvent(t,s="{}"){try{this.receiveEvent(t,JSON.parse(s))}catch(t){console.warn(t)}}onEvent(t,s){let i=this.eventHandlers.get(t);return i||(i=new Set,this.eventHandlers.set(t,i)),i.add(s),()=>{this.offEvent(t,s)}}offEvent(t,s){let i=this.eventHandlers.get(t);i&&(i.delete(s),0===i.size&&this.eventHandlers.delete(t))}requestScreenMaxBrightness(){return this.requestController.createRequest("WebAppChangeScreenBrightness",{maxBrightness:!0}
1)}restoreScreenBrightness(){return this.requestController.createRequest("WebAppChangeScreenBrightness",{maxBrightness:!1})}close(){this.postEvent("WebAppClose",{},()=>{console.log("\u041f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0437\u0430\u043a\u0440\u044b\u0442\u043e")})}ready(){this.postEvent("WebAppReady",{},()=>{console.log("WebApp \u0433\u043e\u0442\u043e\u0432\u043e \u043a \u0440\u0430\u0431\u043e\u0442\u0435")})}requestContact(){return this.requestController.createRequest("WebAppRequestPhone",{},{timeout:c})}enableClosingConfirmation(){this.postEvent("WebAppSetupClosingBehavior",{needConfirmation:!0})}disableClosingConfirmation(){this.postEvent("WebAppSetupClosingBehavior",{needConfirmation:!1})}openLink(t){this.postEvent("WebAppOpenLink",{url:t})}openMaxLink(t){this.postEvent("WebAppOpenMaxLink",{url:t})}getViewportSize(){return this.requestController.createRequest("WebAppGetViewportSize")}downloadFile(t,s){return this.requestController.createRequest("WebAppDownloadFile",{url:t,file_name:s},{timeout:c})}shareContent(t){return this.requestController.createRequest("WebAppShare",t,{timeout:c})}async shareMaxContent(t){try{let s;if("mid"in t){let i=t.mid.replace("mid.",""),r=i.slice(0,16),n=i.slice(16),c=BigInt("0x"+r),l=BigInt("0x"+n);"CHAT"===t.chatType&&(c-=BigInt(2**64)),s={chatId:c.toString(),messageId:l.toString()}}else s=t;return this.requestController.createRequest("WebAppMaxShare",s,{timeout:c})}catch{return a("client.web_app_max_share.invalid_request","\u041d\u0435\u0432\u0435\u0440\u043d\u044b\u0439 \u0444\u043e\u0440\u043c\u0430\u0442 \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432")}}enableVerticalSwipes(){return this.swipesBehaviorManager.enable()}disableVerticalSwipes(){return this.swipesBehaviorManager.disable()}getLaunchContext(){return this.requestController.createRequest("WebAppGetLaunchContext")}openCodeReader(t=!0){return this.requestController.createRequest("WebAppOpenCodeReader",{fileSelect:t},{timeout:6e5})}lockOrientation(t){return this.withQueryId(t=>this.requestController.createRequest("WebAppOrientationLock",t))(t?{requiredOrientation:"portrait"===t?1:2}:{})}unlockOrientation(){return this.withQueryId(t=>this.requestController.createRequest("WebAppOrientationUnlock",t))()}};window.WebApp=I}();

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.