(()=>{"use strict";var e,t,n,r,o,d,a={1226:(e,t,n)=>{n.d(t,{t9:()=>c,u3:()=>l,g8:()=>i});var r=n(3716),o=n(6926),d=n(9118);let a;const u=new Map,s=new Map;function i(e,t){return a||(r.eM&&console.log(">>> START LOAD WORKER"),a=new Worker(new URL(n.p+n.u(514),n.b)),function(e){a.addEventListener("message",(({data:t})=>{if("update"===t.type)e(t.update);else if("methodResponse"===t.type){const e=u.get(t.messageId);e&&(t.error?e.reject(t.error):e.resolve(t.response))}else if("methodCallback"===t.type){const e=u.get(t.messageId);e&&e.callback&&e.callback(...t.callbackArgs)}else if("unhandledError"===t.type)throw t.error}))}(e),"iOS"===t.platform&&window.addEventListener("focus",(async()=>{try{await Promise.race([f({type:"ping"}),(0,d.wO)(150).then((()=>Promise.reject(new Error("HEALTH_CHECK_TIMEOUT"))))])}catch(e){console.error(e),Date.now()-h>=5e3&&window.location.reload()}}))),f({type:"initApi",args:[t]})}function c(e,...t){if(a)return f({type:"callMethod",name:e,args:t});r.eM&&console.warn("API is not initialized")}function l(e){e.isCanceled=!0;const{messageId:t}=s.get(e)||{};t&&a.postMessage({type:"cancelProgress",messageId:t})}function f(e){const t=(0,o.Z)(u),n={messageId:t,...e},r={messageId:t},d=new Promise(((e,t)=>{Object.assign(r,{resolve:e,reject:t})}));if("args"in n&&"function"==typeof n.args[1]){const e=n.args.pop();r.callback=e,s.set(e,r)}return u.set(t,r),d.catch((()=>{})).finally((()=>{u.delete(t),r.callback&&s.delete(r.callback)})),a.postMessage(n),d}const h=Date.now()},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,w;for(s=128,c=0,l=72,f=e.lastIndexOf("-"),f<0&&(f=0),h=0;h=128)throw new RangeError("Illegal input >= 0x80");n.push(e.charCodeAt(h))}for(m=f>0?f+1:0;m=o)throw RangeError("punycode_bad_input(1)");if(b=(I=e.charCodeAt(m++))-48<10?I-22:I-65<26?I-65:I-97<26?I-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,bMath.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 I;if(t)for(c=0,w=n.length;c{const t=[];let n=0;const r=e.length;let o;for(;n65535&&(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{const{toggleSafeLinkModal:u,openTelegramLink:s}=(0,o.uC)(),h=d||t,m=e!==h,p=(0,r.I4)((t=>t.ctrlKey||t.altKey||t.shiftKey||t.metaKey||!e||!e.match(i.FS)&&!e.match(i.Lj)?!m||(u({url:e}),t.preventDefault(),!1):(t.preventDefault(),s({url:e}),!1)),[m,s,u,e]);if(!e)return;const g=(0,c.Z)(n||"text-entity-link",t.length>50&&"long-word-break-all");return r.ZP.createElement("a",{href:l(e),title:f(e),target:"_blank",rel:"noopener noreferrer",className:g,onClick:p,dir:a?"rtl":"auto"},h)}))},5376:(e,t,n)=>{n.d(t,{yW:()=>r,K2:()=>o,mD:()=>d,Oh:()=>a,v6:()=>u});function r(e){return e>536870912?`${(e/1073741824).toFixed(1)} GB`:e>524288?`${(e/1048576).toFixed(1)} MB`:`${(e/1024).toFixed(1)} KB`}function o(e){const{fileName:t,mimeType:n}=e;return d(t,n)}function d(e,t){return e&&-1!==e.indexOf(".")?e.split(".").pop():t.split("/").pop()}function a(e){switch(e){case"apk":case"xls":case"xlsx":return"green";case"zip":case"rar":case"7z":case"tar":case"gz":case"ppt":case"pptx":return"orange";case"pdf":case"xps":return"red";default:return"default"}}function u(e){return Boolean(e.previewBlobUrl||e.thumbnail)}},4784:(e,t,n)=>{n.d(t,{Z:()=>d});var r=n(3681);const o=new RegExp(`^(?:${r.Z.source})+$`,""),d=e=>{if(e.length>24)return!1;if(!Boolean(e.match(o)))return!1;let t=0;for(;r.Z.exec(e);)if(t++,t>3)return r.Z.lastIndex=0,!1;return t}},2864:(e,t,n)=>{n.d(t,{D:()=>p});var r=n(4050),o=n(2858),d=n(8035),a=n(9937),u=n(2340),s=n(5116),i=n(782),c=n(6752),l=n(8033);const f=(0,s.c$)(void 0,((e,t)=>(0,i.ei)(t,["openUserInfo"])))((({className:e,sender:t,openUserInfo:n,children:o})=>{const d=(0,r.I4)((()=>{t&&n({id:t.id})}),[t,n]);return t?r.ZP.createElement(l.Z,{className:(0,c.Z)("UserLink",e),onClick:d},o):o})),h=(0,s.c$)(void 0,((e,t)=>(0,i.ei)(t,["focusMessage"])))((({className:e,message:t,children:n,focusMessage:o})=>{const d=(0,r.I4)((()=>{t&&o({chatId:t.chatId,messageId:t.id})}),[o,t]);return t?r.ZP.createElement(l.Z,{className:(0,c.Z)("MessageLink",e),onClick:d},n):n})),m=(0,s.c$)(void 0,((e,t)=>(0,i.ei)(t,["openChat"])))((({className:e,chatId:t,openChat:n,children:o})=>{const d=(0,r.I4)((()=>{t&&n({id:t})}),[t,n]);return t?r.ZP.createElement(l.Z,{className:(0,c.Z)("ChatLink",e),onClick:d},o):o}));function p(e,t,n,s,i,c,l={}){if(!t.content.action)return[];const{text:f,translationValues:p,amount:b,currency:v}=t.content.action,w=[],I={...l,maxTextLength:32};let C,S=e("Chat.Service.Group.UpdatedPinnedMessage1"!==f||i?f:"Message.PinnedGenericMessage",p&&p.length?p:void 0);return S.includes("%payment_amount%")&&(C=y(S,"%payment_amount%",(0,a.x)(b,v,e.code)),S=C.pop(),w.push(...C)),C=y(S,"%action_origin%",n?!l.isEmbedded&&function(e,t,n){return(0,o.iX)(t)?function(e,t,n){const a=(0,d.Z)((0,o.U)(e,t));return n?a:r.ZP.createElement(m,{className:"action-link",chatId:t.id},t&&(0,u.Z)(a))}(e,t,n):g(t,n)}(e,n,l.asPlain)||" ":"User"),S=C.pop(),w.push(...C),C=y(S,"%target_user%",s?s.map((e=>g(e,l.asPlain))).filter(Boolean):"User"),S=C.pop(),w.push(...C),C=y(S,"%message%",i?function(e,t,n={}){const a=(0,o.MK)(e,t),{photo:s,video:i,document:c,sticker:l}=(0,o.qp)(t),{maxTextLength:f,isEmbedded:m,asPlain:p}=n,g=m&&a&&!s&&!i&&!c&&!l;let y=(0,d.Z)(a,f);return m&&(s?y="a photo":i?y=i.isGif?"a GIF":"a video":c?y="a document":l&&(y=a)),p?g?`«${y}»`:y:g?r.ZP.createElement("span",null,"«",r.ZP.createElement(h,{className:"action-link",message:t},(0,u.Z)(y)),"»"):r.ZP.createElement(h,{className:"action-link",message:t},(0,u.Z)(y))}(e,i,I):"a message"),S=C.pop(),w.push(...C),C=y(S,"%product%",i?function(e){return e.content&&e.content.invoice?e.content.invoice.title:"a product"}(i):"a product"),S=C.pop(),w.push(...C),C=y(S,"%target_chat%",c?function(e,t){const n="another chat";return t?n:r.ZP.createElement(m,{className:"action-link",chatId:e},n)}(c,l.asPlain):"another chat"),w.push(...C),l.asPlain?w.join("").trim():w}function g(e,t){const n=(0,d.Z)((0,o.Js)(e));return t?n:r.ZP.createElement(f,{className:"action-link",sender:e},e&&(0,u.Z)(n))}function y(e,t,n){const r=e.indexOf(t);if(r<0||!n)return[e];const o=[];return o.push(e.substring(0,r)),Array.isArray(n)?n.forEach(((e,t)=>{o.push(e),t+1{n.d(t,{Z:()=>h});var r=n(4050),o=n(3681),d=n(3716),a=n(7361),u=n(4284),s=n(6752),i=n(7373),c=n(88);const l=/^[\d\wа-яё]$/i,f=/(\*\*|__).+?\1/g;function h(e,t=["emoji"],n){return"string"!=typeof e?[e]:t.reduce(((e,t)=>{switch(t){case"escape_html":return function(e){const t=document.createElement("div");return e.reduce(((e,n)=>"string"!=typeof n?[...e,n]:(t.innerText=n,[...e,t.innerHTML])),[])}(e);case"hq_emoji":return o.Z.lastIndex=0,m(e,"big","jsx");case"emoji":return o.Z.lastIndex=0,m(e,"small","jsx");case"emoji_html":return o.Z.lastIndex=0,m(e,"small","html");case"br":return p(e,"jsx");case"br_html":return p(e,"html");case"highlight":return d=e,a=n.highlight,d.reduce(((e,t)=>{if("string"!=typeof t||!a)return[...e,t];const n=t.toLowerCase(),o=n.indexOf(a.toLowerCase()),d=n[o+a.length];if(o<0||d&&d.match(l))return[...e,t];const u=[];return u.push(t.substring(0,o)),u.push(r.ZP.createElement("span",{className:"matching-text-highlight"},t.substring(o,o+a.length))),u.push(t.substring(o+a.length)),[...e,...u]}),[]);case"links":return function(e){return e.reduce(((e,t)=>{if("string"!=typeof t)return[...e,t];const n=t.match(g);if(!n||!n.length)return[...e,t];const o=[];let d=n.shift(),a=0;for(;d;){const e=t.indexOf(d,a);o.push(t.substring(a,e)),d.startsWith("@")?o.push(r.ZP.createElement(i.Z,{username:d},d)):(d.endsWith("?")&&(d=d.slice(0,d.length-1)),o.push(r.ZP.createElement(c.Z,{text:d,url:d}))),a=e+d.length,d=n.shift()}return o.push(t.substring(a)),[...e,...o]}),[])}(e);case"simple_markdown":return y(e,"jsx");case"simple_markdown_html":return y(e,"html")}var d,a;return e}),[e])}function m(e,t,n){return a.op?e:e.reduce(((e,d)=>{if("string"!=typeof d)return[...e,d];const a=d.split(o.Z),i=d.match(o.Z)||[];return e.push(a[0]),i.reduce(((e,d,i)=>{const c=(0,u.p)((0,o.l)(d)),l=(0,s.Z)("emoji","small"===t&&"emoji-small");"jsx"===n&&e.push(r.ZP.createElement("img",{className:l,src:`./img-apple-${"big"===t?"160":"64"}/${c}.png`,alt:d})),"html"===n&&e.push(`${d}`);const f=2*i+2;return a[f]&&e.push(a[f]),e}),e)}),[])}function p(e,t){return e.reduce(((e,n)=>"string"!=typeof n?[...e,n]:[...e,...n.split(/\r\n|\r|\n/g).reduce(((e,n,o,d)=>{const a=n.trimLeft(),u=n.length-a.length;return e.push(String.fromCharCode(160).repeat(u)+a),o!==d.length-1&&e.push("jsx"===t?r.ZP.createElement("br",null):"
"),e}),[])]),[])}const g=new RegExp(`${d.FM}|${d.uW}`,"ig");function y(e,t){return e.reduce(((e,n)=>{if("string"!=typeof n)return[...e,n];const o=n.split(f),d=n.match(f)||[];return e.push(o[0]),d.reduce(((e,n,d)=>{"jsx"===t?e.push(n.startsWith("**")?r.ZP.createElement("b",null,n.replace(/\*\*/g,"")):r.ZP.createElement("i",null,n.replace(/__/g,""))):e.push(n.startsWith("**")?`${n.replace(/\*\*/g,"")}`:`${n.replace(/__/g,"")}`);const a=2*d+2;return o[a]&&e.push(o[a]),e}),e)}),[])}},7373:(e,t,n)=>{n.d(t,{Z:()=>u});var r=n(4050),o=n(5116),d=n(782),a=n(8085);const u=(0,o.c$)(((e,{userId:t})=>({userOrChat:t?(0,a.dy)(e,t):void 0})),((e,t)=>(0,d.ei)(t,["openChat","openChatByUsername"])))((({username:e,userOrChat:t,children:n,openChat:o,openChatByUsername:d})=>r.ZP.createElement("a",{onClick:()=>{t?o({id:t.id}):e&&d({username:e.substring(1)})},className:"text-entity-link",dir:"auto"},n)))},231:(e,t,n)=>{n.d(t,{Z:()=>u});var r=n(4050),o=n(6752),d=n(9204),a=n(8512);const u=({ref:e,type:t="button",onClick:n,onContextMenu:u,onMouseDown:s,onMouseEnter:i,onMouseLeave:c,onFocus:l,children:f,size:h="default",color:m="primary",className:p,round:g,pill:y,fluid:b,isText:v,isLoading:w,ariaLabel:I,href:C,download:S,disabled:E,ripple:P,faded:M,tabIndex:A,isRtl:T})=>{let k=(0,r.sO)(null);e&&(k=e);const[N,R]=(0,r.eJ)(!1),L=(0,o.Z)("Button",p,h,m,g&&"round",y&&"pill",b&&"fluid",E&&"disabled",v&&"text",w&&"loading",P&&"has-ripple",M&&"faded",N&&"clicked"),D=(0,r.I4)((e=>{!E&&n&&n(e),R(!0),setTimeout((()=>{R(!1)}),400)}),[E,n]),O=(0,r.I4)((e=>{e.preventDefault(),!E&&s&&s(e)}),[s,E]);return C?r.ZP.createElement("a",{ref:k,className:L,href:C,title:I,download:S,tabIndex:A,dir:T?"rtl":void 0},f,!E&&P&&r.ZP.createElement(a.Z,null)):r.ZP.createElement("button",{ref:k,type:t,className:L,onClick:D,onContextMenu:u,onMouseDown:O,onMouseEnter:i&&!E?i:void 0,onMouseLeave:c&&!E?c:void 0,onFocus:l&&!E?l:void 0,"aria-label":I,title:I,tabIndex:A,dir:T?"rtl":void 0},w?r.ZP.createElement("div",null,r.ZP.createElement("span",{dir:T?"auto":void 0},"Please wait.."),r.ZP.createElement(d.Z,{color:v?"blue":"white"})):f,!E&&P&&r.ZP.createElement(a.Z,null))}},4605:(e,t,n)=>{n.d(t,{Z:()=>u});var r=n(4050),o=n(6752),d=n(9107),a=n(9204);const u=(0,r.X$)((({id:e,name:t,value:n,label:u,subLabel:s,checked:i,disabled:c,round:l,blocking:f,isLoading:h,onChange:m,onCheck:p})=>{const g=(0,d.Z)(),y=(0,r.I4)((e=>{m&&m(e),p&&p(e.currentTarget.checked)}),[m,p]),b=(0,o.Z)("Checkbox",c&&"disabled",l&&"round",h&&"loading",f&&"blocking");return r.ZP.createElement("label",{className:b,dir:g.isRtl?"rtl":void 0},r.ZP.createElement("input",{type:"checkbox",id:e,name:t,value:n,checked:i,disabled:c,onChange:y}),r.ZP.createElement("div",{className:"Checkbox-main"},r.ZP.createElement("span",{className:"label",dir:"auto"},u),s&&r.ZP.createElement("span",{className:"subLabel",dir:"auto"},s)),h&&r.ZP.createElement(a.Z,null))}))},3106:(e,t,n)=>{n.d(t,{Z:()=>d});var r=n(4050),o=n(2328);const d=({trigger:e,className:t,children:n,positionX:d="left",positionY:a="top",footer:u,forceOpen:s,onOpen:i,onClose:c})=>{const l=(0,r.sO)(null),f=(0,r.sO)(null),[h,m]=(0,r.eJ)(!1);return r.ZP.createElement("div",{ref:f,className:`DropdownMenu ${t||""}`,onKeyDown:e=>{const t=l.current;if(!h||40!==e.keyCode||!t)return;const n=document.activeElement,r=Array.from(t.children);n&&-1!==r.indexOf(n)||r[0].focus()}},e({onTrigger:()=>{m(!h),h?c&&c():i&&i()},isOpen:h}),r.ZP.createElement(o.Z,{ref:l,containerRef:f,isOpen:h||!!s,className:t||"",positionX:d,positionY:a,footer:u,autoClose:!0,onClose:()=>{m(!1),c&&c()},shouldSkipTransition:s},n))}},7687:(e,t,n)=>{n.d(t,{Z:()=>a});var r=n(4050),o=n(6752),d=n(9107);const a=(0,r.X$)((({ref:e,id:t,className:n,value:a,label:u,error:s,success:i,disabled:c,readOnly:l,placeholder:f,autoComplete:h,inputMode:m,maxLength:p,onChange:g,onInput:y,onKeyPress:b,onKeyDown:v,onBlur:w,onPaste:I})=>{const C=(0,d.Z)(),S=s||i||u,E=(0,o.Z)("input-group",a&&"touched",s?"error":i&&"success",c&&"disabled",l&&"disabled",S&&"with-label",n);return r.ZP.createElement("div",{className:E,dir:C.isRtl?"rtl":void 0},r.ZP.createElement("input",{ref:e,className:"form-control",type:"text",id:t,dir:"auto",value:a||"",placeholder:f,maxLength:p,autoComplete:h,inputMode:m,disabled:c,readOnly:l,onChange:g,onInput:y,onKeyPress:b,onKeyDown:v,onBlur:w,onPaste:I}),S&&r.ZP.createElement("label",{htmlFor:t},S))}))},8033:(e,t,n)=>{n.d(t,{Z:()=>d});var r=n(4050),o=n(6752);const d=({children:e,className:t,isRtl:n,onClick:d})=>{const a=(0,r.I4)((e=>{e.preventDefault(),d(e)}),[d]);return r.ZP.createElement("a",{href:"#",className:(0,o.Z)("Link",t),dir:n?"rtl":"auto",onClick:d?a:void 0},e)}},4288:(e,t,n)=>{n.d(t,{Z:()=>d});var r=n(4050),o=n(9204);const d=(0,r.X$)((({color:e="blue"})=>r.ZP.createElement("div",{className:"Loading"},r.ZP.createElement(o.Z,{color:e,withBackground:"white"===e}))))},2328:(e,t,n)=>{n.d(t,{Z:()=>f});var r=n(4050),o=n(1212),d=n(2313),a=n(8758),u=n(274),s=n(3989),i=n(6752),c=n(8674),l=n(6590);const f=({ref:e,containerRef:t,isOpen:n,className:f,style:h,children:m,positionX:p="left",positionY:g="top",autoClose:y=!1,footer:b,noCloseOnBackdrop:v=!1,onCloseAnimationEnd:w,onClose:I,onMouseEnter:C,onMouseLeave:S,shouldSkipTransition:E})=>{let P=(0,r.sO)(null);e&&(P=e);const M=t||P,{transitionClassNames:A}=(0,o.Z)(n,w,E,void 0,E);(0,r.d4)((()=>n&&I?(0,s.Z)(I):void 0),[n,I]),(0,l.ZP)(n,I,void 0,void 0,y),(0,u.Z)((([e])=>{void 0!==e&&(0,c.YW)(200)}),[n]);const T=(0,d.Z)(P,n,y?I:void 0,void 0,!0);(0,a.Z)(n,M,v?void 0:I);const k=(0,i.Z)("bubble menu-container custom-scroll",g,p,b&&"with-footer",A);return r.ZP.createElement("div",{className:(0,i.Z)("Menu no-selection",f),onKeyDown:n?T:void 0,onMouseEnter:C,onMouseLeave:n?S:void 0,style:h},n&&r.ZP.createElement("div",{className:"backdrop"}),r.ZP.createElement("div",{ref:P,className:k,style:`transform-origin: ${g} ${p}`,onClick:y?I:void 0},m,b&&r.ZP.createElement("div",{className:"footer"},b)))}},8964:(e,t,n)=>{n.d(t,{Z:()=>a});var r=n(4050),o=n(6752),d=n(9107);const a=e=>{const{icon:t,className:n,children:a,onClick:u,href:s,download:i,disabled:c,destructive:l,ariaLabel:f}=e,h=(0,d.Z)(),m=(0,r.I4)((e=>{if(c||!u)return e.stopPropagation(),void e.preventDefault();u(e)}),[c,u]),p=(0,r.I4)((e=>{if(13===e.keyCode||32===e.keyCode)return c||!u?(e.stopPropagation(),void e.preventDefault()):void u(e)}),[c,u]),g=(0,o.Z)("MenuItem",n,c&&"disabled",l&&"destructive"),y=r.ZP.createElement(r.ZP.Fragment,null,t&&r.ZP.createElement("i",{className:`icon-${t}`,"data-char":t.startsWith("char-")?t.replace("char-",""):void 0}),a);return s?r.ZP.createElement("a",{tabIndex:0,className:g,href:s,download:i,"aria-label":f,title:f,target:s.startsWith(window.location.origin)?"_self":"_blank",rel:"noopener noreferrer",dir:h.isRtl?"rtl":void 0,onClick:u},y):r.ZP.createElement("div",{role:"button",tabIndex:0,className:g,onClick:m,onKeyDown:p,"aria-label":f,title:f,dir:h.isRtl?"rtl":void 0},y)}},8512:(e,t,n)=>{n.d(t,{Z:()=>d});var r=n(4050),o=n(9118);const d=(0,r.X$)((()=>{const[e,t]=(0,r.eJ)([]),n=(0,r.Ye)((()=>(0,o.Ds)((()=>{t([])}),700,!1)),[]),d=(0,r.I4)((r=>{if(0!==r.button)return;const o=r.currentTarget,d=o.getBoundingClientRect(),a=o.offsetWidth/2;t([...e,{x:r.clientX-d.x-a/2,y:r.clientY-d.y-a/2,size:a}]),requestAnimationFrame((()=>{n()}))}),[e,n]);return r.ZP.createElement("div",{className:"ripple-container",onMouseDown:d},e.map((({x:e,y:t,size:n})=>r.ZP.createElement("span",{style:`left: ${e}px; top: ${t}px; width: ${n}px; height: ${n}px;`}))))}))},9204:(e,t,n)=>{n.d(t,{Z:()=>d});var r=n(4050),o=n(6752);const d=({color:e="blue",withBackground:t})=>r.ZP.createElement("div",{className:(0,o.Z)("Spinner",e,t&&"with-background")},r.ZP.createElement("div",null))},3716:(e,t,n)=>{n.d(t,{Ti:()=>r,ou:()=>o,iC:()=>d,Ji:()=>a,eM:()=>u,ZT:()=>s,Cg:()=>i,S:()=>c,b_:()=>l,Vx:()=>f,sd:()=>h,Uh:()=>m,gJ:()=>p,lO:()=>g,Cy:()=>y,lW:()=>b,SG:()=>v,lF:()=>w,fo:()=>I,ee:()=>C,lo:()=>E,gZ:()=>P,hT:()=>M,YQ:()=>A,rS:()=>T,t_:()=>k,Ov:()=>N,EN:()=>R,pn:()=>L,Hk:()=>D,Vk:()=>O,mo:()=>x,qU:()=>Z,ul:()=>_,NM:()=>B,oB:()=>F,zy:()=>U,CX:()=>$,xS:()=>G,b6:()=>j,AR:()=>W,r_:()=>H,R2:()=>V,nY:()=>K,QU:()=>z,jT:()=>Q,_m:()=>J,ks:()=>q,l3:()=>Y,u_:()=>X,rO:()=>ee,AE:()=>te,fK:()=>ne,V$:()=>re,bK:()=>oe,ck:()=>de,xn:()=>ae,K7:()=>ue,w7:()=>se,z7:()=>ie,qp:()=>ce,Q:()=>le,Mw:()=>fe,DC:()=>he,Y7:()=>me,yK:()=>pe,K2:()=>ge,bM:()=>ye,ku:()=>be,zq:()=>ve,n:()=>we,pR:()=>Ie,kU:()=>Ce,Y:()=>Se,AK:()=>Ee,FM:()=>Pe,uW:()=>Me,FS:()=>Ae,Lj:()=>Te,aw:()=>ke,FV:()=>Ne,Nf:()=>Re,WS:()=>Le,DU:()=>De,EG:()=>Oe,t4:()=>xe,sR:()=>Ze,$O:()=>_e,Bg:()=>Be,vi:()=>Fe,Db:()=>Ue,mU:()=>$e,p3:()=>Ge,It:()=>je,Vv:()=>We,g:()=>He});const r="Telegram",o=" [Inactive]",d="Telegram WebZ",a="1.11.9",u=!1,s=!1,i=!1,c="Shoot!\nSomething went wrong, please see the error details in Dev Tools Console.",l="user_auth",f="GramJs:sessionId",h=!1,m="tt-global-state",p=30,g=5e3,y=!1,b="tt-media",v="tt-media-avatars",w="tt-media-progressive",I="tt-custom-bg",C="tt-lang-packs-v5",S="undefined"!=typeof window&&window.innerHeight>=900,E=1,P=750,M=S?60:40,A=2*M,T=72,k=S?30:25,N=100,R=42,L=42,D=20,O=30,x=200,Z=500,_=20,B=!1,F=0,U=2,$=U,G=16,j=17,W=15,H=1e4,V="editable-message-text",K="editable-message-text-modal",z=1440,Q=1150,J=1275,q=925,Y=600,X=950,ee=450,te=1e9,ne=100,re=1500,oe=250,de=600,ae=500,ue=(Math.round((oe+de)/2),new Set(["newMessage","newScheduledMessage","deleteMessages","deleteScheduledMessages","deleteHistory"]),13),se=11,ie=160,ce=120,le=64,fe=48,he=32,me=64,pe=64,ge=160,ye=140,be=80,ve=100,we="MEMOJI_STICKER",Ie="en",Ce=200,Se=450,Ee=new Set(["image/png","image/gif","image/jpeg","video/mp4","video/avi","video/quicktime"]),Pe="((ftp|https?):\\/\\/)?((www\\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\\.[a-zA-Z0-9()]{1,63})\\b([-a-zA-Z0-9()@:%_+.~#?&/=]*)",Me="(@[\\w\\d_-]+)",Ae=/^(?:https?:\/\/)?(?:t\.me\/)([\d\w_]+)(?:\/([\d]+))?(?:\/([\d]+))?$/gm,Te=/^(?:https?:\/\/)?(?:t\.me\/joinchat\/)([\d\w_-]+)?$/gm,ke=777e3,Ne=1271266957,Re=0,Le=1,De=10,Oe=5,xe=2147483646,Ze="en",_e="android",Be=["android","ios","tdesktop","macos"],Fe="TelegramTips",Ue=["ar","pt-br","id","it","ko","ms","pl","es","tr"],$e="https://bugs.telegram.org/?tag_ids=41&sort=time",Ge="#A2AF8E",je="#0F0F0F",We="#0a0a0a8c",He="rgba(90, 110, 70, 0.6)"},274:(e,t,n)=>{n.d(t,{Z:()=>d});var r=n(4050),o=n(7204);const d=(e,t,n)=>{const d=(0,o.Z)(t);return(0,r.d4)((()=>e(d||[])),t,n)}},706:(e,t,n)=>{n.d(t,{Z:()=>o});var r=n(4050);const o=(e=!1)=>{const[t,n]=(0,r.eJ)(e);return[t,(0,r.I4)((()=>{n(!0)}),[]),(0,r.I4)((()=>{n(!1)}),[])]}},5326:(e,t,n)=>{n.d(t,{Z:()=>o});var r=n(4050);const o=()=>{const[,e]=(0,r.eJ)(!1);return(0,r.I4)((()=>{e((e=>!e))}),[])}},8674:(e,t,n)=>{n.d(t,{_L:()=>o,OV:()=>d,YW:()=>s,ZP:()=>i});var r=n(4050);const o="tt-event-heavy-animation-start",d="tt-event-heavy-animation-end";let a,u=!1;const s=e=>(u||(u=!0,document.dispatchEvent(new Event(o))),a&&(clearTimeout(a),a=void 0),e&&(a=window.setTimeout((()=>{u=!1,document.dispatchEvent(new Event(d)),a=void 0}),e)),()=>{u=!1,document.dispatchEvent(new Event(d))}),i=(e,t)=>{(0,r.d4)((()=>(u&&e(),document.addEventListener(o,e),document.addEventListener(d,t),()=>{document.removeEventListener(d,t),document.removeEventListener(o,e)})),[t,e])}},6590:(e,t,n)=>{n.d(t,{Oy:()=>s,Wv:()=>c,ZP:()=>f});var r=n(4050),o=n(7361),d=n(7204),a=n(5116),u=n(782);const s=window.location.hash,i={currentIndex:0,nextStateIndexToReplace:-1,isHistoryAltered:!1,isDisabled:!1,isEdge:!1,currentIndexes:[]},c=()=>{i.isDisabled=!0},l=()=>{i.isEdge&&setTimeout((()=>{i.isEdge=!1}),350)};function f(e,t,n,o,s=!1,c){const l=(0,r.sO)(-1),f=(0,r.sO)(!1),h=(0,d.Z)(e),m=(0,r.sO)(!0),p=(0,r.sO)([]),g=(0,d.Z)(c),y=(0,r.sO)(!1),b=(0,r.I4)(((t=!1)=>{if(c){const e=g||[];if(e.length0){const e=p.current[p.current.length-t-1];let n=t;if(e){const t=i.currentIndexes.findIndex((t=>t===e.index));n=i.currentIndexes.length-t-1}i.isHistoryAltered=!0,window.history.go(-n),p.current.splice(p.current.length-t-1,t).forEach((({index:e})=>{i.currentIndexes.splice(i.currentIndexes.indexOf(e),1)}))}c.length>0&&setTimeout((()=>{const e=++i.currentIndex;i.currentIndexes[i.currentIndexes.length-1]=e,window.history.replaceState({index:e,state:o},"",`#${c[c.length-1]}`),p.current[p.current.length-1]={index:e,hash:c[c.length-1]}}),0)}}}else e&&!t&&(m.current=!1,f.current?(f.current=!1,i.currentIndexes.push(l.current)):setTimeout((()=>{const e=++i.currentIndex;i.currentIndexes.push(e),window.history[i.currentIndexes.includes(i.nextStateIndexToReplace-1)&&0!==window.history.state.index&&i.nextStateIndexToReplace===e&&!s?"replaceState":"pushState"]({index:e,state:o},""),l.current=e,s&&(i.nextStateIndexToReplace=i.currentIndex+1)}),0)),!t&&e||m.current||(l.current!==i.currentIndex&&s||(i.isHistoryAltered=!0,window.history.back(),setTimeout((()=>{i.nextStateIndexToReplace=-1}),400)),i.currentIndexes.splice(i.currentIndexes.indexOf(l.current),1),m.current=!0)}),[o,c,e,g,s]);return(0,r.d4)((()=>{const r=e=>{if(i.isHistoryAltered)return void setTimeout((()=>{i.isHistoryAltered=!1}),0);const{index:r}=e.state,o=r||0;try{const r=c?p.current[p.current.length-1].index:l.current,d=i.currentIndexes[i.currentIndexes.indexOf(r)-1];if(i.isDisabled)return;!m.current&&(0===o||o===d)||c&&(0===o||o===d)?(c&&(y.current=!0,p.current.pop()),i.currentIndexes.splice(i.currentIndexes.indexOf(r),1),t&&(i.isEdge&&(0,a.uC)().disableHistoryAnimations(),t(!i.isEdge),m.current=!0)):o===r&&m.current&&n&&!c&&(f.current=!0,i.isEdge&&(0,a.uC)().disableHistoryAnimations(),n(e.state.state))}catch(e){}},o=c?!g||!(0,u.et)(g,c):h!==e;return!i.isDisabled&&o&&b(),window.addEventListener("popstate",r),()=>window.removeEventListener("popstate",r)}),[o,b,c,e,t,n,g,h,s]),{forceClose:()=>b(!0)}}o.cj&&(window.addEventListener("touchstart",(e=>{const t=e.touches[0].pageX;(t<=300||t>=window.innerWidth-300)&&(i.isEdge=!0)})),window.addEventListener("touchend",l),window.addEventListener("popstate",l)),window.history.replaceState({index:i.currentIndex},"",window.location.pathname)},2313:(e,t,n)=>{n.d(t,{Z:()=>o});var r=n(4050);const o=(e,t,n,o,d)=>{const[a,u]=(0,r.eJ)(-1);return(0,r.d4)((()=>{u(-1);const n=e.current;t&&n&&!d&&(n.tabIndex=-1,n.focus())}),[e,t,d]),(0,r.I4)((t=>{const r=e.current;if(!r)return;if(13===t.keyCode&&n)return void n(a);if(38!==t.keyCode&&40!==t.keyCode)return;const d=document.activeElement,s=Array.from(o?r.querySelectorAll(o):r.children);let i=d&&s.indexOf(d)||a;if(38===t.keyCode&&i>0)i--;else if(40===t.keyCode&&i{n.d(t,{Z:()=>a});var r=n(663),o=n(5326),d=n(9290);const a=()=>{const e=(0,o.Z)();return(0,d.Z)((()=>r.ll(e)),[e]),r.i0}},8778:(e,t,n)=>{n.d(t,{Z:()=>a});var r=n(4050),o=n(9203),d=n(5326);const a=(e,t,n=!1,a=!1)=>{const u=(0,o.o5)(e,t),s=(0,d.Z)();return a&&(0,o.Qt)(s),(0,r.d4)((()=>{n||u||(0,o.$y)(e,t).then(s)}),[e,s,u,t,n]),u}},9290:(e,t,n)=>{n.d(t,{Z:()=>o});var r=n(7204);const o=(e,t)=>{const n=(0,r.Z)(t);n&&!t.some(((e,t)=>e!==n[t]))||e(n||[])}},7204:(e,t,n)=>{n.d(t,{Z:()=>o});var r=n(4050);const o=function(e,t){const n=(0,r.sO)(),{current:o}=n;return t&&void 0===e||(n.current=e),o}},1212:(e,t,n)=>{n.d(t,{Z:()=>d});var r=n(4050),o=n(6752);const d=(e=!1,t,n=!1,d="fast",a=!1)=>{const[u,s]=(0,r.eJ)(!e),i=(0,r.sO)(),[c,l]=(0,r.eJ)(e&&n);e?(s(!1),l(!0),i.current&&(window.clearTimeout(i.current),i.current=void 0)):(l(!1),u||i.current||(i.current=window.setTimeout((()=>{s(!0),t&&t(),i.current=void 0}),a?0:350)));const f=c&&!(a&&!e),h=Boolean(i.current),m=e||h;return{shouldRender:m,transitionClassNames:(0,o.Z)(d&&"opacity-transition",d,f&&"open",m&&"shown",h&&"closing")}}},8758:(e,t,n)=>{n.d(t,{Z:()=>o});var r=n(4050);function o(e,t,n){(0,r.d4)((()=>{const r=e=>{const r=t.current,o=e.target;r&&o&&(r.contains(e.target)&&!o.classList.contains("backdrop")||(e.preventDefault(),e.stopPropagation(),n&&n()))};return e&&n&&document.addEventListener("mousedown",r),()=>{document.removeEventListener("mousedown",r)}}),[e,t,n])}},5247:(e,t,n)=>{n.d(t,{Oo:()=>s,xg:()=>i,lQ:()=>h});var r=n(3716);const o=new Set(["scroll","mouseenter","mouseleave"]),d={},a=new Map,u={};function s(e,t,n,r=!1){const o=c(t,e);l(o,e,r)?function(e,t,n){u[e]||(u[e]=0,document.addEventListener(e,m)),function(e){return d[e]||(d[e]=new Map),d[e]}(e).set(t,n),function(e){const t=a.get(e);if(t)return t;const n=new Set;return a.set(e,n),n}(t).add(e),u[e]++}(o,e,n):e.addEventListener(o,n,r)}function i(e,t,n,r=!1){const o=c(t,e);l(o,e,r)?f(o,e):e.removeEventListener(o,n,r)}function c(e,t){const n=e.replace(/^on/,"").replace(/Capture$/,"").toLowerCase();return"change"===n&&"SELECT"!==t.tagName?"input":"doubleclick"===n?"dblclick":"focus"===n?"focusin":"blur"===n?"focusout":n}function l(e,t,n){return!n&&!o.has(e)&&"VIDEO"!==t.tagName&&"IFRAME"!==t.tagName}function f(e,t){u[e]--,u[e]||document.removeEventListener(e,m),d[e].delete(t),a.get(t).delete(e)}function h(e){const t=a.get(e);t&&(t.forEach((t=>f(t,e))),a.delete(e))}function m(e){const t=d[e.type];if(t){let n=!1,r=e.target;const o=()=>{n=!0},d=()=>{e.preventDefault()},a=new Proxy(e,{get:(e,t)=>"currentTarget"===t?r:"stopPropagation"===t||"stopImmediatePropagation"===t?o:"preventDefault"===t?d:Reflect.get(e,t)});for(;r&&r!==document.body;){const e=t.get(r);if(e&&(e(a),n))return;r=r.parentNode}}}r.eM&&document.addEventListener("dblclick",(()=>{console.log("DELEGATED EVENTS",{delegationRegistry:d,delegatedEventsByElement:a,documentEventCounters:u})}))},2916:(e,t,n)=>{n.d(t,{Z:()=>b});var r=n(4050),o=n(6926),d=n(3716),a=n(5247);const u=new Set(["key","ref","teactFastList","teactOrderKey"]),s=new Set(["dir"]),i={autoPlay:"autoplay",autoComplete:"autocomplete"},c={};function l(e,t,n,o,a,{skipComponentUpdate:u=!1,forceIndex:s=!1,fragment:i,moveDirection:c}={}){if(!u&&t&&n&&(0,r.op)(t)&&(0,r.op)(n)&&!(0,r.k)(t,n)&&(n=function(e,t){return e.componentInstance.props=t.componentInstance.props,(0,r.SO)(e.componentInstance)}(t,n)),!u&&n&&(0,r.op)(n)&&n.componentInstance.isMounted&&h(n,o,a,e),t===n)return n;if(!t&&n){(0,r.op)(n)&&(n=f(n,o,a,e));const t=m(n);(0,r.CD)(n,t),s&&e.childNodes[a]?e.insertBefore(t,e.childNodes[a]):(i||e).appendChild(t)}else if(t&&!n)e.removeChild((0,r.U9)(t)),(0,r.Zb)(t);else if(t&&n)if((0,r.k)(t,n)){(0,r.op)(n)&&(n=f(n,o,a,e));const d=m(n);(0,r.CD)(n,d),e.replaceChild(d,(0,r.U9)(t)),(0,r.Zb)(t)}else{const o=(0,r.op)(t)&&(0,r.op)(n);if(o||(0,r.CD)(n,(0,r.U9)(t)),(0,r.O_)(t)&&(0,r.O_)(n)){if(c){const n=(0,r.U9)(t),o=e.childNodes["up"===c?a:a+1];o?e.insertBefore(n,o):(i||e).appendChild(n)}o||function(e,t,n){const r=Object.keys(e.props),o=Object.keys(t.props);r.forEach((r=>{void 0!==e.props[r]&&void 0===t.props[r]&&y(n,r,e.props[r])})),o.forEach((r=>{void 0!==t.props[r]&&e.props[r]!==t.props[r]&&(void 0===e.props[r]?g(n,r,t.props[r]):function(e,t,n,r){"value"===t?e.value=void 0!==r?r:"":(y(e,t,n),g(e,t,r))}(n,r,e.props[r],t.props[r]))}))}(t,n,(0,r.U9)(t)),n.children=function(e,t,n){if(t.props.teactFastList)return function(e,t,n){const o=new Set(t.children.map((e=>{const t="props"in e&&e.props.key;return d.eM&&(0,r.O_)(e)&&!t&&console.warn("Missing `key` in `teactFastList`"),t})));let a=0;const u=e.children.reduce(((e,r,d)=>{let u="props"in r?r.props.key:void 0;if(u&&!o.has(u))return l(n,r,void 0,t,-1),e;if(!u){const o=t.children[d],a=o&&"props"in o?o.props.key:void 0;if(!o||a)return l(n,r,void 0,t,-1),e;u=`__indexKey#${d}`}return e[u]={$element:r,index:a++,order:"props"in r?r.props.teactOrderKey:void 0},e}),{});let s,i,c=[],f=0;return t.children.forEach(((e,r)=>{const o="props"in e?e.props.key:`__indexKey#${r}`,d=u[o];if(!d)return s||(s=[],i=r),void s.push(e);s&&(c=c.concat(p(s,i,n,t)),i=void 0,s=void 0);const a="props"in e?e.props.teactOrderKey:void 0,h=d.index!==f&&d.order!==a,m=h&&f>d.index;h&&!m||f++,c.push(l(n,d.$element,e,t,r,{forceIndex:!0,...h&&{moveDirection:m?"down":"up"}}))})),s&&(c=c.concat(p(s,i,n,t))),c}(e,t,n);const o=Math.max(e.children.length,t.children.length),a=[],u=t.children.length>e.children.length+1?document.createDocumentFragment():void 0;for(let r=0;r=e.children.length?{fragment:u}:void 0);o&&a.push(o)}return u&&n.appendChild(u),a}(t,n,o?e:(0,r.U9)(t))}}return n}function f(e,t,n,o){if(!(0,r.op)(e))return e;const{componentInstance:d}=e;if(!d.isMounted){h(e=(0,r.Hb)(d),t,n,o);const a=e.children[0];(0,r.op)(a)&&(e.children=[f(a,e,0,o)]),d.isMounted=!0}return e}function h(e,t,n,r){const{componentInstance:o}=e;o.onUpdate=()=>{t.children[n]=l(r,t.children[n],o.$element,t,n,{skipComponentUpdate:!0})}}function m(e){if((0,r.V2)(e))return document.createTextNode("");if((0,r.iB)(e))return document.createTextNode(e.value);if((0,r.op)(e))return m(e.children[0]);const{tag:t,props:n,children:o=[]}=e,d=document.createElement(t);return"object"==typeof n.ref&&(n.ref.current=d),Object.keys(n).forEach((e=>{g(d,e,n[e])})),e.children=o.map(((t,n)=>l(d,void 0,t,e,n))),d}function p(e,t,n,r){if(1===e.length)return[l(n,void 0,e[0],r,t,{forceIndex:!0})];if(e.length>1){const o=document.createDocumentFragment(),d=e.map((e=>l(n,void 0,e,r,t,{fragment:o})));return n.childNodes[t]?n.insertBefore(o,n.childNodes[t]):n.appendChild(o),d}throw new Error("Unexpected input")}function g(e,t,n){void 0!==n&&("className"===t?e.className=n:"value"===t?e.value=n:"style"===t?e.style.cssText=n:t.startsWith("on")?(0,a.Oo)(e,t,n,t.endsWith("Capture")):t.startsWith("data-")||s.has(t)?e.setAttribute(t,n):u.has(t)||(e[i[t]||t]=n))}function y(e,t,n){"className"===t?e.className="":"value"===t?e.value="":"style"===t?e.style.cssText="":t.startsWith("on")?(0,a.xg)(e,t,n,t.endsWith("Capture")):t.startsWith("data-")||s.has(t)?e.removeAttribute(t):u.has(t)||delete e[i[t]||t]}const b={render:function(e,t){if(!t)return;let n=t.getAttribute("data-teact-head-id");n||(n=(0,o.Z)(c),c[n]={children:[]},t.setAttribute("data-teact-head-id",n));const r=c[n];r.children=[l(t,r.children[0],e,r,0)]}}},4050:(e,t,n)=>{n.d(t,{V2:()=>f,iB:()=>h,op:()=>p,O_:()=>g,SO:()=>S,k:()=>E,Zb:()=>P,Hb:()=>M,U9:()=>k,CD:()=>N,eJ:()=>R,d4:()=>D,bt:()=>O,Ye:()=>x,I4:()=>Z,sO:()=>_,X$:()=>B,ZP:()=>F});var r=n(3716),o=n(9118),d=n(782),a=n(275),u=n(3592),s=n(5247);let i;!function(e){e[e.Empty=0]="Empty",e[e.Text=1]="Text",e[e.Tag=2]="Tag",e[e.Component=3]="Component"}(i||(i={}));const c=Symbol("Fragment");let l;function f(e){return e.type===i.Empty}function h(e){return e.type===i.Text}function m(e){return e.type===i.Tag}function p(e){return e.type===i.Component}function g(e){return m(e)||p(e)}function y(e,t,...n){return t||(t={}),n=(0,d.xH)(n),e===c?n:"function"==typeof e?function(e,t,n){let r;0===n.length?r=void 0:1===n.length?[r]=n:r=n;const o={$element:{},Component:e,name:e.name,props:{...t,...r&&{children:r}},isMounted:!1,hooks:{state:{cursor:0,byCursor:[]},effects:{cursor:0,byCursor:[]},memos:{cursor:0,byCursor:[]}}};return o.$element=b(o),o.$element}(e,t,n):function(e,t,n){return{type:i.Tag,tag:e,props:t,children:v(n).map(I)}}(e,t,n)}function b(e,t=[]){const{props:n}=e;return{componentInstance:e,type:i.Component,props:n,children:t}}function v(e){let t=e.length-1;for(;t>=0&&w(e[t]);t--);return t+17&&console.warn(`[Teact] Slow component render: ${n}, ${Math.round(t)} ms`),C[n].renderTimes.push(t),C[n].renderCount++}}catch(t){(0,u.S)(t),o=e.renderedValue}if(e.isMounted&&o===e.renderedValue)return e.$element;e.renderedValue=o;const d=I(o);return e.$element=b(e,[d]),e.$element}function E(e,t){return typeof e!=typeof t||e.type!==t.type||(h(e)&&h(t)?e.value!==t.value:m(e)&&m(t)?e.tag!==t.tag||e.props.key!==t.props.key:!(!p(e)||!p(t)||e.componentInstance.Component===t.componentInstance.Component&&e.props.key===t.props.key))}function P(e){var t;g(e)&&(p(e)?(t=e.componentInstance).isMounted&&(t.hooks.memos.byCursor.forEach((e=>{e.current=null})),t.hooks.effects.byCursor.forEach((({cleanup:e})=>{if("function"==typeof e)try{e()}catch(e){(0,u.S)(e)}})),t.isMounted=!1,function(e){e.hooks.effects.byCursor.forEach((e=>{e.cleanup=null,e.effect=null,e.dependencies=null})),e.hooks.state.byCursor.forEach((e=>{e.value=null,e.nextValue=null,e.setter=null})),e.hooks.memos.byCursor.forEach((e=>{e.dependencies=null})),e.hooks=null,e.$element=null,e.renderedValue=null,e.Component=null,e.props=null,e.forceUpdate=null,e.onUpdate=null}(t)):e.target&&((0,s.lQ)(e.target),e.target=null),e.children.forEach(P))}function M(e){return S(e),e.isMounted=!0,e.$element}function A(e){e.isMounted&&(e.hooks.state.byCursor.forEach((e=>{e.value=e.nextValue})),e.prepareForFrame=(0,o.wT)((()=>A(e))),e.forceUpdate=(0,o.mS)((()=>T(e))))}function T(e){if(!e.isMounted||!e.onUpdate)return;const t=e.$element;S(e),e.$element!==t&&e.onUpdate()}function k(e){return p(e)?k(e.children[0]):e.target}function N(e,t){p(e)?N(e.children[0],t):e.target=t}function R(e){const{cursor:t,byCursor:n}=l.hooks.state;var d;return void 0===n[t]&&(n[t]={value:e,nextValue:e,setter:(d=l,e=>{n[t].nextValue!==e&&(n[t].nextValue="function"==typeof e?e(n[t].value):e,d.prepareForFrame&&d.forceUpdate||(d.prepareForFrame=(0,o.wT)((()=>A(d))),d.forceUpdate=(0,o.mS)((()=>T(d)))),d.prepareForFrame(),d.forceUpdate(),r.ZT&&"TeactNContainer"!==d.name&&console.log("[Teact.useState]",d.name,d.Component&&d.Component.DEBUG_contentComponentName?`> ${d.Component.DEBUG_contentComponentName}`:"",`Forced update at cursor #${t}, next value: `,n[t].nextValue))})}),l.hooks.state.cursor++,[n[t].value,n[t].setter]}function L(e,t,n,r){const{cursor:o,byCursor:d}=l.hooks.effects,a=l,s=()=>{if(!a.isMounted)return;const{cleanup:e}=d[o];if("function"==typeof e)try{e()}catch(e){(0,u.S)(e)}d[o].cleanup=t()};if(void 0!==d[o]&&n&&d[o].dependencies){if(n.some(((e,t)=>e!==d[o].dependencies[t]))){if(r){const e=n.reduce(((e,t,n)=>{const r=d[o].dependencies[n];return t!==r&&e.push(`${n}: ${r} => ${t}`),e}),[]);console.log("[Teact]",r,"Effect caused by dependencies.",e.join(", "))}e(s)}}else e(s);d[o]={effect:t,dependencies:n,cleanup:d[o]?d[o].cleanup:void 0},l.hooks.effects.cursor++}function D(e,t,n){return L(o.T2,e,t,n)}function O(e,t,n){return L(o.R3,e,t,n)}function x(e,t,n){const{cursor:o,byCursor:d}=l.hooks.memos;let{current:u}=d[o]||{};return(void 0===d[o]||t.some(((e,t)=>e!==d[o].dependencies[t])))&&(r.eM&&n&&console.log(`[Teact.useMemo] ${l.name} (${n}): Update is caused by:`,d[o]?(0,a.c)(t,d[o].dependencies).join(", "):"[first render]"),u=e()),d[o]={current:u,dependencies:t},l.hooks.memos.cursor++,u}function Z(e,t){return x((()=>e),t)}function _(e){return x((()=>({current:e})),[])}function B(e,t=a.Z,n){return function(o){const d=_(o),u=_();return(!u.current||d.current&&!t(d.current,o))&&(r.eM&&n&&console.log(`[Teact.memo] ${e.name} (${n}): Update is caused by:`,(0,a.c)(d.current,o).join(", ")),d.current=o,u.current=y(e,o)),u.current}}document.addEventListener("dblclick",(()=>{console.log("COMPONENTS",(0,d.Xo)(Object.values(C),"renderCount","desc"))}));const F={createElement:y,Fragment:c}},5116:(e,t,n)=>{n.d(t,{ZP:()=>f,R3:()=>w,Rd:()=>I,uC:()=>C,Q6:()=>S,ll:()=>E,Iq:()=>P,c$:()=>M});var r=n(4050),o=n(3716),d=n(5326),a=n(6926),u=n(9118),s=n(275),i=n(782),c=n(3592);function l(){return(l=Object.assign||function(e){for(var t=1;t7&&console.warn(`[TeactN] Slow containers update: ${Math.round(t)} ms`)}}],g={},y=new Map;function b(){p.forEach((e=>e(h)))}const v=(0,u.mS)(b);function w(e,t=!1){"object"==typeof e&&e!==h&&(h=e,t?b():v())}function I(){return h}function C(){return g}function S(e,t){m[e]||(m[e]=[],g[e]=(t,n=!1)=>{!function(e,t,n){m[e]&&m[e].forEach((e=>{const r=e(h,g,t);r&&w(r,n)}))}(e,t,n)}),m[e].push(t)}function E(e){p.push(e)}function P(e){const t=p.indexOf(e);-1!==t&&p.splice(t,1)}function M(e=(()=>({})),t=(()=>({}))){return n=>function o(u){o.DEBUG_contentComponentName=n.name;const[i]=(0,r.eJ)((0,a.Z)(y)),f=(0,d.Z)();(0,r.d4)((()=>()=>{y.delete(i)}),[i]);let m=y.get(i);if(m||(m={mapStateToProps:e,mapReducersToProps:t,ownProps:u,areMappedPropsChanged:!1,forceUpdate:f,DEBUG_updates:0,DEBUG_componentName:n.name},y.set(i,m)),m.areMappedPropsChanged&&(m.areMappedPropsChanged=!1),!m.mappedProps||!(0,s.Z)(m.ownProps,u)){m.ownProps=u;try{m.mappedProps={...e(h,u),...t(w,g)}}catch(e){(0,c.S)(e)}}return r.ZP.createElement(n,l({},m.mappedProps,u))}}o.eM&&(window.getGlobal=I,document.addEventListener("dblclick",(()=>{console.log("GLOBAL CONTAINERS",(0,i.Xo)(Array.from(y.values()).map((({DEBUG_componentName:e,DEBUG_updates:t})=>({DEBUG_componentName:e,DEBUG_updates:t}))),"DEBUG_updates","desc"))})))},3681:(e,t,n)=>{n.d(t,{l:()=>d,Z:()=>a});const r=/\uFE0F/g,o=String.fromCharCode(8205);function d(e){return e.indexOf(o)<0?e.replace(r,""):e}const a=/(?:\ud83d\udc68\ud83c\udffb\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udffc\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udffd\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udffe\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udfff\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffb\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffb\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffc\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffc\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffd\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffd\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffe\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffe\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udfff\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udfff\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83e\uddd1\ud83c\udffb\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83e\uddd1\ud83c[\udffc-\udfff]|\ud83e\uddd1\ud83c\udffc\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83e\uddd1\ud83c[\udffb\udffd-\udfff]|\ud83e\uddd1\ud83c\udffd\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83e\uddd1\ud83c[\udffb\udffc\udffe\udfff]|\ud83e\uddd1\ud83c\udffe\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83e\uddd1\ud83c[\udffb-\udffd\udfff]|\ud83e\uddd1\ud83c\udfff\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83e\uddd1\ud83c[\udffb-\udffe]|\ud83d\udc68\ud83c\udffb\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udffb\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffc-\udfff]|\ud83d\udc68\ud83c\udffc\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udffc\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb\udffd-\udfff]|\ud83d\udc68\ud83c\udffd\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udffd\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb\udffc\udffe\udfff]|\ud83d\udc68\ud83c\udffe\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udffe\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb-\udffd\udfff]|\ud83d\udc68\ud83c\udfff\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udfff\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb-\udffe]|\ud83d\udc69\ud83c\udffb\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffb\u200d\u2764\ufe0f\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffb\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffc-\udfff]|\ud83d\udc69\ud83c\udffb\u200d\ud83e\udd1d\u200d\ud83d\udc69\ud83c[\udffc-\udfff]|\ud83d\udc69\ud83c\udffc\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffc\u200d\u2764\ufe0f\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffc\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb\udffd-\udfff]|\ud83d\udc69\ud83c\udffc\u200d\ud83e\udd1d\u200d\ud83d\udc69\ud83c[\udffb\udffd-\udfff]|\ud83d\udc69\ud83c\udffd\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffd\u200d\u2764\ufe0f\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffd\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb\udffc\udffe\udfff]|\ud83d\udc69\ud83c\udffd\u200d\ud83e\udd1d\u200d\ud83d\udc69\ud83c[\udffb\udffc\udffe\udfff]|\ud83d\udc69\ud83c\udffe\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffe\u200d\u2764\ufe0f\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffe\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb-\udffd\udfff]|\ud83d\udc69\ud83c\udffe\u200d\ud83e\udd1d\u200d\ud83d\udc69\ud83c[\udffb-\udffd\udfff]|\ud83d\udc69\ud83c\udfff\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udfff\u200d\u2764\ufe0f\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udfff\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb-\udffe]|\ud83d\udc69\ud83c\udfff\u200d\ud83e\udd1d\u200d\ud83d\udc69\ud83c[\udffb-\udffe]|\ud83e\uddd1\ud83c\udffb\u200d\u2764\ufe0f\u200d\ud83e\uddd1\ud83c[\udffc-\udfff]|\ud83e\uddd1\ud83c\udffb\u200d\ud83e\udd1d\u200d\ud83e\uddd1\ud83c[\udffb-\udfff]|\ud83e\uddd1\ud83c\udffc\u200d\u2764\ufe0f\u200d\ud83e\uddd1\ud83c[\udffb\udffd-\udfff]|\ud83e\uddd1\ud83c\udffc\u200d\ud83e\udd1d\u200d\ud83e\uddd1\ud83c[\udffb-\udfff]|\ud83e\uddd1\ud83c\udffd\u200d\u2764\ufe0f\u200d\ud83e\uddd1\ud83c[\udffb\udffc\udffe\udfff]|\ud83e\uddd1\ud83c\udffd\u200d\ud83e\udd1d\u200d\ud83e\uddd1\ud83c[\udffb-\udfff]|\ud83e\uddd1\ud83c\udffe\u200d\u2764\ufe0f\u200d\ud83e\uddd1\ud83c[\udffb-\udffd\udfff]|\ud83e\uddd1\ud83c\udffe\u200d\ud83e\udd1d\u200d\ud83e\uddd1\ud83c[\udffb-\udfff]|\ud83e\uddd1\ud83c\udfff\u200d\u2764\ufe0f\u200d\ud83e\uddd1\ud83c[\udffb-\udffe]|\ud83e\uddd1\ud83c\udfff\u200d\ud83e\udd1d\u200d\ud83e\uddd1\ud83c[\udffb-\udfff]|\ud83d\udc68\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68|\ud83d\udc69\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d[\udc68\udc69]|\ud83d\udc68\u200d\u2764\ufe0f\u200d\ud83d\udc68|\ud83d\udc69\u200d\u2764\ufe0f\u200d\ud83d[\udc68\udc69]|\ud83e\uddd1\u200d\ud83e\udd1d\u200d\ud83e\uddd1|\ud83d\udc6b\ud83c[\udffb-\udfff]|\ud83d\udc6c\ud83c[\udffb-\udfff]|\ud83d\udc6d\ud83c[\udffb-\udfff]|\ud83d\udc8f\ud83c[\udffb-\udfff]|\ud83d\udc91\ud83c[\udffb-\udfff]|\ud83d[\udc6b-\udc6d\udc8f\udc91])|(?:\ud83d[\udc68\udc69]|\ud83e\uddd1)(?:\ud83c[\udffb-\udfff])?\u200d(?:\u2695\ufe0f|\u2696\ufe0f|\u2708\ufe0f|\ud83c[\udf3e\udf73\udf7c\udf84\udf93\udfa4\udfa8\udfeb\udfed]|\ud83d[\udcbb\udcbc\udd27\udd2c\ude80\ude92]|\ud83e[\uddaf-\uddb3\uddbc\uddbd])|(?:\ud83c[\udfcb\udfcc]|\ud83d[\udd74\udd75]|\u26f9)((?:\ud83c[\udffb-\udfff]|\ufe0f)\u200d[\u2640\u2642]\ufe0f)|(?:\ud83c[\udfc3\udfc4\udfca]|\ud83d[\udc6e\udc70\udc71\udc73\udc77\udc81\udc82\udc86\udc87\ude45-\ude47\ude4b\ude4d\ude4e\udea3\udeb4-\udeb6]|\ud83e[\udd26\udd35\udd37-\udd39\udd3d\udd3e\uddb8\uddb9\uddcd-\uddcf\uddd4\uddd6-\udddd])(?:\ud83c[\udffb-\udfff])?\u200d[\u2640\u2642]\ufe0f|(?:\ud83d\udc68\u200d\ud83d\udc68\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc68\u200d\ud83d\udc68\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc68\u200d\ud83d\udc69\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc68\u200d\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc69\u200d\ud83d\udc69\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc69\u200d\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc68\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc68\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc68\u200d\ud83d\udc68\u200d\ud83d[\udc66\udc67]|\ud83d\udc68\u200d\ud83d\udc69\u200d\ud83d[\udc66\udc67]|\ud83d\udc69\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc69\u200d\ud83d\udc69\u200d\ud83d[\udc66\udc67]|\ud83c\udff3\ufe0f\u200d\u26a7\ufe0f|\ud83c\udff3\ufe0f\u200d\ud83c\udf08|\ud83d\ude36\u200d\ud83c\udf2b\ufe0f|\u2764\ufe0f\u200d\ud83d\udd25|\u2764\ufe0f\u200d\ud83e\ude79|\ud83c\udff4\u200d\u2620\ufe0f|\ud83d\udc15\u200d\ud83e\uddba|\ud83d\udc3b\u200d\u2744\ufe0f|\ud83d\udc41\u200d\ud83d\udde8|\ud83d\udc68\u200d\ud83d[\udc66\udc67]|\ud83d\udc69\u200d\ud83d[\udc66\udc67]|\ud83d\udc6f\u200d\u2640\ufe0f|\ud83d\udc6f\u200d\u2642\ufe0f|\ud83d\ude2e\u200d\ud83d\udca8|\ud83d\ude35\u200d\ud83d\udcab|\ud83e\udd3c\u200d\u2640\ufe0f|\ud83e\udd3c\u200d\u2642\ufe0f|\ud83e\uddde\u200d\u2640\ufe0f|\ud83e\uddde\u200d\u2642\ufe0f|\ud83e\udddf\u200d\u2640\ufe0f|\ud83e\udddf\u200d\u2642\ufe0f|\ud83d\udc08\u200d\u2b1b)|[#*0-9]\ufe0f?\u20e3|(?:[©®\u2122\u265f]\ufe0f)|(?:\ud83c[\udc04\udd70\udd71\udd7e\udd7f\ude02\ude1a\ude2f\ude37\udf21\udf24-\udf2c\udf36\udf7d\udf96\udf97\udf99-\udf9b\udf9e\udf9f\udfcd\udfce\udfd4-\udfdf\udff3\udff5\udff7]|\ud83d[\udc3f\udc41\udcfd\udd49\udd4a\udd6f\udd70\udd73\udd76-\udd79\udd87\udd8a-\udd8d\udda5\udda8\uddb1\uddb2\uddbc\uddc2-\uddc4\uddd1-\uddd3\udddc-\uddde\udde1\udde3\udde8\uddef\uddf3\uddfa\udecb\udecd-\udecf\udee0-\udee5\udee9\udef0\udef3]|[\u203c\u2049\u2139\u2194-\u2199\u21a9\u21aa\u231a\u231b\u2328\u23cf\u23ed-\u23ef\u23f1\u23f2\u23f8-\u23fa\u24c2\u25aa\u25ab\u25b6\u25c0\u25fb-\u25fe\u2600-\u2604\u260e\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262a\u262e\u262f\u2638-\u263a\u2640\u2642\u2648-\u2653\u2660\u2663\u2665\u2666\u2668\u267b\u267f\u2692-\u2697\u2699\u269b\u269c\u26a0\u26a1\u26a7\u26aa\u26ab\u26b0\u26b1\u26bd\u26be\u26c4\u26c5\u26c8\u26cf\u26d1\u26d3\u26d4\u26e9\u26ea\u26f0-\u26f5\u26f8\u26fa\u26fd\u2702\u2708\u2709\u270f\u2712\u2714\u2716\u271d\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u2764\u27a1\u2934\u2935\u2b05-\u2b07\u2b1b\u2b1c\u2b50\u2b55\u3030\u303d\u3297\u3299])(?:\ufe0f|(?!\ufe0e))|(?:(?:\ud83c[\udfcb\udfcc]|\ud83d[\udd74\udd75\udd90]|[\u261d\u26f7\u26f9\u270c\u270d])(?:\ufe0f|(?!\ufe0e))|(?:\ud83c[\udf85\udfc2-\udfc4\udfc7\udfca]|\ud83d[\udc42\udc43\udc46-\udc50\udc66-\udc69\udc6e\udc70-\udc78\udc7c\udc81-\udc83\udc85-\udc87\udcaa\udd7a\udd95\udd96\ude45-\ude47\ude4b-\ude4f\udea3\udeb4-\udeb6\udec0\udecc]|\ud83e[\udd0c\udd0f\udd18-\udd1c\udd1e\udd1f\udd26\udd30-\udd39\udd3d\udd3e\udd77\uddb5\uddb6\uddb8\uddb9\uddbb\uddcd-\uddcf\uddd1-\udddd]|[\u270a\u270b]))(?:\ud83c[\udffb-\udfff])?|(?:\ud83c\udff4\udb40\udc67\udb40\udc62\udb40\udc65\udb40\udc6e\udb40\udc67\udb40\udc7f|\ud83c\udff4\udb40\udc67\udb40\udc62\udb40\udc73\udb40\udc63\udb40\udc74\udb40\udc7f|\ud83c\udff4\udb40\udc67\udb40\udc62\udb40\udc77\udb40\udc6c\udb40\udc73\udb40\udc7f|\ud83c\udde6\ud83c[\udde8-\uddec\uddee\uddf1\uddf2\uddf4\uddf6-\uddfa\uddfc\uddfd\uddff]|\ud83c\udde7\ud83c[\udde6\udde7\udde9-\uddef\uddf1-\uddf4\uddf6-\uddf9\uddfb\uddfc\uddfe\uddff]|\ud83c\udde8\ud83c[\udde6\udde8\udde9\uddeb-\uddee\uddf0-\uddf5\uddf7\uddfa-\uddff]|\ud83c\udde9\ud83c[\uddea\uddec\uddef\uddf0\uddf2\uddf4\uddff]|\ud83c\uddea\ud83c[\udde6\udde8\uddea\uddec\udded\uddf7-\uddfa]|\ud83c\uddeb\ud83c[\uddee-\uddf0\uddf2\uddf4\uddf7]|\ud83c\uddec\ud83c[\udde6\udde7\udde9-\uddee\uddf1-\uddf3\uddf5-\uddfa\uddfc\uddfe]|\ud83c\udded\ud83c[\uddf0\uddf2\uddf3\uddf7\uddf9\uddfa]|\ud83c\uddee\ud83c[\udde8-\uddea\uddf1-\uddf4\uddf6-\uddf9]|\ud83c\uddef\ud83c[\uddea\uddf2\uddf4\uddf5]|\ud83c\uddf0\ud83c[\uddea\uddec-\uddee\uddf2\uddf3\uddf5\uddf7\uddfc\uddfe\uddff]|\ud83c\uddf1\ud83c[\udde6-\udde8\uddee\uddf0\uddf7-\uddfb\uddfe]|\ud83c\uddf2\ud83c[\udde6\udde8-\udded\uddf0-\uddff]|\ud83c\uddf3\ud83c[\udde6\udde8\uddea-\uddec\uddee\uddf1\uddf4\uddf5\uddf7\uddfa\uddff]|\ud83c\uddf4\ud83c\uddf2|\ud83c\uddf5\ud83c[\udde6\uddea-\udded\uddf0-\uddf3\uddf7-\uddf9\uddfc\uddfe]|\ud83c\uddf6\ud83c\udde6|\ud83c\uddf7\ud83c[\uddea\uddf4\uddf8\uddfa\uddfc]|\ud83c\uddf8\ud83c[\udde6-\uddea\uddec-\uddf4\uddf7-\uddf9\uddfb\uddfd-\uddff]|\ud83c\uddf9\ud83c[\udde6\udde8\udde9\uddeb-\udded\uddef-\uddf4\uddf7\uddf9\uddfb\uddfc\uddff]|\ud83c\uddfa\ud83c[\udde6\uddec\uddf2\uddf3\uddf8\uddfe\uddff]|\ud83c\uddfb\ud83c[\udde6\udde8\uddea\uddec\uddee\uddf3\uddfa]|\ud83c\uddfc\ud83c[\uddeb\uddf8]|\ud83c\uddfd\ud83c\uddf0|\ud83c\uddfe\ud83c[\uddea\uddf9]|\ud83c\uddff\ud83c[\udde6\uddf2\uddfc]|\ud83c[\udccf\udd8e\udd91-\udd9a\udde6-\uddff\ude01\ude32-\ude36\ude38-\ude3a\ude50\ude51\udf00-\udf20\udf2d-\udf35\udf37-\udf7c\udf7e-\udf84\udf86-\udf93\udfa0-\udfc1\udfc5\udfc6\udfc8\udfc9\udfcf-\udfd3\udfe0-\udff0\udff4\udff8-\udfff]|\ud83d[\udc00-\udc3e\udc40\udc44\udc45\udc51-\udc65\udc6a\udc6f\udc79-\udc7b\udc7d-\udc80\udc84\udc88-\udc8e\udc90\udc92-\udca9\udcab-\udcfc\udcff-\udd3d\udd4b-\udd4e\udd50-\udd67\udda4\uddfb-\ude44\ude48-\ude4a\ude80-\udea2\udea4-\udeb3\udeb7-\udebf\udec1-\udec5\uded0-\uded2\uded5-\uded7\udeeb\udeec\udef4-\udefc\udfe0-\udfeb]|\ud83e[\udd0d\udd0e\udd10-\udd17\udd1d\udd20-\udd25\udd27-\udd2f\udd3a\udd3c\udd3f-\udd45\udd47-\udd76\udd78\udd7a-\uddb4\uddb7\uddba\uddbc-\uddcb\uddd0\uddde-\uddff\ude70-\ude74\ude78-\ude7a\ude80-\ude86\ude90-\udea8\udeb0-\udeb6\udec0-\udec2\uded0-\uded6]|[\u23e9-\u23ec\u23f0\u23f3\u267e\u26ce\u2705\u2728\u274c\u274e\u2753-\u2755\u2795-\u2797\u27b0\u27bf\ue50a])|\ufe0f/g},1363:(e,t,n)=>{var r=n(5116),o=n(1226),d=n(3716),a=n(7361),u=n(8406),s=n(9524),i=n(7358),c=n(4688),l=n(1622);(0,r.Q6)("initApi",((e,t)=>{(async()=>{d.Cg||(await(0,c.Qw)(),(0,c.f3)()),(0,o.g8)(t.apiUpdate,{userAgent:navigator.userAgent,platform:a.Lt,sessionData:(0,c.K8)()})})()})),(0,r.Q6)("setAuthPhoneNumber",((e,t,n)=>{const{phoneNumber:r}=n;return(0,o.t9)("provideAuthPhoneNumber",r.replace(/[^\d]/g,"")),{...e,authIsLoading:!0,authError:void 0}})),(0,r.Q6)("setAuthCode",((e,t,n)=>{const{code:r}=n;return(0,o.t9)("provideAuthCode",r),{...e,authIsLoading:!0,authError:void 0}})),(0,r.Q6)("setAuthPassword",((e,t,n)=>{const{password:r}=n;return(0,o.t9)("provideAuthPassword",r),{...e,authIsLoading:!0,authError:void 0}})),(0,r.Q6)("uploadProfilePhoto",((e,t,n)=>{const{file:r}=n;(0,o.t9)("uploadProfilePhoto",r)})),(0,r.Q6)("signUp",((e,t,n)=>{const{firstName:r,lastName:d}=n;return(0,o.t9)("provideAuthRegistration",{firstName:r,lastName:d}),{...e,authIsLoading:!0,authError:void 0}})),(0,r.Q6)("returnToAuthPhoneNumber",(e=>((0,o.t9)("restartAuth"),{...e,authError:void 0}))),(0,r.Q6)("goToAuthQrCode",(e=>((0,o.t9)("restartAuthWithQr"),{...e,authIsLoadingQrCode:!0,authError:void 0}))),(0,r.Q6)("saveSession",((e,t,n)=>{const{sessionData:r}=n;r?(0,c.wX)(n.sessionData,e.currentUserId):(0,c.jv)()})),(0,r.Q6)("signOut",(()=>{(async()=>{try{await(0,u.r1)(),await(0,o.t9)("destroy"),await(0,l.I)(!1)}catch(e){}(0,r.uC)().reset()})()})),(0,r.Q6)("reset",(()=>{(0,c.jv)(),s.clear(d.lW),s.clear(d.SG),s.clear(d.lF),s.clear(d.fo);const e=d.ee.replace(/\d+$/,""),t=(d.ee.match(/\d+$/)||[0])[0];for(let n=0;n{(async()=>{await(0,o.t9)("disconnect")})()})),(0,r.Q6)("loadNearestCountry",(e=>{"connectionStateReady"===e.connectionState&&(async()=>{const e=await(0,o.t9)("fetchNearestCountry");(0,r.R3)({...(0,r.Rd)(),authNearestCountry:e})})()})),(0,r.Q6)("setDeviceToken",((e,t,n)=>{(0,r.R3)({...e,push:{deviceToken:n,subscribedAt:Date.now()}})})),(0,r.Q6)("deleteDeviceToken",(e=>{const t={...e};delete t.push,(0,r.R3)(t)}))},9667:(e,t,n)=>{var r=n(5116),o=n(1713),d=n(1226),a=n(782),u=n(8406),s=n(8085),i=n(1752),c=n(2858);function l(e,{visibility:t,allowedIds:n,deniedIds:r}){const{users:{byId:o},chats:{byId:d}}=e,a={visibility:t};let u,s;const i=e=>{if(!(0,c.YA)(e))return;const{id:t,accessHash:n}=o[e]||{};return t?{id:t,accessHash:n}:void 0},l=e=>{if((0,c.YA)(e))return;const t=d[e];return t?{id:t.id}:void 0};return"contacts"!==t&&"nobody"!==t||(u=n.map(i).filter(Boolean),s=n.map(l).filter(Boolean),u.length>0&&(a.allowedUsers=u),s.length>0&&(a.allowedChats=s)),"everybody"!==t&&"contacts"!==t||(u=r.map(i).filter(Boolean),s=r.map(l).filter(Boolean),u.length>0&&(a.blockedUsers=u),s.length>0&&(a.blockedChats=s)),a}(0,r.Q6)("updateProfile",((e,t,n)=>{const{photo:a,firstName:u,lastName:c,bio:l,username:f}=n;(async()=>{const{currentUserId:t}=e;if(t){if((0,r.R3)({...(0,r.Rd)(),profileEdit:{progress:o.rN.InProgress}}),a&&await(0,d.t9)("updateProfilePhoto",a),(u||c||l)&&await(0,d.t9)("updateProfile",{firstName:u,lastName:c,about:l})){e=(0,r.Rd)();const n=t&&(0,s.dy)(e,t);n&&(0,r.R3)((0,i.Nq)(e,n.id,{firstName:u,lastName:c,fullInfo:{...n.fullInfo,bio:l}}))}f&&await(0,d.t9)("updateUsername",f)&&t&&(0,r.R3)((0,i.Nq)((0,r.Rd)(),t,{username:f})),(0,r.R3)({...(0,r.Rd)(),profileEdit:{progress:o.rN.Complete}})}})()})),(0,r.Q6)("checkUsername",((e,t,n)=>{const{username:a}=n;(async()=>{if(e.profileEdit&&e.profileEdit.progress===o.rN.InProgress)return;(0,r.R3)({...e,profileEdit:{progress:e.profileEdit?e.profileEdit.progress:o.rN.Idle,isUsernameAvailable:void 0}});const t=await(0,d.t9)("checkUsername",a);e=(0,r.Rd)(),(0,r.R3)({...e,profileEdit:{...e.profileEdit,isUsernameAvailable:t}})})()})),(0,r.Q6)("loadWallpapers",(()=>{(async()=>{const e=await(0,d.t9)("fetchWallpapers",0);if(!e)return;const t=(0,r.Rd)();(0,r.R3)({...t,settings:{...t.settings,loadedWallpapers:e.wallpapers}})})()})),(0,r.Q6)("uploadWallpaper",((e,t,n)=>{const a=n,u=URL.createObjectURL(a);(0,r.R3)({...e,settings:{...e.settings,loadedWallpapers:[{slug:o.mp,document:{fileName:"",size:a.size,mimeType:a.type,previewBlobUrl:u}},...e.settings.loadedWallpapers||[]]}}),(async()=>{const t=await(0,d.t9)("uploadWallpaper",a);if(!t)return;const{wallpaper:n}=t;if(!(e=(0,r.Rd)()).settings.loadedWallpapers)return;const s=e.settings.loadedWallpapers[0];if(!s||s.slug!==o.mp)return;const i={...n,document:{...n.document,previewBlobUrl:u}};(0,r.R3)({...e,settings:{...e.settings,loadedWallpapers:[i,...e.settings.loadedWallpapers.slice(1)]}})})()})),(0,r.Q6)("loadBlockedContacts",(()=>{(async()=>{const e=await(0,d.t9)("fetchBlockedContacts");if(!e)return;let t=(0,r.Rd)();e.users&&e.users.length&&(t=(0,i.Sh)(t,(0,a.ee)(e.users,"id"))),e.chats&&e.chats.length&&(t=(0,i.GL)(t,(0,a.ee)(e.chats,"id"))),t={...t,blocked:{...t.blocked,ids:[...t.blocked.ids||[],...e.blockedIds],totalCount:e.totalCount}},(0,r.R3)(t)})()})),(0,r.Q6)("blockContact",((e,t,n)=>{const{contactId:o,accessHash:a}=n;(async()=>{if(!await(0,d.t9)("blockContact",o,a))return;const e=(0,r.Rd)();(0,r.R3)((0,i.O4)(e,o))})()})),(0,r.Q6)("unblockContact",((e,t,n)=>{const{contactId:o}=n;let a;if((0,c.YA)(o)){const t=(0,s.dy)(e,o);if(!t)return;a=t.accessHash}(async()=>{if(!await(0,d.t9)("unblockContact",o,a))return;const e=(0,r.Rd)();(0,r.R3)((0,i.rB)(e,o))})()})),(0,r.Q6)("loadAuthorizations",(()=>{(async()=>{const e=await(0,d.t9)("fetchAuthorizations");e&&(0,r.R3)({...(0,r.Rd)(),activeSessions:e})})()})),(0,r.Q6)("terminateAuthorization",((e,t,n)=>{const{hash:o}=n;(async()=>{if(!await(0,d.t9)("terminateAuthorization",o))return;const e=(0,r.Rd)();(0,r.R3)({...e,activeSessions:e.activeSessions.filter((e=>e.hash!==o))})})()})),(0,r.Q6)("terminateAllAuthorizations",(()=>{(async()=>{if(!await(0,d.t9)("terminateAllAuthorizations"))return;const e=(0,r.Rd)();(0,r.R3)({...e,activeSessions:e.activeSessions.filter((e=>e.isCurrent))})})()})),(0,r.Q6)("loadNotificationExceptions",(e=>{const{serverTimeOffset:t}=e;(async()=>{const e=await(0,d.t9)("fetchNotificationExceptions",{serverTimeOffset:t});e&&(0,r.R3)((0,i.aJ)((0,r.Rd)(),e))})()})),(0,r.Q6)("loadNotificationSettings",(e=>{const{serverTimeOffset:t}=e;(async()=>{const e=await(0,d.t9)("fetchNotificationSettings",{serverTimeOffset:t});e&&(0,r.R3)((0,i.BI)((0,r.Rd)(),e))})()})),(0,r.Q6)("updateNotificationSettings",((e,t,n)=>{const{peerType:o,isSilent:a,shouldShowPreviews:u}=n;(async()=>{await(0,d.t9)("updateNotificationSettings",o,{isSilent:a,shouldShowPreviews:u})&&(0,r.R3)((0,i.HN)((0,r.Rd)(),o,a,u))})()})),(0,r.Q6)("updateWebNotificationSettings",((e,t,n)=>{(async()=>{(0,r.R3)((0,i.BI)((0,r.Rd)(),n));const e=(0,r.Rd)(),{hasPushNotifications:t,hasWebNotifications:o}=e.settings.byKey;o&&t?await(0,u.Ld)():await(0,u.r1)()})()})),(0,r.Q6)("updateContactSignUpNotification",((e,t,n)=>{const{isSilent:o}=n;(async()=>{await(0,d.t9)("updateContactSignUpNotification",o)&&(0,r.R3)((0,i.BI)((0,r.Rd)(),{hasContactJoinedNotifications:!o}))})()})),(0,r.Q6)("loadLanguages",(()=>{(async()=>{const e=await(0,d.t9)("fetchLanguages");e&&(0,r.R3)((0,i.BI)((0,r.Rd)(),{languages:e}))})()})),(0,r.Q6)("loadPrivacySettings",(()=>{(async()=>{const[e,t,n,o,a]=await Promise.all([(0,d.t9)("fetchPrivacySettings","phoneNumber"),(0,d.t9)("fetchPrivacySettings","lastSeen"),(0,d.t9)("fetchPrivacySettings","profilePhoto"),(0,d.t9)("fetchPrivacySettings","forwards"),(0,d.t9)("fetchPrivacySettings","chatInvite")]);if(!(e&&t&&n&&o&&a))return;const u=(0,r.Rd)();u.settings.privacy.phoneNumber=e,u.settings.privacy.lastSeen=t,u.settings.privacy.profilePhoto=n,u.settings.privacy.forwards=o,u.settings.privacy.chatInvite=a,(0,r.R3)(u)})()})),(0,r.Q6)("setPrivacyVisibility",((e,t,n)=>{const{privacyKey:o,visibility:a}=n,{privacy:{[o]:u}}=e.settings;if(!u)return;const s=l(e,{visibility:a,allowedIds:[...u.allowUserIds,...u.allowChatIds],deniedIds:[...u.blockUserIds,...u.blockChatIds]});(async()=>{const e=await(0,d.t9)("setPrivacySettings",o,s);if(e){const t=(0,r.Rd)();t.settings.privacy[o]=e,(0,r.R3)(t)}})()})),(0,r.Q6)("setPrivacySettings",((e,t,n)=>{const{privacyKey:o,isAllowList:a,contactsIds:u}=n,{privacy:{[o]:s}}=e.settings;if(!s)return;const i=l(e,{visibility:s.visibility,allowedIds:a?u:[...s.allowUserIds,...s.allowChatIds],deniedIds:a?[...s.blockUserIds,...s.blockChatIds]:u});(async()=>{const e=await(0,d.t9)("setPrivacySettings",o,i);if(e){const t=(0,r.Rd)();t.settings.privacy[o]=e,(0,r.R3)(t)}})()})),(0,r.Q6)("updateIsOnline",((e,t,n)=>{(0,d.t9)("updateIsOnline",n)})),(0,r.Q6)("loadContentSettings",(()=>{(async()=>{const e=await(0,d.t9)("fetchContentSettings");e&&(0,r.R3)((0,i.BI)((0,r.Rd)(),e))})()})),(0,r.Q6)("updateContentSettings",((e,t,n)=>{(async()=>{(0,r.R3)((0,i.BI)((0,r.Rd)(),{isSensitiveEnabled:n})),await(0,d.t9)("updateContentSettings",n)||(0,r.R3)((0,i.BI)((0,r.Rd)(),{isSensitiveEnabled:!n}))})()}))},4907:(e,t,n)=>{var r=n(5116),o=n(3716),d=n(8406),a=n(1752),u=n(663),s=n(8085),i=n(1622),c=n(1947);(0,r.Q6)("apiUpdate",((e,t,n)=>{switch(o.eM&&"updateUserStatus"!==n["@type"]&&"updateServerTimeOffset"!==n["@type"]&&console.log("[GramJs] UPDATE",n["@type"],{update:n}),n["@type"]){case"updateApiReady":!function(e){const{hasWebNotifications:t,hasPushNotifications:n}=(0,s.dZ)(e);t&&n&&(0,d.Ld)(),(0,u.m0)(e.settings.byKey.language)}(e);break;case"updateAuthorizationState":!function(e){let t=(0,r.Rd)();const n="authorizationStateReady"===t.authState,o=e.authorizationState;switch((0,r.R3)({...t,authState:o,authIsLoading:!1}),t=(0,r.Rd)(),o){case"authorizationStateLoggingOut":(0,i.I)(!1),(0,r.R3)({...t,isLoggingOut:!0});break;case"authorizationStateWaitCode":(0,r.R3)({...t,authIsCodeViaApp:e.isCodeViaApp});break;case"authorizationStateWaitPassword":(0,r.R3)({...t,authHint:e.hint});break;case"authorizationStateWaitQrCode":(0,r.R3)({...t,authIsLoadingQrCode:!1,authQrCode:e.qrCode});break;case"authorizationStateReady":if(n)break;(0,i.I)(!0),(0,r.R3)({...t,isLoggingOut:!1,lastSyncTime:Date.now()})}}(n);break;case"updateAuthorizationError":!function(e){(0,r.R3)({...(0,r.Rd)(),authError:e.message})}(n);break;case"updateConnectionState":!function(e){const{connectionState:t}=e,n=(0,r.Rd)();(0,r.R3)({...n,connectionState:t}),"connectionStateReady"===t&&"authorizationStateReady"===n.authState?(0,r.uC)().sync():"connectionStateBroken"===t&&(0,r.uC)().signOut()}(n);break;case"updateSession":!function(e){const{sessionData:t}=e,{authRememberMe:n,authState:o}=(0,r.Rd)(),d=!t||!t.mainDcId;n&&"authorizationStateReady"===o&&!d&&(0,r.uC)().saveSession({sessionData:t})}(n);break;case"updateServerTimeOffset":!function(e){const t=(0,r.Rd)();t.serverTimeOffset!==e.serverTimeOffset&&(0,r.R3)({...t,serverTimeOffset:e.serverTimeOffset})}(n);break;case"updateCurrentUser":!function(e){const{currentUser:t}=e;(0,r.R3)({...(0,a.Nq)((0,r.Rd)(),t.id,t),currentUserId:t.id}),function(e){const t=localStorage.getItem(o.b_);if(!t)return;const n=JSON.parse(t);n.id=e,localStorage.setItem(o.b_,JSON.stringify(n))}(t.id)}(n);break;case"error":{"SESSION_REVOKED"===n.error.message&&t.signOut();const e=(0,c.J_)(n.error);e?t.addPaymentError({error:e}):t.showDialog&&t.showDialog({data:{...n.error,hasErrorKey:!0}});break}}}))},7895:(e,t,n)=>{var r=n(5116),o=n(3716),d=n(7361),a=n(663),u=n(6917),s=n(8085),i=n(1622);!function(){function e(){const e=document.documentElement.className.match(/theme-(\w+)/),t=e?e[1]:"light",n=(0,r.Rd)(),d=(0,s.Pu)(n),{animationLevel:a}=n.settings.byKey;d!==t&&((0,u.Z)(d,a===o.zy),(0,r.R3)({...n}))}const t=window.matchMedia("(prefers-color-scheme: dark)");"function"==typeof t.addEventListener?t.addEventListener("change",e):"function"==typeof t.addListener&&t.addListener(e)}(),(0,r.Q6)("init",(e=>{const{animationLevel:t,messageTextSize:n,language:r}=e.settings.byKey,c=(0,s.Pu)(e);(0,a.m0)(r,void 0,!0),document.documentElement.style.setProperty("--composer-text-size",`${Math.max(n,d.cj?16:15)}px`),document.documentElement.style.setProperty("--message-meta-height",`${Math.floor(1.3125*n)}px`),document.documentElement.style.setProperty("--message-text-size",`${n}px`),document.documentElement.setAttribute("data-message-text-size",n.toString()),document.body.classList.add("initial"),document.body.classList.add(`animation-level-${t}`),document.body.classList.add(d.$b?"is-touch-env":"is-pointer-env"),(0,u.Z)(c,t===o.zy),(0,i.p)(),d.s$&&document.body.classList.add("is-safari"),d.cj?document.body.classList.add("is-ios"):d.wZ?document.body.classList.add("is-android"):d.jm&&document.body.classList.add("is-macos")})),(0,r.Q6)("setIsUiReady",((e,t,n)=>{const{uiReadyState:r}=n;return 2===r&&document.body.classList.remove("initial"),{...e,uiReadyState:r}})),(0,r.Q6)("setAuthPhoneNumber",((e,t,n)=>{const{phoneNumber:r}=n;return{...e,authPhoneNumber:r}})),(0,r.Q6)("setAuthRememberMe",((e,t,n)=>({...e,authRememberMe:Boolean(n)}))),(0,r.Q6)("clearAuthError",(e=>({...e,authError:void 0}))),(0,r.Q6)("disableHistoryAnimations",(()=>{setTimeout((()=>{(0,r.R3)({...(0,r.Rd)(),shouldSkipHistoryAnimations:!1}),document.body.classList.remove("no-animate")}),450),(0,r.R3)({...(0,r.Rd)(),shouldSkipHistoryAnimations:!0},!0)}))},3781:(e,t,n)=>{var r=n(5116),o=n(1752);(0,r.Q6)("setSettingOption",((e,t,n)=>(0,o.BI)(e,n))),(0,r.Q6)("setThemeSettings",((e,t,n)=>{const{theme:r,...d}=n;return(0,o.lr)(e,r,d)}))},8332:(e,t,n)=>{n.d(t,{YA:()=>i,Bf:()=>c,G9:()=>l,ZV:()=>f,eA:()=>h,Ru:()=>m,l6:()=>p,zX:()=>g,U:()=>y,GM:()=>b,hu:()=>v,RT:()=>w,Hp:()=>I,Nl:()=>C,VE:()=>S,Mg:()=>E,Qm:()=>P,H5:()=>M,q8:()=>A,Hd:()=>T,OE:()=>k,pE:()=>N,i4:()=>R,Sm:()=>L,cc:()=>D,P4:()=>O,O:()=>x,Fu:()=>Z,SB:()=>_,iX:()=>B,zF:()=>F,ih:()=>U});var r=n(6137),o=n(3716),d=n(782),a=n(5527),u=n(790);const s=Date.now()/1e3+31622400;function i(e){return e>0}function c(e){return l(e)||f(e)}function l(e){return"chatTypeBasicGroup"===e.type}function f(e){return"chatTypeSuperGroup"===e.type}function h(e){return"chatTypeChannel"===e.type}function m(e){return"chatTypePrivate"===e.type||"chatTypeBasicGroup"===e.type}function p(e){switch(e.type){case"chatTypePrivate":return"PrivateChat";case"chatTypeBasicGroup":case"chatTypeSuperGroup":return"AccDescrGroup";case"chatTypeChannel":return"AccDescrChannel";default:return"Chat"}}function g(e){if("chatTypePrivate"===e.type||"chatTypeSecret"===e.type)return e.id}function y(e,t,n,r=!1){return r||n&&t.id===n.id&&n.isSelf?e("SavedMessages"):t.title||e("HiddenName")}function b(e){if(e.fullInfo)return e.fullInfo.about}function v(e){const{username:t}=e;if(t)return`https://t.me/${t}`;const{inviteLink:n}=e.fullInfo||{};return n}function w(e,t="normal"){if(e.avatarHash)switch(t){case"big":return`profile${e.id}?${e.avatarHash}`;default:return`avatar${e.id}?${e.avatarHash}`}}function I(e){return!e.lastMessage}function C(e){return Boolean(e.adminRights)}function S(e,t){return!!e.adminRights&&e.adminRights[t]}function E(e,t){return Boolean(e.currentUserBannedRights&&e.currentUserBannedRights[t]||e.defaultBannedRights&&e.defaultBannedRights[t])}function P(e,t){return t!==r._f||!(e.isRestricted||e.migratedTo||e.isNotJoined)&&(!!e.isCreator||!!i(e.id)||(h(e)?S(e,"postMessages"):C(e)||!E(e,"sendMessages")))}function M(e,t=!1){if(!e)return{canAttachMedia:!1,canAttachPolls:!1,canSendStickers:!1,canSendGifs:!1,canAttachEmbedLinks:!1};const n=C(e);return{canAttachMedia:n||!E(e,"sendMedia"),canAttachPolls:(n||!E(e,"sendPolls"))&&(!i(e.id)||t),canSendStickers:n||!E(e,"sendStickers"),canSendGifs:n||!E(e,"sendGifs"),canAttachEmbedLinks:n||!E(e,"embedLinks")}}function A(e,t,n){if(t&&t.sendMessages){const{untilDate:n}=t;return n&&nfunction(e,t,n,r,o,d,a,u){if(!e.isListed)return!1;if(d&&d.has(e.id))return!1;if(a&&a.has(e.id))return!0;if(u&&u.has(e.id))return!0;if(N(e)&&t.excludeArchived)return!1;if(t.excludeMuted&&!e.unreadMentionsCount&&R(e,r,o))return!1;if(!e.unreadCount&&!e.unreadMentionsCount&&!e.hasUnreadMark&&t.excludeRead)return!1;if(i(e.id)){const r=n[e.id];if(r&&"userTypeBot"===r.type){if(t.bots)return!0}else{if(t.contacts&&r&&r.isContact)return!0;if(t.nonContacts&&r&&!r.isContact)return!0}}else{if(c(e))return!!t.groups;if(h(e))return!!t.channels}return!1}(e[d],n,t,r,o,a,u,s))),n.pinnedChatIds]}function x(e,t,n,r="all"){function o(e){if(!e||!e.lastMessage||e.migratedTo)return!1;switch(r){case"all":if(N(e))return!1;break;case"archived":if(!N(e))return!1}return!e.isRestricted&&!e.isNotJoined}const a=t.map((t=>e[t])).filter(o),u=new Set(t);return{pinnedChats:n?n.map((t=>e[t])).filter(o).filter((e=>u.has(e.id))):[],otherChats:(0,d.Xo)(n?a.filter((e=>!n.includes(e.id))):a,k,"desc")}}function Z(e,t,n,r,o,d){const[a]=O(e,t,n,o,d,r),u=a.map((t=>e[t])).filter((e=>e&&e.lastMessage&&!e.isRestricted&&!e.isNotJoined));return{unreadDialogsCount:u.reduce(((e,t)=>t.unreadCount||t.hasUnreadMark?e+1:e),0),hasActiveDialogs:u.some((e=>e.unreadMentionsCount||!R(e,o,d)&&(e.unreadCount||e.hasUnreadMark)))}}function _(e,t,n,r,o,d,a){const{id:u,title:s,emoticon:i,description:c,pinnedChatIds:l,excludedChatIds:f,includedChatIds:h,excludeArchived:m,excludeMuted:p,excludeRead:g,...y}=r;return Object.values(y).filter(Boolean).length>1||f&&f.length||h&&h.length?e("Chats",function(e,t,n,r,o,d){const[a,u]=O(e,t,n,o,d,r),{pinnedChats:s,otherChats:i}=x(e,a,u,"folder");return s.length+i.length}(t,n,r,o,d,a)):y.bots?e("FilterBots"):y.groups?e("FilterGroups"):y.channels?e("FilterChannels"):y.contacts?e("FilterContacts"):y.nonContacts?e("FilterNonContacts"):void 0}function B(e){return!!e&&e.id<0}function F(e,t,n){if(n&&!i(t))return n.isSelf?e("FromYou"):(0,a.Vl)(n)}function U(e,t,n=!1,r){return(0,d.Xo)(e,(e=>{const o=t[e];if(!o)return 0;let d=0;return o.lastMessage&&(d+=o.lastMessage.date),n&&o.isVerified&&(d+=3e9),r&&r.includes(e)&&(d=Date.now()+3e8+(r.length-r.indexOf(e))),d}),"desc")}},2858:(e,t,n)=>{n.d(t,{uw:()=>ue,H5:()=>o.H5,cc:()=>o.cc,Qm:()=>o.Qm,RT:()=>o.RT,GM:()=>o.GM,hu:()=>o.hu,N0:()=>ee,OE:()=>o.OE,Hd:()=>o.Hd,U:()=>o.U,l6:()=>o.l6,T7:()=>y,SB:()=>o.SB,Fu:()=>o.Fu,VE:()=>o.VE,XV:()=>ae,Sc:()=>oe,N5:()=>Z,oP:()=>_,I3:()=>T,qp:()=>R,R5:()=>de,$D:()=>p,aE:()=>F,ep:()=>q,c0:()=>Y,eO:()=>j,Tp:()=>c,kG:()=>J,Ti:()=>z,DH:()=>K,KK:()=>f,O$:()=>D,t9:()=>G,Y5:()=>x,zF:()=>o.zF,q8:()=>o.q8,_O:()=>g,bf:()=>B,MK:()=>h,UD:()=>m,b7:()=>O,s1:()=>W,F$:()=>H,Cg:()=>V,bV:()=>te,HV:()=>ne,zX:()=>o.zX,OU:()=>E,RI:()=>P,Ow:()=>ie,Rs:()=>r.Rs,Vl:()=>r.Vl,Js:()=>r.Js,Tq:()=>r.Tq,jC:()=>re,BM:()=>X,u8:()=>L,Lo:()=>I,Ul:()=>S,iX:()=>o.iX,Nl:()=>o.Nl,pE:()=>o.pE,G9:()=>o.G9,eA:()=>o.eA,Bf:()=>o.Bf,YA:()=>o.YA,Hp:()=>o.Hp,ZV:()=>o.ZV,Ru:()=>o.Ru,NB:()=>r.NB,MF:()=>w,CD:()=>A,rl:()=>U,hC:()=>$,CI:()=>M,B4:()=>b,ss:()=>v,jM:()=>C,cS:()=>r.cS,kM:()=>r.kM,Mg:()=>o.Mg,Ak:()=>l,O:()=>o.O,P4:()=>o.P4,i4:()=>o.i4,Sm:()=>o.Sm,ih:()=>o.ih,Z0:()=>r.Z0});var r=n(5527),o=n(8332),d=n(6137),a=n(3716),u=n(4784);const s="The message is not supported on this version of Telegram",i=new RegExp(a.FM,"i");function c(e){const{chatId:t,id:n}=e;return`msg${t}-${n}`}function l(e){const t=e.match(/^msg(-?\d+)-(\d+)/);return{chatId:Number(t[1]),messageId:Number(t[2])}}function f(e){return e.previousLocalId||e.id}function h(e,t,n=!1){const{text:r,photo:o,video:d,audio:a,voice:u,document:i,sticker:c,contact:l,poll:f,invoice:h}=t.content,m=r&&r.text.substr(0,80);return t.groupedId?`${n?"":"🖼 "}${m||e("lng_in_dlg_album")}`:o?`${n?"":"🖼 "}${m||e("AttachPhoto")}`:d?`${n?"":"📹 "}${m||e(d.isGif?"AttachGif":"AttachVideo")}`:c?`${c.emoji||""} ${e("AttachSticker")}`.trim():a?`${n?"":"🎧 "}${T(t)||e("AttachMusic")}`:u?`${n?"":"🎤 "}${m||e("AttachAudio")}`:i?`${n?"":"📎 "}${m||i.fileName}`:l?e("AttachContact"):f?`${n?"":"📊 "}${f.summary.question}`:h?"Invoice":r?m:s}function m(e){const{text:t,sticker:n,photo:r,video:o,audio:d,voice:a,document:u,poll:i,webPage:c,contact:l,invoice:f}=e.content;return t?t.text:n||r||o||d||a||u||l||i||c||f?void 0:s}function p(e){const{text:t,sticker:n,photo:r,video:o,audio:d,voice:a,document:s,poll:i,webPage:c,contact:l}=e.content;return!!(n||o&&o.isRound)||!(!t||r||o||d||a||s||i||c||l)&&((0,u.Z)(t.text)||!1)}function g(e){const{text:t}=e.content;if(t&&t.text.length<=6&&1===p(e))return t.text}function y(e){const{text:t}=e.content;let n;if(t&&t.entities){let e=t.entities.find((e=>e.type===d.Vv.TextUrl));if(e&&(n=e.url.match(i)),!n&&(e=t.entities.find((e=>e.type===d.Vv.Url)),e)){const{offset:r,length:o}=e;n=t.text.substring(r,r+o).match(i)}}if(!n&&t&&(n=t.text.match(i)),n)return{url:n[0],domain:n[3]}}function b(e){return e.isOutgoing}function v(e){return Boolean(e.replyToMessageId)}function w(e){return Boolean(e.forwardInfo)}function I(e){return!!e.content.action}function C(e){return e.chatId===a.aw&&M(e)}function S(e){return Boolean(e.senderId)&&e.senderId<0&&b(e)}function E(e,t){return t.id>0?(0,r.Js)(t):(0,o.U)(e,t)}function P(e){return e.sendingState?"messageSendingStateFailed"===e.sendingState?"failed":"pending":"succeeded"}function M(e){return e.id>=a.AE}function A(e){return e.content.action&&"historyClear"===e.content.action.type}function T(e){const{audio:t,text:n}=e.content;return t&&[t.title,t.performer].filter(Boolean).join(" — ")||n&&n.text}var k=n(7361),N=n(5376);function R(e){return e.content}function L(e){return Boolean(D(e)||O(e)||F(e)||B(e)||function(e){return e.content.contact}(e)||G(e)||Z(e)||_(e)||function(e){return e.content.voice}(e))}function D(e){return e.content.photo}function O(e){return e.content.video}function x(e){const{video:t}=e.content;return t&&t.isRound?t:void 0}function Z(e){return e.content.action}function _(e){return e.content.audio}function B(e){return e.content.sticker}function F(e){return e.content.document}function U(e){const t=F(e);return t?"photo"===t.mediaType:void 0}function $(e){const t=F(e);return t?"video"===t.mediaType:void 0}function G(e){return e.content.poll}function j(e){return e.content.invoice}function W(e){return e.content.webPage}function H(e){const t=W(e);return t?t.photo:void 0}function V(e){const t=W(e);if(t)return t.video}function K(e){const t=function(e){const t=D(e)||O(e)||F(e)||B(e)||H(e)||V(e);if(t)return t.thumbnail}(e);return t?t.dataUri:void 0}function z(e,t){const{photo:n,video:r,sticker:o,audio:d,voice:a,document:u}=e.content,s=H(e),i=V(e),l=r||i,f=n||s;if(!(f||l||o||d||a||u))return;const h=c(e);if(l)switch(t){case"micro":case"pictogram":return`${h}?size=m`;case"inline":return X(e)?void 0:Q(l,h);case"viewerPreview":return`${h}?size=m`;case"viewerFull":return Q(l,h);case"download":return`${h}?download`}if(f)switch(t){case"micro":case"pictogram":return`${h}?size=m`;case"inline":return X(e)?void 0:`${h}?size=x`;case"viewerPreview":return`${h}?size=x`;case"viewerFull":return`${h}?size=z`}if(u)switch(t){case"micro":case"pictogram":case"inline":case"viewerPreview":if(!(0,N.v6)(u)||X(e))return;return`${h}?size=m`;default:return h}if(o)switch(t){case"micro":return;case"pictogram":return`${h}?size=m`;default:return h}if(d)switch(t){case"micro":case"pictogram":return;case"download":return`${h}?download`;default:return Q(d,h)}if(a)switch(t){case"micro":case"pictogram":return;default:return h}}function Q(e,t){return k.I_&&k.s$?`${t}?fileSize=${e.size}&mimeType=${e.mimeType}`:t}function J(e,t){const{sticker:n,video:r,audio:o,voice:a}=e.content,u=r||V(e);return n&&"inline"===t&&n.isAnimated?d.IU.Lottie:u&&k.I_&&("viewerFull"===t||"inline"===t)?d.IU.Progressive:o||a?a&&!k.m5?d.IU.BlobUrl:d.IU.Progressive:d.IU.BlobUrl}function q(e){const{photo:t,video:n,document:r}=e.content,o=H(e),d=V(e);if(t||o)return`photo${e.date}.jpeg`;const{fileName:a}=n||d||r||{};return a}function Y(e){const{video:t,document:n}=e.content,r=V(e),{size:o}=t||r||n||{};return o}function X(e){const{photo:t,video:n,document:r}=e.content;return t&&t.blobUrl||n&&n.blobUrl||r&&r.previewBlobUrl}function ee(e,t,n=!1){const r=de(e,t,n?"media":"inlineMedia");return n?r.reverse():r}function te(e){return e.sizes.find((e=>"z"===e.type))||e.sizes.find((e=>"y"===e.type))||ne(e)}function ne(e){return e.sizes.find((e=>"x"===e.type))||e.sizes.find((e=>"m"===e.type))||e.sizes.find((e=>"s"===e.type))||e.thumbnail}function re(e){if(e.width&&e.height)return e}function oe(e,t,n=!1){const r=M(e);return{isUploading:r,isTransferring:r||n,transferProgress:Number(t)}}function de(e,t,n){let r;switch(n){case"media":r=e=>{const t=O(e);return D(e)||t&&!t.isRound&&!t.isGif};break;case"documents":r=F;break;case"links":r=e=>W(e)||function(e){const{text:t}=e.content,n=t&&t.text.match(i);if(n)return{url:n[0],domain:n[3]}}(e);break;case"audio":r=_;break;case"inlineMedia":r=e=>{const t=O(e);return D(e)||t&&!t.isRound&&!t.isGif||U(e)||$(e)};break;default:return[]}return t.reduce(((t,n)=>(e[n]&&r(e[n])&&t.push(n),t)),[])}function ae(e){const{audio:t,voice:n,video:r}=R(e),o=t||n||r||V(e);if(o)return o.duration}function ue(e,t){return`${e}_${t}`}const se={missing_payment_information:{field:"cardNumber",message:"Incorrect card number"},invalid_number:{field:"cardNumber",message:"Incorrect card number"},number:{field:"cardNumber",message:"Incorrect card number"},exp_year:{field:"expiry",message:"Incorrect year"},exp_month:{field:"expiry",message:"Incorrect month"},invalid_expiry_year:{field:"expiry",message:"Incorrect year"},invalid_expiry_month:{field:"expiry",message:"Incorrect month"},cvc:{field:"cvv",message:"Incorrect CVV"},invalid_cvc:{field:"cvv",message:"Incorrect CVV"}};function ie(e){const{message:t,code:n,param:r}=e,{field:o,message:d}=r?se[r]:se[n];return{field:o,message:d,description:t}}},5527:(e,t,n)=>{n.d(t,{Vl:()=>s,Js:()=>i,Tq:()=>c,kM:()=>l,NB:()=>f,cS:()=>h,Z0:()=>m,Rs:()=>p});var r=n(3716),o=n(790),d=n(782),a=n(2267);const u=[1,8,5,2,7,4,6];function s(e){if(e)switch(e.type){case"userTypeBot":case"userTypeRegular":return e.firstName||e.lastName;case"userTypeDeleted":case"userTypeUnknown":return"Deleted";default:return}}function i(e){if(e){if(f(e))return"Deleted account";switch(e.type){case"userTypeBot":case"userTypeRegular":if(e.firstName&&e.lastName)return`${e.firstName} ${e.lastName}`;if(e.firstName)return e.firstName;if(e.lastName)return e.lastName;break;case"userTypeDeleted":case"userTypeUnknown":return"Deleted account"}}}function c(e,t,n){if(t.id===r.aw)return e("ServiceNotifications").toLowerCase();if(t.type&&"userTypeBot"===t.type)return e("Bot");if(!t.status)return"";switch(t.status.type){case"userStatusEmpty":return e("ALongTimeAgo");case"userStatusLastMonth":return e("WithinAMonth");case"userStatusLastWeek":return e("WithinAWeek");case"userStatusOffline":{const{wasOnline:r}=t.status;if(!r)return e("LastSeen.Offline");const d=new Date((new Date).getTime()+1e3*n),a=new Date(1e3*r);if(a>=d)return e("LastSeen.JustNow");const u=new Date(d.getTime()-a.getTime());if(u.getTime()/1e3<60)return e("LastSeen.JustNow");if(u.getTime()/1e3<3600)return e("LastSeen.MinutesAgo",Math.floor(u.getTime()/1e3/60));const s=new Date;if(s.setHours(0,0,0,0),a>new Date(s.getTime()+1e3*n))return u.getTime()/1e3<21600?e("LastSeen.HoursAgo",Math.floor(u.getTime()/1e3/60/60)):e("LastSeen.TodayAt",(0,o.mr)(a));const i=new Date;return i.setDate(d.getDate()-1),i.setHours(0,0,0,0),a>new Date(i.getTime()+1e3*n)?e("LastSeen.YesterdayAt",(0,o.mr)(a)):e("LastSeen.AtDate",(0,o.Tu)(e,a))}case"userStatusOnline":return e("Online");case"userStatusRecently":return e("Lately");default:return}}function l(e){const{id:t,status:n,type:o}=e;return!!n&&t!==r.aw&&"userStatusOnline"===n.type&&"userTypeBot"!==o}function f(e){return!(!e.status||"userTypeBot"===e.type||e.id===r.aw||"userTypeDeleted"!==e.type&&"userTypeUnknown"!==e.type)}function h(e){return"userTypeBot"===e.type}function m(e,t,n,r=0){return(0,d.Xo)(e,(e=>{const o=(0,a.b)(r);if(n&&n.includes(e))return o+172800-(n.length-n.indexOf(e));const d=t[e];if(!d||!d.status)return 0;if("userStatusOnline"===d.status.type)return d.status.expires;if("userStatusOffline"===d.status.type&&d.status.wasOnline)return d.status.wasOnline;switch(d.status.type){case"userStatusRecently":return o-86400;case"userStatusLastWeek":return o-604800;case"userStatusLastMonth":return o-18144e3;default:return 0}}),"desc")}function p(e){const t=e?Math.abs(e.id)%7:0;return u[t]}},1752:(e,t,n)=>{n.d(t,{O4:()=>Pe,c_:()=>I,fZ:()=>l,m6:()=>w,aK:()=>Se,aJ:()=>Ce,Sh:()=>Y,$S:()=>k,bp:()=>xe,WY:()=>Ze,K4:()=>E,bV:()=>P,h8:()=>ee,M6:()=>Z,i9:()=>B,vy:()=>H,rB:()=>Me,g_:()=>j,Mg:()=>d,SL:()=>u,Pb:()=>fe,w3:()=>D,BI:()=>we,lr:()=>Ie,pf:()=>v,s5:()=>K,y9:()=>N,nA:()=>Re,_7:()=>De,Q$:()=>Ne,Dq:()=>Oe,vT:()=>ke,QH:()=>Le,Ob:()=>_,a4:()=>i,B1:()=>a,vv:()=>h,Pi:()=>f,cY:()=>C,GL:()=>c,Wy:()=>g,wV:()=>x,cq:()=>O,rq:()=>G,No:()=>de,Og:()=>ae,xv:()=>se,px:()=>ue,xj:()=>M,c1:()=>ge,z5:()=>pe,qr:()=>le,dx:()=>he,fw:()=>ve,H9:()=>be,HN:()=>Ee,ff:()=>A,P4:()=>S,x1:()=>X,TM:()=>Te,Rg:()=>$,z3:()=>U,IM:()=>W,Xg:()=>R,j6:()=>L,lG:()=>F,IE:()=>Ae,Nq:()=>J,Lm:()=>te,Q3:()=>ne,eD:()=>q});var r=n(3716),o=n(782);function d(e,t,n){return{...e,chats:{...e.chats,listIds:{...e.chats.listIds,[t]:n}}}}function a(e,t,n){const{[t]:r}=e.chats.listIds,o=r&&r.length?n.filter((e=>!r.includes(e))):n;return r&&!o.length?e:d(e,t,[...r||[],...o])}function u(e,t){return{...e,chats:{...e.chats,byId:t}}}function s(e,t,n,r){const{byId:d}=e.chats,a=d[t],u=n.isMin&&a&&!a.isMin,s={...a,...u?(0,o.CE)(n,["isMin","accessHash"]):n,...r&&{photos:[r,...a.photos||[]]}};return s.id&&s.type,s}function i(e,t,n,r){const{byId:o}=e.chats;return u(e,{...o,[t]:s(e,t,n,r)})}function c(e,t){const n=Object.keys(t).map(Number).reduce(((n,r)=>{const o=s(e,r,t[r]);return o&&(n[r]=o),n}),{});return e=u(e,{...e.chats.byId,...n})}function l(e,t){const{byId:n}=e.chats;let r=!1;const o=Object.keys(t).map(Number).reduce(((o,d)=>{if(!n[d]||n[d].isMin&&!t[d].isMin){const n=s(e,d,t[d]);n&&(o[d]=n,r||(r=!0))}return o}),{});return r&&(e=u(e,{...e.chats.byId,...o})),e}function f(e,t,n){const o=n===r.WS?"archived":"active";let d=e.chats.listIds;return Object.keys(d).forEach((e=>{const n=d[e]||[];e!==o||n.includes(t)?e!==o&&n.includes(t)&&(d={...d,[e]:n.filter((e=>e!==t))}):d={...d,[e]:[...n,t]}})),i(e={...e,chats:{...e.chats,listIds:d}},t,{folderId:n||void 0})}function h(e,t,n){const r="active"===t?"all":"archived";return{...e,chats:{...e.chats,...n.orderedPinnedIds&&{orderedPinnedIds:{...e.chats.orderedPinnedIds,[t]:n.orderedPinnedIds}},totalCount:{...e.chats.totalCount,[r]:n.totalChatCount},isFullyLoaded:{...e.chats.isFullyLoaded,[t]:!1}}}}var m=n(6137),p=n(8085);function g(e,t,n=m._f,o="thread",d){const{messageLists:a}=e.messages;let u=a;if(d||r.Cg)u=t?[{chatId:t,threadId:n,type:o}]:[];else if(t){const e=a[a.length-1];e&&e.chatId===t&&e.threadId===n&&e.type===o||(u=e&&-1===e.chatId?[...a.slice(0,-1),{chatId:t,threadId:n,type:o}]:[...a,{chatId:t,threadId:n,type:o}])}else u=a.slice(0,-1);return{...e,messages:{...e.messages,messageLists:u}}}function y(e,t,n){return b(e,t,{byId:n})}function b(e,t,n){const r=e.messages.byChatId[t]||{byId:{},threadsById:{}};return{...e,messages:{...e.messages,byChatId:{...e.messages.byChatId,[t]:{...r,...n}}}}}function v(e,t,n,r,o){return function(e,t,n,r){const o=e.messages.byChatId[t];return b(e,t,{threadsById:{...o&&o.threadsById,[n]:{...o&&o.threadsById[n],...r}}})}(e,t,n,{[r]:o})}function w(e,t){const n=t.reduce(((e,t)=>(e[t.chatId]||(e[t.chatId]={}),e[t.chatId][t.id]=t,e)),{});return Object.keys(n).map(Number).forEach((t=>{e=I(e,t,n[t])})),e}function I(e,t,n){const r=(0,p.Zw)(e,t);return r&&Object.keys(n).every((e=>Boolean(r[Number(e)])))?e:y(e,t,{...n,...r})}function C(e,t,n,r){const o=(0,p.Zw)(e,t)||{},d={...o[n],...r};return d.id?y(e,t,{...o,[n]:d}):e}function S(e,t,n,r){const o=(0,p.Fn)(e,t)||{},d={...o[n],...r};return d.id?D(e,t,{...o,[n]:d},void 0):e}function E(e,t,n){const r=(0,p.Zw)(e,t);if(!r)return e;const d=(0,o.CE)(r,n),a=Object.values((0,o.q0)(r,n)).filter((({forwardInfo:e})=>e&&e.isLinkedChannelPost));if(Object.keys(e.messages.byChatId[t].threadsById).map(Number).forEach((r=>{const o=(0,p.tZ)(e,t,r);let d=(0,p.gb)(e,t,r),a=(0,p.qC)(e,t,r),u=(0,p.Cb)(e,t,r),s=(0,p.KB)(e,t),i=o?o.messagesCount:void 0;n.forEach((e=>{d&&d.includes(e)&&(d=d.filter((t=>t!==e)),void 0!==i&&(i-=1)),a&&a.includes(e)&&(a=a.filter((t=>t!==e))),u&&u.includes(e)&&(u=u.filter((t=>t!==e))),s&&s.includes(e)&&(s=s.filter((t=>t!==e)))})),e=v(e,t,r,"listedIds",d),e=v(e,t,r,"outlyingIds",a),e=v(e,t,r,"viewportIds",u),e=v(e,t,r,"pinnedIds",s),o&&void 0!==i&&(e=v(e,t,r,"threadInfo",{...o,messagesCount:i}))})),a.length){const n=(0,p.Bt)(e),r=n&&n.chatId===t&&"thread"===n.type,o=n&&n.threadId;a.forEach((n=>{const{fromChatId:d,fromMessageId:a}=n.forwardInfo,u=(0,p.hj)(e,d,a);r&&o===a&&(e=g(e,t)),u&&(e=C(e,d,a,{threadInfo:void 0}))}))}return e=y(e,t,d)}function P(e,t,n){const r=(0,p.Fn)(e,t);if(!r)return e;const d=(0,o.CE)(r,n);let a=(0,p.qy)(e,t);return a&&(n.forEach((e=>{a.includes(e)&&(a=a.filter((t=>t!==e)))})),e=v(e,t,m._f,"scheduledIds",a)),D(e,t,d,void 0)}function M(e,t,n,r){const o=(0,p.gb)(e,t,n),d=o&&o.length?r.filter((e=>!o.includes(e))):r;return o&&!d.length?e:v(e,t,n,"listedIds",T([...o||[],...d]))}function A(e,t,n,r){const o=(0,p.qC)(e,t,n),d=o&&o.length?r.filter((e=>!o.includes(e))):r;return o&&!d.length?e:v(e,t,n,"outlyingIds",T([...o||[],...d]))}function T(e){return e.sort(((e,t)=>e-t))}function k(e,t,n,o){const d=(0,p.Cb)(e,t,n)||[];return d.includes(o)?e:v(e,t,n,"viewportIds",T([...d.length{e=R(e,t.chatId,t.threadId,t)})),e}function D(e,t,n,r){return function(e,t,n){const r=e.scheduledMessages.byChatId[t]||{byId:{},hash:0};return{...e,scheduledMessages:{byChatId:{...e.scheduledMessages.byChatId,[t]:{...r,...n}}}}}(e,t,{byId:n,hash:r})}function O(e,t,n,r=!1,o=!1){return{...e,focusedMessage:{...e.focusedMessage,chatId:t,messageId:n,noHighlight:r,isResizingContainer:o}}}function x(e,t){return{...e,focusedMessage:{...e.focusedMessage,direction:t}}}function Z(e,t,n){return{...e,selectedMessages:{chatId:t,messageIds:n?Array.prototype.concat([],n):[]}}}function _(e,t,n,r,d,a,u,s=!1){const{selectedMessages:i}=e;a&&(u=(0,p.xH)(e,t,a));const c=u||[d];if(!i)return Z(e,t,c);const{messageIds:l}=i;let f;const h=c.filter((e=>!l.includes(e)));if(h&&!h.length)f=l.filter((e=>!c.includes(e)));else if(s&&l.length){const a=(0,p.$W)(e,t,n,r),u=a.indexOf(l[l.length-1]),s=a.indexOf(d),i=Math.min(u,s),c=Math.max(u,s),h=a.slice(i,c+1);f=(0,o.Tw)([...l,...h])}else f=[...l,...h];return f.length?{...e,selectedMessages:{...i,messageIds:f}}:B(e)}function B(e){return{...e,selectedMessages:void 0}}function F(e,t,n,r,o){const{channelPostId:d,fromChatId:a}=t.forwardInfo||{};if(d&&a){const t=(0,p.tZ)(e,n,d);t&&(e=v(e,n,d,"threadInfo",{...t,lastMessageId:r,messagesCount:t.messagesCount+(o?-1:1)}))}return e}function U(e,t,n,r,d){const a=r.map((t=>{const n=e.stickers.setsById[t.id];return n?{...n,...t}:t}));return{...e,stickers:{...e.stickers,setsById:{...e.stickers.setsById,...(0,o.ee)(a,"id")},[t]:{...e.stickers[t],hash:n,..."search"===t?{resultIds:d}:{setIds:r.map((({id:e})=>e))}}}}}function $(e,t,n){const r=e.stickers.setsById[t]||{};return{...e,stickers:{...e.stickers,setsById:{...e.stickers.setsById,[t]:{...r,...n}}}}}function G(e,t,n,r){const{results:o}=e.gifs.search;let d;if(t||!o)d=n;else{const e=new Set(o.map((e=>e.id)));d=[...o,...n.filter((t=>!e.has(t.id)))]}return{...e,gifs:{...e.gifs,search:{...e.gifs.search,offset:r,results:d}}}}function j(e,t){return{...e,animatedEmojis:t}}function W(e,t,n,r){const d=[...(0,p.Pk)(e,t),...n||[]],a=(0,o.Tw)(d.map((({id:e})=>e))),u=(0,o.ee)(d,"id"),s=a.map((e=>u[e]));return{...e,stickers:{...e.stickers,forEmoji:{emoji:t,stickers:s,hash:r}}}}function H(e){const{emoji:t,stickers:n,hash:r}=e.stickers.forEmoji||{};return t?W(e,t,n,r):e}var V=n(735);function K(e,t){return{...e,users:{...e.users,byId:t}}}function z(e,t,n){const{byId:r}=e.users,d=r[t],a=n.isMin&&d&&!d.isMin,u={...d,...a?(0,o.CE)(n,["isMin","accessHash"]):n};return u.id&&u.type?u:d}function Q(e,t){const{hash:n,userIds:r}=e.contactList||{};if(!r)return e;const o=t.filter((e=>e&&e.isContact&&!r.includes(e.id))).map((e=>e.id));return 0===o.length?e:{...e,contactList:{hash:n||0,userIds:[...o,...r]}}}function J(e,t,n){const{byId:r}=e.users,o=z(e,t,n);return K(e=Q(e,[o]),{...r,[t]:o})}function q(e,t){const n=Object.keys(t).map(Number).reduce(((n,r)=>{const o=z(e,r,t[r]);return o&&(n[r]=o),n}),{});return e=K(e=Q(e,Object.values(n)),{...e.users.byId,...n})}function Y(e,t){const{byId:n}=e.users;let r=!1;const o=Object.keys(t).map(Number).reduce(((o,d)=>{if(!n[d]||n[d].isMin&&!t[d].isMin){const n=z(e,d,t[d]);n&&(o[d]=n,r||(r=!0))}return o}),{});return r&&(e=Q(e=K(e,{...e.users.byId,...o}),Object.values(o))),e}function X(e,t){return e.users.selectedId===t?e:{...e,users:{...e.users,selectedId:t}}}function ee(e,t){const{byId:n}=e.users,{hash:r,userIds:o}=e.contactList||{};return delete n[t],K(e={...e,contactList:{hash:r||0,userIds:o?o.filter((e=>e!==t)):V.D}},n)}function te(e,t){return{...e,userSearch:{...e.userSearch,...t}}}function ne(e,t){return te(e,{fetchingStatus:t})}function re(e,t,n){const{byId:r}=e.users,o=r[t];return o&&o.fullInfo?J(e,t,{...o,fullInfo:{...o.fullInfo,isBlocked:n}}):e}const oe=e=>`${e.chatId}_${e.id}`;function de(e,t){return{...e,globalSearch:{...e.globalSearch,...t}}}function ae(e,t){return de(e,{currentContent:t})}function ue(e,t,n,r,d){const{resultsByType:a}=e.globalSearch||{},u=t.reduce(((e,t)=>(e[oe(t)]=t,e)),{}),s=a&&a[r]?a[r].foundIds:void 0;if(void 0!==s&&Object.keys(u).every((e=>s.includes(oe(u[e])))))return se(e,{messages:!1});const i=s||[],c=t.map((e=>oe(e))),l=Array.prototype.concat(i,c),f=(0,o.et)(i,l)?i:l;return de(e=se(e,{messages:!1}),{resultsByType:{...(e.globalSearch||{}).resultsByType,[r]:{totalCount:n,nextOffsetId:d,foundIds:f}}})}function se(e,t){return de(e,{fetchingStatus:{...e.globalSearch.fetchingStatus,...t}})}var ie=n(2858);function ce(e,t,n){return{...e,localTextSearch:{byChatThreadKey:{...e.localTextSearch.byChatThreadKey,[t]:n}}}}function le(e,t,n,r,o){const d=(0,ie.uw)(t,n);return ce(e,d,{...e.localTextSearch.byChatThreadKey[d],isActive:r,query:o})}function fe(e,t,n,r,o,d){const a=(0,ie.uw)(t,n);return ce(e,a,{...e.localTextSearch.byChatThreadKey[a],results:{foundIds:r,totalCount:o,nextOffsetId:d}})}function he(e,t,n,r,d,a){const u=(0,ie.uw)(t,n),{results:s}=e.localTextSearch.byChatThreadKey[u]||{},i=s&&s.foundIds||[],c=ye((0,o.Tw)(Array.prototype.concat(i,r)));return fe(e,t,n,(0,o.et)(i,c)?i:c,d,a)}function me(e,t,n){return{...e,localMediaSearch:{byChatId:{...e.localMediaSearch.byChatId,[t]:n}}}}function pe(e,t,n){return me(e,t,{...e.localMediaSearch.byChatId[t],currentType:n})}function ge(e,t,n,r,d,a){const{resultsByType:u}=e.localMediaSearch.byChatId[t]||{},s=u&&u[n]?u[n].foundIds:[],i=ye((0,o.Tw)(Array.prototype.concat(s,r)));return function(e,t,n,r,o,d){return me(e,t,{...e.localMediaSearch.byChatId[t],resultsByType:{...(e.localMediaSearch.byChatId[t]||{}).resultsByType,[n]:{foundIds:r,totalCount:o,nextOffsetId:d}}})}(e,t,n,(0,o.et)(s,i)?s:i,d,a)}function ye(e){return e.sort(((e,t)=>e-t))}function be(e,t){return{...e,management:{...e.management,progress:t}}}function ve(e,t,n){return{...e,management:{...e.management,byChatId:{...e.management.byChatId,[t]:{...e.management.byChatId[t]||{},...n}}}}}function we(e,t){return{...e,settings:{...e.settings,byKey:{...e.settings.byKey,...t}}}}function Ie(e,t,n){return{...e,settings:{...e.settings,themes:{...e.settings.themes,[t]:{...e.settings.themes[t]||{},...n}}}}}function Ce(e,t){return t.forEach((t=>{const{chatId:n,...r}=t;e=Se(e,n,r)})),e}function Se(e,t,n){return{...e,settings:{...e.settings,notifyExceptions:{...e.settings.notifyExceptions,[t]:n}}}}function Ee(e,t,n,r){switch(t){case"contact":return we(e,{...void 0!==n&&{hasPrivateChatsNotifications:!n},...void 0!==r&&{hasPrivateChatsMessagePreview:r}});case"group":return we(e,{...void 0!==n&&{hasGroupNotifications:!n},...void 0!==r&&{hasGroupMessagePreview:r}});case"broadcast":return we(e,{...void 0!==n&&{hasBroadcastNotifications:!n},...void 0!==r&&{hasBroadcastMessagePreview:r}});default:return}}function Pe(e,t){return e=re(e,t,!0),{...e,blocked:{...e.blocked,ids:[t,...e.blocked.ids],totalCount:e.blocked.totalCount+1}}}function Me(e,t){return e=re(e,t,!1),{...e,blocked:{...e.blocked,ids:e.blocked.ids.filter((e=>e!==t)),totalCount:e.blocked.totalCount-1}}}function Ae(e,t){return{...e,twoFaSettings:{...e.twoFaSettings,...t}}}function Te(e,t){return{...e,payment:{...e.payment,shippingOptions:t}}}function ke(e,t){return{...e,payment:{...e.payment,requestId:t}}}function Ne(e,t){return{...e,payment:{...e.payment,step:t}}}function Re(e,t){if(!t.content||!t.content.invoice)return e;const{title:n,text:r,amount:o,currency:d,isTest:a,photoUrl:u}=t.content.invoice;return{...e,payment:{...e.payment,invoiceContent:{title:n,text:r,photoUrl:u,amount:o,currency:d,isTest:a}}}}function Le(e,t){return{...e,payment:{...e.payment,stripeCredentials:{...t}}}}function De(e,t){return{...e,payment:{...e.payment,...t}}}function Oe(e,t,n){if(!t||!n)return{...e,payment:{...e.payment,receipt:void 0}};const{invoice:r}=n.content,{photoUrl:o,text:d,title:a}=r||{};return{...e,payment:{...e.payment,receipt:{...t,photoUrl:o,text:d,title:a}}}}function xe(e){return{...e,payment:{}}}function Ze(e){return{...e,payment:{...e.payment,isPaymentModalOpen:!1}}}},8085:(e,t,n)=>{n.d(t,{hg:()=>oe,_k:()=>pe,zB:()=>D,g4:()=>w,xl:()=>ge,nB:()=>ye,Z1:()=>f,IK:()=>b,DI:()=>P,Mw:()=>S,Ek:()=>C,hj:()=>ae,ZB:()=>ie,Zw:()=>_,YK:()=>y,Dg:()=>h,X5:()=>Ce,A1:()=>M,jr:()=>Z,yN:()=>k,JX:()=>Ge,pP:()=>_e,we:()=>xe,og:()=>Oe,$W:()=>G,Bt:()=>x,y5:()=>T,n5:()=>De,Ms:()=>J,_$:()=>z,kK:()=>se,wU:()=>Q,yZ:()=>X,It:()=>we,G$:()=>ce,y8:()=>Pe,cv:()=>me,pk:()=>v,N:()=>I,ep:()=>E,xo:()=>p,FM:()=>m,a6:()=>Ae,Ev:()=>Ie,CA:()=>Se,zQ:()=>Be,_X:()=>le,vk:()=>Ee,Jf:()=>Ue,s4:()=>i,b9:()=>de,gb:()=>U,aW:()=>Ze,xH:()=>Me,FT:()=>ke,tV:()=>q,NJ:()=>l,dZ:()=>c,dT:()=>fe,qC:()=>$,gx:()=>je,eh:()=>He,Mz:()=>We,sp:()=>Ve,KB:()=>W,$$:()=>Ke,rd:()=>ve,p9:()=>ee,Yy:()=>K,Wq:()=>Fe,qy:()=>H,Tm:()=>ue,Fn:()=>B,Vt:()=>V,D7:()=>Te,Ur:()=>he,TD:()=>Ne,pv:()=>Re,yB:()=>Le,Ny:()=>N,E_:()=>R,Pk:()=>L,i3:()=>ze,P_:()=>g,Pu:()=>$e,Db:()=>re,tZ:()=>Y,Cm:()=>te,qS:()=>ne,uZ:()=>be,dy:()=>s,Cb:()=>j});var r=n(1713),o=n(7361),d=n(6137),a=n(3716),u=n(2858);function s(e,t){return e.users.byId[t]}function i(e,t){const n=s(e,t);return n&&n.fullInfo&&n.fullInfo.isBlocked}function c(e){return e.settings.byKey}function l(e){return e.settings.notifyExceptions}function f(e,t){return e.chats.byId[t]}function h(e,t){const n=(0,u.zX)(t);return!!n&&s(e,n)}function m(e,t){return t===e.currentUserId}function p(e,t){const n=h(e,t);return n&&(0,u.cS)(n)}function g(e){return Object.values(e.chats.byId).find((({isSupport:e})=>e))}function y(e,t){if(!(0,u.YA)(t.id)&&!(0,u.eA)(t)&&t.fullInfo)return t.fullInfo.members&&t.fullInfo.members.length!==a.mo?t.fullInfo.members.reduce(((t,{userId:n})=>e.users.byId[n]&&(0,u.kM)(e.users.byId[n])&&n!==e.currentUserId?t+1:t),0):t.fullInfo.onlineCount}function b(e,t){const n=f(e,t),r=n&&(0,u.zX)(n),o=r&&s(e,r);if(o&&(0,u.cS)(o))return o}function v(e,t){const n=f(e,t),r=b(e,t);if(!n||!r)return!1;if(n.lastMessage&&(0,u.CD)(n.lastMessage))return!0;const o=e.messages.byChatId[t];if(!o)return!1;const{listedIds:a}=o.threadsById[d._f]||{};return a&&!a.length}function w(e){return Boolean(e.chats.listIds.active)}function I(e,t,n){const{listIds:r}=e.chats;if(n){const e=r[n];return Boolean(e&&e.includes(t))}return Object.values(r).some((e=>e&&e.includes(t)))}function C(e,t){const n=f(e,t);if(n&&I(e,t))return n.folderId===a.WS?"archived":"active"}function S(e,t){return e.chatFolders.byId[t]}function E(e,t,n=a.Nf){const{active:r,archived:o}=e.chats.orderedPinnedIds;if(n===a.Nf)return!!r&&r.includes(t);if(n===a.WS)return!!o&&o.includes(t);const{byId:d}=e.chatFolders,{pinnedChatIds:u}=d[n]||{};return!!u&&u.includes(t)}function P(e,t){const n=t.toLowerCase();return Object.values(e.chats.byId).find((e=>e.username&&e.username.toLowerCase()===n))}function M(e){const t=e.chats.listIds.active;if(!t)return 0;const n=e.chats.byId,r=c(e),o=l(e);return t.reduce(((e,t)=>{const d=n[t];return!(d&&d.unreadCount&&d.isListed)||d.isNotJoined||d.isRestricted||!d.unreadMentionsCount&&(0,u.i4)(d,r,o)?e:e+d.unreadCount}),0)}var A=n(782);function T(e){return e.stickers.search}function k(e){return e.gifs.search}function N(e,t){return e.stickers.setsById[t]}function R(e,t){return Object.values(e.stickers.setsById).find((e=>e.shortName.toLowerCase()===t.toLowerCase()))}function L(e,t){const n=Object.values(e.stickers.setsById);let r=[];return n.forEach((({packs:e})=>{if(!e)return;const n=e[t];n&&(r=r.concat(n))})),r}function D(e,t){const{animatedEmojis:n}=e;if(!n||!n.stickers)return;const r=t.replace("️","");return n.stickers.find((e=>e.emoji===t||e.emoji===r))}var O=n(2267);function x(e){const{messageLists:t}=e.messages;if(t.length)return t[t.length-1]}function Z(e){const{chatId:t}=x(e)||{};return t?f(e,t):void 0}function _(e,t){const n=e.messages.byChatId[t];return n?n.byId:void 0}function B(e,t){const n=e.scheduledMessages.byChatId[t];return n?n.byId:void 0}function F(e,t,n,r){const o=e.messages.byChatId[t];if(!o)return;const d=o.threadsById[n];return d?d[r]:void 0}function U(e,t,n){return F(e,t,n,"listedIds")}function $(e,t,n){return F(e,t,n,"outlyingIds")}function G(e,t,n,r){switch(r){case"thread":return j(e,t,n);case"pinned":return W(e,t);case"scheduled":return H(e,t)}}function j(e,t,n){return F(e,t,n,"viewportIds")}function W(e,t){return F(e,t,d._f,"pinnedIds")}function H(e,t){return F(e,t,d._f,"scheduledIds")}function V(e,t,n){return F(e,t,n,"scrollOffset")}function K(e,t,n){return F(e,t,n,"replyingToId")}function z(e,t,n){return F(e,t,n,"editingId")}function Q(e,t){return F(e,t,d._f,"editingScheduledId")}function J(e,t,n){return F(e,t,n,"draft")}function q(e,t,n){return F(e,t,n,"noWebPage")}function Y(e,t,n){return F(e,t,n,"threadInfo")}function X(e,t,n){return F(e,t,n,"firstMessageId")}function ee(e,t,n){return F(e,t,n,"replyStack")}function te(e,t,n){if(n===d._f)return f(e,t);const r=Y(e,t,n);return r?f(e,r.originChannelId||t):void 0}function ne(e,t,n){if(n===d._f)return;const r=Y(e,t,n);return r?r.topMessageId:void 0}function re(e,t,n){const r=e.messages.byChatId[t];if(!r)return;const{replyToMessageId:o,replyToTopMessageId:d}=n;return o||d?Object.values(r.threadsById).find((e=>e.threadInfo&&(o&&o===e.threadInfo.topMessageId||d&&d===e.threadInfo.topMessageId))):void 0}function oe(e,t,n){const r=x(e);if(!r)return!1;const{threadInfo:o}=re(e,t,n)||{};return t===r.chatId&&(r.threadId===d._f||o&&r.threadId===o.threadId)}function de(e,t,n){const r=j(e,t,n);if(!r||!r.length)return!0;let o;if(n===d._f){const n=f(e,t);if(!n||!n.lastMessage)return!0;o=n.lastMessage.id}else{const r=Y(e,t,n);if(!r||!r.lastMessageId)return;o=r.lastMessageId}return o>=a.AE&&!ae(e,t,o)||r[r.length-1]>=o}function ae(e,t,n){const r=_(e,t);return r?r[n]:void 0}function ue(e,t,n){const r=B(e,t);return r?r[n]:void 0}function se(e,t,n,r){if("scheduled"===r){const n=Q(e,t);return n?ue(e,t,n):void 0}{const r=z(e,t,n);return r?ae(e,t,r):void 0}}function ie(e,t){let n;for(const r of Object.values(e.messages.byChatId)){const{byId:e}=r;if(n=Object.values(e).find((e=>e.content.poll&&e.content.poll.id===t)),n)break}return n}function ce(e,t){const{chatId:n,messageId:r}=e.focusedMessage||{};return n===t?r:void 0}function le(e,t){const n=ce(e,t.chatId);return!!n&&(n===t.id||n===t.previousLocalId)}function fe(e,t,n=!1){return function(e,t){const{lastReadOutboxMessageId:n}=f(e,t.chatId)||{};return(0,u.CI)(t)||!n||n0?s(e,n):f(e,n)}function me(e,t){const{forwardInfo:n}=t;if(n)return n.isChannelPost&&n.fromChatId?f(e,n.fromChatId):n.senderUserId?s(e,n.senderUserId):void 0}function pe(e,t,n){const r=f(e,t.chatId);if(!r||r.isRestricted)return{};const o=(0,u.YA)(r.id),d=m(e,t.chatId),a=(0,u.G9)(r),s=(0,u.ZV)(r),i=(0,u.eA)(r),c=(0,u.jM)(t),l=(0,u.B4)(t),h=(0,u.Lo)(t),{content:p}=t,g=(d||s&&(0,u.VE)(r,"pinMessages")||i&&(0,u.VE)(r,"editMessages")||(0,O.b)(e.serverTimeOffset)-t.date<172800)&&!(p.sticker||p.contact||p.poll||p.action||p.audio||p.video&&p.video.isRound)&&!(0,u.MF)(t)&&!t.viaBotId,y=(0,u.Qm)(r,n)&&!c,b=o||r.isCreator||!i&&!(0,u.Mg)(r,"pinMessages")||(0,u.VE)(r,"pinMessages");let v=!h&&b,w=!1;const I=W(e,r.id);v&&(w=Boolean(I&&I.includes(t.id)),v=!w);const C=o||l||a||r.isCreator||(0,u.VE)(r,"deleteMessages"),S=!o&&!l,E=C&&!c&&(o&&!d||a&&(l||(0,u.VE)(r,"deleteMessages")||r.isCreator)),P=!h&&g&&(l||i&&(r.isCreator||(0,u.VE)(r,"editMessages"))),M=!h&&!c,A=Boolean(t.content.sticker),T=A&&function(e,t){const{stickers:n}=e.stickers.favorite;return n&&n.some((({id:e})=>e===t.id))}(e,t.content.sticker),k=!h&&A&&!T,N=!h&&T,R=!h,L=!h&&(i||s),D=!h;return{noOptions:[y,P,v,w,C,E,M,k,N,R,L,D].every((e=>!e)),canReply:y,canEdit:P,canPin:v,canUnpin:w,canDelete:C,canReport:S,canDeleteForAll:E,canForward:M,canFaveSticker:k,canUnfaveSticker:N,canCopy:R,canCopyLink:L,canSelect:D}}function ge(e){const{messageIds:t}=e.selectedMessages||{},{chatId:n,threadId:r}=x(e)||{},o=n&&_(e,n);if(!o||!t||!r)return{};const d=t.map((t=>o[t]&&pe(e,o[t],r))).filter(Boolean);return{canDelete:d.every((e=>e.canDelete)),canDeleteForAll:d.every((e=>e.canDeleteForAll))}}function ye(e){const{messageIds:t}=e.selectedMessages||{},{chatId:n,threadId:r}=x(e)||{},o=n&&_(e,n);return!!(o&&t&&r)&&t.map((t=>o[t]&&pe(e,o[t],r))).filter(Boolean).every((e=>e.canReport))}function be(e,t){const n=e.fileUploads.byMessageLocalId[t.previousLocalId||t.id];return n?n.progress:void 0}function ve(e,t,n){if(n===d._f){const n=f(e,t);if(!n)return;if(!n.lastReadInboxMessageId)return;return n.lastMessage?(0,u.CI)(n.lastMessage)?n.lastMessage.id:Math.min(n.lastMessage.id,n.lastReadInboxMessageId):n.lastReadInboxMessageId}{const r=Y(e,t,n);if(!r)return;return r.lastReadInboxMessageId?Math.min(r.lastReadInboxMessageId,r.lastMessageId||1/0):r.topMessageId}}function we(e,t,n){const r=f(e,t);if(n===d._f){if(!r)return}else{const r=Y(e,t,n);if(!r||r.lastMessageId===r.lastReadInboxMessageId)return}const o=$(e,t,n),a=U(e,t,n),u=_(e,t);if(!u||!o&&!a)return;const s=ve(e,t,n);if(s||!r||!r.isNotJoined){if(o){const e=s?o.find((e=>e>s&&u[e]&&(!u[e].isOutgoing||u[e].isFromScheduled))):o[0];if(e)return e}if(a){const e=s?a.find((e=>e>s&&u[e]&&(!u[e].isOutgoing||u[e].isFromScheduled))):a[0];if(e)return e}}}function Ie(e){const{forwardMessages:t}=e;return Boolean(t.isModalShown)}function Ce(e,t){const n=Object.values(e.chats.byId).find((e=>(0,u.Ru)(e)&&e.lastMessage&&e.lastMessage.id===t));if(n)return n.id;const{byChatId:r}=e.messages;return Number(Object.keys(r).find((n=>{const o=f(e,Number(n));return o&&(0,u.Ru)(o)&&r[o.id].byId[t]})))}function Se(e){const{selectedMessages:t}=e;return Boolean(t)}function Ee(e,t){const{messageIds:n}=e.selectedMessages||{};return!!n&&n.includes(t)}function Pe(e,t,n){const r=_(e,t);if(r)return Object.values(r).filter((e=>e.groupedId===n&&e.forwardInfo)).map((({forwardInfo:e})=>e.fromMessageId))}function Me(e,t,n){const r=_(e,t);if(r)return Object.keys(r).map(Number).filter((e=>r[e].groupedId===n))}function Ae(e,t,n){const{messageIds:r}=e.selectedMessages||{};if(!r)return!1;const o=Me(e,t,n);return o&&o.every((e=>r.includes(e)))}function Te(e){const{messageIds:t}=e.selectedMessages||{};return t?t.length:0}function ke(e,t){const n=f(e,t);if(!n)return;if(!p(e,n))return;const r=_(e,t),o=j(e,t,d._f);if(!r||!o)return;const a=(0,A.dF)(o,(e=>!r[e].isOutgoing&&Boolean(r[e].keyboardButtons))),u=(0,A.dF)(o,(e=>Boolean(r[e].shouldHideKeyboardButtons)));return a&&u&&u>a?void 0:a?r[a]:void 0}function Ne(e,t,n,r){const{shouldAutoDownloadMediaFromContacts:o,shouldAutoDownloadMediaInPrivateChats:d,shouldAutoDownloadMediaInGroups:a,shouldAutoDownloadMediaInChannels:s}=e.settings.byKey;return Boolean(d&&(0,u.YA)(n.id)||a&&(0,u.Bf)(n)||s&&(0,u.eA)(n)||o&&r&&(r.id===e.currentUserId||function(e,t){return e.contactList&&e.contactList.userIds.includes(t.id)}(e,r)))}function Re(e,t){const n=(0,u.b7)(t)||(0,u.Cg)(t);if(!n)return;const{shouldAutoPlayVideos:r,shouldAutoPlayGifs:o}=e.settings.byKey,d=n.isGif||n.isRound;return r&&!d||o&&d}function Le(e){return e.settings.byKey.shouldLoopStickers}function De(e){const{chatId:t,threadId:n}=x(e)||{};if(!t||!n)return;const r=(0,u.uw)(t,n),o=e.localTextSearch.byChatThreadKey[r];return o&&o.isActive?o:void 0}function Oe(e){const{byChatId:t}=e.localMediaSearch,{chatId:n}=x(e)||{},r=e.users.selectedId;return r&&t[r]?r:n}function xe(e){const t=Oe(e);if(t)return e.localMediaSearch.byChatId[t]}function Ze(e,t){return e.management.byChatId[t]}function _e(e){const{chatId:t,threadId:n}=x(e)||{};if(!t||!n)return;if((0,u.YA)(t))return"user";const r=f(e,t);return r?(0,u.Bf)(r)?"group":"channel":void 0}function Be(e){const{mediaViewer:t}=e;return Boolean(t.messageId||t.avatarOwnerId)}function Fe(e){const{users:t,isChatInfoShown:n,newChatMembersProgress:d}=e,a=d!==r.WB.Closed,u=function(e){const{pollResults:t}=e;return Boolean(t.messageId)}(e),s=Boolean(!o.wB&&De(e)),i=function(e){const{chatId:t,threadId:n}=x(e)||{};if(!t||!n)return;const r=e.management.byChatId[t];return r&&r.isActive?r:void 0}(e),c=void 0!==T(e).query,l=void 0!==k(e).query,{chatId:f}=x(e)||{},h=t.selectedId,m=w(e),p=Boolean(h&&m),g=Boolean(f&&m)&&n;return u?r.qt.PollResults:s?r.qt.Search:i?r.qt.Management:c?r.qt.StickerSearch:l?r.qt.GifSearch:a?r.qt.AddingMembers:p?r.qt.UserInfo:g?r.qt.ChatInfo:void 0}function Ue(e){return void 0!==Fe(e)}function $e(e){const{theme:t,shouldUseSystemTheme:n}=e.settings.byKey;return n?(0,o.vn)():t}function Ge(e){return e.globalSearch.query}function je(e){return e.payment.chatId}function We(e){return e.payment.messageId}function He(e){return e.payment.formId}function Ve(e){return e.payment.requestId}function Ke(e){return e.payment.nativeParams?e.payment.nativeParams.publishableKey:void 0}function ze(e){return e.payment.stripeCredentials}},1713:(e,t,n)=>{let r,o,d,a,u,s,i,c,l,f,h,m,p;n.d(t,{Uq:()=>r,fo:()=>o,MT:()=>d,du:()=>a,nJ:()=>u,qt:()=>s,bZ:()=>i,Nh:()=>c,rN:()=>l,wv:()=>f,WB:()=>h,vi:()=>m,KB:()=>p,mp:()=>g,u1:()=>y}),function(e){e[e.Backwards=0]="Backwards",e[e.Forwards=1]="Forwards",e[e.Around=2]="Around"}(r||(r={})),function(e){e[e.Up=0]="Up",e[e.Down=1]="Down",e[e.Static=2]="Static"}(o||(o={})),function(e){e[e.Main=0]="Main",e[e.EditProfile=1]="EditProfile",e[e.Notifications=2]="Notifications",e[e.Language=3]="Language",e[e.General=4]="General",e[e.GeneralChatBackground=5]="GeneralChatBackground",e[e.GeneralChatBackgroundColor=6]="GeneralChatBackgroundColor",e[e.Privacy=7]="Privacy",e[e.PrivacyPhoneNumber=8]="PrivacyPhoneNumber",e[e.PrivacyLastSeen=9]="PrivacyLastSeen",e[e.PrivacyProfilePhoto=10]="PrivacyProfilePhoto",e[e.PrivacyForwarding=11]="PrivacyForwarding",e[e.PrivacyGroupChats=12]="PrivacyGroupChats",e[e.PrivacyPhoneNumberAllowedContacts=13]="PrivacyPhoneNumberAllowedContacts",e[e.PrivacyPhoneNumberDeniedContacts=14]="PrivacyPhoneNumberDeniedContacts",e[e.PrivacyLastSeenAllowedContacts=15]="PrivacyLastSeenAllowedContacts",e[e.PrivacyLastSeenDeniedContacts=16]="PrivacyLastSeenDeniedContacts",e[e.PrivacyProfilePhotoAllowedContacts=17]="PrivacyProfilePhotoAllowedContacts",e[e.PrivacyProfilePhotoDeniedContacts=18]="PrivacyProfilePhotoDeniedContacts",e[e.PrivacyForwardingAllowedContacts=19]="PrivacyForwardingAllowedContacts",e[e.PrivacyForwardingDeniedContacts=20]="PrivacyForwardingDeniedContacts",e[e.PrivacyGroupChatsAllowedContacts=21]="PrivacyGroupChatsAllowedContacts",e[e.PrivacyGroupChatsDeniedContacts=22]="PrivacyGroupChatsDeniedContacts",e[e.PrivacyActiveSessions=23]="PrivacyActiveSessions",e[e.PrivacyBlockedUsers=24]="PrivacyBlockedUsers",e[e.Folders=25]="Folders",e[e.FoldersCreateFolder=26]="FoldersCreateFolder",e[e.FoldersEditFolder=27]="FoldersEditFolder",e[e.FoldersEditFolderFromChatList=28]="FoldersEditFolderFromChatList",e[e.FoldersIncludedChats=29]="FoldersIncludedChats",e[e.FoldersIncludedChatsFromChatList=30]="FoldersIncludedChatsFromChatList",e[e.FoldersExcludedChats=31]="FoldersExcludedChats",e[e.FoldersExcludedChatsFromChatList=32]="FoldersExcludedChatsFromChatList",e[e.TwoFaDisabled=33]="TwoFaDisabled",e[e.TwoFaNewPassword=34]="TwoFaNewPassword",e[e.TwoFaNewPasswordConfirm=35]="TwoFaNewPasswordConfirm",e[e.TwoFaNewPasswordHint=36]="TwoFaNewPasswordHint",e[e.TwoFaNewPasswordEmail=37]="TwoFaNewPasswordEmail",e[e.TwoFaNewPasswordEmailCode=38]="TwoFaNewPasswordEmailCode",e[e.TwoFaEnabled=39]="TwoFaEnabled",e[e.TwoFaChangePasswordCurrent=40]="TwoFaChangePasswordCurrent",e[e.TwoFaChangePasswordNew=41]="TwoFaChangePasswordNew",e[e.TwoFaChangePasswordConfirm=42]="TwoFaChangePasswordConfirm",e[e.TwoFaChangePasswordHint=43]="TwoFaChangePasswordHint",e[e.TwoFaTurnOff=44]="TwoFaTurnOff",e[e.TwoFaRecoveryEmailCurrentPassword=45]="TwoFaRecoveryEmailCurrentPassword",e[e.TwoFaRecoveryEmail=46]="TwoFaRecoveryEmail",e[e.TwoFaRecoveryEmailCode=47]="TwoFaRecoveryEmailCode",e[e.TwoFaCongratulations=48]="TwoFaCongratulations"}(d||(d={})),function(e){e[e.ChatList=0]="ChatList",e[e.GlobalSearch=1]="GlobalSearch",e[e.Settings=2]="Settings",e[e.Contacts=3]="Contacts",e[e.Archived=4]="Archived",e[e.NewChannelStep1=5]="NewChannelStep1",e[e.NewChannelStep2=6]="NewChannelStep2",e[e.NewGroupStep1=7]="NewGroupStep1",e[e.NewGroupStep2=8]="NewGroupStep2"}(a||(a={})),function(e){e[e.ChatList=0]="ChatList",e[e.Media=1]="Media",e[e.Links=2]="Links",e[e.Files=3]="Files",e[e.Music=4]="Music",e[e.Voice=5]="Voice"}(u||(u={})),function(e){e[e.ChatInfo=0]="ChatInfo",e[e.UserInfo=1]="UserInfo",e[e.Search=2]="Search",e[e.Management=3]="Management",e[e.StickerSearch=4]="StickerSearch",e[e.GifSearch=5]="GifSearch",e[e.PollResults=6]="PollResults",e[e.AddingMembers=7]="AddingMembers"}(s||(s={})),function(e){e[e.Inline=0]="Inline",e[e.ScheduledInline=1]="ScheduledInline",e[e.SharedMedia=2]="SharedMedia",e[e.ProfileAvatar=3]="ProfileAvatar",e[e.SettingsAvatar=4]="SettingsAvatar",e[e.MiddleHeaderAvatar=5]="MiddleHeaderAvatar",e[e.Album=6]="Album",e[e.ScheduledAlbum=7]="ScheduledAlbum",e[e.SearchResult=8]="SearchResult"}(i||(i={})),function(e){e[e.Idle=0]="Idle",e[e.InProgress=1]="InProgress",e[e.Complete=2]="Complete",e[e.Error=3]="Error"}(c||(c={})),function(e){e[e.Idle=0]="Idle",e[e.InProgress=1]="InProgress",e[e.Complete=2]="Complete",e[e.Error=3]="Error"}(l||(l={})),function(e){e[e.Idle=0]="Idle",e[e.InProgress=1]="InProgress",e[e.Complete=2]="Complete",e[e.Error=3]="Error"}(f||(f={})),function(e){e[e.Closed=0]="Closed",e[e.InProgress=1]="InProgress",e[e.Loading=2]="Loading"}(h||(h={})),function(e){e[e.Profile=0]="Profile",e[e.SharedMedia=1]="SharedMedia",e[e.MemberList=2]="MemberList"}(m||(m={})),function(e){e[e.ShippingInfo=0]="ShippingInfo",e[e.Shipping=1]="Shipping",e[e.PaymentInfo=2]="PaymentInfo",e[e.Checkout=3]="Checkout"}(p||(p={}));const g="UPLOADING_WALLPAPER_SLUG";let y;!function(e){e[e.Initial=0]="Initial",e[e.ChatPrivacyType=1]="ChatPrivacyType",e[e.Discussion=2]="Discussion",e[e.ChannelSubscribers=3]="ChannelSubscribers",e[e.GroupType=4]="GroupType",e[e.GroupPermissions=5]="GroupPermissions",e[e.GroupRemovedUsers=6]="GroupRemovedUsers",e[e.GroupUserPermissionsCreate=7]="GroupUserPermissionsCreate",e[e.GroupUserPermissions=8]="GroupUserPermissions",e[e.ChatAdministrators=9]="ChatAdministrators",e[e.GroupRecentActions=10]="GroupRecentActions",e[e.ChatAdminRights=11]="ChatAdminRights",e[e.GroupMembers=12]="GroupMembers"}(y||(y={}))},9933:(e,t,n)=>{n.d(t,{c:()=>d,j:()=>a});var r=n(9118);let o;function d(e,t){t||(o&&!o.isCancelled&&(o.isCancelled=!0),o=t={isCancelled:!1}),(0,r.T2)((()=>{!t.isCancelled&&e()&&d(e,t)}))}function a(e){(0,r.T2)((()=>{e()&&a(e)}))}},7358:(e,t,n)=>{n.d(t,{w:()=>o});var r=n(3716);function o(e){"function"==typeof window.navigator.setAppBadge&&window.navigator.setAppBadge(e).catch((e=>{r.eM&&console.error(e)}))}},275:(e,t,n)=>{function r(e,t){if(e===t)return!0;const n=Object.keys(e),r=n.length;if(r!==Object.keys(t).length)return!1;if(0===r)return!0;for(let o=0;o(e[r]!==t[r]&&n.push(`${r}: ${e[r]} => ${t[r]}`),n)),[])}n.d(t,{Z:()=>r,c:()=>o})},6752:(e,t,n)=>{n.d(t,{Z:()=>r});const r=(...e)=>e.filter(Boolean).join(" ")},9524:(e,t,n)=>{n.d(t,{Type:()=>o,fetch:()=>d,save:()=>a,clear:()=>u});const r=self.caches;let o;async function d(e,t,n,d=!1){if(r)try{const a=new Request(t.replace(/:/g,"_")),u=await r.open(e),s=await u.match(a);if(!s)return;switch(n){case o.Text:return await s.text();case o.Blob:{const e=await s.blob();if("sticker"===t.substr(0,7))return new Blob([e],{type:"image/webp"});if(!e.type){const t=s.headers.get("Content-Type");if(t)return new Blob([e],{type:d?t:t.replace(/html/gi,"")})}return!d&&e.type.includes("html")?new Blob([e],{type:e.type.replace(/html/gi,"")}):e}case o.Json:return await s.json();default:return}}catch(e){return void console.warn(e)}}async function a(e,t,n){if(r)try{const o="string"==typeof n||n instanceof Blob?n:JSON.stringify(n),d=new Request(t.replace(/:/g,"_")),a=new Response(o),u=await r.open(e);return await u.put(d,a)}catch(e){return void console.warn(e)}}async function u(e){try{if(!r)return;return await r.delete(e)}catch(e){return void console.warn(e)}}!function(e){e[e.Text=0]="Text",e[e.Blob=1]="Blob",e[e.Json=2]="Json"}(o||(o={}))},3989:(e,t,n)=>{n.d(t,{Z:()=>o});var r=n(517);function o(e){return(0,r.Z)({onEsc:e})}},517:(e,t,n)=>{n.d(t,{Z:()=>d});const r={Enter:"onEnter",Backspace:"onBackspace",Delete:"onDelete",Esc:"onEsc",Escape:"onEsc",ArrowUp:"onUp",ArrowDown:"onDown",ArrowLeft:"onLeft",ArrowRight:"onRight",Tab:"onTab"},o={onEnter:[],onDelete:[],onBackspace:[],onEsc:[],onUp:[],onDown:[],onLeft:[],onRight:[],onTab:[]};function d(e){return a()||document.addEventListener("keydown",u,!0),Object.keys(e).forEach((t=>{const n=e[t];if(!n)return;const r=o[t];r&&r.push(n)})),()=>{!function(e){Object.keys(e).forEach((t=>{const n=e[t],r=o[t];if(r){const e=r.findIndex((e=>e===n));-1!==e&&r.splice(e,1)}})),a()||document.removeEventListener("keydown",u,!1)}(e)}}function a(){return Object.values(o).some((e=>Boolean(e.length)))}function u(e){const t=r[e.key];if(!t)return;const{length:n}=o[t];n&&(e.stopPropagation(),(0,o[t][n-1])(e))}},790:(e,t,n)=>{n.d(t,{$Y:()=>a,_F:()=>u,kj:()=>s,mr:()=>c,VX:()=>l,Tu:()=>f,np:()=>h,j1:()=>m,ZK:()=>g,k9:()=>y,rM:()=>b,xH:()=>v,xk:()=>I,IS:()=>C});const r=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],o=["January","February","March","April","May","June","July","August","September","October","November","December"],d=o.map((e=>e.toLowerCase()));function a(e){const t=new Date(e);return t.setHours(0,0,0,0),t}function u(e){return a(e).getTime()}function s(e){const t=new Date(1e3*e);return`${t.getFullYear()}-${t.getMonth()}`}function i(e){return`${e.getFullYear()}-${e.getMonth()+1}-${e.getDate()}`}function c(e){const t="number"==typeof e?new Date(e):e;return`${String(t.getHours()).padStart(2,"0")}:${String(t.getMinutes()).padStart(2,"0")}`}function l(e,t){const n="number"==typeof t?new Date(t):t,o=a(new Date);if(n>=o)return c(n);const d=new Date(o);if(d.setDate(o.getDate()-7),n>=d)return e(`Weekday.Short${r[n.getDay()]}`);const u=n.getFullYear()!==o.getFullYear(),s=e(u?"formatDateScheduleYear":"formatDateSchedule")||(u?"d MMM yyyy":"d MMM");return p(e,n,s)}function f(e,t){const n="number"==typeof t?new Date(t):t,r=e("formatterYearMax")||"dd.MM.yyyy";return p(e,n,r)}function h(e,t,n=!1){const r=e(n?"formatterMonthYear2":"formatterMonthYear")||"MMM yyyy";return p(e,t,r)}function m(e,t,n=!1,o=!1){const d="number"==typeof t?new Date(t):t,u=a(new Date);if(!o){if(i(d)===i(u))return(n?S:E)(e("Weekday.Today"));const t=new Date(u);if(t.setDate(u.getDate()-1),i(d)===i(t))return(n?S:E)(e("Weekday.Yesterday"));const o=new Date(u),a=new Date(u);if(o.setDate(u.getDate()-7),a.setDate(u.getDate()+7),d>=o&&d<=a){const t=r[d.getDay()];return n?S(e(`Weekday.Short${t}`)):E(e(`Weekday.${t}`))}}const s=d.getFullYear()!==u.getFullYear(),c=e(n?s?"formatDateScheduleYear":"formatDateSchedule":s?"chatFullDate":"chatDate")||"d MMMM yyyy";return(n?S:E)(p(e,d,c))}function p(e,t,n){const r=t.getDate(),d=t.getMonth();return n.replace("LLLL",e(o[d])).replace("MMMM",e(`Month.Gen${o[d]}`)).replace("MMM",e(`Month.Short${o[d]}`)).replace("MM",String(d+1).padStart(2,"0")).replace("dd",String(r).padStart(2,"0")).replace("d",String(r)).replace("yyyy",String(t.getFullYear()))}function g(e,t){const n="number"==typeof t?new Date(t):t;return`${m(e,n,!0)}, ${c(n)}`}function y(e){const t=Math.floor(e/3600),n=Math.floor(e%3600/60),r=Math.floor(e%3600%60);let o="";return t>0?(o+=`${String(t).padStart(2,"0")}:`,o+=`${String(n).padStart(2,"0")}:`):o+=`${String(n)}:`,o+=String(r).padStart(2,"0"),o}function b(e){const t=[];let n=e%1e3;e-=n,n=Math.floor(n/10);const r=(e=Math.floor(e/1e3))%60;e-=r;const o=(e=Math.floor(e/60))%60;e-=o;const d=(e=Math.floor(e/60))%60;return d>0&&t.push(String(d).padStart(2,"0")),t.push(String(o).padStart(d>0?2:1,"0")),t.push(String(r).padStart(2,"0")),`${t.join(":")},${String(n).padStart(2,"0")}`}function v(e,t="en-US"){return e.toLocaleString(t,{year:"numeric",month:"short",day:"numeric"})}function w(e,t,n=2021){if(t>11||e>31)return!1;const r=new Date(n,t,e);return!Number.isNaN(r.getTime())&&r.getDate()===e}function I(e=""){const t=e.match(/\d{1,2}\s[a-zA-Z]{3,}/),n=e.match(/[a-zA-Z]{3,}\s\d{1,2}/),r=e.match(/\d{1,2}[./-]\d{1,2}([./-]\d{2,4})?/);if(!t&&!r&&!n)return;if(r){const[t,n,r]=e.split(/[./-]/).map(Number);return r&&r<2015||!w(t,n-1,r||void 0)?void 0:`${r?`${r}-`:""}${String(n).padStart(2,"0")}-${String(t).padStart(2,"0")}`}const o=e.split(" "),a=t?o[0]:o[1],u=(t?o[1]:o[0]).toLowerCase(),s=d.findIndex((e=>e.startsWith(u)));return-1!==s&&w(Number(a),s)?`${String(s+1).padStart(2,"0")}-${String(a).padStart(2,"0")}`:void 0}function C(e){return e+86400}function S(e){return`${e[0].toLowerCase()}${e.slice(1)}`}function E(e){return`${e[0].toUpperCase()}${e.slice(1)}`}},4284:(e,t,n)=>{n.d(t,{p:()=>d,N:()=>a});const r=["female_sign","male_sign","medical_symbol"];function o(e){const t=e.split("-").map((e=>parseInt(e,16)));return String.fromCodePoint(...t)}function d(e){let t;if(1===e.length)t=e.charCodeAt(0).toString(16).padStart(4,"0");else{const n=[];for(let t=0;t=55296&&e.charCodeAt(t)<=56319?e.charCodeAt(t+1)>=56320&&e.charCodeAt(t+1)<=57343&&n.push(1024*(e.charCodeAt(t)-55296)+(e.charCodeAt(t+1)-56320)+65536):(e.charCodeAt(t)<55296||e.charCodeAt(t)>57343)&&n.push(e.charCodeAt(t));t=n.map((e=>e.toString(16).padStart(4,"0"))).join("-")}return t}function a(e){const t={categories:[],emojis:{}};for(let n=0;n{n.d(t,{cL:()=>M,wZ:()=>h,vX:()=>E,op:()=>w,cj:()=>f,jm:()=>l,m5:()=>S,I_:()=>C,fl:()=>p,s$:()=>m,Mc:()=>I,wB:()=>y,p7:()=>b,$b:()=>g,mh:()=>v,s0:()=>P,aZ:()=>A,Lt:()=>c,vn:()=>u,on:()=>d});var r=n(3716);let o;function d(){return Boolean(o)}new Promise((e=>{const t=new Image;t.src="data:image/webp;base64,UklGRjoAAABXRUJQVlA4IC4AAACyAgCdASoCAAIALmk0mk0iIiIiIgBoSygABc6WWgAA/veff/0PP8bA//LwYAAA";const n=()=>{e(2===t.height)};t.onload=n,t.onerror=n})).then((e=>{o=e}));let a=window&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";function u(){return a}function s(e){a=e.matches?"dark":"light"}const i=window.matchMedia("(prefers-color-scheme: dark)");"function"==typeof i.addEventListener?i.addEventListener("change",s):"function"==typeof i.addListener&&i.addListener(s);const c=function(){const{userAgent:e,platform:t}=window.navigator;let n;return-1!==["Macintosh","MacIntel","MacPPC","Mac68K"].indexOf(t)?n="macOS":-1!==["iPhone","iPad","iPod"].indexOf(t)?n="iOS":-1!==["Win32","Win64","Windows","WinCE"].indexOf(t)?n="Windows":/Android/.test(e)?n="Android":/Linux/.test(t)&&(n="Linux"),n}(),l="macOS"===c,f="iOS"===c,h="Android"===c,m=/^((?!chrome|android).)*safari/i.test(navigator.userAgent),p=window.matchMedia("(display-mode: standalone)").matches||window.navigator.standalone||document.referrer.includes("android-app://"),g=window.matchMedia("(pointer: coarse)").matches,y=window.innerWidth<=r.l3||window.innerWidth<=r.u_&&window.innerHeight<=r.rO,b=!y&&window.innerWidth<=r.ks,v=navigator.mediaDevices&&"getUserMedia"in navigator.mediaDevices&&(window.AudioContext||window.webkitAudioContext),w=(document.documentElement.style,c&&(l||f)),I="serviceWorker"in navigator,C=I,S=(window,Boolean((new Audio).canPlayType("audio/ogg; codecs=opus"))),E=!r.Cg&&"filter"in(document.createElement("canvas").getContext("2d")||{}),P=h?"slide-fade":f?"slide-layers":"push-slide",M=window.devicePixelRatio||1,A=!0},1394:(e,t,n)=>{n.d(t,{A9:()=>d,YJ:()=>a,hl:()=>u,pt:()=>s,jj:()=>i,ud:()=>c,gm:()=>l,ao:()=>f});var r=n(9118);function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function d(e){const t=e.split(","),n=t[0].match(/:(.*?);/)[1],r=atob(t[1]);let o=r.length;const d=new Uint8Array(o);for(;o--;)d[o]=r.charCodeAt(o);return new Blob([d],{type:n})}function a(e){return new Promise(((t,n)=>{const r=new FileReader;r.onload=e=>{const{result:r}=e.target||{};"string"==typeof r&&t(r),n(new Error("Failed to read blob"))},r.onerror=n,r.readAsDataURL(e)}))}function u(e,t){return new File([e],t,{lastModified:Date.now(),type:e.type})}function s(e){return new Promise(((t,n)=>{const r=new Image;r.onload=()=>t(r),r.onerror=n,r.src=e}))}function i(e){return new Promise(((t,n)=>{const r=document.createElement("video");r.volume=0,r.onloadedmetadata=()=>t(r),r.onerror=n,r.src=e}))}async function c(e){const t=await i(e);return Promise.race([(0,r.wO)(2e3),new Promise(((e,n)=>{t.onseeked=()=>{t.videoWidth&&t.videoHeight||e(void 0);const n=document.createElement("canvas");n.width=t.videoWidth,n.height=t.videoHeight,n.getContext("2d").drawImage(t,0,0),e(n.toDataURL("image/jpeg"))},t.onerror=n,t.currentTime=Math.min(t.duration,1)}))])}async function l(e){return(await fetch(e)).blob()}function f(e){const t=document.createElement("canvas");return t.width=e.width,t.height=e.height,t.getContext("2d").drawImage(e,0,0),t}"undefined"==typeof File&&(self.File=class extends Blob{constructor(e,t,n){if(n){const{type:t,...r}=n;super(e,{type:t}),o(this,"name",void 0),Object.assign(this,r)}else super(e),o(this,"name",void 0);this.name=t}})},9937:(e,t,n)=>{function r(e,t,n="en"){return new Intl.NumberFormat(n,{style:"currency",currency:t}).format("JPY"===t?e:e/100)}n.d(t,{x:()=>r})},6926:(e,t,n)=>{n.d(t,{Z:()=>r});const r=e=>{let t;do{t=String(Math.random()).replace("0.","id")}while(e.hasOwnProperty(t));return t}},1947:(e,t,n)=>{n.d(t,{ZP:()=>d,J_:()=>a});const r={CHAT_RESTRICTED:"You can't send messages in this chat, you were restricted",CHAT_WRITE_FORBIDDEN:"You can't write in this chat",CHAT_SEND_POLL_FORBIDDEN:"You can't create polls in this chat",CHAT_SEND_STICKERS_FORBIDDEN:"You can't send stickers in this chat",CHAT_SEND_GIFS_FORBIDDEN:"You can't send gifs in this chat",CHAT_SEND_MEDIA_FORBIDDEN:"You can't send media in this chat",CHAT_LINK_EXISTS:"The chat is public, you can't hide the history to new users",SLOWMODE_WAIT_X:"Slowmode is enabled in this chat: you must wait for the specified number of seconds before sending another message to the chat.",USER_BANNED_IN_CHANNEL:"You're banned from sending messages in supergroups / channels",USER_IS_BLOCKED:"You were blocked by this user",YOU_BLOCKED_USER:"You blocked this user",IMAGE_PROCESS_FAILED:"Failure while processing image",MEDIA_EMPTY:"The provided media object is invalid",MEDIA_INVALID:"Media invalid",PHOTO_EXT_INVALID:"The extension of the photo is invalid",PHOTO_INVALID_DIMENSIONS:"The photo dimensions are invalid",PHOTO_SAVE_FILE_INVALID:"Internal issues, try again later",MESSAGE_DELETE_FORBIDDEN:"You can't delete one of the messages you tried to delete, most likely because it is a service message.",MESSAGE_POLL_CLOSED:"Poll closed",MESSAGE_EDIT_TIME_EXPIRED:"You can't edit this message anymore.",CHAT_ADMIN_REQUIRED:"You must be an admin in this chat to do this",PINNED_DIALOGS_TOO_MUCH:"Sorry, you can only pin 5 chats to the top",DIALOG_FILTERS_TOO_MUCH:"Sorry, you can't have more than 10 folders",CHANNEL_PRIVATE:"This channel is private",MEDIA_CAPTION_TOO_LONG:"The provided caption is too long",ADDRESS_STREET_LINE1_INVALID:"The address you provided is not valid",ADDRESS_STREET_LINE2_INVALID:"The address you provided is not valid",ADDRESS_CITY_INVALID:"The city you provided is not valid",ADDRESS_COUNTRY_INVALID:"The country you provided is not valid",ADDRESS_POSTCODE_INVALID:"The postcode you provided is not valid",ADDRESS_STATE_INVALID:"The state you provided is not valid",REQ_INFO_NAME_INVALID:"The name you provided is not valid",REQ_INFO_PHONE_INVALID:"The phone you provided is not valid",REQ_INFO_EMAIL_INVALID:"The email you provided is not valid",LINK_NOT_MODIFIED:"This discussion is already linked to the channel",MESSAGE_TOO_LONG:"Message is too long",SERVICE_WORKER_DISABLED:"Service Worker is disabled. Please reload the page without holding key.",MESSAGE_TOO_LONG_PLEASE_REMOVE_CHARACTERS:"The provided message is too long. Please remove {EXTRA_CHARS_COUNT} character{PLURAL_S}.",FRESH_RESET_AUTHORISATION_FORBIDDEN:"You can’t logout other sessions if less than 24 hours have passed since you logged on the current session",BOTS_TOO_MUCH:"There are too many bots in this chat/channel",BOT_GROUPS_BLOCKED:"This bot can't be added to groups",USERS_TOO_MUCH:"The maximum number of users has been exceeded",USER_CHANNELS_TOO_MUCH:"One of the users you tried to add is already in too many channels/supergroups",USER_KICKED:"This user was kicked from this supergroup/channel",USER_NOT_MUTUAL_CONTACT:"The provided user is not a mutual contact",USER_PRIVACY_RESTRICTED:"The user's privacy settings do not allow you to do this",INVITE_HASH_EMPTY:"The invite hash is empty",INVITE_HASH_EXPIRED:"The invite link has expired",INVITE_HASH_INVALID:"The invite hash is invalid",CHANNELS_TOO_MUCH:"You have joined too many channels/supergroups",USER_ALREADY_PARTICIPANT:"You already in the group",SCHEDULE_DATE_INVALID:"Invalid schedule date provided",WALLPAPER_DIMENSIONS_INVALID:"The wallpaper dimensions are invalid, please select another file"},o={ADDRESS_STREET_LINE1_INVALID:{field:"streetLine1",message:"Incorrect street address"},ADDRESS_STREET_LINE2_INVALID:{field:"streetLine2",message:"Incorrect street address"},ADDRESS_CITY_INVALID:{field:"city",message:"Incorrect city"},ADDRESS_COUNTRY_INVALID:{field:"countryIso2",message:"Incorrect country"},ADDRESS_POSTCODE_INVALID:{field:"postCode",message:"Incorrect post code"},ADDRESS_STATE_INVALID:{field:"state",message:"Incorrect state"},REQ_INFO_NAME_INVALID:{field:"fullName",message:"Incorrect name"},REQ_INFO_PHONE_INVALID:{field:"phone",message:"Incorrect phone"},REQ_INFO_EMAIL_INVALID:{field:"email",message:"Incorrect email"}};function d(e){const{message:t,isSlowMode:n,textParams:o}=e;if(n){const e=t.indexOf(" (caused by");return e>0?t.substring(0,e):t}let d=r[t];return d&&o&&(d=Object.keys(o).reduce(((e,t)=>e.replace(t,o[t])),d)),d}function a(e){return o[e.message]}},3592:(e,t,n)=>{n.d(t,{S:()=>d}),n(3716);var r=n(9118);function o(e){e.preventDefault(),d(e instanceof ErrorEvent?e.error:e.reason)}function d(e){console.error(e)}window.addEventListener("error",o),window.addEventListener("unhandledrejection",o),(0,r.P2)(window.alert,1e3)},782:(e,t,n)=>{function r(e,t){return e.reduce(((e,n)=>(e[n[t]]=n,e)),{})}function o(e,t){return Object.keys(e).reduce(((n,r,o)=>(n[r]=t(e[r],r,o,e),n)),{})}function d(e,t){return t.reduce(((t,n)=>(t[n]=e[n],t)),{})}function a(e,t){return t.reduce(((t,n)=>(e[n]&&(t[n]=e[n]),t)),{})}function u(e,t){const n=new Set(t.map(String));return d(e,Object.keys(e).filter((e=>!n.has(e))))}function s(e,t,n="asc"){return e.sort(((e,r)=>{if(Array.isArray(t)){const[o,d]=Array.isArray(n)?n:[n,n],[a,u]=t;let s,i;if("function"==typeof a?(s=a(e)||0,i=a(r)||0):"string"==typeof a&&(s=e[a]||0,i=r[a]||0),s!==i)return"asc"===o?s-i:i-s;{let t,n;return"function"==typeof u?(t=u(e)||0,n=u(r)||0):"string"==typeof u&&(t=e[u]||0,n=r[u]||0),"asc"===d?t-n:n-t}}let o,d;return"function"==typeof t?(o=t(e)||0,d=t(r)||0):"string"==typeof t&&(o=e[t]||0,d=r[t]||0),"asc"===n?o-d:d-o}))}function i(e){return e.reduce(((e,t)=>Array.isArray(t)?e.concat(t):(e.push(t),e)),[])}function c(e){return Array.from(new Set(e))}function l(e){return e.filter(Boolean)}function f(e,t){return e.length===t.length&&e.every(((e,n)=>e===t[n]))}function h(e,t){return e[0]<=t[t.length-1]&&e[e.length-1]>=t[0]}function m(e,t){return e.filter((e=>t.has(e)))}function p(e,t){const n=[];for(let r=0;r(t[n]=g(e[n]),t)),{})}function y(e,t){let n=e.length;for(;n--;)if(t(e[n],n,e))return e[n]}n.d(t,{ee:()=>r,Q8:()=>o,ei:()=>d,q0:()=>a,CE:()=>u,Xo:()=>s,xH:()=>i,Tw:()=>c,oA:()=>l,et:()=>f,YE:()=>h,eL:()=>m,Vl:()=>p,Xh:()=>g,dF:()=>y})},663:(e,t,n)=>{n.d(t,{ll:()=>m,i0:()=>b,Pn:()=>v,m0:()=>w});var r=n(5116),o=n(3716),d=n(9524),a=n(1226),u=n(2155);const s=/%\d?\$?[sdf@]/g,i=["value","zeroValue","oneValue","twoValue","fewValue","manyValue","otherValue"],c={en:e=>1!==e?6:2,ar:e=>0===e?1:1===e?2:2===e?3:e%100>=3&&e%100<=10?4:e%100>=11?5:6,ca:e=>1!==e?6:2,de:e=>1!==e?6:2,es:e=>1!==e?6:2,fa:e=>e>1?6:2,fr:e=>e>1?6:2,id:()=>0,it:e=>1!==e?6:2,ko:()=>0,ms:()=>0,nl:e=>1!==e?6:2,pl:e=>1===e?2:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?4:5,pt_BR:e=>e>1?6:2,ru:e=>e%10==1&&e%100!=11?2:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?4:5,tr:e=>e>1?6:2,uk:e=>e%10==1&&e%100!=11?2:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?4:5,uz:e=>e>1?6:2},l=new Map;let f,h;const{addCallback:m,removeCallback:p,runCallbacks:g}=function(){const e=[];function t(t){const n=e.indexOf(t);-1!==n&&e.splice(n,1)}return{runCallbacks:function(...t){e.forEach((e=>{e(...t)}))},addCallback:function(n){return e.push(n),()=>{t(n)}},removeCallback:t}}();let y;const b=(e,t,n)=>{if(void 0!==t){const r=Array.isArray(t)?JSON.stringify(t):t,o=l.get(`${e}_${r}_${n}`);if(o)return o}if(!f&&!h)return e;const r=f&&f[e]||h&&h[e];return r?C(r,e,t,n):(h||I(),e)};async function v(e,t){let n=await d.fetch(o.ee,`${o.$O}_${e}_${t}`,d.Type.Json);return n||(n=await async function(e,t,n){const r=await(0,a.t9)("fetchLangStrings",{langPack:e,langCode:t,keys:[n]});if(r&&r.length)return await d.save(o.ee,`${e}_${t}_${n}`,r[0]),r[0]}(o.$O,e,t)),C(n,t)}async function w(e,t,n=!1){if(f&&e===y)return void(t&&t());let u=await d.fetch(o.ee,e,d.Type.Json);if(!u&&(n&&await I(),u=await async function(e){const t=await(0,a.t9)("fetchLangPack",{sourceLangPacks:o.Bg,langCode:e});if(t)return await d.save(o.ee,e,t.langPack),t.langPack}(e),!u))return;l.clear(),y=e,f=u,document.documentElement.lang=e;const{languages:s}=(0,r.Rd)().settings.byKey,i=s?s.find((t=>t.langCode===e)):void 0;b.isRtl=Boolean(i&&i.rtl),b.code=e,t&&t(),g()}async function I(){h||(h=(await n.e(915).then(n.bind(n,1915))).default,g())}function C(e,t,n,r){const d=e?e["number"==typeof n?function(e){const t=y||o.sR,n=c[t]?c[t](e):0;return i[n]}(n):"value"]:void 0;if(!d||!d.trim()){const e=t.split(".");return e[e.length-1]}if(void 0!==n){const e=function(e,t){t=Array.isArray(t)?t:[t];const n=e.split(s),r=n.shift();return n.reduce(((e,n,r)=>`${e}${String(t[r]||"")}${n}`),r||"")}(d,"i"===r?(0,u.kh)(n):n),o=Array.isArray(n)?JSON.stringify(n):n;return l.set(`${t}_${o}_${r}`,e),e}return d}},647:(e,t,n)=>{n.d(t,{cC:()=>y,he:()=>p,UV:()=>g});var r=n(6137),o=n(3716),d=n(1226),a=n(9524),u=n(1394),s=n(7361);const i=48e3;async function c(e){const t=await new Response(e).arrayBuffer();return new Promise((e=>{const r=new Uint8Array(t);let o=new Worker(new URL(n.p+n.u(745),n.b)),d=new Worker(new URL(n.p+n.u(993),n.b));o.onmessage=e=>{null===e.data?d.postMessage({command:"done"}):d.postMessage({command:"encode",buffers:e.data},e.data.map((({buffer:e})=>e)))},d.onmessage=t=>{"page"===t.data.message&&(e(new Blob([t.data.page],{type:"audio/wav"})),o.terminate(),o=void 0,d.terminate(),d=void 0)},d.postMessage({command:"init",wavBitDepth:16,wavSampleRate:i}),o.postMessage({command:"init",decoderSampleRate:i,outputBufferSampleRate:i}),o.postMessage({command:"decode",pages:r},[r.buffer])}))}var l=n(862);const f={[r.IU.DataUri]:a.Type.Text,[r.IU.BlobUrl]:a.Type.Blob,[r.IU.Lottie]:a.Type.Json,[r.IU.Progressive]:void 0,[r.IU.Stream]:void 0},h=new Map,m=new Map;function p(e,t,n=!1,i){if(t===r.IU.Progressive)return s.I_?function(e){const t=`./progressive/${e}`;return h.set(e,t),Promise.resolve(t)}(e):p(e,r.IU.BlobUrl,n,i);if(!m.has(e)){const p=async function(e,t,n,i){if(!o.Cy){const r=e.startsWith("avatar")?o.SG:o.lW,d=await a.fetch(r,e,f[t],n);if(d){let t=d;if("audio/ogg"!==d.type||s.m5||(t=await c(t)),"image/webp"===d.type&&!(0,s.on)()&&t){const n=await(0,l._y)(e,t);n&&(t=n)}const n=b(t);return h.set(e,n),n}}if(t===r.IU.Stream){const n=new MediaSource,r=URL.createObjectURL(n);let o=!1;return n.addEventListener("sourceopen",(()=>{if(o)return;o=!0;const r=n.addSourceBuffer("audio/mpeg");(0,d.t9)("downloadMedia",{url:e,mediaFormat:t},((e,t)=>{i&&i(e),1===e&&n.endOfStream(),t&&r.appendBuffer(t)}))})),h.set(e,r),r}const m=await(0,d.t9)("downloadMedia",{url:e,mediaFormat:t,isHtmlAllowed:n},i);if(!m)throw new Error("Failed to fetch media");let{prepared:p,mimeType:g}=m;if("audio/ogg"===g&&!s.m5){const e=await(0,u.gm)(p);URL.revokeObjectURL(p),p=b(await c(e)),g=e.type}if("image/webp"===g&&!(0,s.on)()){const t=await(0,u.gm)(p);URL.revokeObjectURL(p);const n=await(0,l._y)(e,t);n&&(p=b(n))}return h.set(e,p),p}(e,t,n,i).catch((e=>{o.eM&&console.warn(e)})).finally((()=>{m.delete(e)}));m.set(e,p)}return m.get(e)}function g(e){return h.get(e)}function y(e){(0,d.u3)(e)}function b(e){return e instanceof Blob?URL.createObjectURL(e):e}s.I_&&navigator.serviceWorker.addEventListener("message",(async e=>{const{type:t,messageId:n,params:o}=e.data;if("requestPart"!==t)return;const a=await(0,d.t9)("downloadMedia",{mediaFormat:r.IU.Progressive,...o});if(!a)return;const{arrayBuffer:u,mimeType:s,fullSize:i}=a;navigator.serviceWorker.controller.postMessage({type:"partResponse",messageId:n,result:{arrayBuffer:u,mimeType:s,fullSize:i}},[u])}))},735:(e,t,n)=>{n.d(t,{D:()=>r});const r=[]},9203:(e,t,n)=>{n.d(t,{gl:()=>o,$y:()=>u,o5:()=>s,Qt:()=>c});var r=n(3716);let o;!function(e){e[e.Auth=0]="Auth",e[e.Main=1]="Main",e[e.Extra=2]="Extra"}(o||(o={}));const d={},a={};async function u(e,t){if(!d[e]){switch(e){case o.Auth:d[o.Auth]=n.e(133).then(n.bind(n,1133));break;case o.Main:r.eM&&console.log(">>> START LOAD MAIN BUNDLE"),d[o.Main]=Promise.all([n.e(484),n.e(25)]).then(n.bind(n,8025));break;case o.Extra:d[o.Extra]=Promise.all([n.e(484),n.e(347)]).then(n.bind(n,6347))}d[e].then(l)}const u=await d[e];return a[e]||(a[e]=u),s(e,t)}function s(e,t){const n=a[e];if(n)return n[t]}const i=[];function c(e){i.includes(e)||i.push(e)}function l(){i.forEach((e=>{e()}))}},8406:(e,t,n)=>{n.d(t,{s_:()=>b,r1:()=>I,Ld:()=>S,VL:()=>E,KC:()=>P});var r=n(1226),o=n(6137),d=n(2864),a=n(3716),u=n(5116),s=n(2858),i=n(663),c=n(1752),l=n(8085),f=n(7361),h=n(647),m=n(9118);function p(e){const t=e.toJSON();return JSON.stringify({endpoint:t.endpoint,keys:t.keys})}function g(){return!!f.Mc&&("showNotification"in ServiceWorkerRegistration.prototype?"denied"===Notification.permission?(a.eM&&console.warn("[PUSH] The user has blocked push notifications."),!1):"PushManager"in window||(a.eM&&console.warn("[PUSH] Push messaging isn't supported."),!1):(a.eM&&console.warn("[PUSH] Push notifications aren't supported."),!1))}const y=new Set,b=(0,m.Ds)((async function(e){if(y.has(e))return;const{notificationSoundVolume:t}=(0,l.dZ)((0,u.Rd)()),n=t/10;if(0===n)return;const r=new Audio("/notification.mp3");r.volume=n,r.setAttribute("mozaudiochannel","notification"),r.addEventListener("ended",(()=>{y.add(e)}),{once:!0}),setTimeout((()=>{y.delete(e)}),3e3);try{await r.play()}catch(e){a.eM&&console.warn("[PUSH] Unable to play notification sound")}}),1e3,!0,!1);async function v(){"Notification"in window&&(["granted","denied"].includes(Notification.permission)||await Notification.requestPermission())}async function w(e){const t=(0,u.Rd)(),n=(0,u.uC)();if(e)try{const t=p(e);return await(0,r.t9)("unregisterDevice",t),await e.unsubscribe(),void n.deleteDeviceToken()}catch(e){a.eM&&console.log("[PUSH] Unable to unsubscribe from push.",e)}t.push&&(await(0,r.t9)("unregisterDevice",t.push.deviceToken),n.deleteDeviceToken())}async function I(){if(!g())return;const e=await navigator.serviceWorker.ready,t=await e.pushManager.getSubscription();await w(t)}let C=!1;async function S(){if(!g())return void await v();const e=await navigator.serviceWorker.ready;let t=await e.pushManager.getSubscription();if(function(e){const t=(0,u.Rd)();return!t.push||!e||p(e)!==t.push.deviceToken||Date.now()-t.push.subscribedAt>432e5}(t)){await w(t);try{t=await e.pushManager.subscribe({userVisibleOnly:!0});const n=p(t);a.eM&&console.log("[PUSH] Received push subscription: ",n),await(0,r.t9)("registerDevice",n),(0,u.uC)().setDeviceToken(n)}catch(e){"denied"===Notification.permission?a.eM&&console.warn("[PUSH] The user has blocked push notifications."):a.eM&&(console.log("[PUSH] Unable to subscribe to push.",e),e.code===DOMException.ABORT_ERR&&await v())}}}async function E({chat:e,message:t,isActiveChat:n}){if(!("Notification"in window?"denied"!==Notification.permission||(a.eM&&console.warn("[PUSH] The user has blocked push notifications."),0):(a.eM&&console.warn("[PUSH] This browser does not support desktop notification"),0)))return;if(!t.id)return;if(await async function(){if(C)return;const[e,t]=await Promise.all([(0,r.t9)("fetchNotificationSettings",{serverTimeOffset:(0,u.Rd)().serverTimeOffset}),(0,r.t9)("fetchNotificationExceptions",{serverTimeOffset:(0,u.Rd)().serverTimeOffset})]);if(!e)return;let n=(0,c.BI)((0,u.Rd)(),e);t&&(n=(0,c.aJ)(n,t)),(0,u.R3)(n),C=!0}(),!function(e,t){if(!C)return!1;const n=(0,u.Rd)();return!((0,s.i4)(e,(0,l.dZ)(n),(0,l.NJ)(n))||e.isNotJoined||!e.isListed||t&&document.hasFocus())}(e,n))return;const{title:f,body:m}=function(e,t){const n=(0,u.Rd)(),{senderId:r,replyToMessageId:o}=t,a=r?(0,l.dy)(n,r):void 0,c=(0,s.N5)(t),f=c&&o?(0,l.hj)(n,e.id,o):void 0,{targetUserIds:h,targetChatId:m}=c||{},p=h?h.map((e=>(0,l.dy)(n,e))).filter(Boolean):void 0,g=(0,s.zX)(e),y=g?(0,l.dy)(n,g):void 0;let b;if((0,s.Sm)(e,(0,l.dZ)(n),(0,l.NJ)(n)))if((0,s.Lo)(t)){const n=e&&((0,s.eA)(e)||t.senderId===t.chatId)?e:a;b=(0,d.D)(i.i0,t,n,p,f,m,{asPlain:!0})}else{const n=(0,s.zF)(i.i0,e.id,a),r=(0,s.MK)(i.i0,t);b=n?`${n}: ${r}`:r}else b="New message";return{title:(0,s.U)(i.i0,e,y),body:b}}(e,t),p=await async function(e){const t=(0,s.RT)(e);if(!t)return;let n=h.UV(t);return n||(await h.he(t,o.IU.BlobUrl),n=h.UV(t)),n}(e);if(g())navigator.serviceWorker.controller&&navigator.serviceWorker.controller.postMessage({type:"newMessageNotification",payload:{title:f,body:m,icon:p,chatId:e.id,messageId:t.id}});else{const n=(0,u.uC)(),r={body:m,icon:p,badge:p,tag:t.id.toString()};"vibrate"in navigator&&(r.vibrate=[200,100,200]);const o=new Notification(f,r);o.onclick=()=>{o.close(),n.focusMessage({chatId:e.id,messageId:t.id}),window.focus&&window.focus()},o.onshow=()=>{b(t.id||e.id)}}}function P(){navigator.serviceWorker.controller&&navigator.serviceWorker.controller.postMessage({type:"clientReady"})}},2969:(e,t,n)=>{n.d(t,{Jm:()=>d,un:()=>s,WZ:()=>i,vQ:()=>a,g3:()=>u});const r={},o=/(\d{1,3})(\d{1,3})?(\d{1,3})?(\d{1,3})?(\d{1,3})?/,d="AF🇦🇫93Afghanistan333\nAO🇦🇴244Angola333\nAL🇦🇱355Albania234\nAD🇦🇩376Andorra222\nAE🇦🇪971United Arab Emirates234\nAI🇦🇮1264Anguilla34\nAR🇦🇷54Argentina\nAM🇦🇲374Armenia233\nAG🇦🇬1268Antigua and Barbuda34\nAU🇦🇺61Australia333\nAS🇦🇸1684American Samoa34\nAT🇦🇹43Austria\nAW🇦🇼297Aruba34\nAZ🇦🇿994Azerbaijan2322\nBI🇧🇮257Burundi224\nBE🇧🇪32Belgium3222\nBJ🇧🇯229Benin233\nBF🇧🇫226Burkina Faso2222\nBD🇧🇩880Bangladesh\nBG🇧🇬359Bulgaria\nBH🇧🇭973Bahrain44\nBS🇧🇸1242Bahamas34\nBA🇧🇦387Bosnia and Herzegovina\nBY🇧🇾375Belarus2322\nBZ🇧🇿501Belize\nBO🇧🇴591Bolivia134\nBR🇧🇷55Brazil254\nBB🇧🇧1246Barbados34\nBM🇧🇲1441Bermuda34\nBN🇧🇳673Brunei34\nBQ🇧🇶599Bonaire, Sint Eustatius and Saba\nBT🇧🇹975Bhutan\nBW🇧🇼267Botswana233\nCF🇨🇫236Central African Republic2222\nCA🇨🇦1Canada334\nCH🇨🇭41Switzerland234\nCK🇨🇰682Cook Islands\nCL🇨🇱56Chile144\nCN🇨🇳86China344\nCI🇨🇮225Côte d`Ivoire233\nCM🇨🇲237Cameroon44\nCD🇨🇩243DR Congo234\nCG🇨🇬242Republic of the Congo234\nCO🇨🇴57Colombia334\nKM🇰🇲269Comoros34\nCV🇨🇻238Cape Verde34\nCR🇨🇷506Costa Rica\nCU🇨🇺53Cuba44\nCY🇨🇾357Cyprus44\nCW🇨🇼599Curaçao\nCZ🇨🇿420Czech Republic\nDE🇩🇪49Germany38\nDJ🇩🇯253Djibouti2222\nDM🇩🇲1767Dominica34\nDK🇩🇰45Denmark44\nDO🇩🇴1Dominican Republic334\nDZ🇩🇿213Algeria3222\nEC🇪🇨593Ecuador\nEG🇪🇬20Egypt234\nER🇪🇷291Eritrea133\nES🇪🇸34Spain333\nEE🇪🇪372Estonia\nET🇪🇹251Ethiopia234\nFI🇫🇮358Finland\nFJ🇫🇯679Fiji\nFK🇫🇰500Falkland Islands\nFM🇫🇲691Micronesia\nFO🇫🇴298Faroe Islands33\nFR🇫🇷33France12222\nGA🇬🇦241Gabon1222\nGB🇬🇧44United Kingdom46\nGE🇬🇪995Georgia\nGF🇬🇫594French Guiana\nGH🇬🇭233Ghana\nGI🇬🇮350Gibraltar44\nGL🇬🇱299Greenland33\nGN🇬🇳224Guinea333\nGM🇬🇲220Gambia34\nGP🇬🇵590Guadeloupe\nGU🇬🇺1671Guam34\nGW🇬🇼245Guinea-Bissau34\nGQ🇬🇶240Equatorial Guinea333\nGR🇬🇷30Greece244\nGD🇬🇩1473Grenada34\nGT🇬🇹502Guatemala134\nGY🇬🇾592Guyana\nHK🇭🇰852Hong Kong\nHN🇭🇳504Honduras44\nHR🇭🇷385Croatia\nHT🇭🇹509Haiti\nHU🇭🇺36Hungary234\nID🇮🇩62Indonesia\nIN🇮🇳91India55\nIO🇩🇬246Diego Garcia34\nIE🇮🇪353Ireland234\nIR🇮🇷98Iran334\nIQ🇮🇶964Iraq334\nIS🇮🇸354Iceland34\nIL🇮🇱972Israel234\nIT🇮🇹39Italy334\nJM🇯🇲1876Jamaica34\nJO🇯🇴962Jordan144\nJP🇯🇵81Japan244\nKZ🇰🇿7Kazakhstan3322\nKE🇰🇪254Kenya333\nKG🇰🇬996Kyrgyzstan\nKH🇰🇭855Cambodia\nKI🇰🇮686Kiribati\nKN🇰🇳1869Saint Kitts and Nevis34\nKR🇰🇷82South Korea\nKW🇰🇼965Kuwait44\nKY🇰🇾1345Cayman Islands34\nLA🇱🇦856Laos\nLB🇱🇧961Lebanon\nLR🇱🇷231Liberia\nLY🇱🇾218Libya234\nLC🇱🇨1758Saint Lucia34\nLI🇱🇮423Liechtenstein\nLK🇱🇰94Sri Lanka234\nLS🇱🇸266Lesotho233\nLT🇱🇹370Lithuania35\nLU🇱🇺352Luxembourg\nLV🇱🇻371Latvia35\nMA🇲🇦212Morocco234\nMC🇲🇨377Monaco44\nMD🇲🇩373Moldova233\nMG🇲🇬261Madagascar2232\nMP🇲🇵1670Northern Mariana Islands34\nMO🇲🇴853Macau\nMS🇲🇸1664Montserrat34\nMV🇲🇻960Maldives\nMX🇲🇽52Mexico\nMH🇲🇭692Marshall Islands\nMK🇲🇰389Macedonia\nML🇲🇱223Mali44\nMT🇲🇹356Malta2222\nMM🇲🇲95Myanmar\nME🇲🇪382Montenegro\nMN🇲🇳976Mongolia\nMZ🇲🇿258Mozambique234\nMQ🇲🇶596Martinique\nMR🇲🇷222Mauritania44\nMU🇲🇺230Mauritius\nMW🇲🇼265Malawi\nMY🇲🇾60Malaysia\nNA🇳🇦264Namibia234\nNC🇳🇨687New Caledonia6\nNE🇳🇪227Niger2222\nNF🇳🇫672Norfolk Island\nNG🇳🇬234Nigeria\nNI🇳🇮505Nicaragua44\nNL🇳🇱31Netherlands12222\nNO🇳🇴47Norway44\nNP🇳🇵977Nepal\nNU🇳🇺683Niue\nNR🇳🇷674Nauru\nNZ🇳🇿64New Zealand\nOM🇴🇲968Oman44\nPK🇵🇰92Pakistan334\nPA🇵🇦507Panama44\nPE🇵🇪51Peru333\nPF🇵🇫689French Polynesia\nPH🇵🇭63Philippines334\nPM🇵🇲508Saint Pierre and Miquelon\nPR🇵🇷1Puerto Rico334\nPS🇵🇸970Palestine324\nPW🇵🇼680Palau\nPG🇵🇬675Papua New Guinea\nPL🇵🇱48Poland333\nKP🇰🇵850North Korea\nPT🇵🇹351Portugal144\nPY🇵🇾595Paraguay333\nQA🇶🇦974Qatar\nRE🇷🇪262Réunion333\nRO🇷🇴40Romania333\nRU🇷🇺7Russia3322\nRW🇷🇼250Rwanda333\nSA🇸🇦966Saudi Arabia\nSD🇸🇩249Sudan234\nSN🇸🇳221Senegal234\nSG🇸🇬65Singapore44\nSH🇸🇭290Saint Helena23\nSH🇸🇭247Saint Helena4\nSB🇸🇧677Solomon Islands\nSL🇸🇱232Sierra Leone233\nSV🇸🇻503El Salvador44\nSM🇸🇲378San Marino334\nSO🇸🇴252Somalia233\nRS🇷🇸381Serbia234\nSS🇸🇸211South Sudan234\nST🇸🇹239São Tomé and Príncipe25\nSR🇸🇷597Suriname34\nSK🇸🇰421Slovakia\nSI🇸🇮386Slovenia\nSE🇸🇪46Sweden234\nSZ🇸🇿268Swaziland44\nSC🇸🇨248Seychelles1222\nSX🇸🇽1721Sint Maarten34\nSY🇸🇾963Syria\nTC🇹🇨1649Turks and Caicos Islands34\nTD🇹🇩235Chad2222\nTG🇹🇬228Togo233\nTH🇹🇭66Thailand144\nTJ🇹🇯992Tajikistan\nTK🇹🇰690Tokelau\nTM🇹🇲993Turkmenistan26\nTL🇹🇱670Timor-Leste\nTO🇹🇴676Tonga\nTT🇹🇹1868Trinidad and Tobago34\nTN🇹🇳216Tunisia233\nTR🇹🇷90Turkey334\nTV🇹🇻688Tuvalu\nTW🇹🇼886Taiwan\nTZ🇹🇿255Tanzania234\nUG🇺🇬256Uganda234\nUA🇺🇦380Ukraine2322\nUY🇺🇾598Uruguay44\nUS🇺🇸1United States334\nUZ🇺🇿998Uzbekistan27\nVA🇻🇦3Vatican City\nVC🇻🇨1784Saint Vincent and the Grenadines34\nVE🇻🇪58Venezuela334\nVG🇻🇬1284British Virgin Islands34\nVI🇻🇮1340US Virgin Islands34\nVN🇻🇳84Vietnam\nVU🇻🇺678Vanuatu\nWF🇼🇫681Wallis and Futuna\nWS🇼🇸685Samoa\nXK🇽🇰383Kosovo44\nYE🇾🇪967Yemen333\nZA🇿🇦27South Africa234\nZM🇿🇲260Zambia234\nZW🇿🇼263Zimbabwe234".split("\n").map((e=>({id:e.substr(0,2),flag:e.substr(2,4),code:`+${e.match(/\d+/)[0]}`,name:e.split(/\d+/)[1],phoneFormat:function(e){if(!e)return o;const t=e[0];let n;if(!r[t]){const e=t.split("").map(Number);n=e.reduce(((e,t,n)=>`${e}(\\d{1,${t}})${n>0?"?":""}`),""),r[t]=new RegExp(`${n}${"()?".repeat(5-e.length)}`)}return r[t]}(e.match(/\d+$/))})));function a(e){return d.find((t=>t.id===e))}function u(e){let t=e.replace(/[^\d+]+/g,"");t.startsWith("+")||(t=`+${t}`);const n=d.filter((e=>t.startsWith(e.code))).sort(((e,t)=>e.code.length-t.code.length));return n[n.length-1]}function s(e,t){let n=e.replace(/[^\d]+/g,"");if(t)n=n.substr(t.code.length-1);else if(e.startsWith("+"))return e;return n=n.replace(function(e){return e?e.phoneFormat:o}(t),((e,n,r,o,d,a)=>{const u=t&&"GB"===t.id?" ":"-";let s="";return n&&(s=`${n}`),r&&(s+=` ${r}`),o&&(s+=`${u}${o}`),d&&(s+=`${u}${d}`),a&&(s+=`${u}${a}`),s})),n}function i(e){const t=e.startsWith("+")?e:`+${e}`,n=u(t);return n?`${n.code} ${s(t,n)}`:t}},9118:(e,t,n)=>{function r(e,t,n=!0,r=!0){let o;return(...d)=>{o?(clearTimeout(o),o=void 0):n&&e(...d),o=self.setTimeout((()=>{r&&e(...d),o=void 0}),t)}}function o(e,t,n=!0){let r,o,d;return(...a)=>{o=!0,d=a,r||(n&&(o=!1,e(...d)),r=self.setInterval((()=>{if(!o)return self.clearInterval(r),void(r=void 0);o=!1,e(...d)}),t))}}function d(e){return u(p,e)}function a(e){return u(g,e)}function u(e,t){let n,r=!1;return(...o)=>{n=o,r||(r=!0,e((()=>{r=!1,t(...n)})))}}function s(e){Promise.resolve().then(e)}function i(e){self.requestIdleCallback?self.requestIdleCallback(e):s(e)}n.d(t,{Ds:()=>r,P2:()=>o,mS:()=>d,wT:()=>a,R3:()=>s,Q8:()=>i,wO:()=>c,Pn:()=>l,T2:()=>p,Gq:()=>y});const c=e=>new Promise((t=>{setTimeout((()=>t()),e)}));function l(){return new Promise((e=>{p(e)}))}let f,h,m;function p(e,t=!1){f?t?h.push(e):f.push(e):(f=t?[]:[e],h=t?[e]:[],requestAnimationFrame((()=>{const e=f,t=h;f=void 0,h=void 0,t.forEach((e=>e())),e.forEach((e=>e()))})))}function g(e){p(e,!0)}function y(e,t=!1){return m||(m=[],self.addEventListener("beforeunload",(()=>{m.forEach((e=>e()))}))),t?m.push(e):m.unshift(e),()=>{m=m.filter((t=>t!==e))}}},5765:(e,t,n)=>{let r;n.d(t,{Z:()=>o});try{r=new RegExp("[^\\p{L}\\p{M}]+","ui")}catch(e){r=new RegExp("[^\\wа-яё]+","i")}function o(e,t){if(!e||!t)return!1;const n=e.toLowerCase().split(r);return t.toLowerCase().split(r).every((e=>n.some((t=>t.startsWith(e)))))}},2267:(e,t,n)=>{n.d(t,{b:()=>r});const r=e=>Math.floor(Date.now()/1e3)+e},4688:(e,t,n)=>{n.d(t,{f3:()=>m,jv:()=>l,ti:()=>i,Qw:()=>h,K8:()=>f,wX:()=>c});function r(e){return new Promise(((t,n)=>{e.oncomplete=e.onsuccess=()=>t(e.result),e.onabort=e.onerror=()=>n(e.error)}))}let o;function d(){return o||(o=function(e,t){const n=function(){if(navigator.userAgentData||!/Safari\//.test(navigator.userAgent)||/Chrom(e|ium)\//.test(navigator.userAgent)||!indexedDB.databases)return Promise.resolve();let e;return new Promise((t=>{const n=()=>indexedDB.databases().finally(t);e=setInterval(n,100),n()})).finally((()=>clearInterval(e)))}().then((()=>{const e=indexedDB.open("keyval-store");return e.onupgradeneeded=()=>e.result.createObjectStore(t),r(e)}));return(e,r)=>n.then((n=>r(n.transaction(t,e).objectStore(t))))}(0,"keyval")),o}var a=n(3716),u=n(9524);const s=[1,2,3,4,5];function i(e=!1){if(e&&localStorage.getItem(a.Vx))return!0;const t=localStorage.getItem(a.b_);if(!t)return!1;try{const e=JSON.parse(t);return Boolean(e&&e.id&&e.dcID)}catch(e){return!1}}function c(e,t){const{mainDcId:n,keys:r,hashes:o}=e;localStorage.setItem(a.b_,JSON.stringify({dcID:n,id:t})),localStorage.setItem("dc",String(n)),Object.keys(r).map(Number).forEach((e=>{localStorage.setItem(`dc${e}_auth_key`,JSON.stringify(r[e]))})),Object.keys(o).map(Number).forEach((e=>{localStorage.setItem(`dc${e}_hash`,JSON.stringify(o[e]))}))}function l(){[a.b_,"dc",...s.map((e=>`dc${e}_auth_key`)),...s.map((e=>`dc${e}_hash`))].forEach((e=>{localStorage.removeItem(e)}))}function f(){if(!i())return;const e=JSON.parse(localStorage.getItem(a.b_)),t=Number(e.dcID),n={},r={};return s.forEach((e=>{try{const t=localStorage.getItem(`dc${e}_auth_key`);t&&(n[e]=JSON.parse(t));const o=localStorage.getItem(`dc${e}_hash`);o&&(r[e]=JSON.parse(o))}catch(e){a.eM&&console.warn("Failed to load stored session",e)}})),Object.keys(n).length?{mainDcId:t,keys:n,hashes:r}:void 0}async function h(){const e=localStorage.getItem(a.Vx);if(!e)return;const t=await function(e,t=d()){return t("readonly",(t=>r(t.get(e))))}(`GramJs:${e}`);try{c(JSON.parse(t))}catch(e){a.eM&&console.warn("Failed to load legacy session",e)}}async function m(){localStorage.removeItem(a.Vx);const e=await function(e=d()){const t=[];return function(e,t){return e("readonly",(e=>(e.openCursor().onsuccess=function(){this.result&&(t(this.result),this.result.continue())},r(e.transaction))))}(e,(e=>t.push(e.key))).then((()=>t))}();await Promise.all([u.clear("GramJs"),...e.filter((e=>"string"==typeof e&&e.startsWith("GramJs:GramJs-session-"))).map((e=>function(e,t=d()){return t("readwrite",(t=>(t.delete(e),r(t.transaction))))}(e)))])}},6917:(e,t,n)=>{n.d(t,{Z:()=>i});var r=n(9933);const o=JSON.parse('{"--color-primary":["#50A2E9","#8378DB"],"--color-primary-opacity":["#50A2E980","#8378DB80"],"--color-primary-shade":["#4a95d6","#7b71c6"],"--color-background":["#FFFFFF","#212121"],"--color-background-secondary":["#f4f4f5","#121212"],"--color-background-secondary-accent":["#E4E4E5","#100f10"],"--color-background-own":["#EEFEDF","#8378DB"],"--color-background-own-apple":["#E7FDCC","#8378DB"],"--color-background-selected":["#F4F4F5","#2C2C2C"],"--color-background-own-selected":["#d4fcae","#7b71c6"],"--color-chat-hover":["#F4F4F5","#2C2C2C"],"--color-chat-active":["#4C90E6","#8378DB"],"--color-item-active":["#ededed","#292929"],"--color-text":["#000000","#FFFFFF"],"--color-text-secondary":["#707579","#AAAAAA"],"--color-text-secondary-apple":["#8E8E92","#AAAAAA"],"--color-borders":["#DADCE0","#303030"],"--color-borders-input":["#DADCE0","#5B5B5A"],"--color-dividers":["#C8C6CC","#404040"],"--color-links":["#52A1EF","#868DF6"],"--color-links-hover":["#2d8dec","#6b5fcc"],"--color-gray":["#C4C9CC","#717579"],"--color-pinned":["#C4C9CC","#707579"],"--color-default-shadow":["#72727240","#1010109c"],"--color-light-shadow":["#7272722B","#00000040"],"--color-green":["#4DCD5E","#8378DB"],"--color-text-meta-colored":["#4DCD5E","#8378DB"],"--color-reply-hover":["#F4F4F4","#272727"],"--color-reply-active":["#E8E9E9","#2E2F2F"],"--color-reply-own-hover":["#DBF4CE","#6458bc"],"--color-reply-own-hover-apple":["#d9f9c1","#6458bc"],"--color-reply-own-active":["#C8EBBC","#4F4A9F"],"--color-reply-own-active-apple":["#d5edc2","#4F4A9F"],"--color-accent-own":["#4FAE4E","#FFFFFF"],"--color-message-meta-own":["#4FAE4EFF","#FFFFFF88"],"--color-own-links":["#52A1EF","#FFFFFF"],"--color-code":["#4a729a","#93c4ef"],"--color-code-own":["#3c7940","#FFFFFF"],"--color-code-bg":["#70757914","#ffffff26"],"--color-code-own-bg":["#70757914","#ffffff26"]}');let d=!1;const a=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?$/i,u=(e,t,n)=>(1-n)*e+n*t,s=Object.keys(o).map((e=>({property:e,colors:[c(o[e][0]),c(o[e][1])]}))),i=(e,t)=>{const n="dark"===e,o=d&&t,a=n?0:1,u=n?1:0,s=Date.now(),i=document.querySelector('meta[name="theme-color"]');document.documentElement.classList.remove("theme-"+(n?"light":"dark")),d&&document.documentElement.classList.add("no-animations"),document.documentElement.classList.add(`theme-${e}`),i&&i.setAttribute("content",n?"#212121":"#fff"),setTimeout((()=>{document.documentElement.classList.remove("no-animations")}),500),d=!0,o?(0,r.c)((()=>{const e=Math.min((Date.now()-s)/200,1);return l(a,u,function(e){return 1-(1-e)**3.5}(e)),e<1})):l(a,u)};function c(e){const t=a.exec(e);return{r:parseInt(t[1],16),g:parseInt(t[2],16),b:parseInt(t[3],16),a:void 0!==t[4]?parseInt(t[4],16):void 0}}function l(e,t,n=1){s.forEach((({property:r,colors:o})=>{const d=Math.round(u(o[e].r,o[t].r,n)),a=Math.round(u(o[e].g,o[t].g,n)),s=Math.round(u(o[e].b,o[t].b,n)),i=void 0!==o[e].a?Math.round(u(o[e].a,o[t].a,n)):void 0;document.documentElement.style.setProperty(r,void 0!==i?`rgba(${d},${a},${s},${i/255})`:`rgb(${d},${a},${s})`)}))}},2155:(e,t,n)=>{function r(e){return String(e).replace(/\d(?=(\d{3})+$)/g,"$& ")}function o(e){return".0"===String(e.toFixed(1)).substr(-2)?Math.round(e):e.toFixed(1).replace(".",",")}function d(e){return e<1e3?e:e<1e6?`${o(e/1e3)}K`:`${o(e/1e6)}M`}function a(e,t=2){return e.replace(/[.,!@#$%^&*()_+=\-`~[\]/\\{}:"|<>?]+/gi,"").trim().split(/\s+/).slice(0,t).map((e=>e.length&&e.match(/./u)[0].toUpperCase())).join("")}n.d(t,{kh:()=>r,bi:()=>d,Xv:()=>a})},8035:(e,t,n)=>{function r(e,t=30){return!e||e.length<=t?e:`${e.substr(0,t)}...`}n.d(t,{Z:()=>r})},862:(e,t,n)=>{n.d(t,{Hu:()=>s,_y:()=>i,p6:()=>c});var r=n(7361),o=n(1394),d=n(9118);let a,u;const s="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII=";async function i(e,t){for(l();!u.wasmReady;)await(0,d.wO)(2e3);const{result:n,width:r,height:o}=await function(e,t){return new Promise((n=>{u.requests||(u.requests=new Map),u.requests.set(e,n),u.postMessage({id:e,blob:t})}))}(e,t);if(r&&o)return function({result:e,width:t,height:n}){return a||(a=document.createElement("canvas")),new Promise((r=>{const o=new ImageData(e,t,n);a.width=t,a.height=n,a.getContext("2d").putImageData(o,0,0),a.toBlob((e=>{r(null!=e?e:void 0)}),"image/png",1)}))}({result:n,width:r,height:o})}async function c(e,t){if((0,r.on)()||"data:image/webp"!==t.substr(0,15))return t;l();const n=await i(e,(0,o.A9)(t));if(!n)throw new Error(`Can't convert webp to png. Url: ${t}`);return(0,o.YJ)(n)}function l(){u||(u=new Worker(new URL(n.p+n.u(536),n.b)),u.wasmReady=!1,u.onmessage=f)}function f(e){const{id:t}=e.data;switch(e.data.type){case"initialized":u.wasmReady=!0;break;case"result":if(u.requests.has(t)){const n=u.requests.get(t);u.requests.delete(t),n(e.data)}}}},1622:(e,t,n)=>{n.d(t,{I:()=>l,p:()=>f});var r=n(3716),o=n(5116),d=n(4688);const a=["t.me","telegram.me"].map((e=>`//${e}/_websync_?`)),u=`${r.Ji} Z`,s="tgme_sync",i=()=>Math.floor(Number(new Date)/1e3);let c;const l=e=>{const t=i(),{canRedirect:n,ts:r}=JSON.parse(localStorage.getItem(s)||"{}");return n!==e||r+86400<=t?Promise.all(a.map((t=>new Promise(((n,r)=>{const o=document.createElement("script"),d=()=>!!document.body.removeChild(o);o.src=t+new URLSearchParams({authed:Number(e).toString(),version:u}),document.body.appendChild(o),o.onload=()=>{(e=>{const t=i();localStorage.setItem(s,JSON.stringify({canRedirect:e,ts:t}))})(e),d(),c&&(clearTimeout(c),c=void 0),f(),n()},o.onerror=()=>{d(),r()}}))))):Promise.resolve()};function f(){if(r.eM)return;if(void 0!==c)return;const e=i(),{ts:t}=JSON.parse(localStorage.getItem(s)||"{}"),n=86400-(e-t);c=setTimeout((()=>{const{authState:e}=(0,o.Rd)(),t="authorizationStateReady"===e||(0,d.ti)(!0);l(t)}),Math.max(0,1e3*n))}},3858:(e,t,n)=>{n.d(t,{z:()=>l,Z:()=>h});var r=n(9118),o=n(3716),d=n(7361);const a=d.wB&&f(),u=window.innerHeight;let s=l(),i=!1;const c=(0,r.P2)((()=>{s=l(),!i&&((s.width<=o.l3||s.width<=o.u_&&s.height<=o.rO)!==d.wB||d.wB&&a!==f())&&window.location.reload()}),250,!0);function l(){const e=.01*window.innerHeight;return document.documentElement.style.setProperty("--vh",`${e}px`),{width:window.innerWidth,height:window.innerHeight}}function f(){return d.cj?window.matchMedia("(orientation: landscape)").matches:window.matchMedia("screen and (min-device-aspect-ratio: 1/1) and (orientation: landscape)").matches}window.addEventListener("resize",c),window.addEventListener("orientationchange",c);const h={get:()=>s,getIsKeyboardVisible:()=>u>s.height,disableRefresh:function(){i=!0},enableRefresh:function(){i=!1}}},5359:(e,t,n)=>{e.exports=n.p+"app-inactive.bc7953c2dfebcabce2c4..png"},2162:(e,t,n)=>{e.exports=n.p+"monkey.a3d5fcdc50b18dc55695..svg"},4128:(e,t,n)=>{e.exports=n.p+"telegram-logo.df3a91becaa9678c529b..svg"}},u={};function s(e){var t=u[e];if(void 0!==t)return t.exports;var n=u[e]={exports:{}};return a[e].call(n.exports,n,n.exports,s),n.exports}s.m=a,s.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return s.d(t,{a:t}),t},t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,s.t=function(n,r){if(1&r&&(n=this(n)),8&r)return n;if("object"==typeof n&&n){if(4&r&&n.__esModule)return n;if(16&r&&"function"==typeof n.then)return n}var o=Object.create(null);s.r(o);var d={};e=e||[null,t({}),t([]),t(t)];for(var a=2&r&&n;"object"==typeof a&&!~e.indexOf(a);a=t(a))Object.getOwnPropertyNames(a).forEach((e=>d[e]=()=>n[e]));return d.default=()=>n,s.d(o,d),o},s.d=(e,t)=>{for(var n in t)s.o(t,n)&&!s.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},s.f={},s.e=e=>Promise.all(Object.keys(s.f).reduce(((t,n)=>(s.f[n](e,t),t)),[])),s.u=e=>e+"."+{25:"da67b19a5cfee9980b17",99:"f03a947e6e336feffec8",133:"8f3170a56a2ba81b4c7f",161:"286d0207d962142ad548",347:"0535b78942e76e3ace0e",354:"1bc54858be4d8e0e67cf",472:"21e5264f606f2b525030",484:"36788fd4ebb103a6b813",501:"72ce4b6e27f459e194cd",514:"b19249601300cb97b248",524:"6302a458d7e569e4763a",536:"55dc7dd4ab42a2c9f037",745:"9316c5c2b711c39a20a5",915:"8fb9f0f20311fa368dc5",941:"74ee93d332e344855ed7",993:"f0aad9f6787f211b4e51"}[e]+".js",s.miniCssF=e=>e+"."+{25:"da67b19a5cfee9980b17",133:"8f3170a56a2ba81b4c7f",347:"0535b78942e76e3ace0e",472:"21e5264f606f2b525030",484:"36788fd4ebb103a6b813"}[e]+".css",s.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n={},r="telegram-t:",s.l=(e,t,o,d)=>{if(n[e])n[e].push(t);else{var a,u;if(void 0!==o)for(var i=document.getElementsByTagName("script"),c=0;c{a.onerror=a.onload=null,clearTimeout(h);var o=n[e];if(delete n[e],a.parentNode&&a.parentNode.removeChild(a),o&&o.forEach((e=>e(r))),t)return t(r)},h=setTimeout(f.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=f.bind(null,a.onerror),a.onload=f.bind(null,a.onload),u&&document.head.appendChild(a)}},s.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;s.g.importScripts&&(e=s.g.location+"");var t=s.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(/\/[^\/]+$/,"/"),s.p=e})(),o=e=>new Promise(((t,n)=>{var r=s.miniCssF(e),o=s.p+r;if(((e,t)=>{for(var n=document.getElementsByTagName("link"),r=0;r{var o=document.createElement("link");o.rel="stylesheet",o.type="text/css",o.onerror=o.onload=d=>{if(o.onerror=o.onload=null,"load"===d.type)n();else{var a=d&&("load"===d.type?"missing":d.type),u=d&&d.target&&d.target.href||t,s=new Error("Loading CSS chunk "+e+" failed.\n("+u+")");s.code="CSS_CHUNK_LOAD_FAILED",s.type=a,s.request=u,o.parentNode.removeChild(o),r(s)}},o.href=t,document.head.appendChild(o)})(e,o,t,n)})),d={179:0},s.f.miniCss=(e,t)=>{d[e]?t.push(d[e]):0!==d[e]&&{25:1,133:1,347:1,472:1,484:1}[e]&&t.push(d[e]=o(e).then((()=>{d[e]=0}),(t=>{throw delete d[e],t})))},(()=>{s.b=document.baseURI||self.location.href;var e={179:0};s.f.j=(t,n)=>{var r=s.o(e,t)?e[t]:void 0;if(0!==r)if(r)n.push(r[2]);else{var o=new Promise(((n,o)=>r=e[t]=[n,o]));n.push(r[2]=o);var d=s.p+s.u(t),a=new Error;s.l(d,(n=>{if(s.o(e,t)&&(0!==(r=e[t])&&(e[t]=void 0),r)){var o=n&&("load"===n.type?"missing":n.type),d=n&&n.target&&n.target.src;a.message="Loading chunk "+t+" failed.\n("+o+": "+d+")",a.name="ChunkLoadError",a.type=o,a.request=d,r[1](a)}}),"chunk-"+t,t)}};var t=(t,n)=>{var r,o,[d,a,u]=n,i=0;for(r in a)s.o(a,r)&&(s.m[r]=a[r]);for(u&&u(s),t&&t(n);i{s(3592);var e=s(3716),t=s(5116),n=s(7361),r=s(8406);function o(n){const o=n.data;if(e.eM&&console.log("[SW] Message from worker",o),!o.type)return;const d=(0,t.uC)();switch(o.type){case"focusMessage":d.focusMessage&&d.focusMessage(o.payload);break;case"playNotificationSound":(0,r.s_)(o.payload.id)}}function d(){navigator.serviceWorker.removeEventListener("message",o),navigator.serviceWorker.addEventListener("message",o),(0,r.KC)()}n.Mc&&(window.addEventListener("load",(async()=>{try{await navigator.serviceWorker.register(new URL(s.p+s.u(524),s.b)),e.eM&&console.log("[SW] ServiceWorker registered"),await navigator.serviceWorker.ready,navigator.serviceWorker.controller?(e.eM&&console.log("[SW] ServiceWorker ready"),d()):(e.eM&&console.error("[SW] ServiceWorker not available"),n.cj||n.wZ||(0,t.uC)().showDialog({data:{message:"SERVICE_WORKER_DISABLED",hasErrorKey:!0}}))}catch(t){e.eM&&console.error("[SW] ServiceWorker registration failed: ",t)}})),window.addEventListener("focus",(async()=>{await navigator.serviceWorker.ready,d()})));var a=s(2916);const u={isLeftColumnShown:!0,isChatInfoShown:!1,newChatMembersProgress:s(1713).WB.Closed,uiReadyState:0,serverTimeOffset:0,authRememberMe:!0,blocked:{ids:[],totalCount:0},users:{byId:{}},chats:{listIds:{},isFullyLoaded:{},orderedPinnedIds:{},totalCount:{},byId:{}},messages:{byChatId:{},messageLists:[]},scheduledMessages:{byChatId:{}},chatFolders:{byId:{},activeChatFolder:0},fileUploads:{byMessageLocalId:{}},recentEmojis:["grinning","kissing_heart","christmas_tree","brain","trophy"],stickers:{setsById:{},added:{},recent:{stickers:[]},favorite:{stickers:[]},greeting:{stickers:[]},featured:{setIds:[]},search:{},forEmoji:{}},emojiKeywords:{},gifs:{saved:{},search:{}},inlineBots:{isLoading:!1,byUsername:{}},globalSearch:{},userSearch:{},localTextSearch:{byChatThreadKey:{}},localMediaSearch:{byChatId:{}},management:{byChatId:{}},topPeers:{},topInlineBots:{},mediaViewer:{},audioPlayer:{},forwardMessages:{},pollResults:{},payment:{},notifications:[],dialogs:[],activeSessions:[],settings:{byKey:{theme:"light",shouldUseSystemTheme:!0,messageTextSize:n.cj?e.b6:n.jm?e.AR:e.xS,animationLevel:e.CX,messageSendKeyCombo:"enter",shouldAutoDownloadMediaFromContacts:!0,shouldAutoDownloadMediaInPrivateChats:!0,shouldAutoDownloadMediaInGroups:!0,shouldAutoDownloadMediaInChannels:!0,hasWebNotifications:!0,hasPushNotifications:!0,notificationSoundVolume:5,shouldAutoPlayGifs:!0,shouldAutoPlayVideos:!0,shouldSuggestStickers:!0,shouldLoopStickers:!0,language:"en"},themes:{light:{isBlurred:!0,patternColor:e.g},dark:{isBlurred:!0,patternColor:e.Vv}},privacy:{},notifyExceptions:{}},twoFaSettings:{},shouldShowContextMenuHint:!0};var i=s(6137),c=s(9118),l=s(8674),f=s(782),h=s(8085),m=s(4688);const p=(0,c.P2)((()=>(0,c.Q8)(I)),5e3,!1);let g,y=!1,b=!1;function v(){y=!0,g=(0,c.Gq)(I,!0),window.addEventListener("blur",I),(0,t.ll)(p)}function w(){y=!1,(0,t.Iq)(p),window.removeEventListener("blur",I),g&&g()}function I(){if(!y||b)return;const n=(0,t.Rd)();if(n.isLoggingOut)return;const r={...u,...(0,f.ei)(n,["authState","authPhoneNumber","authRememberMe","authNearestCountry","currentUserId","contactList","topPeers","topInlineBots","recentEmojis","push","shouldShowContextMenuHint"]),isChatInfoShown:C(n),users:S(n),chats:E(n),messages:P(n),globalSearch:{recentlyFoundChatIds:n.globalSearch.recentlyFoundChatIds},settings:M(n),chatFolders:A(n)},o=JSON.stringify(r);localStorage.setItem(e.Uh,o)}function C(t){return window.innerWidth>e._m&&t.isChatInfoShown}function S(t){const{users:{byId:n,selectedId:r}}=t,o=[...(t.chats.listIds.active||[]).slice(0,e.gJ).filter((e=>e>0)),...Object.keys(n)].slice(0,e.lO);return{byId:(0,f.ei)(n,o),selectedId:window.innerWidth>e._m?r:void 0}}function E(t){const n=[...(t.chats.listIds.active||[]).slice(0,e.gJ)],{chatId:r}=(0,h.Bt)(t)||{};return{...t.chats,byId:(0,f.ei)(t.chats.byId,r?[...n,r]:n),listIds:{active:n},isFullyLoaded:{},orderedPinnedIds:{active:t.chats.orderedPinnedIds.active}}}function P(t){const r={},{chatId:o}=(0,h.Bt)(t)||{};[...(t.chats.listIds.active||[]).slice(0,e.gJ),...o?[o]:[]].forEach((e=>{const n=t.messages.byChatId[e];if(!n)return;const o=n.threadsById[i._f];o&&o.viewportIds&&(r[e]={byId:(0,f.ei)(n.byId,o.viewportIds),threadsById:{[i._f]:o}})}));const d=(0,h.Bt)(t);return{byChatId:r,messageLists:!d||n.wB?[]:[{...d,threadId:i._f,type:"thread"}]}}function M(e){const{byKey:t,themes:n}=e.settings;return{byKey:t,themes:n,privacy:{},notifyExceptions:{}}}function A(e){return{...e.chatFolders,activeChatFolder:0}}document.addEventListener(l._L,(()=>{b=!0})),document.addEventListener(l.OV,(()=>{b=!1})),e.sd||((0,t.Q6)("saveSession",(()=>{y||v()})),(0,t.Q6)("reset",(()=>{localStorage.removeItem(e.Uh),y&&w()}))),(0,t.Q6)("init",(()=>{const t=(0,f.Xh)(u);return function(t){if(!e.sd)return(0,m.ti)(!0)?(v(),function(t){e.eM&&console.time("global-state-cache-read");const n=localStorage.getItem(e.Uh),r=n?JSON.parse(n):void 0;return e.eM&&console.timeEnd("global-state-cache-read"),r&&(r.settings.byKey={...t.settings.byKey,...r.settings.byKey},r.settings.themes={...t.settings.themes,...r.settings.themes},r.chatFolders={...t.chatFolders,...r.chatFolders},r.messages.messageLists||(r.messages.messageLists=t.messages.messageLists),r.stickers.greeting||(r.stickers.greeting=t.stickers.greeting)),{...t,...r}}(t)):void w()}(t)||t}));var T=s(4050),k=s(3858);const N="tt-active-tab",R=String(Date.now()+Math.random());let L;localStorage.setItem(N,R);const D=window.setInterval((()=>{L&&localStorage.getItem(N)!==R&&(L(),clearInterval(D))}),2e3);var O=s(706),x=(s(7895),s(3781),s(1363),s(9667),s(4907),s(6590)),Z=s(8332),_=s(1212),B=s(1394);const F=["400 1em Roboto","500 1em Roboto"];function U(){if("fonts"in document)return Promise.all(F.map((e=>document.fonts.load(e))))}var $=s(647),G=s(9203),j=s(6752),W=s(4128),H=s(2162);function V(){const{listIds:e,byId:n}=(0,t.Rd)().chats;if(e.active)return Promise.all(e.active.slice(0,10).map((e=>{const t=n[e];if(!t)return;const r=(0,Z.RT)(t);return r?$.he(r,i.IU.DataUri):void 0})))}const K={main:()=>Promise.all([(0,G.$y)(G.gl.Main,"Main").then(U),V()]),authPhoneNumber:()=>Promise.all([U(),(0,B.pt)(W)]),authCode:()=>(0,B.pt)(H),authPassword:()=>(0,B.pt)(H),authQrCode:U},z=(0,t.c$)((e=>{const t=(0,h.Pu)(e),{background:n,backgroundColor:r}=e.settings.themes[t]||{};return{shouldSkipHistoryAnimations:e.shouldSkipHistoryAnimations,uiReadyState:e.uiReadyState,hasCustomBackground:Boolean(n),hasCustomBackgroundColor:Boolean(r),isRightColumnShown:(0,h.Jf)(e)}}),((e,t)=>(0,f.ei)(t,["setIsUiReady"])))((({page:e,children:t,hasCustomBackground:n,hasCustomBackgroundColor:r,isRightColumnShown:o,shouldSkipHistoryAnimations:d,setIsUiReady:a})=>{const[u,s]=(0,O.Z)(),{shouldRender:i,transitionClassNames:l}=(0,_.Z)(!u,void 0,!0);return(0,T.d4)((()=>{let t;return Promise.race([(0,c.wO)(700),(async()=>{try{await K[e]()}catch(e){}})()]).then((()=>{s(),a({uiReadyState:1}),t=window.setTimeout((()=>{a({uiReadyState:2})}),1e3)})),()=>{t&&(clearTimeout(t),t=void 0),a({uiReadyState:0})}}),[]),T.ZP.createElement("div",{id:"UiLoader"},t,i&&!d&&T.ZP.createElement("div",{className:(0,j.Z)("mask",l)},"main"===e?T.ZP.createElement(T.ZP.Fragment,null,T.ZP.createElement("div",{className:"left"}),T.ZP.createElement("div",{className:(0,j.Z)("middle",n&&"custom-bg-image",r&&"custom-bg-color",o&&"with-right-column")}),o&&T.ZP.createElement("div",{className:"right"})):T.ZP.createElement("div",{className:"blank"})))}));var Q=s(2969),J=s(663),q=s(9107);const Y=(e,t)=>{const[n,r]=(0,T.eJ)();return e&&J.Pn(e,t).then(r),n};function X(){let e=navigator.language;return e&&"pt-br"!==e&&(e=e.substr(0,2)),e}var ee=s(231),te=s(4605),ne=s(7687),re=s(4288),oe=s(5765),de=s(2340),ae=s(3106),ue=s(8964),se=s(9204);const ie=200+e.fK,ce=(0,T.X$)((({id:e,value:t,isLoading:n,onChange:r})=>{const o=(0,q.Z)(),d=(0,T.sO)(null),[a,u]=(0,T.eJ)(),[s,i]=(0,T.eJ)(Q.Jm);function c(e){u(e),i(function(e=""){return e.length?Q.Jm.filter((t=>(0,oe.Z)(t.name,e))):Q.Jm}(e))}const l=(0,T.I4)((e=>{const{countryId:t}=e.currentTarget.firstElementChild.dataset,n=Q.Jm.find((e=>e.id===t));n&&r(n),setTimeout((()=>c(void 0)),ie)}),[r]),f=(0,T.I4)((e=>{c(e.currentTarget.value)}),[]),h=(0,T.I4)((e=>{if(8!==e.keyCode)return;const n=e.currentTarget;t&&void 0===a&&(n.value=""),c(n.value)}),[a,t]);return T.ZP.createElement(ae.Z,{className:"CountryCodeInput",trigger:({onTrigger:r,isOpen:u})=>{const s=()=>{if(u)return;setTimeout((()=>{d.current.select()}),50),r();const e=document.getElementById("auth-phone-number-form");e.scrollTo({top:e.scrollHeight,behavior:"smooth"})},i=void 0!==a?a:t&&t.name||"";return T.ZP.createElement("div",{className:(0,j.Z)("input-group",t&&"touched")},T.ZP.createElement("input",{ref:d,className:(0,j.Z)("form-control",u&&"focus"),type:"text",id:e,value:i,autoComplete:"off",onClick:s,onFocus:s,onInput:f,onKeyDown:h}),T.ZP.createElement("label",null,o("Login.SelectCountry.Title")),n?T.ZP.createElement(se.Z,{color:"black"}):T.ZP.createElement("i",{onClick:s,className:(0,j.Z)("css-icon-down",u&&"open")}))}},s.map((e=>T.ZP.createElement(ue.Z,{key:e.id,className:t&&e.id===t.id?"selected":"",onClick:l},T.ZP.createElement("span",{"data-country-id":e.id}),T.ZP.createElement("span",{className:"country-flag"},(0,de.Z)(e.flag,["hq_emoji"])),T.ZP.createElement("span",{className:"country-name"},e.name),T.ZP.createElement("span",{className:"country-code"},e.code)))),!s.length&&T.ZP.createElement(ue.Z,{key:"no-results",className:"no-results",disabled:!0},T.ZP.createElement("span",null,o("lng_country_none"))))}));let le=!1;const fe=(0,T.X$)((0,t.c$)((e=>{const{settings:{byKey:{language:t}}}=e;return{...(0,f.ei)(e,["connectionState","authState","authPhoneNumber","authIsLoading","authIsLoadingQrCode","authError","authRememberMe","authNearestCountry"]),language:t}}),((e,t)=>(0,f.ei)(t,["setAuthPhoneNumber","setAuthRememberMe","clearAuthError","loadNearestCountry","goToAuthQrCode","setSettingOption"])))((({connectionState:e,authState:t,authPhoneNumber:r,authIsLoading:o,authIsLoadingQrCode:d,authError:a,authRememberMe:u,authNearestCountry:s,language:i,setAuthPhoneNumber:c,setAuthRememberMe:l,loadNearestCountry:f,clearAuthError:h,goToAuthQrCode:m,setSettingOption:p})=>{const g=(0,q.Z)(),y=(0,T.sO)(null),b=X(),v=Y(b,"ContinueOnThisLanguage"),[w,I]=(0,T.eJ)(),[C,S]=(0,T.eJ)(),[E,P]=(0,T.eJ)(!1),[M,A]=(0,T.eJ)(),[k,N,R]=(0,O.Z)(),L=w?`${w.code} ${C||""}`:C,D=L&&L.replace(/[^\d]+/g,"").length>=7;(0,T.d4)((()=>{n.$b||y.current.focus()}),[w]),(0,T.d4)((()=>{"connectionStateReady"!==e||s||f()}),[e,s,f]),(0,T.d4)((()=>{!s||w||E||I((0,Q.vQ)(s))}),[w,s,E]);const x=(0,T.I4)((e=>{e.length||S("");const t=(0,Q.g3)(e),n=!w||t&&t.id!==w.id||!t&&e.length?t:w;(!w||!n||n&&n.code!==w.code)&&I(n),S((0,Q.un)(e,n))}),[w]),Z=(0,T.I4)((()=>{N(),(0,J.m0)(b,(()=>{R(),p({language:b})}))}),[N,p,b,R]);(0,T.d4)((()=>{void 0===C&&r&&x(r)}),[r,C,x]),(0,T.bt)((()=>{y.current&&M&&y.current.setSelectionRange(...M)}),[M]);const _=(0,T.sO)(!1),F=(0,T.I4)((()=>{_.current=!0,requestAnimationFrame((()=>{_.current=!1}))}),[]),$=(0,T.I4)((e=>{a&&h(),le||(le=!0,U(),(0,B.pt)(H));const{value:t,selectionStart:r,selectionEnd:o}=e.target;A(r&&o&&o1&&!_.current;x(d?`${w.code} ${t}`:t)}),[a,h,w,L,x]),G=(0,T.I4)((e=>{l(e.target.checked)}),[l]),j="authorizationStateWaitPhoneNumber"===t;return T.ZP.createElement("div",{id:"auth-phone-number-form",className:"custom-scroll"},T.ZP.createElement("div",{className:"auth-form"},T.ZP.createElement("div",{id:"logo"}),T.ZP.createElement("h2",null,"Telegram"),T.ZP.createElement("p",{className:"note"},g("StartText")),T.ZP.createElement("form",{action:"",onSubmit:function(e){e.preventDefault(),o||D&&c({phoneNumber:L})}},T.ZP.createElement(ce,{id:"sign-in-phone-code",value:w,isLoading:!s&&!w,onChange:I}),T.ZP.createElement(ne.Z,{ref:y,id:"sign-in-phone-number",label:g("Login.PhonePlaceholder"),value:L,error:a&&g(a),inputMode:"tel",onChange:$,onPaste:n.s$?F:void 0}),T.ZP.createElement(te.Z,{id:"sign-in-keep-session",label:"Keep me signed in",checked:Boolean(u),onChange:G}),D&&(j?T.ZP.createElement(ee.Z,{type:"submit",ripple:!0,isLoading:o},g("Login.Next")):T.ZP.createElement(re.Z,null)),j&&T.ZP.createElement(ee.Z,{isText:!0,ripple:!0,isLoading:d,onClick:m},g("Login.QR.Login")),b&&b!==i&&v&&T.ZP.createElement(ee.Z,{isText:!0,isLoading:k,onClick:Z},v))))})));var he=s(8778);const me=(0,T.X$)((()=>{const e=(0,he.Z)(G.gl.Auth,"AuthCode");return e?T.ZP.createElement(e,null):T.ZP.createElement(re.Z,null)})),pe=(0,T.X$)((()=>{const e=(0,he.Z)(G.gl.Auth,"AuthPassword");return e?T.ZP.createElement(e,null):T.ZP.createElement(re.Z,null)})),ge=(0,T.X$)((()=>{const e=(0,he.Z)(G.gl.Auth,"AuthRegister");return e?T.ZP.createElement(e,null):T.ZP.createElement(re.Z,null)}));let ye=null;class be{}be.render=function(e,t){ye(e,t)},self.QrCreator=be,function(e){function t(t,n,r,o){var d={},a=e(r,n);a.u(t),a.J(),o=o||0;var u=a.h(),s=a.h()+2*o;return d.text=t,d.level=n,d.version=r,d.O=s,d.a=function(e,t){return t-=o,!(0>(e-=o)||e>=u||0>t||t>=u)&&a.a(e,t)},d}function n(e,t,n,r,o,d,a,u,s,i){function c(t,n,r,o,a,u,s){t?(e.lineTo(n+u,r+s),e.arcTo(n,r,o,a,d)):e.lineTo(n,r)}a?e.moveTo(t+d,n):e.moveTo(t,n),c(u,r,n,r,o,-d,0),c(s,r,o,t,o,0,-d),c(i,t,o,t,n,d,0),c(a,t,n,r,n,0,d)}function r(e,t,n,r,o,d,a,u,s,i){function c(t,n,r,o){e.moveTo(t+r,n),e.lineTo(t,n),e.lineTo(t,n+o),e.arcTo(t,n,t+r,n,d)}a&&c(t,n,d,d),u&&c(r,n,-d,d),s&&c(r,o,-d,-d),i&&c(t,o,d,-d)}function o(e,o){e:{var d=o.text,a=o.v,u=o.N,s=o.K,i=o.P;for(u=Math.max(1,u||1),s=Math.min(40,s||40);u<=s;u+=1)try{var c=t(d,a,u,i);break e}catch(e){}c=void 0}if(!c)return null;for(d=e.getContext("2d"),o.background&&(d.fillStyle=o.background,d.fillRect(o.left,o.top,o.size,o.size)),a=c.O,s=o.size/a,d.beginPath(),i=0;iMath.round(e*t.size))),"linear-gradient"===r)var d=e.createLinearGradient.apply(e,n);else{if("radial-gradient"!==r)throw Error("Unsupported fill");d=e.createRadialGradient.apply(e,n)}o.forEach((([e,t])=>{d.addColorStop(e,t)})),e.fillStyle=d}}(d,o),d.fill(),e}var d={minVersion:1,maxVersion:40,ecLevel:"L",left:0,top:0,size:200,fill:"#000",background:null,text:"no text",radius:.5,quiet:0};ye=function(e,t){var n={};Object.assign(n,d,e),n.N=n.minVersion,n.K=n.maxVersion,n.v=n.ecLevel,n.left=n.left,n.top=n.top,n.size=n.size,n.fill=n.fill,n.background=n.background,n.text=n.text,n.R=n.radius,n.P=n.quiet,t instanceof HTMLCanvasElement?(t.width===n.size&&t.height===n.size||(t.width=n.size,t.height=n.size),t.getContext("2d").clearRect(0,0,t.width,t.height),o(t,n)):((e=document.createElement("canvas")).width=n.size,e.height=n.size,n=o(e,n),t.appendChild(n))}}(function(){function e(o,a){function u(e,t){for(var n=-1;7>=n;n+=1)if(!(-1>=e+n||l<=e+n))for(var r=-1;7>=r;r+=1)-1>=t+r||l<=t+r||(c[e+n][t+r]=0<=n&&6>=n&&(0==r||6==r)||0<=r&&6>=r&&(0==n||6==n)||2<=n&&4>=n&&2<=r&&4>=r)}function s(e,n){for(var a=l=4*o+17,s=Array(a),m=0;m=y;y+=1)for(var b=-2;2>=b;b+=1)c[p+y][g+b]=-2==y||2==y||-2==b||2==b||0==y&&0==b}for(a=8;as;s+=1)m=!e&&1==(a>>s&1),c[6>s?s:8>s?s+1:l-15+s][8]=m,c[8][8>s?l-s-1:9>s?15-s:14-s]=m;if(c[l-8][8]=!e,7<=o){for(a=r.A(o),s=0;18>s;s+=1)m=!e&&1==(a>>s&1),c[Math.floor(s/3)][s%3+l-8-3]=m;for(s=0;18>s;s+=1)m=!e&&1==(a>>s&1),c[s%3+l-8-3][Math.floor(s/3)]=m}if(null==f){for(e=d.I(o,i),a=function(){var e=[],t=0,n={B:function(){return e},c:function(t){return 1==(e[Math.floor(t/8)]>>>7-t%8&1)},put:function(e,t){for(var r=0;r>>t-r-1&1))},f:function(){return t},m:function(n){var r=Math.floor(t/8);e.length<=r&&e.push(0),n&&(e[r]|=128>>>t%8),t+=1}};return n}(),s=0;s8*m)throw Error("code length overflow. ("+a.f()+">"+8*m+")");for(a.f()+4<=8*m&&a.put(0,4);0!=a.f()%8;)a.m(!1);for(;!(a.f()>=8*m||(a.put(236,8),a.f()>=8*m));)a.put(17,8);var v=0;for(m=s=0,p=Array(e.length),g=Array(e.length),y=0;yy;y+=1)null==c[s][g-y]&&(b=!1,p>>m&1)),n(s,g-y)&&(b=!b),c[s][g-y]=b,-1==--m&&(p+=1,m=7));if(0>(s+=a)||l<=s){s-=a,a=-a;break}}}var i=n[a],c=null,l=0,f=null,h=[],m={u:function(t){t=function(t){var n=e.s(t);return{S:function(){return 4},b:function(){return n.length},write:function(e){for(var t=0;te||l<=e||0>t||l<=t)throw Error(e+","+t);return c[e][t]},h:function(){return l},J:function(){for(var e=0,t=0,n=0;8>n;n+=1){s(!0,n);var o=r.D(m);(0==n||e>o)&&(e=o,t=n)}s(!1,t)}};return m}function t(e,n){if(void 0===e.length)throw Error(e.length+"/"+n);var r=function(){for(var t=0;td.b()-e.b())return d;for(var n=o.g(d.c(0))-o.g(e.c(0)),r=Array(d.b()),a=0;ar?t.push(r):2048>r?t.push(192|r>>6,128|63&r):55296>r||57344<=r?t.push(224|r>>12,128|r>>6&63,128|63&r):(n++,r=65536+((1023&r)<<10|1023&e.charCodeAt(n)),t.push(240|r>>18,128|r>>12&63,128|r>>6&63,128|63&r))}return t};var n={L:1,M:0,Q:3,H:2},r=function(){function e(e){for(var t=0;0!=e;)t+=1,e>>>=1;return t}var n=[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]];return{w:function(t){for(var n=t<<10;0<=e(n)-e(1335);)n^=1335<t||40t?8:16},D:function(e){for(var t=e.h(),n=0,r=0;r=u;u+=1)if(!(0>r+u||t<=r+u))for(var s=-1;1>=s;s+=1)0>o+s||t<=o+s||(0!=u||0!=s)&&a==e.a(r+u,o+s)&&(d+=1);5n;n+=1)e[n]=1<n;n+=1)e[n]=e[n-4]^e[n-5]^e[n-6]^e[n-8];for(n=0;255>n;n+=1)t[e[n]]=n;return{g:function(e){if(1>e)throw Error("glog("+e+")");return t[e]},i:function(t){for(;0>t;)t+=255;for(;256<=t;)t-=255;return e[t]}}}(),d=function(){function e(e,r){switch(r){case n.L:return t[4*(e-1)];case n.M:return t[4*(e-1)+1];case n.Q:return t[4*(e-1)+2];case n.H:return t[4*(e-1)+3]}}var t=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12,7,37,13],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]];return{I:function(t,n){var r=e(t,n);if(void 0===r)throw Error("bad rs block @ typeNumber:"+t+"/errorCorrectLevel:"+n);t=r.length/3,n=[];for(var o=0;o{const{connectionState:t,authState:n,authQrCode:r,settings:{byKey:{language:o}}}=e;return{connectionState:t,authState:n,authQrCode:r,language:o}}),((e,t)=>(0,f.ei)(t,["returnToAuthPhoneNumber","setSettingOption"])))((({connectionState:e,authState:t,authQrCode:n,language:r,returnToAuthPhoneNumber:o,setSettingOption:d})=>{const a=X(),u=(0,q.Z)(),s=(0,T.sO)(null),i=Y(a,"ContinueOnThisLanguage"),[c,l,f]=(0,O.Z)();(0,T.d4)((()=>{if(!n||"connectionStateReady"!==e)return;const t=s.current;t.innerHTML="",t.classList.remove("pre-animate"),ve.render({text:`tg://login?token=${n.token}`,radius:.5,ecLevel:"M",fill:"#4E96D4",size:280},t)}),[e,n]);const h=(0,T.I4)((()=>{l(),(0,J.m0)(a,(()=>{f(),d({language:a})}))}),[l,d,a,f]),m="authorizationStateWaitQrCode"===t;return T.ZP.createElement("div",{id:"auth-qr-form",className:"custom-scroll"},T.ZP.createElement("div",{className:"auth-form qr"},n?T.ZP.createElement("div",{key:"qr-container",className:"qr-container pre-animate",ref:s}):T.ZP.createElement("div",{key:"qr-loading",className:"qr-loading"},T.ZP.createElement(re.Z,null)),T.ZP.createElement("h3",null,u("Login.QR.Title")),T.ZP.createElement("ol",null,T.ZP.createElement("li",null,T.ZP.createElement("span",null,u("Login.QR.Help1"))),T.ZP.createElement("li",null,T.ZP.createElement("span",null,(0,de.Z)(u("Login.QR.Help2"),["simple_markdown"]))),T.ZP.createElement("li",null,T.ZP.createElement("span",null,u("Login.QR.Help3")))),m&&T.ZP.createElement(ee.Z,{isText:!0,onClick:o},u("Login.QR.Cancel")),a&&a!==r&&i&&T.ZP.createElement(ee.Z,{isText:!0,isLoading:c,onClick:h},i)))}))),Ie=(0,T.X$)((0,t.c$)((e=>(0,f.ei)(e,["authState"])),((e,t)=>(0,f.ei)(t,["reset","initApi","returnToAuthPhoneNumber","goToAuthQrCode"])))((({authState:e,reset:t,initApi:r,returnToAuthPhoneNumber:o,goToAuthQrCode:d})=>{(0,T.d4)((()=>{t(),r()}),[t,r]);const a="iOS"===n.Lt||"Android"===n.Lt;switch((0,x.ZP)(!a&&"authorizationStateWaitPhoneNumber"===e||a&&"authorizationStateWaitQrCode"===e,(()=>{a?o():d()})),(0,T.d4)((()=>(k.Z.disableRefresh(),()=>{k.Z.enableRefresh()})),[]),e){case"authorizationStateWaitCode":return T.ZP.createElement(z,{page:"authCode",key:"authCode"},T.ZP.createElement(me,null));case"authorizationStateWaitPassword":return T.ZP.createElement(z,{page:"authPassword",key:"authPassword"},T.ZP.createElement(pe,null));case"authorizationStateWaitRegistration":return T.ZP.createElement(ge,null);case"authorizationStateWaitPhoneNumber":return T.ZP.createElement(z,{page:"authPhoneNumber",key:"authPhoneNumber"},T.ZP.createElement(fe,null));case"authorizationStateWaitQrCode":return T.ZP.createElement(z,{page:"authQrCode",key:"authQrCode"},T.ZP.createElement(we,null));default:return a?T.ZP.createElement(z,{page:"authPhoneNumber",key:"authPhoneNumber"},T.ZP.createElement(fe,null)):T.ZP.createElement(z,{page:"authQrCode",key:"authQrCode"},T.ZP.createElement(we,null))}}))),Ce=(0,T.X$)((()=>{const e=(0,he.Z)(G.gl.Main,"Main");return e?T.ZP.createElement(e,null):void 0}));var Se=s(5359);const Ee=()=>T.ZP.createElement("div",{id:"AppInactive"},T.ZP.createElement("div",{className:"content"},T.ZP.createElement("img",{src:Se,alt:""}),T.ZP.createElement("h3",{className:"title"},"Such error, many tabs"),T.ZP.createElement("div",{className:"description"},"Telegram supports only one active tab with the app.",T.ZP.createElement("br",null),"Please reload this page to continue using this tab or close it."),T.ZP.createElement("div",{className:"actions"},T.ZP.createElement(ee.Z,{isText:!0,ripple:!0,onClick:()=>{window.location.reload()}},"Reload app"))));function Pe(){return t.ZP.createElement(z,{page:"main",key:"main"},t.ZP.createElement(Ce,null))}const Me=(0,t.c$)((e=>(0,f.ei)(e,["authState"])),((e,t)=>(0,f.ei)(t,["disconnect"])))((({authState:n,disconnect:r})=>{const[o,d]=(0,O.Z)(!1);if((0,T.d4)((()=>{(0,k.z)(),L=()=>{r(),document.title=`${e.Ti}${e.ou}`,d()}}),[r,d]),o)return t.ZP.createElement(Ee,null);if(n)switch(n){case"authorizationStateWaitPhoneNumber":case"authorizationStateWaitCode":case"authorizationStateWaitPassword":case"authorizationStateWaitRegistration":case"authorizationStateWaitQrCode":return t.ZP.createElement(Ie,null);case"authorizationStateClosed":case"authorizationStateClosing":case"authorizationStateLoggingOut":case"authorizationStateReady":return Pe()}return(0,m.ti)(!0)?Pe():t.ZP.createElement(Ie,null)}));e.eM&&console.log(">>> INIT"),(0,t.uC)().init(),e.eM&&console.log(">>> START INITIAL RENDER"),a.Z.render(t.ZP.createElement(Me,null),document.getElementById("root")),e.eM&&console.log(">>> FINISH INITIAL RENDER"),document.addEventListener("dblclick",(()=>{console.log("GLOBAL STATE",(0,t.Rd)())}))})()})(); //# sourceMappingURL=main.54e2adb4591cbd6c45ae.js.map