!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=109)}([function(e,t,n){consts=n(6),i=n(80),a=n(59),r=n(20),o=n(98),c=n(99),u=n(21),d=n(27),l=n(103),f=n(42),p=n(8);e.exports={Api:s,TelegramClient:i,sessions:l,connection:a,extensions:f,tl:r,version:o,events:c,utils:u,errors:d,helpers:p}},function(e,t,n){"use strict";n.d(t,"f",(function(){returnM})),n.d(t,"a",(function(){returnk})),n.d(t,"b",(function(){returnE})),n.d(t,"e",(function(){returnR})),n.d(t,"g",(function(){returnU})),n.d(t,"c",(function(){returnT})),n.d(t,"i",(function(){returnB})),n.d(t,"h",(function(){returnD})),n.d(t,"d",(function(){returnx}));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(42),r=n(4),o=n(17),c=n(26),u=n(9),d=n(41),l=n(11),f=n(5),p=n(2),g=n(34);consth=self.caches;letm;asyncfunctiony(e,t,n){if(h)try{consts=newRequest(t),i=awaith.open(e),a=awaiti.match(s);if(!a)return;switch(n){casem.Text:returnawaita.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:returnawaita.json();default:return}}catch(e){returnvoidconsole.warn(e)}}asyncfunctionb(e,t,n){if(h)try{consts="string"==typeofn||ninstanceofBlob?n:JSON.stringify(n),i=newRequest(t),a=newResponse(s),r=awaith.open(e);returnawaitr.put(i,a)}catch(e){returnvoidconsole.warn(e)}}asyncfunction_(e){try{if(!h)return;returnawaith.delete(e)}catch(e){returnvoidconsole.warn(e)}}asyncfunctionw({url:e,mediaFormat:t,start:n,end:a},o,c,u){const{data:h,mimeType:m,fullSize:y}=awaitasyncfunction(e,t,n,s,a,o,c){constu=e.match(/(avatar|profile|photo|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"));letd,g=u[2];consth=u[3]?u[3].replace("?size=",""):void0;letm;"avatar"===u[1]||"profile"===u[1]?(d=Object(p.s)(Number(g)),g=Math.abs(Number(g))):d=u[1];switch(d){case"channel":case"chat":m=f.a.chats[g];break;case"user":m=f.a.users[g];break;case"msg":m=f.a.messages[g];break;case"sticker":case"gif":case"wallpaper":m=f.a.documents[g];break;case"photo":m=f.a.photos[g];break;case"stickerSet":m=f.a.stickerSets[g]}if(!m)return;if(["msg","sticker","gif","wallpaper","photo"].includes(d)){c===l.ApiMediaFormat.Stream&&(s.acceptsBuffer=!0);conste=awaitt.downloadMedia(m,{sizeType:h,start:a,end:o,progressCallback:s,workers:r.j});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,h),m.mediainstanceofi.Api.MessageMediaDocument&&m.media.documentinstanceofi.Api.Document&&(u=m.media.document.size)):minstanceofi.Api.Photo?n="image/j