telegram-tt/dist/main.c83c34f25b1293a8eaf4.js

2 lines
259 KiB
JavaScript
Raw Normal View History

2022-09-27 22:02:12 +02:00
(()=>{"use strict";var e,t,n,o,r,d,a={71226:(e,t,n)=>{n.d(t,{t9:()=>c,u3:()=>l,g8:()=>u});var o=n(83716),r=n(26926),d=n(69118);let a;const s=new Map,i=new Map;function u(e,t){return a||(o.eM&&console.log(">>> START LOAD WORKER"),a=new Worker(new URL(n.p+n.u(8090),n.b)),function(e){a.addEventListener("message",(t=>{let{data:n}=t;if("update"===n.type)e(n.update);else if("methodResponse"===n.type){const e=s.get(n.messageId);e&&(n.error?e.reject(n.error):e.resolve(n.response))}else if("methodCallback"===n.type){var o,r;null===(o=s.get(n.messageId))||void 0===o||null===(r=o.callback)||void 0===r||r.call(o,...n.callbackArgs)}else if("unhandledError"===n.type){var d;throw new Error(null===(d=n.error)||void 0===d?void 0:d.message)}}))}(e),"iOS"===t.platform&&window.addEventListener("focus",(()=>{m(),setTimeout((()=>m()),1e3)}))),f({type:"initApi",args:[t]})}function c(e){if(!a)return void(o.eM&&console.warn("API is not initialized"));for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];const d=f({type:"callMethod",name:e,args:n});return o.eM&&(async()=>{try{await d}catch(e){}})(),d}function l(e){e.isCanceled=!0;const{messageId:t}=i.get(e)||{};t&&a.postMessage({type:"cancelProgress",messageId:t})}function f(e){const t=(0,r.Z)(s),n={messageId:t,...e},o={messageId:t},d=new Promise(((e,t)=>{Object.assign(o,{resolve:e,reject:t})}));if("args"in n&&"name"in n&&"function"==typeof n.args[1]){n.withCallback=!0;const e=n.args.pop();o.callback=e,i.set(e,o)}return s.set(t,o),d.catch((()=>{})).finally((()=>{s.delete(t),o.callback&&i.delete(o.callback)})),a.postMessage(n),d}const h=Date.now();async function m(){let e=!1;try{await Promise.race([f({type:"ping"}),(0,d.wO)(150).then((()=>e?void 0:Promise.reject(new Error("HEALTH_CHECK_TIMEOUT"))))])}catch(e){console.error(e),Date.now()-h>=5e3&&window.location.reload()}finally{e=!0}}},6137:(e,t,n)=>{n.d(t,{IU:()=>r.I,Vv:()=>o.Vv,_Q:()=>o._Q,_f:()=>o._f});var o=n(94746),r=n(9077)},9077:(e,t,n)=>{let o;n.d(t,{I:()=>o}),function(e){e[e.BlobUrl=0]="BlobUrl",e[e.Progressive=1]="Progressive",e[e.Stream=2]="Stream",e[e.DownloadUrl=3]="DownloadUrl",e[e.Text=4]="Text"}(o||(o={}))},94746:(e,t,n)=>{let o;n.d(t,{Vv:()=>o,_Q:()=>d,_f:()=>r}),function(e){e.Bold="MessageEntityBold",e.Blockquote="MessageEntityBlockquote",e.BotCommand="MessageEntityBotCommand",e.Cashtag="MessageEntityCashtag",e.Code="MessageEntityCode",e.Email="MessageEntityEmail",e.Hashtag="MessageEntityHashtag",e.Italic="MessageEntityItalic",e.MentionName="MessageEntityMentionName",e.Mention="MessageEntityMention",e.Phone="MessageEntityPhone",e.Pre="MessageEntityPre",e.Strike="MessageEntityStrike",e.TextUrl="MessageEntityTextUrl",e.Url="MessageEntityUrl",e.Underline="MessageEntityUnderline",e.Spoiler="MessageEntitySpoiler",e.CustomEmoji="MessageEntityCustomEmoji",e.Unknown="MessageEntityUnknown"}(o||(o={}));const r=-1,d="MESSAGE_DELETED"},58912:(e,t,n)=>{n.d(t,{Z:()=>l});var o=n(14050),r=n(46752),d=n(70692),a=n(60706),s=n(97799);function i(){return i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},i.apply(this,arguments)}const u=150,c=new Set,l=(0,o.X$)((function(e){const{size:t=u,play:n=!0,noLoop:l=!0,className:f,noTransition:h,nonInteractive:m,onLoad:p,onClick:g,...v}=e,{tgsUrl:y}=e,b=`${y}_${t}`,[I,w]=(0,a.Z)(c.has(b)),C=(0,d.Z)(h||I),S=(0,o.I4)((()=>{w(),c.add(b),null==p||p()}),[b,w,p]),[E,P]=(0,o.eJ)(String(Math.random())),k=(0,o.I4)((()=>{!0===n&&P(String(Math.random())),null==g||g()}),[g,n]);return o.ZP.createElement(s.Z,i({className:(0,r.Z)(f,C),size:t,play:!0===n?E:n,noLoop:l,onClick:m?void 0:k,onLoad:S},v))}))},97799:(e,t,n)=>{n.d(t,{Z:()=>f});var o=n(14050),r=n(69118),d=n(46752),a=n(80036),s=n(18674),i=n(45332);let u,c;async function l(){return u||(u=n.e(7941).then(n.bind(n,67941)),c=(await u).default),u}setTimeout(l,3e3);const f=(0,o.X$)((e=>{let{ref:t,className:n,style:u,tgsUrl:f,play:h,playSegment:m,speed:p,noLoop:g,size:v,quality:y,isLowPriority:b,color:I,forceOnHeavyAnimation:w,onClick:C,o
//# sourceMappingURL=main.c83c34f25b1293a8eaf4.js.map