telegafi-bgtf.top Open in urlscan Pro
109.248.21.109  Public Scan

Submitted URL: http://telegafi-bgtf.top/zz/main.db9b185ae5668ccd3031.bundle.js
Effective URL: https://telegafi-bgtf.top/zz/main.db9b185ae5668ccd3031.bundle.js
Submission: On August 23 via api from US — Scanned from DE

Form analysis 0 forms found in the DOM

Text Content

(()=>{"use strict";var e,t,n,s,i,o={4159:(e,t,n)=>{var s;n.d(t,{Oo:()=>o,ZP:()=>c});const i=["web.telegram.org","webk.telegram.org"],o="pattern",r=Math.min(4,null!==(s=navigator.hardwareConcurrency)&&void 0!==s?s:4),a={id:1025907,hash:"452b0359b988148995f22ff0f4229750",version:"1.8.0",versionFull:"1.8.0 (324)",build:324,langPackVersion:"1.6.6",langPack:"webk",langPackCode:"en",domains:i,baseDcId:2,isMainDomain:i.includes(location.hostname),suffix:"K",threads:r,cryptoWorkers:r};a.isMainDomain&&(a.id=2496,a.hash="8da85b0d5bfe62527e5b244c209159c3");const c=a},410:(e,t,n)=>{n.d(t,{GO:()=>r,Tj:()=>i,ZP:()=>a});var s=n(1267);const i=!1,o=i||s.Z.debug,r="undefined"!=typeof window?window:self,a=o},236:(e,t,n)=>{n.d(t,{t:()=>c,h:()=>d});var s=n(4762),i=n(144),o=n(4159);const r=o.ZP.version,a=o.ZP.build,c={_:"theme",access_hash:"",id:"",settings:[{_:"themeSettings",pFlags:{},base_theme:{_:"baseThemeClassic"},accent_color:3379436,message_colors:[5221966],wallpaper:{_:"wallPaper",pFlags:{default:!0,pattern:!0},access_hash:"",document:void 0,id:"",slug:"pattern",settings:{_:"wallPaperSettings",pFlags:{},intensity:50,background_color:14409147,second_background_color:7054727,third_background_color:14014605,fourth_background_color:8960132}}},{_:"themeSettings",pFlags:{},base_theme:{_:"baseThemeNight"},accent_color:8877281,message_colors:[8877281],wallpaper:{_:"wallPaper",pFlags:{default:!0,pattern:!0,dark:!0},access_hash:"",document:void 0,id:"",slug:"pattern",settings:{_:"wallPaperSettings",pFlags:{},intensity:-50,background_color:16696470,second_background_color:14511289,third_background_color:9842623,fourth_background_color:5200853}}}],slug:"",title:"",emoticon:"🏠",pFlags:{default:!0}},l=(e,t,n)=>Object.assign(Object.assign({},c),{name:e,settings:Object.assign(Object.assign({},c.settings.find((e=>e.base_theme._===t))),{highlightningColor:n})}),d={allDialogsLoaded:{},pinnedOrders:{},contactsListCachedTime:0,updates:{},filtersArr:[],maxSeenMsgId:0,stateCreatedTime:Date.now(),recentEmoji:[],recentCustomEmoji:[],topPeersCache:{},recentSearch:[],version:r,build:a,authState:{_:s.IS_MOBILE?"authStateSignIn":"authStateSignQr"},hiddenPinnedMessages:{},settings:{messagesTextSize:16,distanceUnit:"kilometers",sendShortcut:"enter",autoDownload:{photo:{contacts:!0,private:!0,groups:!0,channels:!0},video:{contacts:!0,private:!0,groups:!0,channels:!0},file:{contacts:!0,private:!0,groups:!0,channels:!0}},autoDownloadNew:{_:"autoDownloadSettings",file_size_max:3145728,pFlags:{video_preload_large:!0,audio_preload_next:!0},photo_size_max:1048576,video_size_max:15728640,video_upload_maxbitrate:100},stickers:{suggest:"all",dynamicPackOrder:!0,loop:!0},emoji:{suggest:!0,big:!0},themes:[l("day","baseThemeClassic","hsla(86.4, 43.846153%, 45.117647%, .4)"),l("night","baseThemeNight","hsla(299.142857, 44.166666%, 37.470588%, .4)")],theme:"system",notifications:{sound:!1},timeFormat:(new Date).toLocaleString().match(/\s(AM|PM)/)?"h12":"h23",liteMode:{all:!1,animations:!1,chat:!1,chat_background:!1,chat_spoilers:!1,effects:!1,effects_premiumstickers:!1,effects_reactions:!1,effects_emoji:!1,emoji:!1,emoji_messages:!1,emoji_panel:!1,gif:!1,stickers:!1,stickers_chat:!1,stickers_panel:!1,video:!1}},playbackParams:{volume:1,muted:!1,playbackRate:1,playbackRates:{voice:1,video:1,audio:1},loop:!1,round:!1},keepSigned:!0,chatContextMenuHintWasShown:!1,stateId:(0,i.d)(32),notifySettings:{},confirmedWebViews:[]}},8189:(e,t,n)=>{n.d(t,{Z:()=>i});let s=!1;try{const e=document.createElement("canvas").getContext("webgl"),t=e.getExtension("WEBGL_debug_renderer_info"),n=t&&e.getParameter(t.UNMASKED_RENDERER_WEBGL)||"";(n.match(/Apple/)&&!n.match(/Apple GPU/)||-1===e.getSupportedExtensions().indexOf("WEBGL_compressed_texture_s3tc_srgb"))&&(s=!0)}catch(e){}const i=s},993:(e,t,n)=>{n.d(t,{Z:()=>s});const s=n(4089).Z},7328:(e,t,n)=>{let s;if(n.d(t,{Z:()=>i}),n(4762).IS_SAFARI)try{s=+navigator.userAgent.match(/Version\/(.+?) /)[1]>=14}catch(e){s=!1}else s=!0;const i=s},6663:(e,t,n)=>{n.d(t,{Z:()=>s});const s="filter"in(document.createElement("canvas").getContext("2d")||{})},9976:(e,t,n)=>{n.d(t,{Z:()=>s});const s=-1!==navigator.userAgent.search(/OS X|iPhone|iPad|iOS/i)},3731:(e,t,n)=>{var s;n.d(t,{Z:()=>i});const i=!!(null===(s=null===navigator||void 0===navigator?void 0:navigator.geolocation)||void 0===s?void 0:s.getCurrentPosition)&&!1},6818:(e,t,n)=>{n.d(t,{Z:()=>s});const s=n(4089).Z},1174:(e,t,n)=>{n.d(t,{Z:()=>o});var s=n(5269);const i=new Set(["image/jpeg","image/png","image/bmp"]);s.Z&&i.add("image/webp");const o=i},2341:(e,t,n)=>{n.d(t,{Z:()=>r});var s=n(1174),i=n(554);const o=[...s.Z].concat([...i.Z]),r=new Set(o)},9030:(e,t,n)=>{n.d(t,{Z:()=>i});var s=n(4762);const i=!!document.createElement("video").canPlayType("video/quicktime")||s.IS_SAFARI||s.IS_APPLE_MOBILE},5783:(e,t,n)=>{n.d(t,{Z:()=>i});const s=document.createElement("audio"),i=!(!s.canPlayType||!s.canPlayType("audio/ogg;").replace(/no/,""))},2365:(e,t,n)=>{n.d(t,{Z:()=>s});const s=!n(4762).IS_FIREFOX&&!1},2820:(e,t,n)=>{n.d(t,{Z:()=>s});const s=!!("getDisplayMedia"in((null===navigator||void 0===navigator?void 0:navigator.mediaDevices)||{}))},2045:(e,t,n)=>{n.d(t,{Z:()=>i});var s=n(1267);const i="undefined"!=typeof SharedWorker&&!s.Z.noSharedWorker},5432:(e,t,n)=>{n.d(t,{Z:()=>s});const s="ontouchstart"in window||window.DocumentTouch&&document instanceof DocumentTouch},4762:(e,t,n)=>{n.r(t),n.d(t,{IS_ANDROID:()=>r,IS_APPLE:()=>o,IS_APPLE_MOBILE:()=>c,IS_CHROMIUM:()=>a,IS_FIREFOX:()=>d,IS_MOBILE:()=>h,IS_MOBILE_SAFARI:()=>u,IS_SAFARI:()=>l,USER_AGENT:()=>i});var s=n(6761);const i="Telegram Web 2.1.0 K",o=-1!==navigator.userAgent.search(/OS X|iPhone|iPad|iOS/i),r=-1!==navigator.userAgent.toLowerCase().indexOf("android"),a=/Chrome/.test(navigator.userAgent)&&/Google Inc/.test(navigator.vendor),c=(/iPad|iPhone|iPod/.test(navigator.platform)||"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1)&&!s.Z.MSStream,l=!!("safari"in s.Z)||!(!i||!(/\b(iPad|iPhone|iPod)\b/.test(i)||i.match("Safari")&&!i.match("Chrome"))),d=navigator.userAgent.toLowerCase().indexOf("firefox")>-1,u=l&&c,h=(void 0===navigator.maxTouchPoints||navigator.maxTouchPoints>0)&&-1!=navigator.userAgent.search(/iOS|iPhone OS|Android|BlackBerry|BB10|Series ?[64]0|J2ME|MIDP|opera mini|opera mobi|mobi.+Gecko|Windows Phone/i)},2131:(e,t,n)=>{n.d(t,{Z:()=>s});const s=!!(null===navigator||void 0===navigator?void 0:navigator.vibrate)},554:(e,t,n)=>{n.d(t,{Z:()=>o});var s=n(9030);const i=new Set(["image/gif","video/mp4","video/webm"]);s.Z&&i.add("video/quicktime");const o=i},393:(e,t,n)=>{n.d(t,{Z:()=>i});var s=n(4762);const i=!!document.createElement("video").canPlayType("video/webm")&&!s.IS_SAFARI&&!s.IS_APPLE_MOBILE},5269:(e,t,n)=>{n.d(t,{Z:()=>s});const s=document.createElement("canvas").toDataURL("image/webp").startsWith("data:image/webp")},4089:(e,t,n)=>{n.d(t,{Z:()=>i});var s=n(4762);const i=!("undefined"==typeof RTCPeerConnection||s.IS_FIREFOX)},9897:(e,t,n)=>{n.d(t,{Z:()=>o});var s=n(410),i=n(9405);function o(e,t,n,s,o=!0){if(e<n&&t<s&&o)return(0,i.C)(e,t);let r=n,a=s;return e/t>n/s?a=t*n/e|0:(r=e*s/t|0,r>n&&(a=a*n/r|0,r=n)),o&&r>=e&&a>=t&&(r=e,a=t),(0,i.C)(r,a)}s.GO.calcImageInBox=o},2064:(e,t,n)=>{n.d(t,{Dk:()=>g,EM:()=>w,K5:()=>h,Pi:()=>c,WE:()=>o,Y6:()=>a,cw:()=>d,dI:()=>r,e9:()=>f,ix:()=>p,oo:()=>l,py:()=>i,t1:()=>u,tB:()=>y,uY:()=>v});var s=n(3228);function i(e,t,n){e/=255,t/=255,n/=255;const s=Math.max(e,t,n),i=s-Math.min(e,t,n),o=i&&(s===e?(t-n)/i:s==t?2+(n-e)/i:4+(e-t)/i);return[60*(o<0?o+6:o),s&&i/s,s]}function o(e,t,n){const s=(s,i=(s+e/60)%6)=>Math.round(255*(n-n*t*Math.max(Math.min(i,4-i,1),0)));return[s(5),s(3),s(1)]}function r(e,t,n,s=1){e/=255,t/=255,n/=255;const i=Math.max(e,t,n),o=Math.min(e,t,n);let r,a;const c=(i+o)/2;if(i===o)r=a=0;else{const s=i-o;switch(a=c>.5?s/(2-i-o):s/(i+o),i){case e:r=(t-n)/s+(t<n?6:0);break;case t:r=(n-e)/s+2;break;case n:r=(e-t)/s+4}r/=6}return{h:360*r,s:100*a,l:100*c,a:s}}function a(e,t,n,s){let i,o,r;if(e/=360,n/=100,0==(t/=100))i=o=r=n;else{const s=function(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e},a=n<.5?n*(1+t):n+t-n*t,c=2*n-a;i=s(c,a,e+1/3),o=s(c,a,e),r=s(c,a,e-1/3)}return[i,o,r,s].map((e=>Math.round(255*e)))}function c(e){const t=[],n="#"===e[0]?1:0;if(e.length===5+n&&(e=(n?"#":"")+"0"+e.slice(n)),e.length===3+n)for(let s=n;s<e.length;++s)t.push(parseInt(e[s]+e[s],16));else if(e.length===4+n){for(let s=n;s<e.length-1;++s)t.push(parseInt(e[s]+e[s],16));t.push(parseInt(e[e.length-1],16))}else for(let s=n;s<e.length;s+=2)t.push(parseInt(e.slice(s,s+2),16));return t}function l(e){return c(e.slice(0,7))}function d(e){const t=c(e);return r(t[0],t[1],t[2],t[3])}function u(e){return"#"+e.map((e=>("0"+e.toString(16)).slice(-2))).join("")}function h(e){return function(e){return u(function(e){const t=e.slice(5,-1).split(", "),n=+t.pop(),s=t.map((e=>e.endsWith("%")?+e.slice(0,-1):+e));return a(s[0],s[1],s[2],n)}(e))}(e).slice(0,-2)}function g(e,t,n){const s=new Array(3);for(let i=0;i<3;++i){const o=e[i],r=t[i];s[i]=Math.floor(r+(o-r)*n)}return s}function m(e){return(.2126*e[0]+.7152*e[1]+.0722*e[2])/255}function p(e,t){return e.map(((e,n)=>Math.round((e+t[n])/2)))}function f(e,t,n){const s=i(...t),r=i(...n),a=Math.min(1.5*s[1]/e[1],1);return s[0]=Math.min(360,r[0]-s[0]+e[0]),s[1]=Math.min(1,r[1]*e[1]/s[1]),s[2]=Math.min(1,(r[2]/s[2]+a-1)*e[2]/a),s[2]<.3?n:o(...s)}function v(e,t,n,r){const a=i(...n);if(Math.min(Math.abs(a[0]-e[0]),Math.abs(a[0]-e[0]-360))>30)return n;const c=Math.min(1.5*a[1]/e[1],1);a[0]=Math.min(360,a[0]+t[0]-e[0]),a[1]=Math.min(1,a[1]*t[1]/e[1]),a[2]=Math.min(1,a[2]*(1-c+c*t[2]/e[2]));let l=o(...a);const d=m(n),u=m(l);if(r?d>u:d<u){const e=.6;l=function(e,t){return e.map((e=>(0,s.Z)(Math.round(e*t),0,255)))}(l,(1-e)*d/u+e)}return l}function b(e){const t=(e<0?16777215+e:e).toString(16);return"#"+(t.length>=6?t:"0".repeat(6-t.length)+t)}function y(e){return l(b(e))}function w(e){return e.settings?[e.settings.background_color,e.settings.second_background_color,e.settings.third_background_color,e.settings.fourth_background_color].filter(Boolean).map(b).join(","):""}},6009:(e,t,n)=>{function s(e,t){e=e.split(" ",1)[0],t=t.split(" ",1)[0];const n=e.split("."),s=t.split(".");for(let e=0;e<n.length;++e){const t=+n[e],i=+s[e];if(t>i)return 1;if(t<i)return-1}return 0}n.d(t,{Z:()=>s})},632:(e,t,n)=>{n.d(t,{OD:()=>m,fl:()=>A,kZ:()=>d,mr:()=>p,rz:()=>g,s2:()=>l,xE:()=>f,zM:()=>h});var s=n(410),i=n(2325),o=n(9005);const r=["January","February","March","April","May","June","July","August","September","October","November","December"],a=r.slice(),c=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"].slice(),l=86400;function d(){a.splice(0,a.length,...function(){const e=i.ZP.getDateTimeFormat({month:"long"}),t=new Date(Date.UTC(2017,0,1)),n=[];for(let s=0;s<12;++s)n.push((0,o.Z)(e.format(t))),t.setMonth(t.getMonth()+1);return n}()),c.splice(0,c.length,...function(){const e=i.ZP.getDateTimeFormat({weekday:"long"}),t=new Date(Date.UTC(2017,0,2)),n=[];for(let s=0;s<7;++s)n.push((0,o.Z)(e.format(t))),t.setDate(t.getDate()+1);return n}())}const u=e=>{const t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate())),n=t.getUTCDay()||7;t.setUTCDate(t.getUTCDate()+4-n);const s=new Date(Date.UTC(t.getUTCFullYear(),0,1));return Math.ceil(((t.getTime()-s.getTime())/l+1)/7)};function h(e){const t=new Date,n=t.getTime()/1e3|0,s=e.getTime()/1e3|0,o={};return n-s<l&&t.getDate()===e.getDate()?o.hour=o.minute="2-digit":t.getFullYear()!==e.getFullYear()?(o.year=o.day="numeric",o.month="2-digit"):n-s<7*l&&u(t)===u(e)?o.weekday="short":(o.month="short",o.day="numeric"),new i.ZP.IntlDateElement({date:e,options:o}).element}function g(e,t={}){const n=new Date,s=new Date(1e3*e),o=n.getTime()/1e3,r=p(s);let a;return o-e<l&&n.getDate()===s.getDate()?a=(0,i.ag)(t.capitalize?"Date.Today":"Peer.Status.Today"):o-e<2*l&&n.getDate()-1===s.getDate()?(a=(0,i.ag)(t.capitalize?"Yesterday":"Peer.Status.Yesterday"),t.capitalize&&(a.style.textTransform="capitalize")):a=n.getFullYear()!==s.getFullYear()?new i.ZP.IntlDateElement({date:s,options:{month:"short",day:"numeric",year:"numeric"}}).element:new i.ZP.IntlDateElement({date:s,options:{month:"short",day:"numeric"}}).element,{dateEl:a,timeEl:r}}function m(e,t=!0){const{dateEl:n,timeEl:s}=g(e,{capitalize:t}),o=document.createDocumentFragment();return o.append(n," ",(0,i.ag)("ScheduleController.at")," ",s),o}function p(e){return new i.ZP.IntlDateElement({date:e,options:{hour:"2-digit",minute:"2-digit"}}).element}s.GO&&(s.GO.formatDateAccordingToTodayNew=h);const f=(e,t={})=>{const n=t.monthAsNumber?".":" ",s=("0"+e.getHours()).slice(-2)+":"+("0"+e.getMinutes()).slice(-2)+(t.noSeconds?"":":"+("0"+e.getSeconds()).slice(-2));return(t.leadingZero?("0"+e.getDate()).slice(-2):e.getDate())+n+(t.monthAsNumber?("0"+(e.getMonth()+1)).slice(-2):r[e.getMonth()])+n+e.getFullYear()+(t.noTime?"":", "+s)},v=2013,b=new RegExp("20[0-9]{1,2}"),y="\\p{L}",w=new RegExp(`(${y}{3,})`,"iu"),S=new RegExp(`(${y}{3,}) ([0-9]{0,4})`,"iu"),k=new RegExp(`([0-9]{0,4}) (${y}{2,})`,"iu"),P=new RegExp("^([0-9]{1,4})(\\.| |/|\\-)([0-9]{1,4})$","i"),_=new RegExp("^([0-9]{1,2})(\\.| |/|\\-)([0-9]{1,2})(\\.| |/|\\-)([0-9]{1,4})$","i"),E=[31,29,31,30,31,30,31,31,30,31,30,31];function A(e,t){const n=e.trim().toLowerCase();if(n.length<3)return;if(["today",i.ZP.format("Peer.Status.Today",!0)].some((e=>0===e.indexOf(n)))){const e=new Date,n=e.getFullYear(),s=e.getMonth(),o=e.getDate();e.setFullYear(n,s,o),e.setHours(0,0,0);const r=e.getTime();e.setFullYear(n,s,o+1),e.setHours(0,0,0);const a=e.getTime()-1;return void t.push({title:i.ZP.format("Date.Today",!0),minDate:r,maxDate:a})}if(["yesterday",i.ZP.format("Peer.Status.Yesterday",!0)].some((e=>0===e.indexOf(n)))){const e=new Date,n=e.getFullYear(),s=e.getMonth(),r=e.getDate();e.setFullYear(n,s,r),e.setHours(0,0,0);const a=e.getTime()-864e5;e.setFullYear(n,s,r+1),e.setHours(0,0,0);const c=e.getTime()-86400001;return void t.push({title:(0,o.Z)(i.ZP.format("Yesterday",!0)),minDate:a,maxDate:c})}const s=function(e){const t=new Date;if(e.length<=3)return-1;for(let n=0;n<7;n++)if(t.setDate(t.getDate()+1),0===M(t.getTime()).toLowerCase().indexOf(e))return t.getDay();return-1}(n);if(s>=0){const e=new Date,n=e.getTime(),i=s-e.getDay();e.setDate(e.getDate()+i),e.getTime()>n&&e.setTime(e.getTime()-6048e5);const o=e.getFullYear(),r=e.getMonth(),a=e.getDate();e.setFullYear(o,r,a),e.setHours(0,0,0);const c=e.getTime();e.setFullYear(o,r,a+1),e.setHours(0,0,0);const l=e.getTime()-1;return void t.push({title:M(c),minDate:c,maxDate:l})}let r;if(null===(r=P.exec(n)))if(null===(r=_.exec(n))){if(null!==(r=S.exec(n))){const e=r[1],n=r[2],s=O(e);if(s>=0){const e=+n||(new Date).getUTCFullYear();if(e>0&&e<=31)return void C(t,e-1,s);if(e>=v)return void Z(t,s,e)}}if(null!==(r=k.exec(n))){const e=r[1],n=O(r[2]);if(n>=0){const s=+e;if(s>0&&s<=31)return void C(t,s-1,n);s>=v&&Z(t,n,s)}}if(null!==(r=w.exec(n))){const e=O(r[1]);if(e>=0)for(let n=(new Date).getFullYear();n>=v;--n)Z(t,e,n)}if(null===(r=b.exec(n)));else{let e=+r[0];const n=(new Date).getFullYear();if(e<v){e=v;for(let s=n;s>=e;s--){const e=new Date;e.setFullYear(s,0,1),e.setHours(0,0,0);const n=e.getTime();e.setFullYear(s+1,0,1),e.setHours(0,0,0);const i=e.getTime()-1;t.push({title:""+s,minDate:n,maxDate:i})}}else if(e<=n){const n=new Date;n.setFullYear(e,0,1),n.setHours(0,0,0);const s=n.getTime();n.setFullYear(e+1,0,1),n.setHours(0,0,0);const i=n.getTime()-1;t.push({title:""+e,minDate:s,maxDate:i})}}}else{const e=r[1],n=r[3],s=r[5];if(!r[2]===r[4])return;const i=parseInt(e),o=parseInt(n)-1;let a=parseInt(s);a>=10&&a<=99&&(a+=2e3);const c=(new Date).getFullYear();if(L(i-1,o)&&a>=v&&a<=c){const e=new Date;e.setFullYear(a,o,i),e.setHours(0,0,0);const n=e.getTime();e.setFullYear(a,o,i+1),e.setHours(0,0,0);const s=e.getTime()-1;return void t.push({title:D(n),minDate:n,maxDate:s})}}else{const e=r[1],n=r[3],s=parseInt(e),i=parseInt(n);if(s>0&&s<=31){if(i>=v&&s<=12)return void Z(t,s-1,i);i<=12&&C(t,s-1,i-1)}else s>=v&&i<=12&&Z(t,i-1,s)}}function Z(e,t,n){const s=(new Date).getFullYear(),i=Date.now();if(n>=v&&n<=s){const s=new Date;s.setFullYear(n,t,1),s.setHours(0,0,0);const o=s.getTime();if(o>i)return;s.setMonth(s.getMonth()+1);const r=s.getTime()-1;e.push({title:I(o),minDate:o,maxDate:r})}}function C(e,t,n){if(L(t,n)){const i=(new Date).getFullYear(),o=Date.now();for(let r=i;r>=v;r--){if(1===n&&28===t&&((s=r)%4!=0||s%100==0)&&s%400!=0)continue;const a=new Date;a.setFullYear(r,n,t+1),a.setHours(0,0,0);const c=a.getTime();if(c>o)continue;a.setFullYear(r,n,t+2),a.setHours(0,0,0);const l=a.getTime()-1;r===i?e.push({title:T(c),minDate:c,maxDate:l}):e.push({title:D(c),minDate:c,maxDate:l})}}var s}function I(e){const t=new Date(e);return a[t.getMonth()]+" "+t.getFullYear()}function T(e){const t=new Date(e);return a[t.getMonth()]+" "+t.getDate()}function D(e){const t=new Date(e);return("0"+t.getDate()).slice(-2)+"."+("0"+(t.getMonth()+1)).slice(-2)+"."+t.getFullYear()}function M(e){const t=new Date(e);return c[t.getDay()]}function L(e,t){return t>=0&&t<12&&e>=0&&e<E[t]}function O(e){e=e.toLowerCase();for(let t=0;t<12;t++)if([r[t],a[t]].some((t=>0===t.toLowerCase().indexOf(e))))return t;return-1}s.GO.fillTipDates=A},8799:(e,t,n)=>{function s(){var e;return!!(null===(e=document.activeElement)||void 0===e?void 0:e.blur)&&(document.activeElement.blur(),!0)}n.d(t,{Z:()=>s})},3910:(e,t,n)=>{function s(e){if(e||(e=window.event),e){e=e.originalEvent||e;try{e.stopPropagation&&e.stopPropagation(),e.preventDefault&&e.preventDefault(),e.returnValue=!1,e.cancelBubble=!0}catch(e){}}return!1}n.d(t,{Z:()=>s})},8222:(e,t,n)=>{n.d(t,{Z:()=>a});var s=n(410),i=n(3512),o=n(4755);const r=new class{constructor(){this.resetCache=()=>{this.computedStyle=void 0;const e=this.cache;this.cache={};for(const t in e)this.getProperty(t)},this.cache={},i.Z.addEventListener("theme_changed",this.resetCache),o.Z.addEventListener("resize",this.resetCache)}getProperty(e){var t;let n=this.cache[e];return void 0!==n?n:(null!==(t=this.computedStyle)&&void 0!==t||(this.computedStyle=window.getComputedStyle(document.documentElement)),n=this.computedStyle.getPropertyValue("--"+e).trim(),this.setPropertyCache(e,n))}getPropertyAsSize(e){const t=this.getProperty(e);let n;return"%"===t[t.length-1]||(n=t.indexOf("rem")?16*+t.replace("rem",""):+t.replace("px","")),n}setPropertyCache(e,t){return this.cache[e]=t}};s.GO&&(s.GO.customProperties=r);const a=r},8497:(e,t,n)=>{function s(e,t){return e.closest("."+t)}n.d(t,{Z:()=>s})},5494:(e,t,n)=>{n.d(t,{Z:()=>i});var s=n(3035);function i(e){e.style.transform="translateY(-99999px)",e.focus(),(0,s.d1)().then((()=>{e.style.transform=""}))}},8090:(e,t,n)=>{n.d(t,{T:()=>a,Z:()=>c});var s=n(5432),i=n(4762),o=n(8497),r=n(5494);const a=i.IS_SAFARI&&i.IS_MOBILE&&s.Z;if(a){const e="clientY";let t=0;const n={capture:!0,passive:!1},s=n=>{const s=n.touches[0],i=(0,o.Z)(s.target,"scrollable-y");if(i){const o=s[e],r=t-o,a=i.scrollTop,c=i.scrollHeight,l=i.clientHeight,d=a?Math.round(a+i.clientHeight+r):a+r;(c===l||d>=c||d<=0)&&n.preventDefault()}else n.preventDefault()};let i=0;document.addEventListener("focusin",(o=>{!o.target.classList.contains("is-sticky-input-bugged")||o.timeStamp-i<50||((0,r.Z)(o.target),document.addEventListener("touchmove",s,n),document.addEventListener("touchstart",(n=>{if(n.touches.length>1)return;const s=n.touches[0];t=s[e]})))}),{passive:!0}),document.addEventListener("focusout",(e=>{document.removeEventListener("touchmove",s,n),i=e.timeStamp}),{passive:!0}),document.addEventListener("visibilitychange",(()=>{document.activeElement&&document.activeElement.classList.contains("is-sticky-input-bugged")&&document.activeElement.blur&&(0,r.Z)(document.activeElement)}),{passive:!0})}function c(e){a&&e.classList.add("is-sticky-input-bugged")}},6472:(e,t,n)=>{n.d(t,{B:()=>o,Z:()=>i});let s;function i(){window.addEventListener("beforeinstallprompt",(e=>{s=()=>{return t=this,n=void 0,o=function*(){e.prompt();const{outcome:t}=yield e.userChoice;"accepted"===t&&(s=void 0)},new((i=void 0)||(i=Promise))((function(e,s){function r(e){try{c(o.next(e))}catch(e){s(e)}}function a(e){try{c(o.throw(e))}catch(e){s(e)}}function c(t){var n;t.done?e(t.value):(n=t.value,n instanceof i?n:new i((function(e){e(n)}))).then(r,a)}c((o=o.apply(t,n||[])).next())}));var t,n,i,o}}))}function o(){return s}},4541:(e,t,n)=>{n.d(t,{Z:()=>c});var s=n(319),i=n(5418);const o=["b","б"],r={},a={text:"Roboto",icons:"tgico",monospace:"Roboto Mono"};function c(e={text:o,icons:void 0,monospace:o}){if(!("fonts"in document))return Promise.resolve();const t=[];for(const n in e){let s=e[n];"all"===s&&(s=o);const i=a[n],c="icons"===n?[500]:[400,500];for(const e of c){const n=(s||[void 0]).map((t=>{var n,s,o,a;const c=[e,"1rem",i].join(" ");return null!==(s=(o=null!==(n=r[c])&&void 0!==n?n:r[c]={})[a=t||""])&&void 0!==s?s:o[a]=document.fonts.load(c,t)}));t.push(...n)}}return Promise.race([Promise.all(t).catch(s.Z),(0,i.Z)(1e3)])}},130:(e,t,n)=>{function s(e,t){i(e),void 0===t?e.replaceChildren():"string"==typeof t?t?e.textContent=t:e.replaceChildren():e.replaceChildren(t)}function i(e){e.setAttribute("dir","auto")}n.d(t,{Z:()=>s,m:()=>i})},2586:(e,t,n)=>{n.d(t,{Z:()=>a});var s=n(5432),i=n(3241);const o=s.Z?"touchstart":"mousemove";class r extends i.Z{constructor(){super(),this._isIdle=!0,this.focusPromise=Promise.resolve(),this.focusResolve=()=>{},window.addEventListener("blur",(()=>{this.isIdle=!0,window.addEventListener("focus",(()=>{this.isIdle=!1}),{once:!0})})),window.addEventListener(o,(()=>{this.isIdle=!1}),{once:!0,passive:!0}),this.addEventListener("change",(e=>{e?this.focusPromise=new Promise((e=>{this.focusResolve=e})):this.focusResolve()}))}getFocusPromise(){return this.focusPromise}get isIdle(){return this._isIdle}set isIdle(e){this._isIdle!==e&&(this._isIdle=e,this.dispatchEvent("change",e))}}const a=new r},9405:(e,t,n)=>{n.d(t,{C:()=>o,c:()=>i});var s=n(9897);class i{constructor(e=0,t=e){this.width=e,this.height=t}aspect(e,t){return(0,s.Z)(this.width,this.height,e.width,e.height,t)}aspectFitted(e){return this.aspect(e,!0)}aspectCovered(e){return this.aspect(e,!1)}}function o(e,t){return new i(e,t)}},4755:(e,t,n)=>{n.d(t,{Z:()=>h,_:()=>s});var s,i=n(410),o=n(3241),r=n(9405);!function(e){e[e.mobile=0]="mobile",e[e.medium=1]="medium",e[e.large=2]="large"}(s||(s={}));const a=(0,r.C)(20,20),c=(0,r.C)(36,36),l=(0,r.C)(18,18);class d extends o.Z{constructor(){super(),this.screenSizes=[{key:s.mobile,value:600},{key:s.medium,value:1275},{key:s.large,value:1680}],this.sizes={handhelds:{regular:(0,r.C)(270,270),webpage:(0,r.C)(270,200),album:(0,r.C)(270,0),esgSticker:(0,r.C)(68,68),animatedSticker:(0,r.C)(180,180),staticSticker:(0,r.C)(180,180),emojiSticker:(0,r.C)(112,112),poll:(0,r.C)(240,0),round:(0,r.C)(240,240),documentName:(0,r.C)(200,0),invoice:(0,r.C)(270,270),extendedInvoice:(0,r.C)(270,270),customEmoji:a,esgCustomEmoji:c,emojiStatus:l,popupSticker:(0,r.C)(68,68)},desktop:{regular:(0,r.C)(420,340),webpage:(0,r.C)(420,340),album:(0,r.C)(420,0),esgSticker:(0,r.C)(72,72),animatedSticker:(0,r.C)(200,200),staticSticker:(0,r.C)(200,200),emojiSticker:(0,r.C)(112,112),poll:(0,r.C)(330,0),round:(0,r.C)(280,280),documentName:(0,r.C)(240,0),invoice:(0,r.C)(320,320),extendedInvoice:(0,r.C)(420,340),customEmoji:a,esgCustomEmoji:c,emojiStatus:l,popupSticker:(0,r.C)(80,80)}},this.isMobile=!1,this.handleResize=()=>{const e=window.innerWidth;let t=this.screenSizes[0].key;for(let n=this.screenSizes.length-1;n>=0;--n)if(this.screenSizes[n].value<e){t=(this.screenSizes[n+1]||this.screenSizes[n]).key;break}const n=this.activeScreen;this.activeScreen=t,this.isMobile=this.activeScreen===s.mobile,this.active=this.isMobile?this.sizes.handhelds:this.sizes.desktop,n!==t&&void 0!==n&&this.dispatchEvent("changeScreen",n,t),void 0!==n&&this.dispatchEvent("resize")},window.addEventListener("resize",(()=>{this.rAF&&window.cancelAnimationFrame(this.rAF),this.rAF=window.requestAnimationFrame((()=>{this.handleResize(),this.rAF=0}))})),this.handleResize()}}const u=new d;i.GO.mediaSizes=u;const h=u},3228:(e,t,n)=>{function s(e,t,n){return Math.min(n,Math.max(t,e))}n.d(t,{Z:()=>s})},3815:(e,t,n)=>{n.d(t,{Z:()=>o});var s=n(3241);class i extends s.Z{constructor(){super(...arguments),this.overlaysActive=0}get isOverlayActive(){return this.overlaysActive>0}set isOverlayActive(e){this.overlaysActive+=e?1:-1,this.dispatchEvent("change",this.isOverlayActive)}}const o=new i},3035:(e,t,n)=>{let s;function i(e){s?s.push(e):(s=[e],requestAnimationFrame((()=>{const e=s;s=void 0,e.forEach((e=>e()))})))}n.d(t,{AD:()=>l,T2:()=>i,TR:()=>c,d1:()=>d});let o,r,a=!1;function c(e){o?a?e():o.push(e):(o=[e],requestAnimationFrame((()=>{a=!0;for(let e=0;e<o.length;++e)o[e]();o=void 0,a=!1})))}function l(){return r||(r=new Promise((e=>i((()=>e())))),r.then((()=>{r=void 0})),r)}function d(){return new Promise((e=>{i((()=>{i(e)}))}))}},764:(e,t,n)=>{function s(e,t=e.split("?")){return i(null==t?void 0:t[1])}function i(e){const t={};return e?(e.split("&").forEach((e=>{const[n,s=""]=e.split("=");t[n]=decodeURIComponent(s)})),t):t}n.d(t,{V:()=>i,Z:()=>s})},6714:(e,t,n)=>{n.d(t,{Z:()=>h});var s=n(5432),i=n(3512),o=n(2064),r=n(410),a=n(8222),c=function(e,t,n,s){return new(n||(n=Promise))((function(i,o){function r(e){try{c(s.next(e))}catch(e){o(e)}}function a(e){try{c(s.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(r,a)}c((s=s.apply(e,t||[])).next())}))};const l={"primary-color":{rgb:!0,light:!0,lightFilled:!0,dark:!0,darkRgb:!0},"message-out-primary-color":{lightFilled:!0},"surface-color":{rgb:!0},"danger-color":{light:!0,dark:!0},"primary-text-color":{rgb:!0},"secondary-text-color":{light:!0,lightFilled:!0},"message-background-color":{light:!0,lightFilled:!0,dark:!0,darkFilled:!0},"message-out-background-color":{light:!0,lightFilled:!0,dark:!0,darkFilled:!0},"saved-color":{lightFilled:!0}},d={day:{"primary-color":"#3390ec","message-out-primary-color":"#4fae4e","message-background-color":"#ffffff","surface-color":"#ffffff","danger-color":"#df3f40","primary-text-color":"#000000","secondary-text-color":"#707579","saved-color":"#359AD4"},night:{"primary-color":"#8774E1","message-out-primary-color":"#8774E1","message-background-color":"#212121","surface-color":"#212121","danger-color":"#ff595a","primary-text-color":"#ffffff","secondary-text-color":"#aaaaaa","saved-color":"#8774E1"}},u=new class{constructor(){i.Z.addEventListener("theme_change",(()=>{this.setTheme()}))}get themeColorElem(){return void 0!==this._themeColorElem?this._themeColorElem:this._themeColorElem=document.head.querySelector('[name="theme-color"]')||null}setThemeColor(e=this.themeColor){e||(e=this.isNight()?"#212121":"#ffffff");const t=this.themeColorElem;t&&t.setAttribute("content",e)}setThemeListener(){try{const e=window.matchMedia("(prefers-color-scheme: dark)"),t=()=>{this.systemTheme=e.matches?"night":"day",i.Z.myId?i.Z.dispatchEvent("theme_change"):this.setTheme()};"addEventListener"in e?e.addEventListener("change",t):"addListener"in e&&e.addListener(t),t()}catch(e){}}applyHighlightningColor(){var e;let t;const n=this.getTheme();(null===(e=n.settings)||void 0===e?void 0:e.highlightningColor)?(t=n.settings.highlightningColor,document.documentElement.style.setProperty("--message-highlightning-color",t)):document.documentElement.style.removeProperty("--message-highlightning-color"),!s.Z&&t&&(this.themeColor=(0,o.K5)(t))}setTheme(){const e=this.isNight(),t=document.head.querySelector('[name="color-scheme"]');null==t||t.setAttribute("content",e?"dark":"light"),document.documentElement.classList.toggle("night",e),this.setThemeColor();const n=this.getTheme();this.applyTheme(n);let s=this.styleElement;s||(s=this.styleElement=document.createElement("style"),document.head.append(s));const o=document.createElement("div");this.applyTheme(i.Z.settings.themes.find((e=>"night"===e.name)),o),s.textContent=`.night {${o.style.cssText}}`,this.applyHighlightningColor(),i.Z.dispatchEventSingle("theme_changed")}switchTheme(e){return c(this,void 0,void 0,(function*(){yield i.Z.managers.appStateManager.setByKey("settings.theme",e),i.Z.dispatchEvent("theme_change")}))}isNight(){return"night"===this.getTheme().name}getTheme(e=("system"===i.Z.settings.theme?this.systemTheme:i.Z.settings.theme)){return i.Z.settings.themes.find((t=>t.name===e))}bindColorApplier(e){const t=new Set;return{applyAppColor:n=>(t.add(n.name),this.applyAppColor(Object.assign(Object.assign({},n),e))),finalize:()=>{const n=e.isNight;for(const s in l)t.has(s)||this.applyAppColor(Object.assign({name:s,hex:d[n?"night":"day"][s]},e))}}}applyAppColor({name:e,hex:t,element:n,lightenAlpha:s=.08,darkenAlpha:i=s,mixColor:r,isNight:c=this.isNight()}){const u=l[e],h=(0,o.oo)(t),g=(0,o.dI)(...h);null!=r||(r=(0,o.oo)(d[c?"night":"day"]["surface-color"]));const m=(0,o.Dk)(h,r,s),p=Object.assign(Object.assign({},g),{l:g.l-100*i}),f=[[e,t],u.rgb&&[e+"-rgb",h.join(",")],u.light&&["light-"+e,`rgba(${h[0]}, ${h[1]}, ${h[2]}, ${s})`],u.lightFilled&&["light-filled-"+e,(0,o.t1)(m)],u.dark&&["dark-"+e,`hsl(${p.h}, ${p.s}%, ${p.l}%)`]],v=n===document.documentElement;f.filter(Boolean).forEach((([e,t])=>{n.style.setProperty("--"+e,t),v&&a.Z.setPropertyCache(e,t)}))}applyNewTheme(e){return c(this,void 0,void 0,(function*(){const t=this.isNightTheme(e),n=this.getTheme(),s=i.Z.settings.themes,o=e.settings.find((e=>e.base_theme._===(t?"baseThemeNight":"baseThemeClassic"))),r=Object.assign(Object.assign({},e),{name:n.name,settings:Object.assign(Object.assign({},o),{highlightningColor:""})});yield this.AppBackgroundTab.setBackgroundDocument(o.wallpaper,r.settings),s[s.indexOf(n)]=r,yield i.Z.managers.appStateManager.setByKey("settings.themes",i.Z.settings.themes),i.Z.dispatchEvent("theme_change")}))}isNightTheme(e){return"night"===e.name||this.isNight()}applyTheme(e,t=document.documentElement){var n;const s=this.isNightTheme(e),i=Array.isArray(e.settings)?e.settings.find((e=>e.base_theme._===(s?"baseThemeNight":"baseThemeClassic"))):e.settings,r=d[s?"night":"day"];let a=(0,o.py)(...(0,o.oo)(r["primary-color"])),c=(0,o.py)(...(0,o.tB)(i.accent_color));const l=(0,o.uY)(a,c,(0,o.oo)(r["primary-color"]),!s),u=(0,o.t1)(l),{applyAppColor:h,finalize:g}=this.bindColorApplier({element:t,isNight:s});if(h({name:"primary-color",hex:u,darkenAlpha:.04}),h({name:"saved-color",hex:u,lightenAlpha:.64,mixColor:[255,255,255]}),!(null===(n=i.message_colors)||void 0===n?void 0:n.length))return;const m=s?.92:.12,p=(0,o.oo)(r["message-out-primary-color"]);a=(0,o.py)(...p);const f=(0,o.Dk)(p,(0,o.oo)(r["surface-color"]),m);let v=(0,o.tB)(i.message_colors[0]);i.message_colors.length>1&&(i.message_colors.slice(1).forEach((e=>{v=(0,o.ix)(v,(0,o.tB)(e))})),v=(0,o.e9)(a,f,v));const b=v;c=(0,o.py)(...b);const y=void 0!==i.outbox_accent_color&&(0,o.py)(...(0,o.tB)(i.outbox_accent_color)),w=(0,o.Dk)(v,(0,o.oo)(r["surface-color"]),m);h({name:"message-out-background-color",hex:(0,o.t1)(w),lightenAlpha:m}),h({name:"message-out-primary-color",hex:s?"#ffffff":(0,o.t1)(y?(0,o.WE)(...y):v),mixColor:w}),g()}getThemeParamsForWebView(){const e={bg_color:"surface-color",button_color:"primary-color",button_text_color:"#ffffff",hint_color:"secondary-text-color",link_color:"link-color",secondary_bg_color:"background-color-true",text_color:"primary-text-color"},t={};for(const n in e){const s=e[n];t[n]="#"===s[0]?s:a.Z.getProperty(s)}return t}};r.GO&&(r.GO.themeController=u);const h=u},2938:(e,t,n)=>{var s=n(4159),i=n(8799),o=n(3910),r=n(8090),a=n(4541),c=n(9976),l=n(4762),d=n(5418);!function(){const e={construct(e,t){let n=t[0]+"";return 0!==n.indexOf("blob:")&&(n+=location.search),new e(n)}};[Worker,"undefined"!=typeof SharedWorker&&SharedWorker].filter(Boolean).forEach((t=>{window[t.name]=new Proxy(t,e)}))}();var u=n(3512),h=n(5432),g=n(2325),m=(n(4110),n(690),n(3855)),p=n(2554),f=n(6714),v=n(3815),b=n(490),y=n(764),w=n(1267),S=n(410);const k="onbeforeinstallprompt"in window;var P=n(6472),_=n(632);document.addEventListener("DOMContentLoaded",(()=>{return e=void 0,t=void 0,A=function*(){var e;Element.prototype.toggleAttribute||(Element.prototype.toggleAttribute=function(e,t){return void 0!==t&&(t=!!t),this.hasAttribute(e)?!!t||(this.removeAttribute(e),!1):!1!==t&&(this.setAttribute(e,""),!0)}),void 0===Node.prototype.replaceChildren&&(Node.prototype.replaceChildren=function(...e){this.textContent="",e&&this.append(...e)}),u.Z.managers=(0,p.Z)(),document.getElementById("manifest").href=`site${l.IS_APPLE&&!l.IS_APPLE_MOBILE?"_apple":""}.webmanifest?v=jw3mK7G9Aq`,b.Z.start();const t=window.visualViewport||window;let E,A=!1;const Z=()=>{const e=.01*(A&&!v.Z.isOverlayActive?t.height||t.innerHeight:window.innerHeight);E!==e&&(h.Z&&E<e&&e-E>1&&(0,i.Z)(),E=e,document.documentElement.style.setProperty("--vh",`${e}px`))};if(window.addEventListener("resize",Z),Z(),r.T){const e=()=>{A=1===n&&r.T&&!v.Z.isOverlayActive,Z(),t!==window&&(A?(window.removeEventListener("resize",Z),t.addEventListener("resize",Z)):(t.removeEventListener("resize",Z),window.addEventListener("resize",Z)))};let n;window.onImTabChange=t=>{const s=void 0!==n;n=t,(s||1===n)&&e()},v.Z.addEventListener("change",(()=>{e()}))}if(l.IS_FIREFOX&&!c.Z&&document.addEventListener("dragstart",(e=>{const t=e.target;if("IMG"===t.tagName&&t.classList.contains("emoji"))return(0,o.Z)(e),!1})),c.Z&&document.documentElement.classList.add("native-emoji"),document.addEventListener("dragstart",(e=>{var t;if("IMG"===(null===(t=e.target)||void 0===t?void 0:t.tagName))return e.preventDefault(),!1})),document.addEventListener("contextmenu",(e=>{"IMG"!==e.target.tagName||window.appMediaViewer||(0,o.Z)(e)})),l.IS_FIREFOX&&document.documentElement.classList.add("is-firefox","no-backdrop"),l.IS_MOBILE&&document.documentElement.classList.add("is-mobile"),l.IS_APPLE)l.IS_SAFARI&&document.documentElement.classList.add("is-safari"),l.IS_APPLE_MOBILE?document.documentElement.classList.add("is-ios"):document.documentElement.classList.add("is-mac");else if(l.IS_ANDROID){document.documentElement.classList.add("is-android");const e=()=>{n=!0,window.addEventListener("resize",t,{once:!0})},t=()=>{n=!1,(0,i.Z)()};let n=!1;document.addEventListener("touchend",(t=>{const s=t.target.closest('[contenteditable="true"], input');s&&(document.activeElement===s||n||(console.log("input click",t,document.activeElement,s,s.matches(":focus")),window.addEventListener("resize",e,{once:!0})))}))}h.Z?document.documentElement.classList.add("is-touch"):document.documentElement.classList.add("no-touch"),k&&(0,P.Z)();const C=performance.now(),I=g.ZP.getCacheLangPack(),[T,D]=yield Promise.all([m.Z.sendState().then((([e])=>e)),I]);function M(e,t){e.style.opacity="0",t.then((()=>{window.requestAnimationFrame((()=>{e.style.opacity=""}))}))}g.ZP.setTimeFormat(T.state.settings.timeFormat),u.Z.managers.rootScope.getPremium().then((e=>{u.Z.premium=e})),f.Z.setThemeListener(),D.appVersion!==s.ZP.langPackVersion?g.ZP.getLangPack(D.lang_code):(0,_.kZ)(),u.Z.addEventListener("language_change",(()=>{(0,_.kZ)()})),console.log("got state, time:",performance.now()-C),"ar"===D.lang_code&&S.Tj,document.documentElement.dir="ltr";let L=T.state.authState;const O=location.hash.split("?"),x=(0,y.V)(null!==(e=O[1])&&void 0!==e?e:O[0].slice(1));if(x.tgWebAuthToken&&"authStateSignedIn"!==L._){const e={token:x.tgWebAuthToken,dcId:+x.tgWebAuthDcId,userId:x.tgWebAuthUserId.toUserId(),isTest:void 0!==x.tgWebAuthTest&&!!+x.tgWebAuthTest,tgAddr:x.tgaddr};if(e.isTest!==w.Z.test){const e=new URLSearchParams(location.search);return+x.tgWebAuthTest?e.set("test","1"):e.delete("test"),void(location.search=e.toString())}u.Z.managers.appStateManager.pushToState("authState",L={_:"authStateSignImport",data:e})}if("authStateSignedIn"!==L._){console.log("Will mount auth page:",L._,Date.now()/1e3);const e=document.getElementById("auth-pages");let t,s;if(e){t=e.querySelector(".scrollable"),h.Z&&!l.IS_MOBILE_SAFARI||t.classList.add("no-scrollbar"),t.style.opacity="0";const n=document.createElement("div");n.classList.add("auth-placeholder"),t.prepend(n),t.append(n.cloneNode())}try{yield Promise.all([Promise.resolve().then(n.bind(n,2831)),Promise.resolve().then(n.bind(n,6702))]).then((([e,t])=>{e.default.setAuthorized(!1),t.default.forceUnsubscribe()}))}catch(e){}switch(L._){case"authStateSignIn":s=(yield Promise.all([n.e(41),n.e(874),n.e(53)]).then(n.bind(n,810))).default.mount();break;case"authStateSignQr":s=(yield Promise.all([n.e(41),n.e(874),n.e(709)]).then(n.bind(n,9709))).default.mount();break;case"authStateAuthCode":s=(yield Promise.all([n.e(41),n.e(874),n.e(106)]).then(n.bind(n,6392))).default.mount(L.sentCode);break;case"authStatePassword":s=(yield Promise.all([n.e(41),n.e(874),n.e(437)]).then(n.bind(n,9437))).default.mount();break;case"authStateSignUp":s=(yield Promise.all([n.e(41),n.e(874),n.e(339)]).then(n.bind(n,8339))).default.mount(L.authCode);break;case"authStateSignImport":s=(yield Promise.all([n.e(41),n.e(874),n.e(231)]).then(n.bind(n,3231))).default.mount(L.data)}t&&(s&&(yield s),M(t,"fonts"in document?Promise.race([(0,d.Z)(1e3),document.fonts.ready]):Promise.resolve()))}else console.log("Will mount IM page:",Date.now()/1e3),M(document.getElementById("main-columns"),(0,a.Z)()),(yield Promise.all([n.e(41),n.e(874),n.e(436)]).then(n.bind(n,5436))).default.mount()},new((E=void 0)||(E=Promise))((function(n,s){function i(e){try{r(A.next(e))}catch(e){s(e)}}function o(e){try{r(A.throw(e))}catch(e){s(e)}}function r(e){var t;e.done?n(e.value):(t=e.value,t instanceof E?t:new E((function(e){e(t)}))).then(i,o)}r((A=A.apply(e,t||[])).next())}));var e,t,E,A}))},1722:(e,t,n)=>{n.d(t,{Z:()=>s});const s=new class{reload(){try{location.reload()}catch(e){}}close(){try{window.close()}catch(e){}}focus(){window.focus()}}},2554:(e,t,n)=>{n.d(t,{Z:()=>c});var s=n(3855),i=n(410);const o={};function r(e,t){return new Proxy(e,{get:(e,n,r)=>{var a;return null!==(a=e[n])&&void 0!==a?a:e[n]=function(e,t){return new Proxy({},{get:(n,r,a)=>(...n)=>{var a;const c=s.Z.invoke("manager",{name:e,method:r,args:n},t);return i.ZP&&(null===(a=o[e])||void 0===a?void 0:a.has(r))&&console.warn("manager request",e,r,n,t),c}})}(n,t)}})}let a;function c(){return a||(a=r({},!1),a.acknowledged=r({},!0),a)}i.ZP&&(window.DEBUG_MANAGER_REQUESTS=o)},1708:(e,t,n)=>{n.d(t,{Z:()=>i});var s=n(7986);function i(e){return(0,s.Z)(e,!0)}},6666:(e,t,n)=>{n.d(t,{Z:()=>c});var s=n(1267),i=n(5471),o=n(5953),r=n(5003);class a{constructor(e){(0,o.Z)(this,e),s.Z.test&&(this.name+="_test"),this.storageIsAvailable=!0,this.log=(0,r.kg)(["IDB",e.name].join("-")),this.log("constructor"),this.openDatabase(!0),a.INSTANCES.push(this)}isAvailable(){return this.storageIsAvailable}openDatabase(e=!1){if(this.openDbPromise&&!e)return this.openDbPromise;const t=(e,t)=>{var n;const s=Array.from(e.indexNames);for(const t of s)e.deleteIndex(t);if(null===(n=t.indexes)||void 0===n?void 0:n.length)for(const n of t.indexes)e.indexNames.contains(n.indexName)||e.createIndex(n.indexName,n.keyPath,n.objectParameters)};try{var n=indexedDB.open(this.name,this.version);if(!n)return Promise.reject()}catch(e){return this.log.error("error opening db",e.message),this.storageIsAvailable=!1,Promise.reject(e)}let s=!1;return setTimeout((()=>{s||n.onerror((0,i.Z)("IDB_CREATE_TIMEOUT"))}),3e3),this.openDbPromise=new Promise(((e,i)=>{n.onsuccess=t=>{s=!0;const o=n.result;let r=!1;this.log("Opened"),o.onerror=e=>{this.storageIsAvailable=!1,this.log.error("Error creating/accessing IndexedDB database",e),i(e)},o.onclose=e=>{this.log.error("closed:",e),!r&&this.openDatabase()},o.onabort=e=>{this.log.error("abort:",e);const t=e.target;this.openDatabase(r=!0),t.onerror&&t.onerror(e),o.close()},o.onversionchange=e=>{this.log.error("onversionchange, lol?")},e(this.db=o)},n.onerror=e=>{s=!0,this.storageIsAvailable=!1,this.log.error("Error creating/accessing IndexedDB database",e),i(e)},n.onupgradeneeded=e=>{s=!0,this.log.warn("performing idb upgrade from",e.oldVersion,"to",e.newVersion);const n=e.target,i=n.result;this.stores.forEach((e=>{if(i.objectStoreNames.contains(e.name)){const s=n.transaction.objectStore(e.name);t(s,e)}else((e,n)=>{const s=e.createObjectStore(n.name);t(s,n)})(i,e)}))}}))}static create(e){var t;return null!==(t=this.INSTANCES.find((t=>t.name===e.name)))&&void 0!==t?t:new a(e)}static closeDatabases(e){this.INSTANCES.forEach((t=>{if(e&&e===t)return;const n=t.db;n&&(n.onclose=()=>{},n.close())}))}}a.INSTANCES=[];class c{constructor(e,t){this.storeName=t,this.log=(0,r.kg)(["IDB",e.name,t].join("-")),this.idb=a.create(e)}delete(e,t){const n=Array.isArray(e);return n||(e=[].concat(e)),this.getObjectStore("readwrite",(t=>{const s=e.map((e=>t.delete(e)));return n?s:s[0]}),"",t)}clear(e){return this.getObjectStore("readwrite",(e=>e.clear()),"",e)}save(e,t,n){const s=Array.isArray(e);return s||(e=[].concat(e),t=[].concat(t)),this.getObjectStore("readwrite",(n=>{const i=e.map(((e,s)=>n.put(t[s],e)));return s?i:i[0]}),"",n)}get(e,t){const n=Array.isArray(e);if(n){if(!e.length)return Promise.resolve([])}else{if(!e)return;e=[].concat(e)}return this.getObjectStore("readonly",(t=>{const s=e.map((e=>t.get(e)));return n?s:s[0]}),"",t)}getObjectStore(e,t,n,s=this.storeName){let i;return n&&(i=performance.now(),this.log(n+": start")),this.idb.openDatabase().then((o=>new Promise(((r,a)=>{const c=o.transaction([s],e),l=()=>{clearTimeout(h),a(c.error)},d=()=>{clearTimeout(h),n&&this.log(n+": end",performance.now()-i);const e=p.map((e=>e.result));r(m?e:e[0])};c.onerror=l;const u="readwrite"===e;u&&(c.oncomplete=()=>d());const h=setTimeout((()=>{this.log.error("transaction not finished",c,n)}),1e4),g=t(c.objectStore(s)),m=Array.isArray(g),p=m?g:[].concat(g);if(u)return;const f=p.length;let v=f;const b=()=>{c.error||--v||d()};for(let e=0;e<f;++e){const t=p[e];t.onerror=l,t.onsuccess=b}}))))}getAll(e){return this.getObjectStore("readonly",(e=>e.getAll()),"",e)}}},2325:(e,t,n)=>{n.d(t,{$d:()=>w,A1:()=>S,Hz:()=>m,XZ:()=>y,ZP:()=>v,ag:()=>b,nK:()=>p,v_:()=>k});var s=n(410),i=n(7922),o=n(4159),r=n(3512),a=n(4762),c=n(6848),l=n(5953),d=n(9005),u=n(6637),h=n(3591),g=n(130);const m={messageActionChatCreate:"ActionCreateGroup",messageActionChatCreateYou:"ActionYouCreateGroup",messageActionChatEditTitle:"ActionChangedTitle",messageActionChatEditPhoto:"ActionChangedPhoto",messageActionChatEditVideo:"ActionChangedVideo",messageActionChatDeletePhoto:"ActionRemovedPhoto",messageActionChatReturn:"ActionAddUserSelf",messageActionChatReturnYou:"ActionAddUserSelfYou",messageActionChatJoined:"ActionAddUserSelfMega",messageActionChatJoinedYou:"ChannelMegaJoined",messageActionChatAddUser:"ActionAddUser",messageActionChatAddUsers:"ActionAddUser",messageActionChatLeave:"ActionLeftUser",messageActionChatLeaveYou:"YouLeft",messageActionChatDeleteUser:"ActionKickUser",messageActionChatJoinedByLink:"ActionInviteUser",messageActionPinMessage:"Chat.Service.Group.UpdatedPinnedMessage",messageActionContactSignUp:"Chat.Service.PeerJoinedTelegram",messageActionChannelCreate:"ActionCreateChannel",messageActionChannelEditTitle:"Chat.Service.Channel.UpdatedTitle",messageActionChannelEditPhoto:"Chat.Service.Channel.UpdatedPhoto",messageActionChannelEditVideo:"Chat.Service.Channel.UpdatedVideo",messageActionChannelDeletePhoto:"Chat.Service.Channel.RemovedPhoto",messageActionHistoryClear:"HistoryCleared",messageActionDiscussionStarted:"DiscussionStarted",messageActionChannelMigrateFrom:"ActionMigrateFromGroup","messageActionPhoneCall.video_in_ok":"ChatList.Service.VideoCall.incoming","messageActionPhoneCall.video_out_ok":"ChatList.Service.VideoCall.outgoing","messageActionPhoneCall.video_missed":"ChatList.Service.VideoCall.Missed","messageActionPhoneCall.video_cancelled":"ChatList.Service.VideoCall.Cancelled","messageActionPhoneCall.in_ok":"ChatList.Service.Call.incoming","messageActionPhoneCall.out_ok":"ChatList.Service.Call.outgoing","messageActionPhoneCall.missed":"ChatList.Service.Call.Missed","messageActionPhoneCall.cancelled":"ChatList.Service.Call.Cancelled","messageActionGroupCall.started":"Chat.Service.VoiceChatStarted.Channel","messageActionGroupCall.started_by":"Chat.Service.VoiceChatStarted","messageActionGroupCall.started_byYou":"Chat.Service.VoiceChatStartedYou","messageActionGroupCall.ended":"Chat.Service.VoiceChatFinished.Channel","messageActionGroupCall.ended_by":"Chat.Service.VoiceChatFinished","messageActionGroupCall.ended_byYou":"Chat.Service.VoiceChatFinishedYou",messageActionBotAllowed:"Chat.Service.BotPermissionAllowed"},p=a.IS_MOBILE?"Message.Unsupported.Mobile":"Message.Unsupported.Desktop";var f;!function(e){let t,a;function m(t){e.lastRequestedLangCode=t,e.lastRequestedNormalizedLangCode=t.split("-")[0]}function p(){if("h12"===e.timeFormat)try{const t=A({hour:"numeric",minute:"numeric",hour12:!0}),n=new Date;n.setHours(0);const s=t.format(n);e.amPmCache.am=s.split(/\s/)[1],n.setHours(12);const i=t.format(n);e.amPmCache.pm=i.split(/\s/)[1]}catch(t){console.error("cannot get am/pm",t),e.amPmCache={am:"AM",pm:"PM"}}}function f(){const e=o.ZP.langPackCode;return m(e),Promise.all([n.e(104).then(n.bind(n,9104)),n.e(301).then(n.bind(n,9301)),n.e(8).then(n.bind(n,9179))]).then((([t,n,s])=>{const i=[];return b(t.default,i),b(n.default,i),y({_:"langPackDifference",from_version:0,lang_code:e,strings:i,version:0,local:!0,countries:s.default})}))}function v(t,s){e.requestedServerLanguage=!0;const i=r.Z.managers;return Promise.all([i.apiManager.invokeApiCacheable("langpack.getLangPack",{lang_code:t,lang_pack:"web"}),!1,n.e(104).then(n.bind(n,9104)),n.e(301).then(n.bind(n,9301)),i.apiManager.invokeApiCacheable("help.getCountriesList",{lang_code:t,hash:0}),e.polyfillPromise])}function b(e,t=[]){for(const n in e){const s=e[n];"string"==typeof s?t.push({_:"langPackString",key:n,value:s}):t.push(Object.assign({_:"langPackStringPluralized",key:n},s))}return t}function y(e){return e.appVersion=o.ZP.langPackVersion,i.Z.set({langPack:e}).then((()=>(w(e),e)))}function w(n){const s=e.lastRequestedLangCode;if(n.lang_code===s){try{t=new Intl.PluralRules(e.lastRequestedNormalizedLangCode)}catch(n){console.error("pluralRules error",n),t=new Intl.PluralRules(e.lastRequestedNormalizedLangCode.split("-",1)[0])}try{t=new Intl.PluralRules(n.lang_code)}catch(e){console.error("pluralRules error",e),t=new Intl.PluralRules(n.lang_code.split("-",1)[0])}e.strings.clear();for(const t of n.strings)e.strings.set(t.key,t);n.countries&&(e.countriesList.length=0,e.countriesList.push(...n.countries.countries),n.countries.countries.forEach((t=>{if(t.name){const n=t.default_name;e.strings.set(n,{_:"langPackString",key:n,value:t.name})}}))),e.lastAppliedLangCode!==s&&(e.lastAppliedLangCode&&r.Z.myId&&(r.Z.managers.appReactionsManager.resetAvailableReactions(),r.Z.managers.appUsersManager.indexMyself(),r.Z.managers.dialogsStorage.indexMyDialog()),e.lastAppliedLangCode=s,E.clear(),p(),r.Z.dispatchEvent("language_change",s)),Array.from(document.querySelectorAll(".i18n")).forEach((t=>{const n=e.weakMap.get(t);n&&n.update()}))}}function S(e,t,n={i:0}){const s=[];let i=0;return e.replace(/(\*\*|__)(.+?)\1|(\n)|(\[.+?\]\(.*?\))|un\d|%\d\$.|%./g,((e,o,r,a,c,l,d)=>{if(s.push(d.slice(i,l)),o){let e;switch(o){case"**":e=document.createElement("b");break;case"__":e=document.createElement("i")}e.append(...S(r,t,n)),s.push(e)}else if(a)s.push(document.createElement("br"));else if(c){const e=c.lastIndexOf("]"),i=c.slice(1,e),o=c.slice(e+2,c.length-1);let r;if(o&&(0,u.Z)(o)){r=document.createElement("a");const e=(0,h.Z)(o);r.href=e.url,e.onclick&&r.setAttribute("onclick",e.onclick+"(this)"),r.target="_blank"}else r=t[n.i++],r instanceof DocumentFragment&&(r=r.firstChild),"string"!=typeof r&&(r.textContent="");const a=S(i,t,n);"string"==typeof r?s.push(...a):(r.append(...a),s.push(r))}else t&&function(e,t,n){const s=t[n.i++];Array.isArray(s)?e.push(...s):e.push(s)}(s,t,n);return i=l+e.length,""})),i!==e.length&&s.push(e.slice(i)),s}function k(n,s=!1,i){const o=e.strings.get(n);let r;if(o)if("langPackStringPluralized"===o._&&(null==i?void 0:i.length)){let e=i[0];"string"==typeof e&&(e=+e.replace(/\D/g,"")),r=o[t.select(e)+"_value"]||o.other_value}else r="langPackString"===o._?o.value:n;else r=n;const a=S(r,i);return s?a.map((e=>e instanceof Node?e.textContent:e)).join(""):a}e.strings=new Map,e.countriesList=[],e.requestedServerLanguage=!1,e.isRTL=!1,e.setRTL=function(t){e.isRTL=t},e.getCacheLangPack=function(){return a||(a=Promise.all([i.Z.get("langPack"),e.polyfillPromise]).then((([t])=>t?(s.ZP,e.lastRequestedLangCode||m(t.lang_code),w(t),t):f())).finally((()=>{a=void 0})))},e.setTimeFormat=function(t,n=!!e.timeFormat&&e.timeFormat!==t){e.timeFormat=t,p(),n&&(E.clear(),Array.from(document.querySelectorAll(".i18n")).forEach((t=>{const n=e.weakMap.get(t);n instanceof Z&&n.update()})))},e.loadLocalLangPack=f,e.loadLangPack=v,e.getStrings=function(e,t){return r.Z.managers.apiManager.invokeApi("langpack.getStrings",{lang_pack:o.ZP.langPack,lang_code:e,keys:t})},e.formatLocalStrings=b,e.getLangPack=function(e,t){return m(e),v(e).then((([e,t,n,s,i,o])=>{let r=[];return[n,s].forEach((e=>{b(e.default,r)})),r=r.concat(...[e.strings,t.strings].filter(Boolean)),e.strings=r,e.countries=i,y(e)}))},e.saveLangPack=y,e.polyfillPromise="undefined"!=typeof Intl&&void 0!==Intl.PluralRules?Promise.resolve():n.e(642).then(n.bind(n,4642)).then((e=>{window.Intl=Object.assign("undefined"!=typeof Intl?Intl:{},e.default)})),e.applyLangPack=w,e.superFormatter=S,e.format=k,e.weakMap=new WeakMap;class P{constructor(t){this.element=(null==t?void 0:t.element)||document.createElement("span"),this.element.classList.add("i18n"),this.property=null==t?void 0:t.property,t&&(t.key||t.date)&&this.update(t),e.weakMap.set(this.element,this)}}class _ extends P{constructor(e={}){var t;super(Object.assign(Object.assign({},e),{property:null!==(t=e.property)&&void 0!==t?t:"innerHTML"}))}update(e){if((0,l.Z)(this,e),"innerHTML"===this.property)this.element.textContent="",this.element.append(...k(this.key,!1,this.args));else{const e=this.element[this.property],t=k(this.key,!0,this.args);void 0===e?this.element.dataset[this.property]=t:this.element[this.property]=t}}compareAndUpdate(e){if(this.key!==e.key||!(0,c.Z)(this.args,e.args))return this.update(e)}}e.IntlElement=_;const E=new Map;function A(t={}){const n=JSON.stringify(t);let s=E.get(n);return s||(s=new Intl.DateTimeFormat(e.lastRequestedNormalizedLangCode+"-u-hc-"+e.timeFormat,t),E.set(n,s)),s}e.getDateTimeFormat=A,e.amPmCache={am:"AM",pm:"PM"};class Z extends P{constructor(e){var t;super(Object.assign(Object.assign({},e),{property:null!==(t=e.property)&&void 0!==t?t:"textContent"})),(0,g.m)(this.element)}update(t){let n;if((0,l.Z)(this,t),this.options.hour&&this.options.minute&&2===Object.keys(this.options).length){const t=this.date.getHours();n=("0"+("h12"===e.timeFormat?t%12||12:t)).slice(-2)+":"+("0"+this.date.getMinutes()).slice(-2),"h12"===e.timeFormat&&(n+=" "+(t<12?e.amPmCache.am:e.amPmCache.pm))}else{const e=A(this.options);n=(0,d.Z)(e.format(this.date))}this.element[this.property]=n}}e.IntlDateElement=Z,e.i18n=function(e,t){return new _({key:e,args:t}).element},e.i18n_=function(e){return new _(e).element},e._i18n=function(e,t,n,s){return new _({element:e,key:t,args:n,property:s}).element}}(f||(f={}));const v=f,b=f.i18n,y=f.i18n_,w=f._i18n;function S(e,t){const n=e.slice(0,1);for(let s=1;s<e.length;++s){const i=e.length-1===s;n.push("function"==typeof t?t(i):t),n.push(e[s])}return n}function k(e,t=!0,n){const s=S(e,(e=>{const s=e&&t?"AutoDownloadSettings.LastDelimeter":"AutoDownloadSettings.Delimeter";return n?f.format(s,!0):b(s)}));return n?s.join(""):s}s.GO.I18n=f},1507:(e,t,n)=>{n.d(t,{BP:()=>h,BX:()=>p,DZ:()=>y,IA:()=>o,Iw:()=>l,J$:()=>v,NM:()=>s,OS:()=>u,Ox:()=>m,Pt:()=>d,Zi:()=>b,_9:()=>f,gZ:()=>c,hj:()=>i,rU:()=>a,tH:()=>g,yF:()=>r});const s=0,i=1271266957,o=777,r=777e3,a=2147483647,c="",l=20971520,d="",u=[7322096,16766590,13338331,9367192,16749490,16478047],h="default_static",g=4294967296,m=g+1,p=new Set(["web","k","z","a"]),f=2147483646,v=0,b=1,y=new Set([v,b]);Math.max(...Array.from(y))},3855:(e,t,n)=>{n.d(t,{Z:()=>se});var s=n(3512),i=n(7730),o=n(410),r=n(7487),a=n(6702),c=n(1722),l=n(2831),d=n(5418),u=n(993),h=n(7328),g=n(6663),m=n(9976),p=n(3731),f=n(6818),v=n(1174),b=n(2341),y=n(9030),w=n(2365),S=n(2820),k=n(5432),P=n(2131),_=n(554),E=n(393),A=n(5269),Z=n(4089),C=n(4762),I=n(5783),T=n(2045),D=n(8189);const M=Object.assign({CAN_USE_TRANSFERABLES:h.Z,IS_APPLE_MX:D.Z,IS_CALL_SUPPORTED:u.Z,IS_CANVAS_FILTER_SUPPORTED:g.Z,IS_EMOJI_SUPPORTED:m.Z,IS_GEOLOCATION_SUPPORTED:p.Z,IS_GROUP_CALL_SUPPORTED:f.Z,IS_MOV_SUPPORTED:y.Z,IS_PARALLAX_SUPPORTED:w.Z,IS_SCREEN_SHARING_SUPPORTED:S.Z,IS_TOUCH_SUPPORTED:k.Z,IS_VIBRATE_SUPPORTED:P.Z,IS_OPUS_SUPPORTED:I.Z,IS_SHARED_WORKER_SUPPORTED:T.Z,IS_WEBM_SUPPORTED:E.Z,IS_WEBP_SUPPORTED:A.Z,IS_WEBRTC_SUPPORTED:Z.Z,IMAGE_MIME_TYPES_SUPPORTED:v.Z,MEDIA_MIME_TYPES_SUPPORTED:b.Z,VIDEO_MIME_TYPES_SUPPORTED:_.Z},C);var L=n(4159),O=n(236),x=n(6009),F=n(8479),R=n(946),W=n(7922),N=n(5466),j=n(5003);const U=O.h.version,B=O.h.build,V=Object.keys(O.h),Y=["contactsListCachedTime","stateCreatedTime","maxSeenMsgId","filtersArr"];function z(){return e=this,t=void 0,i=function*(){const e=(0,j.kg)("STATE-LOADER"),t=performance.now(),n=(0,N.$)(e),i=V.map((e=>n(W.Z.get(e),"state "+e))).concat(n(r.Z.get("user_auth"),"auth"),n(r.Z.get("state_id"),"auth"),n(r.Z.get("k_build"),"auth")).concat(n(W.Z.get("user_auth"),"old auth")),a=yield Promise.all(i);e.warn("promises",performance.now()-t);const c=[],l=(e,t)=>{d[e]=t,c.push(e)};let d={};for(let e=0,t=V.length;e<t;++e){const t=V[e],n=a[e];void 0!==n?d[t]=n:l(t,(0,F.Z)(O.h[t]))}a.splice(0,V.length);let u=a.shift();const h=a.shift(),g=a.shift(),m=a.shift();if(!u&&m){u=m;const e=["dc","server_time_offset","xt_instance"];for(let t=1;t<=5;++t)e.push(`dc${t}_server_salt`),e.push(`dc${t}_auth_key`);const t=yield Promise.all(e.map((e=>W.Z.get(e))));e.push("user_auth"),t.push("number"==typeof u||"string"==typeof u?{dcID:t[0]||L.ZP.baseDcId,date:Date.now()/1e3|0,id:u.toPeerId(!1)}:u);const n={};e.forEach(((e,s)=>{n[e]=t[s]})),yield r.Z.set(n)}u&&(d.authState={_:"authStateSignedIn"},s.Z.dispatchEvent("user_auth","number"==typeof u||"string"==typeof u?{dcID:0,date:Date.now()/1e3|0,id:u.toPeerId(!1)}:u));const p=new Set;if(d.stateId!==h){if(void 0!==h){const e=new Map([["authState",void 0],["stateId",void 0]]);e.forEach(((t,n)=>{e.set(n,(0,F.Z)(d[n]))})),d=(0,F.Z)(O.h),e.forEach(((e,t)=>{d[t]=e}));const t={chats:1,dialogs:1,users:1};for(const e in t)p.add(e);f=d,c.length=0,d=f,c.push(...Object.keys(d))}yield r.Z.set({state_id:d.stateId})}var f;const v=Date.now();d.stateCreatedTime+864e5<v&&(o.ZP&&e("will refresh state",d.stateCreatedTime,v),Y.forEach((e=>{l(e,(0,F.Z)(O.h[e]))})));const b=d.settings.autoDownload;if(void 0!==(null==b?void 0:b.private)){const e=["contacts","private","groups","channels"];["photo","video","file"].forEach((t=>{const n=b[t]={};e.forEach((e=>{n[e]=b[e]}))})),e.forEach((e=>{delete b[e]})),l("settings",d.settings)}const y=new Set(["settings.themes"]);let w,S;if((0,R.Z)(O.h,d,(e=>{l(e,d[e])}),void 0,y),d.version!==U||d.build!==B){if(d.build<322&&(l("allDialogsLoaded",(0,F.Z)(O.h.allDialogsLoaded)),l("pinnedOrders",(0,F.Z)(O.h.pinnedOrders)),l("filtersArr",(0,F.Z)(O.h.filtersArr)),p.add("dialogs")),-1===(0,x.Z)(d.version,"1.7.1")){let e=!1;if(-1===(0,x.Z)(d.version,"1.3.0"))e=!0,d.settings.theme=(0,F.Z)(O.h.settings.theme),d.settings.themes=(0,F.Z)(O.h.settings.themes);else if(-1===(0,x.Z)(d.version,"1.7.1")){e=!0;const t=d.settings.themes;d.settings.themes=(0,F.Z)(O.h.settings.themes);try{t.forEach((e=>{const t=e.background;if(!t)return;const n=d.settings.themes.find((t=>t.name===e.name));n.settings.highlightningColor=t.highlightningColor;const s=(t.color||"").split(",").map((e=>e&&parseInt(e.slice(1),16)));if(t.color&&!t.slug)n.settings.wallpaper={_:"wallPaperNoFile",id:0,pFlags:{},settings:{_:"wallPaperSettings",pFlags:{}}};else{const e={_:"wallPaper",id:0,access_hash:0,slug:t.slug,document:{},pFlags:{},settings:{_:"wallPaperSettings",pFlags:{}}},s=e.settings;n.settings.wallpaper=e,t.slug&&!t.color?s.pFlags.blur=t.blur||void 0:t.intensity&&(s.intensity=t.intensity,e.pFlags.pattern=!0,e.pFlags.dark=t.intensity<0||void 0)}if(s.length){const e=n.settings.wallpaper.settings;e.background_color=s[0],e.second_background_color=s[1],e.third_background_color=s[2],e.fourth_background_color=s[3]}}))}catch(e){console.error("migrating themes error",e)}}e&&l("settings",d.settings)}d.build<309&&(d.settings.liteMode.animations=!d.settings.animationsEnabled,d.settings.liteMode.video=!d.settings.autoPlay.videos,d.settings.liteMode.gif=!d.settings.autoPlay.gifs),d.build<312&&"boolean"==typeof d.settings.stickers.suggest&&(d.settings.stickers.suggest=d.settings.stickers.suggest?"all":"none"),0!==(0,x.Z)(d.version,U)&&(w=U,S=d.version),l("version",U),l("build",B)}return g!==B&&(!g||g<B)&&r.Z.set({k_build:B}),s.Z.settings=d.settings,o.ZP&&e("state res",d,(0,F.Z)(d)),e.warn("total",performance.now()-t),{state:d,resetStorages:p,newVersion:w,oldVersion:S,pushedKeys:c}},new((n=void 0)||(n=Promise))((function(s,o){function r(e){try{c(i.next(e))}catch(e){o(e)}}function a(e){try{c(i.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?s(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(r,a)}c((i=i.apply(e,t||[])).next())}));var e,t,n,i}let G;var H=n(9043),$=n(3206),q=n(8630),J=n(8453),K=n(2586),X=n(3655),Q=n(3725),ee=function(e,t,n,s){return new(n||(n=Promise))((function(i,o){function r(e){try{c(s.next(e))}catch(e){o(e)}}function a(e){try{c(s.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(r,a)}c((s=s.apply(e,t||[])).next())}))};class te extends $.Z{constructor(){super(),this.onMirrorTask=e=>{var t,n;const{name:s,key:i,value:o}=e;if(!e.hasOwnProperty("key"))return void(this.mirrors[s]=o);const r=null!==(t=(n=this.mirrors)[s])&&void 0!==t?t:n[s]={};void 0===o?delete r[i]:r[i]=o},this.mirrors={},this.tabState={chatPeerIds:[],idleStartTime:0},this.log("constructor"),this.registerWorker(),this.registerServiceWorker(),this.registerCryptoWorker(),this.addMultipleEventsListeners({convertWebp:({fileName:e,bytes:t})=>i.Z.convert(e,t),convertOpus:({fileName:e,bytes:t})=>H.Z.pushDecodeTask(t,!1).then((e=>e.bytes)),event:({name:e,args:t})=>{s.Z.dispatchEventSingle(e,...t)},localStorageProxy:e=>{const t=e;return r.Z[t.type](...t.args)},mirror:this.onMirrorTask}),s.Z.addEventListener("language_change",(e=>{s.Z.managers.networkerFactory.setLanguage(e)})),window.addEventListener("online",(()=>{s.Z.managers.networkerFactory.forceReconnectTimeout()})),s.Z.addEventListener("logging_out",(()=>{Promise.all([(0,J.Z)(!1,!0),r.Z.clear(),Promise.race([l.default.setAuthorized(!1),(0,d.Z)(3e3)]),a.default.forceUnsubscribe(),Promise.all(["cachedFiles","cachedStreamChunks"].map((e=>caches.delete(e))))]).finally((()=>{c.Z.reload()}))})),K.Z.addEventListener("change",(e=>{this.updateTabStateIdle(e)})),this.updateTabStateIdle(K.Z.isIdle),this.log("Passing environment:",M),this.invoke("environment",M)}pingServiceWorkerWithIframe(){if(this.pingServiceWorkerPromise)return this.pingServiceWorkerPromise;const e=this.pingServiceWorkerPromise=(0,Q.Z)(),t=document.createElement("iframe");t.hidden=!0;const n=()=>{setTimeout((()=>{this.pingServiceWorkerPromise=void 0}),1e4),clearTimeout(s),t.remove(),t.removeEventListener("load",n),t.removeEventListener("error",n),e.resolve()};t.addEventListener("load",n),t.addEventListener("error",n),t.src="ping/"+(4294967295*Math.random()|0),document.body.append(t);const s=window.setTimeout(n,1e3);return e}attachServiceWorker(e){this.lastServiceWorker&&this.serviceMessagePort.detachPort(this.lastServiceWorker),this.serviceMessagePort.attachSendPort(this.lastServiceWorker=e),this.serviceMessagePort.invokeVoid("hello",void 0)}_registerServiceWorker(){navigator.serviceWorker.register(new URL(n.p+n.u(670),n.b),{scope:"./"}).then((e=>{if(this.log("SW registered",e),e.active&&!navigator.serviceWorker.controller)return e.unregister().then((()=>{window.location.reload()}));(e.installing||e.waiting||e.active).addEventListener("statechange",(e=>{this.log("SW statechange",e)}));const t=navigator.serviceWorker.controller||e.installing||e.waiting||e.active;this.attachServiceWorker(t)}),(e=>{this.log.error("SW registration failed!",e),this.invokeVoid("serviceWorkerOnline",!1)}))}registerServiceWorker(){if(!("serviceWorker"in navigator))return;this.serviceMessagePort=new X.Z;const e=navigator.serviceWorker;this._registerServiceWorker(),e.addEventListener("controllerchange",(()=>{this.log.warn("controllerchange");const t=e.controller;this.attachServiceWorker(t),t.addEventListener("error",(e=>{this.log.error("controller error:",e)}))})),this.serviceMessagePort.attachListenPort(e),this.serviceMessagePort.addMultipleEventsListeners({port:(e,t,n)=>{this.invokeVoid("serviceWorkerPort",void 0,void 0,[n.ports[0]])},hello:(e,t)=>{this.serviceMessagePort.resendLockTask(t)},share:e=>{this.log("will try to share something"),this.share=e}}),e.addEventListener("messageerror",(e=>{this.log.error("SW messageerror:",e)}))}registerCryptoWorker(){return ee(this,void 0,void 0,(function*(){const e={construct:(e,t)=>({url:t[0]+location.search})},t=[Worker,"undefined"!=typeof SharedWorker&&SharedWorker].filter(Boolean);t.forEach((t=>window[t.name]=new Proxy(t,e)));const s=new Worker(new URL(n.p+n.u(589),n.b),{type:void 0});t.forEach((e=>window[e.name]=e));const i=s.url,o=e=>new a(e,{type:"module"}),r=e=>this.attachWorkerToPort(e,q.Z,"crypto"),a=T.Z?SharedWorker:Worker;q.Z.addEventListener("port",((e,t,n)=>{this.invokeVoid("cryptoPort",void 0,void 0,[n.ports[0]])})),r(o(i));const c=yield(l=i,fetch(l).then((e=>e.text())).then((e=>{const t=location.pathname.split("/");return t[t.length-1]="",e=`\n        var originalImportScripts = importScripts; \n        importScripts = (url) => {\n          console.log('importScripts', url);\n          var newUrl = '${location.origin+t.join("/")}' + url.split('/').pop();\n          return originalImportScripts(newUrl);\n        };\n        ${e}`,new Blob([e],{type:"application/javascript"})})));var l;(yield this.invoke("createProxyWorkerURLs",{originalUrl:i,blob:c})).slice(1).map(o).forEach(r)}))}registerWorker(){let e;e=T.Z?new SharedWorker(new URL(n.p+n.u(678),n.b),{type:void 0}):new Worker(new URL(n.p+n.u(678),n.b),{type:void 0}),this.onWorkerFirstMessage(e)}attachWorkerToPort(e,t,n){const s=e.port||e;t.attachPort(s),e.addEventListener("error",(e=>{this.log.error(n,"worker error",e)}))}onWorkerFirstMessage(e){this.log("set webWorker"),this.attachWorkerToPort(e,this,"mtproto")}loadState(){return Promise.all([(null!=G?G:G=z()).then((e=>(this.newVersion=e.newVersion,this.oldVersion=e.oldVersion,this.mirrors.state=e.state,e)))])}sendState(){return this.loadState().then((e=>{const[t]=e;return this.invoke("state",Object.assign(Object.assign({},t),{userId:s.Z.myId.toUserId()})),e}))}invokeCrypto(e,...t){return q.Z.invokeCrypto(e,...t)}toggleStorages(e,t){return ee(this,void 0,void 0,(function*(){yield(0,J.Z)(e,t),this.invoke("toggleStorages",{enabled:e,clearWrite:t}),this.serviceMessagePort.invokeVoid("toggleStorages",{enabled:e,clearWrite:t})}))}getMirror(e){return ee(this,void 0,void 0,(function*(){return this.mirrors[e]}))}getState(){return this.getMirror("state")}updateTabState(e,t){this.tabState[e]=t,this.invokeVoid("tabState",this.tabState)}updateTabStateIdle(e){this.updateTabState("idleStartTime",e?Date.now():0)}}const ne=new te;o.GO.apiManagerProxy=ne;const se=ne},490:(e,t,n)=>{n.d(t,{Z:()=>f});var s=n(4159),i=n(410),o=n(2219),r=n(2045),a=n(3241),c=n(2586),l=n(5003),d=n(3512),u=n(7487),h=n(3855);const g=r.Z;class m extends a.Z{constructor(){super(!1),this.log=(0,l.kg)("INSTANCE"),this.clearInstance=()=>{this.masterInstance&&!this.deactivated&&(this.log.warn("clear master instance"),u.Z.delete("xt_instance"))},this.checkInstance=(e=c.Z.isIdle)=>{return t=this,n=void 0,o=function*(){if(this.deactivated)return;const t=Date.now(),n={id:this.instanceId,idle:e,time:t},[i,o=s.ZP.build]=yield Promise.all([u.Z.get("xt_instance",!1),u.Z.get("k_build",!1)]);if(o>s.ZP.build)return this.masterInstance=!1,d.Z.managers.networkerFactory.stopAll(),this.deactivateInstance("version"),void h.Z.toggleStorages(!1,!1);g?u.Z.set({xt_instance:n}):!e||!i||i.id===this.instanceId||i.time<t-2e4?(u.Z.set({xt_instance:n}),this.masterInstance||(this.masterInstance=!0,d.Z.managers.networkerFactory.startAll(),this.log.warn("now master instance",n)),this.clearDeactivateTimeout()):this.masterInstance&&(this.masterInstance=!1,d.Z.managers.networkerFactory.stopAll(),this.log.warn("now idle instance",n),this.deactivateTimeout||(this.deactivateTimeout=window.setTimeout((()=>this.deactivateInstance("tabs")),3e4)))},new((i=void 0)||(i=Promise))((function(e,s){function r(e){try{c(o.next(e))}catch(e){s(e)}}function a(e){try{c(o.throw(e))}catch(e){s(e)}}function c(t){var n;t.done?e(t.value):(n=t.value,n instanceof i?n:new i((function(e){e(n)}))).then(r,a)}c((o=o.apply(t,n||[])).next())}));var t,n,i,o},this.log=(0,l.kg)("INSTANCE"),this.instanceId=o.Z}get deactivatedReason(){return this.deactivated}start(){if(this.reset(),!this.started){this.started=!0,c.Z.addEventListener("change",this.checkInstance),setInterval(this.checkInstance,5e3),this.checkInstance();try{document.documentElement.addEventListener("beforeunload",this.clearInstance)}catch(e){}}}reset(){this.masterInstance=!1,this.clearDeactivateTimeout(),this.deactivated=void 0}activateInstance(){this.deactivated&&(this.reset(),this.checkInstance(!1),this.dispatchEvent("activated"))}deactivateInstance(e){this.masterInstance||this.deactivated||(this.log.warn("deactivate",e),this.clearDeactivateTimeout(),this.deactivated=e,this.dispatchEvent("deactivated",e))}clearDeactivateTimeout(){this.deactivateTimeout&&(clearTimeout(this.deactivateTimeout),this.deactivateTimeout=0)}}const p=new m;i.GO&&(i.GO.singleInstance=p);const f=p},2831:(e,t,n)=>{n.r(t),n.d(t,{TelegramMeWebManager:()=>c,default:()=>d});var s=n(4159),i=n(410),o=n(1267),r=n(7298),a=n(7487);class c{constructor(){this.disabled=o.Z.test||!s.ZP.domains.includes(location.hostname)}setAuthorized(e){if(!this.disabled)return a.Z.get("tgme_sync").then((t=>{const n=(0,r.Z)(!0);if(e&&(null==t?void 0:t.canRedirect)===e&&t.ts+86400>n)return;a.Z.set({tgme_sync:{canRedirect:e,ts:n}});const i=`_websync_?authed=${e?"1":"0"}&version=${encodeURIComponent(s.ZP.version+" "+s.ZP.suffix)}`,o=["//telegram.me/"+i,"//t.me/"+i].map((e=>function(e){const t=document.createElement("script"),n=new Promise((e=>{t.onload=t.onerror=()=>{e(t)}}));return t.src=e,document.body.appendChild(t),n}(e).then((e=>{e.remove()}))));return Promise.all(o)}))}}const l=new c;i.GO&&(i.GO.telegramMeWebManager=l);const d=l},6702:(e,t,n)=>{n.r(t),n.d(t,{WebPushApiManager:()=>g,default:()=>p});var s=n(410),i=n(5003),o=n(3855),r=n(2325),a=n(4762),c=n(1722),l=n(8479),d=n(490),u=n(3241),h=n(1708);class g extends u.Z{constructor(){super(!1),this.isAvailable=!0,this.isPushEnabled=!1,this.localNotificationsAvailable=!0,this.started=!1,this.settings={},this.isFirefox=navigator.userAgent.toLowerCase().indexOf("firefox")>-1,this.userVisibleOnly=!this.isFirefox,this.log=(0,i.kg)("PUSH-API"),this.subscribe=()=>{this.isAvailable&&navigator.serviceWorker.ready.then((e=>{e.pushManager.subscribe({userVisibleOnly:this.userVisibleOnly}).then((e=>{this.isPushEnabled=!0,this.pushSubscriptionNotify("subscribe",e)})).catch((e=>{"denied"===Notification.permission?this.log("Permission for Notifications was denied"):(this.log("Unable to subscribe to push.",e),this.userVisibleOnly||(this.userVisibleOnly=!0,setTimeout(this.subscribe,0)))}))}))},this.isAliveNotify=()=>{if(!this.isAvailable||d.Z.deactivatedReason)return;this.settings.baseUrl=(location.href||"").replace(/#.*$/,"");const e={},t={push_action_mute1d:a.IS_MOBILE?"PushNotification.Action.Mute1d.Mobile":"PushNotification.Action.Mute1d",push_action_settings:a.IS_MOBILE?"PushNotification.Action.Settings.Mobile":"PushNotification.Action.Settings",push_message_nopreview:"PushNotification.Message.NoPreview"};for(const n in t)e[n]=r.ZP.format(t[n],!0);o.Z.serviceMessagePort.invokeVoid("pushPing",{localNotifications:this.localNotificationsAvailable,lang:e,settings:this.settings}),this.isAliveTO=setTimeout(this.isAliveNotify,1e4)},"PushManager"in window&&"Notification"in window&&"serviceWorker"in navigator||(this.log.warn("Push messaging is not supported."),this.isAvailable=!1,this.localNotificationsAvailable=!1),this.isAvailable&&"denied"===Notification.permission&&this.log.warn("The user has blocked notifications.")}start(){this.started||(this.started=!0,this.getSubscription(),this.setUpServiceWorkerChannel())}setLocalNotificationsDisabled(){this.localNotificationsAvailable=!1}getSubscription(){this.isAvailable&&navigator.serviceWorker.ready.then((e=>{e.pushManager.getSubscription().then((e=>{this.isPushEnabled=!!e,this.pushSubscriptionNotify("init",e)})).catch((e=>{this.log.error("Error during getSubscription()",e)}))}))}unsubscribe(){this.isAvailable&&navigator.serviceWorker.ready.then((e=>{e.pushManager.getSubscription().then((e=>{this.isPushEnabled=!1,e&&(this.pushSubscriptionNotify("unsubscribe",e),setTimeout((()=>{e.unsubscribe().then((e=>{this.isPushEnabled=!1})).catch((e=>{this.log.error("Unsubscription error: ",e)}))}),3e3))})).catch((e=>{this.log.error("Error thrown while unsubscribing from push messaging.",e)}))}))}forceUnsubscribe(){this.isAvailable&&navigator.serviceWorker.ready.then((e=>{e.pushManager.getSubscription().then((e=>{this.log.warn("force unsubscribe",e),e&&e.unsubscribe().then((e=>{this.log.warn("force unsubscribe successful",e),this.isPushEnabled=!1})).catch((e=>{this.log.error("Unsubscription error: ",e)}))})).catch((e=>{this.log.error("Error thrown while unsubscribing from push messaging.",e)}))}))}setSettings(e){this.settings=(0,l.Z)(e),clearTimeout(this.isAliveTO),this.isAliveNotify()}hidePushNotifications(){this.isAvailable&&o.Z.serviceMessagePort.invokeVoid("notificationsClear",void 0)}setUpServiceWorkerChannel(){this.isAvailable&&(o.Z.serviceMessagePort.addEventListener("pushClick",(e=>{d.Z.deactivatedReason?c.Z.reload():this.dispatchEvent("push_notification_click",e)})),navigator.serviceWorker.ready.then(this.isAliveNotify))}pushSubscriptionNotify(e,t){if(t){const n=t.toJSON();if(!(n&&n.endpoint&&n.keys&&n.keys.p256dh&&n.keys.auth))return this.log.warn("Invalid push subscription",n),this.unsubscribe(),this.isAvailable=!1,void this.pushSubscriptionNotify(e);this.log.warn("Push",e,n),this.dispatchEvent("push_"+e,{tokenType:10,tokenValue:JSON.stringify(n)})}else this.log.warn("Push",e,!1),this.dispatchEvent("push_"+e,!1)}ignorePushByMid(e,t){this.isAvailable&&o.Z.serviceMessagePort.invokeVoid("shownNotification",e+"_"+(0,h.Z)(t))}}const m=new g;s.GO&&(s.GO.webPushApiManager=m);const p=m},9043:(e,t,n)=>{n.d(t,{Z:()=>d});var s=n(410),i=n(5783),o=n(4762),r=n(5003),a=n(3855),c=function(e,t,n,s){return new(n||(n=Promise))((function(i,o){function r(e){try{c(s.next(e))}catch(e){o(e)}}function a(e){try{c(s.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(r,a)}c((s=s.apply(e,t||[])).next())}))};const l=new class{constructor(){this.sampleRate=48e3,this.tasks=[],this.keepAlive=!1,this.log=(0,r.kg)("OPUS",r.v9.Error)}isPlaySupported(){return i.Z}loadWavWorker(){this.wavWorker||(this.wavWorker=new Worker("waveWorker.min.js"),this.wavWorker.addEventListener("message",(e=>{const t=e.data;if(this.log("[WAV] got message:",t),t&&t.page){const e=t.page;this.onTaskEnd(this.tasks.shift(),e)}})))}loadWorker(){this.worker||(this.worker=new Worker("decoderWorker.min.js"),this.worker.addEventListener("message",(e=>{const t=e.data;this.log("[DECODER] got message",t),"done"===t.type?(this.wavWorker.postMessage({command:"done"}),t.waveform&&(this.tasks[0].waveform=t.waveform)):this.wavWorker.postMessage({command:"encode",buffers:e.data},o.IS_SAFARI?void 0:t.map((e=>e.buffer)))})))}setKeepAlive(e){this.keepAlive=e,this.keepAlive?(this.loadWorker(),this.loadWavWorker()):this.tasks.length||this.terminateWorkers()}onTaskEnd(e,t){t?(clearTimeout(e.timeout),e.callback.resolve({bytes:t,waveform:e.waveform})):e.callback.reject("timeout"),this.tasks.length&&this.executeNewTask(this.tasks[0]),this.terminateWorkers()}terminateWorkers(e=!1){(!this.keepAlive&&!this.tasks.length||e)&&(this.worker&&(this.worker.terminate(),this.worker=null),this.wavWorker&&(this.wavWorker.terminate(),this.wavWorker=null))}executeNewTask(e){this.worker.postMessage({command:"init",decoderSampleRate:this.sampleRate,outputBufferSampleRate:this.sampleRate}),this.wavWorker.postMessage({command:"init",wavBitDepth:16,wavSampleRate:this.sampleRate}),this.log("[DECODER] send decode"),this.worker.postMessage({command:"decode",pages:e.pages,waveform:e.withWaveform},o.IS_SAFARI?void 0:[e.pages.buffer]),e.timeout=window.setTimeout((()=>{this.log.error("decode timeout"),this.terminateWorkers(!0),this.tasks.length&&(this.loadWorker(),this.loadWavWorker()),this.onTaskEnd(this.tasks.shift())}),1e4)}pushDecodeTask(e,t){return new Promise(((n,s)=>{const i={pages:e,withWaveform:t,callback:{resolve:n,reject:s},timeout:0};this.loadWorker(),this.loadWavWorker(),1===this.tasks.push(i)&&this.executeNewTask(i)}))}decode(e,t=!1){return c(this,void 0,void 0,(function*(){return this.pushDecodeTask(e,t).then((e=>c(this,void 0,void 0,(function*(){const t=new Blob([e.bytes],{type:"audio/wav"});return{url:yield a.Z.invoke("createObjectURL",t),waveform:e.waveform}}))))}))}};s.GO.opusDecodeController=l;const d=l},2423:(e,t,n)=>{n.d(t,{$2:()=>h,E:()=>g,He:()=>b,Hk:()=>p,QB:()=>m,SC:()=>f,bu:()=>l,it:()=>c,kO:()=>y,tY:()=>v});var s=n(1229);const i="a-z\\u00c0-\\u00d6\\u00d8-\\u00f6\\u00f8-\\u00ff\\u0100-\\u024f\\u0253\\u0254\\u0256\\u0257\\u0259\\u025b\\u0263\\u0268\\u026f\\u0272\\u0289\\u028b\\u02bb\\u0300-\\u036f\\u1e00-\\u1eff\\u0400-\\u04ff\\u0500-\\u0527\\u2de0-\\u2dff\\ua640-\\ua69f\\u0591-\\u05bf\\u05c1-\\u05c2\\u05c4-\\u05c5\\u05c7\\u05d0-\\u05ea\\u05f0-\\u05f4\\ufb1d-\\ufb28\\ufb2a-\\ufb36\\ufb38-\\ufb3c\\ufb3e\\ufb40-\\ufb41\\ufb43-\\ufb44\\ufb46-\\ufb4f\\u0610-\\u061a\\u0620-\\u065f\\u066e-\\u06d3\\u06d5-\\u06dc\\u06de-\\u06e8\\u06ea-\\u06ef\\u06fa-\\u06fc\\u06ff\\u0750-\\u077f\\u08a0\\u08a2-\\u08ac\\u08e4-\\u08fe\\ufb50-\\ufbb1\\ufbd3-\\ufd3d\\ufd50-\\ufd8f\\ufd92-\\ufdc7\\ufdf0-\\ufdfb\\ufe70-\\ufe74\\ufe76-\\ufefc\\u200c\\u0e01-\\u0e3a\\u0e40-\\u0e4e\\u1100-\\u11ff\\u3130-\\u3185\\uA960-\\uA97F\\uAC00-\\uD7AF\\uD7B0-\\uD7FF\\u3003\\u3005\\u303b\\uff21-\\uff3a\\uff41-\\uff5a\\uff66-\\uff9f\\uffa1-\\uffdc",o="0-9_"+i,r="["+i+"0-9]",a="((?:https?|ftp)://|mailto:)?",c=a+"(?:"+r+"{1,64}(?::"+r+"{0,64})?@)?(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])(?:\\.(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])){3}|"+r+"["+i+"·0-9-]{0,64}(?:\\."+r+"["+i+"·0-9-]{0,64}){0,10}(?:\\.(xn--[0-9a-z]{2,16}|["+i+"]{2,24})))(?::\\d{2,5})?(?:/(?:\\S{0,255}[^\\s.;,(\\[\\]{}<>\"'])?)?",l=(new RegExp("^"+a.slice(0,-1),"i"),/^((?:[^\/]+?):\/\/|mailto:)/),d="[a-zA-Z\\d_]{5,32}",u="\\/([a-zA-Z\\d_]{1,32})(?:@("+d+"))?(\\b|$)",h=new RegExp("(^| )(@)("+d+")|("+c+")|(\\n)|("+s.Z+")|(^|[\\s\\(\\]])(#["+o+"]{2,64})|(^|\\s)"+u+"|(?:\\s|^)((?:\\d{1,2}:)?(?:[0-5]?[0-9]):(?:[0-5][0-9]))(?:\\s|$)","i"),g=/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,m=/(^|\s|\n)(````?)([\s\S]+?)(````?)([\s\n\.,:?!;]|$)|(^|\s|\x01)(`|~~|\*\*|__|_-_|\|\|)([^\n]+?)\7([\x01\s\.,:?!;]|$)|@(\d+)\s*\((.+?)\)|(\[(.+?)\]\((.+?)\))/m,p={Telegram:"tg://search_hashtag?hashtag={1}",Twitter:"https://twitter.com/hashtag/{1}",Instagram:"https://instagram.com/explore/tags/{1}/","Google Plus":"https://plus.google.com/explore/{1}"},f={"`":"messageEntityCode","``":"messageEntityPre","**":"messageEntityBold",__:"messageEntityItalic","~~":"messageEntityStrike","_-_":"messageEntityUnderline","||":"messageEntitySpoiler"},v=(new Set(Object.values(f)),new Set(["messageEntityEmoji","messageEntityLinebreak","messageEntityCaret"])),b=new Set(v);for(const e in f)v.add(f[e]);const y=/^\+\d+$/},3591:(e,t,n)=>{n.d(t,{Z:()=>a});var s=n(2423),i=n(410),o=n(6637),r=n(1507);function a(e,t){var n;(0,o.Z)(e)||(e="https://"+e);const i={url:e};let a,c,l,d;if(a=e.match(/^(?:https?:\/\/)?(?:(.+?)\.)?(?:(?:web|k|z|a)\.)?t(?:elegram)?\.me(?:\/(.+))?/)){const t=new URL(e);let i=a[1];i&&r.BX.has(a[1])&&(i=void 0),i&&(t.pathname=i+("/"===t.pathname?"":t.pathname));const o=t.pathname.slice(1),c=o.split("/");if(c[0]&&"$"===c[0][0]&&c[0].length>1)d="invoice";else if(/^\+/.test(o)&&!s.kO.test(o))d="joinchat";else if(c[0])switch(c[0]){case"addlist":case"joinchat":case"addstickers":case"addemoji":case"voicechat":case"invoice":if(1!==c.length&&!i){d=c[0];break}default:if(c.length<=2||(null===(n=c[1])||void 0===n?void 0:n.match(/^\d+(?:\?(?:comment|thread)=\d+)?$/))){d="im";break}}}else(c=e.match(/^(?:https?:\/\/)?telesco\.pe\/([^/?]+)\/(\d+)/))?d="im":(l=e.match(/tg:(?:\/\/)?(.+?)(?:\?|$)/))&&(d="tg_"+l[1]);return window[d]||(d=void 0),i.onclick=d,i}i.GO&&(i.GO.wrapUrl=a)},3512:(e,t,n)=>{n.d(t,{Z:()=>d});var s=n(1507),i=n(3241),o=n(410),r=n(3206),a=n(1352);class c extends i.Z{constructor(){super(),this.myId=s.NM,this.connectionStatus={},this.premium=!1,this.addEventListener("user_auth",(({id:e})=>{this.myId=e.toPeerId()})),this.addEventListener("premium_toggle_private",(({isNew:e,isPremium:t})=>{this.premium=t,this.dispatchEventSingle("premium_toggle",t)})),this.addEventListener("connection_status_change",(e=>{this.connectionStatus[e.name]=e})),this.dispatchEvent=(e,...t)=>{super.dispatchEvent(e,...t),r.Z.getInstance().invokeVoid("event",{name:e,args:t})},a.kC||this.addEventListener("settings_updated",(({settings:e})=>{this.settings=e}))}getConnectionStatus(){return this.connectionStatus}getPremium(){return this.premium}dispatchEventSingle(...e){super.dispatchEvent(...e)}}const l=new c;o.GO.rootScope=l;const d=l},7730:(e,t,n)=>{n.d(t,{Z:()=>r});var s=n(410),i=n(3725);const o=new class{constructor(){this.convertPromises={}}init(){this.worker=new Worker(new URL(n.p+n.u(61),n.b)),this.worker.addEventListener("message",(e=>{const t=e.data.payload,n=this.convertPromises[t.fileName];n&&(t.bytes?n.resolve(t.bytes):n.reject(),delete this.convertPromises[t.fileName])}))}postMessage(e){this.init&&(this.init(),this.init=null),this.worker.postMessage(e)}convert(e,t){if(this.convertPromises.hasOwnProperty(e))return this.convertPromises[e];const n=(0,i.Z)();return this.postMessage({type:"convertWebp",payload:{fileName:e,bytes:t}}),this.convertPromises[e]=n}};s.GO.webpWorkerController=o;const r=o}},r={};function a(e){var t=r[e];if(void 0!==t)return t.exports;var n=r[e]={exports:{}};return o[e].call(n.exports,n,n.exports,a),n.exports}a.m=o,e=[],a.O=(t,n,s,i)=>{if(!n){var o=1/0;for(d=0;d<e.length;d++){for(var[n,s,i]=e[d],r=!0,c=0;c<n.length;c++)(!1&i||o>=i)&&Object.keys(a.O).every((e=>a.O[e](n[c])))?n.splice(c--,1):(r=!1,i<o&&(o=i));if(r){e.splice(d--,1);var l=s();void 0!==l&&(t=l)}}return t}i=i||0;for(var d=e.length;d>0&&e[d-1][2]>i;d--)e[d]=e[d-1];e[d]=[n,s,i]},a.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return a.d(t,{a:t}),t},n=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,a.t=function(e,s){if(1&s&&(e=this(e)),8&s)return e;if("object"==typeof e&&e){if(4&s&&e.__esModule)return e;if(16&s&&"function"==typeof e.then)return e}var i=Object.create(null);a.r(i);var o={};t=t||[null,n({}),n([]),n(n)];for(var r=2&s&&e;"object"==typeof r&&!~t.indexOf(r);r=n(r))Object.getOwnPropertyNames(r).forEach((t=>o[t]=()=>e[t]));return o.default=()=>e,a.d(i,o),i},a.d=(e,t)=>{for(var n in t)a.o(t,n)&&!a.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},a.f={},a.e=e=>Promise.all(Object.keys(a.f).reduce(((t,n)=>(a.f[n](e,t),t)),[])),a.u=e=>(({589:"crypto.worker",630:"npm.qr-code-styling",670:"sw",678:"mtproto.worker"}[e]||e)+"."+{8:"f400704066ccf1976603",41:"2a1ff3b590c8bc78f93b",53:"6dd1aedd146c25cfa7c3",61:"5ebde8511f9713197506",77:"b8cf11d2b5dca36479ca",104:"b23fc99c0ad8aab75e1a",106:"456be31a7e3227855357",231:"68ce08dc42e92b535cee",301:"ede432e7bee50d0da6ab",339:"070c8af94755a7e16e74",392:"d90d554e25d7bba07a3b",436:"9a7c588a4186727e9711",437:"e70c8b9910ea5e00cfb5",442:"bebda96d8ea0ce96ccfc",508:"d7a45bd4e1d4aed0b26b",589:"820aa3b3ec7812f7bcef",630:"f8f57a1c721e03c3f699",642:"5a168694a37ee84cbaed",670:"2e26ec40a16fb1b88f2f",678:"8e44ef7dff9488406fcc",709:"74d842336358b4e09267",770:"20dc3f7e8b425d9cfdec",776:"53710f64170e3f9e97f9",781:"741a72c16269c3775c7d",810:"ac28c2b5c0680ecbe00b",813:"36d018f87c13ad07b81f",874:"c1a071a2358c93353251"}[e]+".chunk.js"),a.miniCssF=e=>{},a.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),s={},i="tweb:",a.l=(e,t,n,o)=>{if(s[e])s[e].push(t);else{var r,c;if(void 0!==n)for(var l=document.getElementsByTagName("script"),d=0;d<l.length;d++){var u=l[d];if(u.getAttribute("src")==e||u.getAttribute("data-webpack")==i+n){r=u;break}}r||(c=!0,(r=document.createElement("script")).charset="utf-8",r.timeout=120,a.nc&&r.setAttribute("nonce",a.nc),r.setAttribute("data-webpack",i+n),r.src=e),s[e]=[t];var h=(t,n)=>{r.onerror=r.onload=null,clearTimeout(g);var i=s[e];if(delete s[e],r.parentNode&&r.parentNode.removeChild(r),i&&i.forEach((e=>e(n))),t)return t(n)},g=setTimeout(h.bind(null,void 0,{type:"timeout",target:r}),12e4);r.onerror=h.bind(null,r.onerror),r.onload=h.bind(null,r.onload),c&&document.head.appendChild(r)}},a.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;a.g.importScripts&&(e=a.g.location+"");var t=a.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");n.length&&(e=n[n.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),a.p=e})(),(()=>{if(void 0!==a){var e=a.u,t=a.e,n={},s={};a.u=function(t){return e(t)+(n.hasOwnProperty(t)?"?"+n[t]:"")},a.e=function(i){return t(i).catch((function(t){var o=s.hasOwnProperty(i)?s[i]:999999;if(o<1){var r=e(i);throw t.message="Loading chunk "+i+" failed after 999999 retries.\n("+r+")",t.request=r,t}return new Promise((function(e){setTimeout((function(){var t=Date.now();n[i]=t,s[i]=o-1,e(a.e(i))}),3e3)}))}))}}})(),(()=>{a.b=document.baseURI||self.location.href;var e={179:0};a.f.j=(t,n)=>{var s=a.o(e,t)?e[t]:void 0;if(0!==s)if(s)n.push(s[2]);else{var i=new Promise(((n,i)=>s=e[t]=[n,i]));n.push(s[2]=i);var o=a.p+a.u(t),r=new Error;a.l(o,(n=>{if(a.o(e,t)&&(0!==(s=e[t])&&(e[t]=void 0),s)){var i=n&&("load"===n.type?"missing":n.type),o=n&&n.target&&n.target.src;r.message="Loading chunk "+t+" failed.\n("+i+": "+o+")",r.name="ChunkLoadError",r.type=i,r.request=o,s[1](r)}}),"chunk-"+t,t)}},a.O.j=t=>0===e[t];var t=(t,n)=>{var s,i,[o,r,c]=n,l=0;if(o.some((t=>0!==e[t]))){for(s in r)a.o(r,s)&&(a.m[s]=r[s]);if(c)var d=c(a)}for(t&&t(n);l<o.length;l++)i=o[l],a.o(e,i)&&e[i]&&e[i][0](),e[i]=0;return a.O(d)},n=this.webpackChunktweb=this.webpackChunktweb||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))})();var c=a.O(void 0,[85,116],(()=>a(2938)));c=a.O(c)})();
//# sourceMappingURL=main.db9b185ae5668ccd3031.bundle.js.map