This commit is contained in:
Eduard Kuzmenko 2022-11-18 13:44:43 +04:00
parent f746a661e7
commit 366d660ccf
47 changed files with 51 additions and 48 deletions

4
.env
View File

@ -1,5 +1,5 @@
API_ID=1025907
API_HASH=452b0359b988148995f22ff0f4229750
VERSION=1.6.2
VERSION_FULL=1.6.2 (258)
BUILD=258
VERSION_FULL=1.6.2 (259)
BUILD=259

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,2 @@
"use strict";(this.webpackChunktweb=this.webpackChunktweb||[]).push([[231],{3231:(t,e,a)=>{a.r(e),a.d(e,{default:()=>u});var n=a(279),o=a(4159),r=a(3512),i=a(4874);let h;const d=new i.Z("page-signImport",!0,(()=>{return t=void 0,e=void 0,u=function*(){(0,n.y)(d.pageEl.firstElementChild,!0);const{dcId:t,token:e,tgAddr:i}=h;let u;try{r.Z.managers.apiManager.setBaseDcId(t);const n=yield r.Z.managers.apiManager.invokeApi("auth.importWebTokenAuthorization",{api_id:o.Z.id,api_hash:o.Z.hash,web_auth_token:e},{dcId:t,ignoreErrors:!0});"auth.authorization"===n._&&(r.Z.managers.apiManager.setUser(n.user),u=a.e(781).then(a.bind(a,5436)).then((t=>t.default)))}catch(t){"SESSION_PASSWORD_NEEDED"===t.type?(t.handled=!0,u=a.e(774).then(a.bind(a,9437)).then((t=>t.default))):console.error("authorization import error:",t)}location.hash=(null==i?void 0:i.trim())?"#?tgaddr="+encodeURIComponent(i):"",u&&u.then((t=>t.mount()))},new((i=void 0)||(i=Promise))((function(a,n){function o(t){try{h(u.next(t))}catch(t){n(t)}}function r(t){try{h(u.throw(t))}catch(t){n(t)}}function h(t){var e;t.done?a(t.value):(e=t.value,e instanceof i?e:new i((function(t){t(e)}))).then(o,r)}h((u=u.apply(t,e||[])).next())}));var t,e,i,u}),(t=>{h=t,r.Z.managers.appStateManager.pushToState("authState",{_:"authStateSignImport",data:h})})),u=d}}]);
//# sourceMappingURL=231.6daa4b78a67992db4f2a.chunk.js.map

View File

@ -0,0 +1 @@
{"version":3,"file":"231.6daa4b78a67992db4f2a.chunk.js","mappings":"oKAYA,IAAIA,EAEJ,MAoCMC,EAAO,IAAI,IAAK,mBAAmB,GApCpB,KAAW,O,OAAD,E,OAAA,E,EAAA,aAC7B,OAAaA,EAAKC,OAAOC,mBAAmB,GAE5C,MAAM,KAACC,EAAI,MAAEC,EAAK,OAAEC,GAAUN,EAC9B,IAAIO,EACJ,IACE,oCAA0CH,GAC1C,MAAMI,QAAsB,kCAAwC,mCAAoC,CACtGC,OAAQ,OACRC,SAAU,SACVC,eAAgBN,GACf,CAACD,KAAAA,EAAMQ,cAAc,IAED,uBAApBJ,EAAcK,IACf,gCAAsCL,EAAcM,MACpDP,EAAiB,8BAAmBQ,MAAMC,GAAMA,EAAEC,WAGpD,MAAMC,GAEC,4BADCA,EAAiBC,MAEpBD,EAAiBE,SAAU,EAC5Bb,EAAiB,8BAAyBQ,MAAMC,GAAMA,EAAEC,WAGxDI,QAAQC,MAAM,8BAA+BJ,GAKnDK,SAASC,MAAOlB,MAAAA,OAAM,EAANA,EAAQmB,QAAS,YAAcC,mBAAmBpB,GAAU,GACzEC,GACDA,EAAeQ,MAAMd,GAASA,EAAK0B,W,YAhCR,K,iRAoC+BC,IAC5D5B,EAAO4B,EACP,yCAA+C,YAAa,CAACf,EAAG,sBAAuBb,KAAAA,OAGzF","sources":["webpack://tweb/./src/pages/pageSignImport.ts"],"sourcesContent":["/*\n * https://github.com/morethanwords/tweb\n * Copyright (C) 2019-2021 Eduard Kuzmenko\n * https://github.com/morethanwords/tweb/blob/master/LICENSE\n */\n\nimport {putPreloader} from '../components/putPreloader';\nimport App from '../config/app';\nimport rootScope from '../lib/rootScope';\nimport {AuthState} from '../types';\nimport Page from './page';\n\nlet data: AuthState.signImport['data'];\n\nconst onFirstMount = async() => {\n putPreloader(page.pageEl.firstElementChild, true);\n\n const {dcId, token, tgAddr} = data;\n let mountPageAfter: Promise<Page>;\n try {\n rootScope.managers.apiManager.setBaseDcId(dcId);\n const authorization = await rootScope.managers.apiManager.invokeApi('auth.importWebTokenAuthorization', {\n api_id: App.id,\n api_hash: App.hash,\n web_auth_token: token\n }, {dcId, ignoreErrors: true});\n\n if(authorization._ === 'auth.authorization') {\n rootScope.managers.apiManager.setUser(authorization.user);\n mountPageAfter = import('./pageIm').then((m) => m.default);\n // return;\n }\n } catch(err) {\n switch((err as ApiError).type) {\n case 'SESSION_PASSWORD_NEEDED':\n (err as ApiError).handled = true;\n mountPageAfter = import('./pagePassword').then((m) => m.default);\n break;\n default:\n console.error('authorization import error:', err);\n break;\n }\n }\n\n location.hash = tgAddr?.trim() ? '#?tgaddr=' + encodeURIComponent(tgAddr) : '';\n if(mountPageAfter) {\n mountPageAfter.then((page) => page.mount());\n }\n};\n\nconst page = new Page('page-signImport', true, onFirstMount, (_data: typeof data) => {\n data = _data;\n rootScope.managers.appStateManager.pushToState('authState', {_: 'authStateSignImport', data});\n});\n\nexport default page;\n"],"names":["data","page","pageEl","firstElementChild","dcId","token","tgAddr","mountPageAfter","authorization","api_id","api_hash","web_auth_token","ignoreErrors","_","user","then","m","default","err","type","handled","console","error","location","hash","trim","encodeURIComponent","mount","_data"],"sourceRoot":""}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,2 +1,2 @@
(()=>{"use strict";(()=>{if("undefined"!=typeof __webpack_require__){var e=__webpack_require__.u,t=__webpack_require__.e,i=new Map,r=new Map;__webpack_require__.u=function(t){return e(t)+(i.has(t)?"?"+i.get(t):"")},__webpack_require__.e=function(a){return t(a).catch((function(t){var n=r.has(a)?r.get(a):999999;if(n<1){var o=e(a);throw t.message="Loading chunk "+a+" failed after 999999 retries.\n("+o+")",t.request=o,t}return new Promise((function(e){setTimeout((function(){var t=Date.now();i.set(a,t),r.set(a,n-1),e(__webpack_require__.e(a))}),3e3)}))}))}}})();const e="undefined"!=typeof window?window:self,t=navigator?navigator.userAgent:null,i=(navigator.userAgent.search(/OS X|iPhone|iPad|iOS/i),navigator.userAgent.toLowerCase().indexOf("android"),/Chrome/.test(navigator.userAgent)&&/Google Inc/.test(navigator.vendor),(/iPad|iPhone|iPod/.test(navigator.platform)||"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1)&&e.MSStream,!!("safari"in e)||!(!t||!(/\b(iPad|iPhone|iPod)\b/.test(t)||t.match("Safari")&&!t.match("Chrome"))));let r;if(navigator.userAgent.toLowerCase().indexOf("firefox"),navigator.maxTouchPoints>0&&navigator.userAgent.search(/iOS|iPhone OS|Android|BlackBerry|BB10|Series ?[64]0|J2ME|MIDP|opera mini|opera mobi|mobi.+Gecko|Windows Phone/i),i)try{r=+navigator.userAgent.match(/Version\/(.+?) /)[1]>=14}catch(e){r=!1}else r=!0;const a=r,n="undefined"!=typeof ImageBitmap;const o=[[[16219713,13335381],[16757049,16168585],[16765248,16764327],[16768889,16768965]],[[16219713,10771e3],[16757049,14653547],[16765248,15577475],[16768889,16040864]],[[16219713,7354903],[16757049,11233085],[16765248,12812110],[16768889,14194279]],[[16219713,4858889],[16757049,8207886],[16765248,9852201],[16768889,11100983]],[[16219713,2101002],[16757049,4270372],[16765248,5848375],[16768889,6505791]]],s=e=>Math.round(255*Math.min(Math.max(e,0),1));importScripts("rlottie-wasm.js");const h=self.Module;class d{constructor(e,t,i,r){this.reqId=e,this.width=t,this.height=i,this.raw=r}init(e,t){if(!this.dead){this.fps=Math.max(1,Math.min(60,t||60));try{this.handle=c.Api.init(),this.stringOnWasmHeap=allocate(intArrayFromString(e),"i8",0),this.frameCount=c.Api.loadFromData(this.handle,this.stringOnWasmHeap),c.Api.resize(this.handle,this.width,this.height),m(["loaded",this.reqId,this.frameCount,this.fps]),!this.raw&&n&&(this.imageData=new ImageData(this.width,this.height))}catch(e){console.error("init RLottieItem error:",e),m(["error",this.reqId,e])}}}render(e,t){if(!this.dead&&void 0!==this.handle&&!(this.frameCount<e||e<0))try{c.Api.render(this.handle,e);const i=c.Api.buffer(this.handle),r=h.HEAPU8.subarray(i,i+this.width*this.height*4);this.imageData?(this.imageData.data.set(r),createImageBitmap(this.imageData).then((t=>{m(["frame",this.reqId,e,t],[t])}))):(t?t.set(r):t=new Uint8ClampedArray(r),m(["frame",this.reqId,e,t],[t.buffer]))}catch(e){console.error("Render error:",e),this.dead=!0,m(["error",this.reqId,e])}}destroy(){this.dead=!0,void 0!==this.handle&&c.Api.destroy(this.handle)}}const c=new class{constructor(){this.Api={}}initApi(){this.Api={init:h.cwrap("lottie_init","",[]),destroy:h.cwrap("lottie_destroy","",["number"]),resize:h.cwrap("lottie_resize","",["number","number","number"]),buffer:h.cwrap("lottie_buffer","number",["number"]),render:h.cwrap("lottie_render","",["number","number"]),loadFromData:h.cwrap("lottie_load_from_data","number",["number","number"])}}init(){this.initApi(),m(["ready"])}};h.onRuntimeInitialized=function(){c.init()};const u={},f={loadFromData:function(e,t,i,r,a,n){const h=u[e]=new d(e,i,r,n);(function(e){return function(e,t){return new Promise((t=>{const i=new FileReader;i.addEventListener("loadend",(e=>{t(e.target.result)})),i.readAsText(e)}))}(e)})(t).then((t=>{try{if("number"==typeof a&&a>=1&&a<=5){const e=JSON.parse(t);(function(e,t){const i=o[Math.max(t-1,0)],r=e=>{switch(e.ty){case"st":case"fl":(e=>{const t=e.c.k,r=s(t[2])|s(t[1])<<8|s(t[0])<<16,a=i.find((e=>e[0]===r));a&&(t[0]=(a[1]>>16&255)/255,t[1]=(a[1]>>8&255)/255,t[2]=(255&a[1])/255)})(e)}e.hasOwnProperty("it")&&a(e.it)},a=e=>{for(const t of e)r(t)};try{for(const t of e.layers)if(t.shapes)for(const e of t.shapes)e.it?a(e.it):r(e)}catch(i){console.warn("cant apply replacements",i,e,t)}})(e,a),t=JSON.stringify(e)}const e=t.match(/"fr":\s*?(\d+?),/),i=+(null==e?void 0:e[1])||60;h.init(t,i)}catch(i){console.error("Invalid file for sticker:",t),m(["error",e,i])}}))},destroy:function(e){const t=u[e];t&&(t.destroy(),delete u[e])},renderFrame:function(e,t,i){u[e].render(t,i)}};function m(e,t){postMessage({queryMethodListener:e.shift(),queryMethodArguments:e},a?t:void 0)}onmessage=function(e){f[e.data.queryMethod].apply(f,e.data.queryMethodArguments)}})();
//# sourceMappingURL=508.76b702f067e1a066dc5c.chunk.js.map
//# sourceMappingURL=508.478e1f850cbb66569931.chunk.js.map

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
1.6.2 (258)
1.6.2 (259)