!function(e){vart={};functionn(s){if(t[s])returnt[s].exports;vari=t[s]={i:s,l:!1,exports:{}};returne[s].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=e,n.c=t,n.d=function(e,t,s){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:s})},n.r=function(e){"undefined"!=typeofSymbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)returne;if(4&t&&"object"==typeofe&&e&&e.__esModule)returne;vars=Object.create(null);if(n.r(s),Object.defineProperty(s,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeofe)for(variine)n.d(s,i,function(t){returne[t]}.bind(null,i));returns},n.n=function(e){vart=e&&e.__esModule?function(){returne.default}:function(){returne};returnn.d(t,"a",t),t},n.o=function(e,t){returnObject.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=107)}([function(e,t,n){consts=n(6),i=n(81),a=n(40),r=n(18),o=n(98),c=n(99),u=n(19),l=n(27),d=n(103),f=n(33),p=n(8);e.exports={Api:s,TelegramClient:i,sessions:d,connection:a,extensions:f,tl:r,version:o,events:c,utils:u,errors:l,helpers:p}},function(e,t,n){"use strict";n.d(t,"d",(function(){returnC})),n.d(t,"a",(function(){returnM})),n.d(t,"e",(function(){returnE})),n.d(t,"b",(function(){returnR})),n.d(t,"g",(function(){returnO})),n.d(t,"f",(function(){returnU})),n.d(t,"c",(function(){returnT}));vars={};n.r(s),n.d(s,"Type",(function(){returnm})),n.d(s,"fetch",(function(){returny})),n.d(s,"save",(function(){returnb})),n.d(s,"clear",(function(){return_}));vari=n(0),a=n(33),r=n(4),o=n(16),c=n(26),u=n(9),l=n(42),d=n(10),f=n(5),p=n(2),h=n(35);constg=self.caches;letm;asyncfunctiony(e,t,n){if(!g)return;consts=newRequest(t),i=awaitg.open(e),a=awaiti.match(s);if(a)switch(n){casem.Text:returna.text();casem.Blob:{conste=awaita.blob();if("sticker"===t.substr(0,7))returnnewBlob([e],{type:"image/webp"});if(!e.type){constt=a.headers.get("Content-Type");if(t)returnnewBlob([e],{type:t})}returne}casem.Json:returna.json();default:return}}asyncfunctionb(e,t,n){if(!g)return;consts="string"==typeofn||ninstanceofBlob?n:JSON.stringify(n),i=newRequest(t),a=newResponse(s);return(awaitg.open(e)).put(i,a)}function_(e){if(g)returng.delete(e)}asyncfunctionw({url:e,mediaFormat:t,start:n,end:a},o,c,u){const{data:g,mimeType:m,fullSize:y}=awaitasyncfunction(e,t,n,s,a,o,c){constu=e.match(/(avatar|profile|msg|stickerSet|sticker|wallpaper|gif|file)([-\d\w./]+)(\?size=\w+)?/);if(!u)return;if("file"===u[1]){conste=awaitfetch(u[2]);return{data:awaite.arrayBuffer()}}if(!n)returnPromise.reject(newError("ERROR: Client is not connected"));letl,h=u[2];constg=u[3]?u[3].replace("?size=",""):void0;letm;"avatar"===u[1]||"profile"===u[1]?(l=Object(p.s)(Number(h)),h=Math.abs(Number(h))):l=u[1];switch(l){case"channel":case"chat":m=f.a.chats[h];break;case"user":m=f.a.users[h];break;case"msg":m=f.a.messages[h];break;case"sticker":case"gif":case"wallpaper":m=f.a.documents[h];break;case"stickerSet":m=f.a.stickerSets[h]}if(!m)return;if("msg"===l||"sticker"===l||"gif"===l||"wallpaper"===l){c===d.ApiMediaFormat.Stream&&(s.acceptsBuffer=!0);conste=awaitt.downloadMedia(m,{sizeType:g,start:a,end:o,progressCallback:s,workers:r.k});letn,u;returnminstanceofi.Api.Message?(n=function(e,t){if(!e||!e.media)return;if(e.mediainstanceofi.Api.MessageMediaPhoto)return"image/jpeg";if(e.mediainstanceofi.Api.MessageMediaDocument&&e.media.documentinstanceofi.Api.Document)returnt?e.media.document.attributes.some(e=>einstanceofi.Api.DocumentAttributeSticker)?"image/webp":"image/jpeg":e.media.document.mimeType;return}(m,g),m.mediainstanceofi.Api.MessageMediaDocument&&m.media.documentinstanceofi.Api.Document&&(u=m.media.document.size)):"sticker"===l&&g?n="image/webp":(n=m.mimeType,u=m.size),{mimeType:n,data:e,fullSize:u}}if("stickerSet"===l){conste=awaitt.downloadStickerSetThumb(m);return{mimeType:c===d.ApiMediaFormat.Lottie?"application/json":"image/jpeg",data:e}}{conste=awaitt.downloadProfilePhoto(m,"profile"===u[1]);return{mimeT