telegram-tt/dist/main.796ebda225409aa7e740.js

2 lines
190 KiB
JavaScript
Raw Normal View History

2021-08-16 20:23:39 +02:00
(()=>{"use strict";var e,t,n,r,o,d,a={1226:(e,t,n)=>{n.d(t,{t9:()=>i,u3:()=>c,g8:()=>s});var r=n(3716),o=n(6926);let d;const a=new Map,u=new Map;function s(e,t){return d||(r.eM&&console.log(">>> START LOAD WORKER"),d=new Worker(new URL(n.p+n.u(370),n.b)),function(e){d.addEventListener("message",(({data:t})=>{if("update"===t.type)e(t.update);else if("methodResponse"===t.type){const e=a.get(t.messageId);e&&(t.error?e.reject(t.error):e.resolve(t.response))}else if("methodCallback"===t.type){const e=a.get(t.messageId);e&&e.callback&&e.callback(...t.callbackArgs)}else if("unhandledError"===t.type)throw t.error}))}(e)),l({type:"initApi",args:[t]})}function i(e,...t){if(d)return l({type:"callMethod",name:e,args:t});r.eM&&console.warn("API is not initialized")}function c(e){e.isCanceled=!0;const{messageId:t}=u.get(e)||{};t&&d.postMessage({type:"cancelProgress",messageId:t})}function l(e){const t=(0,o.Z)(a),n={messageId:t,...e},r={messageId:t},s=new Promise(((e,t)=>{Object.assign(r,{resolve:e,reject:t})}));if("function"==typeof n.args[1]){const e=n.args.pop();r.callback=e,u.set(e,r)}return a.set(t,r),s.catch((()=>{})).finally((()=>{a.delete(t),r.callback&&u.delete(r.callback)})),d.postMessage(n),s}},6137:(e,t,n)=>{n.d(t,{Vv:()=>r.Vv,_f:()=>r._f,_Q:()=>r._Q,IU:()=>o.I});var r=n(4746),o=n(9077)},9077:(e,t,n)=>{let r;n.d(t,{I:()=>r}),function(e){e[e.DataUri=0]="DataUri",e[e.BlobUrl=1]="BlobUrl",e[e.Lottie=2]="Lottie",e[e.Progressive=3]="Progressive",e[e.Stream=4]="Stream"}(r||(r={}))},4746:(e,t,n)=>{let r;n.d(t,{Vv:()=>r,_f:()=>o,_Q:()=>d}),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.Unknown="MessageEntityUnknown"}(r||(r={}));const o=-1,d="MESSAGE_DELETED"},88:(e,t,n)=>{n.d(t,{Z:()=>h});var r=n(4050),o=n(5116);const d=36,a=2147483647;function u(e,t,n){let r;for(e=n?Math.floor(e/700):e>>1,e+=Math.floor(e/t),r=0;e>455;r+=d)e=Math.floor(e/35);return Math.floor(r+36*e/(e+38))}function s(e,t){const n=[],r=[],o=e.length;let s,i,c,l,f,h,m,p,g,y,b,v,I;for(s=128,c=0,l=72,f=e.lastIndexOf("-"),f<0&&(f=0),h=0;h<f;++h){if(t&&(r[n.length]=e.charCodeAt(h)-65<26),e.charCodeAt(h)>=128)throw new RangeError("Illegal input >= 0x80");n.push(e.charCodeAt(h))}for(m=f>0?f+1:0;m<o;){for(p=c,g=1,y=d;;y+=d){if(m>=o)throw RangeError("punycode_bad_input(1)");if(b=(w=e.charCodeAt(m++))-48<10?w-22:w-65<26?w-65:w-97<26?w-97:d,b>=d)throw RangeError("punycode_bad_input(2)");if(b>Math.floor((a-c)/g))throw RangeError("punycode_overflow(1)");if(c+=b*g,v=y<=l?1:y>=l+26?26:y-l,b<v)break;if(g>Math.floor(a/(d-v)))throw RangeError("punycode_overflow(2)");g*=d-v}if(i=n.length+1,l=u(c-p,i,0===p),Math.floor(c/i)>a-s)throw RangeError("punycode_overflow(3)");s+=Math.floor(c/i),c%=i,t&&r.splice(c,0,e.charCodeAt(m-1)-65<26),n.splice(c,0,s),c++}var w;if(t)for(c=0,I=n.length;c<I;c++)r[c]&&(n[c]=String.fromCharCode(n[c]).toUpperCase().charCodeAt(0));return(e=>{const t=[];let n=0;const r=e.length;let o;for(;n<r;){if(o=e[n++],55296==(63488&o))throw new RangeError("UTF-16(encode): Illegal UTF-16 value");o>65535&&(o-=65536,t.push(String.fromCharCode(o>>>10&1023|55296)),o=56320|1023&o),t.push(String.fromCharCode(o))}return t.join("")})(n)}var i=n(3716),c=n(6752);function l(e){if(e)return e.includes("://")?e:`https://${e}`}function f(e){if(!e)return;const t=l(e);if(t)try{let e=decodeURI(t);const n=e.match(/^https?:\/\/([^/:?#]+)(?:[/:?#]|$)/i);if(!n)return;const r=n[1];return e=e.replace(r,function(e){const t=e.split("."),n=[];for(let e=0;e<t.length;++e){const r=t[e];n.push(r.match(/^xn--/)?s(r.slice(4)):r)}return n.join(".")}(r)),e}catch(t){i.eM&&console.error("SafeLink.getDecodedUrl error ",e,t)}}const h=(0,r.X$)(
//# sourceMappingURL=main.796ebda225409aa7e740.js.map