From 675c9d9882ab19e610eb26387b0db7ed72badc4e Mon Sep 17 00:00:00 2001 From: Alexander Zinchuk Date: Wed, 14 Apr 2021 00:31:54 +0300 Subject: [PATCH] [Build] --- ...2342f7a.css => 0.f34ac03a8b85a2c5cde9.css} | 0 ...e82342f7a.js => 0.f34ac03a8b85a2c5cde9.js} | 2 +- ...rker.js => 1f83b903bad979f40004.worker.js} | 0 ...edf93ee.css => 2.487a7f249be37000c313.css} | 0 ...d7edf93ee.js => 2.487a7f249be37000c313.js} | 2 +- dist/3.186fa7c0f46f0fc2b14a.css | 1 - dist/3.186fa7c0f46f0fc2b14a.js | 1 - dist/3.6470b420067a21e4cdac.css | 1 + dist/3.6470b420067a21e4cdac.js | 1 + ...a160ac4.css => 4.7c35e30ab2d63d3cc0ee.css} | 0 ...2ca160ac4.js => 4.7c35e30ab2d63d3cc0ee.js} | 2 +- ...bcf18f1bb.js => 7.8069a7d5c590c6dcd74f.js} | 2 +- ...rker.js => ac9bd12fa11f2e2e69fe.worker.js} | 2 +- ...c9bd12fa11f2e2e69fe.worker.js.LICENSE.txt} | 0 ...oon.099b3b84c42b396b6486806692ed75c2.woff2 | Bin 0 -> 14428 bytes ...oon.725349c653bfc70090f1988dc81ac837.woff2 | Bin 14140 -> 0 bytes ...oon.7b0715ba585094f4b95b55f048b397ba.woff} | Bin 31064 -> 31560 bytes dist/index.html | 2 +- dist/main.726f20d1ee31091db6ea.css | 1 + dist/main.7db5953f86bccab87bbe.js | 1 + dist/main.927891ad2c746c7d8d56.js | 1 - dist/main.d3f5c9af3d3cbfc7c7ae.css | 1 - dist/report.html | 4 ++-- 23 files changed, 12 insertions(+), 12 deletions(-) rename dist/{0.9b3be157185e82342f7a.css => 0.f34ac03a8b85a2c5cde9.css} (100%) rename dist/{0.9b3be157185e82342f7a.js => 0.f34ac03a8b85a2c5cde9.js} (98%) rename dist/{ed8b07679ddce89ad685.worker.js => 1f83b903bad979f40004.worker.js} (100%) rename dist/{2.00e0eb3cc52d7edf93ee.css => 2.487a7f249be37000c313.css} (100%) rename dist/{2.00e0eb3cc52d7edf93ee.js => 2.487a7f249be37000c313.js} (99%) delete mode 100644 dist/3.186fa7c0f46f0fc2b14a.css delete mode 100644 dist/3.186fa7c0f46f0fc2b14a.js create mode 100644 dist/3.6470b420067a21e4cdac.css create mode 100644 dist/3.6470b420067a21e4cdac.js rename dist/{4.5c61fe3afeb2ca160ac4.css => 4.7c35e30ab2d63d3cc0ee.css} (100%) rename dist/{4.5c61fe3afeb2ca160ac4.js => 4.7c35e30ab2d63d3cc0ee.js} (75%) rename dist/{7.02701e2e4ddbcf18f1bb.js => 7.8069a7d5c590c6dcd74f.js} (99%) rename dist/{c40704558924293a9c69.worker.js => ac9bd12fa11f2e2e69fe.worker.js} (99%) rename dist/{c40704558924293a9c69.worker.js.LICENSE.txt => ac9bd12fa11f2e2e69fe.worker.js.LICENSE.txt} (100%) create mode 100644 dist/icomoon.099b3b84c42b396b6486806692ed75c2.woff2 delete mode 100644 dist/icomoon.725349c653bfc70090f1988dc81ac837.woff2 rename dist/{icomoon.02d3a207ccbd1adab3d528c444440b16.woff => icomoon.7b0715ba585094f4b95b55f048b397ba.woff} (94%) create mode 100644 dist/main.726f20d1ee31091db6ea.css create mode 100644 dist/main.7db5953f86bccab87bbe.js delete mode 100644 dist/main.927891ad2c746c7d8d56.js delete mode 100644 dist/main.d3f5c9af3d3cbfc7c7ae.css diff --git a/dist/0.9b3be157185e82342f7a.css b/dist/0.f34ac03a8b85a2c5cde9.css similarity index 100% rename from dist/0.9b3be157185e82342f7a.css rename to dist/0.f34ac03a8b85a2c5cde9.css diff --git a/dist/0.9b3be157185e82342f7a.js b/dist/0.f34ac03a8b85a2c5cde9.js similarity index 98% rename from dist/0.9b3be157185e82342f7a.js rename to dist/0.f34ac03a8b85a2c5cde9.js index 059a0d8f..09dcf904 100644 --- a/dist/0.9b3be157185e82342f7a.js +++ b/dist/0.f34ac03a8b85a2c5cde9.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[0],Array(93).concat([function(e,t,n){"use strict";var a=n(0),r=n(10),c=n(29);t.a=()=>{const e=Object(c.a)();return Object(a.n)(()=>r.a(e),[e]),r.b}},function(e,t,n){"use strict";var a=n(0),r=n(7),c=n(8),s=n(131),i=n(162),o=n(33),l=n(47),u=n(32);n(194);t.a=e=>{const{ref:t,icon:n,className:d,style:m,children:h,disabled:b,ripple:f,narrow:p,inactive:g,contextActions:O,focus:v,destructive:j,onClick:E}=e;let y=Object(a.q)(null);t&&(y=t);const{isContextMenuOpen:N,contextMenuPosition:C,handleBeforeContextMenu:T,handleContextMenu:M,handleContextMenuClose:w,handleContextMenuHide:L}=Object(s.a)(y,!O),S=Object(a.m)(()=>y.current,[]),I=Object(a.m)(()=>y.current.closest(".custom-scroll"),[]),k=Object(a.m)(()=>y.current.querySelector(".ListItem-context-menu .bubble"),[]),{positionX:A,positionY:x,style:D}=Object(i.a)(C,S,I,k),_=Object(a.m)(e=>{!b&&E&&E(e)},[b,E]),R=Object(a.m)(e=>{g||r.k||(!O||2!==e.button&&E||T(e),0===e.button&&(E?_(e):M(e)))},[g,O,E,T,M,_]),P=Object(c.a)("ListItem no-selection",d,f&&"has-ripple",p&&"narrow",b&&"disabled",g&&"inactive",C&&"has-menu-open",v&&"focus",j&&"destructive");return a.a.createElement("div",{ref:y,className:P,style:m},a.a.createElement("div",{className:"ListItem-button",role:"button",tabIndex:0,onClick:!g&&r.k?_:void 0,onMouseDown:R,onContextMenu:!g&&O?M:void 0},n&&a.a.createElement("i",{className:"icon-"+n}),h,!b&&!g&&f&&a.a.createElement(o.a,null)),O&&void 0!==C&&a.a.createElement(l.a,{isOpen:N,positionX:A,positionY:x,style:D,className:"ListItem-context-menu",autoClose:!0,onClose:w,onCloseAnimationEnd:L},O.map(e=>a.a.createElement(u.a,{key:e.title,icon:e.icon,destructive:e.destructive,disabled:!e.handler,onClick:e.handler},e.title))))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return s})),n.d(t,"c",(function(){return i})),n.d(t,"b",(function(){return o}));var a=n(0),r=n(9),c=n(43);function s({rootRef:e,throttleMs:t,debounceMs:n,shouldSkipFirst:s,margin:i,threshold:o,isDisabled:l},u){const d=Object(a.q)(),m=Object(a.q)(),h=Object(a.q)(),b=Object(a.q)();m.current=u;const f=Object(a.m)(()=>{h.current=!0},[]),p=Object(a.m)(()=>{h.current=!1,b.current&&(b.current(),b.current=void 0)},[]);Object(c.a)(f,p),Object(a.n)(()=>{if(!l)return()=>{d.current&&(d.current.observer.disconnect(),d.current.callbacks.clear(),d.current=void 0)}},[l]);return{observe:Object(a.m)((a,c)=>{d.current||function(){const a=new Map,c=new Map,l=()=>{const e=Array.from(c.values());e.forEach(t=>{const n=a.get(t.target);n&&n(t,e)}),m.current&&m.current(e),c.clear()},u=t?r.g:n?r.a:void 0,f=u?u(l,t||n,!s):l,p=new IntersectionObserver(e=>{e.forEach(e=>{c.set(e.target,e)}),h.current?b.current=()=>{f()}:f()},{root:e.current,rootMargin:i?i+"px":void 0,threshold:o});d.current={observer:p,callbacks:a}}();const l=d.current;return l.observer.observe(a),c&&l.callbacks.set(a,c),()=>{c&&l.callbacks.delete(a),l.observer.unobserve(a)}},[l]),freeze:f,unfreeze:p}}function i(e,t,n){Object(a.n)(()=>t?t(e.current,n):void 0,[])}function o(e,t,n){const[r,c]=Object(a.r)(!t);return i(e,t,e=>{c(e.isIntersecting),n&&n(e)}),r}},function(e,t,n){"use strict";var a=n(0),r=n(2),c=n(18),s=n(6),i=n(4),o=n(35),l=n(3),u=n(93),d=n(99),m=n(130),h=n(146);t.a=Object(a.h)(Object(r.h)((e,{userId:t,forceShowSelf:n})=>{const{lastSyncTime:a}=e,r=Object(s.Bb)(e,t);return{lastSyncTime:a,user:r,isSavedMessages:!n&&r&&r.isSelf,areMessagesLoaded:Boolean(Object(s.m)(e,t))}},(e,t)=>Object(l.l)(t,["loadFullUser","openMediaViewer"]))(({typingStatus:e,avatarSize:t="medium",status:n,withMediaViewer:r,withHandle:s,withFullInfo:l,withUpdatingStatus:b,noStatusOrTyping:f,user:p,isSavedMessages:g,areMessagesLoaded:O,lastSyncTime:v,loadFullUser:j,openMediaViewer:E})=>{const{id:y}=p||{},N=Object(i.Z)(p);Object(a.n)(()=>{l&&v&&y&&j({userId:y})},[y,j,v,l]);const C=Object(a.m)((e,n)=>{p&&n&&(e.stopPropagation(),E({avatarOwnerId:p.id,origin:"jumbo"===t?c.h.ProfileAvatar:c.h.MiddleHeaderAvatar}))},[p,t,E]),T=Object(u.a)();if(p)return a.a.createElement("div",{className:"ChatInfo"},a.a.createElement(d.a,{key:p.id,size:t,user:p,isSavedMessages:g,onClick:r?C:void 0}),a.a.createElement("div",{className:"info"},g?a.a.createElement("div",{className:"title"},a.a.createElement("h3",null,T("SavedMessages"))):a.a.createElement("div",{className:"title"},a.a.createElement("h3",null,N&&Object(o.a)(N)),p&&p.isVerified&&a.a.createElement(m.a,null)),!g&&!f&&(n?a.a.createElement("span",{className:"status"},n):b&&!O?a.a.createElement("span",{className:"status"},T("Updating")):p?e?a.a.createElement(h.a,{typingStatus:e}):a.a.createElement("div",{className:"status "+(Object(i.xb)(p)?"online":"")},s&&p.username&&a.a.createElement("span",{className:"handle"},p.username),a.a.createElement("span",{className:"user-status"},Object(i.ab)(p,T))):void 0)))}))},function(e,t,n){"use strict";var a=n(0),r=n(5),c=n(48),s=n(29);t.a=(e,t=!1,n=r.ApiMediaFormat.BlobUrl,i,o)=>{const l=e?c.c(e):void 0,u=Object(s.a)();return Object(a.n)(()=>{if(!t&&e&&!l){const t=Date.now();c.b(e,n).then(()=>{const e=Date.now()-t;!o||e>=o?u():setTimeout(u,o-e)})}},[t,e,l,n,i,u,o]),l}},function(e,t,n){"use strict";var a=n(0),r=n(50);var c=n(8),s=n(43),i=n(27),o=n(51),l=n(93),u=n(31),d=n(114);n(139);t.a=e=>{const{title:t,className:n,isOpen:m,header:h,hasCloseButton:b,noBackdrop:f,children:p,onClose:g,onCloseAnimationEnd:O,onEnter:v}=e,{shouldRender:j,transitionClassNames:E}=Object(i.a)(m,O),y=Object(a.q)(null);Object(a.n)(()=>m?Object(r.a)({onEsc:g,onEnter:v}):void 0,[m,g,v]),Object(a.n)(()=>m&&y.current?function(e){function t(t){if("Tab"!==t.key)return;t.preventDefault(),t.stopPropagation();const n=Array.from(e.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'));if(!n.length)return;const a=n.findIndex(e=>e.isSameNode(document.activeElement));let r=0;a>=0&&(r=t.shiftKey?a>0?a-1:n.length-1:a{document.removeEventListener("keydown",t,!1)}}(y.current):void 0,[m]),Object(o.a)(([e])=>(document.body.classList.toggle("has-open-dialog",m),(m||!m&&void 0!==e)&&Object(s.b)(200),()=>{document.body.classList.remove("has-open-dialog")}),[m]);const N=Object(l.a)();if(!j)return;const C=Object(c.a)("Modal",n,E,f&&"transparent-backdrop");return a.a.createElement(d.a,null,a.a.createElement("div",{ref:y,className:C,tabIndex:-1,role:"dialog"},a.a.createElement("div",{className:"modal-container"},a.a.createElement("div",{className:"modal-backdrop",onClick:g}),a.a.createElement("div",{className:"modal-dialog"},h||(t?a.a.createElement("div",{className:"modal-header"},b&&a.a.createElement(u.a,{round:!0,color:"translucent",size:"smaller",ariaLabel:N("Close"),onClick:g},a.a.createElement("i",{className:"icon-close"})),a.a.createElement("div",{className:"modal-title"},t)):void 0),a.a.createElement("div",{className:"modal-content custom-scroll"},p)))))}},function(e,t,n){"use strict";var a=n(0),r=n(5),c=n(1),s=n(4),i=n(45),o=n(8),l=n(35),u=n(97),d=n(102),m=n(93);n(181);t.a=Object(a.h)(({className:e,size:t="large",chat:n,user:h,text:b,withOnlineStatus:f,isSavedMessages:p,lastSyncTime:g,onClick:O})=>{const v=h&&Object(s.pb)(h);let j;p||v||(h?j=Object(s.f)(h):n&&(j=Object(s.f)(n)));const E=Object(u.a)(j,!1,r.ApiMediaFormat.DataUri,g),{shouldRenderFullMedia:y,transitionClassNames:N}=Object(d.a)(E,"slow");Object(m.a)();let C="";if(p)C=a.a.createElement("i",{className:"icon-avatar-saved-messages"});else if(v)C=a.a.createElement("i",{className:"icon-avatar-deleted-account"});else if(y)C=a.a.createElement("img",{src:E,className:N+" avatar-media",alt:"",decoding:"async"});else if(h){const e=Object(s.Z)(h);C=e?Object(i.c)(e,2):void 0}else if(n){const e=Object(s.l)(n);C=e&&Object(i.c)(e,Object(s.lb)(n.id)?2:1)}else b&&(C=Object(i.c)(b,2));const T=!p&&h&&Object(s.xb)(h),M=Object(o.a)("Avatar size-"+t,e,"color-bg-"+Object(s.X)(h||n),p&&"saved-messages",v&&"deleted-account",f&&T&&"online",O&&"interactive",!p&&!y&&"no-photo"),w=Object(a.m)(e=>{O&&O(e,p||y)},[O,p,y]),L=(h||n)&&(h||n).id;return a.a.createElement("div",{className:M,onClick:w,"data-test-sender-id":c.x?L:void 0},"string"==typeof C?Object(l.a)(C,["jumbo"===t?"hq_emoji":"emoji"]):C)})},function(e,t,n){"use strict";var a=n(0),r=n(2),c=n(1),s=n(7),i=n(29),o=n(38),l=n(8),u=n(43);n(179);const d={slide:450,"mv-slide":400,"slide-fade":400,"zoom-fade":150,"scroll-slide":500,fade:150,"slide-layers":s.f?450:300,"push-slide":300,reveal:350},m=Symbol("CLEANED_UP");t.a=Object(r.h)(e=>{const{animationLevel:t}=e.settings.byKey;return{animationLevel:t}})(({ref:e,activeKey:t,name:n,direction:r="auto",renderCount:s,shouldRestoreHeight:h,shouldCleanup:b,id:f,className:p,onStart:g,onStop:O,children:v,animationLevel:j})=>{let E=Object(a.q)(null);e&&(E=e);const y=Object(a.q)({}),N=Object(o.a)(t),C=Object(a.q)(),T=Object(i.a)(),M=void 0!==N&&t!==N;!s&&M&&(y.current={[N]:y.current[N]}),y.current[t]=v,Object(a.o)(()=>{function e(){b&&(y.current={[N]:m},T())}const a=E.current,i=a.children;if(1===i.length&&!M)return void i[0].classList.add("active");const o=Array.from(a.childNodes);if(!M||!o.length)return;C.current&&(clearTimeout(C.current),C.current=void 0);const l=-1===r||"auto"===r&&N>t||"inverse"===r&&N{e instanceof HTMLElement&&(e.classList.remove("from","through","to"),e.classList.toggle("active",t===v))}),void e();if(o.forEach((e,t)=>{e instanceof HTMLElement&&(e.classList.remove("active"),e.classList.toggle("from",t===p),e.classList.toggle("through",t>p&&tv),e.classList.toggle("to",t===v))}),"scroll-slide"===n){const e=a.offsetWidth;a.scrollBy({left:v>p?e:-e,behavior:"smooth"})}j>0&&Object(u.b)(d[n]+c.c),requestAnimationFrame(()=>{a.classList.add("animating"),C.current=window.setTimeout(()=>{requestAnimationFrame(()=>{if(a.classList.remove("animating","backwards"),o.forEach((e,t)=>{e instanceof HTMLElement&&(e.classList.remove("from","through","to"),e.classList.toggle("active",t===v))}),"scroll-slide"===n&&(a.scrollLeft=t*a.offsetWidth),h){const e=a.querySelector(".active");e&&(e.style.height="auto",a.style.height=e.clientHeight+"px")}e(),O&&O()})},d[n]+c.c),g&&g()})},[t,N,M,r,n,g,O,s,h,b,j,T]),Object(a.o)(()=>{if(h){const e=E.current,t=e.querySelector(".active")||e.querySelector(".from");t&&(t.style.height="auto",e.style.height=t.clientHeight+"px")}},[h,v]);const w=y.current,L=Object.keys(s?new Array(s).fill(void 0):w).map(Number).map(e=>{const n=w[e];return"function"==typeof n?a.a.createElement("div",{key:e},n(e===t,e===N)):void 0}),S=Object(l.a)("Transition",p,0===j&&"scroll-slide"===n?"slide":n);return a.a.createElement("div",{ref:E,id:f,className:S},L)})},function(e,t,n){"use strict";var a=n(18),r=n(0),c=n(9),s=n(144);t.a=({ref:e,className:t,onLoadMore:n,onScroll:i,items:o,itemSelector:l=".ListItem",preloadBackwards:u=20,sensitiveArea:d=800,isDisabled:m=!1,noFastList:h,cacheBuster:b,children:f})=>{let p=Object(r.q)(null);e&&(p=e);const g=Object(r.q)({}),[O,v]=Object(r.p)(()=>n?[Object(c.a)(()=>n({direction:a.e.Backwards}),1e3,!0,!1),Object(c.a)(()=>n({direction:a.e.Forwards}),1e3,!0,!1)]:[],[n,o]);Object(r.n)(()=>{if(O)if(!o||o.length{const e=p.current,t=g.current;if(t.listItemElements=e.querySelectorAll(l),m)return;let n;if(t.currentAnchor&&Array.from(t.listItemElements).includes(t.currentAnchor)){const{scrollTop:a}=e;n=a+(t.currentAnchor.getBoundingClientRect().top-t.currentAnchorTop)}else{const e=t.listItemElements[0];e&&e.offsetParent&&(t.currentAnchor=e,t.currentAnchorTop=e.getBoundingClientRect().top)}Object(s.a)(e,n),t.isScrollTopJustUpdated=!0},[m,l,o,b]);const j=Object(r.m)(e=>{if(v&&O){const{listItemElements:e,isScrollTopJustUpdated:t,currentAnchor:n,currentAnchorTop:a}=g.current;if(t)return void(g.current.isScrollTopJustUpdated=!1);const r=e.length,c=p.current,{scrollTop:i,scrollHeight:o,offsetHeight:l}=c,u=i<=(r?e[0].offsetTop:0)+d,m=(r?e[r-1].offsetTop+e[r-1].offsetHeight:o)-(i+l)<=d;let h=!1;if(u){const t=e[0];if(t){const e=t.getBoundingClientRect().top,r=n&&n!==t?n.getBoundingClientRect().top:e;n&&void 0!==a&&r>a&&(g.current.currentAnchor=t,g.current.currentAnchorTop=e,h=!0,Object(s.a)(c),v())}}if(m){const t=e[r-1];if(t){const e=t.getBoundingClientRect().top,r=n&&n!==t?n.getBoundingClientRect().top:e;n&&void 0!==a&&r{const s=Boolean(e),i=!Object(a.q)(s).current&&!n,[o,l]=Object(a.r)(!s),{shouldRender:u,transitionClassNames:d}=Object(r.a)(s,void 0,!i,t);return Object(a.n)(()=>{u&&(i?setTimeout(()=>{l(!1)},c[t]):l(!1))},[i,u,t]),{shouldRenderThumb:o,shouldRenderFullMedia:u,transitionClassNames:d}}},function(e,t,n){"use strict";n.d(t,"b",(function(){return i})),n.d(t,"c",(function(){return o})),n.d(t,"d",(function(){return l})),n.d(t,"a",(function(){return u})),n.d(t,"j",(function(){return f})),n.d(t,"f",(function(){return p})),n.d(t,"h",(function(){return g})),n.d(t,"k",(function(){return O})),n.d(t,"i",(function(){return v})),n.d(t,"l",(function(){return j})),n.d(t,"g",(function(){return E})),n.d(t,"e",(function(){return y}));var a=n(4),r=n(49),c=n(7),s=n(1);const i="(max-height: 640px)",o=parseInt(getComputedStyle(document.documentElement).fontSize,10),l=200,u={width:640,height:640},d={width:100,height:100};let m;function h(e,t,n){const a=t||n?1.625:0;return(function(e){const t=e?30:29;return c.f?(m||(m=Math.min(t,Math.floor(.69*window.innerWidth)/o)),m):t}(e)-a)*o}function b({width:e,height:t,fromOwnMessage:n,isForwarded:a,isWebPagePhoto:r,isGif:c}){const s=t/e;return y(h(n,a,r),function(e,t){return e&&t&&t>=.75&&t<=1.25?20*o:27*o}(c,s),e,t)}function f(e,t){const n=window.matchMedia(i),{width:a,height:c}=r.a.get();let s=t&&n.matches?10:8.25;return e&&(s=n.matches?10:15),{width:a,height:c-s*o}}function p(e,t,n,r){const{width:c,height:s}=Object(a.S)(e)||d;return b({width:c,height:s,fromOwnMessage:t,isForwarded:n,isWebPagePhoto:r})}function g(e,t,n){const{width:r,height:c}=Object(a.bb)(e)||d;return b({width:r,height:c,fromOwnMessage:t,isForwarded:n,isGif:e.isGif})}function O(){return{width:2*o,height:2*o}}function v(e){return e?{width:3*o,height:3*o}:{width:3.375*o,height:3.375*o}}function j(e){const{width:t}=e;let{height:n}=e;"1258816259753933"===e.id&&(n=t);const a=n&&t&&n/t,r=(c.f?s.ib:s.hb)*o,i=a?r*a:r;return a&&i>r?{width:Math.round(r/a),height:r}:{width:r,height:i}}function E({width:e,height:t},n,a=!1){const{width:r,height:c}=f(n,a);return y(r,c,e,t)}function y(e,t,n,a){const r=a/n,c=Math.min(n,e);return Math.round(c*r)>t?{width:Math.round(t/r),height:t}:{width:c,height:Math.round(c*r)}}},,function(e,t,n){"use strict";var a=n(0),r=n(7),c=n(9),s=n(8),i=n(43);let o,l;async function u(){return o||(o=n.e(7).then(n.bind(null,305)),l=(await o).default),o}setTimeout(u,5e3);t.a=Object(a.h)(({className:e,id:t,animationData:n,play:o,playSegment:d,speed:m,noLoop:h,size:b,quality:f,isLowPriority:p,onLoad:g})=>{const[O,v]=Object(a.r)(),j=Object(a.q)(null),E=Object(a.q)(!1),y=Object(a.q)(!1),N=Object(a.q)();N.current=o;const C=Object(a.q)();C.current=d,Object(a.n)(()=>{if(O||!n)return;const e=()=>{if(!j.current)return;const e=new l(t,j.current,n,{noLoop:h,size:b,quality:f,isLowPriority:p},g);m&&e.setSpeed(m),v(e)};l?e():u().then(()=>{Object(c.b)(()=>{j.current&&e()})})},[O,n,t,p,h,g,f,b,m]),Object(a.n)(()=>()=>{O&&O.destroy()},[O]);const T=Object(a.m)((e=!1)=>{O&&(N.current||C.current)&&(C.current?O.playSegment(C.current):e?O.goToAndPlay(0):O.play())},[O]),M=Object(a.m)(()=>{O&&O.pause()},[O]),w=Object(a.m)(()=>{y.current=!0,O&&(E.current||(E.current=O.isPlaying()),M())},[O,M]),L=Object(a.m)(()=>{E.current&&T(),E.current=!1,y.current=!1},[T]),S=Object(a.m)(()=>{Object(c.b)(L)},[L]);var I,k;Object(a.n)(()=>{O&&(o||d?y.current?E.current=!0:T(h):y.current?E.current=!1:M())},[O,o,d,h,T,M]),Object(i.a)(w,L),I=w,k=S,Object(a.n)(()=>(document.hasFocus()||I(),window.addEventListener("blur",I),window.addEventListener("focus",k),()=>{window.removeEventListener("focus",k),window.removeEventListener("blur",I)}),[I,k]);const A=Object(s.a)("AnimatedSticker",e,r.d&&o&&"is-playing"),x=b?`width: ${b}px; height: ${b}px;`:void 0;return a.a.createElement("div",{ref:j,className:A,style:x})})},function(e,t,n){"use strict";var a=n(38);t.a=(e,t)=>{const n=Object(a.a)(t);n&&!t.some((e,t)=>e!==n[t])||e(n||[])}},function(e,t,n){"use strict";var a=n(0),r=n(93),c=n(98),s=n(31);t.a=Object(a.h)(({isOpen:e,onClose:t,onCloseAnimationEnd:n,header:i,text:o,textParts:l,confirmLabel:u="Confirm",confirmHandler:d,confirmIsDestructive:m,isButtonsInOneRow:h})=>{const b=Object(r.a)();return a.a.createElement(c.a,{className:"confirm",header:i,isOpen:e,onClose:t,onCloseAnimationEnd:n,onEnter:d},o&&o.split("\\n").map(e=>a.a.createElement("p",null,e)),l,a.a.createElement("div",{className:h?"dialog-buttons mt-2":""},a.a.createElement(s.a,{className:"confirm-dialog-button",isText:!0,onClick:d,color:m?"danger":"primary"},u),a.a.createElement(s.a,{className:"confirm-dialog-button",isText:!0,onClick:t},b("Cancel"))))})},function(e,t,n){"use strict";var a=n(0),r=n(8),c=n(27);n(233);t.a=Object(a.h)(({text:e="Nothing found."})=>{const{transitionClassNames:t}=Object(c.a)(!0);return a.a.createElement("div",{className:Object(r.a)("NothingFound",t)},e)})},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var a=n(0),r=n(106),c=n(29);function s(e,t){const n=void 0===t,s=Object(a.q)(n),i=Object(a.q)(),o=Object(c.a)();return Object(r.a)(()=>{n||(s.current=!1,i.current&&(clearTimeout(i.current),i.current=void 0))},e),Object(a.n)(()=>{if(n||s.current)return;const e=()=>{s.current=!0,o()};t>0?i.current=window.setTimeout(e,t):e()},e),s.current}},function(e,t,n){"use strict";var a=n(0),r=n(8);n(188);t.a=({children:e,className:t,onClick:n})=>{const c=Object(a.m)(e=>{e.preventDefault(),n(e)},[n]);return a.a.createElement("a",{href:"#",className:Object(r.a)("Link",t),onClick:n?c:void 0},e)}},function(e,t,n){"use strict";var a=n(0),r=n(2),c=n(18),s=n(4),i=n(6),o=n(35),l=n(3),u=n(93),d=n(99),m=n(130),h=n(146);t.a=Object(a.h)(Object(r.h)((e,{chatId:t})=>{const{lastSyncTime:n}=e,a=Object(i.f)(e,t);return{lastSyncTime:n,chat:a,onlineCount:a?Object(i.n)(e,a):void 0,areMessagesLoaded:Boolean(Object(i.m)(e,t))}},(e,t)=>Object(l.l)(t,["loadFullChat","loadSuperGroupOnlines","openMediaViewer"]))(({typingStatus:e,avatarSize:t="medium",withMediaViewer:n,withHandle:r,withFullInfo:i,withUpdatingStatus:l,withChatType:b,chat:f,onlineCount:p,areMessagesLoaded:g,lastSyncTime:O,loadFullChat:v,loadSuperGroupOnlines:j,openMediaViewer:E})=>{const y=f&&Object(s.nb)(f),{id:N,isMin:C,isRestricted:T}=f||{};Object(a.n)(()=>{N&&!C&&i&&O&&(v({chatId:N}),y&&j({chatId:N}))},[N,C,O,i,v,y,j]);const M=Object(a.m)((e,n)=>{f&&n&&(e.stopPropagation(),E({avatarOwnerId:f.id,origin:"jumbo"===t?c.h.ProfileAvatar:c.h.MiddleHeaderAvatar}))},[f,t,E]),w=Object(u.a)();if(f)return a.a.createElement("div",{className:"ChatInfo"},a.a.createElement(d.a,{key:f.id,size:t,chat:f,onClick:n?M:void 0}),a.a.createElement("div",{className:"info"},a.a.createElement("div",{className:"title"},a.a.createElement("h3",null,Object(o.a)(Object(s.l)(f))),f.isVerified&&a.a.createElement(m.a,null)),function(){if(l&&!g&&!T)return a.a.createElement("span",{className:"status"},w("Updating"));if(!f)return;if(e)return a.a.createElement(h.a,{typingStatus:e});if(b)return a.a.createElement("div",{className:"status"},w(Object(s.m)(f)));const t=r?f.username:void 0,n=function(e,t){const n=t(Object(s.m)(e)),{membersCount:a}=e;if(e.isRestricted)return"Channel"===n?"channel is inaccessible":"group is inaccessible";if(!a)return n;return t("Channel"===n?"Subscribers":"Members",a,"i")}(f,w),c=p?", "+w("OnlineCount",p,"i"):void 0;return a.a.createElement("div",{className:"status"},t&&a.a.createElement("span",{className:"handle"},t),a.a.createElement("span",{className:"group-status"},n),c&&a.a.createElement("span",{className:"online-status"},c))}()))}))},function(e,t,n){"use strict";var a=n(0),r=n(7),c=n(5),s=n(9),i=n(48),o=n(29);t.a=(e,t=!1,n=c.ApiMediaFormat.BlobUrl,l,u)=>{const d=e?i.c(e):void 0,m=n===c.ApiMediaFormat.Stream||r.h&&n===c.ApiMediaFormat.Progressive,h=Object(o.a)(),[b,f]=Object(a.r)(d&&!m?1:0),p=Object(a.q)(),g=Object(a.p)(()=>Object(s.g)(e=>{(!u||Date.now()-p.current>u)&&f(e)},500,!0),[u]);return Object(a.n)(()=>{!t&&e&&(d?m&&setTimeout(()=>{f(.75)},1500):(f(0),p.current&&i.a(g),p.current=Date.now(),i.b(e,n,g).then(()=>{const e=Date.now()-p.current;p.current=void 0,!u||e>=u?h():setTimeout(h,u-e)})))},[t,e,d,n,l,h,m,u,g]),Object(a.n)(()=>{t&&p.current&&(i.a(g),f(0))},[g,t]),{mediaData:d,downloadProgress:b}}},function(e,t,n){"use strict";var a=n(0),r=n(8);n(205);const c={s:22,m:25,l:28,xl:20};t.a=Object(a.h)(({progress:e=0,size:t="l",square:n,transparent:s,noCross:i,onClick:o})=>{const l=c[t],u=l-4,d=l-1,m=2*u*Math.PI,h=Object(a.q)(null);Object(a.n)(()=>{if(!h.current)return;const t=h.current.firstElementChild,n=m-Math.min(Math.max(.05,e),1)*m;t?t.firstElementChild.setAttribute("stroke-dashoffset",n.toString()):h.current.innerHTML=`\n \n `},[h,m,d,u,e]);const b=Object(r.a)("ProgressSpinner size-"+t,s&&"transparent",n&&"square",i&&"no-cross");return a.a.createElement("div",{ref:h,className:b,onClick:o})})},function(e,t,n){"use strict";var a=n(0),r=n(57);t.a=({containerId:e,className:t,children:n})=>{const c=Object(a.q)(document.createElement("div"));return Object(a.o)(()=>{const n=document.querySelector(e||"#portals");if(!n)return;const a=c.current;return t&&a.classList.add(t),n.appendChild(a),()=>{r.a.render(void 0,a),n.removeChild(a)}},[t,e]),r.a.render(n,c.current)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var a=n(18),r=n(43),c=n(9),s=n(55);function i(e,t,n,i=0,o=1500,l,u){if(l===a.b.Static)return void t.scrollIntoView({block:n});const{offsetTop:d}=t;if(void 0===l){const t=d-e.scrollTop;t<-o?e.scrollTop+=t+o:t>o&&(e.scrollTop+=t-o)}else l===a.b.Up?e.scrollTop=d+o:l===a.b.Down&&(e.scrollTop=Math.max(0,d-o));Object(c.b)(()=>{Object(r.b)(600),function(e,t,n,a=0,r){const{offsetTop:c,offsetHeight:i}=t,{scrollTop:o,offsetHeight:l,scrollHeight:u}=e;let d;switch(n){case"start":d=c-a-o;break;case"end":d=c+i+a-(o+l);break;case"nearest":case"center":d=i0){const e=u-(o+l);d=Math.min(d,e)}const m=e.scrollTop+d,h=r||250+Math.abs(d)/1500*350,b=Date.now();Object(s.b)(()=>{const t=Math.min((Date.now()-b)/h,1),n=d*(1-function(e){return 1-(1-e)**3.5}(t));return e.scrollTop=Math.round(m-n),t<1})}(e,t,n,i,u)})}},,function(e,t,n){"use strict";var a=n(0),r=n(8),c=n(20);n(212);var s=Object(a.h)(({id:e,label:t,subLabel:n,value:s,name:i,checked:o,disabled:l,hidden:u,isLoading:d,onChange:m})=>{const h=Object(r.a)("Radio",l&&"disabled",u&&"hidden-widget",d&&"loading");return a.a.createElement("label",{className:h},a.a.createElement("input",{type:"radio",name:i,value:s,id:e,checked:o,onChange:m,disabled:l||u}),a.a.createElement("div",{className:"Radio-main"},a.a.createElement("span",{className:"label"},t),n&&a.a.createElement("span",{className:"subLabel"},n)),d&&a.a.createElement(c.a,null))});t.a=Object(a.h)(({id:e,name:t,options:n,selected:r,disabled:c,loadingOption:i,onChange:o})=>{const l=Object(a.m)(e=>{const{value:t}=e.currentTarget;o(t)},[o]);return a.a.createElement("div",{id:e,className:"radio-group"},n.map(e=>a.a.createElement(s,{name:t,label:e.label,subLabel:e.subLabel,value:e.value,checked:e.value===r,hidden:e.hidden,disabled:c,isLoading:i?i===e.value:void 0,onChange:l})))})},function(e,t,n){"use strict";var a=n(0),r=n(18),c=n(3),s=n(29),i=n(38);function o(e,t=0,n,a){const{length:c}=e,s=e.indexOf(t),i=n===r.e.Forwards?s:s+1||c,o=Math.max(0,i-a),l=i+a-1,u=e.slice(Math.max(0,o),l+1);let d,m;switch(n){case r.e.Forwards:d=i>0,m=o>=0;break;case r.e.Backwards:d=i{const d=Object(a.q)(),m=Object(a.q)((()=>{if(!t||d.current)return;const{newViewportIds:e}=o(t,t[0],r.e.Forwards,l);return e})()),h=Object(s.a)(),b=Object(i.a)(t),f=Object(i.a)(n);if(t&&!n&&(t!==b||n!==f)){const{offsetId:e=t[0],direction:n=r.e.Forwards}=d.current||{},{newViewportIds:a}=o(t,e,n,l);m.current&&Object(c.a)(m.current,a)||(m.current=a)}Object(a.n)(()=>{if(t&&!n&&e&&u){const t=m.current;e({offsetId:t[t.length-1]})}},[t,n,e,u]);const p=Object(a.m)(({direction:n})=>{const a=m.current,s=a?n===r.e.Backwards?a[a.length-1]:a[0]:void 0;if(!t)return void(e&&e({offsetId:s}));d.current={...d.current,direction:n,offsetId:s};const{newViewportIds:i,areSomeLocal:u,areAllLocal:b}=o(t,s,n,l);!u||a&&Object(c.a)(a,i)||(m.current=i,h()),!b&&e&&e({offsetId:s})},[t,l,e,h]);return n?[t]:[m.current,p]}},function(e,t,n){"use strict";var a=n(0),r=n(5),c=n(1),s=n(103),i=n(95),o=n(97),l=n(102),u=n(36),d=n(105);n(210);t.a=({sticker:e,isInline:t=!1,observeIntersection:n,lastSyncTime:m})=>{const h=Object(a.q)(null),[b,f]=Object(u.a)(),p="sticker"+e.id,g=Object(i.b)(h,n),O=Object(o.a)(p+"?size=m",!g,r.ApiMediaFormat.BlobUrl,m),{transitionClassNames:v}=Object(l.a)(O,"slow"),j=Object(o.a)(p,!g,r.ApiMediaFormat.Lottie,m),E=Boolean(j),[y,N]=Object(a.r)(String(Math.random())),C=Object(a.m)(()=>{N(String(Math.random()))},[]);let T;T=t?.5*Object(s.l)(e).width:c.nb;const M=`width: ${T}px; height: ${T}px;`;return a.a.createElement("div",{ref:h,className:"AnimatedEmoji media-inner",style:M,onClick:C},O&&!b&&a.a.createElement("img",{src:O,className:v,alt:""}),E&&a.a.createElement(d.a,{key:p,id:p,animationData:j,size:T,quality:1,play:g&&y,noLoop:!0,onLoad:f}))}},,function(e,t,n){"use strict";var a=n(0),r=n(9),c=n(148);t.a=(e=!1)=>{const[t,n]=Object(a.r)(!e),[s,i]=Object(a.r)(0),o=Object(a.p)(()=>Object(r.a)(n,200,!1,!0),[]),l=Object(a.m)(e=>{const t=e.currentTarget;Object(c.a)(t)||(t.buffered.length&&i(t.buffered.end(0)/t.duration),o(t.readyState>=3||t.currentTime>0))},[o]);return{isBuffered:t,bufferedProgress:s,bufferingHandlers:{onLoadedData:l,onPlaying:l,onLoadStart:l,onPause:l,onTimeUpdate:l,onProgress:l},checkBuffering(e){o(e.readyState>=3)}}}},function(e,t,n){"use strict";function a(e,t){if(!t&&e===document.activeElement)return;const n=window.getSelection(),a=document.createRange();e.lastChild&&e.lastChild.nodeValue?(a.setStart(e.lastChild,e.lastChild.nodeValue.length),n.removeAllRanges(),n.addRange(a)):e.focus()}n.d(t,"a",(function(){return a}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var a=n(5),r=n(7);const c={B:a.ApiMessageEntityTypes.Bold,STRONG:a.ApiMessageEntityTypes.Bold,I:a.ApiMessageEntityTypes.Italic,EM:a.ApiMessageEntityTypes.Italic,U:a.ApiMessageEntityTypes.Underline,S:a.ApiMessageEntityTypes.Strike,STRIKE:a.ApiMessageEntityTypes.Strike,DEL:a.ApiMessageEntityTypes.Strike,CODE:a.ApiMessageEntityTypes.Code,PRE:a.ApiMessageEntityTypes.Pre,BLOCKQUOTE:a.ApiMessageEntityTypes.Blockquote};function s(e){const t=document.createElement("div");t.innerHTML=function(e){let t=e.slice(0);r.c||(t=t.replace(/]+alt="([^"]+)"[^>]*>/gm,"$1"));return t=t.replace(/<\/?span([^>]*)?>/g,""),t=t.replace(/ /g," "),t=t.replace(/]*)?>/g,"\n"),t=t.replace(/<\/div>(\s*)
/g,"\n"),t=t.replace(/
/g,"\n"),t=t.replace(/<\/div>/g,""),t=t.replace(/^`{3}(.*[\n\r][^]*?^)`{3}/gm,"
$1
"),t=t.replace(/[`]{3}([^`]+)[`]{3}/g,"
$1
"),t=t.replace(/[`]{1}([^`\n]+)[`]{1}/g,"$1"),t=t.replace(/[*]{2}([^*\n]+)[*]{2}/g,"$1"),t=t.replace(/[*]{1}([^*\n]+)[*]{1}/g,"$1"),t=t.replace(/[~]{2}([^~\n]+)[~]{2}/g,"$1"),t}(e);const n=t.innerText.trim().replace(/\u200b+/g,"").slice(0,4096);let s=0,i=0;const o=[];function l(e){const{index:t,entity:r}=function(e,t,n){const r=function(e){if(c[e.nodeName])return c[e.nodeName];if("A"===e.nodeName){const t=e;return t.dataset.entityType===a.ApiMessageEntityTypes.MentionName?a.ApiMessageEntityTypes.MentionName:t.href.startsWith("mailto:")?a.ApiMessageEntityTypes.Email:t.href.startsWith("tel:")?a.ApiMessageEntityTypes.Phone:t.href!==t.textContent?a.ApiMessageEntityTypes.TextUrl:a.ApiMessageEntityTypes.Url}if("SPAN"===e.nodeName)return e.dataset.entityType;return}(e);if(!r||!e.textContent)return{index:n,entity:void 0};const s=t.indexOf(e.textContent,n),i=s>=0?s:n,o=t.substring(0,i).length,{length:l}=t.substring(i,i+e.textContent.length);let u,d;r===a.ApiMessageEntityTypes.TextUrl&&(u=e.href);r===a.ApiMessageEntityTypes.MentionName&&(d=Number(e.dataset.userId));return{index:i,entity:{type:r,offset:o,length:l,...u&&{url:u},...d&&{userId:d}}}}(e,n,s);r?(s=t,o.push(r)):e.textContent&&(s+=e.textContent.length),e.hasChildNodes()&&i<=3&&(i+=1,Array.from(e.childNodes).forEach(l))}return Array.from(t.childNodes).forEach(e=>{i=1,l(e)}),{text:n,entities:o.length?o:void 0}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var a=n(0),r=n(27),c=n(8),s=n(42),i=n(38),o=n(36);n(200);var l=Object(a.h)(({isQuick:e,onFileSelect:t})=>{const[n,r,s]=Object(o.a)(),i=Object(c.a)("DropTarget",n&&"hovered");return a.a.createElement("div",{className:i,onDrop:t,onDragEnter:()=>{r()},onDragLeave:e=>{const{relatedTarget:t}=e;t&&e.stopPropagation(),s()}},a.a.createElement("div",{className:"target-content"},a.a.createElement("div",{className:"icon icon-"+(e?"photo":"document")}),a.a.createElement("div",{className:"title"},"Drop files here to send them"),a.a.createElement("div",{className:"description"},e?"in a quick way":"without compression")))});n(201);let u;!function(e){e.None="none",e.Document="document",e.QuickFile="quick_file"}(u||(u={}));t.b=Object(a.h)(({isOpen:e,withQuick:t,onHide:n,onFileSelect:o})=>{const u=Object(a.q)(null),d=Object(i.a)(t),{shouldRender:m,transitionClassNames:h}=Object(r.a)(e);Object(a.n)(()=>e?Object(s.a)(n):void 0,[e,n]);const b=Object(a.m)(e=>{const{dataTransfer:t}=e;t.files&&t.files.length>0&&(n(),o(Array.from(t.files),!1))},[o,n]),f=Object(a.m)(e=>{const{dataTransfer:t}=e;t.files&&t.files.length>0&&(n(),o(Array.from(t.files),!0))},[o,n]),p=Object(a.m)(e=>{e.stopPropagation();const{target:t,relatedTarget:a}=e;t.matches(".DropTarget, .DropArea")&&!a&&(u.current=window.setTimeout(()=>{n()},150))},[n]);if(!m)return;const g=Object(c.a)("DropArea",h);return a.a.createElement("div",{className:g,onDragLeave:p,onDragOver:()=>{u.current&&window.clearTimeout(u.current)},onDrop:n},a.a.createElement(l,{onFileSelect:b}),(t||d)&&a.a.createElement(l,{onFileSelect:f,isQuick:!0}))})},,function(e,t,n){"use strict";var a=n(0),r=n(2),c=n(6),s=n(4),i=n(35),o=n(8),l=n(93),u=n(99);n(182);t.a=Object(a.h)(Object(r.h)((e,{chatOrUserId:t})=>{if(!t)return{};return{chat:t?Object(c.f)(e,t):void 0,user:Object(s.lb)(t)?Object(c.Bb)(e,t):void 0}})(({icon:e,title:t,isMinimized:n,canClose:r,onClick:c,clickArg:d,chat:m,user:h,className:b})=>{let f,p;if(Object(l.a)(),e&&t)f=a.a.createElement("div",{className:"item-icon"},a.a.createElement("i",{className:"icon-"+e})),p=t;else if(m||h){f=a.a.createElement(u.a,{chat:m,user:h,size:"small",isSavedMessages:h&&h.isSelf});const e=!m||h&&!h.isSelf?Object(s.Y)(h):Object(s.l)(m,h);p=e?Object(i.a)(e):void 0}const g=Object(o.a)("PickerSelectedItem",b,n&&"minimized",r&&"closeable");return a.a.createElement("div",{className:g,onClick:()=>c(d),title:n?p:void 0},f,!n&&a.a.createElement("div",{className:"item-name"},p),r&&a.a.createElement("div",{className:"item-remove"},a.a.createElement("i",{className:"icon-close"})))}))},function(e,t,n){"use strict";let a;n.d(t,"a",(function(){return a})),n.d(t,"b",(function(){return r})),function(e){e[e.Up=0]="Up",e[e.Down=1]="Down",e[e.Left=2]="Left",e[e.Right=3]="Right"}(a||(a={}));function r(e,t){let n,r=!1;function c(e){t.excludedClosestSelector&&(e.target.matches(t.excludedClosestSelector)||e.target.closest(t.excludedClosestSelector))||(n=e,"mousedown"===e.type?(document.addEventListener("mousemove",i),document.addEventListener("mouseup",s)):"touchstart"===e.type&&(document.addEventListener("touchmove",i),document.addEventListener("touchend",s),document.addEventListener("touchcancel",s),"touches"in e&&(void 0===e.pageX&&(e.pageX=e.touches[0].pageX),void 0===e.pageY&&(e.pageY=e.touches[0].pageY))),document.body.classList.add("no-selection"),t.withCursor&&document.body.classList.add("cursor-grabbing"),t.onCapture&&t.onCapture(e))}function s(e){n&&(t.withCursor&&document.body.classList.remove("cursor-grabbing"),document.body.classList.remove("no-selection"),document.removeEventListener("mouseup",s),document.removeEventListener("mousemove",i),document.removeEventListener("touchcancel",s),document.removeEventListener("touchend",s),document.removeEventListener("touchmove",i),n=void 0,r?t.onRelease&&t.onRelease(e):t.onClick&&t.onClick(e)),r=!1}function i(e){if(n){"touchmove"===e.type&&"touches"in e&&(void 0===e.pageX&&(e.pageX=e.touches[0].pageX),void 0===e.pageY&&(e.pageY=e.touches[0].pageY));const c=e.pageX-n.pageX,s=e.pageY-n.pageY;(Math.abs(c)>=15||Math.abs(s)>=15)&&(r=!0),t.onDrag&&t.onDrag(e,n,{dragOffsetX:c,dragOffsetY:s}),t.onSwipe&&function(e,t,n,r){const c=Math.abs(t),s=Math.abs(n);if(t&&n){if(Math.max(c,s)/Math.min(c,s)<2)return}c>=50?r(e,t<0?a.Left:a.Right):s>=50&&r(e,n<0?a.Up:a.Down)}(e,c,s,t.onSwipe)}}return e.addEventListener("mousedown",c),e.addEventListener("touchstart",c,{passive:!0}),()=>{e.removeEventListener("mousedown",c),e.removeEventListener("touchstart",c)}}},function(e,t,n){"use strict";var a=n(0);t.a=(e,t)=>{Object(a.n)(()=>{const t=e.current;if(t)return t.addEventListener("wheel",n,{passive:!0}),()=>{t.removeEventListener("wheel",n)};function n(e){e.deltaX||(t.scrollLeft+=e.deltaY/4)}},[e,t])}},function(e,t,n){"use strict";var a=n(0),r=n(2),c=n(9);t.a=(e,t,n,s)=>{const{loadMessage:i}=Object(r.d)(),o=Object(a.p)(()=>{const n=Object(c.g)(i,500,!0);return()=>{n({chatId:e,messageId:t,replyOriginForId:s})}},[i,e,t,s]);Object(a.n)(()=>{t&&!n&&o()})}},function(e,t,n){"use strict";var a=n(0);n(189);t.a=()=>a.a.createElement("span",{className:"VerifiedIcon"})},function(e,t,n){"use strict";var a=n(0),r=n(7);let c=0;t.a=(e,t)=>{const[n,s]=Object(a.r)(!1),[i,o]=Object(a.r)(void 0),l=Object(a.m)(e=>{t||2!==e.button||document.body.classList.add("no-selection")},[t]),u=Object(a.m)(e=>{t||(e.preventDefault(),document.body.classList.remove("no-selection"),i||(document.body.classList.remove("no-selection"),0===c&&document.body.classList.add("has-context-menu"),c++,s(!0),o({x:e.clientX,y:e.clientY})))},[t,i]),d=Object(a.m)(()=>{s(!1)},[]),m=Object(a.m)(()=>{o(void 0),document.body.classList.remove("no-selection"),setTimeout(()=>{c--,0===c&&document.body.classList.remove("has-context-menu")},200)},[]);return Object(a.n)(()=>{if(t||!r.k)return;const n=e.current;if(!n)return;let a;const c=()=>{a&&(clearTimeout(a),a=void 0)},l=e=>{t||r.f&&window.document.body.classList.contains("enable-symbol-menu-transforms")||(c(),a=window.setTimeout(()=>(e=>{c();const{clientX:t,clientY:a}=e.touches[0];i||(n.addEventListener("touchend",(function e(t){n.removeEventListener("touchend",e,!0),t.stopImmediatePropagation(),t.preventDefault(),t.stopPropagation()}),!0),document.body.classList.add("no-selection"),s(!0),o({x:t,y:a}))})(e),250))};return n.addEventListener("touchstart",l,{passive:!0}),n.addEventListener("touchcancel",c,!0),n.addEventListener("touchend",c,!0),n.addEventListener("touchmove",c,{passive:!0}),()=>{c(),n.removeEventListener("touchstart",l),n.removeEventListener("touchcancel",c,!0),n.removeEventListener("touchend",c,!0),n.removeEventListener("touchmove",c)}},[i,t,e]),{isContextMenuOpen:n,contextMenuPosition:i,handleBeforeContextMenu:l,handleContextMenu:u,handleContextMenuClose:d,handleContextMenuHide:m}}},function(e,t,n){"use strict";function a(e,t){return t-Math.floor(t/e)*e}n.d(t,"a",(function(){return a}))},function(e,t,n){"use strict";var a=n(1);t.a=e=>{e.play().catch(e=>{a.l&&console.warn(e)})}},function(e,t,n){"use strict";n.d(t,"a",(function(){return u})),n.d(t,"b",(function(){return m}));var a=n(0),r=n(2),c=n(5),s=n(4),i=n(35),o=n(68),l=n(52);function u(e,t,n){const a=e.content.text;if(!a||!a.text){const t=Object(s.N)(e);return t?[t]:void 0}const{text:r,entities:c}=a;return m(r,c,t,n)}function d(e){const t=new Set,n=[];return e.forEach((a,r)=>{if(t.has(r))return;const c=function e(t,n,a,r){const{offset:c,length:s}=t,i=new Set([n]);if(r.has(n))return;const o=a.filter((e,t)=>t>n&&e.offset>=c&&e.offsete(t,a.indexOf(t),a,r)).filter(Boolean);return o.forEach(e=>e.organizedIndexes.forEach(e=>i.add(e))),{entity:t,organizedIndexes:i,nestedEntities:o}}(a,r,e,t);c&&(c.organizedIndexes.forEach(e=>{t.add(e)}),n.push(c))}),n}function m(e,t,n,r,s){if(!t||!t.length)return h(e,n,r,s);const u=[];let m=!1;const g=d(t);function O(t,u,d,g){const v=[],{entity:j,nestedEntities:E}=d,{offset:y,length:N,type:C}=j;let T=e.substring(t,y);const M=T.length;T&&(m&&T.length>0&&"\n"===T[0]&&(T=T.substr(1),m=!1),T&&v.push(...h(T,n,r,s)));const w=t+M,L=w+N;let S=e.substring(y,y+N);const I=[];if(m&&S.length>0&&"\n"===S[0]&&(S=S.substr(1),m=!1),C===c.ApiMessageEntityTypes.Pre&&(m=!0),E.length){let e=w;E.forEach((t,n)=>{const{renderResult:a,entityEndIndex:r}=O(e,L,t,n===E.length-1);I.push(...a),e=r})}const k=s?function(e,t,n){const a="string"==typeof t&&t,r=n.length?n.join(""):Object(i.a)(t,["emoji_html","br_html"]).join("");if(!a)return r;switch(e.type){case c.ApiMessageEntityTypes.Bold:return`${r}`;case c.ApiMessageEntityTypes.Italic:return`${r}`;case c.ApiMessageEntityTypes.Underline:return`${r}`;case c.ApiMessageEntityTypes.Code:return`${r}`;case c.ApiMessageEntityTypes.Pre:return`\`\`\`
${r}
\`\`\``;case c.ApiMessageEntityTypes.Strike:return`${r}`;case c.ApiMessageEntityTypes.MentionName:return`${r}`;case c.ApiMessageEntityTypes.Url:case c.ApiMessageEntityTypes.TextUrl:return`${r}`;default:return r}}(j,S,I):function(e,t,n){const r="string"==typeof t&&t,s=n.length?n:t;if(!r)return h(s);switch(e.type){case c.ApiMessageEntityTypes.Bold:return a.a.createElement("strong",null,h(s));case c.ApiMessageEntityTypes.Blockquote:return a.a.createElement("blockquote",null,h(s));case c.ApiMessageEntityTypes.BotCommand:return a.a.createElement("a",{onClick:f,className:"text-entity-link"},h(s));case c.ApiMessageEntityTypes.Hashtag:case c.ApiMessageEntityTypes.Cashtag:return a.a.createElement("a",{onClick:p,className:"text-entity-link"},h(s));case c.ApiMessageEntityTypes.Code:return a.a.createElement("code",{className:"text-entity-code"},h(s));case c.ApiMessageEntityTypes.Email:return a.a.createElement("a",{href:"mailto:"+r,target:"_blank",rel:"noopener noreferrer",className:"text-entity-link"},h(s));case c.ApiMessageEntityTypes.Italic:return a.a.createElement("em",null,h(s));case c.ApiMessageEntityTypes.MentionName:return a.a.createElement(o.a,{userId:e.userId},h(s));case c.ApiMessageEntityTypes.Mention:return a.a.createElement(o.a,{username:r},h(s));case c.ApiMessageEntityTypes.Phone:return a.a.createElement("a",{href:"tel:"+r,className:"text-entity-link"},h(s));case c.ApiMessageEntityTypes.Pre:return a.a.createElement("pre",{className:"text-entity-pre"},h(s));case c.ApiMessageEntityTypes.Strike:return a.a.createElement("del",null,h(s));case c.ApiMessageEntityTypes.TextUrl:case c.ApiMessageEntityTypes.Url:return a.a.createElement(l.a,{url:b(r,e),text:r},h(s));case c.ApiMessageEntityTypes.Underline:return a.a.createElement("ins",null,h(s));default:return h(s)}}(j,S,I);if(Array.isArray(k)?v.push(...k):v.push(k),g&&L0&&"\n"===t[0]&&(t=t.substring(1)),t&&v.push(...h(t,n,r,s))}return{renderResult:v,entityEndIndex:L}}let v=0;return g.forEach((t,n)=>{const{renderResult:a,entityEndIndex:r}=O(v,e.length,t,n===g.length-1);u.push(...a),v=r}),u}function h(e,t,n,a){if(Array.isArray(e)){const r=[];return e.forEach(e=>{r.push(...h(e,t,n,a))}),r}if(a)return Object(i.a)(e,["emoji_html","br_html"]);const r=n?"hq_emoji":"emoji";return t?Object(i.a)(e,[r,"br","highlight"],{highlight:t}):Object(i.a)(e,[r,"br"])}function b(e,t){const{type:n,url:a}=t;return n===c.ApiMessageEntityTypes.TextUrl&&a?a:e}function f(e){Object(r.d)().sendBotCommand({command:e.currentTarget.innerText})}function p(e){Object(r.d)().setLocalTextSearchQuery({query:e.currentTarget.innerText}),Object(r.d)().searchTextMessagesLocal()}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var a=n(0),r=n(168),c=n(14),s=n(29);const i=new Map;function o(e,t=!1,n){const o=Object(a.q)(e?i.get(e):void 0),l=Object(a.q)(),u=Object(s.a)();return l.current&&t&&(clearTimeout(l.current),l.current=void 0),Object(a.n)(()=>{if(!e||o.current||t)return;const a=new Image;a.onload=()=>{const t=Object(c.f)(a);Object(r.a)(t.getContext("2d"),0,0,t.width,t.height,2,2);const n=t.toDataURL();o.current=n,u(),i.size>=1e3&&i.clear(),i.set(e,n)},n?l.current=window.setTimeout(()=>{a.src=e},n):a.src=e},[e,n,u,t]),o.current}},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var a=n(0),r=n(9);function c(e,t){Object(a.n)(()=>{const t=e.current;return()=>{t&&Object(r.b)(()=>{t.pause(),t.src="",t.load()})}},t)}},,,function(e,t,n){},,,function(e,t,n){"use strict";var a=n(0),r=n(8),c=n(36),s=n(93),i=n(16),o=n(31);n(180);t.a=Object(a.h)(({ref:e,children:t,value:n,inputId:l,className:u,focused:d,isLoading:m,placeholder:h,disabled:b,canClose:f,onChange:p,onReset:g,onFocus:O,onBlur:v})=>{let j=Object(a.q)(null);e&&(j=e);const[E,y,N]=Object(c.a)(d);Object(a.n)(()=>{j.current&&(d?j.current.focus():j.current.blur())},[d,h]);const C=Object(s.a)();return a.a.createElement("div",{className:Object(r.a)("SearchInput",u,E&&"has-focus")},t,a.a.createElement("input",{ref:j,id:l,type:"text",placeholder:h||C("Search"),className:"form-control",value:n,disabled:b,onChange:function(e){const{currentTarget:t}=e;p(t.value)},onFocus:function(){y(),O&&O()},onBlur:function(){N(),v&&v()}}),a.a.createElement("i",{className:"icon-search"}),m&&a.a.createElement(i.a,null),!m&&(n||f)&&g&&a.a.createElement(o.a,{round:!0,size:"tiny",color:"translucent",onClick:g},a.a.createElement("span",{className:"icon-close"})))})},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var a=n(9),r=n(55),c=n(7);function s(e,t){c.d?Object(a.b)(()=>{!function(e,t){const{scrollLeft:n,offsetWidth:a,scrollWidth:c}=e;let s=t-n;if(s<0){const e=-n;s=Math.max(s,e)}else if(s>0){const e=c-(n+a);s=Math.min(s,e)}const i=e.scrollLeft+s,o=Date.now();Object(r.a)(()=>{const t=Math.min((Date.now()-o)/450,1),n=s*(1-function(e){return 1-(1-e)**3.5}(t));return e.scrollLeft=Math.round(i-n),t<1})}(e,t)}):e.scrollTo({left:t,behavior:"smooth"})}},function(e,t,n){"use strict";var a=n(7);t.a=(e,t)=>{a.d&&(e.style.overflow="hidden"),void 0!==t&&(e.scrollTop=t),a.d&&(e.style.overflow="")}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));function a(e,t=30){return!e||e.length<=t?e:e.substr(0,t)+"..."}},function(e,t,n){"use strict";var a=n(0),r=n(2),c=n(6),s=n(4),i=n(35);n(190);t.a=Object(a.h)(Object(r.h)((e,{typingStatus:t})=>{if(!t.userId)return{};return{typingUser:Object(c.Bb)(e,t.userId)}})(({typingStatus:e,typingUser:t})=>{const n=t&&!t.isSelf&&Object(s.Y)(t);return a.a.createElement("p",{className:"typing-status"},n&&a.a.createElement("span",{className:"sender-name"},Object(i.a)(n)),e.action,a.a.createElement("span",{className:"ellipsis"}))}))},function(e,t,n){"use strict";var a=n(0),r=n(2),c=n(6),s=n(4),i=n(3),o=n(93),l=n(99),u=n(98),d=n(31);n(193);t.a=Object(a.h)(Object(r.h)((e,{chat:t})=>{const n=Object(s.lb)(t.id),a=Object(c.N)(e,t.id),r=n&&!a,i=t&&Object(s.lb)(t.id)?Object(s.Y)(Object(c.Bb)(e,Object(s.T)(t))):void 0;return{isPrivateChat:n,isChatWithSelf:a,isChannel:Object(s.jb)(t),isBasicGroup:Object(s.ib)(t),isSuperGroup:Object(s.nb)(t),canDeleteForAll:r,chatTitle:Object(s.l)(t),contactFirstName:i}},(e,t)=>Object(i.l)(t,["leaveChannel","deleteHistory","deleteChannel"]))(({isOpen:e,chat:t,isChannel:n,isPrivateChat:r,isChatWithSelf:c,isBasicGroup:s,isSuperGroup:i,canDeleteForAll:m,chatTitle:h,contactFirstName:b,onClose:f,leaveChannel:p,deleteHistory:g,deleteChannel:O})=>{const v=Object(a.m)(()=>{g({chatId:t.id,maxId:t.lastMessage.id,shouldDeleteForAll:!0}),f()},[g,t.id,t.lastMessage,f]),j=Object(a.m)(()=>{r||s?g({chatId:t.id,maxId:t.lastMessage.id,shouldDeleteForAll:!1}):!n&&!i||t.isCreator?(n||i)&&t.isCreator&&O({chatId:t.id}):p({chatId:t.id}),f()},[r,s,n,i,t.isCreator,t.lastMessage,t.id,f,g,p,O]),E=Object(o.a)();return a.a.createElement(u.a,{isOpen:e,onClose:f,className:"DeleteChatModal",header:a.a.createElement("div",{className:"modal-header"},a.a.createElement(l.a,{size:"tiny",chat:t,isSavedMessages:c}),a.a.createElement("h3",{className:"modal-title"},n&&!t.isCreator?"Leave Channel?":n&&t.isCreator?"Delete and Leave Channel?":s||i?"Leave Group?":"Delete Chat?"))},n&&!t.isCreator?a.a.createElement("p",null,"Are you sure you want to leave channel ",a.a.createElement("strong",null,h),"?"):n&&t.isCreator?a.a.createElement("p",null,"Are you sure you want to delete and leave channel ",a.a.createElement("strong",null,h),"?"):s||i?a.a.createElement("p",null,"Are you sure you want to leave group ",a.a.createElement("strong",null,h),"?"):a.a.createElement("p",null,"Are you sure you want to delete chat with ",a.a.createElement("strong",null,b),"?"),m&&a.a.createElement(d.a,{color:"danger",className:"confirm-dialog-button",isText:!0,onClick:v},"Delete for ",b?"me and "+b:"Everyone"),a.a.createElement(d.a,{color:"danger",className:"confirm-dialog-button",isText:!0,onClick:j},n&&!t.isCreator?"Leave Channel":n&&t.isCreator?"Delete and Leave Channel":s||i?"Leave Group":"Delete"+(m?" just for me":"")),a.a.createElement(d.a,{className:"confirm-dialog-button",isText:!0,onClick:f},E("Cancel")))}))},function(e,t,n){"use strict";function a(e){e.dataset.patchedForSafari||(e.addEventListener("play",()=>{const t=e.currentTime;e.addEventListener("progress",(function n(){e.buffered.length&&(e.dataset.patchForSafariInProgress="true",e.currentTime=e.duration-1,e.addEventListener("progress",()=>{delete e.dataset.patchForSafariInProgress,e.currentTime=t,e.paused&&e.play()},{once:!0}),e.removeEventListener("progress",n))}))},{once:!0}),e.dataset.patchedForSafari="true")}function r(e){return Boolean(e.dataset.patchForSafariInProgress)}n.d(t,"b",(function(){return a})),n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";var a=n(0),r=n(38);t.a=(e,t)=>{const n=Object(r.a)(t);return Object(a.o)(()=>{e(n||[])},t)}},function(e,t,n){"use strict";var a=n(0),r=n(53),c=n(4),s=n(95),i=n(112),o=n(97),l=n(166),u=n(167);t.a=Object(a.h)(({message:e,observeIntersection:t,smaller:n,uploadProgress:d,withDate:m,datetime:h,className:b,sender:f,isSelected:p,isSelectable:g,onCancelUpload:O,onDateClick:v})=>{const j=Object(a.q)(null),E=e.content.document,y=Object(r.b)(E)||"",{fileName:N,size:C,timestamp:T}=E,M=Object(s.b)(j,t),[w,L]=Object(a.r)(!1),{mediaData:S,downloadProgress:I}=Object(i.a)(Object(c.D)(e,"download"),!w),{isUploading:k,isTransferring:A,transferProgress:x}=Object(c.s)(e,d||I,w),D=Object(r.c)(E),_=D?Object(c.E)(e):void 0,R=D?E.previewBlobUrl:void 0,P=Object(o.a)(Object(c.D)(e,"pictogram"),!M),F=Object(a.m)(()=>{k?O&&O():L(e=>!e)},[k,O]),U=Object(a.m)(()=>{v(e.id,e.chatId)},[v,e.id,e.chatId]);return Object(a.n)(()=>{w&&S&&(Object(l.a)(S,N),L(!1))},[N,S,w]),a.a.createElement(u.a,{ref:j,name:N,extension:y,size:C,timestamp:m?h||T:void 0,thumbnailDataUri:_,previewData:R||P,smaller:n,isTransferring:A,isUploading:k,transferProgress:x,className:b,sender:f,isSelectable:g,isSelected:p,onClick:F,onDateClick:v?U:void 0})})},function(e,t,n){"use strict";var a=n(0),r=n(12),c=n(17);t.a=e=>{const{isOpen:t}=e,n=Object(c.a)(r.a.Extra,"StickerSetModal",!t);return n?a.a.createElement(n,e):void 0}},function(e,t,n){"use strict";var a=n(0),r=n(1),c=n(8),s=n(42),i=n(27),o=n(69),l=n(36),u=n(93),d=n(31);n(225);const m={B:"bold",STRONG:"bold",I:"italic",EM:"italic",U:"underline",DEL:"strikethrough",CODE:"monospace"};t.a=Object(a.h)(({isOpen:e,anchorPosition:t,selectedRange:n,onClose:h})=>{const b=Object(a.q)(null),f=Object(a.q)(null),{shouldRender:p,transitionClassNames:g}=Object(i.a)(e),[O,v,j]=Object(l.a)(),[E,y]=Object(a.r)(""),[N,C]=Object(a.r)(!1),[T,M]=Object(a.r)(),[w,L]=Object(a.r)({});Object(a.n)(()=>e?Object(s.a)(h):void 0,[e,h]),Object(o.a)(e,b,h),Object(a.n)(()=>{O?f.current.focus():(y(""),C(!1))},[O]),Object(a.n)(()=>{p||(j(),L({}),M(void 0))},[j,p]),Object(a.n)(()=>{if(!e||!n)return;const t={};let{parentElement:a}=n.commonAncestorContainer;for(;a&&a.id!==r.q;){const e=m[a.tagName];e&&(t[e]=!0),a=a.parentElement}L(t)},[e,n,v]);const S=Object(a.m)(()=>{if(n)return n.toString()},[n]),I=Object(a.m)(()=>{if(n)return n.commonAncestorContainer.parentElement},[n]);function k(){const e=f.current;if(!e)return;const{offsetWidth:t,scrollWidth:n,scrollLeft:a}=e;if(n<=t)return void M(void 0);let r="";a0&&(r+=" mask-left"),M(r)}function A(e){if(w[e])return"active";if("monospace"===e||"strikethrough"===e){if(Object.keys(w).some(t=>t!==e&&!!w[t]))return"disabled"}else if(w.monospace||w.strikethrough)return"disabled"}const x=Object(a.m)(()=>{L(e=>(document.execCommand(e.bold?"removeFormat":"bold"),Object.keys(e).forEach(t=>{"italic"!==t&&"underline"!==t||!e[t]||document.execCommand(t)}),{...e,bold:!e.bold}))},[]),D=Object(a.m)(()=>{document.execCommand("italic"),L(e=>({...e,italic:!e.italic}))},[]),_=Object(a.m)(()=>{document.execCommand("underline"),L(e=>({...e,underline:!e.underline}))},[]),R=Object(a.m)(()=>{if(w.strikethrough){const e=I();if(!n||!e||"DEL"!==e.tagName||!e.textContent)return;return e.replaceWith(e.textContent),void L(e=>({...e,strikethrough:!1}))}const e=S();document.execCommand("insertHTML",!1,`${e}`),h()},[I,S,h,n,w.strikethrough]),P=Object(a.m)(()=>{if(w.monospace){const e=I();if(!n||!e||"CODE"!==e.tagName||!e.textContent)return;return e.replaceWith(e.textContent),void L(e=>({...e,monospace:!1}))}const e=S();document.execCommand("insertHTML",!1,`${e}`),h()},[I,S,h,n,w.monospace]);function F(){const e=E.includes("://")?E:"http://"+E;if(N){const t=I();if(!t||"A"!==t.tagName)return;return t.href=e,void h()}const t=S();!function(){if(!n)return;const e=window.getSelection();e&&(e.removeAllRanges(),e.addRange(n))}(),document.execCommand("insertHTML",!1,`${t}`),h()}const U=Object(a.m)(e=>{const t={KeyK:v,KeyB:x,KeyU:_,KeyI:D,KeyM:P,KeyS:R}[e.code];!e.altKey&&(e.ctrlKey||e.metaKey)&&t&&(e.preventDefault(),e.stopPropagation(),t())},[x,D,_,P,R,v]);Object(a.n)(()=>(e&&document.addEventListener("keydown",U),()=>document.removeEventListener("keydown",U)),[e,U]);const B=Object(u.a)();if(!p)return;const q=Object(c.a)("TextFormatter",g,O&&"link-control-shown"),H=Object(c.a)("TextFormatter-link-url-confirm",!!E.length&&"shown"),$=t?`left: ${t.x}px; top: ${t.y}px;--text-formatter-left: ${t.x}px;`:"";return a.a.createElement("div",{ref:b,className:q,style:$,onKeyDown:function(e){"Enter"===e.key&&O&&(F(),e.preventDefault())}},a.a.createElement("div",{className:"TextFormatter-buttons"},a.a.createElement(d.a,{color:"translucent",ariaLabel:"Bold text",className:A("bold"),onClick:x},a.a.createElement("i",{className:"icon-bold"})),a.a.createElement(d.a,{color:"translucent",ariaLabel:"Italic text",className:A("italic"),onClick:D},a.a.createElement("i",{className:"icon-italic"})),a.a.createElement(d.a,{color:"translucent",ariaLabel:"Underlined text",className:A("underline"),onClick:_},a.a.createElement("i",{className:"icon-underlined"})),a.a.createElement(d.a,{color:"translucent",ariaLabel:"Strikethrough text",className:A("strikethrough"),onClick:R},a.a.createElement("i",{className:"icon-strikethrough"})),a.a.createElement(d.a,{color:"translucent",ariaLabel:"Monospace text",className:A("monospace"),onClick:P},a.a.createElement("i",{className:"icon-monospace"})),a.a.createElement("div",{className:"TextFormatter-divider"}),a.a.createElement(d.a,{color:"translucent",ariaLabel:B("TextFormat.AddLinkTitle"),onClick:v},a.a.createElement("i",{className:"icon-link"}))),a.a.createElement("div",{className:"TextFormatter-link-control"},a.a.createElement("div",{className:"TextFormatter-buttons"},a.a.createElement(d.a,{color:"translucent",ariaLabel:B("Cancel"),onClick:j},a.a.createElement("i",{className:"icon-arrow-left"})),a.a.createElement("div",{className:"TextFormatter-divider"}),a.a.createElement("div",{className:Object(c.a)("TextFormatter-link-url-input-wrapper",T)},a.a.createElement("input",{ref:f,className:"TextFormatter-link-url-input",type:"text",value:E,placeholder:"Enter URL...",autoComplete:"off",inputMode:"url",onChange:function(e){y(e.target.value),k()},onScroll:k})),a.a.createElement("div",{className:H},a.a.createElement("div",{className:"TextFormatter-divider"}),a.a.createElement(d.a,{color:"translucent",ariaLabel:B("Save"),className:"color-primary",onClick:F},a.a.createElement("i",{className:"icon-check"}))))))})},function(e,t,n){"use strict";var a=n(0),r=n(28),c=n(4),s=n(97),i=n(102);n(231);t.a=Object(a.h)(({message:e,idPrefix:t="shared-media",onClick:n})=>{const o=Object(a.m)(()=>{n(e.id,e.chatId)},[e.id,e.chatId,n]),l=Object(c.E)(e),u=Object(s.a)(Object(c.D)(e,"pictogram")),{shouldRenderThumb:d,shouldRenderFullMedia:m,transitionClassNames:h}=Object(i.a)(u,"slow"),b=Object(c.O)(e);return a.a.createElement("div",{id:`${t}${e.id}`,className:"Media scroll-item",onClick:n?o:void 0},d&&a.a.createElement("img",{src:l,alt:""}),m&&a.a.createElement("img",{src:u,className:h+" full-media",alt:""}),b&&a.a.createElement("span",{className:"video-duration"},b.isGif?"GIF":Object(r.e)(b.duration)))})},,function(e,t,n){"use strict";var a=n(0),r=n(2),c=n(7),s=n(28),i=n(4);var o=n(8),l=n(35);var u=n(112),d=n(27),m=n(121),h=n(164),b=n(93),f=n(31),p=n(113),g=n(110);n(207);const O=c.f?20:25,v=c.f?50:75;function j(e,t,{handleStartSeek:n,handleSeek:r,handleStopSeek:c}){return a.a.createElement("div",{className:"seekline no-selection",onMouseDown:n,onMouseMove:r,onMouseUp:c},a.a.createElement("span",{className:"seekline-buffered-progress"},a.a.createElement("i",{style:`transform: translateX(${100*t}%)`})),a.a.createElement("span",{className:"seekline-play-progress"},a.a.createElement("i",{style:`transform: translateX(${100*e}%)`})),a.a.createElement("span",{className:"seekline-thumb"},a.a.createElement("i",{style:`transform: translateX(${100*e}%)`})))}t.a=Object(a.h)(Object(r.h)(e=>({theme:e.settings.byKey.theme}))(({theme:e,message:t,senderTitle:n,uploadProgress:r,renderingFor:E,date:y,lastSyncTime:N,className:C,isSelectable:T,isSelected:M,onPlay:w,onReadMedia:L,onCancelUpload:S,onDateClick:I})=>{const{content:{audio:k,voice:A},isMediaUnread:x}=t,D=Boolean(A),_=Object(a.q)(!1),[R,P]=Object(a.r)(!1),F=N,{mediaData:U,downloadProgress:B}=Object(u.a)(Object(i.D)(t,"inline"),!F,Object(i.C)(t,"inline"));const{isBuffered:q,bufferedProgress:H,bufferingHandlers:$,checkBuffering:K}=Object(m.a)(),{isPlaying:Y,playProgress:V,playPause:z,setCurrentTime:W,duration:G}=Object(h.a)(Object(i.A)(t),Object(i.r)(t),U,$,K,R,(function(){P(!0),w(t.id,t.chatId)}),Object(i.sb)(t));Object(a.n)(()=>{P(Y)},[Y]);const{isUploading:X,isTransferring:Q,transferProgress:J}=Object(i.s)(t,r||B,R&&!q),{shouldRender:Z,transitionClassNames:ee}=Object(d.a)(Q),te=Object(a.m)(()=>{X?S&&S():(Y||w(t.id,t.chatId),P(!R),z())},[Y,X,t.id,t.chatId,S,w,z,R]);Object(a.n)(()=>{Y&&L&&x&&L()},[Y,x,L]);const ne=Object(a.m)(e=>{if(_.current){const t=e.currentTarget.closest(".seekline,.waveform");if(t){const{width:n,left:a}=t.getBoundingClientRect();W(G*((e.clientX-a)/n))}}},[G,W]),ae=Object(a.m)(e=>{_.current=!0,ne(e)},[ne]),re=Object(a.m)(()=>{_.current=!1},[]),ce=Object(a.m)(()=>{I(t.id,t.chatId)},[I,t.id,t.chatId]);Object(b.a)();const se={handleStartSeek:ae,handleSeek:ne,handleStopSeek:re},ie=Object(i.tb)(t),oe=Object(a.p)(()=>A&&function(e,t=0,n=!1,{handleStartSeek:r,handleSeek:c,handleStopSeek:s},i){const{waveform:o,duration:l}=e;if(!o)return;const u="dark"===i?"#494B75":"#CBCBCB",d="dark"===i?"#C69C85":"#B0DEA6",m="dark"===i?"#868DF5":"#54a3e6",h="dark"===i?"#FFFFFF":"#53ad53",b=Math.min(l/30,1),f=Math.round(O+(v-O)*b),p=function(e){const t=8*e.length,n=Math.floor(t/5);if(!n)return[];const a=Array(n),r=e;for(let e=0,t=n-1;e!==t;++e){const t=Math.floor(5*e/8),n=Math.floor(5*e%8),c=r[t]+(r[t+1]<<8);a[e]=c>>n&31}const c=Math.floor(5*(n-1)/8),s=Math.floor(5*(n-1)%8),i=r[c]+(r[c+1]<<8);return a[n-1]=i>>s&31,a}(new Uint8Array(o)),{data:g,peak:j}=function(e,t){let n=0;const a=new Array(t),r=e.length/t,c=e[0],s=e[e.length-1];for(let u=0;u{i.globalAlpha=s/e.length>=t?.5:1,i.fillStyle=t>s/e.length?r:a;const o=Math.max(2,c/Math.max(1,n)*23);!function(e,t,n,a,r,c){a<2*c&&(c=a/2);r<2*c&&(c=r/2);e.beginPath(),e.moveTo(t+c,n),e.arcTo(t+a,n,t+a,n-r,c),e.arcTo(t+a,n-r,t,n-r,c),e.arcTo(t,n-r,t,n,c),e.arcTo(t,n,t+a,n,c),e.closePath()}(i,4*s,23,2,o,1),i.fill()}),{src:s.toDataURL(),width:c,height:23}}(g,t,{peak:j,fillStyle:n?d:u,progressFillStyle:n?h:m});return a.a.createElement("img",{src:E,alt:"",width:y,height:N,className:"waveform",draggable:!1,onMouseDown:r,onMouseMove:c,onMouseUp:s})}(A,V,ie,se,e),[A,V,ie,se,e]),le=Object(o.a)("Audio media-inner",C,ie&&!E&&"own",E&&"bigger",M&&"audio-is-selected"),ue=["toggle-play"];Z?ue.push("loading"):Y?ue.push("pause"):Y||ue.push("play");const de=Y||V>0&&V<1,me=Object(o.a)("content",de&&"with-seekline");return a.a.createElement("div",{className:le},T&&a.a.createElement("div",{className:"message-select-control"},M&&a.a.createElement("i",{className:"icon-select"})),a.a.createElement(f.a,{round:!0,ripple:!c.f,size:E?"smaller":"tiny",className:ue.join(" "),ariaLabel:Y?"Pause audio":"Play audio",onClick:te},a.a.createElement("i",{className:"icon-play"}),a.a.createElement("i",{className:"icon-pause"})),Z&&a.a.createElement("div",{className:Object(o.a)("media-loading",ee)},a.a.createElement(p.a,{progress:J,transparent:!0,size:E?"m":"s",onClick:te})),"searchResult"===E&&a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{className:me},a.a.createElement("div",{className:"content-row"},a.a.createElement("p",{className:"title"},Object(l.a)(function(){if(D)return n||"Voice";const{title:e,fileName:t}=k;return e||t}())),a.a.createElement("div",{className:"message-date"},y&&a.a.createElement(g.a,{className:"date",onClick:ce},Object(s.g)(1e3*y)))),de&&j(V,H,se),!de&&a.a.createElement("p",{className:"duration"},V>0?Object(s.e)(G*V)+" / ":void 0,function(){if(D)return Object(s.e)(A.duration);const{performer:e}=k;return a.a.createElement(a.a.Fragment,null,e&&Object(l.a)(e),e&&n&&a.a.createElement("span",null,"•"),n&&Object(l.a)(n))}()))),"searchResult"!==E&&k&&function(e,t,n,r,c,i,o){const{title:u,performer:d,duration:m,fileName:h}=e,b=t||n>0&&n<1;return a.a.createElement("div",{className:"content"},a.a.createElement("p",{className:"title"},Object(l.a)(u||h)),b&&j(n,r,c),!b&&a.a.createElement("div",{className:"meta"},a.a.createElement("span",{className:"performer"},Object(l.a)(d||"Unknown")),i&&a.a.createElement(a.a.Fragment,null," ","•"," ",a.a.createElement(g.a,{className:"date",onClick:o},Object(s.d)(1e3*i)))),a.a.createElement("p",{className:"duration"},n>0?Object(s.e)(m*n)+" / ":void 0,Object(s.e)(m)))}(k,Y,V,H,se,y,I?ce:void 0),"searchResult"!==E&&A&&function(e,t,n){return a.a.createElement("div",{className:"content"},t,a.a.createElement("p",{className:"voice-duration"},Object(s.e)(e.duration),n&&a.a.createElement("span",null,"•")))}(A,oe,x))}))},function(e,t,n){"use strict";var a=n(0),r=n(143),c=n(38),s=n(128),i=n(93),o=n(8);n(186);var l=Object(a.h)(({className:e,title:t,active:n,badgeCount:r,isBadgeActive:c,previousActiveTab:s,onClick:i,clickArg:l})=>{const u=Object(a.q)(null);return Object(a.o)(()=>{if(!n||void 0===s)return;const e=u.current,t=e.querySelector("i"),a=e.parentElement.children[s].querySelector("i");a.classList.remove("animate"),t.classList.remove("animate");const r=a.parentElement.offsetLeft-t.parentElement.offsetLeft,c=a.clientWidth/t.clientWidth;t.style.transform=`translate3d(${r}px, 0, 0) scale3d(${c}, 1, 1)`,requestAnimationFrame(()=>{requestAnimationFrame(()=>{requestAnimationFrame(()=>{t.classList.add("animate"),t.style.transform="none"})})})},[n,s]),a.a.createElement("button",{type:"button",className:Object(o.a)("Tab",e,n&&"active"),onClick:()=>i(l),ref:u},a.a.createElement("span",null,t,!!r&&a.a.createElement("span",{className:Object(o.a)("badge",c&&"active")},r),a.a.createElement("i",null)))});n(187);t.a=Object(a.h)(({tabs:e,activeTab:t,onSwitchTab:n})=>{const o=Object(a.q)(null),u=Object(c.a)(t);Object(s.a)(o),Object(a.n)(()=>{const e=o.current;if(e.scrollWidth<=e.offsetWidth)return;const t=e.querySelector(".Tab.active");if(t){const n=t.offsetLeft-e.offsetWidth/2+t.offsetWidth/2;if(Math.abs(n-e.scrollLeft)<16)return;Object(r.a)(e,n)}},[t]);const d=Object(i.a)();return a.a.createElement("div",{className:"TabList no-selection no-scrollbar",ref:o},e.map((e,r)=>a.a.createElement(l,{key:e.title,title:d(e.title),active:r===t,badgeCount:e.badgeCount,isBadgeActive:e.isBadgeActive,previousActiveTab:u,onClick:n,clickArg:r})))})},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));const a={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",SERVICE_WORKER_DISABLED:"Service Worker is disabled. Please reload the page without holding key.",CAPTION_TOO_LONG_PLEASE_REMOVE_CHARACTERS:"The provided caption 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"};function r(e){const{message:t,isSlowMode:n,textParams:r}=e;if(n){const e=t.indexOf(" (caused by");return e>0?t.substring(0,e):t}let c=a[t];return c&&r&&(c=Object.keys(r).reduce((e,t)=>e.replace(t,r[t]),c)),c}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"c",(function(){return s})),n.d(t,"b",(function(){return i}));var a=n(1);const r=navigator.clipboard&&window.ClipboardItem,c=document.createElement("textarea");c.setAttribute("readonly",""),c.tabIndex=-1,c.className="visually-hidden";const s=e=>{c.value=e,document.body.appendChild(c);const t=document.getSelection();if(t){const e=t.rangeCount>0&&t.getRangeAt(0);c.select(),document.execCommand("copy"),e&&(t.removeAllRanges(),t.addRange(e))}document.body.removeChild(c)},i=e=>{const t=document.createElement("canvas"),n=t.getContext("2d"),a=new Image;a.onload=e=>{if(n&&e.currentTarget){const a=e.currentTarget;t.width=a.width,t.height=a.height,n.drawImage(a,0,0,a.width,a.height),t.toBlob(o,"image/png",1)}},a.src=e};async function o(e){if(e&&r)try{await navigator.clipboard.write([new window.ClipboardItem({[e.type]:e})])}catch(e){a.l&&console.error(e)}}},function(e,t,n){"use strict";var a=n(0),r=n(2),c=n(4);t.a=({chat:e,privateChatUser:t,handleDelete:n,folderId:s,isPinned:i})=>{const{toggleChatPinned:o,updateChatMutedState:l,toggleChatArchived:u,toggleChatUnread:d}=Object(r.d)();return Object(a.p)(()=>{if(!e)return;const a=t&&t.isSelf,r=e.unreadCount||e.hasUnreadMark?{title:"Mark as Read",icon:"readchats",handler:()=>d({id:e.id})}:{title:"Mark as Unread",icon:"unread",handler:()=>d({id:e.id})},m=i?{title:"Unpin",icon:"unpin",handler:()=>o({id:e.id,folderId:s})}:{title:"Pin",icon:"pin",handler:()=>o({id:e.id,folderId:s})},h=e.isMuted?{title:"Unmute",icon:"unmute",handler:()=>l({chatId:e.id,isMuted:!1})}:{title:"Mute",icon:"mute",handler:()=>l({chatId:e.id,isMuted:!0})},b=Object(c.hb)(e)?{title:"Unarchive",icon:"unarchive",handler:()=>u({id:e.id})}:{title:"Archive",icon:"archive",handler:()=>u({id:e.id})};return[r,m,...a?[]:[h,b],{title:Object(c.lb)(e.id)?"Delete":Object(c.d)(e)?"Delete and Leave":"Leave",icon:"delete",destructive:!0,handler:n}]},[e,t,n,s,i,o,l,u,d])}},function(e,t,n){"use strict";var a=n(0),r=n(28),c=n(161);n(192);t.a=({message:e,outgoingStatus:t})=>a.a.createElement("div",{className:"LastMessageMeta"},t&&a.a.createElement(c.a,{status:t}),a.a.createElement("span",{className:"time"},Object(r.g)(1e3*e.date)))},function(e,t,n){"use strict";var a,r=n(0),c=n(100);n(191);!function(e){e[e.failed=0]="failed",e[e.pending=1]="pending",e[e.succeeded=2]="succeeded",e[e.read=3]="read"}(a||(a={}));t.a=({status:e})=>r.a.createElement("div",{className:"MessageOutgoingStatus"},r.a.createElement(c.a,{name:"reveal",activeKey:a[e]},()=>r.a.createElement("i",{className:"icon-message-"+e})))},function(e,t,n){"use strict";var a=n(0);t.a=(e,t,n,r,c=0,s=0)=>{const[i,o]=Object(a.r)("right"),[l,u]=Object(a.r)("bottom"),[d,m]=Object(a.r)("");return Object(a.n)(()=>{const a=t();if(!e||!a)return;let{x:i,y:l}=e;const d={width:0,left:0,height:0,top:0},h=r(),b=n(),f=a.getBoundingClientRect(),p=h?{width:h.offsetWidth,height:h.offsetHeight}:d,g=b?b.getBoundingClientRect():d;i+p.width+c0?(o("right"),i-=3):(o("left"),i=16),l+p.height{const{shouldRender:u,transitionClassNames:d}=Object(r.a)(e,void 0,void 0,!t&&void 0),m=Object(c.a)(e),h=Object(c.a)(l),b=Object(a.q)();return m&&!e&&(b.current=h),u&&a.a.createElement("div",{id:n,className:Object(s.a)(i,d),onClick:o},e?l():b.current())}},function(e,t,n){"use strict";var a=n(0),r=n(165),c=n(51),s=n(148),i=n(106);t.a=(e,t,n,o,l,u=!1,d,m=!1)=>{const h=Object(a.q)(null),[b,f]=Object(a.r)(!1);let p=b;const[g,O]=Object(a.r)(0);Object(i.a)(()=>{h.current=Object(r.a)(e,(e,n)=>{switch(e){case"onPlay":f(!0);break;case"onPause":f(!1);break;case"onTimeUpdate":{const{proxy:e}=h.current,n=e.duration&&Number.isFinite(e.duration)?e.duration:t;O(e.currentTime/n);break}}o&&o[e]&&o[e](n)},d);const{proxy:n}=h.current;b||n.paused||(f(!0),p=!0),l&&l(n)},[e]);const{play:v,pause:j,setCurrentTime:E,proxy:y,destroy:N}=h.current,C=y.duration&&Number.isFinite(y.duration)?y.duration:t;Object(a.n)(()=>{C&&!Object(s.a)(y)&&O(y.currentTime/C)},[C,g,y]),Object(a.n)(()=>()=>{N(m)},[N,m]),Object(c.a)(([e,t])=>{e===u&&n===t||y.src&&y.paused||u&&n&&!b&&v(n)},[u,n,b,v,y.src,y.paused]);const T=Object(a.m)(()=>{b?j():n&&v(n)},[n,j,v,b]);return{isPlaying:p,playProgress:g,playPause:T,setCurrentTime:E,audioProxy:y,duration:C}}},function(e,t,n){"use strict";n.d(t,"b",(function(){return d})),n.d(t,"a",(function(){return m}));var a=n(7),r=n(133),c=n(148),s=n(2),i=n(4);const o=new Map;let l,u=[];function d(){const e=l&&o.get(l);e&&e.audio.pause()}function m(e,t,n){o.has(e)||(o.set(e,function(e,t){const n=new Audio;function a(t){return a=>{o.has(e)&&(Object(c.a)(n)||o.get(e).handlers.forEach(e=>{e(t,a)}))}}return n.addEventListener("timeupdate",a("onTimeUpdate")),n.addEventListener("play",a("onPlay")),n.addEventListener("pause",a("onPause")),n.addEventListener("loadstart",a("onLoadStart")),n.addEventListener("loadeddata",a("onLoadedData")),n.addEventListener("playing",a("onPlaying")),n.addEventListener("ended",()=>{if(Object(c.a)(n))return;const t=u[u.indexOf(e)+1];if(!t)return;if(!o.has(t))return void Object(s.d)().openAudioPlayer(Object(i.zb)(t));const a=o.get(t);a.onForcePlay&&a.onForcePlay(),l=t,a.audio.src&&Object(r.a)(a.audio)}),{audio:n,proxy:new Proxy(n,{get:(e,t)=>e[t]}),handlers:[],onForcePlay:t}}(e,n)),u.includes(e)||u.push(e));const{audio:d,proxy:m,handlers:h}=o.get(e);return h.push(t),{play(t){l&&l!==e&&o.get(l).audio.pause(),l=e,d.src||(d.src=t,d.preload="auto",t.includes("/progressive/")&&a.i&&Object(c.b)(d)),Object(r.a)(d)},pause(){l===e&&d.pause()},setCurrentTime(t){l===e&&(d.currentTime=t)},proxy:m,destroy(n=!1){const a=o.get(e);a&&(a.handlers=a.handlers.filter(e=>e!==t),a.handlers.length||(a.audio.pause(),o.delete(e),n&&(u=u.filter(t=>t!==e)),e===l&&(l=void 0)))}}}},function(e,t,n){"use strict";function a(e,t){const n=document.createElement("a");n.href=e,n.download=t,n.click()}n.d(t,"a",(function(){return a}))},function(e,t,n){"use strict";var a=n(0),r=n(27),c=n(102),s=n(8),i=n(28),o=n(53),l=n(103),u=n(35),d=n(113),m=n(110);n(206);t.a=Object(a.h)(({ref:e,name:t,size:n,extension:h="",timestamp:b,sender:f,thumbnailDataUri:p,previewData:g,className:O,smaller:v,isTransferring:j,isUploading:E,isSelectable:y,isSelected:N,transferProgress:C,onClick:T,onDateClick:M})=>{let w=Object(a.q)(null);e&&(w=e);const{shouldRender:L,transitionClassNames:S}=Object(r.a)(j,void 0,!0),I=Object(o.a)(h),k=Object(o.e)(n),{shouldRenderThumb:A,shouldRenderFullMedia:x,transitionClassNames:D}=Object(c.a)(g,"slow"),{width:_,height:R}=Object(l.i)(v),P=Object(s.a)("File",O,v&&"smaller",T&&!E&&"interactive",N&&"file-is-selected");return a.a.createElement("div",{ref:w,className:P},y&&a.a.createElement("div",{className:"message-select-control"},N&&a.a.createElement("i",{className:"icon-select"})),a.a.createElement("div",{className:"file-icon-container",onClick:E?void 0:T},p||g?a.a.createElement("div",{className:"file-preview media-inner"},A&&a.a.createElement("img",{src:p,width:_,height:R,className:"thumbnail",alt:""}),x&&a.a.createElement("img",{src:g,className:"full-media "+D,width:_,height:R,alt:""})):a.a.createElement("div",{className:"file-icon "+I},h.length<=4&&a.a.createElement("span",{className:"file-ext"},h)),L&&a.a.createElement("div",{className:Object(s.a)("file-progress",I,S)},a.a.createElement(d.a,{progress:C,size:v?"s":"m",onClick:E?T:void 0})),T&&a.a.createElement("i",{className:Object(s.a)("icon-download",L&&"hidden")})),a.a.createElement("div",{className:"file-info"},a.a.createElement("div",{className:"file-title"},Object(u.a)(t)),a.a.createElement("div",{className:"file-subtitle"},a.a.createElement("span",null,j&&C?Math.round(100*C)+"%":k),f&&a.a.createElement("span",{className:"file-sender"},Object(u.a)(f)),!f&&b&&a.a.createElement(a.a.Fragment,null," ",a.a.createElement(m.a,{onClick:M},Object(i.d)(1e3*b))))),f&&b&&a.a.createElement(m.a,{onClick:M},Object(i.g)(1e3*b)))})},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));const a=[1,57,41,21,203,34,97,73,227,91,149,62,105,45,39,137,241,107,3,173,39,71,65,238,219,101,187,87,81,151,141,133,249,117,221,209,197,187,177,169,5,153,73,139,133,127,243,233,223,107,103,99,191,23,177,171,165,159,77,149,9,139,135,131,253,245,119,231,224,109,211,103,25,195,189,23,45,175,171,83,81,79,155,151,147,9,141,137,67,131,129,251,123,30,235,115,113,221,217,53,13,51,50,49,193,189,185,91,179,175,43,169,83,163,5,79,155,19,75,147,145,143,35,69,17,67,33,65,255,251,247,243,239,59,29,229,113,111,219,27,213,105,207,51,201,199,49,193,191,47,93,183,181,179,11,87,43,85,167,165,163,161,159,157,155,77,19,75,37,73,145,143,141,35,138,137,135,67,33,131,129,255,63,250,247,61,121,239,237,117,29,229,227,225,111,55,109,216,213,211,209,207,205,203,201,199,197,195,193,48,190,47,93,185,183,181,179,178,176,175,173,171,85,21,167,165,41,163,161,5,79,157,78,154,153,19,75,149,74,147,73,144,143,71,141,140,139,137,17,135,134,133,66,131,65,129,1],r=[0,9,10,10,14,12,14,14,16,15,16,15,16,15,15,17,18,17,12,18,16,17,17,19,19,18,19,18,18,19,19,19,20,19,20,20,20,20,20,20,15,20,19,20,20,20,21,21,21,20,20,20,21,18,21,21,21,21,20,21,17,21,21,21,22,22,21,22,22,21,22,21,19,22,22,19,20,22,22,21,21,21,22,22,22,18,22,22,21,22,22,23,22,20,23,22,22,23,23,21,19,21,21,21,23,23,23,22,23,23,21,23,22,23,18,22,23,20,22,23,23,23,21,22,20,22,21,22,24,24,24,24,24,22,21,24,23,23,24,21,24,23,24,22,24,24,22,24,24,22,23,24,24,24,20,23,22,23,24,24,24,24,24,24,24,23,21,23,22,23,24,24,24,22,24,24,24,23,22,24,24,25,23,25,25,23,24,25,25,24,22,25,25,25,24,23,24,25,25,25,25,25,25,25,25,25,25,25,25,23,25,23,24,25,25,25,25,25,25,25,25,25,24,22,25,25,23,25,25,20,24,25,24,25,25,22,24,25,24,25,24,25,25,24,25,25,25,25,22,25,25,25,24,25,24,25,18];function c(e,t,n,c,s,i,o){if(Number.isNaN(i)||i<1)return;i|=0,Number.isNaN(o)&&(o=1),(o|=0)>3&&(o=3),o<1&&(o=1);const l=e.getImageData(t,n,c,s),u=l.data;let d,m,h,b,f,p,g,O,v,j,E,y,N=c-1,C=s-1,T=i+1,M=[],w=[],L=[],S=a[i],I=r[i],k=[],A=[];for(;o-- >0;){for(y=E=0,f=0;fN?N:p)<<2),d+=u[g++],m+=u[g++],h+=u[g++];for(b=0;b0?g<<2:0),O=y+k[b],v=y+A[b],d+=u[O++]-u[v++],m+=u[O++]-u[v++],h+=u[O++]-u[v++],E++;y+=c<<2}for(b=0;bC?0:c,d+=M[j],m+=w[j],h+=L[j];for(E=b<<2,f=0;f>>I,u[E+1]=m*S>>>I,u[E+2]=h*S>>>I,0==b&&(k[f]=((g=f+T)0?g*c:0),O=b+k[f],v=b+A[f],d+=M[O]-M[v],m+=w[O]-w[v],h+=L[O]-L[v],E+=c<<2}}e.putImageData(l,t,n)}},function(e,t,n){"use strict";var a=n(0),r=n(1),c=n(27),s=n(8),i=n(42),o=n(114);n(213);t.a=Object(a.h)(({message:e,duration:t=3e3,onDismiss:n})=>{const[l,u]=Object(a.r)(!0),d=Object(a.q)(null),{transitionClassNames:m}=Object(c.a)(l),h=Object(a.m)(()=>{u(!1),setTimeout(n,150+r.c)},[n]);Object(a.n)(()=>l?Object(i.a)(h):void 0,[l,h]),Object(a.n)(()=>(d.current=window.setTimeout(h,t),()=>{d.current&&(clearTimeout(d.current),d.current=void 0)}),[t,h]);const b=Object(a.m)(()=>{d.current&&(clearTimeout(d.current),d.current=void 0)},[]),f=Object(a.m)(()=>{d.current=window.setTimeout(h,t)},[t,h]);return a.a.createElement(o.a,{className:"Notification-container",containerId:"#middle-column-portals"},a.a.createElement("div",{className:Object(s.a)("Notification",m),onClick:h,onMouseEnter:b,onMouseLeave:f},a.a.createElement("div",{className:"content"},e)))})},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var a=n(1);function r(e){const{commonAncestorContainer:t}=e;let n=t,r=1;for(;n&&n.id!==a.q&&r<5;)n=n.parentElement,r++;return Boolean(n&&n.id===a.q)}},function(e,t,n){"use strict";var a=n(0),r=n(2),c=n(1),s=n(6),i=n(9),o=n(122),l=n(8),u=n(3),d=n(7),m=n(50),h=n(149),b=n(36),f=n(58),p=n(170),g=n(152);const O=d.f?256:416;t.a=Object(a.h)(Object(r.h)(e=>{const{chatId:t,threadId:n}=Object(s.x)(e)||{},{messageSendKeyCombo:a}=e.settings.byKey;return{currentChatId:t,messageSendKeyCombo:a,replyingToId:t&&n?Object(s.hb)(e,t,n):void 0,noTabCapture:e.isPollModalOpen||e.payment.isPaymentModalOpen}},(e,t)=>Object(u.l)(t,["editLastMessage"]))(({id:e,editableInputId:t,html:n,placeholder:r,shouldSetFocus:s,shouldSupressFocus:u,onUpdate:v,onSupressedFocus:j,onSend:E,currentChatId:y,replyingToId:N,noTabCapture:C,messageSendKeyCombo:T,editLastMessage:M})=>{const w=Object(a.q)(null),L=Object(a.q)(null),S=Object(a.q)(!1),[I,k,A]=Object(b.a)(),[x,D]=Object(a.r)(),[_,R]=Object(a.r)();Object(h.a)(([e])=>{n!==w.current.innerHTML&&(w.current.innerHTML=n),n!==L.current.innerHTML&&(L.current.innerHTML=n),void 0!==e&&e!==n&&function(){const e=w.current,t=L.current;e.style.height=Math.min(t.scrollHeight,O)+"px",e.classList.toggle("overflown",t.scrollHeight>O),document.body.classList.toggle("hide-mask-shadow",t.scrollHeight>100)}()},[n]);const P=Object(a.m)(()=>{w.current.closest(".from, .to")?setTimeout(P,350):Object(o.a)(w.current)},[]);function F(){if(d.d)return;const e=window.getSelection();if(!e||!e.rangeCount||S.current)return void A();const t=e.getRangeAt(0),n=t.toString().trim();if(!Object(p.a)(t)||!n||Object(f.a)(n)||!t.START_TO_END)return void A();const a=t.getBoundingClientRect(),r=w.current.getBoundingClientRect();let c=a.left+a.width/2-r.left;c<90?c=90:c>r.width-90&&(c=r.width-90),D({x:c,y:a.top-r.top}),R(t),k()}Object(a.n)(()=>{d.k||P()},[y,P,N,s]),Object(a.n)(()=>{if(C)return;const e=Object(i.a)(e=>{"Tab"===e.key&&(e.preventDefault(),requestAnimationFrame(P))},2e3,!0,!1);return Object(m.a)({onTab:e})},[P,C]),Object(a.n)(()=>{const e=w.current;function t(){e.blur()}return u&&e.addEventListener("focus",t),()=>{e.removeEventListener("focus",t)}},[u]);const U=Object(l.a)("form-control custom-scroll",n.length>0&&"touched",u&&"focus-disabled");return a.a.createElement("div",{id:e,onClick:u?j:void 0},a.a.createElement("div",{ref:w,id:t||c.q,className:U,contentEditable:!0,onClick:P,onChange:function(e){const{innerHTML:t,textContent:n}=e.currentTarget;if(v("
"===t?"":t),!(d.k||n&&n.length)){const e=window.getSelection();e&&(w.current.blur(),e.removeAllRanges(),Object(o.a)(w.current,!0))}},onKeyDown:function(e){"Enter"!==e.key||e.shiftKey?"ArrowUp"!==e.key||n.length?e.target.addEventListener("keyup",(function t(){F(),e.target.removeEventListener("keyup",t)})):(e.preventDefault(),M()):d.d||d.b||!("enter"===T&&!e.shiftKey||"ctrl-enter"===T&&(e.ctrlKey||e.metaKey))||(e.preventDefault(),A(),E())},onMouseDown:function(e){2===e.button?!0!==S.current&&(S.current=!0,document.addEventListener("mousedown",(function e(){setTimeout(()=>{S.current=!1},100),window.removeEventListener("mouseup",e)})),document.addEventListener("keydown",(function e(t){"Esc"!==t.key&&"Escape"!==t.key||(setTimeout(()=>{S.current=!1},100),window.removeEventListener("keydown",e))}))):e.target.addEventListener("mouseup",(function t(){F(),e.target.removeEventListener("mouseup",t)}))},onContextMenu:function(e){d.b&&(e.preventDefault(),e.stopPropagation())},onTouchCancel:function(){d.b&&F()}}),a.a.createElement("div",{ref:L,className:Object(l.a)(U,"clone")}),a.a.createElement("span",{className:"placeholder-text"},r),a.a.createElement(g.a,{isOpen:I,anchorPosition:x,selectedRange:_,onClose:A}))}))},function(e,t,n){"use strict";var a=n(0),r=n(4),c=n(8),s=n(145),i=n(35),o=n(28),l=n(153),u=n(110);n(232);t.a=Object(a.h)(({message:e,senderTitle:t,onMessageClick:n})=>{let d=Object(r.P)(e);if(!d){const t=Object(r.n)(e);if(t){const{url:n,domain:a}=t,c=Object(r.M)(e);d={siteName:a.replace(/^www./,""),url:n.includes("://")?n:n.includes("@")?"mailto:"+n:"http://"+n,description:c!==n?c:void 0}}}const m=Object(a.m)(()=>{n(e.id,e.chatId)},[n,e.id,e.chatId]);if(!d)return;const{siteName:h,url:b,displayUrl:f,title:p,description:g,photo:O}=d,v=!t&&Object(s.a)(g,170),j=Object(c.a)("WebLink scroll-item",!O&&"without-photo");return a.a.createElement("div",{className:j,"data-initial":(h||f)[0]},O&&a.a.createElement(l.a,{message:e}),a.a.createElement("div",{className:"content"},a.a.createElement(u.a,{className:"site-title",onClick:m},Object(i.a)(p||h||f)),v&&a.a.createElement(u.a,{className:"site-description",onClick:m},Object(i.a)(v)),a.a.createElement("a",{href:b,target:"_blank",rel:"noopener noreferrer",className:"site-name"},b.replace("mailto:","")||f),t&&a.a.createElement("div",{className:"sender-name"},Object(i.a)(t))),t&&a.a.createElement("div",{className:"message-date"},a.a.createElement(u.a,{className:"date",onClick:m},Object(o.g)(1e3*e.date))))})},,,,function(e,t,n){"use strict";var a=n(0),r=n(2),c=n(5),s=n(1),i=n(7),o=n(38),l=n(3),u=n(4),d=n(6),m=n(118);let h;!function(e){e[e.Move=0]="Move",e[e.Opacity=1]="Opacity",e[e.None=2]="None"}(h||(h={}));var b=n(101),f=n(16),p=n(93),g=n(177),O=n(35),v=n(9),j=n(8),E=n(129),y=n(159),N=n(36),C=n(97),T=n(99),M=n(130),w=n(146),L=n(160),S=n(147),I=n(94),k=n(45),A=n(163);n(195);var x=({chat:e,isPinned:t})=>{const n=Boolean(e.unreadCount||e.hasUnreadMark||t),r=Object(j.a)("Badge",e.isMuted&&"muted",t&&"pinned",Boolean(e.unreadCount||e.hasUnreadMark)&&"unread");function c(){return e.unreadCount?e.unreadMentionsCount?a.a.createElement("div",{className:"Badge-wrapper"},a.a.createElement("div",{className:"Badge mention"},a.a.createElement("i",{className:"icon-mention"})),a.a.createElement("div",{className:r},Object(k.b)(e.unreadCount))):a.a.createElement("div",{className:r},Object(k.b)(e.unreadCount)):e.hasUnreadMark?a.a.createElement("div",{className:r}):t?a.a.createElement("div",{className:r},a.a.createElement("i",{className:"icon-pinned-chat"})):void 0}return a.a.createElement(A.a,{isCustom:!0,className:"Badge-transition",isOpen:n},c)};n(196);var D,_=Object(a.h)(Object(r.h)((e,{chatId:t})=>{const n=Object(d.f)(e,t);if(!n||!n.lastMessage)return{};const{senderId:a,replyToMessageId:r,isOutgoing:s}=n.lastMessage,i=a?Object(d.Bb)(e,a):void 0,o=Object(u.t)(n.lastMessage),l=o&&r?Object(d.k)(e,n.id,r):void 0,{targetUserId:m,targetChatId:h}=o||{},b=Object(u.T)(n),{type:f}=Object(d.x)(e)||{};return{chat:n,lastMessageSender:i,...s&&{lastMessageOutgoingStatus:Object(d.ab)(e,n.lastMessage)},...b&&{privateChatUser:Object(d.Bb)(e,b)},...m&&{actionTargetUser:Object(d.Bb)(e,m)},actionTargetChatId:h,actionTargetMessage:l,draft:Object(d.A)(e,t,c.MAIN_THREAD_ID),messageListType:f,animationLevel:e.settings.byKey.animationLevel,lastSyncTime:e.lastSyncTime}},(e,t)=>Object(l.l)(t,["openChat","focusLastMessage"]))(({style:e,chatId:t,folderId:n,orderDiff:r,animationType:c,isSelected:o,isPinned:l,chat:d,privateChatUser:m,actionTargetUser:b,lastMessageSender:f,lastMessageOutgoingStatus:k,actionTargetMessage:A,actionTargetChatId:D,draft:_,messageListType:R,animationLevel:P,lastSyncTime:F,openChat:U,focusLastMessage:B})=>{const q=Object(a.q)(null),[H,$,K]=Object(N.a)(),{lastMessage:Y,typingStatus:V}=d||{},z=Y&&Object(u.db)(Y);Object(E.a)(t,z?Y.replyToMessageId:void 0,A);const W=Y&&!Object(u.L)(Y)?Object(u.E)(Y):void 0,G=Object(C.a)(Y?Object(u.D)(Y,"micro"):void 0);Object(a.o)(()=>{if(0===P)return;const e=q.current;if(c===h.Opacity)e.style.opacity="0",Object(v.b)(()=>{e.classList.add("animate-opacity"),e.style.opacity="1"});else{if(c!==h.Move)return;e.style.transform=`translate3d(0, ${100*-r}%, 0)`,Object(v.b)(()=>{e.classList.add("animate-transform"),e.style.transform=""})}setTimeout(()=>{Object(v.b)(()=>{e.classList.remove("animate-opacity","animate-transform"),e.style.opacity="",e.style.transform=""})},200+s.c)},[P,r,c]);const X=Object(a.m)(()=>{U({id:t}),o&&"thread"===R&&B()},[o,R,U,t,B]),Q=Object(y.a)({chat:d,privateChatUser:m,handleDelete:$,folderId:n,isPinned:l}),J=Object(p.a)();if(!d)return;const Z=Object(j.a)("Chat chat-item-clickable",Object(u.lb)(t)?"private":"group",o&&"selected");return a.a.createElement(I.a,{ref:q,className:Z,style:e,ripple:!i.f,contextActions:Q,onClick:X},a.a.createElement(T.a,{chat:d,user:m,withOnlineStatus:!0,isSavedMessages:m&&m.isSelf,lastSyncTime:F}),a.a.createElement("div",{className:"info"},a.a.createElement("div",{className:"title"},a.a.createElement("h3",null,Object(O.a)(Object(u.l)(d,m))),d.isVerified&&a.a.createElement(M.a,null),d.isMuted&&a.a.createElement("i",{className:"icon-muted-chat"}),d.lastMessage&&a.a.createElement(L.a,{message:d.lastMessage,outgoingStatus:k})),a.a.createElement("div",{className:"subtitle"},function(){if(V&&Y&&V.timestamp>1e3*Y.date)return a.a.createElement(w.a,{typingStatus:V});if(_&&_.text.length)return a.a.createElement("p",{className:"last-message"},a.a.createElement("span",{className:"draft"},J("Draft")),Object(O.a)(_.text));if(!Y)return;if(z){const e=d&&(Object(u.jb)(d)||Y.senderId===Y.chatId)?d:f;return a.a.createElement("p",{className:"last-message"},Object(O.a)(Object(g.a)(Y,e,b,A,D,{asPlain:!0})))}const e=Object(u.I)(t,f);return a.a.createElement("p",{className:"last-message"},e&&a.a.createElement("span",{className:"sender-name"},Object(O.a)(e)),function(e,t){if(!t)return Object(O.a)(Object(u.M)(e));return a.a.createElement("span",{className:"media-preview"},a.a.createElement("img",{src:t,alt:""}),Object(u.O)(e)&&a.a.createElement("i",{className:"icon-play"}),Object(O.a)(Object(u.M)(e,!0)))}(Y,G||W))}(),a.a.createElement(x,{chat:d,isPinned:l}))),a.a.createElement(S.a,{isOpen:H,onClose:K,chat:d}))}));!function(e){e.all="active",e.archived="archived"}(D||(D={}));t.a=Object(a.h)(Object(r.h)((e,{folderType:t,folderId:n})=>{const{chats:{listIds:a,byId:r,orderedPinnedIds:s},users:{byId:i},lastSyncTime:o}=e,{chatId:l,threadId:u}=Object(d.x)(e)||{},m="folder"!==t?D[t]:void 0,h=n?Object(d.i)(e,n):void 0;return{chatsById:r,usersById:i,currentChatId:l,lastSyncTime:o,...m?{listIds:a[m],orderedPinnedIds:s[m]}:{chatFolder:h},isInDiscussionThread:u!==c.MAIN_THREAD_ID}},(e,t)=>Object(l.l)(t,["loadMoreChats","preloadTopChatMessages"]))(({folderType:e,folderId:t,noChatsText:n="Chat list is empty.",chatFolder:r,chatsById:c,usersById:d,listIds:p,currentChatId:g,orderedPinnedIds:O,lastSyncTime:v,isInDiscussionThread:j,loadMoreChats:E,preloadTopChatMessages:y})=>{const[N,C]=Object(a.p)(()=>"folder"===e&&r?Object(u.Bb)(c,d,r):[p,O],[e,c,d,r,p,O]),[T,M]=Object(a.p)(()=>{if(!N||"folder"===e&&!r)return[];const t=Object(u.Ab)(c,N,C,e),n=[...t.pinnedChats,...t.otherChats],a=n.map(({id:e})=>e);return[n.reduce((e,t,n)=>(e[t.id]=n,e),{}),a]},[N,C,e,r,c]),w=Object(o.a)(T),L=T&&w?Object(l.i)(T,(e,t)=>e-(void 0!==w[t]?w[t]:1/0)):{},S=Object(a.m)(()=>{E({listType:"archived"===e?"archived":"active"})},[E,e]),[I,k]=Object(m.a)(v?S:void 0,M,void 0,s.i,"all"===e&&!s.a),A=I&&Object(u.Ab)(c,I,C,e);Object(a.n)(()=>{v&&"all"===e&&y()},[v,e,y]);const x=function(e){const t=Object(a.m)(t=>e[t]<0,[e]),n=Object(a.m)(t=>e[t]>0,[e]),r=Object.keys(e).map(Number),c=r.filter(t).length,s=r.filter(n).length;return Object(a.m)(a=>{const r=e[a];return 0===r?h.None:r===1/0||r===-1/0||t(a)&&c<=s||n(a)&&sa.a.createElement(_,{key:n,teactOrderKey:r,chatId:n,isPinned:!0,folderId:t,isSelected:n===g&&!j,animationType:x(n),orderDiff:L[n],style:`top: ${(e+r)*s.g}px;`})),A.otherChats.map((e,r)=>a.a.createElement(_,{key:e.id,teactOrderKey:Object(u.j)(e),chatId:e.id,folderId:t,isSelected:e.id===g&&!j,animationType:x(e.id),orderDiff:L[e.id],style:`top: ${(n+r)*s.g}px;`})))}():I&&!I.length?a.a.createElement("div",{className:"no-results"},n):a.a.createElement(f.a,{key:"loading"}))}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return b}));var a=n(0),r=n(4),c=n(145),s=n(35),i=n(2),o=n(3),l=n(8),u=n(110);var d=Object(i.h)(void 0,(e,t)=>Object(o.l)(t,["openUserInfo"]))(({className:e,sender:t,openUserInfo:n,children:r})=>{const c=Object(a.m)(()=>{t&&n({id:t.id})},[t,n]);return t?a.a.createElement(u.a,{className:Object(l.a)("UserLink",e),onClick:c},r):r});var m=Object(i.h)(void 0,(e,t)=>Object(o.l)(t,["focusMessage"]))(({className:e,message:t,children:n,focusMessage:r})=>{const c=Object(a.m)(()=>{t&&r({chatId:t.chatId,messageId:t.id})},[r,t]);return t?a.a.createElement(u.a,{className:Object(l.a)("MessageLink",e),onClick:c},n):n});var h=Object(i.h)(void 0,(e,t)=>Object(o.l)(t,["openChat"]))(({className:e,chatId:t,openChat:n,children:r})=>{const c=Object(a.m)(()=>{t&&n({id:t})},[t,n]);return t?a.a.createElement(u.a,{className:Object(l.a)("ChatLink",e),onClick:c},r):r});function b(e,t,n,i,o,l={}){if(!e.content.action)return[];const{text:u}=e.content.action,d=[],b={...l,maxTextLength:16};let g,O=p(u,"%action_origin%",t?!l.isEmbedded&&(v=t,j=l.asPlain,Object(r.fb)(v)?function(e,t){const n=Object(c.a)(Object(r.l)(e));return t?n:a.a.createElement(h,{className:"action-link",chatId:e.id},e&&Object(s.a)(n))}(v,j):f(v,j))||" ":"User");var v,j;return g=O.pop(),d.push(...O),O=p(g,"%target_user%",n?f(n,l.asPlain):"User"),g=O.pop(),d.push(...O),O=p(g,"%message%",i?function(e,t={}){const n=Object(r.M)(e),{photo:i,video:o,document:l,sticker:u}=Object(r.v)(e),d=n&&!i&&!o&&!l&&!u;let h=Object(c.a)(n,t.maxTextLength);i?h="a photo":o?h=o.isGif?"a GIF":"a video":l?h="a document":u&&(h=`«${n}»`);if(t.asPlain)return d?`«${h}»`:h;if(d)return a.a.createElement("span",null,"«",a.a.createElement(m,{className:"action-link",message:e},Object(s.a)(h)),"»");return a.a.createElement(m,{className:"action-link",message:e},Object(s.a)(h))}(i,b):"a message"),g=O.pop(),d.push(...O),O=p(g,"%product%",i?function(e){return e.content&&e.content.invoice?e.content.invoice.title:"a product"}(i):"a product"),g=O.pop(),d.push(...O),O=p(g,"%target_chat%",o?function(e,t){if(t)return"another chat";return a.a.createElement(h,{className:"action-link",chatId:e},"another chat")}(o,l.asPlain):"another chat"),d.push(...O),l.asPlain?d.join("").trim():d}function f(e,t){const n=Object(c.a)(Object(r.Z)(e));return t?n:a.a.createElement(d,{className:"action-link",sender:e},e&&Object(s.a)(n))}function p(e,t,n){const a=e.indexOf(t);if(a<0||!n)return[e];const r=[];return r.push(e.substring(0,a)),r.push(n),r.push(e.substring(a+t.length)),r}},function(e,t,n){"use strict";n.d(t,"a",(function(){return m}));var a=n(0),r=n(5),c=n(1),s=n(4),i=n(46);var o=n(7),l=n(122),u=n(36);const d=/[^@_\d\wа-яё]+/i;function m(e,t,n,m=c.q,h,b,f){const[p,g,O]=Object(u.a)(),[v,j]=Object(a.r)(""),[E,y]=Object(a.r)([]),N=Object(a.m)(e=>{if(h&&f)return h.filter(({userId:t})=>{const n=f[t];return!(t===b||!n)&&(!e||function(e,t){const n=t.username.toLowerCase(),a=Object(s.Z)(t),r=a&&a.toLowerCase(),c=e.toLowerCase();return n.startsWith(c)||r&&Object(i.a)(r,c)}(e,n))})},[h,b,f]);Object(a.n)(()=>{if(!e||!t.length)return void O();const n=function(e){const t=document.createElement("div");t.innerHTML=e;const n=t.innerText,a=n[n.length-1],r=n.split(d).pop();if(!n.length||d.test(a)||!r||!r.startsWith("@"))return;return r}(t);if(n){const e=n?n.substr(1):"",t=N(e);t&&t.length?(g(),j(e),y(t)):O()}else O()},[e,t,N,g,O]);const C=Object(a.m)((e,a=!1)=>{if(!e.username&&!Object(s.Y)(e))return;const c=e.username?"@"+e.username:`${Object(s.Y)(e)}`,i=t.lastIndexOf("@");if(-1!==i){n(`${t.substr(0,i)}${c} `);const e=document.getElementById(m);o.f||requestAnimationFrame(()=>{Object(l.a)(e,a)})}O()},[t,m,n,O]);return{isMentionMenuOpen:p,mentionFilter:v,closeMentionMenu:O,insertMention:C,mentionFilteredMembers:E}}},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},,,,function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},,,,function(e,t,n){},function(e,t,n){},,,,function(e,t,n){},function(e,t,n){},function(e,t,n){},,,function(e,t,n){},,function(e,t,n){},function(e,t,n){},,,,,,,,,,,,function(e,t,n){},,,,,,function(e,t,n){},function(e,t,n){},function(e,t,n){}])]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[0],Array(93).concat([function(e,t,n){"use strict";var a=n(0),r=n(10),c=n(29);t.a=()=>{const e=Object(c.a)();return Object(a.n)(()=>r.a(e),[e]),r.b}},function(e,t,n){"use strict";var a=n(0),r=n(7),c=n(8),s=n(131),i=n(162),o=n(33),l=n(47),u=n(32);n(194);t.a=e=>{const{ref:t,icon:n,className:d,style:m,children:h,disabled:b,ripple:f,narrow:p,inactive:g,contextActions:O,focus:v,destructive:j,onClick:E}=e;let y=Object(a.q)(null);t&&(y=t);const{isContextMenuOpen:N,contextMenuPosition:C,handleBeforeContextMenu:T,handleContextMenu:M,handleContextMenuClose:w,handleContextMenuHide:L}=Object(s.a)(y,!O),S=Object(a.m)(()=>y.current,[]),I=Object(a.m)(()=>y.current.closest(".custom-scroll"),[]),k=Object(a.m)(()=>y.current.querySelector(".ListItem-context-menu .bubble"),[]),{positionX:A,positionY:x,style:D}=Object(i.a)(C,S,I,k),_=Object(a.m)(e=>{!b&&E&&E(e)},[b,E]),R=Object(a.m)(e=>{g||r.k||(!O||2!==e.button&&E||T(e),0===e.button&&(E?_(e):M(e)))},[g,O,E,T,M,_]),P=Object(c.a)("ListItem no-selection",d,f&&"has-ripple",p&&"narrow",b&&"disabled",g&&"inactive",C&&"has-menu-open",v&&"focus",j&&"destructive");return a.a.createElement("div",{ref:y,className:P,style:m},a.a.createElement("div",{className:"ListItem-button",role:"button",tabIndex:0,onClick:!g&&r.k?_:void 0,onMouseDown:R,onContextMenu:!g&&O?M:void 0},n&&a.a.createElement("i",{className:"icon-"+n}),h,!b&&!g&&f&&a.a.createElement(o.a,null)),O&&void 0!==C&&a.a.createElement(l.a,{isOpen:N,positionX:A,positionY:x,style:D,className:"ListItem-context-menu",autoClose:!0,onClose:w,onCloseAnimationEnd:L},O.map(e=>a.a.createElement(u.a,{key:e.title,icon:e.icon,destructive:e.destructive,disabled:!e.handler,onClick:e.handler},e.title))))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return s})),n.d(t,"c",(function(){return i})),n.d(t,"b",(function(){return o}));var a=n(0),r=n(9),c=n(43);function s({rootRef:e,throttleMs:t,debounceMs:n,shouldSkipFirst:s,margin:i,threshold:o,isDisabled:l},u){const d=Object(a.q)(),m=Object(a.q)(),h=Object(a.q)(),b=Object(a.q)();m.current=u;const f=Object(a.m)(()=>{h.current=!0},[]),p=Object(a.m)(()=>{h.current=!1,b.current&&(b.current(),b.current=void 0)},[]);Object(c.a)(f,p),Object(a.n)(()=>{if(!l)return()=>{d.current&&(d.current.observer.disconnect(),d.current.callbacks.clear(),d.current=void 0)}},[l]);return{observe:Object(a.m)((a,c)=>{d.current||function(){const a=new Map,c=new Map,l=()=>{const e=Array.from(c.values());e.forEach(t=>{const n=a.get(t.target);n&&n(t,e)}),m.current&&m.current(e),c.clear()},u=t?r.g:n?r.a:void 0,f=u?u(l,t||n,!s):l,p=new IntersectionObserver(e=>{e.forEach(e=>{c.set(e.target,e)}),h.current?b.current=()=>{f()}:f()},{root:e.current,rootMargin:i?i+"px":void 0,threshold:o});d.current={observer:p,callbacks:a}}();const l=d.current;return l.observer.observe(a),c&&l.callbacks.set(a,c),()=>{c&&l.callbacks.delete(a),l.observer.unobserve(a)}},[l]),freeze:f,unfreeze:p}}function i(e,t,n){Object(a.n)(()=>t?t(e.current,n):void 0,[])}function o(e,t,n){const[r,c]=Object(a.r)(!t);return i(e,t,e=>{c(e.isIntersecting),n&&n(e)}),r}},function(e,t,n){"use strict";var a=n(0),r=n(2),c=n(18),s=n(6),i=n(4),o=n(35),l=n(3),u=n(93),d=n(99),m=n(130),h=n(146);t.a=Object(a.h)(Object(r.h)((e,{userId:t,forceShowSelf:n})=>{const{lastSyncTime:a}=e,r=Object(s.Bb)(e,t);return{lastSyncTime:a,user:r,isSavedMessages:!n&&r&&r.isSelf,areMessagesLoaded:Boolean(Object(s.m)(e,t))}},(e,t)=>Object(l.l)(t,["loadFullUser","openMediaViewer"]))(({typingStatus:e,avatarSize:t="medium",status:n,withMediaViewer:r,withHandle:s,withFullInfo:l,withUpdatingStatus:b,noStatusOrTyping:f,user:p,isSavedMessages:g,areMessagesLoaded:O,lastSyncTime:v,loadFullUser:j,openMediaViewer:E})=>{const{id:y}=p||{},N=Object(i.Z)(p);Object(a.n)(()=>{l&&v&&y&&j({userId:y})},[y,j,v,l]);const C=Object(a.m)((e,n)=>{p&&n&&(e.stopPropagation(),E({avatarOwnerId:p.id,origin:"jumbo"===t?c.h.ProfileAvatar:c.h.MiddleHeaderAvatar}))},[p,t,E]),T=Object(u.a)();if(p)return a.a.createElement("div",{className:"ChatInfo"},a.a.createElement(d.a,{key:p.id,size:t,user:p,isSavedMessages:g,onClick:r?C:void 0}),a.a.createElement("div",{className:"info"},g?a.a.createElement("div",{className:"title"},a.a.createElement("h3",null,T("SavedMessages"))):a.a.createElement("div",{className:"title"},a.a.createElement("h3",null,N&&Object(o.a)(N)),p&&p.isVerified&&a.a.createElement(m.a,null)),!g&&!f&&(n?a.a.createElement("span",{className:"status"},n):b&&!O?a.a.createElement("span",{className:"status"},T("Updating")):p?e?a.a.createElement(h.a,{typingStatus:e}):a.a.createElement("div",{className:"status "+(Object(i.xb)(p)?"online":"")},s&&p.username&&a.a.createElement("span",{className:"handle"},p.username),a.a.createElement("span",{className:"user-status"},Object(i.ab)(p,T))):void 0)))}))},function(e,t,n){"use strict";var a=n(0),r=n(5),c=n(48),s=n(29);t.a=(e,t=!1,n=r.ApiMediaFormat.BlobUrl,i,o)=>{const l=e?c.c(e):void 0,u=Object(s.a)();return Object(a.n)(()=>{if(!t&&e&&!l){const t=Date.now();c.b(e,n).then(()=>{const e=Date.now()-t;!o||e>=o?u():setTimeout(u,o-e)})}},[t,e,l,n,i,u,o]),l}},function(e,t,n){"use strict";var a=n(0),r=n(50);var c=n(8),s=n(43),i=n(27),o=n(51),l=n(93),u=n(31),d=n(114);n(139);t.a=e=>{const{title:t,className:n,isOpen:m,header:h,hasCloseButton:b,noBackdrop:f,children:p,onClose:g,onCloseAnimationEnd:O,onEnter:v}=e,{shouldRender:j,transitionClassNames:E}=Object(i.a)(m,O),y=Object(a.q)(null);Object(a.n)(()=>m?Object(r.a)({onEsc:g,onEnter:v}):void 0,[m,g,v]),Object(a.n)(()=>m&&y.current?function(e){function t(t){if("Tab"!==t.key)return;t.preventDefault(),t.stopPropagation();const n=Array.from(e.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'));if(!n.length)return;const a=n.findIndex(e=>e.isSameNode(document.activeElement));let r=0;a>=0&&(r=t.shiftKey?a>0?a-1:n.length-1:a{document.removeEventListener("keydown",t,!1)}}(y.current):void 0,[m]),Object(o.a)(([e])=>(document.body.classList.toggle("has-open-dialog",m),(m||!m&&void 0!==e)&&Object(s.b)(200),()=>{document.body.classList.remove("has-open-dialog")}),[m]);const N=Object(l.a)();if(!j)return;const C=Object(c.a)("Modal",n,E,f&&"transparent-backdrop");return a.a.createElement(d.a,null,a.a.createElement("div",{ref:y,className:C,tabIndex:-1,role:"dialog"},a.a.createElement("div",{className:"modal-container"},a.a.createElement("div",{className:"modal-backdrop",onClick:g}),a.a.createElement("div",{className:"modal-dialog"},h||(t?a.a.createElement("div",{className:"modal-header"},b&&a.a.createElement(u.a,{round:!0,color:"translucent",size:"smaller",ariaLabel:N("Close"),onClick:g},a.a.createElement("i",{className:"icon-close"})),a.a.createElement("div",{className:"modal-title"},t)):void 0),a.a.createElement("div",{className:"modal-content custom-scroll"},p)))))}},function(e,t,n){"use strict";var a=n(0),r=n(5),c=n(1),s=n(4),i=n(45),o=n(8),l=n(35),u=n(97),d=n(102),m=n(93);n(181);t.a=Object(a.h)(({className:e,size:t="large",chat:n,user:h,text:b,withOnlineStatus:f,isSavedMessages:p,lastSyncTime:g,onClick:O})=>{const v=h&&Object(s.pb)(h);let j;p||v||(h?j=Object(s.f)(h):n&&(j=Object(s.f)(n)));const E=Object(u.a)(j,!1,r.ApiMediaFormat.DataUri,g),{shouldRenderFullMedia:y,transitionClassNames:N}=Object(d.a)(E,"slow");Object(m.a)();let C="";if(p)C=a.a.createElement("i",{className:"icon-avatar-saved-messages"});else if(v)C=a.a.createElement("i",{className:"icon-avatar-deleted-account"});else if(y)C=a.a.createElement("img",{src:E,className:N+" avatar-media",alt:"",decoding:"async"});else if(h){const e=Object(s.Z)(h);C=e?Object(i.c)(e,2):void 0}else if(n){const e=Object(s.l)(n);C=e&&Object(i.c)(e,Object(s.lb)(n.id)?2:1)}else b&&(C=Object(i.c)(b,2));const T=!p&&h&&Object(s.xb)(h),M=Object(o.a)("Avatar size-"+t,e,"color-bg-"+Object(s.X)(h||n),p&&"saved-messages",v&&"deleted-account",f&&T&&"online",O&&"interactive",!p&&!y&&"no-photo"),w=Object(a.m)(e=>{O&&O(e,p||y)},[O,p,y]),L=(h||n)&&(h||n).id;return a.a.createElement("div",{className:M,onClick:w,"data-test-sender-id":c.z?L:void 0},"string"==typeof C?Object(l.a)(C,["jumbo"===t?"hq_emoji":"emoji"]):C)})},function(e,t,n){"use strict";var a=n(0),r=n(2),c=n(1),s=n(7),i=n(29),o=n(38),l=n(8),u=n(43);n(179);const d={slide:450,"mv-slide":400,"slide-fade":400,"zoom-fade":150,"scroll-slide":500,fade:150,"slide-layers":s.f?450:300,"push-slide":300,reveal:350},m=Symbol("CLEANED_UP");t.a=Object(r.h)(e=>{const{animationLevel:t}=e.settings.byKey;return{animationLevel:t}})(({ref:e,activeKey:t,name:n,direction:r="auto",renderCount:s,shouldRestoreHeight:h,shouldCleanup:b,id:f,className:p,onStart:g,onStop:O,children:v,animationLevel:j})=>{let E=Object(a.q)(null);e&&(E=e);const y=Object(a.q)({}),N=Object(o.a)(t),C=Object(a.q)(),T=Object(i.a)(),M=void 0!==N&&t!==N;!s&&M&&(y.current={[N]:y.current[N]}),y.current[t]=v,Object(a.o)(()=>{function e(){b&&(y.current={[N]:m},T())}const a=E.current,i=a.children;if(1===i.length&&!M)return void i[0].classList.add("active");const o=Array.from(a.childNodes);if(!M||!o.length)return;C.current&&(clearTimeout(C.current),C.current=void 0);const l=-1===r||"auto"===r&&N>t||"inverse"===r&&N{e instanceof HTMLElement&&(e.classList.remove("from","through","to"),e.classList.toggle("active",t===v))}),void e();if(o.forEach((e,t)=>{e instanceof HTMLElement&&(e.classList.remove("active"),e.classList.toggle("from",t===p),e.classList.toggle("through",t>p&&tv),e.classList.toggle("to",t===v))}),"scroll-slide"===n){const e=a.offsetWidth;a.scrollBy({left:v>p?e:-e,behavior:"smooth"})}j>0&&Object(u.b)(d[n]+c.c),requestAnimationFrame(()=>{a.classList.add("animating"),C.current=window.setTimeout(()=>{requestAnimationFrame(()=>{if(a.classList.remove("animating","backwards"),o.forEach((e,t)=>{e instanceof HTMLElement&&(e.classList.remove("from","through","to"),e.classList.toggle("active",t===v))}),"scroll-slide"===n&&(a.scrollLeft=t*a.offsetWidth),h){const e=a.querySelector(".active");e&&(e.style.height="auto",a.style.height=e.clientHeight+"px")}e(),O&&O()})},d[n]+c.c),g&&g()})},[t,N,M,r,n,g,O,s,h,b,j,T]),Object(a.o)(()=>{if(h){const e=E.current,t=e.querySelector(".active")||e.querySelector(".from");t&&(t.style.height="auto",e.style.height=t.clientHeight+"px")}},[h,v]);const w=y.current,L=Object.keys(s?new Array(s).fill(void 0):w).map(Number).map(e=>{const n=w[e];return"function"==typeof n?a.a.createElement("div",{key:e},n(e===t,e===N)):void 0}),S=Object(l.a)("Transition",p,0===j&&"scroll-slide"===n?"slide":n);return a.a.createElement("div",{ref:E,id:f,className:S},L)})},function(e,t,n){"use strict";var a=n(18),r=n(0),c=n(9),s=n(144);t.a=({ref:e,className:t,onLoadMore:n,onScroll:i,items:o,itemSelector:l=".ListItem",preloadBackwards:u=20,sensitiveArea:d=800,isDisabled:m=!1,noFastList:h,cacheBuster:b,children:f})=>{let p=Object(r.q)(null);e&&(p=e);const g=Object(r.q)({}),[O,v]=Object(r.p)(()=>n?[Object(c.a)(()=>n({direction:a.e.Backwards}),1e3,!0,!1),Object(c.a)(()=>n({direction:a.e.Forwards}),1e3,!0,!1)]:[],[n,o]);Object(r.n)(()=>{if(O)if(!o||o.length{const e=p.current,t=g.current;if(t.listItemElements=e.querySelectorAll(l),m)return;let n;if(t.currentAnchor&&Array.from(t.listItemElements).includes(t.currentAnchor)){const{scrollTop:a}=e;n=a+(t.currentAnchor.getBoundingClientRect().top-t.currentAnchorTop)}else{const e=t.listItemElements[0];e&&e.offsetParent&&(t.currentAnchor=e,t.currentAnchorTop=e.getBoundingClientRect().top)}Object(s.a)(e,n),t.isScrollTopJustUpdated=!0},[m,l,o,b]);const j=Object(r.m)(e=>{if(v&&O){const{listItemElements:e,isScrollTopJustUpdated:t,currentAnchor:n,currentAnchorTop:a}=g.current;if(t)return void(g.current.isScrollTopJustUpdated=!1);const r=e.length,c=p.current,{scrollTop:i,scrollHeight:o,offsetHeight:l}=c,u=i<=(r?e[0].offsetTop:0)+d,m=(r?e[r-1].offsetTop+e[r-1].offsetHeight:o)-(i+l)<=d;let h=!1;if(u){const t=e[0];if(t){const e=t.getBoundingClientRect().top,r=n&&n!==t?n.getBoundingClientRect().top:e;n&&void 0!==a&&r>a&&(g.current.currentAnchor=t,g.current.currentAnchorTop=e,h=!0,Object(s.a)(c),v())}}if(m){const t=e[r-1];if(t){const e=t.getBoundingClientRect().top,r=n&&n!==t?n.getBoundingClientRect().top:e;n&&void 0!==a&&r{const s=Boolean(e),i=!Object(a.q)(s).current&&!n,[o,l]=Object(a.r)(!s),{shouldRender:u,transitionClassNames:d}=Object(r.a)(s,void 0,!i,t);return Object(a.n)(()=>{u&&(i?setTimeout(()=>{l(!1)},c[t]):l(!1))},[i,u,t]),{shouldRenderThumb:o,shouldRenderFullMedia:u,transitionClassNames:d}}},function(e,t,n){"use strict";n.d(t,"b",(function(){return i})),n.d(t,"c",(function(){return o})),n.d(t,"d",(function(){return l})),n.d(t,"a",(function(){return u})),n.d(t,"j",(function(){return f})),n.d(t,"f",(function(){return p})),n.d(t,"h",(function(){return g})),n.d(t,"k",(function(){return O})),n.d(t,"i",(function(){return v})),n.d(t,"l",(function(){return j})),n.d(t,"g",(function(){return E})),n.d(t,"e",(function(){return y}));var a=n(4),r=n(49),c=n(7),s=n(1);const i="(max-height: 640px)",o=parseInt(getComputedStyle(document.documentElement).fontSize,10),l=200,u={width:640,height:640},d={width:100,height:100};let m;function h(e,t,n){const a=t||n?1.625:0;return(function(e){const t=e?30:29;return c.f?(m||(m=Math.min(t,Math.floor(.69*window.innerWidth)/o)),m):t}(e)-a)*o}function b({width:e,height:t,fromOwnMessage:n,isForwarded:a,isWebPagePhoto:r,isGif:c}){const s=t/e;return y(h(n,a,r),function(e,t){return e&&t&&t>=.75&&t<=1.25?20*o:27*o}(c,s),e,t)}function f(e,t){const n=window.matchMedia(i),{width:a,height:c}=r.a.get();let s=t&&n.matches?10:8.25;return e&&(s=n.matches?10:15),{width:a,height:c-s*o}}function p(e,t,n,r){const{width:c,height:s}=Object(a.S)(e)||d;return b({width:c,height:s,fromOwnMessage:t,isForwarded:n,isWebPagePhoto:r})}function g(e,t,n){const{width:r,height:c}=Object(a.bb)(e)||d;return b({width:r,height:c,fromOwnMessage:t,isForwarded:n,isGif:e.isGif})}function O(){return{width:2*o,height:2*o}}function v(e){return e?{width:3*o,height:3*o}:{width:3.375*o,height:3.375*o}}function j(e){const{width:t}=e;let{height:n}=e;"1258816259753933"===e.id&&(n=t);const a=n&&t&&n/t,r=(c.f?s.kb:s.jb)*o,i=a?r*a:r;return a&&i>r?{width:Math.round(r/a),height:r}:{width:r,height:i}}function E({width:e,height:t},n,a=!1){const{width:r,height:c}=f(n,a);return y(r,c,e,t)}function y(e,t,n,a){const r=a/n,c=Math.min(n,e);return Math.round(c*r)>t?{width:Math.round(t/r),height:t}:{width:c,height:Math.round(c*r)}}},,function(e,t,n){"use strict";var a=n(0),r=n(7),c=n(9),s=n(8),i=n(43);let o,l;async function u(){return o||(o=n.e(7).then(n.bind(null,305)),l=(await o).default),o}setTimeout(u,5e3);t.a=Object(a.h)(({className:e,id:t,animationData:n,play:o,playSegment:d,speed:m,noLoop:h,size:b,quality:f,isLowPriority:p,onLoad:g})=>{const[O,v]=Object(a.r)(),j=Object(a.q)(null),E=Object(a.q)(!1),y=Object(a.q)(!1),N=Object(a.q)();N.current=o;const C=Object(a.q)();C.current=d,Object(a.n)(()=>{if(O||!n)return;const e=()=>{if(!j.current)return;const e=new l(t,j.current,n,{noLoop:h,size:b,quality:f,isLowPriority:p},g);m&&e.setSpeed(m),v(e)};l?e():u().then(()=>{Object(c.b)(()=>{j.current&&e()})})},[O,n,t,p,h,g,f,b,m]),Object(a.n)(()=>()=>{O&&O.destroy()},[O]);const T=Object(a.m)((e=!1)=>{O&&(N.current||C.current)&&(C.current?O.playSegment(C.current):e?O.goToAndPlay(0):O.play())},[O]),M=Object(a.m)(()=>{O&&O.pause()},[O]),w=Object(a.m)(()=>{y.current=!0,O&&(E.current||(E.current=O.isPlaying()),M())},[O,M]),L=Object(a.m)(()=>{E.current&&T(),E.current=!1,y.current=!1},[T]),S=Object(a.m)(()=>{Object(c.b)(L)},[L]);var I,k;Object(a.n)(()=>{O&&(o||d?y.current?E.current=!0:T(h):y.current?E.current=!1:M())},[O,o,d,h,T,M]),Object(i.a)(w,L),I=w,k=S,Object(a.n)(()=>(document.hasFocus()||I(),window.addEventListener("blur",I),window.addEventListener("focus",k),()=>{window.removeEventListener("focus",k),window.removeEventListener("blur",I)}),[I,k]);const A=Object(s.a)("AnimatedSticker",e,r.d&&o&&"is-playing"),x=b?`width: ${b}px; height: ${b}px;`:void 0;return a.a.createElement("div",{ref:j,className:A,style:x})})},function(e,t,n){"use strict";var a=n(38);t.a=(e,t)=>{const n=Object(a.a)(t);n&&!t.some((e,t)=>e!==n[t])||e(n||[])}},function(e,t,n){"use strict";var a=n(0),r=n(93),c=n(98),s=n(31);t.a=Object(a.h)(({isOpen:e,onClose:t,onCloseAnimationEnd:n,header:i,text:o,textParts:l,confirmLabel:u="Confirm",confirmHandler:d,confirmIsDestructive:m,isButtonsInOneRow:h})=>{const b=Object(r.a)();return a.a.createElement(c.a,{className:"confirm",header:i,isOpen:e,onClose:t,onCloseAnimationEnd:n,onEnter:d},o&&o.split("\\n").map(e=>a.a.createElement("p",null,e)),l,a.a.createElement("div",{className:h?"dialog-buttons mt-2":""},a.a.createElement(s.a,{className:"confirm-dialog-button",isText:!0,onClick:d,color:m?"danger":"primary"},u),a.a.createElement(s.a,{className:"confirm-dialog-button",isText:!0,onClick:t},b("Cancel"))))})},function(e,t,n){"use strict";var a=n(0),r=n(8),c=n(27);n(233);t.a=Object(a.h)(({text:e="Nothing found."})=>{const{transitionClassNames:t}=Object(c.a)(!0);return a.a.createElement("div",{className:Object(r.a)("NothingFound",t)},e)})},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var a=n(0),r=n(106),c=n(29);function s(e,t){const n=void 0===t,s=Object(a.q)(n),i=Object(a.q)(),o=Object(c.a)();return Object(r.a)(()=>{n||(s.current=!1,i.current&&(clearTimeout(i.current),i.current=void 0))},e),Object(a.n)(()=>{if(n||s.current)return;const e=()=>{s.current=!0,o()};t>0?i.current=window.setTimeout(e,t):e()},e),s.current}},function(e,t,n){"use strict";var a=n(0),r=n(8);n(188);t.a=({children:e,className:t,onClick:n})=>{const c=Object(a.m)(e=>{e.preventDefault(),n(e)},[n]);return a.a.createElement("a",{href:"#",className:Object(r.a)("Link",t),onClick:n?c:void 0},e)}},function(e,t,n){"use strict";var a=n(0),r=n(2),c=n(18),s=n(4),i=n(6),o=n(35),l=n(3),u=n(93),d=n(99),m=n(130),h=n(146);t.a=Object(a.h)(Object(r.h)((e,{chatId:t})=>{const{lastSyncTime:n}=e,a=Object(i.f)(e,t);return{lastSyncTime:n,chat:a,onlineCount:a?Object(i.n)(e,a):void 0,areMessagesLoaded:Boolean(Object(i.m)(e,t))}},(e,t)=>Object(l.l)(t,["loadFullChat","loadSuperGroupOnlines","openMediaViewer"]))(({typingStatus:e,avatarSize:t="medium",withMediaViewer:n,withHandle:r,withFullInfo:i,withUpdatingStatus:l,withChatType:b,chat:f,onlineCount:p,areMessagesLoaded:g,lastSyncTime:O,loadFullChat:v,loadSuperGroupOnlines:j,openMediaViewer:E})=>{const y=f&&Object(s.nb)(f),{id:N,isMin:C,isRestricted:T}=f||{};Object(a.n)(()=>{N&&!C&&i&&O&&(v({chatId:N}),y&&j({chatId:N}))},[N,C,O,i,v,y,j]);const M=Object(a.m)((e,n)=>{f&&n&&(e.stopPropagation(),E({avatarOwnerId:f.id,origin:"jumbo"===t?c.h.ProfileAvatar:c.h.MiddleHeaderAvatar}))},[f,t,E]),w=Object(u.a)();if(f)return a.a.createElement("div",{className:"ChatInfo"},a.a.createElement(d.a,{key:f.id,size:t,chat:f,onClick:n?M:void 0}),a.a.createElement("div",{className:"info"},a.a.createElement("div",{className:"title"},a.a.createElement("h3",null,Object(o.a)(Object(s.l)(f))),f.isVerified&&a.a.createElement(m.a,null)),function(){if(l&&!g&&!T)return a.a.createElement("span",{className:"status"},w("Updating"));if(!f)return;if(e)return a.a.createElement(h.a,{typingStatus:e});if(b)return a.a.createElement("div",{className:"status"},w(Object(s.m)(f)));const t=r?f.username:void 0,n=function(e,t){const n=t(Object(s.m)(e)),{membersCount:a}=e;if(e.isRestricted)return"Channel"===n?"channel is inaccessible":"group is inaccessible";if(!a)return n;return t("Channel"===n?"Subscribers":"Members",a,"i")}(f,w),c=p?", "+w("OnlineCount",p,"i"):void 0;return a.a.createElement("div",{className:"status"},t&&a.a.createElement("span",{className:"handle"},t),a.a.createElement("span",{className:"group-status"},n),c&&a.a.createElement("span",{className:"online-status"},c))}()))}))},function(e,t,n){"use strict";var a=n(0),r=n(7),c=n(5),s=n(9),i=n(48),o=n(29);t.a=(e,t=!1,n=c.ApiMediaFormat.BlobUrl,l,u)=>{const d=e?i.c(e):void 0,m=n===c.ApiMediaFormat.Stream||r.h&&n===c.ApiMediaFormat.Progressive,h=Object(o.a)(),[b,f]=Object(a.r)(d&&!m?1:0),p=Object(a.q)(),g=Object(a.p)(()=>Object(s.g)(e=>{(!u||Date.now()-p.current>u)&&f(e)},500,!0),[u]);return Object(a.n)(()=>{!t&&e&&(d?m&&setTimeout(()=>{f(.75)},1500):(f(0),p.current&&i.a(g),p.current=Date.now(),i.b(e,n,g).then(()=>{const e=Date.now()-p.current;p.current=void 0,!u||e>=u?h():setTimeout(h,u-e)})))},[t,e,d,n,l,h,m,u,g]),Object(a.n)(()=>{t&&p.current&&(i.a(g),f(0))},[g,t]),{mediaData:d,downloadProgress:b}}},function(e,t,n){"use strict";var a=n(0),r=n(8);n(205);const c={s:22,m:25,l:28,xl:20};t.a=Object(a.h)(({progress:e=0,size:t="l",square:n,transparent:s,noCross:i,onClick:o})=>{const l=c[t],u=l-4,d=l-1,m=2*u*Math.PI,h=Object(a.q)(null);Object(a.n)(()=>{if(!h.current)return;const t=h.current.firstElementChild,n=m-Math.min(Math.max(.05,e),1)*m;t?t.firstElementChild.setAttribute("stroke-dashoffset",n.toString()):h.current.innerHTML=`\n \n `},[h,m,d,u,e]);const b=Object(r.a)("ProgressSpinner size-"+t,s&&"transparent",n&&"square",i&&"no-cross");return a.a.createElement("div",{ref:h,className:b,onClick:o})})},function(e,t,n){"use strict";var a=n(0),r=n(57);t.a=({containerId:e,className:t,children:n})=>{const c=Object(a.q)(document.createElement("div"));return Object(a.o)(()=>{const n=document.querySelector(e||"#portals");if(!n)return;const a=c.current;return t&&a.classList.add(t),n.appendChild(a),()=>{r.a.render(void 0,a),n.removeChild(a)}},[t,e]),r.a.render(n,c.current)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var a=n(18),r=n(43),c=n(9),s=n(55);function i(e,t,n,i=0,o=1500,l,u){if(l===a.b.Static)return void t.scrollIntoView({block:n});const{offsetTop:d}=t;if(void 0===l){const t=d-e.scrollTop;t<-o?e.scrollTop+=t+o:t>o&&(e.scrollTop+=t-o)}else l===a.b.Up?e.scrollTop=d+o:l===a.b.Down&&(e.scrollTop=Math.max(0,d-o));Object(c.b)(()=>{Object(r.b)(600),function(e,t,n,a=0,r){const{offsetTop:c,offsetHeight:i}=t,{scrollTop:o,offsetHeight:l,scrollHeight:u}=e;let d;switch(n){case"start":d=c-a-o;break;case"end":d=c+i+a-(o+l);break;case"nearest":case"center":d=i0){const e=u-(o+l);d=Math.min(d,e)}const m=e.scrollTop+d,h=r||250+Math.abs(d)/1500*350,b=Date.now();Object(s.b)(()=>{const t=Math.min((Date.now()-b)/h,1),n=d*(1-function(e){return 1-(1-e)**3.5}(t));return e.scrollTop=Math.round(m-n),t<1})}(e,t,n,i,u)})}},,function(e,t,n){"use strict";var a=n(0),r=n(8),c=n(20);n(212);var s=Object(a.h)(({id:e,label:t,subLabel:n,value:s,name:i,checked:o,disabled:l,hidden:u,isLoading:d,onChange:m})=>{const h=Object(r.a)("Radio",l&&"disabled",u&&"hidden-widget",d&&"loading");return a.a.createElement("label",{className:h},a.a.createElement("input",{type:"radio",name:i,value:s,id:e,checked:o,onChange:m,disabled:l||u}),a.a.createElement("div",{className:"Radio-main"},a.a.createElement("span",{className:"label"},t),n&&a.a.createElement("span",{className:"subLabel"},n)),d&&a.a.createElement(c.a,null))});t.a=Object(a.h)(({id:e,name:t,options:n,selected:r,disabled:c,loadingOption:i,onChange:o})=>{const l=Object(a.m)(e=>{const{value:t}=e.currentTarget;o(t)},[o]);return a.a.createElement("div",{id:e,className:"radio-group"},n.map(e=>a.a.createElement(s,{name:t,label:e.label,subLabel:e.subLabel,value:e.value,checked:e.value===r,hidden:e.hidden,disabled:c,isLoading:i?i===e.value:void 0,onChange:l})))})},function(e,t,n){"use strict";var a=n(0),r=n(18),c=n(3),s=n(29),i=n(38);function o(e,t=0,n,a){const{length:c}=e,s=e.indexOf(t),i=n===r.e.Forwards?s:s+1||c,o=Math.max(0,i-a),l=i+a-1,u=e.slice(Math.max(0,o),l+1);let d,m;switch(n){case r.e.Forwards:d=i>0,m=o>=0;break;case r.e.Backwards:d=i{const d=Object(a.q)(),m=Object(a.q)((()=>{if(!t||d.current)return;const{newViewportIds:e}=o(t,t[0],r.e.Forwards,l);return e})()),h=Object(s.a)(),b=Object(i.a)(t),f=Object(i.a)(n);if(t&&!n&&(t!==b||n!==f)){const{offsetId:e=t[0],direction:n=r.e.Forwards}=d.current||{},{newViewportIds:a}=o(t,e,n,l);m.current&&Object(c.a)(m.current,a)||(m.current=a)}Object(a.n)(()=>{if(t&&!n&&e&&u){const t=m.current;e({offsetId:t[t.length-1]})}},[t,n,e,u]);const p=Object(a.m)(({direction:n})=>{const a=m.current,s=a?n===r.e.Backwards?a[a.length-1]:a[0]:void 0;if(!t)return void(e&&e({offsetId:s}));d.current={...d.current,direction:n,offsetId:s};const{newViewportIds:i,areSomeLocal:u,areAllLocal:b}=o(t,s,n,l);!u||a&&Object(c.a)(a,i)||(m.current=i,h()),!b&&e&&e({offsetId:s})},[t,l,e,h]);return n?[t]:[m.current,p]}},function(e,t,n){"use strict";var a=n(0),r=n(5),c=n(1),s=n(103),i=n(95),o=n(97),l=n(102),u=n(36),d=n(105);n(210);t.a=({sticker:e,isInline:t=!1,observeIntersection:n,lastSyncTime:m})=>{const h=Object(a.q)(null),[b,f]=Object(u.a)(),p="sticker"+e.id,g=Object(i.b)(h,n),O=Object(o.a)(p+"?size=m",!g,r.ApiMediaFormat.BlobUrl,m),{transitionClassNames:v}=Object(l.a)(O,"slow"),j=Object(o.a)(p,!g,r.ApiMediaFormat.Lottie,m),E=Boolean(j),[y,N]=Object(a.r)(String(Math.random())),C=Object(a.m)(()=>{N(String(Math.random()))},[]);let T;T=t?.5*Object(s.l)(e).width:c.pb;const M=`width: ${T}px; height: ${T}px;`;return a.a.createElement("div",{ref:h,className:"AnimatedEmoji media-inner",style:M,onClick:C},O&&!b&&a.a.createElement("img",{src:O,className:v,alt:""}),E&&a.a.createElement(d.a,{key:p,id:p,animationData:j,size:T,quality:1,play:g&&y,noLoop:!0,onLoad:f}))}},,function(e,t,n){"use strict";var a=n(0),r=n(9),c=n(148);t.a=(e=!1)=>{const[t,n]=Object(a.r)(!e),[s,i]=Object(a.r)(0),o=Object(a.p)(()=>Object(r.a)(n,200,!1,!0),[]),l=Object(a.m)(e=>{const t=e.currentTarget;Object(c.a)(t)||(t.buffered.length&&i(t.buffered.end(0)/t.duration),o(t.readyState>=3||t.currentTime>0))},[o]);return{isBuffered:t,bufferedProgress:s,bufferingHandlers:{onLoadedData:l,onPlaying:l,onLoadStart:l,onPause:l,onTimeUpdate:l,onProgress:l},checkBuffering(e){o(e.readyState>=3)}}}},function(e,t,n){"use strict";function a(e,t){if(!t&&e===document.activeElement)return;const n=window.getSelection(),a=document.createRange();e.lastChild&&e.lastChild.nodeValue?(a.setStart(e.lastChild,e.lastChild.nodeValue.length),n.removeAllRanges(),n.addRange(a)):e.focus()}n.d(t,"a",(function(){return a}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var a=n(5),r=n(7);const c={B:a.ApiMessageEntityTypes.Bold,STRONG:a.ApiMessageEntityTypes.Bold,I:a.ApiMessageEntityTypes.Italic,EM:a.ApiMessageEntityTypes.Italic,U:a.ApiMessageEntityTypes.Underline,S:a.ApiMessageEntityTypes.Strike,STRIKE:a.ApiMessageEntityTypes.Strike,DEL:a.ApiMessageEntityTypes.Strike,CODE:a.ApiMessageEntityTypes.Code,PRE:a.ApiMessageEntityTypes.Pre,BLOCKQUOTE:a.ApiMessageEntityTypes.Blockquote};function s(e){const t=document.createElement("div");t.innerHTML=function(e){let t=e.slice(0);r.c||(t=t.replace(/]+alt="([^"]+)"[^>]*>/gm,"$1"));return t=t.replace(/<\/?span([^>]*)?>/g,""),t=t.replace(/ /g," "),t=t.replace(/]*)?>/g,"\n"),t=t.replace(/<\/div>(\s*)
/g,"\n"),t=t.replace(/
/g,"\n"),t=t.replace(/<\/div>/g,""),t=t.replace(/^`{3}(.*[\n\r][^]*?^)`{3}/gm,"
$1
"),t=t.replace(/[`]{3}([^`]+)[`]{3}/g,"
$1
"),t=t.replace(/[`]{1}([^`\n]+)[`]{1}/g,"$1"),t=t.replace(/[*]{2}([^*\n]+)[*]{2}/g,"$1"),t=t.replace(/[*]{1}([^*\n]+)[*]{1}/g,"$1"),t=t.replace(/[~]{2}([^~\n]+)[~]{2}/g,"$1"),t}(e);const n=t.innerText.trim().replace(/\u200b+/g,"").slice(0,4096);let s=0,i=0;const o=[];function l(e){const{index:t,entity:r}=function(e,t,n){const r=function(e){if(c[e.nodeName])return c[e.nodeName];if("A"===e.nodeName){const t=e;return t.dataset.entityType===a.ApiMessageEntityTypes.MentionName?a.ApiMessageEntityTypes.MentionName:t.href.startsWith("mailto:")?a.ApiMessageEntityTypes.Email:t.href.startsWith("tel:")?a.ApiMessageEntityTypes.Phone:t.href!==t.textContent?a.ApiMessageEntityTypes.TextUrl:a.ApiMessageEntityTypes.Url}if("SPAN"===e.nodeName)return e.dataset.entityType;return}(e);if(!r||!e.textContent)return{index:n,entity:void 0};const s=t.indexOf(e.textContent,n),i=s>=0?s:n,o=t.substring(0,i).length,{length:l}=t.substring(i,i+e.textContent.length);let u,d;r===a.ApiMessageEntityTypes.TextUrl&&(u=e.href);r===a.ApiMessageEntityTypes.MentionName&&(d=Number(e.dataset.userId));return{index:i,entity:{type:r,offset:o,length:l,...u&&{url:u},...d&&{userId:d}}}}(e,n,s);r?(s=t,o.push(r)):e.textContent&&(s+=e.textContent.length),e.hasChildNodes()&&i<=3&&(i+=1,Array.from(e.childNodes).forEach(l))}return Array.from(t.childNodes).forEach(e=>{i=1,l(e)}),{text:n,entities:o.length?o:void 0}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var a=n(0),r=n(27),c=n(8),s=n(42),i=n(38),o=n(36);n(200);var l=Object(a.h)(({isQuick:e,onFileSelect:t})=>{const[n,r,s]=Object(o.a)(),i=Object(c.a)("DropTarget",n&&"hovered");return a.a.createElement("div",{className:i,onDrop:t,onDragEnter:()=>{r()},onDragLeave:e=>{const{relatedTarget:t}=e;t&&e.stopPropagation(),s()}},a.a.createElement("div",{className:"target-content"},a.a.createElement("div",{className:"icon icon-"+(e?"photo":"document")}),a.a.createElement("div",{className:"title"},"Drop files here to send them"),a.a.createElement("div",{className:"description"},e?"in a quick way":"without compression")))});n(201);let u;!function(e){e.None="none",e.Document="document",e.QuickFile="quick_file"}(u||(u={}));t.b=Object(a.h)(({isOpen:e,withQuick:t,onHide:n,onFileSelect:o})=>{const u=Object(a.q)(null),d=Object(i.a)(t),{shouldRender:m,transitionClassNames:h}=Object(r.a)(e);Object(a.n)(()=>e?Object(s.a)(n):void 0,[e,n]);const b=Object(a.m)(e=>{const{dataTransfer:t}=e;t.files&&t.files.length>0&&(n(),o(Array.from(t.files),!1))},[o,n]),f=Object(a.m)(e=>{const{dataTransfer:t}=e;t.files&&t.files.length>0&&(n(),o(Array.from(t.files),!0))},[o,n]),p=Object(a.m)(e=>{e.stopPropagation();const{target:t,relatedTarget:a}=e;t.matches(".DropTarget, .DropArea")&&!a&&(u.current=window.setTimeout(()=>{n()},150))},[n]);if(!m)return;const g=Object(c.a)("DropArea",h);return a.a.createElement("div",{className:g,onDragLeave:p,onDragOver:()=>{u.current&&window.clearTimeout(u.current)},onDrop:n},a.a.createElement(l,{onFileSelect:b}),(t||d)&&a.a.createElement(l,{onFileSelect:f,isQuick:!0}))})},,function(e,t,n){"use strict";var a=n(0),r=n(2),c=n(6),s=n(4),i=n(35),o=n(8),l=n(93),u=n(99);n(182);t.a=Object(a.h)(Object(r.h)((e,{chatOrUserId:t})=>{if(!t)return{};return{chat:t?Object(c.f)(e,t):void 0,user:Object(s.lb)(t)?Object(c.Bb)(e,t):void 0}})(({icon:e,title:t,isMinimized:n,canClose:r,onClick:c,clickArg:d,chat:m,user:h,className:b})=>{let f,p;if(Object(l.a)(),e&&t)f=a.a.createElement("div",{className:"item-icon"},a.a.createElement("i",{className:"icon-"+e})),p=t;else if(m||h){f=a.a.createElement(u.a,{chat:m,user:h,size:"small",isSavedMessages:h&&h.isSelf});const e=!m||h&&!h.isSelf?Object(s.Y)(h):Object(s.l)(m,h);p=e?Object(i.a)(e):void 0}const g=Object(o.a)("PickerSelectedItem",b,n&&"minimized",r&&"closeable");return a.a.createElement("div",{className:g,onClick:()=>c(d),title:n?p:void 0},f,!n&&a.a.createElement("div",{className:"item-name"},p),r&&a.a.createElement("div",{className:"item-remove"},a.a.createElement("i",{className:"icon-close"})))}))},function(e,t,n){"use strict";let a;n.d(t,"a",(function(){return a})),n.d(t,"b",(function(){return r})),function(e){e[e.Up=0]="Up",e[e.Down=1]="Down",e[e.Left=2]="Left",e[e.Right=3]="Right"}(a||(a={}));function r(e,t){let n,r=!1;function c(e){t.excludedClosestSelector&&(e.target.matches(t.excludedClosestSelector)||e.target.closest(t.excludedClosestSelector))||(n=e,"mousedown"===e.type?(document.addEventListener("mousemove",i),document.addEventListener("mouseup",s)):"touchstart"===e.type&&(document.addEventListener("touchmove",i),document.addEventListener("touchend",s),document.addEventListener("touchcancel",s),"touches"in e&&(void 0===e.pageX&&(e.pageX=e.touches[0].pageX),void 0===e.pageY&&(e.pageY=e.touches[0].pageY))),document.body.classList.add("no-selection"),t.withCursor&&document.body.classList.add("cursor-grabbing"),t.onCapture&&t.onCapture(e))}function s(e){n&&(t.withCursor&&document.body.classList.remove("cursor-grabbing"),document.body.classList.remove("no-selection"),document.removeEventListener("mouseup",s),document.removeEventListener("mousemove",i),document.removeEventListener("touchcancel",s),document.removeEventListener("touchend",s),document.removeEventListener("touchmove",i),n=void 0,r?t.onRelease&&t.onRelease(e):t.onClick&&t.onClick(e)),r=!1}function i(e){if(n){"touchmove"===e.type&&"touches"in e&&(void 0===e.pageX&&(e.pageX=e.touches[0].pageX),void 0===e.pageY&&(e.pageY=e.touches[0].pageY));const c=e.pageX-n.pageX,s=e.pageY-n.pageY;(Math.abs(c)>=15||Math.abs(s)>=15)&&(r=!0),t.onDrag&&t.onDrag(e,n,{dragOffsetX:c,dragOffsetY:s}),t.onSwipe&&function(e,t,n,r){const c=Math.abs(t),s=Math.abs(n);if(t&&n){if(Math.max(c,s)/Math.min(c,s)<2)return}c>=50?r(e,t<0?a.Left:a.Right):s>=50&&r(e,n<0?a.Up:a.Down)}(e,c,s,t.onSwipe)}}return e.addEventListener("mousedown",c),e.addEventListener("touchstart",c,{passive:!0}),()=>{e.removeEventListener("mousedown",c),e.removeEventListener("touchstart",c)}}},function(e,t,n){"use strict";var a=n(0);t.a=(e,t)=>{Object(a.n)(()=>{const t=e.current;if(t)return t.addEventListener("wheel",n,{passive:!0}),()=>{t.removeEventListener("wheel",n)};function n(e){e.deltaX||(t.scrollLeft+=e.deltaY/4)}},[e,t])}},function(e,t,n){"use strict";var a=n(0),r=n(2),c=n(9);t.a=(e,t,n,s)=>{const{loadMessage:i}=Object(r.d)(),o=Object(a.p)(()=>{const n=Object(c.g)(i,500,!0);return()=>{n({chatId:e,messageId:t,replyOriginForId:s})}},[i,e,t,s]);Object(a.n)(()=>{t&&!n&&o()})}},function(e,t,n){"use strict";var a=n(0);n(189);t.a=()=>a.a.createElement("span",{className:"VerifiedIcon"})},function(e,t,n){"use strict";var a=n(0),r=n(7);let c=0;t.a=(e,t)=>{const[n,s]=Object(a.r)(!1),[i,o]=Object(a.r)(void 0),l=Object(a.m)(e=>{t||2!==e.button||document.body.classList.add("no-selection")},[t]),u=Object(a.m)(e=>{t||(e.preventDefault(),document.body.classList.remove("no-selection"),i||(document.body.classList.remove("no-selection"),0===c&&document.body.classList.add("has-context-menu"),c++,s(!0),o({x:e.clientX,y:e.clientY})))},[t,i]),d=Object(a.m)(()=>{s(!1)},[]),m=Object(a.m)(()=>{o(void 0),document.body.classList.remove("no-selection"),setTimeout(()=>{c--,0===c&&document.body.classList.remove("has-context-menu")},200)},[]);return Object(a.n)(()=>{if(t||!r.k)return;const n=e.current;if(!n)return;let a;const c=()=>{a&&(clearTimeout(a),a=void 0)},l=e=>{t||r.f&&window.document.body.classList.contains("enable-symbol-menu-transforms")||(c(),a=window.setTimeout(()=>(e=>{c();const{clientX:t,clientY:a}=e.touches[0];i||(n.addEventListener("touchend",(function e(t){n.removeEventListener("touchend",e,!0),t.stopImmediatePropagation(),t.preventDefault(),t.stopPropagation()}),!0),document.body.classList.add("no-selection"),s(!0),o({x:t,y:a}))})(e),250))};return n.addEventListener("touchstart",l,{passive:!0}),n.addEventListener("touchcancel",c,!0),n.addEventListener("touchend",c,!0),n.addEventListener("touchmove",c,{passive:!0}),()=>{c(),n.removeEventListener("touchstart",l),n.removeEventListener("touchcancel",c,!0),n.removeEventListener("touchend",c,!0),n.removeEventListener("touchmove",c)}},[i,t,e]),{isContextMenuOpen:n,contextMenuPosition:i,handleBeforeContextMenu:l,handleContextMenu:u,handleContextMenuClose:d,handleContextMenuHide:m}}},function(e,t,n){"use strict";function a(e,t){return t-Math.floor(t/e)*e}n.d(t,"a",(function(){return a}))},function(e,t,n){"use strict";var a=n(1);t.a=e=>{e.play().catch(e=>{a.m&&console.warn(e)})}},function(e,t,n){"use strict";n.d(t,"a",(function(){return u})),n.d(t,"b",(function(){return m}));var a=n(0),r=n(2),c=n(5),s=n(4),i=n(35),o=n(68),l=n(52);function u(e,t,n){const a=e.content.text;if(!a||!a.text){const t=Object(s.N)(e);return t?[t]:void 0}const{text:r,entities:c}=a;return m(r,c,t,n)}function d(e){const t=new Set,n=[];return e.forEach((a,r)=>{if(t.has(r))return;const c=function e(t,n,a,r){const{offset:c,length:s}=t,i=new Set([n]);if(r.has(n))return;const o=a.filter((e,t)=>t>n&&e.offset>=c&&e.offsete(t,a.indexOf(t),a,r)).filter(Boolean);return o.forEach(e=>e.organizedIndexes.forEach(e=>i.add(e))),{entity:t,organizedIndexes:i,nestedEntities:o}}(a,r,e,t);c&&(c.organizedIndexes.forEach(e=>{t.add(e)}),n.push(c))}),n}function m(e,t,n,r,s){if(!t||!t.length)return h(e,n,r,s);const u=[];let m=!1;const g=d(t);function O(t,u,d,g){const v=[],{entity:j,nestedEntities:E}=d,{offset:y,length:N,type:C}=j;let T=e.substring(t,y);const M=T.length;T&&(m&&T.length>0&&"\n"===T[0]&&(T=T.substr(1),m=!1),T&&v.push(...h(T,n,r,s)));const w=t+M,L=w+N;let S=e.substring(y,y+N);const I=[];if(m&&S.length>0&&"\n"===S[0]&&(S=S.substr(1),m=!1),C===c.ApiMessageEntityTypes.Pre&&(m=!0),E.length){let e=w;E.forEach((t,n)=>{const{renderResult:a,entityEndIndex:r}=O(e,L,t,n===E.length-1);I.push(...a),e=r})}const k=s?function(e,t,n){const a="string"==typeof t&&t,r=n.length?n.join(""):Object(i.a)(t,["emoji_html","br_html"]).join("");if(!a)return r;switch(e.type){case c.ApiMessageEntityTypes.Bold:return`${r}`;case c.ApiMessageEntityTypes.Italic:return`${r}`;case c.ApiMessageEntityTypes.Underline:return`${r}`;case c.ApiMessageEntityTypes.Code:return`${r}`;case c.ApiMessageEntityTypes.Pre:return`\`\`\`
${r}
\`\`\``;case c.ApiMessageEntityTypes.Strike:return`${r}`;case c.ApiMessageEntityTypes.MentionName:return`${r}`;case c.ApiMessageEntityTypes.Url:case c.ApiMessageEntityTypes.TextUrl:return`${r}`;default:return r}}(j,S,I):function(e,t,n){const r="string"==typeof t&&t,s=n.length?n:t;if(!r)return h(s);switch(e.type){case c.ApiMessageEntityTypes.Bold:return a.a.createElement("strong",null,h(s));case c.ApiMessageEntityTypes.Blockquote:return a.a.createElement("blockquote",null,h(s));case c.ApiMessageEntityTypes.BotCommand:return a.a.createElement("a",{onClick:f,className:"text-entity-link"},h(s));case c.ApiMessageEntityTypes.Hashtag:case c.ApiMessageEntityTypes.Cashtag:return a.a.createElement("a",{onClick:p,className:"text-entity-link"},h(s));case c.ApiMessageEntityTypes.Code:return a.a.createElement("code",{className:"text-entity-code"},h(s));case c.ApiMessageEntityTypes.Email:return a.a.createElement("a",{href:"mailto:"+r,target:"_blank",rel:"noopener noreferrer",className:"text-entity-link"},h(s));case c.ApiMessageEntityTypes.Italic:return a.a.createElement("em",null,h(s));case c.ApiMessageEntityTypes.MentionName:return a.a.createElement(o.a,{userId:e.userId},h(s));case c.ApiMessageEntityTypes.Mention:return a.a.createElement(o.a,{username:r},h(s));case c.ApiMessageEntityTypes.Phone:return a.a.createElement("a",{href:"tel:"+r,className:"text-entity-link"},h(s));case c.ApiMessageEntityTypes.Pre:return a.a.createElement("pre",{className:"text-entity-pre"},h(s));case c.ApiMessageEntityTypes.Strike:return a.a.createElement("del",null,h(s));case c.ApiMessageEntityTypes.TextUrl:case c.ApiMessageEntityTypes.Url:return a.a.createElement(l.a,{url:b(r,e),text:r},h(s));case c.ApiMessageEntityTypes.Underline:return a.a.createElement("ins",null,h(s));default:return h(s)}}(j,S,I);if(Array.isArray(k)?v.push(...k):v.push(k),g&&L0&&"\n"===t[0]&&(t=t.substring(1)),t&&v.push(...h(t,n,r,s))}return{renderResult:v,entityEndIndex:L}}let v=0;return g.forEach((t,n)=>{const{renderResult:a,entityEndIndex:r}=O(v,e.length,t,n===g.length-1);u.push(...a),v=r}),u}function h(e,t,n,a){if(Array.isArray(e)){const r=[];return e.forEach(e=>{r.push(...h(e,t,n,a))}),r}if(a)return Object(i.a)(e,["emoji_html","br_html"]);const r=n?"hq_emoji":"emoji";return t?Object(i.a)(e,[r,"br","highlight"],{highlight:t}):Object(i.a)(e,[r,"br"])}function b(e,t){const{type:n,url:a}=t;return n===c.ApiMessageEntityTypes.TextUrl&&a?a:e}function f(e){Object(r.d)().sendBotCommand({command:e.currentTarget.innerText})}function p(e){Object(r.d)().setLocalTextSearchQuery({query:e.currentTarget.innerText}),Object(r.d)().searchTextMessagesLocal()}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var a=n(0),r=n(168),c=n(14),s=n(29);const i=new Map;function o(e,t=!1,n){const o=Object(a.q)(e?i.get(e):void 0),l=Object(a.q)(),u=Object(s.a)();return l.current&&t&&(clearTimeout(l.current),l.current=void 0),Object(a.n)(()=>{if(!e||o.current||t)return;const a=new Image;a.onload=()=>{const t=Object(c.f)(a);Object(r.a)(t.getContext("2d"),0,0,t.width,t.height,2,2);const n=t.toDataURL();o.current=n,u(),i.size>=1e3&&i.clear(),i.set(e,n)},n?l.current=window.setTimeout(()=>{a.src=e},n):a.src=e},[e,n,u,t]),o.current}},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var a=n(0),r=n(9);function c(e,t){Object(a.n)(()=>{const t=e.current;return()=>{t&&Object(r.b)(()=>{t.pause(),t.src="",t.load()})}},t)}},,,function(e,t,n){},,,function(e,t,n){"use strict";var a=n(0),r=n(8),c=n(36),s=n(93),i=n(16),o=n(31);n(180);t.a=Object(a.h)(({ref:e,children:t,value:n,inputId:l,className:u,focused:d,isLoading:m,placeholder:h,disabled:b,canClose:f,onChange:p,onReset:g,onFocus:O,onBlur:v})=>{let j=Object(a.q)(null);e&&(j=e);const[E,y,N]=Object(c.a)(d);Object(a.n)(()=>{j.current&&(d?j.current.focus():j.current.blur())},[d,h]);const C=Object(s.a)();return a.a.createElement("div",{className:Object(r.a)("SearchInput",u,E&&"has-focus")},t,a.a.createElement("input",{ref:j,id:l,type:"text",placeholder:h||C("Search"),className:"form-control",value:n,disabled:b,onChange:function(e){const{currentTarget:t}=e;p(t.value)},onFocus:function(){y(),O&&O()},onBlur:function(){N(),v&&v()}}),a.a.createElement("i",{className:"icon-search"}),m&&a.a.createElement(i.a,null),!m&&(n||f)&&g&&a.a.createElement(o.a,{round:!0,size:"tiny",color:"translucent",onClick:g},a.a.createElement("span",{className:"icon-close"})))})},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var a=n(9),r=n(55),c=n(7);function s(e,t){c.d?Object(a.b)(()=>{!function(e,t){const{scrollLeft:n,offsetWidth:a,scrollWidth:c}=e;let s=t-n;if(s<0){const e=-n;s=Math.max(s,e)}else if(s>0){const e=c-(n+a);s=Math.min(s,e)}const i=e.scrollLeft+s,o=Date.now();Object(r.a)(()=>{const t=Math.min((Date.now()-o)/450,1),n=s*(1-function(e){return 1-(1-e)**3.5}(t));return e.scrollLeft=Math.round(i-n),t<1})}(e,t)}):e.scrollTo({left:t,behavior:"smooth"})}},function(e,t,n){"use strict";var a=n(7);t.a=(e,t)=>{a.d&&(e.style.overflow="hidden"),void 0!==t&&(e.scrollTop=t),a.d&&(e.style.overflow="")}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));function a(e,t=30){return!e||e.length<=t?e:e.substr(0,t)+"..."}},function(e,t,n){"use strict";var a=n(0),r=n(2),c=n(6),s=n(4),i=n(35);n(190);t.a=Object(a.h)(Object(r.h)((e,{typingStatus:t})=>{if(!t.userId)return{};return{typingUser:Object(c.Bb)(e,t.userId)}})(({typingStatus:e,typingUser:t})=>{const n=t&&!t.isSelf&&Object(s.Y)(t);return a.a.createElement("p",{className:"typing-status"},n&&a.a.createElement("span",{className:"sender-name"},Object(i.a)(n)),e.action,a.a.createElement("span",{className:"ellipsis"}))}))},function(e,t,n){"use strict";var a=n(0),r=n(2),c=n(6),s=n(4),i=n(3),o=n(93),l=n(99),u=n(98),d=n(31);n(193);t.a=Object(a.h)(Object(r.h)((e,{chat:t})=>{const n=Object(s.lb)(t.id),a=Object(c.N)(e,t.id),r=n&&!a,i=t&&Object(s.lb)(t.id)?Object(s.Y)(Object(c.Bb)(e,Object(s.T)(t))):void 0;return{isPrivateChat:n,isChatWithSelf:a,isChannel:Object(s.jb)(t),isBasicGroup:Object(s.ib)(t),isSuperGroup:Object(s.nb)(t),canDeleteForAll:r,chatTitle:Object(s.l)(t),contactFirstName:i}},(e,t)=>Object(i.l)(t,["leaveChannel","deleteHistory","deleteChannel"]))(({isOpen:e,chat:t,isChannel:n,isPrivateChat:r,isChatWithSelf:c,isBasicGroup:s,isSuperGroup:i,canDeleteForAll:m,chatTitle:h,contactFirstName:b,onClose:f,leaveChannel:p,deleteHistory:g,deleteChannel:O})=>{const v=Object(a.m)(()=>{g({chatId:t.id,maxId:t.lastMessage.id,shouldDeleteForAll:!0}),f()},[g,t.id,t.lastMessage,f]),j=Object(a.m)(()=>{r||s?g({chatId:t.id,maxId:t.lastMessage.id,shouldDeleteForAll:!1}):!n&&!i||t.isCreator?(n||i)&&t.isCreator&&O({chatId:t.id}):p({chatId:t.id}),f()},[r,s,n,i,t.isCreator,t.lastMessage,t.id,f,g,p,O]),E=Object(o.a)();return a.a.createElement(u.a,{isOpen:e,onClose:f,className:"DeleteChatModal",header:a.a.createElement("div",{className:"modal-header"},a.a.createElement(l.a,{size:"tiny",chat:t,isSavedMessages:c}),a.a.createElement("h3",{className:"modal-title"},n&&!t.isCreator?"Leave Channel?":n&&t.isCreator?"Delete and Leave Channel?":s||i?"Leave Group?":"Delete Chat?"))},n&&!t.isCreator?a.a.createElement("p",null,"Are you sure you want to leave channel ",a.a.createElement("strong",null,h),"?"):n&&t.isCreator?a.a.createElement("p",null,"Are you sure you want to delete and leave channel ",a.a.createElement("strong",null,h),"?"):s||i?a.a.createElement("p",null,"Are you sure you want to leave group ",a.a.createElement("strong",null,h),"?"):a.a.createElement("p",null,"Are you sure you want to delete chat with ",a.a.createElement("strong",null,b),"?"),m&&a.a.createElement(d.a,{color:"danger",className:"confirm-dialog-button",isText:!0,onClick:v},"Delete for ",b?"me and "+b:"Everyone"),a.a.createElement(d.a,{color:"danger",className:"confirm-dialog-button",isText:!0,onClick:j},n&&!t.isCreator?"Leave Channel":n&&t.isCreator?"Delete and Leave Channel":s||i?"Leave Group":"Delete"+(m?" just for me":"")),a.a.createElement(d.a,{className:"confirm-dialog-button",isText:!0,onClick:f},E("Cancel")))}))},function(e,t,n){"use strict";function a(e){e.dataset.patchedForSafari||(e.addEventListener("play",()=>{const t=e.currentTime;e.addEventListener("progress",(function n(){e.buffered.length&&(e.dataset.patchForSafariInProgress="true",e.currentTime=e.duration-1,e.addEventListener("progress",()=>{delete e.dataset.patchForSafariInProgress,e.currentTime=t,e.paused&&e.play()},{once:!0}),e.removeEventListener("progress",n))}))},{once:!0}),e.dataset.patchedForSafari="true")}function r(e){return Boolean(e.dataset.patchForSafariInProgress)}n.d(t,"b",(function(){return a})),n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";var a=n(0),r=n(38);t.a=(e,t)=>{const n=Object(r.a)(t);return Object(a.o)(()=>{e(n||[])},t)}},function(e,t,n){"use strict";var a=n(0),r=n(53),c=n(4),s=n(95),i=n(112),o=n(97),l=n(166),u=n(167);t.a=Object(a.h)(({message:e,observeIntersection:t,smaller:n,uploadProgress:d,withDate:m,datetime:h,className:b,sender:f,isSelected:p,isSelectable:g,onCancelUpload:O,onDateClick:v})=>{const j=Object(a.q)(null),E=e.content.document,y=Object(r.b)(E)||"",{fileName:N,size:C,timestamp:T}=E,M=Object(s.b)(j,t),[w,L]=Object(a.r)(!1),{mediaData:S,downloadProgress:I}=Object(i.a)(Object(c.D)(e,"download"),!w),{isUploading:k,isTransferring:A,transferProgress:x}=Object(c.s)(e,d||I,w),D=Object(r.c)(E),_=D?Object(c.E)(e):void 0,R=D?E.previewBlobUrl:void 0,P=Object(o.a)(Object(c.D)(e,"pictogram"),!M),F=Object(a.m)(()=>{k?O&&O():L(e=>!e)},[k,O]),U=Object(a.m)(()=>{v(e.id,e.chatId)},[v,e.id,e.chatId]);return Object(a.n)(()=>{w&&S&&(Object(l.a)(S,N),L(!1))},[N,S,w]),a.a.createElement(u.a,{ref:j,name:N,extension:y,size:C,timestamp:m?h||T:void 0,thumbnailDataUri:_,previewData:R||P,smaller:n,isTransferring:A,isUploading:k,transferProgress:x,className:b,sender:f,isSelectable:g,isSelected:p,onClick:F,onDateClick:v?U:void 0})})},function(e,t,n){"use strict";var a=n(0),r=n(12),c=n(17);t.a=e=>{const{isOpen:t}=e,n=Object(c.a)(r.a.Extra,"StickerSetModal",!t);return n?a.a.createElement(n,e):void 0}},function(e,t,n){"use strict";var a=n(0),r=n(1),c=n(8),s=n(42),i=n(27),o=n(69),l=n(36),u=n(93),d=n(31);n(225);const m={B:"bold",STRONG:"bold",I:"italic",EM:"italic",U:"underline",DEL:"strikethrough",CODE:"monospace"};t.a=Object(a.h)(({isOpen:e,anchorPosition:t,selectedRange:n,onClose:h})=>{const b=Object(a.q)(null),f=Object(a.q)(null),{shouldRender:p,transitionClassNames:g}=Object(i.a)(e),[O,v,j]=Object(l.a)(),[E,y]=Object(a.r)(""),[N,C]=Object(a.r)(!1),[T,M]=Object(a.r)(),[w,L]=Object(a.r)({});Object(a.n)(()=>e?Object(s.a)(h):void 0,[e,h]),Object(o.a)(e,b,h),Object(a.n)(()=>{O?f.current.focus():(y(""),C(!1))},[O]),Object(a.n)(()=>{p||(j(),L({}),M(void 0))},[j,p]),Object(a.n)(()=>{if(!e||!n)return;const t={};let{parentElement:a}=n.commonAncestorContainer;for(;a&&a.id!==r.r;){const e=m[a.tagName];e&&(t[e]=!0),a=a.parentElement}L(t)},[e,n,v]);const S=Object(a.m)(()=>{if(n)return n.toString()},[n]),I=Object(a.m)(()=>{if(n)return n.commonAncestorContainer.parentElement},[n]);function k(){const e=f.current;if(!e)return;const{offsetWidth:t,scrollWidth:n,scrollLeft:a}=e;if(n<=t)return void M(void 0);let r="";a0&&(r+=" mask-left"),M(r)}function A(e){if(w[e])return"active";if("monospace"===e||"strikethrough"===e){if(Object.keys(w).some(t=>t!==e&&!!w[t]))return"disabled"}else if(w.monospace||w.strikethrough)return"disabled"}const x=Object(a.m)(()=>{L(e=>(document.execCommand(e.bold?"removeFormat":"bold"),Object.keys(e).forEach(t=>{"italic"!==t&&"underline"!==t||!e[t]||document.execCommand(t)}),{...e,bold:!e.bold}))},[]),D=Object(a.m)(()=>{document.execCommand("italic"),L(e=>({...e,italic:!e.italic}))},[]),_=Object(a.m)(()=>{document.execCommand("underline"),L(e=>({...e,underline:!e.underline}))},[]),R=Object(a.m)(()=>{if(w.strikethrough){const e=I();if(!n||!e||"DEL"!==e.tagName||!e.textContent)return;return e.replaceWith(e.textContent),void L(e=>({...e,strikethrough:!1}))}const e=S();document.execCommand("insertHTML",!1,`${e}`),h()},[I,S,h,n,w.strikethrough]),P=Object(a.m)(()=>{if(w.monospace){const e=I();if(!n||!e||"CODE"!==e.tagName||!e.textContent)return;return e.replaceWith(e.textContent),void L(e=>({...e,monospace:!1}))}const e=S();document.execCommand("insertHTML",!1,`${e}`),h()},[I,S,h,n,w.monospace]);function F(){const e=E.includes("://")?E:"http://"+E;if(N){const t=I();if(!t||"A"!==t.tagName)return;return t.href=e,void h()}const t=S();!function(){if(!n)return;const e=window.getSelection();e&&(e.removeAllRanges(),e.addRange(n))}(),document.execCommand("insertHTML",!1,`${t}`),h()}const U=Object(a.m)(e=>{const t={KeyK:v,KeyB:x,KeyU:_,KeyI:D,KeyM:P,KeyS:R}[e.code];!e.altKey&&(e.ctrlKey||e.metaKey)&&t&&(e.preventDefault(),e.stopPropagation(),t())},[x,D,_,P,R,v]);Object(a.n)(()=>(e&&document.addEventListener("keydown",U),()=>document.removeEventListener("keydown",U)),[e,U]);const B=Object(u.a)();if(!p)return;const q=Object(c.a)("TextFormatter",g,O&&"link-control-shown"),H=Object(c.a)("TextFormatter-link-url-confirm",!!E.length&&"shown"),$=t?`left: ${t.x}px; top: ${t.y}px;--text-formatter-left: ${t.x}px;`:"";return a.a.createElement("div",{ref:b,className:q,style:$,onKeyDown:function(e){"Enter"===e.key&&O&&(F(),e.preventDefault())}},a.a.createElement("div",{className:"TextFormatter-buttons"},a.a.createElement(d.a,{color:"translucent",ariaLabel:"Bold text",className:A("bold"),onClick:x},a.a.createElement("i",{className:"icon-bold"})),a.a.createElement(d.a,{color:"translucent",ariaLabel:"Italic text",className:A("italic"),onClick:D},a.a.createElement("i",{className:"icon-italic"})),a.a.createElement(d.a,{color:"translucent",ariaLabel:"Underlined text",className:A("underline"),onClick:_},a.a.createElement("i",{className:"icon-underlined"})),a.a.createElement(d.a,{color:"translucent",ariaLabel:"Strikethrough text",className:A("strikethrough"),onClick:R},a.a.createElement("i",{className:"icon-strikethrough"})),a.a.createElement(d.a,{color:"translucent",ariaLabel:"Monospace text",className:A("monospace"),onClick:P},a.a.createElement("i",{className:"icon-monospace"})),a.a.createElement("div",{className:"TextFormatter-divider"}),a.a.createElement(d.a,{color:"translucent",ariaLabel:B("TextFormat.AddLinkTitle"),onClick:v},a.a.createElement("i",{className:"icon-link"}))),a.a.createElement("div",{className:"TextFormatter-link-control"},a.a.createElement("div",{className:"TextFormatter-buttons"},a.a.createElement(d.a,{color:"translucent",ariaLabel:B("Cancel"),onClick:j},a.a.createElement("i",{className:"icon-arrow-left"})),a.a.createElement("div",{className:"TextFormatter-divider"}),a.a.createElement("div",{className:Object(c.a)("TextFormatter-link-url-input-wrapper",T)},a.a.createElement("input",{ref:f,className:"TextFormatter-link-url-input",type:"text",value:E,placeholder:"Enter URL...",autoComplete:"off",inputMode:"url",onChange:function(e){y(e.target.value),k()},onScroll:k})),a.a.createElement("div",{className:H},a.a.createElement("div",{className:"TextFormatter-divider"}),a.a.createElement(d.a,{color:"translucent",ariaLabel:B("Save"),className:"color-primary",onClick:F},a.a.createElement("i",{className:"icon-check"}))))))})},function(e,t,n){"use strict";var a=n(0),r=n(28),c=n(4),s=n(97),i=n(102);n(231);t.a=Object(a.h)(({message:e,idPrefix:t="shared-media",onClick:n})=>{const o=Object(a.m)(()=>{n(e.id,e.chatId)},[e.id,e.chatId,n]),l=Object(c.E)(e),u=Object(s.a)(Object(c.D)(e,"pictogram")),{shouldRenderThumb:d,shouldRenderFullMedia:m,transitionClassNames:h}=Object(i.a)(u,"slow"),b=Object(c.O)(e);return a.a.createElement("div",{id:`${t}${e.id}`,className:"Media scroll-item",onClick:n?o:void 0},d&&a.a.createElement("img",{src:l,alt:""}),m&&a.a.createElement("img",{src:u,className:h+" full-media",alt:""}),b&&a.a.createElement("span",{className:"video-duration"},b.isGif?"GIF":Object(r.e)(b.duration)))})},,function(e,t,n){"use strict";var a=n(0),r=n(2),c=n(7),s=n(28),i=n(4);var o=n(8),l=n(35);var u=n(112),d=n(27),m=n(121),h=n(164),b=n(93),f=n(31),p=n(113),g=n(110);n(207);const O=c.f?20:25,v=c.f?50:75;function j(e,t,{handleStartSeek:n,handleSeek:r,handleStopSeek:c}){return a.a.createElement("div",{className:"seekline no-selection",onMouseDown:n,onMouseMove:r,onMouseUp:c},a.a.createElement("span",{className:"seekline-buffered-progress"},a.a.createElement("i",{style:`transform: translateX(${100*t}%)`})),a.a.createElement("span",{className:"seekline-play-progress"},a.a.createElement("i",{style:`transform: translateX(${100*e}%)`})),a.a.createElement("span",{className:"seekline-thumb"},a.a.createElement("i",{style:`transform: translateX(${100*e}%)`})))}t.a=Object(a.h)(Object(r.h)(e=>({theme:e.settings.byKey.theme}))(({theme:e,message:t,senderTitle:n,uploadProgress:r,renderingFor:E,date:y,lastSyncTime:N,className:C,isSelectable:T,isSelected:M,onPlay:w,onReadMedia:L,onCancelUpload:S,onDateClick:I})=>{const{content:{audio:k,voice:A},isMediaUnread:x}=t,D=Boolean(A),_=Object(a.q)(!1),[R,P]=Object(a.r)(!1),F=N,{mediaData:U,downloadProgress:B}=Object(u.a)(Object(i.D)(t,"inline"),!F,Object(i.C)(t,"inline"));const{isBuffered:q,bufferedProgress:H,bufferingHandlers:$,checkBuffering:K}=Object(m.a)(),{isPlaying:Y,playProgress:V,playPause:z,setCurrentTime:W,duration:G}=Object(h.a)(Object(i.A)(t),Object(i.r)(t),U,$,K,R,(function(){P(!0),w(t.id,t.chatId)}),Object(i.sb)(t));Object(a.n)(()=>{P(Y)},[Y]);const{isUploading:X,isTransferring:Q,transferProgress:J}=Object(i.s)(t,r||B,R&&!q),{shouldRender:Z,transitionClassNames:ee}=Object(d.a)(Q),te=Object(a.m)(()=>{X?S&&S():(Y||w(t.id,t.chatId),P(!R),z())},[Y,X,t.id,t.chatId,S,w,z,R]);Object(a.n)(()=>{Y&&L&&x&&L()},[Y,x,L]);const ne=Object(a.m)(e=>{if(_.current){const t=e.currentTarget.closest(".seekline,.waveform");if(t){const{width:n,left:a}=t.getBoundingClientRect();W(G*((e.clientX-a)/n))}}},[G,W]),ae=Object(a.m)(e=>{_.current=!0,ne(e)},[ne]),re=Object(a.m)(()=>{_.current=!1},[]),ce=Object(a.m)(()=>{I(t.id,t.chatId)},[I,t.id,t.chatId]);Object(b.a)();const se={handleStartSeek:ae,handleSeek:ne,handleStopSeek:re},ie=Object(i.tb)(t),oe=Object(a.p)(()=>A&&function(e,t=0,n=!1,{handleStartSeek:r,handleSeek:c,handleStopSeek:s},i){const{waveform:o,duration:l}=e;if(!o)return;const u="dark"===i?"#494B75":"#CBCBCB",d="dark"===i?"#C69C85":"#B0DEA6",m="dark"===i?"#868DF5":"#54a3e6",h="dark"===i?"#FFFFFF":"#53ad53",b=Math.min(l/30,1),f=Math.round(O+(v-O)*b),p=function(e){const t=8*e.length,n=Math.floor(t/5);if(!n)return[];const a=Array(n),r=e;for(let e=0,t=n-1;e!==t;++e){const t=Math.floor(5*e/8),n=Math.floor(5*e%8),c=r[t]+(r[t+1]<<8);a[e]=c>>n&31}const c=Math.floor(5*(n-1)/8),s=Math.floor(5*(n-1)%8),i=r[c]+(r[c+1]<<8);return a[n-1]=i>>s&31,a}(new Uint8Array(o)),{data:g,peak:j}=function(e,t){let n=0;const a=new Array(t),r=e.length/t,c=e[0],s=e[e.length-1];for(let u=0;u{i.globalAlpha=s/e.length>=t?.5:1,i.fillStyle=t>s/e.length?r:a;const o=Math.max(2,c/Math.max(1,n)*23);!function(e,t,n,a,r,c){a<2*c&&(c=a/2);r<2*c&&(c=r/2);e.beginPath(),e.moveTo(t+c,n),e.arcTo(t+a,n,t+a,n-r,c),e.arcTo(t+a,n-r,t,n-r,c),e.arcTo(t,n-r,t,n,c),e.arcTo(t,n,t+a,n,c),e.closePath()}(i,4*s,23,2,o,1),i.fill()}),{src:s.toDataURL(),width:c,height:23}}(g,t,{peak:j,fillStyle:n?d:u,progressFillStyle:n?h:m});return a.a.createElement("img",{src:E,alt:"",width:y,height:N,className:"waveform",draggable:!1,onMouseDown:r,onMouseMove:c,onMouseUp:s})}(A,V,ie,se,e),[A,V,ie,se,e]),le=Object(o.a)("Audio media-inner",C,ie&&!E&&"own",E&&"bigger",M&&"audio-is-selected"),ue=["toggle-play"];Z?ue.push("loading"):Y?ue.push("pause"):Y||ue.push("play");const de=Y||V>0&&V<1,me=Object(o.a)("content",de&&"with-seekline");return a.a.createElement("div",{className:le},T&&a.a.createElement("div",{className:"message-select-control"},M&&a.a.createElement("i",{className:"icon-select"})),a.a.createElement(f.a,{round:!0,ripple:!c.f,size:E?"smaller":"tiny",className:ue.join(" "),ariaLabel:Y?"Pause audio":"Play audio",onClick:te},a.a.createElement("i",{className:"icon-play"}),a.a.createElement("i",{className:"icon-pause"})),Z&&a.a.createElement("div",{className:Object(o.a)("media-loading",ee)},a.a.createElement(p.a,{progress:J,transparent:!0,size:E?"m":"s",onClick:te})),"searchResult"===E&&a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{className:me},a.a.createElement("div",{className:"content-row"},a.a.createElement("p",{className:"title"},Object(l.a)(function(){if(D)return n||"Voice";const{title:e,fileName:t}=k;return e||t}())),a.a.createElement("div",{className:"message-date"},y&&a.a.createElement(g.a,{className:"date",onClick:ce},Object(s.g)(1e3*y)))),de&&j(V,H,se),!de&&a.a.createElement("p",{className:"duration"},V>0?Object(s.e)(G*V)+" / ":void 0,function(){if(D)return Object(s.e)(A.duration);const{performer:e}=k;return a.a.createElement(a.a.Fragment,null,e&&Object(l.a)(e),e&&n&&a.a.createElement("span",null,"•"),n&&Object(l.a)(n))}()))),"searchResult"!==E&&k&&function(e,t,n,r,c,i,o){const{title:u,performer:d,duration:m,fileName:h}=e,b=t||n>0&&n<1;return a.a.createElement("div",{className:"content"},a.a.createElement("p",{className:"title"},Object(l.a)(u||h)),b&&j(n,r,c),!b&&a.a.createElement("div",{className:"meta"},a.a.createElement("span",{className:"performer"},Object(l.a)(d||"Unknown")),i&&a.a.createElement(a.a.Fragment,null," ","•"," ",a.a.createElement(g.a,{className:"date",onClick:o},Object(s.d)(1e3*i)))),a.a.createElement("p",{className:"duration"},n>0?Object(s.e)(m*n)+" / ":void 0,Object(s.e)(m)))}(k,Y,V,H,se,y,I?ce:void 0),"searchResult"!==E&&A&&function(e,t,n){return a.a.createElement("div",{className:"content"},t,a.a.createElement("p",{className:"voice-duration"},Object(s.e)(e.duration),n&&a.a.createElement("span",null,"•")))}(A,oe,x))}))},function(e,t,n){"use strict";var a=n(0),r=n(143),c=n(38),s=n(128),i=n(93),o=n(8);n(186);var l=Object(a.h)(({className:e,title:t,active:n,badgeCount:r,isBadgeActive:c,previousActiveTab:s,onClick:i,clickArg:l})=>{const u=Object(a.q)(null);return Object(a.o)(()=>{if(!n||void 0===s)return;const e=u.current,t=e.querySelector("i"),a=e.parentElement.children[s].querySelector("i");a.classList.remove("animate"),t.classList.remove("animate");const r=a.parentElement.offsetLeft-t.parentElement.offsetLeft,c=a.clientWidth/t.clientWidth;t.style.transform=`translate3d(${r}px, 0, 0) scale3d(${c}, 1, 1)`,requestAnimationFrame(()=>{requestAnimationFrame(()=>{requestAnimationFrame(()=>{t.classList.add("animate"),t.style.transform="none"})})})},[n,s]),a.a.createElement("button",{type:"button",className:Object(o.a)("Tab",e,n&&"active"),onClick:()=>i(l),ref:u},a.a.createElement("span",null,t,!!r&&a.a.createElement("span",{className:Object(o.a)("badge",c&&"active")},r),a.a.createElement("i",null)))});n(187);t.a=Object(a.h)(({tabs:e,activeTab:t,onSwitchTab:n})=>{const o=Object(a.q)(null),u=Object(c.a)(t);Object(s.a)(o),Object(a.n)(()=>{const e=o.current;if(e.scrollWidth<=e.offsetWidth)return;const t=e.querySelector(".Tab.active");if(t){const n=t.offsetLeft-e.offsetWidth/2+t.offsetWidth/2;if(Math.abs(n-e.scrollLeft)<16)return;Object(r.a)(e,n)}},[t]);const d=Object(i.a)();return a.a.createElement("div",{className:"TabList no-selection no-scrollbar",ref:o},e.map((e,r)=>a.a.createElement(l,{key:e.title,title:d(e.title),active:r===t,badgeCount:e.badgeCount,isBadgeActive:e.isBadgeActive,previousActiveTab:u,onClick:n,clickArg:r})))})},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));const a={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",SERVICE_WORKER_DISABLED:"Service Worker is disabled. Please reload the page without holding key.",CAPTION_TOO_LONG_PLEASE_REMOVE_CHARACTERS:"The provided caption 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"};function r(e){const{message:t,isSlowMode:n,textParams:r}=e;if(n){const e=t.indexOf(" (caused by");return e>0?t.substring(0,e):t}let c=a[t];return c&&r&&(c=Object.keys(r).reduce((e,t)=>e.replace(t,r[t]),c)),c}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"c",(function(){return s})),n.d(t,"b",(function(){return i}));var a=n(1);const r=navigator.clipboard&&window.ClipboardItem,c=document.createElement("textarea");c.setAttribute("readonly",""),c.tabIndex=-1,c.className="visually-hidden";const s=e=>{c.value=e,document.body.appendChild(c);const t=document.getSelection();if(t){const e=t.rangeCount>0&&t.getRangeAt(0);c.select(),document.execCommand("copy"),e&&(t.removeAllRanges(),t.addRange(e))}document.body.removeChild(c)},i=e=>{const t=document.createElement("canvas"),n=t.getContext("2d"),a=new Image;a.onload=e=>{if(n&&e.currentTarget){const a=e.currentTarget;t.width=a.width,t.height=a.height,n.drawImage(a,0,0,a.width,a.height),t.toBlob(o,"image/png",1)}},a.src=e};async function o(e){if(e&&r)try{await navigator.clipboard.write([new window.ClipboardItem({[e.type]:e})])}catch(e){a.m&&console.error(e)}}},function(e,t,n){"use strict";var a=n(0),r=n(2),c=n(4);t.a=({chat:e,privateChatUser:t,handleDelete:n,folderId:s,isPinned:i})=>{const{toggleChatPinned:o,updateChatMutedState:l,toggleChatArchived:u,toggleChatUnread:d}=Object(r.d)();return Object(a.p)(()=>{if(!e)return;const a=t&&t.isSelf,r=e.unreadCount||e.hasUnreadMark?{title:"Mark as Read",icon:"readchats",handler:()=>d({id:e.id})}:{title:"Mark as Unread",icon:"unread",handler:()=>d({id:e.id})},m=i?{title:"Unpin",icon:"unpin",handler:()=>o({id:e.id,folderId:s})}:{title:"Pin",icon:"pin",handler:()=>o({id:e.id,folderId:s})},h=e.isMuted?{title:"Unmute",icon:"unmute",handler:()=>l({chatId:e.id,isMuted:!1})}:{title:"Mute",icon:"mute",handler:()=>l({chatId:e.id,isMuted:!0})},b=Object(c.hb)(e)?{title:"Unarchive",icon:"unarchive",handler:()=>u({id:e.id})}:{title:"Archive",icon:"archive",handler:()=>u({id:e.id})};return[r,m,...a?[]:[h,b],{title:Object(c.lb)(e.id)?"Delete":Object(c.d)(e)?"Delete and Leave":"Leave",icon:"delete",destructive:!0,handler:n}]},[e,t,n,s,i,o,l,u,d])}},function(e,t,n){"use strict";var a=n(0),r=n(28),c=n(161);n(192);t.a=({message:e,outgoingStatus:t})=>a.a.createElement("div",{className:"LastMessageMeta"},t&&a.a.createElement(c.a,{status:t}),a.a.createElement("span",{className:"time"},Object(r.g)(1e3*e.date)))},function(e,t,n){"use strict";var a,r=n(0),c=n(100);n(191);!function(e){e[e.failed=0]="failed",e[e.pending=1]="pending",e[e.succeeded=2]="succeeded",e[e.read=3]="read"}(a||(a={}));t.a=({status:e})=>r.a.createElement("div",{className:"MessageOutgoingStatus"},r.a.createElement(c.a,{name:"reveal",activeKey:a[e]},()=>r.a.createElement("i",{className:"icon-message-"+e})))},function(e,t,n){"use strict";var a=n(0);t.a=(e,t,n,r,c=0,s=0)=>{const[i,o]=Object(a.r)("right"),[l,u]=Object(a.r)("bottom"),[d,m]=Object(a.r)("");return Object(a.n)(()=>{const a=t();if(!e||!a)return;let{x:i,y:l}=e;const d={width:0,left:0,height:0,top:0},h=r(),b=n(),f=a.getBoundingClientRect(),p=h?{width:h.offsetWidth,height:h.offsetHeight}:d,g=b?b.getBoundingClientRect():d;i+p.width+c0?(o("right"),i-=3):(o("left"),i=16),l+p.height{const{shouldRender:u,transitionClassNames:d}=Object(r.a)(e,void 0,void 0,!t&&void 0),m=Object(c.a)(e),h=Object(c.a)(l),b=Object(a.q)();return m&&!e&&(b.current=h),u&&a.a.createElement("div",{id:n,className:Object(s.a)(i,d),onClick:o},e?l():b.current())}},function(e,t,n){"use strict";var a=n(0),r=n(165),c=n(51),s=n(148),i=n(106);t.a=(e,t,n,o,l,u=!1,d,m=!1)=>{const h=Object(a.q)(null),[b,f]=Object(a.r)(!1);let p=b;const[g,O]=Object(a.r)(0);Object(i.a)(()=>{h.current=Object(r.a)(e,(e,n)=>{switch(e){case"onPlay":f(!0);break;case"onPause":f(!1);break;case"onTimeUpdate":{const{proxy:e}=h.current,n=e.duration&&Number.isFinite(e.duration)?e.duration:t;O(e.currentTime/n);break}}o&&o[e]&&o[e](n)},d);const{proxy:n}=h.current;b||n.paused||(f(!0),p=!0),l&&l(n)},[e]);const{play:v,pause:j,setCurrentTime:E,proxy:y,destroy:N}=h.current,C=y.duration&&Number.isFinite(y.duration)?y.duration:t;Object(a.n)(()=>{C&&!Object(s.a)(y)&&O(y.currentTime/C)},[C,g,y]),Object(a.n)(()=>()=>{N(m)},[N,m]),Object(c.a)(([e,t])=>{e===u&&n===t||y.src&&y.paused||u&&n&&!b&&v(n)},[u,n,b,v,y.src,y.paused]);const T=Object(a.m)(()=>{b?j():n&&v(n)},[n,j,v,b]);return{isPlaying:p,playProgress:g,playPause:T,setCurrentTime:E,audioProxy:y,duration:C}}},function(e,t,n){"use strict";n.d(t,"b",(function(){return d})),n.d(t,"a",(function(){return m}));var a=n(7),r=n(133),c=n(148),s=n(2),i=n(4);const o=new Map;let l,u=[];function d(){const e=l&&o.get(l);e&&e.audio.pause()}function m(e,t,n){o.has(e)||(o.set(e,function(e,t){const n=new Audio;function a(t){return a=>{o.has(e)&&(Object(c.a)(n)||o.get(e).handlers.forEach(e=>{e(t,a)}))}}return n.addEventListener("timeupdate",a("onTimeUpdate")),n.addEventListener("play",a("onPlay")),n.addEventListener("pause",a("onPause")),n.addEventListener("loadstart",a("onLoadStart")),n.addEventListener("loadeddata",a("onLoadedData")),n.addEventListener("playing",a("onPlaying")),n.addEventListener("ended",()=>{if(Object(c.a)(n))return;const t=u[u.indexOf(e)+1];if(!t)return;if(!o.has(t))return void Object(s.d)().openAudioPlayer(Object(i.zb)(t));const a=o.get(t);a.onForcePlay&&a.onForcePlay(),l=t,a.audio.src&&Object(r.a)(a.audio)}),{audio:n,proxy:new Proxy(n,{get:(e,t)=>e[t]}),handlers:[],onForcePlay:t}}(e,n)),u.includes(e)||u.push(e));const{audio:d,proxy:m,handlers:h}=o.get(e);return h.push(t),{play(t){l&&l!==e&&o.get(l).audio.pause(),l=e,d.src||(d.src=t,d.preload="auto",t.includes("/progressive/")&&a.i&&Object(c.b)(d)),Object(r.a)(d)},pause(){l===e&&d.pause()},setCurrentTime(t){l===e&&(d.currentTime=t)},proxy:m,destroy(n=!1){const a=o.get(e);a&&(a.handlers=a.handlers.filter(e=>e!==t),a.handlers.length||(a.audio.pause(),o.delete(e),n&&(u=u.filter(t=>t!==e)),e===l&&(l=void 0)))}}}},function(e,t,n){"use strict";function a(e,t){const n=document.createElement("a");n.href=e,n.download=t,n.click()}n.d(t,"a",(function(){return a}))},function(e,t,n){"use strict";var a=n(0),r=n(27),c=n(102),s=n(8),i=n(28),o=n(53),l=n(103),u=n(35),d=n(113),m=n(110);n(206);t.a=Object(a.h)(({ref:e,name:t,size:n,extension:h="",timestamp:b,sender:f,thumbnailDataUri:p,previewData:g,className:O,smaller:v,isTransferring:j,isUploading:E,isSelectable:y,isSelected:N,transferProgress:C,onClick:T,onDateClick:M})=>{let w=Object(a.q)(null);e&&(w=e);const{shouldRender:L,transitionClassNames:S}=Object(r.a)(j,void 0,!0),I=Object(o.a)(h),k=Object(o.e)(n),{shouldRenderThumb:A,shouldRenderFullMedia:x,transitionClassNames:D}=Object(c.a)(g,"slow"),{width:_,height:R}=Object(l.i)(v),P=Object(s.a)("File",O,v&&"smaller",T&&!E&&"interactive",N&&"file-is-selected");return a.a.createElement("div",{ref:w,className:P},y&&a.a.createElement("div",{className:"message-select-control"},N&&a.a.createElement("i",{className:"icon-select"})),a.a.createElement("div",{className:"file-icon-container",onClick:E?void 0:T},p||g?a.a.createElement("div",{className:"file-preview media-inner"},A&&a.a.createElement("img",{src:p,width:_,height:R,className:"thumbnail",alt:""}),x&&a.a.createElement("img",{src:g,className:"full-media "+D,width:_,height:R,alt:""})):a.a.createElement("div",{className:"file-icon "+I},h.length<=4&&a.a.createElement("span",{className:"file-ext"},h)),L&&a.a.createElement("div",{className:Object(s.a)("file-progress",I,S)},a.a.createElement(d.a,{progress:C,size:v?"s":"m",onClick:E?T:void 0})),T&&a.a.createElement("i",{className:Object(s.a)("icon-download",L&&"hidden")})),a.a.createElement("div",{className:"file-info"},a.a.createElement("div",{className:"file-title"},Object(u.a)(t)),a.a.createElement("div",{className:"file-subtitle"},a.a.createElement("span",null,j&&C?Math.round(100*C)+"%":k),f&&a.a.createElement("span",{className:"file-sender"},Object(u.a)(f)),!f&&b&&a.a.createElement(a.a.Fragment,null," ",a.a.createElement(m.a,{onClick:M},Object(i.d)(1e3*b))))),f&&b&&a.a.createElement(m.a,{onClick:M},Object(i.g)(1e3*b)))})},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));const a=[1,57,41,21,203,34,97,73,227,91,149,62,105,45,39,137,241,107,3,173,39,71,65,238,219,101,187,87,81,151,141,133,249,117,221,209,197,187,177,169,5,153,73,139,133,127,243,233,223,107,103,99,191,23,177,171,165,159,77,149,9,139,135,131,253,245,119,231,224,109,211,103,25,195,189,23,45,175,171,83,81,79,155,151,147,9,141,137,67,131,129,251,123,30,235,115,113,221,217,53,13,51,50,49,193,189,185,91,179,175,43,169,83,163,5,79,155,19,75,147,145,143,35,69,17,67,33,65,255,251,247,243,239,59,29,229,113,111,219,27,213,105,207,51,201,199,49,193,191,47,93,183,181,179,11,87,43,85,167,165,163,161,159,157,155,77,19,75,37,73,145,143,141,35,138,137,135,67,33,131,129,255,63,250,247,61,121,239,237,117,29,229,227,225,111,55,109,216,213,211,209,207,205,203,201,199,197,195,193,48,190,47,93,185,183,181,179,178,176,175,173,171,85,21,167,165,41,163,161,5,79,157,78,154,153,19,75,149,74,147,73,144,143,71,141,140,139,137,17,135,134,133,66,131,65,129,1],r=[0,9,10,10,14,12,14,14,16,15,16,15,16,15,15,17,18,17,12,18,16,17,17,19,19,18,19,18,18,19,19,19,20,19,20,20,20,20,20,20,15,20,19,20,20,20,21,21,21,20,20,20,21,18,21,21,21,21,20,21,17,21,21,21,22,22,21,22,22,21,22,21,19,22,22,19,20,22,22,21,21,21,22,22,22,18,22,22,21,22,22,23,22,20,23,22,22,23,23,21,19,21,21,21,23,23,23,22,23,23,21,23,22,23,18,22,23,20,22,23,23,23,21,22,20,22,21,22,24,24,24,24,24,22,21,24,23,23,24,21,24,23,24,22,24,24,22,24,24,22,23,24,24,24,20,23,22,23,24,24,24,24,24,24,24,23,21,23,22,23,24,24,24,22,24,24,24,23,22,24,24,25,23,25,25,23,24,25,25,24,22,25,25,25,24,23,24,25,25,25,25,25,25,25,25,25,25,25,25,23,25,23,24,25,25,25,25,25,25,25,25,25,24,22,25,25,23,25,25,20,24,25,24,25,25,22,24,25,24,25,24,25,25,24,25,25,25,25,22,25,25,25,24,25,24,25,18];function c(e,t,n,c,s,i,o){if(Number.isNaN(i)||i<1)return;i|=0,Number.isNaN(o)&&(o=1),(o|=0)>3&&(o=3),o<1&&(o=1);const l=e.getImageData(t,n,c,s),u=l.data;let d,m,h,b,f,p,g,O,v,j,E,y,N=c-1,C=s-1,T=i+1,M=[],w=[],L=[],S=a[i],I=r[i],k=[],A=[];for(;o-- >0;){for(y=E=0,f=0;fN?N:p)<<2),d+=u[g++],m+=u[g++],h+=u[g++];for(b=0;b0?g<<2:0),O=y+k[b],v=y+A[b],d+=u[O++]-u[v++],m+=u[O++]-u[v++],h+=u[O++]-u[v++],E++;y+=c<<2}for(b=0;bC?0:c,d+=M[j],m+=w[j],h+=L[j];for(E=b<<2,f=0;f>>I,u[E+1]=m*S>>>I,u[E+2]=h*S>>>I,0==b&&(k[f]=((g=f+T)0?g*c:0),O=b+k[f],v=b+A[f],d+=M[O]-M[v],m+=w[O]-w[v],h+=L[O]-L[v],E+=c<<2}}e.putImageData(l,t,n)}},function(e,t,n){"use strict";var a=n(0),r=n(1),c=n(27),s=n(8),i=n(42),o=n(114);n(213);t.a=Object(a.h)(({message:e,duration:t=3e3,onDismiss:n})=>{const[l,u]=Object(a.r)(!0),d=Object(a.q)(null),{transitionClassNames:m}=Object(c.a)(l),h=Object(a.m)(()=>{u(!1),setTimeout(n,150+r.c)},[n]);Object(a.n)(()=>l?Object(i.a)(h):void 0,[l,h]),Object(a.n)(()=>(d.current=window.setTimeout(h,t),()=>{d.current&&(clearTimeout(d.current),d.current=void 0)}),[t,h]);const b=Object(a.m)(()=>{d.current&&(clearTimeout(d.current),d.current=void 0)},[]),f=Object(a.m)(()=>{d.current=window.setTimeout(h,t)},[t,h]);return a.a.createElement(o.a,{className:"Notification-container",containerId:"#middle-column-portals"},a.a.createElement("div",{className:Object(s.a)("Notification",m),onClick:h,onMouseEnter:b,onMouseLeave:f},a.a.createElement("div",{className:"content"},e)))})},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var a=n(1);function r(e){const{commonAncestorContainer:t}=e;let n=t,r=1;for(;n&&n.id!==a.r&&r<5;)n=n.parentElement,r++;return Boolean(n&&n.id===a.r)}},function(e,t,n){"use strict";var a=n(0),r=n(2),c=n(1),s=n(6),i=n(9),o=n(122),l=n(8),u=n(3),d=n(7),m=n(50),h=n(149),b=n(36),f=n(58),p=n(170),g=n(152);const O=d.f?256:416;t.a=Object(a.h)(Object(r.h)(e=>{const{chatId:t,threadId:n}=Object(s.x)(e)||{},{messageSendKeyCombo:a}=e.settings.byKey;return{currentChatId:t,messageSendKeyCombo:a,replyingToId:t&&n?Object(s.hb)(e,t,n):void 0,noTabCapture:e.isPollModalOpen||e.payment.isPaymentModalOpen}},(e,t)=>Object(u.l)(t,["editLastMessage"]))(({id:e,editableInputId:t,html:n,placeholder:r,shouldSetFocus:s,shouldSupressFocus:u,onUpdate:v,onSupressedFocus:j,onSend:E,currentChatId:y,replyingToId:N,noTabCapture:C,messageSendKeyCombo:T,editLastMessage:M})=>{const w=Object(a.q)(null),L=Object(a.q)(null),S=Object(a.q)(!1),[I,k,A]=Object(b.a)(),[x,D]=Object(a.r)(),[_,R]=Object(a.r)();Object(h.a)(([e])=>{n!==w.current.innerHTML&&(w.current.innerHTML=n),n!==L.current.innerHTML&&(L.current.innerHTML=n),void 0!==e&&e!==n&&function(){const e=w.current,t=L.current;e.style.height=Math.min(t.scrollHeight,O)+"px",e.classList.toggle("overflown",t.scrollHeight>O),document.body.classList.toggle("hide-mask-shadow",t.scrollHeight>100)}()},[n]);const P=Object(a.m)(()=>{w.current.closest(".from, .to")?setTimeout(P,350):Object(o.a)(w.current)},[]);function F(){if(d.d)return;const e=window.getSelection();if(!e||!e.rangeCount||S.current)return void A();const t=e.getRangeAt(0),n=t.toString().trim();if(!Object(p.a)(t)||!n||Object(f.a)(n)||!t.START_TO_END)return void A();const a=t.getBoundingClientRect(),r=w.current.getBoundingClientRect();let c=a.left+a.width/2-r.left;c<90?c=90:c>r.width-90&&(c=r.width-90),D({x:c,y:a.top-r.top}),R(t),k()}Object(a.n)(()=>{d.k||P()},[y,P,N,s]),Object(a.n)(()=>{if(C)return;const e=Object(i.a)(e=>{"Tab"===e.key&&(e.preventDefault(),requestAnimationFrame(P))},2e3,!0,!1);return Object(m.a)({onTab:e})},[P,C]),Object(a.n)(()=>{const e=w.current;function t(){e.blur()}return u&&e.addEventListener("focus",t),()=>{e.removeEventListener("focus",t)}},[u]);const U=Object(l.a)("form-control custom-scroll",n.length>0&&"touched",u&&"focus-disabled");return a.a.createElement("div",{id:e,onClick:u?j:void 0},a.a.createElement("div",{ref:w,id:t||c.r,className:U,contentEditable:!0,onClick:P,onChange:function(e){const{innerHTML:t,textContent:n}=e.currentTarget;if(v("
"===t?"":t),!(d.k||n&&n.length)){const e=window.getSelection();e&&(w.current.blur(),e.removeAllRanges(),Object(o.a)(w.current,!0))}},onKeyDown:function(e){"Enter"!==e.key||e.shiftKey?"ArrowUp"!==e.key||n.length?e.target.addEventListener("keyup",(function t(){F(),e.target.removeEventListener("keyup",t)})):(e.preventDefault(),M()):d.d||d.b||!("enter"===T&&!e.shiftKey||"ctrl-enter"===T&&(e.ctrlKey||e.metaKey))||(e.preventDefault(),A(),E())},onMouseDown:function(e){2===e.button?!0!==S.current&&(S.current=!0,document.addEventListener("mousedown",(function e(){setTimeout(()=>{S.current=!1},100),window.removeEventListener("mouseup",e)})),document.addEventListener("keydown",(function e(t){"Esc"!==t.key&&"Escape"!==t.key||(setTimeout(()=>{S.current=!1},100),window.removeEventListener("keydown",e))}))):e.target.addEventListener("mouseup",(function t(){F(),e.target.removeEventListener("mouseup",t)}))},onContextMenu:function(e){d.b&&(e.preventDefault(),e.stopPropagation())},onTouchCancel:function(){d.b&&F()}}),a.a.createElement("div",{ref:L,className:Object(l.a)(U,"clone")}),a.a.createElement("span",{className:"placeholder-text"},r),a.a.createElement(g.a,{isOpen:I,anchorPosition:x,selectedRange:_,onClose:A}))}))},function(e,t,n){"use strict";var a=n(0),r=n(4),c=n(8),s=n(145),i=n(35),o=n(28),l=n(153),u=n(110);n(232);t.a=Object(a.h)(({message:e,senderTitle:t,onMessageClick:n})=>{let d=Object(r.P)(e);if(!d){const t=Object(r.n)(e);if(t){const{url:n,domain:a}=t,c=Object(r.M)(e);d={siteName:a.replace(/^www./,""),url:n.includes("://")?n:n.includes("@")?"mailto:"+n:"http://"+n,description:c!==n?c:void 0}}}const m=Object(a.m)(()=>{n(e.id,e.chatId)},[n,e.id,e.chatId]);if(!d)return;const{siteName:h,url:b,displayUrl:f,title:p,description:g,photo:O}=d,v=!t&&Object(s.a)(g,170),j=Object(c.a)("WebLink scroll-item",!O&&"without-photo");return a.a.createElement("div",{className:j,"data-initial":(h||f)[0]},O&&a.a.createElement(l.a,{message:e}),a.a.createElement("div",{className:"content"},a.a.createElement(u.a,{className:"site-title",onClick:m},Object(i.a)(p||h||f)),v&&a.a.createElement(u.a,{className:"site-description",onClick:m},Object(i.a)(v)),a.a.createElement("a",{href:b,target:"_blank",rel:"noopener noreferrer",className:"site-name"},b.replace("mailto:","")||f),t&&a.a.createElement("div",{className:"sender-name"},Object(i.a)(t))),t&&a.a.createElement("div",{className:"message-date"},a.a.createElement(u.a,{className:"date",onClick:m},Object(o.g)(1e3*e.date))))})},,,,function(e,t,n){"use strict";var a=n(0),r=n(2),c=n(5),s=n(1),i=n(7),o=n(38),l=n(3),u=n(4),d=n(6),m=n(118);let h;!function(e){e[e.Move=0]="Move",e[e.Opacity=1]="Opacity",e[e.None=2]="None"}(h||(h={}));var b=n(101),f=n(16),p=n(93),g=n(177),O=n(35),v=n(9),j=n(8),E=n(129),y=n(159),N=n(36),C=n(97),T=n(99),M=n(130),w=n(146),L=n(160),S=n(147),I=n(94),k=n(45),A=n(163);n(195);var x=({chat:e,isPinned:t})=>{const n=Boolean(e.unreadCount||e.hasUnreadMark||t),r=Object(j.a)("Badge",e.isMuted&&"muted",t&&"pinned",Boolean(e.unreadCount||e.hasUnreadMark)&&"unread");function c(){return e.unreadCount?e.unreadMentionsCount?a.a.createElement("div",{className:"Badge-wrapper"},a.a.createElement("div",{className:"Badge mention"},a.a.createElement("i",{className:"icon-mention"})),a.a.createElement("div",{className:r},Object(k.b)(e.unreadCount))):a.a.createElement("div",{className:r},Object(k.b)(e.unreadCount)):e.hasUnreadMark?a.a.createElement("div",{className:r}):t?a.a.createElement("div",{className:r},a.a.createElement("i",{className:"icon-pinned-chat"})):void 0}return a.a.createElement(A.a,{isCustom:!0,className:"Badge-transition",isOpen:n},c)};n(196);var D,_=Object(a.h)(Object(r.h)((e,{chatId:t})=>{const n=Object(d.f)(e,t);if(!n||!n.lastMessage)return{};const{senderId:a,replyToMessageId:r,isOutgoing:s}=n.lastMessage,i=a?Object(d.Bb)(e,a):void 0,o=Object(u.t)(n.lastMessage),l=o&&r?Object(d.k)(e,n.id,r):void 0,{targetUserId:m,targetChatId:h}=o||{},b=Object(u.T)(n),{type:f}=Object(d.x)(e)||{};return{chat:n,lastMessageSender:i,...s&&{lastMessageOutgoingStatus:Object(d.ab)(e,n.lastMessage)},...b&&{privateChatUser:Object(d.Bb)(e,b)},...m&&{actionTargetUser:Object(d.Bb)(e,m)},actionTargetChatId:h,actionTargetMessage:l,draft:Object(d.A)(e,t,c.MAIN_THREAD_ID),messageListType:f,animationLevel:e.settings.byKey.animationLevel,lastSyncTime:e.lastSyncTime}},(e,t)=>Object(l.l)(t,["openChat","focusLastMessage"]))(({style:e,chatId:t,folderId:n,orderDiff:r,animationType:c,isSelected:o,isPinned:l,chat:d,privateChatUser:m,actionTargetUser:b,lastMessageSender:f,lastMessageOutgoingStatus:k,actionTargetMessage:A,actionTargetChatId:D,draft:_,messageListType:R,animationLevel:P,lastSyncTime:F,openChat:U,focusLastMessage:B})=>{const q=Object(a.q)(null),[H,$,K]=Object(N.a)(),{lastMessage:Y,typingStatus:V}=d||{},z=Y&&Object(u.db)(Y);Object(E.a)(t,z?Y.replyToMessageId:void 0,A);const W=Y&&!Object(u.L)(Y)?Object(u.E)(Y):void 0,G=Object(C.a)(Y?Object(u.D)(Y,"micro"):void 0);Object(a.o)(()=>{if(0===P)return;const e=q.current;if(c===h.Opacity)e.style.opacity="0",Object(v.b)(()=>{e.classList.add("animate-opacity"),e.style.opacity="1"});else{if(c!==h.Move)return;e.style.transform=`translate3d(0, ${100*-r}%, 0)`,Object(v.b)(()=>{e.classList.add("animate-transform"),e.style.transform=""})}setTimeout(()=>{Object(v.b)(()=>{e.classList.remove("animate-opacity","animate-transform"),e.style.opacity="",e.style.transform=""})},200+s.c)},[P,r,c]);const X=Object(a.m)(()=>{U({id:t}),o&&"thread"===R&&B()},[o,R,U,t,B]),Q=Object(y.a)({chat:d,privateChatUser:m,handleDelete:$,folderId:n,isPinned:l}),J=Object(p.a)();if(!d)return;const Z=Object(j.a)("Chat chat-item-clickable",Object(u.lb)(t)?"private":"group",o&&"selected");return a.a.createElement(I.a,{ref:q,className:Z,style:e,ripple:!i.f,contextActions:Q,onClick:X},a.a.createElement(T.a,{chat:d,user:m,withOnlineStatus:!0,isSavedMessages:m&&m.isSelf,lastSyncTime:F}),a.a.createElement("div",{className:"info"},a.a.createElement("div",{className:"title"},a.a.createElement("h3",null,Object(O.a)(Object(u.l)(d,m))),d.isVerified&&a.a.createElement(M.a,null),d.isMuted&&a.a.createElement("i",{className:"icon-muted-chat"}),d.lastMessage&&a.a.createElement(L.a,{message:d.lastMessage,outgoingStatus:k})),a.a.createElement("div",{className:"subtitle"},function(){if(V&&Y&&V.timestamp>1e3*Y.date)return a.a.createElement(w.a,{typingStatus:V});if(_&&_.text.length)return a.a.createElement("p",{className:"last-message"},a.a.createElement("span",{className:"draft"},J("Draft")),Object(O.a)(_.text));if(!Y)return;if(z){const e=d&&(Object(u.jb)(d)||Y.senderId===Y.chatId)?d:f;return a.a.createElement("p",{className:"last-message"},Object(O.a)(Object(g.a)(Y,e,b,A,D,{asPlain:!0})))}const e=Object(u.I)(t,f);return a.a.createElement("p",{className:"last-message"},e&&a.a.createElement("span",{className:"sender-name"},Object(O.a)(e)),function(e,t){if(!t)return Object(O.a)(Object(u.M)(e));return a.a.createElement("span",{className:"media-preview"},a.a.createElement("img",{src:t,alt:""}),Object(u.O)(e)&&a.a.createElement("i",{className:"icon-play"}),Object(O.a)(Object(u.M)(e,!0)))}(Y,G||W))}(),a.a.createElement(x,{chat:d,isPinned:l}))),a.a.createElement(S.a,{isOpen:H,onClose:K,chat:d}))}));!function(e){e.all="active",e.archived="archived"}(D||(D={}));t.a=Object(a.h)(Object(r.h)((e,{folderType:t,folderId:n})=>{const{chats:{listIds:a,byId:r,orderedPinnedIds:s},users:{byId:i},lastSyncTime:o}=e,{chatId:l,threadId:u}=Object(d.x)(e)||{},m="folder"!==t?D[t]:void 0,h=n?Object(d.i)(e,n):void 0;return{chatsById:r,usersById:i,currentChatId:l,lastSyncTime:o,...m?{listIds:a[m],orderedPinnedIds:s[m]}:{chatFolder:h},isInDiscussionThread:u!==c.MAIN_THREAD_ID}},(e,t)=>Object(l.l)(t,["loadMoreChats","preloadTopChatMessages"]))(({folderType:e,folderId:t,noChatsText:n="Chat list is empty.",chatFolder:r,chatsById:c,usersById:d,listIds:p,currentChatId:g,orderedPinnedIds:O,lastSyncTime:v,isInDiscussionThread:j,loadMoreChats:E,preloadTopChatMessages:y})=>{const[N,C]=Object(a.p)(()=>"folder"===e&&r?Object(u.Bb)(c,d,r):[p,O],[e,c,d,r,p,O]),[T,M]=Object(a.p)(()=>{if(!N||"folder"===e&&!r)return[];const t=Object(u.Ab)(c,N,C,e),n=[...t.pinnedChats,...t.otherChats],a=n.map(({id:e})=>e);return[n.reduce((e,t,n)=>(e[t.id]=n,e),{}),a]},[N,C,e,r,c]),w=Object(o.a)(T),L=T&&w?Object(l.i)(T,(e,t)=>e-(void 0!==w[t]?w[t]:1/0)):{},S=Object(a.m)(()=>{E({listType:"archived"===e?"archived":"active"})},[E,e]),[I,k]=Object(m.a)(v?S:void 0,M,void 0,s.j,"all"===e&&!s.a),A=I&&Object(u.Ab)(c,I,C,e);Object(a.n)(()=>{v&&"all"===e&&y()},[v,e,y]);const x=function(e){const t=Object(a.m)(t=>e[t]<0,[e]),n=Object(a.m)(t=>e[t]>0,[e]),r=Object.keys(e).map(Number),c=r.filter(t).length,s=r.filter(n).length;return Object(a.m)(a=>{const r=e[a];return 0===r?h.None:r===1/0||r===-1/0||t(a)&&c<=s||n(a)&&sa.a.createElement(_,{key:n,teactOrderKey:r,chatId:n,isPinned:!0,folderId:t,isSelected:n===g&&!j,animationType:x(n),orderDiff:L[n],style:`top: ${(e+r)*s.h}px;`})),A.otherChats.map((e,r)=>a.a.createElement(_,{key:e.id,teactOrderKey:Object(u.j)(e),chatId:e.id,folderId:t,isSelected:e.id===g&&!j,animationType:x(e.id),orderDiff:L[e.id],style:`top: ${(n+r)*s.h}px;`})))}():I&&!I.length?a.a.createElement("div",{className:"no-results"},n):a.a.createElement(f.a,{key:"loading"}))}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return b}));var a=n(0),r=n(4),c=n(145),s=n(35),i=n(2),o=n(3),l=n(8),u=n(110);var d=Object(i.h)(void 0,(e,t)=>Object(o.l)(t,["openUserInfo"]))(({className:e,sender:t,openUserInfo:n,children:r})=>{const c=Object(a.m)(()=>{t&&n({id:t.id})},[t,n]);return t?a.a.createElement(u.a,{className:Object(l.a)("UserLink",e),onClick:c},r):r});var m=Object(i.h)(void 0,(e,t)=>Object(o.l)(t,["focusMessage"]))(({className:e,message:t,children:n,focusMessage:r})=>{const c=Object(a.m)(()=>{t&&r({chatId:t.chatId,messageId:t.id})},[r,t]);return t?a.a.createElement(u.a,{className:Object(l.a)("MessageLink",e),onClick:c},n):n});var h=Object(i.h)(void 0,(e,t)=>Object(o.l)(t,["openChat"]))(({className:e,chatId:t,openChat:n,children:r})=>{const c=Object(a.m)(()=>{t&&n({id:t})},[t,n]);return t?a.a.createElement(u.a,{className:Object(l.a)("ChatLink",e),onClick:c},r):r});function b(e,t,n,i,o,l={}){if(!e.content.action)return[];const{text:u}=e.content.action,d=[],b={...l,maxTextLength:16};let g,O=p(u,"%action_origin%",t?!l.isEmbedded&&(v=t,j=l.asPlain,Object(r.fb)(v)?function(e,t){const n=Object(c.a)(Object(r.l)(e));return t?n:a.a.createElement(h,{className:"action-link",chatId:e.id},e&&Object(s.a)(n))}(v,j):f(v,j))||" ":"User");var v,j;return g=O.pop(),d.push(...O),O=p(g,"%target_user%",n?f(n,l.asPlain):"User"),g=O.pop(),d.push(...O),O=p(g,"%message%",i?function(e,t={}){const n=Object(r.M)(e),{photo:i,video:o,document:l,sticker:u}=Object(r.v)(e),d=n&&!i&&!o&&!l&&!u;let h=Object(c.a)(n,t.maxTextLength);i?h="a photo":o?h=o.isGif?"a GIF":"a video":l?h="a document":u&&(h=`«${n}»`);if(t.asPlain)return d?`«${h}»`:h;if(d)return a.a.createElement("span",null,"«",a.a.createElement(m,{className:"action-link",message:e},Object(s.a)(h)),"»");return a.a.createElement(m,{className:"action-link",message:e},Object(s.a)(h))}(i,b):"a message"),g=O.pop(),d.push(...O),O=p(g,"%product%",i?function(e){return e.content&&e.content.invoice?e.content.invoice.title:"a product"}(i):"a product"),g=O.pop(),d.push(...O),O=p(g,"%target_chat%",o?function(e,t){if(t)return"another chat";return a.a.createElement(h,{className:"action-link",chatId:e},"another chat")}(o,l.asPlain):"another chat"),d.push(...O),l.asPlain?d.join("").trim():d}function f(e,t){const n=Object(c.a)(Object(r.Z)(e));return t?n:a.a.createElement(d,{className:"action-link",sender:e},e&&Object(s.a)(n))}function p(e,t,n){const a=e.indexOf(t);if(a<0||!n)return[e];const r=[];return r.push(e.substring(0,a)),r.push(n),r.push(e.substring(a+t.length)),r}},function(e,t,n){"use strict";n.d(t,"a",(function(){return m}));var a=n(0),r=n(5),c=n(1),s=n(4),i=n(46);var o=n(7),l=n(122),u=n(36);const d=/[^@_\d\wа-яё]+/i;function m(e,t,n,m=c.r,h,b,f){const[p,g,O]=Object(u.a)(),[v,j]=Object(a.r)(""),[E,y]=Object(a.r)([]),N=Object(a.m)(e=>{if(h&&f)return h.filter(({userId:t})=>{const n=f[t];return!(t===b||!n)&&(!e||function(e,t){const n=t.username.toLowerCase(),a=Object(s.Z)(t),r=a&&a.toLowerCase(),c=e.toLowerCase();return n.startsWith(c)||r&&Object(i.a)(r,c)}(e,n))})},[h,b,f]);Object(a.n)(()=>{if(!e||!t.length)return void O();const n=function(e){const t=document.createElement("div");t.innerHTML=e;const n=t.innerText,a=n[n.length-1],r=n.split(d).pop();if(!n.length||d.test(a)||!r||!r.startsWith("@"))return;return r}(t);if(n){const e=n?n.substr(1):"",t=N(e);t&&t.length?(g(),j(e),y(t)):O()}else O()},[e,t,N,g,O]);const C=Object(a.m)((e,a=!1)=>{if(!e.username&&!Object(s.Y)(e))return;const c=e.username?"@"+e.username:`${Object(s.Y)(e)}`,i=t.lastIndexOf("@");if(-1!==i){n(`${t.substr(0,i)}${c} `);const e=document.getElementById(m);o.f||requestAnimationFrame(()=>{Object(l.a)(e,a)})}O()},[t,m,n,O]);return{isMentionMenuOpen:p,mentionFilter:v,closeMentionMenu:O,insertMention:C,mentionFilteredMembers:E}}},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},,,,function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},,,,function(e,t,n){},function(e,t,n){},,,,function(e,t,n){},function(e,t,n){},function(e,t,n){},,,function(e,t,n){},,function(e,t,n){},function(e,t,n){},,,,,,,,,,,,function(e,t,n){},,,,,,function(e,t,n){},function(e,t,n){},function(e,t,n){}])]); \ No newline at end of file diff --git a/dist/ed8b07679ddce89ad685.worker.js b/dist/1f83b903bad979f40004.worker.js similarity index 100% rename from dist/ed8b07679ddce89ad685.worker.js rename to dist/1f83b903bad979f40004.worker.js diff --git a/dist/2.00e0eb3cc52d7edf93ee.css b/dist/2.487a7f249be37000c313.css similarity index 100% rename from dist/2.00e0eb3cc52d7edf93ee.css rename to dist/2.487a7f249be37000c313.css diff --git a/dist/2.00e0eb3cc52d7edf93ee.js b/dist/2.487a7f249be37000c313.js similarity index 99% rename from dist/2.00e0eb3cc52d7edf93ee.js rename to dist/2.487a7f249be37000c313.js index 3db56d1b..1a049a7c 100644 --- a/dist/2.00e0eb3cc52d7edf93ee.js +++ b/dist/2.487a7f249be37000c313.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[2],Array(90).concat([function(e,t,a){"use strict";a.r(t),a.d(t,"MediaViewer",(function(){return he})),a.d(t,"ForwardPicker",(function(){return ye})),a.d(t,"Errors",(function(){return Se})),a.d(t,"Notifications",(function(){return we})),a.d(t,"CalendarModal",(function(){return Le})),a.d(t,"DeleteMessageModal",(function(){return Ae})),a.d(t,"PinMessageModal",(function(){return Te})),a.d(t,"UnpinAllMessagesModal",(function(){return Be})),a.d(t,"MessageSelectToolbar",(function(){return Ue})),a.d(t,"LeftSearch",(function(){return kt})),a.d(t,"Settings",(function(){return rn})),a.d(t,"ContactList",(function(){return ln})),a.d(t,"NewChat",(function(){return hn})),a.d(t,"NewChatStep1",(function(){return mn})),a.d(t,"NewChatStep2",(function(){return dn})),a.d(t,"ArchivedChats",(function(){return pn})),a.d(t,"ContextMenuContainer",(function(){return In})),a.d(t,"StickerSetModal",(function(){return wn})),a.d(t,"HeaderMenuContainer",(function(){return Mn})),a.d(t,"MobileSearch",(function(){return An})),a.d(t,"AttachmentModal",(function(){return qn})),a.d(t,"PollModal",(function(){return Hn})),a.d(t,"SymbolMenu",(function(){return pc})),a.d(t,"AttachMenu",(function(){return gc})),a.d(t,"MentionMenu",(function(){return zn})),a.d(t,"EmojiTooltip",(function(){return Ec})),a.d(t,"BotKeyboardMenu",(function(){return vc})),a.d(t,"CustomSendMenu",(function(){return Oc})),a.d(t,"DropArea",(function(){return fc.b})),a.d(t,"TextFormatter",(function(){return jc.a})),a.d(t,"RightSearch",(function(){return yc})),a.d(t,"StickerSearch",(function(){return Sc})),a.d(t,"GifSearch",(function(){return Ic})),a.d(t,"Statistics",(function(){return Lc})),a.d(t,"PollResults",(function(){return Tc})),a.d(t,"Management",(function(){return Zc})),a.d(t,"PaymentModal",(function(){return fr})),a.d(t,"ReceiptModal",(function(){return yr}));var n=a(0),c=a(2),r=a(5),s=a(18),l=a(1),o=a(7),i=a(103),m=a(6),d=a(4),u=a(3),h=a(127),b=a(42),p=a(165),g=a(29),E=a(97),v=a(112),O=a(168),f=a(106),j=a(135),C=a(14);var y=a(38),k=a(43),N=a(134),S=a(49);function I(e,t,a,n){const{mediaEl:c}=L(t,n);if(!c)return;const{width:r}=S.a.get();let o,m=!1;if(n){const{photo:e,video:t,webPage:a}=Object(d.v)(n);m=Boolean(t),o=t?Object(d.bb)(t):Object(d.R)(e||a.photo)}else o=i.a;const{width:u,height:h}=Object(i.j)(e,m),{width:b,height:p}=Object(i.e)(u,h,o.width,o.height),g=(r-b)/2,E=function(e){const t=window.matchMedia(i.b);let a=4.125;e&&(a+=t.matches?.875:3.375);return a*i.c}(e)+(h-p)/2;let{top:v,left:O,width:f,height:j}=c.getBoundingClientRect();if([s.h.SharedMedia,s.h.Album,s.h.ScheduledAlbum,s.h.SearchResult].includes(t)){const e=function(e,t,a,n,c,r){if(e===t){const s=Math.max(c,r)*(e/t);n-=(s-c)/2,a-=(s-r)/2,c=s,r=s}else if(e>t){const a=c;n-=((c=r*(e/t))-a)/2}else if(t>e){const n=r;a-=((r=c*(t/e))-n)/2}return{top:a,left:n,width:c,height:r}}(b,p,v,O,f,j);v=e.top,O=e.left,f=e.width,j=e.height}const C=O+f/2-(g+b/2),y=v+j/2-(E+p/2),k=f/b,N=j/p,I=P(a||c);F(I,{top:E+"px",left:g+"px",width:b+"px",height:p+"px",transform:`translate3d(${C}px, ${y}px, 0) scale(${k}, ${N})`}),A(I,t),document.body.classList.add("ghost-animating"),requestAnimationFrame(()=>{document.body.appendChild(I),requestAnimationFrame(()=>{I.style.transform="",function(e){e.firstChild.style.objectFit="default",e.classList.remove("rounded-corners","circle")}(I),setTimeout(()=>{requestAnimationFrame(()=>{document.body.removeChild(I),document.body.classList.remove("ghost-animating")})},200+l.c)})})}function w(e,t,a){const{container:n,mediaEl:c}=L(e,a);if(!c)return;const r=document.getElementById("MediaViewer").querySelector(".active .media-viewer-content img, .active .media-viewer-content video");if(!r||!c)return;const{top:o,left:i,width:m,height:d}=r.getBoundingClientRect(),{top:u,left:h,width:b,height:p}=c.getBoundingClientRect();let g=u;if(!function(e){if("none"===e.style.display)return!1;const t=e.getBoundingClientRect(),{height:a}=S.a.get();return t.top<=a&&t.top+t.height>=0}(n)){const{height:e}=S.a.get();g=uf?O=f:f>O&&(f=O));const C=P(t||c);F(C,{top:g+"px",left:h+"px",width:b+"px",height:p+"px",transform:`translate3d(${E}px, ${v}px, 0) scale(${O}, ${f})`}),requestAnimationFrame(()=>{document.body.classList.add("ghost-animating"),document.body.appendChild(C),requestAnimationFrame(()=>{C.style.transform="",j&&(C.style.opacity="0"),A(C,e),setTimeout(()=>{requestAnimationFrame(()=>{document.body.removeChild(C),document.body.classList.remove("ghost-animating")})},200+l.c)})})}function P(e){const t=document.createElement("div");t.classList.add("ghost");const a=new Image;return"string"==typeof e?a.src=e:e instanceof HTMLVideoElement?a.src=e.poster:a.src=e.src,t.appendChild(a),t}function M(e,t){const a=document.querySelector(".active > .MessageList");let n=e.offsetTop+t.closest(".content-inner, .WebPage").offsetTop;return e.id.includes("album-media-")&&(n+=e.parentElement.offsetTop+e.closest(".Message").offsetTop),n>a.scrollTop&&n+t.offsetHeight{if(n&&t)return{sender:Object(d.lb)(t)?Object(m.Bb)(e,t):Object(m.f)(e,t)};if(!a||!t)return{};const c=Object(m.k)(e,t,a);return{message:c,sender:c&&Object(m.ob)(e,c)}},(e,t)=>Object(u.l)(t,["closeMediaViewer","focusMessage"]))(({chatId:e,messageId:t,sender:a,isAvatar:c,message:r,closeMediaViewer:s,focusMessage:l})=>{const o=Object(n.m)(()=>{s(),l({chatId:e,messageId:t})},[e,l,t,s]);if(Object(T.a)(),!a||!r&&!c)return;const i=a.id<0,m=Object(d.U)(a);return n.a.createElement("div",{className:"SenderInfo",onClick:o},i?n.a.createElement(z.a,{key:a.id,size:"medium",chat:a}):n.a.createElement(z.a,{key:a.id,size:"medium",user:a}),n.a.createElement("div",{className:"meta"},n.a.createElement("div",{className:"title"},m&&Object(G.a)(m)),n.a.createElement("div",{className:"date"},c?"Profile photo":Object(U.d)(1e3*r.date))))}),$=a(166),H=a(56),V=a(32),W=a(113);a(238);var Y=({mediaData:e,isVideo:t,isZoomed:a,message:c,fileName:r,isAvatar:s,onCloseMediaViewer:l,onForward:i,onZoomToggle:m})=>{const[u,h]=Object(n.r)(!1),b=t&&c?Object(d.D)(c,"download"):void 0,{mediaData:p,downloadProgress:g}=Object(v.a)(b,!u);Object(n.n)(()=>{u&&p&&(Object($.a)(p,r),h(!1))},[r,p,u]),Object(n.n)(()=>{h(!1)},[b]);const E=Object(n.m)(e=>{e.stopPropagation(),h(e=>!e)},[]),O=Object(T.a)(),f=Object(n.p)(()=>({onTrigger:e,isOpen:t})=>n.a.createElement(R.a,{round:!0,size:"smaller",color:"translucent",className:t?"active":void 0,onClick:e,ariaLabel:"More actions"},n.a.createElement("i",{className:"icon-more"})),[]);return o.f?n.a.createElement("div",{className:"MediaViewerActions-mobile"},n.a.createElement(H.a,{trigger:f,positionX:"right"},!s&&n.a.createElement(V.a,{icon:"forward",onClick:i},O("Forward")),t?n.a.createElement(V.a,{icon:u?"close":"download",onClick:E},u?Math.round(100*g)+"% Downloading...":"Download"):n.a.createElement(V.a,{icon:"download",href:e,download:r},O("AccActionDownload"))),u&&n.a.createElement(W.a,{progress:g,size:"s",noCross:!0})):n.a.createElement("div",{className:"MediaViewerActions"},!s&&n.a.createElement(n.a.Fragment,null,n.a.createElement(R.a,{round:!0,size:"smaller",color:"translucent-white",ariaLabel:O("Forward"),onClick:i},n.a.createElement("i",{className:"icon-forward"}))),t?n.a.createElement(R.a,{round:!0,size:"smaller",color:"translucent-white",ariaLabel:O("AccActionDownload"),onClick:E},u?n.a.createElement(W.a,{progress:g,size:"s",onClick:E}):n.a.createElement("i",{className:"icon-download"})):n.a.createElement(R.a,{href:e,download:r,round:!0,size:"smaller",color:"translucent-white",ariaLabel:O("AccActionDownload")},n.a.createElement("i",{className:"icon-download"})),n.a.createElement(R.a,{round:!0,size:"smaller",color:"translucent-white",ariaLabel:a?"Zoom Out":"Zoom In",onClick:m},n.a.createElement("i",{className:a?"icon-zoom-out":"icon-zoom-in"})),n.a.createElement(R.a,{round:!0,size:"smaller",color:"translucent-white",ariaLabel:O("Close"),onClick:l},n.a.createElement("i",{className:"icon-close"})))},K=a(9);a(239);var Z=({text:e="",isHideable:t,onClick:a})=>{const[c,r]=Object(n.r)(!1);return Object(n.n)(()=>{const e=document.querySelector(".MediaViewerFooter .media-text"),t=()=>{const t=e?e.clientHeight:0;r(t>2*i.c)};t();const a=Object(K.g)(t,500,!0);return window.addEventListener("resize",a,!1),()=>{window.removeEventListener("resize",a,!1)}},[]),n.a.createElement("div",{className:"MediaViewerFooter "+(t?"hideable":""),onClick:function(t){e&&t.stopPropagation()}},e&&n.a.createElement("div",{className:"media-viewer-footer-content",onClick:a},n.a.createElement("p",{className:"media-text custom-scroll "+(c?"multiline":"")},e)))},Q=a(27),_=a(121);const X=function(){if(void 0!==document.fullscreenElement)return"fullscreenElement";if(void 0!==document.mozFullScreenElement)return"mozFullScreenElement";if(void 0!==document.webkitFullscreenElement)return"webkitFullscreenElement";return""}();var J=a(136),ee=a(133);const te=["bytes","kB","MB","GB","TB","PB"];var ae=e=>{const t=0===e?0:Math.floor(Math.log(e)/Math.log(1024));return`${(e/1024**Math.floor(t)).toFixed(1)} ${te[t]}`};a(240);const ne=e=>{e.stopPropagation()};var ce=({bufferedProgress:e,currentTime:t,duration:a,fileSize:c,isForceVisible:r,isForceMobileVersion:s,isPlayed:l,isFullscreenSupported:i,isFullscreen:m,onChangeFullscreen:d,onPlayPause:u,onSeek:h})=>{const[b,p]=Object(n.r)(!0);Object(n.n)(()=>{r&&p(r)},[r]),Object(n.n)(()=>{let e;return r||(o.f?p(!1):e=window.setTimeout(()=>{p(!1)},800)),()=>{e&&window.clearTimeout(e)}},[r]),Object(n.n)(()=>((b||r)&&document.body.classList.add("video-controls-visible"),()=>{document.body.classList.remove("video-controls-visible")}),[r,b]);const g=Object(T.a)();var E,v;if(b||r)return n.a.createElement("div",{className:"VideoPlayerControls "+(s?"mobile":""),onClick:ne},function(e,t,a,c){const r=e/t*100,s=100*a;return n.a.createElement("div",{className:"player-seekline"},n.a.createElement("div",{className:"player-seekline-track"},n.a.createElement("div",{className:"player-seekline-buffered",style:`width: ${s||0}%`}),n.a.createElement("div",{className:"player-seekline-played",style:`width: ${r||0}%`}),n.a.createElement("input",{min:"0",max:"100",step:.01,type:"range",onInput:c,className:"player-seekline-input",value:r||0})))}(t,a,e,h),n.a.createElement(R.a,{ariaLabel:g("AccActionPlay"),size:"tiny",ripple:!o.f,color:"translucent-white",className:"play",onClick:u},n.a.createElement("i",{className:l?"icon-pause":"icon-play"})),function(e,t){return n.a.createElement("div",{className:"player-time"},`${Object(U.e)(e)} / ${Object(U.e)(t)}`)}(t,a),e<1&&(E=e,v=c,n.a.createElement("div",{className:"player-file-size"},`${ae(v*E)} / ${ae(v)}`)),i&&n.a.createElement(R.a,{ariaLabel:"Fullscreen",size:"tiny",color:"translucent-white",className:"fullscreen",onClick:d},n.a.createElement("i",{className:""+(m?"icon-smallscreen":"icon-fullscreen")})))};a(241);function re(){return(re=Object.assign||function(e){for(var t=1;t{const d=Object(n.q)(null),[u,h]=Object(n.r)(!o.k||!o.d),[b,p]=Object(n.r)(0),[g,E]=Object(n.r)(!0),[v,O,f]=function(e,t){const[a,c]=Object(n.r)(Boolean(X&&document[X]));return Object(n.o)(()=>{const a=()=>{c(Boolean(X&&document[X]))},n=()=>{c(!0)},r=()=>{c(!1),t(!1)},s=e.current;return document.addEventListener("fullscreenchange",a,!1),document.addEventListener("webkitfullscreenchange",a,!1),document.addEventListener("mozfullscreenchange",a,!1),s&&(s.addEventListener("webkitbeginfullscreen",n,!1),s.addEventListener("webkitendfullscreen",r,!1)),()=>{document.removeEventListener("fullscreenchange",a,!1),document.removeEventListener("webkitfullscreenchange",a,!1),document.removeEventListener("mozfullscreenchange",a,!1),s&&(s.removeEventListener("webkitbeginfullscreen",n,!1),s.removeEventListener("webkitendfullscreen",r,!1))}},[]),X||"iOS"===o.n?[a,()=>{e.current&&(X||"iOS"===o.n)&&(e.current.requestFullscreen?e.current.requestFullscreen():e.current.webkitRequestFullscreen?e.current.webkitRequestFullscreen():e.current.webkitEnterFullscreen?e.current.webkitEnterFullscreen():e.current.mozRequestFullScreen&&e.current.mozRequestFullScreen(),c(!0))},()=>{e.current&&(document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitCancelFullScreen?document.webkitCancelFullScreen():document.webkitExitFullscreen&&document.webkitExitFullscreen(),c(!1))}]:[!1]}(d,h),{isBuffered:j,bufferedProgress:C,bufferingHandlers:y}=Object(_.a)(),{shouldRender:k,transitionClassNames:N}=Object(Q.a)(!j,void 0,void 0,"slow");Object(n.n)(()=>{i||!l?d.current.pause():e&&!o.k&&Object(ee.a)(d.current)},[i,l,e]),Object(n.n)(()=>{d.current.currentTime===d.current.duration?(p(0),h(!1)):p(d.current.currentTime)},[b]);const S=Object(n.m)(e=>{e.stopPropagation(),u?(d.current.pause(),h(!1)):(d.current.play(),h(!0))},[u]);Object(J.a)(d,[]);const I=Object(n.m)(()=>{E(!0)},[]),w=Object(n.m)(()=>{E(!1)},[]),P=Object(n.m)(e=>{p(e.currentTarget.currentTime)},[]),M=Object(n.m)(()=>{p(0),h(!1)},[]),F=Object(n.m)(()=>{v&&f?f():!v&&O&&O()},[f,v,O]),L=Object(n.m)(e=>{e.stopPropagation(),d.current.currentTime=Number(e.target.value)*d.current.duration/100},[]),A=Object(n.m)(e=>{e.stopPropagation(),E(!g)},[g]);Object(n.n)(()=>{const e=e=>{"Enter"!==e.key&&" "!==e.key||S(e)};return document.addEventListener("keydown",e,!1),()=>{document.removeEventListener("keydown",e,!1)}},[S]);const T=c&&`width: ${c.width}px; height: ${c.height}px`,B=`background-image: url(${a})`;return n.a.createElement("div",{className:"VideoPlayer",onClick:!t&&o.f?A:void 0,onMouseOver:t?void 0:I,onMouseOut:t?void 0:w},n.a.createElement("div",{style:T},n.a.createElement("video",re({ref:d,autoPlay:o.k,playsInline:!0,loop:t,muted:t,id:"media-viewer-video",style:B,onEnded:M},y,{onTimeUpdate:P}),e&&n.a.createElement("source",{src:e}))),k&&n.a.createElement("div",{className:["spinner-container",N].join(" ")},!j&&n.a.createElement("div",{className:"buffering"},"Buffering..."),n.a.createElement(W.a,{size:"xl",progress:j?1:r,square:!0,onClick:m})),!t&&!k&&n.a.createElement(ce,{isPlayed:u,bufferedProgress:C,currentTime:b,isFullscreenSupported:Boolean(O),isFullscreen:v,fileSize:s,duration:d.current?d.current.duration:0,isForceVisible:!u||g,isForceMobileVersion:c&&c.width<400,onSeek:L,onChangeFullscreen:F,onPlayPause:S}))}),le=a(8);a(242);var oe=Object(n.h)(({isShown:e,onChangeZoom:t})=>{const{transitionClassNames:a}=Object(Q.a)(e),c=Object(y.a)(e),r=Object(n.q)(null),[s,l]=Object(n.r)(1),i=Object(n.q)(!1);Object(n.n)(()=>{e&&!c&&l(1.5)},[e,c]);const m=Object(n.m)(()=>{i.current=!0},[]),d=Object(n.m)(()=>{i.current=!1,1===s&&t(s,!i.current)},[t,s]);Object(n.n)(()=>{t(s,!i.current)},[s,t]);const u=Object(T.a)(),h=Object(le.a)("ZoomControls",a);return n.a.createElement("div",{className:h},n.a.createElement(R.a,{disabled:1===s,size:"tiny",color:"translucent-white",ariaLabel:u("ZoomOut"),className:"zoom-out",ripple:!o.f,onClick:()=>{r.current&&l(Math.max(1,s-.5))}},n.a.createElement("i",{className:"icon-zoom-out"})),n.a.createElement(R.a,{disabled:3===s,size:"tiny",color:"translucent-white",ariaLabel:"Zoom In",className:"zoom-in",ripple:!o.f,onClick:()=>{r.current&&l(Math.min(3,s+.5))}},n.a.createElement("i",{className:"icon-zoom-in"})),n.a.createElement("div",{className:"seekline"},n.a.createElement("div",{className:"seekline-track"},n.a.createElement("div",{className:"seekline-played",style:`width: ${50*(s-1)}%`}),n.a.createElement("input",{ref:r,min:1,max:3,step:"0.5",value:s,type:"range",className:"seekline-input",onChange:e=>{l(Math.min(3,Math.max(Number(e.target.value),1)))},onMouseDown:m,onMouseUp:d}))))});a(243);const ie=[1,0,0,1,0,0],me={1:1,1.5:1.5,2:2.2,2.5:3.3,3:5.5};var de=Object(n.h)(({children:e,className:t,noWrap:a,canPan:c,zoomLevel:r,panDeltaX:s,panDeltaY:l,onPan:o})=>{const i=me[r]||r,[m,d]=Object(n.r)(!1),[h,b]=Object(n.r)({dx:s,dy:l,x:0,y:0}),[p,g]=Object(n.r)(ie),E=Object(n.q)(null),v=Object(n.q)(null);Object(n.n)(()=>{const e=i||p[0],t=s||p[4],a=l||p[5],n=[...p];p[0]!==e&&(n[0]=e||n[0],n[3]=e||n[3]),p[4]!==t&&(n[4]=t),p[5]!==a&&(n[5]=a),Object(u.a)(p,n)||g(function(e,t,a){const n=a&&a.querySelector(".active img");if(!a||!n)return t;const c=a.getBoundingClientRect(),r=n.getBoundingClientRect(),s=r.width/e*t[0],l=r.height/e*t[3],o=(c.width-s)/2+t[4],i=(c.height-l)/2+t[5];return c.width&&c.width-150{c||g(ie)},[c]),Object(n.n)(()=>{v.current&&(v.current.style.transform=`matrix(${p.toString()})`)},[a,p]);return a?e:n.a.createElement("div",{ref:E,className:"pan-wrapper "+(t||""),onMouseDown:e=>{if(!c)return;e.stopPropagation(),e.preventDefault();const t={dx:p[4],dy:p[5],x:e.pageX,y:e.pageY};b(t),d(!0),E.current&&E.current.classList.add("move")},onMouseUp:()=>{d(!1),E.current&&E.current.classList.remove("move"),o&&o(p[4],p[5])},onMouseMove:e=>{if(m){const t=function(e,t){const a=[...p],n=h.x-e,c=h.y-t;return a[4]=h.dx-n,a[5]=h.dy-c,a}(e.pageX,e.pageY);g(t),v.current&&(v.current.style.transform=`matrix(${p.toString()})`)}}},n.a.createElement("div",{ref:v,className:"pan-container"},e))});a(244);function ue(e,t){return e?n.a.createElement("img",{src:e,alt:"",style:t?`width: ${t.width}px`:"",draggable:!1}):n.a.createElement("div",{className:"spinner-wrapper",style:t?`width: ${t.width}px`:""},n.a.createElement(B.a,{color:"white"}))}var he=Object(n.h)(Object(c.h)(e=>{const{chatId:t,threadId:a,messageId:n,avatarOwnerId:c,origin:r}=e.mediaViewer,{animationLevel:l}=e.settings.byKey;if(r===s.h.SearchResult){if(!t||!n)return{animationLevel:l};const a=Object(m.k)(e,t,n);return a?{chatId:t,messageId:n,senderId:a.senderId,origin:r,message:a,animationLevel:l}:{animationLevel:l}}if(c){return{messageId:-1,senderId:c,avatarOwner:Object(m.f)(e,c)||Object(m.Bb)(e,c),animationLevel:l,origin:r}}if(!(t&&a&&n))return{animationLevel:l};let o,i,d;if(o=r&&[s.h.ScheduledAlbum,s.h.ScheduledInline].includes(r)?Object(m.kb)(e,t,n):Object(m.k)(e,t,n),!o)return{animationLevel:l};if(i=r&&[s.h.ScheduledAlbum,s.h.ScheduledInline].includes(r)?Object(m.lb)(e,t):Object(m.m)(e,t),r===s.h.Inline||r===s.h.Album)d=Object(m.bb)(e,t,a)||Object(m.W)(e,t,a);else if(r===s.h.SharedMedia){const t=Object(m.u)(e),{foundIds:a}=t&&t.resultsByType&&t.resultsByType.media||{};d=a}return{chatId:t,threadId:a,messageId:n,senderId:o.senderId,origin:r,message:o,chatMessages:i,collectionIds:d,animationLevel:l}},(e,t)=>Object(u.l)(t,["openMediaViewer","closeMediaViewer","openForwardMenu","focusMessage"]))(({chatId:e,threadId:t,messageId:a,senderId:c,origin:m,avatarOwner:u,message:S,chatMessages:P,collectionIds:M,openMediaViewer:F,closeMediaViewer:L,openForwardMenu:A,focusMessage:B,animationLevel:U})=>{const G=Object(n.q)(null),z=Boolean(u||a),$=S?Object(d.Q)(S):void 0,H=S?Object(d.G)(S):void 0,V=S?Object(d.O)(S):void 0,W=Boolean($),K=Boolean(H||$),Q=Boolean(V),_=V?V.isGif:void 0,X=m===s.h.SharedMedia,J=m===s.h.SearchResult,ee=U>=1?"mv-slide":"none",te=2===U?"slide-fade":"none",ae=2===U,ne=u?`avatar${u.id}.jpg`:S&&Object(d.B)(S),ce=Object(y.a)(c),[re,le]=Object(n.r)(!1),[ie,me]=Object(n.r)(!1),[he,be]=Object(n.r)(1),[pe,ge]=Object(n.r)({x:0,y:0}),Ee=Object(n.p)(()=>W&&a?[a]:Object(d.i)(P||{},M||[],X),[W,a,P,M,X]),ve=a?Ee.indexOf(a):-1,Oe=0===ve||-1===ve,fe=ve===Ee.length-1||-1===ve;function je(e){return u?Object(d.f)(u,e?"big":"normal"):S&&Object(d.D)(S,e?"viewerFull":"viewerPreview")}!z||ce&&ce===c&&G.current||(G.current=ve);const Ce=Object(E.a)(S&&(X||J)&&Object(d.D)(S,"pictogram"),void 0,r.ApiMediaFormat.BlobUrl,void 0,ae&&350),ye=Object(E.a)(je(),void 0,u?r.ApiMediaFormat.DataUri:r.ApiMediaFormat.BlobUrl,void 0,ae&&350),{mediaData:ke,downloadProgress:Ne}=Object(v.a)(je(!0),void 0,S&&Object(d.C)(S,"viewerFull"),void 0,ae&&350),Se=H||V?(H||V).blobUrl:void 0;let Ie=!Q&&(Se||ke)||ye||Ce;const we=function(e){const t=Object(n.q)();let a=!1;Object(f.a)(()=>{if(a=!0,t.current=void 0,!e)return;const n=new Image;if(n.src=e,!n.width)return;const c=Object(C.f)(n);Object(O.a)(c.getContext("2d"),0,0,c.width,c.height,2,2),t.current=c.toDataURL()},[e]);const c=Object(j.a)(e||void 0,Boolean(t.current));return t.current||!a&&c||e||void 0}(!Ie&&S&&Object(d.E)(S));Ie||m===s.h.SearchResult||(Ie=we);const Pe=K?Object(d.R)(W?Object(d.Q)(S):Object(d.G)(S)):void 0,Me=Q?Object(d.bb)(Object(d.O)(S)):void 0;Object(n.n)(()=>{o.f&&document.body.classList.toggle("is-media-viewer-open",z)},[z]);const Fe=Object(g.a)();Object(n.n)(()=>{const e=window.matchMedia(i.b);return"function"==typeof e.addEventListener?e.addEventListener("change",Fe):"function"==typeof e.addListener&&e.addListener(Fe),()=>{"function"==typeof e.removeEventListener?e.removeEventListener("change",Fe):"function"==typeof e.removeListener&&e.removeListener(Fe)}},[Fe]);const Le=Object(y.a)(S),Ae=Object(y.a)(m),Te=Object(y.a)(u),Be=Object(y.a)(Ie);Object(n.n)(()=>{if(ae&&z&&!Le&&!Te){Object(k.b)(350+l.c);const e=S?Object(N.a)(S):void 0;I(Boolean(e),m,Ie,S)}ae&&!z&&(Le||Te)&&(Object(k.b)(350+l.c),w(Ae,Be,Le||void 0))},[ae,z,m,Ae,S,Le,Te,Ie,Be]),Object(n.n)(()=>{let e;return ie?le(!0):e=window.setTimeout(()=>{le(!1)},350),()=>{e&&window.clearTimeout(e)}},[ie]);const De=()=>{me(!1),be(1),ge({x:0,y:0})},xe=Object(n.m)(()=>{me(!ie),be(ie?1:1.5),ie&&ge({x:0,y:0})},[ie]),Re=Object(n.m)((e,t=!1)=>{be(e),1===e&&t&&De()},[]),Ue=Object(n.m)(()=>{L(),De()},[L]),Ge=Object(n.m)(()=>{Ue(),B({chatId:e,threadId:t,messageId:a})},[Ue,e,t,B,a]),ze=Object(n.m)(()=>{A({fromChatId:e,messageIds:[a]}),De()},[A,e,a]);Object(n.n)(()=>z?Object(b.a)(()=>{ie?De():Ue()}):void 0,[Ue,z,ie]),Object(n.n)(()=>{Q&&!_&&Object(p.b)()},[_,Q]);const qe=Object(n.m)((e,t)=>{let a=Ee.indexOf(e);return(-1===t&&a>0||1===t&&a{Oe||F({chatId:e,threadId:t,messageId:a?qe(a,-1):void 0,origin:m})},[e,t,qe,Oe,a,F,m]),He=Object(n.m)(()=>{fe||F({chatId:e,threadId:t,messageId:a?qe(a,1):void 0,origin:m})},[e,t,qe,fe,a,F,m]);Object(n.n)(()=>{const e=e=>{switch(e.key){case"Left":case"ArrowLeft":$e();break;case"Right":case"ArrowRight":He()}};return document.addEventListener("keydown",e,!1),()=>{document.removeEventListener("keydown",e,!1)}}),Object(n.n)(()=>{const e=document.querySelector(".slide-container > .active, .slide-container > .to");if(!e)return;const t=_&&!o.d;return Object(h.b)(e,{excludedClosestSelector:".backdrop, .navigation, .media-viewer-head, .media-viewer-footer"+(t?"":", .VideoPlayer"),onClick:()=>{ie||Ue()},onSwipe:o.k?(e,t)=>{t===h.a.Right?$e():t===h.a.Left?He():Ue()}:void 0})},[Ue,_,ie,He,$e,re]);const Ve=Object(n.m)((e,t)=>{ge({x:e,y:t})},[]),We=Object(T.a)();function Ye(t){if(u)return n.a.createElement("div",{key:e,className:"media-viewer-content"},ue(ke||ye,Object(i.g)(i.a,!1)));if(S){const e=Object(N.a)(S),c=Boolean(e);return n.a.createElement("div",{key:a,className:"media-viewer-content "+(c?"has-footer":"")},K&&ue(Se||ke||ye||Ce,S&&Object(i.g)(Pe,c)),Q&&n.a.createElement(se,{key:a,url:Se||ke,isGif:_,posterData:Ie,posterSize:S&&Object(i.g)(Me,c,!0),downloadProgress:Ne,fileSize:V.size,isMediaViewerOpen:z,noPlay:!t,onClose:Ue}),e&&n.a.createElement(Z,{text:e,onClick:Ge,isHideable:Q}))}}function Ke(){return n.a.createElement(q,{key:u?u.id:a,chatId:u?u.id:e,messageId:a,isAvatar:Boolean(u)})}return n.a.createElement(D.a,{id:"MediaViewer",className:ie?"zoomed":"",isOpen:z},()=>n.a.createElement(n.a.Fragment,null,n.a.createElement("div",{className:"media-viewer-head"},o.f&&n.a.createElement(R.a,{className:"media-viewer-close",round:!0,size:"smaller",color:"translucent-white",ariaLabel:We("Close"),onClick:Ue},n.a.createElement("i",{className:"icon-close"})),n.a.createElement(x.a,{activeKey:G.current,name:te},Ke),n.a.createElement(Y,{mediaData:ke||ye,isVideo:Q,isZoomed:ie,message:S,fileName:ne,onCloseMediaViewer:Ue,onForward:ze,onZoomToggle:xe,isAvatar:Boolean(u)})),n.a.createElement(de,{noWrap:!re,canPan:ie,panDeltaX:pe.x,panDeltaY:pe.y,zoomLevel:he,onPan:Ve},n.a.createElement(x.a,{className:"slide-container",activeKey:ve,name:ee},Ye)),!Oe&&n.a.createElement("button",{type:"button",className:"navigation prev "+(Q&&!_&&"inline"),"aria-label":We("AccDescrPrevious"),onClick:$e}),!fe&&n.a.createElement("button",{type:"button",className:"navigation next "+(Q&&!_&&"inline"),"aria-label":We("Next"),onClick:He}),n.a.createElement(oe,{isShown:ie,onChangeZoom:Re})))})),be=a(46),pe=a(118),ge=a(16),Ee=a(98),ve=a(39),Oe=a(101),fe=a(94),je=a(96),Ce=a(111);a(245);var ye=Object(n.h)(Object(c.h)(e=>{const{chats:{byId:t,listIds:a,orderedPinnedIds:n},currentUserId:c}=e;return{chatsById:t,listIds:a.active,orderedPinnedIds:n.active,currentUser:c?Object(m.Bb)(e,c):void 0}},(e,t)=>Object(u.l)(t,["setForwardChatId","exitForwardMode","loadMoreChats"]))(({chatsById:e,listIds:t,orderedPinnedIds:a,currentUser:c,isOpen:r,setForwardChatId:s,exitForwardMode:l,loadMoreChats:i})=>{const[m,u]=Object(n.r)(""),h=Object(n.q)(null);Object(n.n)(()=>{r?o.f||setTimeout(()=>{requestAnimationFrame(()=>{h.current&&h.current.focus()})},500):(h.current&&h.current.blur(),setTimeout(()=>{u("")},300))},[r]);const b=Object(n.p)(()=>{const n=t?Object(d.Ab)(e,t,a):void 0;if(!n)return;const r=c?e[c.id]:void 0;return[...r?[r]:[],...n.pinnedChats.filter(({id:e})=>!r||e!==r.id),...n.otherChats.filter(({id:e})=>!r||e!==r.id)]},[e,t,a,c]),p=Object(n.p)(()=>{if(b)return b.filter(e=>!m||Object(be.a)(Object(d.l)(e,c),m)).map(({id:e})=>e)},[b,m,c]),[g,E]=Object(pe.a)(i,p,Boolean(m)),v=Object(n.m)(e=>{u(e.currentTarget.value)},[]),O=Object(T.a)(),f=n.a.createElement("div",{className:"modal-header"},n.a.createElement(R.a,{round:!0,color:"translucent",size:"smaller",ariaLabel:O("Close"),onClick:l},n.a.createElement("i",{className:"icon-close"})),n.a.createElement(ve.a,{ref:h,value:m,onChange:v,placeholder:O("ForwardTo")}));return n.a.createElement(Ee.a,{isOpen:r,onClose:l,className:"ForwardPicker",header:f},g&&g.length?n.a.createElement(Oe.a,{className:"picker-list custom-scroll",items:g,onLoadMore:E,isDisabled:Boolean(m)},g.map(e=>n.a.createElement(fe.a,{key:e,className:"chat-item-clickable force-rounded-corners",onClick:()=>s({id:e})},Object(d.lb)(e)?n.a.createElement(je.a,{userId:e}):n.a.createElement(Ce.a,{chatId:e})))):g&&!g.length?n.a.createElement("p",{className:"no-results"},"Sorry, nothing found."):n.a.createElement(ge.a,null))})),ke=a(157);a(246);function Ne(e){return e.isSlowMode?"Slowmode enabled":"Something went wrong"}var Se=Object(n.h)(Object(c.h)(e=>Object(u.l)(e,["errors"]),(e,t)=>Object(u.l)(t,["dismissError"]))(({errors:e,dismissError:t})=>{const a=Object(T.a)();if(e.length)return n.a.createElement("div",{id:"Errors"},e.map(e=>n.a.createElement(Ee.a,{isOpen:!0,onClose:t,className:"error",title:Ne(e)},n.a.createElement("p",null,Object(ke.a)(e)),n.a.createElement(R.a,{isText:!0,onClick:t},a("OK")))))})),Ie=a(169);var we=Object(n.h)(Object(c.h)(e=>Object(u.l)(e,["notifications"]),(e,t)=>Object(u.l)(t,["dismissNotification"]))(({notifications:e,dismissNotification:t})=>{if(e.length)return n.a.createElement("div",{id:"Notifications"},e.map(({message:e})=>n.a.createElement(Ie.a,{message:Object(G.a)(e,["emoji","br","links"]),onDismiss:t})))}));a(247);const Pe=["M","T","W","T","F","S","S"];function Me(e,t,a,n,c){const r=new Date(e,t,a,0,0,0,0),s=n&&new Date(n.getFullYear(),n.getMonth(),n.getDate(),0,0,0,0),l=c&&new Date(c.getFullYear(),c.getMonth(),c.getDate(),0,0,0,0);return!!(l&&r>l)||!!(s&&r{const h=new Date,b=Object(n.p)(()=>e?new Date(e):new Date,[e]),p=t?new Date(t):void 0,[g,E]=Object(n.r)(b),[v,O]=Object(n.r)(Fe(b.getHours())),[f,j]=Object(n.r)(Fe(b.getMinutes())),C=g.getFullYear(),y=g.getMonth(),k=g.getDate();Object(n.n)(()=>{r&&E(b)},[r,b]);const N=c&&C>=h.getFullYear()&&y>=h.getMonth()||p&&C>=p.getFullYear()&&y>=p.getMonth(),S=a&&C<=h.getFullYear()&&y<=h.getMonth(),I=Object(n.p)(()=>function(e,t){const a=[],n=new Date;n.setFullYear(e),n.setMonth(t),n.setDate(1);const c=n.getDay();for(let e=1;e{const t=e.target.value.replace(/[^\d]+/g,"");if(!t.length)return O(""),void(e.target.value="");const a=Math.max(0,Math.min(Number(t),23)),n=new Date(g.getTime());n.setHours(a),E(n);const c=Fe(a);O(c),e.target.value=c},[g]),P=Object(n.m)(e=>{const t=e.target.value.replace(/[^\d]+/g,"");if(!t.length)return j(""),void(e.target.value="");const a=Math.max(0,Math.min(Number(t),59)),n=new Date(g.getTime());n.setMinutes(a),E(n);const c=Fe(a);j(c),e.target.value=c},[g]);return n.a.createElement(Ee.a,{isOpen:r,onClose:m,className:"CalendarModal"},n.a.createElement("div",{className:"container"},n.a.createElement("div",{className:"month-selector"},n.a.createElement(R.a,{round:!0,size:"smaller",color:"translucent",onClick:m},n.a.createElement("i",{className:"icon-close"})),n.a.createElement("h4",null,Object(U.f)(g,o.f)),n.a.createElement(R.a,{round:!0,size:"smaller",color:"translucent",disabled:S,onClick:S?void 0:function(){E(e=>{const t=new Date(e);return t.setMonth(t.getMonth()-1),t})}},n.a.createElement("i",{className:"icon-previous"})),n.a.createElement(R.a,{round:!0,size:"smaller",color:"translucent",disabled:N,onClick:N?void 0:function(){E(e=>{const t=new Date(e);return t.setMonth(t.getMonth()+1),t})}},n.a.createElement("i",{className:"icon-next"})))),n.a.createElement("div",{className:"calendar-wrapper"},n.a.createElement("div",{className:"calendar-grid"},Pe.map(e=>n.a.createElement("div",{className:"day-button faded weekday"},n.a.createElement("span",null,e))),I.map(e=>n.a.createElement("div",{role:"button",tabIndex:0,onClick:()=>{return t=e,void E(e=>{const a=new Date(e);return a.setDate(t),a});var t},className:Object(le.a)("day-button",Me(C,y,e,a?h:void 0,c?h:p)?"disabled":""+(e?"clickable":""),e===k&&"selected")},!!e&&n.a.createElement("span",null,e))))),s&&n.a.createElement("div",{className:"timepicker"},n.a.createElement("input",{type:"text",className:"form-control",inputMode:"decimal",value:v,onChange:w}),":",n.a.createElement("input",{type:"text",className:"form-control",inputMode:"decimal",value:f,onChange:P})),n.a.createElement("div",{className:"footer"},n.a.createElement(R.a,{onClick:function(){d(g)}},s?function(e){const t=Object(U.c)(e,!0);return`Send ${"Today"===t?t:"on "+t} at ${Object(U.h)(e)}`}(g):l),i&&n.a.createElement(R.a,{onClick:u,isText:!0},i)))});var Ae=Object(n.h)(Object(c.h)((e,{message:t,isSchedule:a})=>{const{threadId:n}=Object(m.x)(e)||{},{canDeleteForAll:c}=n&&Object(m.b)(e,t,n)||{},r=Object(m.f)(e,t.chatId);return{canDeleteForAll:!a&&c,contactFirstName:r&&Object(d.lb)(r.id)?Object(d.Y)(Object(m.Bb)(e,Object(d.T)(r))):void 0,willDeleteForCurrentUserOnly:r&&Object(d.ib)(r)&&!c,willDeleteForAll:r&&Object(d.nb)(r)}},(e,t)=>Object(u.l)(t,["deleteMessages","deleteScheduledMessages"]))(({isOpen:e,isSchedule:t,message:a,album:c,canDeleteForAll:r,contactFirstName:s,willDeleteForCurrentUserOnly:l,willDeleteForAll:o,onClose:i,deleteMessages:m,deleteScheduledMessages:d})=>{const u=Object(n.m)(()=>{const e=c&&c.messages?c.messages.map(({id:e})=>e):[a.id];m({messageIds:e,shouldDeleteForAll:!0}),i()},[m,a.id,i,c]),h=Object(n.m)(()=>{const e=c&&c.messages?c.messages.map(({id:e})=>e):[a.id];t?d({messageIds:e}):m({messageIds:e,shouldDeleteForAll:!1}),i()},[c,a.id,t,i,d,m]),b=Object(T.a)();return n.a.createElement(Ee.a,{isOpen:e,onClose:i,onEnter:e&&!r?h:void 0,className:"delete",title:b("DeleteSingleMessagesTitle")},n.a.createElement("p",null,b("AreYouSureDeleteSingleMessage")),l&&n.a.createElement("p",null,"This will delete it just for you, not for other participants in the chat."),o&&n.a.createElement("p",null,"This will delete it for everyone in this chat."),r&&n.a.createElement(R.a,{color:"danger",className:"confirm-dialog-button",isText:!0,onClick:u},"Delete for ",s?"me and ":"Everyone",s&&Object(G.a)(s)),n.a.createElement(R.a,{color:"danger",className:"confirm-dialog-button",isText:!0,onClick:h},"Delete",r?" just for me":""),n.a.createElement(R.a,{className:"confirm-dialog-button",isText:!0,onClick:i},b("Cancel")))}));var Te=Object(n.h)(Object(c.h)((e,{chatId:t})=>{const a=Object(d.lb)(t),n=Object(m.N)(e,t),c=Object(m.f)(e,t),r=!!c&&Object(d.jb)(c),s=!!c&&Object(d.ib)(c),l=!!c&&Object(d.nb)(c);return{isPrivateChat:a,isChatWithSelf:n,isChannel:r,isGroup:s,isSuperGroup:l,canPinForAll:a&&!n||l||s,contactFirstName:c&&Object(d.lb)(c.id)?Object(d.Y)(Object(m.Bb)(e,Object(d.T)(c))):void 0}},(e,t)=>Object(u.l)(t,["pinMessage"]))(({isOpen:e,messageId:t,chatId:a,isChannel:c,isGroup:r,isSuperGroup:s,canPinForAll:l,contactFirstName:o,onClose:i,pinMessage:m})=>{const d=Object(n.m)(()=>{m({chatId:a,messageId:t,isUnpin:!1}),i()},[m,a,t,i]),u=Object(n.m)(()=>{m({chatId:a,messageId:t,isUnpin:!1,isOneSide:!0,isSilent:!0}),i()},[a,t,i,m]),h=Object(T.a)();return n.a.createElement(Ee.a,{isOpen:e,onClose:i,className:"pin",header:n.a.createElement("div",{className:"modal-header"},n.a.createElement("h3",{className:"modal-title"},h("PinMessageAlertTitle")))},c?n.a.createElement("p",null,h("PinMessageAlertChannel")):r||s?n.a.createElement("p",null,h("PinMessageAlert")):n.a.createElement("p",null,h("PinMessageAlertChat")),n.a.createElement(R.a,{className:"confirm-dialog-button",isText:!0,onClick:u},h("DialogPin")),l&&n.a.createElement(R.a,{className:"confirm-dialog-button",isText:!0,onClick:d},o?"Pin for me and "+o:"Pin and notify all memebers"),n.a.createElement(R.a,{className:"confirm-dialog-button",isText:!0,onClick:i},h("Cancel")))}));var Be=Object(n.h)(Object(c.h)((e,{chatId:t})=>{const a=t?Object(m.eb)(e,t):[];return{pinnedMessagesCount:a?a.length:0}})(({isOpen:e,pinnedMessagesCount:t,onClose:a,onUnpin:c})=>{const r=Object(T.a)();return n.a.createElement(Ee.a,{isOpen:e,onClose:a,className:"unpin-all",header:n.a.createElement("div",{className:"modal-header"},n.a.createElement("h3",{className:"modal-title"},r("UnpinAllMessages")))},n.a.createElement("p",null,"Do you want to unpin all ",t," messages in this chat?"),n.a.createElement(R.a,{className:"confirm-dialog-button",isText:!0,onClick:c},r("DialogUnpin")),n.a.createElement(R.a,{className:"confirm-dialog-button",isText:!0,onClick:a},r("Cancel")))})),De=a(36),xe=a(50);var Re=Object(n.h)(Object(c.h)((e,{isSchedule:t})=>{const{messageIds:a}=e.selectedMessages||{},{canDeleteForAll:n}=Object(m.e)(e),c=Object(m.q)(e);return{selectedMessageIds:a,canDeleteForAll:!t&&n,contactFirstName:c&&Object(d.lb)(c.id)?Object(d.Y)(Object(m.Bb)(e,Object(d.T)(c))):void 0,willDeleteForCurrentUserOnly:c&&Object(d.ib)(c)&&!n,willDeleteForAll:c&&Object(d.nb)(c)}},(e,t)=>Object(u.l)(t,["deleteMessages","deleteScheduledMessages","exitMessageSelectMode"]))(({isOpen:e,isSchedule:t,selectedMessageIds:a,canDeleteForAll:c,contactFirstName:r,willDeleteForCurrentUserOnly:s,willDeleteForAll:l,onClose:o,deleteMessages:i,deleteScheduledMessages:m,exitMessageSelectMode:d})=>{const u=Object(n.m)(()=>{i({messageIds:a,shouldDeleteForAll:!0}),d(),o()},[i,d,a,o]),h=Object(n.m)(()=>{t?m({messageIds:a}):i({messageIds:a,shouldDeleteForAll:!1}),d(),o()},[t,d,o,m,a,i]),b=Object(T.a)();if(a)return n.a.createElement(Ee.a,{isOpen:e,onClose:o,onEnter:c?void 0:h,className:"delete",title:"Delete Messages?"},n.a.createElement("p",null,b("AreYouSureDeleteFewMessages")),s&&n.a.createElement("p",null,"This will delete them just for you, not for other participants in the chat."),l&&n.a.createElement("p",null,"This will delete them for everyone in this chat."),c&&n.a.createElement(R.a,{color:"danger",className:"confirm-dialog-button",isText:!0,onClick:u},"Delete for ",r?"me and ":"Everyone",r&&Object(G.a)(r)),n.a.createElement(R.a,{color:"danger",className:"confirm-dialog-button",isText:!0,onClick:h},"Delete",c?" just for me":""),n.a.createElement(R.a,{className:"confirm-dialog-button",isText:!0,onClick:o},b("Cancel")))}));a(248);var Ue=Object(n.h)(Object(c.h)(e=>{const{type:t}=Object(m.x)(e)||{},{canDelete:a}=Object(m.e)(e);return{isSchedule:"scheduled"===t,selectedMessagesCount:Object(m.nb)(e),canDeleteMessages:a}},(e,t)=>Object(u.l)(t,["exitMessageSelectMode","openForwardMenuForSelectedMessages"]))(({canPost:e,isActive:t,messageListType:a,isSchedule:c,selectedMessagesCount:r,canDeleteMessages:s,exitMessageSelectMode:l,openForwardMenuForSelectedMessages:o})=>{const[i,m,d]=Object(De.a)();Object(n.n)(()=>t&&!i?Object(xe.a)({onBackspace:m,onDelete:m,onEsc:l}):void 0,[t,i,m,l]);const u=Object(y.a)(r||void 0,!0),h=t?r:u,b=Object(T.a)(),p=b("VoiceOver.Chat.MessagesSelected",h),g=Object(le.a)("MessageSelectToolbar",e&&"with-composer",t&&"shown");return n.a.createElement("div",{className:g},n.a.createElement("div",{className:"MessageSelectToolbar-inner"},n.a.createElement(R.a,{color:"translucent",round:!0,onClick:l,ariaLabel:"Exit select mode"},n.a.createElement("i",{className:"icon-close"})),n.a.createElement("span",{className:"MessageSelectToolbar-count",title:p},p),!!r&&n.a.createElement("div",{className:"MessageSelectToolbar-actions"},"scheduled"!==a&&n.a.createElement(V.a,{icon:"forward",ariaLabel:"Forward Messages",onClick:o},n.a.createElement("span",{className:"item-text"},b("Forward"))),n.a.createElement(V.a,{destructive:!0,icon:"delete",onClick:m,disabled:!s,ariaLabel:b("EditAdminGroupDeleteMessages")},n.a.createElement("span",{className:"item-text"},b("Delete"))))),n.a.createElement(Re,{isOpen:i,isSchedule:c,onClose:d}))})),Ge=a(156),ze=a(44),qe=a(159),$e=a(147);var He=Object(n.h)(Object(c.h)((e,{chatId:t})=>{const a=Object(m.f)(e,t),n=a&&Object(d.T)(a);return{chat:a,privateChatUser:n?Object(m.Bb)(e,n):void 0,isPinned:Object(m.L)(e,t)}})(({chatId:e,chat:t,privateChatUser:a,isPinned:c,withHandle:r,onClick:s})=>{const[l,o,i]=Object(De.a)(),m=Object(qe.a)({chat:t,privateChatUser:a,isPinned:c,handleDelete:o});if(t)return n.a.createElement(fe.a,{className:"chat-item-clickable search-result",onClick:()=>s(e),contextActions:m},Object(d.lb)(e)?n.a.createElement(je.a,{userId:e,withHandle:r,avatarSize:"large"}):n.a.createElement(Ce.a,{chatId:e,withHandle:r,avatarSize:"large"}),n.a.createElement($e.a,{isOpen:l,onClose:i,chat:t}))})),Ve=a(128);a(249);const We=Object(K.g)(e=>e(),6e4,!0);var Ye=Object(n.h)(Object(c.h)(e=>{const{userIds:t}=e.topPeers,a=e.users.byId,{recentlyFoundChatIds:n}=e.globalSearch;return{topUserIds:t,usersById:a,recentlyFoundChatIds:n}},(e,t)=>Object(u.l)(t,["loadTopUsers","loadContactList","openChat","addRecentlyFoundChatId","clearRecentlyFoundChats"]))(({topUserIds:e,usersById:t,recentlyFoundChatIds:a,onReset:c,loadTopUsers:r,loadContactList:s,openChat:l,addRecentlyFoundChatId:o,clearRecentlyFoundChats:i})=>{const m=Object(n.q)(null);Object(n.n)(()=>{We(()=>{r(),s()})},[r,s]),Object(Ve.a)(m,!e);const u=Object(n.m)(e=>{l({id:e}),c(),setTimeout(()=>{o({id:e})},250)},[l,o,c]),h=Object(T.a)();return n.a.createElement("div",{className:"RecentContacts custom-scroll"},e&&n.a.createElement("div",{className:"top-peers-section"},n.a.createElement("div",{ref:m,className:"top-peers no-selection"},e.map(e=>n.a.createElement("div",{className:"top-peer-item",onClick:()=>u(e)},n.a.createElement(z.a,{user:t[e]}),n.a.createElement("div",{className:"top-peer-name"},Object(G.a)(Object(d.Y)(t[e]))))))),a&&n.a.createElement("div",{className:"search-section pt-1"},n.a.createElement("h3",{className:"section-heading mt-0 recent-chats-header"},h("Recent"),n.a.createElement(R.a,{round:!0,size:"smaller",color:"translucent",ariaLabel:"Clear recent chats",onClick:i},n.a.createElement("i",{className:"icon-close"}))),a.map(e=>n.a.createElement(He,{chatId:e,onClick:u}))))})),Ke=a(130),Ze=a(110);a(250);var Qe=Object(n.h)(Object(c.h)((e,{chatId:t})=>{const a=Object(m.f)(e,t);if(!a)return{};const n=Object(d.T)(a);return{chat:a,...n&&{privateChatUser:Object(m.Bb)(e,n)},lastSyncTime:e.lastSyncTime}},(e,t)=>Object(u.l)(t,["focusMessage"]))(({message:e,searchQuery:t,chatId:a,chat:c,privateChatUser:r,focusMessage:s,lastSyncTime:l})=>{const i=Object(d.E)(e),m=Object(E.a)(Object(d.D)(e,"micro")),u=Object(n.m)(()=>{s({chatId:a,messageId:e.id})},[a,s,e.id]);if(Object(T.a)(),c)return n.a.createElement(fe.a,{className:"ChatMessage chat-item-clickable",ripple:!o.f,onClick:u},n.a.createElement(z.a,{chat:c,user:r,withOnlineStatus:!0,isSavedMessages:r&&r.isSelf,lastSyncTime:l}),n.a.createElement("div",{className:"info"},n.a.createElement("div",{className:"info-row"},n.a.createElement("div",{className:"title"},n.a.createElement("h3",null,Object(G.a)(Object(d.l)(c,r))),c.isVerified&&n.a.createElement(Ke.a,null)),n.a.createElement("div",{className:"message-date"},n.a.createElement(Ze.a,{className:"date"},Object(U.g)(1e3*e.date)))),n.a.createElement("div",{className:"subtitle"},n.a.createElement("div",{className:"message"},function(e,t,a){if(!t)return Object(G.a)(Object(d.M)(e));return n.a.createElement("span",{className:"media-preview"},n.a.createElement("img",{src:t,alt:""}),Object(d.O)(e)&&n.a.createElement("i",{className:"icon-play"}),Object(G.a)(Object(d.M)(e,!0),["emoji","highlight"],{highlight:a}))}(e,m||i,t)))))}));a(251);var _e=Object(n.h)(({searchDate:e,onSelect:t})=>{const a=Object(n.p)(()=>function(e){if(e.match(/^\d{2,4}-\d{2}-\d{2}$/g)){const t=new Date(e);return[{date:t,text:Object(U.a)(t)}]}const t=[],a=new Date,n=a.getFullYear(),c=a.getTime()>new Date(`${n}-${e}`).getTime()?n:n-1;for(let a=0;a<8;a++){const n=new Date(`${c-a}-${e}`);t.push({date:n,text:Object(U.a)(n)})}return t}(e),[e]);return n.a.createElement("section",{className:"DateSuggest custom-scroll custom-scroll-x"},a.map(({date:e,text:a})=>n.a.createElement("div",{onClick:()=>t(e),className:"date-item",key:a},n.a.createElement("i",{className:"icon-calendar"}),n.a.createElement("span",null,a))))}),Xe=a(108),Je=a(126),et=a(10);const tt=(e,t)=>Number(t.isVerified)-Number(e.isVerified),at=Object(K.g)(e=>e(),500,!0);var nt=Object(n.h)(Object(c.h)(e=>{const{byId:t}=e.chats,{byId:a}=e.users,{userIds:n}=e.contactList||{};if(!n)return{chatsById:t,usersById:a};const{currentUserId:c,messages:r,lastSyncTime:s}=e,{fetchingStatus:l,globalResults:o,localResults:i,resultsByType:m}=e.globalSearch,{chats:d,users:u}=o||{},{chats:h,users:b}=i||{},{byChatId:p}=r,{foundIds:g}=m&&m.text||{};return{currentUserId:c,localContactIds:n,localChats:h,localUsers:b,globalChats:d,globalUsers:u,foundIds:g,globalMessagesByChatId:p,chatsById:t,usersById:a,fetchingStatus:l,lastSyncTime:s}},(e,t)=>Object(u.l)(t,["openChat","addRecentlyFoundChatId","searchMessagesGlobal","setGlobalSearchChatId"]))(({searchQuery:e,searchDate:t,dateSearchQuery:a,currentUserId:c,localContactIds:r,localChats:l,localUsers:i,globalChats:m,globalUsers:h,foundIds:b,globalMessagesByChatId:p,chatsById:g,usersById:E,fetchingStatus:v,lastSyncTime:O,onReset:f,onSearchDateSelect:j,openChat:C,addRecentlyFoundChatId:y,searchMessagesGlobal:k,setGlobalSearchChatId:N})=>{const[S,I]=Object(n.r)(!1),[w,P]=Object(n.r)(!1),M=Object(n.m)(({direction:t})=>{O&&t===s.e.Backwards&&at(()=>{k({type:"text",query:e})})},[O,k,e]),F=Object(n.m)(e=>{C({id:e}),e!==c&&y({id:e}),o.f||f()},[c,C,y,f]),L=Object(n.m)(e=>{N({id:e})},[N]),A=Object(n.p)(()=>{if(!e||e.startsWith("@")&&e.length<2)return ze.a;const t=r?r.filter(t=>{const a=E[t];if(!a)return!1;const n=Object(d.Z)(a);return n&&Object(be.a)(n,e)||Object(be.a)(a.username,e)}).map(e=>E[e]):[];return Object(u.o)([...Object(be.a)(Object(et.b)("SavedMessages"),e)?[c]:[],...[...t,...l||[],...i||[]].sort(tt).map(e=>e.id)])},[e,r,l,i,E,c]),B=Object(n.p)(()=>!e||e.length<4||!m||!h?ze.a:Object(u.o)([...m,...h].sort(tt).map(e=>e.id)),[m,h,e]),D=Object(n.p)(()=>(e||t)&&b&&0!==b.length?b.map(e=>{const[t,a]=e.split("_").map(Number);return p&&p[t]&&p[t].byId[a]}).filter(Boolean).sort((e,t)=>t.date-e.date):ze.a,[b,p,e,t]),x=Object(n.m)(()=>{I(!S)},[S]),R=Object(n.m)(()=>{P(!w)},[w]),U=Object(T.a)();const G=v&&!v.chats&&!v.messages&&!A.length&&!B.length&&!D.length;return e||t?n.a.createElement(Oe.a,{className:"LeftSearch custom-scroll",items:D,onLoadMore:M,noFastList:!0},a&&n.a.createElement("div",{className:"chat-selection no-selection no-scrollbar"},n.a.createElement(_e,{searchDate:a,onSelect:j})),G&&n.a.createElement(Xe.a,null),!!A.length&&n.a.createElement("div",{className:"chat-selection no-selection no-scrollbar"},A.map(e=>n.a.createElement(Je.a,{chatOrUserId:e,onClick:L,clickArg:e}))),!!A.length&&n.a.createElement("div",{className:"search-section"},n.a.createElement("h3",{className:"section-heading"},A.length>3&&n.a.createElement(Ze.a,{onClick:x},S?"Show less":"Show more"),"Contacts and Chats"),A.map((e,t)=>{if(S||!(t>=3))return n.a.createElement(He,{chatId:e,onClick:F})})),!!B.length&&n.a.createElement("div",{className:"search-section"},n.a.createElement("h3",{className:"section-heading"},B.length>3&&n.a.createElement(Ze.a,{onClick:R},w?"Show less":"Show more"),"Global Search"),B.map((e,t)=>{if(w||!(t>=3))return n.a.createElement(He,{chatId:e,withHandle:!0,onClick:F})})),!!D.length&&n.a.createElement("div",{className:"search-section"},n.a.createElement("h3",{className:"section-heading"},U("SearchMessages")),D.map((function(t){const a=Object(d.M)(t),c=g[t.chatId];if(a&&c)return n.a.createElement(Qe,{chatId:t.chatId,message:t,searchQuery:e})})))):n.a.createElement(Ye,{onReset:f})}));const ct=Object(K.g)(e=>e(),500,!0);var rt=Object(n.h)(Object(c.h)(e=>{const{byId:t}=e.chats,{currentUserId:a,messages:{byChatId:n},lastSyncTime:c}=e,{fetchingStatus:r,resultsByType:s}=e.globalSearch,{foundIds:l}=s&&s.text||{};return{currentUserId:a,foundIds:l,globalMessagesByChatId:n,chatsById:t,fetchingStatus:r,lastSyncTime:c}},(e,t)=>Object(u.l)(t,["searchMessagesGlobal"]))(({searchQuery:e,currentUserId:t,dateSearchQuery:a,foundIds:c,globalMessagesByChatId:r,chatsById:l,fetchingStatus:o,lastSyncTime:i,searchMessagesGlobal:m,onSearchDateSelect:u})=>{const h=Object(n.m)(({direction:a})=>{i&&a===s.e.Backwards&&ct(()=>{m({type:"text",query:e,chatId:t})})},[t,i,m,e]),b=Object(n.p)(()=>c&&0!==c.length?c.map(e=>{const[t,a]=e.split("_").map(Number);return r&&r[t]&&r[t].byId[a]}).filter(Boolean).sort((e,t)=>t.date-e.date):ze.a,[c,r]);const p=o&&!o.chats&&!o.messages&&!b.length;return n.a.createElement("div",{className:"LeftSearch"},n.a.createElement(Oe.a,{className:"search-content custom-scroll chat-list",items:b,onLoadMore:h,noFastList:!0},a&&n.a.createElement("div",{className:"chat-selection no-selection no-scrollbar"},n.a.createElement(_e,{searchDate:a,onSelect:u})),p&&n.a.createElement(Xe.a,null),!!b.length&&b.map((function(t){const a=Object(d.M)(t),c=l[t.chatId];if(a&&c)return n.a.createElement(Qe,{chatId:t.chatId,message:t,searchQuery:e})}))))}));function st(e){return(t,a)=>{const{byId:n}=t.chats,{byId:c}=t.users,{fetchingStatus:r,resultsByType:s,chatId:l}=t.globalSearch,o="audio"!==e?e:a&&a.isVoice?"voice":"audio",{byChatId:i}=t.messages,{foundIds:m}=s&&s[o]||{};return{isLoading:void 0===m||!!r&&Boolean(r.chats||r.messages),chatsById:n,usersById:c,globalMessagesByChatId:i,foundIds:m,searchChatId:l,lastSyncTime:t.lastSyncTime}}}var lt=a(153),ot=a(109);const it=Object(K.g)(e=>e(),500,!0);var mt=Object(n.h)(Object(c.h)(st("media"),(e,t)=>Object(u.l)(t,["searchMessagesGlobal","openMediaViewer"]))(({searchQuery:e,searchChatId:t,isLoading:a,globalMessagesByChatId:c,foundIds:r,lastSyncTime:o,searchMessagesGlobal:i,openMediaViewer:m})=>{const d=Object(n.m)(({direction:a})=>{o&&a===s.e.Backwards&&it(()=>{i({type:"media",query:e,chatId:t})})},[o,i,e,t]),u=Object(n.p)(()=>r&&c?r.map(e=>{const[t,a]=e.split("_").map(Number);return c[t]&&c[t].byId[a]}).filter(Boolean):ze.a,[c,r]),h=Object(n.m)((e,t)=>{m({chatId:t,messageId:e,origin:s.h.SearchResult})},[m]);const b=Object(ot.a)([e],l.bb)&&!a,p=b&&r&&r.length>0&&!e,g=b&&r&&r.length>0&&e,E=Object(le.a)("search-content custom-scroll",g&&"chat-list");return n.a.createElement("div",{className:"LeftSearch"},n.a.createElement(Oe.a,{className:E,items:u,itemSelector:e?".ListItem":".Media",onLoadMore:d,noFastList:!0},!b&&n.a.createElement(ge.a,null),b&&(!r||0===r.length)&&n.a.createElement(Xe.a,null),p&&n.a.createElement("div",{className:"media-list"},u.map(e=>n.a.createElement(lt.a,{key:e.id,idPrefix:"search-media",message:e,onClick:h}))),g&&u.map(e=>n.a.createElement(Qe,{key:e.id,chatId:e.chatId,message:e}))))}));function dt(e,t,a){const{senderId:n}=e;if(!n)return;const c=Object(d.lb)(n)?a[n]:t[n];let r=Object(d.U)(c);const s=t[e.chatId];return s&&(Object(d.lb)(n)&&c.isSelf?r="You → "+Object(d.l)(s):Object(d.kb)(s)&&(r+=" → "+Object(d.l)(s))),r}var ut=a(172);const ht=Object(K.g)(e=>e(),500,!0);var bt=Object(n.h)(Object(c.h)(st("links"),(e,t)=>Object(u.l)(t,["searchMessagesGlobal","focusMessage"]))(({searchQuery:e,searchChatId:t,isLoading:a,chatsById:c,usersById:r,globalMessagesByChatId:o,foundIds:i,lastSyncTime:m,searchMessagesGlobal:d,focusMessage:u})=>{const h=Object(n.m)(({direction:a})=>{m&&a===s.e.Backwards&&ht(()=>{d({type:"links",query:e,chatId:t})})},[m,d,e,t]),b=Object(n.p)(()=>i&&o?i.map(e=>{const[t,a]=e.split("_").map(Number);return o[t]&&o[t].byId[a]}).filter(Boolean):ze.a,[o,i]),p=Object(n.m)((e,t)=>{u({chatId:t,messageId:e})},[u]);const g=Object(ot.a)([e],l.bb)&&!a;return n.a.createElement("div",{className:"LeftSearch"},n.a.createElement(Oe.a,{className:"search-content documents-list custom-scroll",items:b,onLoadMore:h,noFastList:!0},!g&&n.a.createElement(ge.a,null),g&&(!i||0===i.length)&&n.a.createElement(Xe.a,null),g&&i&&i.length>0&&b.map((e,t)=>{const a=0===t||Object(U.n)(e.date)!==Object(U.n)(b[t-1].date);return n.a.createElement("div",{className:"ListItem",key:e.id},a&&n.a.createElement("p",{className:"section-heading"},Object(U.f)(new Date(1e3*e.date))),n.a.createElement(ut.a,{key:e.id,message:e,senderTitle:dt(e,c,r),onMessageClick:p}))})))})),pt=a(150);const gt=Object(K.g)(e=>e(),500,!0);var Et=Object(n.h)(Object(c.h)(st("documents"),(e,t)=>Object(u.l)(t,["searchMessagesGlobal","focusMessage"]))(({searchQuery:e,searchChatId:t,isLoading:a,chatsById:c,usersById:r,globalMessagesByChatId:o,foundIds:i,lastSyncTime:m,searchMessagesGlobal:u,focusMessage:h})=>{const b=Object(n.m)(({direction:a})=>{m&&a===s.e.Backwards&>(()=>{u({type:"documents",query:e,chatId:t})})},[m,u,e,t]),p=Object(n.p)(()=>i&&o?i.map(e=>{const[t,a]=e.split("_").map(Number),n=o[t]&&o[t].byId[a];return n&&Object(d.y)(n)?n:void 0}).filter(Boolean):ze.a,[o,i]),g=Object(n.m)((e,t)=>{h({chatId:t,messageId:e})},[h]);const E=Object(ot.a)([e],l.bb)&&!a;return n.a.createElement("div",{className:"LeftSearch"},n.a.createElement(Oe.a,{className:"search-content documents-list custom-scroll",items:p,onLoadMore:b,noFastList:!0},!E&&n.a.createElement(ge.a,null),E&&(!i||0===i.length)&&n.a.createElement(Xe.a,null),E&&i&&i.length>0&&p.map((e,t)=>{const a=0===t||Object(U.n)(e.date)!==Object(U.n)(p[t-1].date);return n.a.createElement("div",{className:"ListItem",key:e.id},a&&n.a.createElement("p",{className:"section-heading"},Object(U.f)(new Date(1e3*e.date))),n.a.createElement(pt.a,{message:e,withDate:!0,datetime:e.date,smaller:!0,sender:dt(e,c,r),className:"scroll-item",onDateClick:g}))})))})),vt=a(155);const Ot=Object(K.g)(e=>e(),500,!0);var ft=Object(n.h)(Object(c.h)(st("audio"),(e,t)=>Object(u.l)(t,["searchMessagesGlobal","focusMessage","openAudioPlayer"]))(({isVoice:e,searchQuery:t,searchChatId:a,isLoading:c,chatsById:r,usersById:o,globalMessagesByChatId:i,foundIds:m,lastSyncTime:d,searchMessagesGlobal:u,focusMessage:h,openAudioPlayer:b})=>{const p=e?"voice":"audio",g=Object(n.m)(({direction:e})=>{d&&e===s.e.Backwards&&Ot(()=>{u({type:p,query:t,chatId:a})})},[p,d,u,t,a]),E=Object(n.p)(()=>m&&i?m.map(e=>{const[t,a]=e.split("_").map(Number);return i[t]&&i[t].byId[a]}).filter(Boolean):ze.a,[i,m]),v=Object(n.m)((e,t)=>{h({chatId:t,messageId:e})},[h]),O=Object(n.m)((e,t)=>{b({chatId:t,messageId:e})},[b]);const f=Object(ot.a)([t],l.bb)&&!c;return n.a.createElement("div",{className:"LeftSearch"},n.a.createElement(Oe.a,{className:"search-content documents-list custom-scroll",items:E,onLoadMore:g,noFastList:!0},!f&&n.a.createElement(ge.a,null),f&&(!m||0===m.length)&&n.a.createElement(Xe.a,null),f&&m&&m.length>0&&E.map((e,t)=>{const a=0===t||Object(U.n)(e.date)!==Object(U.n)(E[t-1].date);return n.a.createElement("div",{className:"ListItem",key:e.id},a&&n.a.createElement("p",{className:"section-heading"},Object(U.f)(new Date(1e3*e.date))),n.a.createElement(vt.a,{key:e.id,message:e,renderingFor:"searchResult",senderTitle:dt(e,r,o),date:e.date,lastSyncTime:d,className:"scroll-item",onPlay:O,onDateClick:v}))})))}));a(252);const jt=[{type:s.c.ChatList,title:"SearchAllChatsShort"},{type:s.c.Media,title:"SharedMediaTab2"},{type:s.c.Links,title:"SharedLinksTab2"},{type:s.c.Files,title:"SharedFilesTab2"},{type:s.c.Music,title:"SharedMusicTab2"},{type:s.c.Voice,title:"SharedVoiceTab2"}],Ct=[{type:s.c.ChatList,title:"All Messages"},...jt.slice(1)],yt=Object.keys(s.c).length/2;var kt=Object(n.h)(Object(c.h)(e=>{const{currentContent:t,chatId:a}=e.globalSearch;return{currentContent:t,chatId:a}},(e,t)=>Object(u.l)(t,["setGlobalSearchContent","setGlobalSearchDate"]))(({searchQuery:e,searchDate:t,currentContent:a=s.c.ChatList,chatId:c,setGlobalSearchContent:r,setGlobalSearchDate:l,onReset:o})=>{const[i,m]=Object(n.r)(0),d=Object(n.p)(()=>Object(U.l)(e),[e]),u=Object(n.m)(e=>{const t=jt[e];r({content:t.type}),m(e)},[r]),h=Object(n.m)(e=>{l({date:e.getTime()/1e3})},[l]);return n.a.createElement("div",{className:"LeftSearch"},n.a.createElement(Ge.a,{activeTab:i,tabs:c?Ct:jt,onSwitchTab:u}),n.a.createElement(x.a,{name:"slide",renderCount:yt,activeKey:a},()=>{switch(a){case s.c.ChatList:return c?n.a.createElement(rt,{searchQuery:e,dateSearchQuery:d,onReset:o,onSearchDateSelect:h}):n.a.createElement(nt,{searchQuery:e,searchDate:t,dateSearchQuery:d,onReset:o,onSearchDateSelect:h});case s.c.Media:return n.a.createElement(mt,{searchQuery:e});case s.c.Links:return n.a.createElement(bt,{searchQuery:e});case s.c.Files:return n.a.createElement(Et,{searchQuery:e});case s.c.Music:return n.a.createElement(ft,{key:"audio",searchQuery:e});case s.c.Voice:return n.a.createElement(ft,{key:"voice",isVoice:!0,searchQuery:e});default:return}}))}));function Nt(e,t){const a=Object(n.q)(e),[c,r]=Object(n.r)(t);return[c,Object(n.m)(e=>{r(t=>a.current(t,e))},[])]}const St=[{icon:"user",title:"FilterContacts",key:"contacts"},{icon:"non-contacts",title:"FilterNonContacts",key:"nonContacts"},{icon:"group",title:"FilterGroups",key:"groups"},{icon:"channel",title:"FilterChannels",key:"channels"},{icon:"bots",title:"FilterBots",key:"bots"}],It=[{icon:"mute",title:"FilterMuted",key:"excludeMuted"},{icon:"archive",title:"FilterArchived",key:"excludeArchived"},{icon:"readchats",title:"FilterRead",key:"excludeRead"}],wt=["includedChatIds","bots","channels","groups","contacts","nonContacts"],Pt=["excludedChatIds","excludeArchived","excludeMuted","excludeRead"];function Mt(e,t,a){let n=[],c=[];if("included"===t){const{includedChatIds:t,...r}=a?e.includeFilters||{}:Object(u.l)(e.folder,wt);n=t||[],c=Object.keys(r).filter(e=>Boolean(r[e]))}else{const{excludedChatIds:t,...r}=a?e.excludeFilters||{}:Object(u.l)(e.folder,Pt);n=t||[],c=Object.keys(r).filter(e=>Boolean(r[e]))}return{selectedChatIds:n,selectedChatTypes:c}}function Ft(e){if(e){const{includedChatIds:t,...a}=e;if(Object.values(a).filter(Boolean).length>1||t&&t.length)return"";if(a.bots)return"Bots";if(a.groups)return"Groups";if(a.channels)return"Channels";if(a.contacts)return"Contacts";if(a.nonContacts)return"Non-Contacts"}return""}const Lt={mode:"create",chatFilter:"",folder:{title:"",includedChatIds:[],excludedChatIds:[]}},At=(e,t)=>{switch(t.type){case"setTitle":return{...e,folder:{...e.folder,title:t.payload},isTouched:!0};case"editIncludeFilters":return{...e,includeFilters:Object(u.l)(e.folder,wt)};case"editExcludeFilters":return{...e,excludeFilters:Object(u.l)(e.folder,Pt)};case"setIncludeFilters":return{...e,includeFilters:t.payload,chatFilter:""};case"setExcludeFilters":return{...e,excludeFilters:t.payload,chatFilter:""};case"saveFilters":return e.includeFilters?{...e,folder:{...Object(u.j)(e.folder,wt),title:e.folder.title?e.folder.title:Ft(e.includeFilters),...e.includeFilters},includeFilters:void 0,chatFilter:"",isTouched:!0}:e.excludeFilters?{...e,folder:{...Object(u.j)(e.folder,Pt),...e.excludeFilters},excludeFilters:void 0,chatFilter:"",isTouched:!0}:e;case"editFolder":{const{id:e,description:a,...n}=t.payload;return{mode:"edit",folderId:e,folder:n,chatFilter:""}}case"setChatFilter":return{...e,chatFilter:t.payload};case"setIsLoading":return{...e,isLoading:t.payload};case"setError":return{...e,error:t.payload};case"reset":return Lt;default:return e}};const Tt={currentPassword:"",password:"",hint:"",email:""},Bt=(e,t)=>{switch(t.type){case"setCurrentPassword":return{...e,currentPassword:t.payload};case"setPassword":return{...e,password:t.payload};case"setHint":return{...e,hint:t.payload};case"setEmail":return{...e,email:t.payload};case"reset":return Tt;default:return e}};var Dt=a(107);var xt=Object(n.h)(Object(c.h)(void 0,(e,t)=>Object(u.l)(t,["signOut","deleteChatFolder"]))(({currentScreen:e,editedFolderId:t,onReset:a,onSaveFilter:c,signOut:r,deleteChatFolder:l})=>{const[i,m]=Object(n.r)(!1),[d,u]=Object(n.r)(!1),h=Object(n.m)(()=>{m(!0)},[]),b=Object(n.m)(()=>{m(!1)},[]),p=Object(n.m)(()=>{u(!0)},[]),g=Object(n.m)(()=>{u(!1)},[]),E=Object(n.m)(()=>{b(),r()},[b,r]),v=Object(n.m)(()=>{g(),l({id:t}),a()},[t,g,l,a]),O=Object(n.p)(()=>({onTrigger:e,isOpen:t})=>n.a.createElement(R.a,{round:!0,ripple:!o.f,size:"smaller",color:"translucent",className:t?"active":"",onClick:e,ariaLabel:"More actions"},n.a.createElement("i",{className:"icon-more"})),[]),f=Object(T.a)();return n.a.createElement("div",{className:"left-header"},n.a.createElement(R.a,{round:!0,size:"smaller",color:"translucent",onClick:a,ariaLabel:f("AccDescrGoBack")},n.a.createElement("i",{className:"icon-arrow-left"})),function(){switch(e){case s.m.EditProfile:return n.a.createElement("h3",null,f("EditProfile"));case s.m.General:return n.a.createElement("h3",null,f("General"));case s.m.Notifications:return n.a.createElement("h3",null,f("Notifications"));case s.m.Privacy:return n.a.createElement("h3",null,f("PrivacySettings"));case s.m.Language:return n.a.createElement("h3",null,f("Language"));case s.m.GeneralChatBackground:return n.a.createElement("h3",null,f("ChatBackground"));case s.m.GeneralChatBackgroundColor:return n.a.createElement("h3",null,f("SetColor"));case s.m.PrivacyPhoneNumber:return n.a.createElement("h3",null,f("PrivacyPhone"));case s.m.PrivacyLastSeen:return n.a.createElement("h3",null,f("PrivacyLastSeen"));case s.m.PrivacyProfilePhoto:return n.a.createElement("h3",null,f("Privacy.ProfilePhoto"));case s.m.PrivacyForwarding:return n.a.createElement("h3",null,f("PrivacyForwards"));case s.m.PrivacyGroupChats:return n.a.createElement("h3",null,f("AutodownloadGroupChats"));case s.m.PrivacyPhoneNumberAllowedContacts:case s.m.PrivacyLastSeenAllowedContacts:case s.m.PrivacyProfilePhotoAllowedContacts:case s.m.PrivacyForwardingAllowedContacts:case s.m.PrivacyGroupChatsAllowedContacts:return n.a.createElement("h3",null,f("AlwaysShareWith"));case s.m.PrivacyPhoneNumberDeniedContacts:case s.m.PrivacyLastSeenDeniedContacts:case s.m.PrivacyProfilePhotoDeniedContacts:case s.m.PrivacyForwardingDeniedContacts:case s.m.PrivacyGroupChatsDeniedContacts:return n.a.createElement("h3",null,f("NeverShareWith"));case s.m.PrivacyActiveSessions:return n.a.createElement("h3",null,f("SessionsTitle"));case s.m.PrivacyBlockedUsers:return n.a.createElement("h3",null,f("BlockedUsers"));case s.m.TwoFaDisabled:case s.m.TwoFaEnabled:return n.a.createElement("h3",null,f("TwoStepVerification"));case s.m.TwoFaNewPassword:case s.m.TwoFaChangePasswordNew:case s.m.TwoFaChangePasswordConfirm:return n.a.createElement("h3",null,f("EnterPassword"));case s.m.TwoFaNewPasswordConfirm:return n.a.createElement("h3",null,f("PleaseReEnterPassword"));case s.m.TwoFaNewPasswordHint:case s.m.TwoFaChangePasswordHint:return n.a.createElement("h3",null,f("PasswordHint"));case s.m.TwoFaNewPasswordEmail:case s.m.TwoFaRecoveryEmail:return n.a.createElement("h3",null,f("RecoveryEmailTitle"));case s.m.TwoFaNewPasswordEmailCode:case s.m.TwoFaRecoveryEmailCode:return n.a.createElement("h3",null,"Recovery Email Code");case s.m.TwoFaCongratulations:return n.a.createElement("h3",null,f("TwoStepVerificationPasswordSet"));case s.m.TwoFaChangePasswordCurrent:case s.m.TwoFaTurnOff:case s.m.TwoFaRecoveryEmailCurrentPassword:return n.a.createElement("h3",null,f("PleaseEnterCurrentPassword"));case s.m.Folders:return n.a.createElement("h3",null,f("Filters"));case s.m.FoldersCreateFolder:return n.a.createElement("h3",null,f("FilterNew"));case s.m.FoldersEditFolder:return n.a.createElement("div",{className:"settings-main-header"},n.a.createElement("h3",null,f("FilterEdit")),t&&n.a.createElement(H.a,{className:"settings-more-menu",trigger:O,positionX:"right"},n.a.createElement(V.a,{icon:"delete",destructive:!0,onClick:p},"Delete Folder")));case s.m.FoldersIncludedChats:case s.m.FoldersExcludedChats:return n.a.createElement("div",{className:"settings-main-header"},e===s.m.FoldersIncludedChats?n.a.createElement("h3",null,f("FilterInclude")):n.a.createElement("h3",null,f("FilterExclude")),n.a.createElement(R.a,{round:!0,size:"smaller",color:"translucent",className:"color-primary",onClick:c,ariaLabel:f("AutoDeleteConfirm")},n.a.createElement("i",{className:"icon-check"})));default:return n.a.createElement("div",{className:"settings-main-header"},n.a.createElement("h3",null,f("SETTINGS")),n.a.createElement(H.a,{className:"settings-more-menu",trigger:O,positionX:"right"},n.a.createElement(V.a,{icon:"logout",onClick:h},f("LogOutTitle"))))}}(),n.a.createElement(Dt.a,{isOpen:i,onClose:b,text:"Are you sure you want to log out?",confirmLabel:"Log Out",confirmHandler:E,confirmIsDestructive:!0}),n.a.createElement(Dt.a,{isOpen:d,onClose:g,text:"Are you sure you want to delete this folder?",confirmLabel:"Delete",confirmHandler:v,confirmIsDestructive:!0}))})),Rt=a(19);var Ut=Object(n.h)(Object(c.h)(e=>{const{currentUserId:t}=e;return{currentUser:t?Object(m.Bb)(e,t):void 0}})(({onScreenSelect:e,currentUser:t})=>{const a=Object(T.a)();return n.a.createElement("div",{className:"settings-content custom-scroll"},n.a.createElement("div",{className:"settings-main-menu"},t&&n.a.createElement("div",{className:"settings-current-user"},n.a.createElement(z.a,{user:t,size:"jumbo"}),n.a.createElement("p",{className:"name"},Object(d.Z)(t)),n.a.createElement("p",{className:"phone"},Object(Rt.c)(t.phoneNumber))),n.a.createElement(fe.a,{icon:"edit",onClick:()=>e(s.m.EditProfile)},a("EditProfile")),n.a.createElement(fe.a,{icon:"folder",onClick:()=>e(s.m.Folders)},a("Filters")),n.a.createElement(fe.a,{icon:"settings",onClick:()=>e(s.m.General)},a("GeneralSettings")),n.a.createElement(fe.a,{icon:"unmute",onClick:()=>e(s.m.Notifications)},a("Notifications")),n.a.createElement(fe.a,{icon:"lock",onClick:()=>e(s.m.Privacy)},a("PrivacySettings")),n.a.createElement(fe.a,{icon:"language",onClick:()=>e(s.m.Language)},a("Language"))))})),Gt=a(120);a(253);var zt=({isShown:e,className:t,color:a="primary",ariaLabel:c,disabled:r,onClick:s,children:l})=>{const o=Object(le.a)("FloatingActionButton",e&&"revealed",t);return n.a.createElement(R.a,{className:o,color:a,round:!0,disabled:r,onClick:e&&!r?s:void 0,ariaLabel:c,tabIndex:-1},l)};const qt=/https:\/\/t\.me\/?/i,$t=/^([a-zA-Z0-9_]+)$/,Ht=Object(K.a)(e=>e(),250,!1);var Vt=Object(n.h)(({currentUsername:e,asLink:t,isLoading:a,isUsernameAvailable:c,checkUsername:r,onChange:s})=>{const[l,o]=Object(n.r)(e||""),i=Object(T.a)(),m=t?"SetUrl":"Username",d=i(t?"SetUrlPlaceholder":"Username"),[u,h]=Object(n.p)(()=>l.length?l.length<5?[void 0,d+" is too short"]:l.length>32?[void 0,d+" is too long"]:$t.test(l)?void 0===c?[]:[c?i(m+"Available","Username"):void 0,!1===c?i(m+"InUse"):void 0]:[void 0,d+" contains invalid characters"]:[],[l,c,i,m,d]);Object(n.n)(()=>{o(e||"")},[t,e]);const b=Object(n.m)(e=>{const a=e.target.value.trim().replace(qt,"");o(a),e.target.value=`${t?"https://t.me/":""}${a}`;const n=function(e){return e.length>=5&&e.length<=32&&$t.test(e)}(a);n&&Ht(()=>{r({username:a})}),s&&s(!!n&&a)},[t,r,s]);return n.a.createElement(ve.a,{value:`${t?"https://t.me/":""}${l}`,onChange:b,label:d,error:h,success:u,readOnly:a})});const Wt=Object(K.g)(e=>e(),6e4,!0);var Yt=Object(n.h)(Object(c.h)(e=>{const{currentUserId:t}=e,{progress:a,isUsernameAvailable:n}=e.profileEdit||{},c=t?Object(m.Bb)(e,t):void 0;if(!c)return{progress:a,isUsernameAvailable:n};const{firstName:r,lastName:s,username:l,fullInfo:o}=c,{bio:i}=o||{};return{currentAvatarHash:Object(d.f)(c),currentFirstName:r,currentLastName:s,currentBio:i,currentUsername:l,progress:a,isUsernameAvailable:n}},(e,t)=>Object(u.l)(t,["loadCurrentUser","updateProfile","checkUsername"]))(({currentAvatarHash:e,currentFirstName:t,currentLastName:a,currentBio:c,currentUsername:l,progress:o,isUsernameAvailable:i,loadCurrentUser:m,updateProfile:d,checkUsername:u})=>{const[h,b]=Object(n.r)(!1),[p,g]=Object(n.r)(!1),[v,O]=Object(n.r)(),[f,j]=Object(n.r)(),[C,y]=Object(n.r)(t||""),[k,N]=Object(n.r)(a||""),[S,I]=Object(n.r)(c||""),[w,P]=Object(n.r)(l||""),M=Object(E.a)(e,!1,r.ApiMediaFormat.BlobUrl),F=o===s.j.InProgress,L=!1===w,A=Object(n.p)(()=>!L&&(Boolean(f)||p||!0===i),[f,p,L,i]);Object(n.n)(()=>{Wt(()=>{m()})},[m]),Object(n.n)(()=>{j(void 0)},[M]),Object(n.n)(()=>{y(t||""),N(a||""),I(c||"")},[t,a,c]),Object(n.n)(()=>{P(l||"")},[l]),Object(n.n)(()=>{o===s.j.Complete&&(g(!1),b(!1),O(void 0))},[o]);const D=Object(n.m)(e=>{j(e)},[]),x=Object(n.m)(e=>{y(e.target.value),g(!0)},[]),R=Object(n.m)(e=>{N(e.target.value),g(!0)},[]),U=Object(n.m)(e=>{I(e.target.value),g(!0)},[]),z=Object(n.m)(e=>{P(e),b(!0)},[]),q=Object(n.m)(()=>{const e=C.trim(),t=k.trim(),a=S.trim();e.length?a.length>70?O("Bio can' be longer than 70 characters"):d({photo:f,...p&&{firstName:e,lastName:t,bio:a},...h&&{username:w}}):O("Please provide your first name")},[f,C,k,S,p,w,h,d]),$=Object(T.a)();return n.a.createElement("div",{className:"settings-fab-wrapper"},n.a.createElement("div",{className:"settings-content custom-scroll"},n.a.createElement("div",{className:"settings-edit-profile"},n.a.createElement(Gt.a,{currentAvatarBlobUrl:M,onChange:D,title:"Edit your profile photo",disabled:F}),n.a.createElement(ve.a,{value:C,onChange:x,label:$("FirstName"),disabled:F,error:"Please provide your first name"===v?v:void 0}),n.a.createElement(ve.a,{value:k,onChange:R,label:$("LastName"),disabled:F}),n.a.createElement(ve.a,{value:S,onChange:U,label:$("UserBio"),disabled:F,error:"Bio can' be longer than 70 characters"===v?v:void 0}),n.a.createElement("p",{className:"settings-item-description"},Object(G.a)($("BioAbout"),["br","simple_markdown"]))),n.a.createElement("div",{className:"settings-item"},n.a.createElement("h4",{className:"settings-item-header"},$("Username")),n.a.createElement(Vt,{currentUsername:w||"",isLoading:F,isUsernameAvailable:i,checkUsername:u,onChange:z}),n.a.createElement("p",{className:"settings-item-description"},Object(G.a)($("UsernameHelp"),["br","simple_markdown"])),w&&n.a.createElement("p",{className:"settings-item-description"},"This link opens a chat with you:",n.a.createElement("br",null),n.a.createElement("span",{className:"username-link"},"https://t.me/",w)))),n.a.createElement(zt,{isShown:A,onClick:q,disabled:F,ariaLabel:"Save changes"},F?n.a.createElement(B.a,{color:"white"}):n.a.createElement("i",{className:"icon-check"})))})),Kt=a(116),Zt=a(105);const Qt=Object(K.g)(e=>e(),6e4,!0);var _t=Object(n.h)(Object(c.h)(e=>{const{chats:{byId:t},users:{byId:a}}=e,{orderedIds:n,byId:c,recommended:r}=e.chatFolders;return{chatsById:t,usersById:a,orderedFolderIds:n,foldersById:c,recommendedChatFolders:r}},(e,t)=>Object(u.l)(t,["loadRecommendedChatFolders","addChatFolder","showError"]))(({onCreateFolder:e,onEditFolder:t,chatsById:a,usersById:c,orderedFolderIds:r,foldersById:s,recommendedChatFolders:o,loadRecommendedChatFolders:i,addChatFolder:m,showError:u})=>{const[h,b]=Object(n.r)(),[p,g]=Object(n.r)(!1),E=Object(n.m)(()=>g(!0),[]);Object(n.n)(()=>{h||Object(Kt.a)("FoldersAll").then(b)},[h]),Object(n.n)(()=>{Qt(()=>{i()})},[i]);const v=Object(n.m)(()=>{Object.keys(s).length>=10?u({error:{message:"DIALOG_FILTERS_TOO_MUCH"}}):e()},[s,u,e]),O=Object(T.a)(),f=Object(n.p)(()=>{if(!r)return;const e=Object.keys(a).map(Number);return r.map(t=>{const n=s[t];return{id:n.id,title:n.title,subtitle:Object(d.o)(a,c,n,e,O)}})},[r,a,s,c,O]),j=Object(n.m)(e=>{Object.keys(s).length>=10?u({error:{message:"DIALOG_FILTERS_TOO_MUCH"}}):m({folder:e})},[s,m,u]);return n.a.createElement("div",{className:"settings-content custom-scroll"},n.a.createElement("div",{className:"settings-content-header"},n.a.createElement("div",{className:"settings-content-icon"},h&&n.a.createElement(Zt.a,{id:"settingsFoldersMain",size:l.fb,animationData:h,play:p,noLoop:!0,onLoad:E})),n.a.createElement("p",{className:"settings-item-description mb-3"},O("CreateNewFilterInfo")),n.a.createElement(R.a,{className:"with-icon mb-2",color:"primary",size:"smaller",pill:!0,fluid:!0,onClick:v},n.a.createElement("i",{className:"icon-add"}),O("CreateNewFilter"))),n.a.createElement("div",{className:"settings-item pt-3"},n.a.createElement("h4",{className:"settings-item-header mb-3"},O("Filters")),f&&f.length?f.map(e=>n.a.createElement(fe.a,{className:"mb-2",narrow:!0,onClick:()=>t(s[e.id])},n.a.createElement("div",{className:"multiline-item"},n.a.createElement("span",{className:"title"},e.title),n.a.createElement("span",{className:"subtitle"},e.subtitle)))):f&&!f.length?n.a.createElement("p",{className:"settings-item-description my-4"},"You have no folders yet."):n.a.createElement(ge.a,null)),o&&!!o.length&&n.a.createElement("div",{className:"settings-item pt-3"},n.a.createElement("h4",{className:"settings-item-header mb-3"},O("FilterRecommended")),o.map(e=>n.a.createElement(fe.a,{className:"mb-2",narrow:!0,onClick:()=>j(e)},n.a.createElement("div",{className:"settings-folders-recommended-item"},n.a.createElement("div",{className:"multiline-item"},n.a.createElement("span",{className:"title"},e.title),n.a.createElement("span",{className:"subtitle"},e.description)),n.a.createElement(R.a,{className:"px-3",color:"primary",size:"tiny",pill:!0,fluid:!0},O("Add")))))))}));a(254);var Xt=({count:e,itemName:t,itemPluralName:a,isLoading:c,onClick:r})=>n.a.createElement(R.a,{className:"ShowMoreButton",color:"translucent",size:"smaller",isText:!0,isLoading:c,onClick:r},n.a.createElement("i",{className:"icon-down"}),"Show ",e," more ",e>1?a||t+"s":t);const Jt="Please provide a title for this folder.",ea="Please select at least one chat for this folder.";var ta=Object(n.h)(Object(c.h)(e=>{const{listIds:t}=e.chats;return{loadedActiveChatIds:t.active,loadedArchivedChatIds:t.archived}},(e,t)=>Object(u.l)(t,["editChatFolder","addChatFolder","loadMoreChats"]))(({state:e,dispatch:t,onAddIncludedChats:a,onAddExcludedChats:c,onReset:r,loadedActiveChatIds:s,loadedArchivedChatIds:o,editChatFolder:i,addChatFolder:m,loadMoreChats:h})=>{const[b,p]=Object(n.r)(),[g,E]=Object(n.r)(!1),v=Object(n.m)(()=>E(!0),[]),[O,f]=Object(n.r)(!1),[j,C]=Object(n.r)(!1),{selectedChatIds:y,selectedChatTypes:k}=Mt(e,"included"),{selectedChatIds:N,selectedChatTypes:S}=Mt(e,"excluded");Object(n.n)(()=>{b||Object(Kt.a)("FoldersNew").then(p)},[b]),Object(n.n)(()=>{f(!1),C(!1)},[e.folderId]);const[I,w]=Object(n.p)(()=>{const e=new Set([...s||[],...o||[]]),t=Object(u.f)(y,e),a=Object(u.f)(N,e);return[O?t:t.slice(0,5-k.length),j?a:a.slice(0,5-S.length)]},[N,y,k,S,j,O,s,o]);Object(n.n)(()=>{(I.lengthf(!0):()=>C(!0);return n.a.createElement(n.a.Fragment,null,t.map(t=>function(e,t){const a="included"===t?St.find(({key:t})=>t===e):It.find(({key:t})=>t===e);if(a)return n.a.createElement(fe.a,{key:a.key,className:"settings-folders-list-item mb-1",icon:a.icon,narrow:!0,inactive:!0},P(a.title))}(t,e)),a.map(e=>n.a.createElement(fe.a,{className:"settings-folders-list-item mb-1",narrow:!0,inactive:!0},Object(d.lb)(e)?n.a.createElement(je.a,{avatarSize:"small",userId:e}):n.a.createElement(Ce.a,{avatarSize:"small",chatId:e}))),!c&&r>0&&n.a.createElement(Xt,{count:r,itemName:"chat",onClick:s}))}return n.a.createElement("div",{className:"settings-fab-wrapper"},n.a.createElement("div",{className:"settings-content custom-scroll"},n.a.createElement("div",{className:"settings-content-header"},n.a.createElement("div",{className:"settings-content-icon"},b&&n.a.createElement(Zt.a,{id:"settingsFoldersEdit",size:l.fb,animationData:b,play:g&&String(e.folderId),noLoop:!0,onLoad:v})),"create"===e.mode&&n.a.createElement("p",{className:"settings-item-description mb-3"},P("FilterIncludeInfo")),n.a.createElement(ve.a,{className:"mb-0",label:P("FilterNameHint"),value:e.folder.title,onChange:function(e){const{currentTarget:a}=e;t({type:"setTitle",payload:a.value.trim()})},error:e.error&&e.error===Jt?Jt:void 0})),n.a.createElement("div",{className:"settings-item no-border pt-3"},e.error&&e.error===ea&&n.a.createElement("p",{className:"settings-item-description color-danger mb-2"},e.error),n.a.createElement("h4",{className:"settings-item-header mb-3"},P("FilterInclude")),n.a.createElement(fe.a,{className:"settings-folders-list-item color-primary mb-0",icon:"add",onClick:a},P("FilterAddChats")),M("included")),n.a.createElement("div",{className:"settings-item no-border pt-3"},n.a.createElement("h4",{className:"settings-item-header mb-3"},P("FilterExclude")),n.a.createElement(fe.a,{className:"settings-folders-list-item color-primary mb-0",icon:"add",onClick:c},P("FilterAddChats")),M("excluded"))),n.a.createElement(zt,{isShown:!!e.isTouched,disabled:e.isLoading,onClick:function(){const{title:a}=e.folder;a?y.length||Object.keys(k).length?(t({type:"setIsLoading",payload:!0}),"edit"===e.mode?i({id:e.folderId,folderUpdate:e.folder}):m({folder:e.folder}),setTimeout(()=>{r()},500)):t({type:"setError",payload:ea}):t({type:"setError",payload:Jt})},ariaLabel:"edit"===e.mode?"Save changes":"Create folder"},e.isLoading?n.a.createElement(B.a,{color:"white"}):n.a.createElement("i",{className:"icon-check"})))})),aa=a(40);a(173),a(255);var na=Object(n.h)(({mode:e,chatIds:t,selectedIds:a,selectedChatTypes:c,filterValue:r,onSelectedIdsChange:s,onSelectedChatTypesChange:l,onFilterChange:o,onLoadMore:i})=>{const m=Object(n.q)(null),u="included"===e?St:It,h=a.length+c.length>10,b=a.length>=100;Object(n.n)(()=>{setTimeout(()=>{requestAnimationFrame(()=>{m.current.focus()})},500)},[]);const p=Object(n.m)(e=>{const t=[...a];t.includes(e)?t.splice(t.indexOf(e),1):t.push(e),s(t)},[a,s]),g=Object(n.m)(e=>{const t=[...c];t.includes(e)?t.splice(t.indexOf(e),1):t.push(e),l(t)},[c,l]),E=Object(n.m)(e=>{const{value:t}=e.currentTarget;o(t)},[o]),v=Object(T.a)();const[O,f]=Object(pe.a)(i,t,Boolean(r));return n.a.createElement("div",{className:"Picker SettingsFoldersChatsPicker"},n.a.createElement("div",{className:"picker-header custom-scroll"},c.map((function(e){const t=u.find(({key:t})=>e===t);if(t)return n.a.createElement(Je.a,{icon:t.icon,title:v(t.title),isMinimized:h,canClose:!0,onClick:g,clickArg:t.key})})),a.map((e,t)=>n.a.createElement(Je.a,{chatOrUserId:e,isMinimized:h&&tg(e.key),ripple:!0},n.a.createElement("i",{className:"icon-"+e.icon}),n.a.createElement("h3",{className:"chat-type"},v(e.title)),n.a.createElement(aa.a,{label:"",checked:c.includes(e.key),round:!0}))})),n.a.createElement("div",{key:"divider",className:"picker-list-divider"}),n.a.createElement("h4",{key:"header2",className:"settings-item-header"},v("FilterChats"))),O&&O.length?O.map((function(e){const t=a.includes(e);return n.a.createElement(fe.a,{key:e,className:"chat-item-clickable picker-list-item chat-item",onClick:()=>p(e),ripple:!0,disabled:!t&&b},Object(d.lb)(e)?n.a.createElement(je.a,{userId:e}):n.a.createElement(Ce.a,{chatId:e,withChatType:!0}),n.a.createElement(aa.a,{label:"",checked:t,round:!0}))})):O&&!O.length?n.a.createElement("p",{className:"no-results",key:"no-results"},"Sorry, nothing found."):n.a.createElement(ge.a,{key:"loading"})))});var ca=Object(n.h)(Object(c.h)(e=>{const{chats:{byId:t,listIds:a,orderedPinnedIds:n}}=e;return{chatsById:t,listIds:a.active,orderedPinnedIds:n.active,archivedPinnedIds:n.archived,archivedListIds:a.archived}},(e,t)=>Object(u.l)(t,["loadMoreChats"]))(({mode:e,state:t,dispatch:a,chatsById:c,listIds:r,orderedPinnedIds:s,archivedListIds:l,archivedPinnedIds:o,loadMoreChats:i})=>{const{chatFilter:m}=t,{selectedChatIds:u,selectedChatTypes:h}=Mt(t,e,!0),b=Object(n.p)(()=>{const e=r?Object(d.Ab)(c,r,s,"all"):void 0,t=l?Object(d.Ab)(c,l,o,"archived"):void 0;if(e||t)return[...e?[...e.pinnedChats,...e.otherChats]:[],...t?t.otherChats:[]]},[c,r,s,l,o]),p=Object(n.p)(()=>{if(b)return b.filter(e=>!m||Object(be.a)(Object(d.l)(e),m)||u.includes(e.id)).map(({id:e})=>e)},[b,m,u]),g=Object(n.m)(e=>{a({type:"setChatFilter",payload:e})},[a]),E=Object(n.m)(n=>{a("included"===e?{type:"setIncludeFilters",payload:{...t.includeFilters,includedChatIds:n}}:{type:"setExcludeFilters",payload:{...t.excludeFilters,excludedChatIds:n}})},[e,t,a]),v=Object(n.m)(t=>{const n={};t.forEach(e=>{n[e]=!0}),a("included"===e?{type:"setIncludeFilters",payload:{includedChatIds:u,...n}}:{type:"setExcludeFilters",payload:{excludedChatIds:u,...n}})},[e,u,a]);return p?n.a.createElement(na,{mode:e,chatIds:p,selectedIds:u,selectedChatTypes:h,filterValue:m,onSelectedIdsChange:E,onSelectedChatTypesChange:v,onFilterChange:g,onLoadMore:i}):n.a.createElement(ge.a,null)}));a(256);var ra=Object(n.h)(({currentScreen:e,state:t,dispatch:a,onScreenSelect:c,onReset:r})=>{const l=Object(n.m)(()=>{e!==s.m.FoldersCreateFolder&&e!==s.m.FoldersEditFolder||setTimeout(()=>{a({type:"reset"})},200),e!==s.m.FoldersIncludedChats&&e!==s.m.FoldersExcludedChats?r():"create"===t.mode?c(s.m.FoldersCreateFolder):c(s.m.FoldersEditFolder)},[t.mode,a,e,r,c]),o=Object(n.m)(()=>{a({type:"reset"}),c(s.m.FoldersCreateFolder)},[c,a]),i=Object(n.m)(e=>{a({type:"editFolder",payload:e}),c(s.m.FoldersEditFolder)},[a,c]),m=Object(n.m)(()=>{a({type:"editIncludeFilters"}),c(s.m.FoldersIncludedChats)},[a,c]),d=Object(n.m)(()=>{a({type:"editExcludeFilters"}),c(s.m.FoldersExcludedChats)},[a,c]);switch(e){case s.m.Folders:return n.a.createElement(_t,{onCreateFolder:o,onEditFolder:i});case s.m.FoldersCreateFolder:case s.m.FoldersEditFolder:return n.a.createElement(ta,{state:t,dispatch:a,onAddIncludedChats:m,onAddExcludedChats:d,onReset:l});case s.m.FoldersIncludedChats:return n.a.createElement(ca,{mode:"included",state:t,dispatch:a});case s.m.FoldersExcludedChats:return n.a.createElement(ca,{mode:"excluded",state:t,dispatch:a});default:return}}),sa=a(95);a(257);var la=Object(n.h)(({options:e,range:t,label:a,value:c,disabled:r,onChange:s})=>{const l=Object(n.m)(e=>{s(Number(e.currentTarget.value))},[s]),o=Object(le.a)("RangeSlider",r&&"disabled"),i=Object(n.p)(()=>{if(e)return c/(e.length-1)*100;if(t){const e=(t.max-t.min)/(t.step||1);return(c-t.min)/e*100}return 0},[c,e,t]),[m,d,u]=Object(n.p)(()=>e?[0,e.length-1,1]:t?[t.min,t.max,t.step||1]:[0,0,0],[t,e]);return n.a.createElement("div",{className:o},a&&n.a.createElement("div",{className:"slider-top-row"},n.a.createElement("span",{className:"label"},a),t&&n.a.createElement("span",{className:"value"},c)),n.a.createElement("div",{className:"slider-main"},n.a.createElement("div",{className:"slider-fill-track",style:`width: ${i}%`}),n.a.createElement("input",{min:m,max:d,value:c,step:u,type:"range",onChange:l}),e&&n.a.createElement("div",{className:"slider-options"},e.map((e,t)=>n.a.createElement("div",{className:Object(le.a)("slider-option no-selection",t===c&&"active"),onClick:()=>s(t)},e)))))}),oa=a(117),ia=a(102),ma=a(45);var da=Object(n.h)(({size:e=l.lb,stickerSet:t,observeIntersection:a})=>{const c=Object(n.q)(null),s=Object(sa.b)(c,a),o="stickerSet"+t.id,i=Object(E.a)(o,!s,r.ApiMediaFormat.Lottie),{shouldRenderFullMedia:m,transitionClassNames:d}=Object(ia.a)(i,"slow");return n.a.createElement("div",{ref:c,className:"sticker-set-cover"},!m&&Object(ma.c)(t.title,2),m&&i&&n.a.createElement(Zt.a,{id:o,size:e,animationData:i,className:d}))});var ua=Object(n.h)(({stickerSet:e,observeIntersection:t})=>{const a=Object(n.q)(null),c=Object(sa.b)(a,t),r=Object(E.a)(e.hasThumbnail&&"stickerSet"+e.id,!c),{shouldRenderFullMedia:s,transitionClassNames:l}=Object(ia.a)(r,"slow");return n.a.createElement("div",{ref:a,className:"sticker-set-cover"},!s&&Object(ma.c)(e.title,2),s&&n.a.createElement("img",{src:r,className:l,alt:""}))});a(258);var ha=Object(n.h)(({sticker:e,size:t,observeIntersection:a,noAnimate:c,title:s,className:l,onClick:o,clickArg:i,onUnfaveClick:m})=>{const d=Object(n.q)(null),{isAnimated:u}=e,h="sticker"+e.id,b="sticker-button-"+e.id,p=Object(sa.b)(d,a),g=e.thumbnail?e.thumbnail.dataUri:void 0,v=Object(E.a)(h+"?size=m",!p,r.ApiMediaFormat.BlobUrl),O=p&&!c,f=Object(E.a)(h,!O,r.ApiMediaFormat.Lottie),[j,C,y]=Object(De.a)(Boolean(f)),k=j&&O,{shouldRenderThumb:N,shouldRenderFullMedia:S,transitionClassNames:I}=Object(ia.a)(v||k,"slow");Object(n.n)(()=>{O||y()},[y,O]);const w=Object(le.a)("StickerButton",u&&"animated",b,l),P=N&&g?`background-image: url('${g}');`:"";return n.a.createElement("div",{ref:d,className:w,title:s||e&&e.emoji,style:P,"data-sticker-id":e.id,onClick:function(){o&&o(i)}},S&&!k&&n.a.createElement("img",{src:v,className:I}),O&&f&&n.a.createElement(Zt.a,{id:h,animationData:f,play:!0,size:t,isLowPriority:!0,onLoad:C}),m&&n.a.createElement(R.a,{className:"sticker-unfave-button",color:"dark",round:!0,onClick:function(t){t.stopPropagation(),t.preventDefault(),m(e)}},n.a.createElement("i",{className:"icon-close"})))});a(259);var ba=Object(n.h)(({stickerSet:e,observeIntersection:t,onClick:a})=>{const c=Object(T.a)();if(!e||!e.stickers)return;const r=e.stickers&&e.stickers[0];return e.hasThumbnail||!r?n.a.createElement(fe.a,{narrow:!0,className:"SettingsStickerSet",inactive:!r,onClick:()=>r&&a(r)},n.a.createElement(R.a,{ariaLabel:e.title,color:"translucent"},e.isAnimated?n.a.createElement(da,{size:l.gb,stickerSet:e,observeIntersection:t}):n.a.createElement(ua,{stickerSet:e,observeIntersection:t})),n.a.createElement("div",{className:"multiline-menu-item"},n.a.createElement("div",{className:"title"},e.title),n.a.createElement("div",{className:"subtitle"},c("StickerPack.StickerCount",e.count,"i")))):n.a.createElement(fe.a,{narrow:!0,className:"SettingsStickerSet",onClick:()=>a(r)},n.a.createElement(ha,{sticker:r,size:l.gb,title:e.title,observeIntersection:t}),n.a.createElement("div",{className:"multiline-menu-item"},n.a.createElement("div",{className:"title"},e.title),n.a.createElement("div",{className:"subtitle"},c("StickerPack.StickerCount",e.count,"i"))))}),pa=a(151);const ga=o.k?void 0:[{value:"enter",label:"Send by Enter",subLabel:"New line by Shift + Enter"},{value:"ctrl-enter",label:`Send by ${o.e?"Cmd":"Ctrl"} + Enter`,subLabel:"New line by Enter"}],Ea=["Solid and Steady","Nice and Fast","Lots of Stuff"];var va=Object(n.h)(Object(c.h)(e=>({...Object(u.l)(e.settings.byKey,["messageTextSize","animationLevel","messageSendKeyCombo","shouldAutoDownloadMediaFromContacts","shouldAutoDownloadMediaInPrivateChats","shouldAutoDownloadMediaInGroups","shouldAutoDownloadMediaInChannels","shouldAutoPlayGifs","shouldAutoPlayVideos","shouldSuggestStickers","shouldLoopStickers"]),stickerSetIds:e.stickers.added.setIds,stickerSetsById:e.stickers.setsById}),(e,t)=>Object(u.l)(t,["setSettingOption","loadStickerSets","loadAddedStickers"]))(({onScreenSelect:e,stickerSetIds:t,stickerSetsById:a,messageTextSize:c,animationLevel:r,messageSendKeyCombo:l,shouldAutoDownloadMediaFromContacts:o,shouldAutoDownloadMediaInPrivateChats:i,shouldAutoDownloadMediaInGroups:m,shouldAutoDownloadMediaInChannels:d,shouldAutoPlayGifs:u,shouldAutoPlayVideos:h,shouldSuggestStickers:b,shouldLoopStickers:p,setSettingOption:g,loadStickerSets:E,loadAddedStickers:v})=>{const O=Object(n.q)(null),{observe:f}=Object(sa.a)({rootRef:O}),[j,C,y]=Object(De.a)(),[k,N]=Object(n.r)();Object(n.n)(()=>{E()},[E]),Object(n.n)(()=>{t&&t.length&&v()},[t,v]);const S=Object(n.m)(e=>{Ea.forEach((t,a)=>{document.body.classList.toggle("animation-level-"+a,e===a)}),g({animationLevel:e})},[g]),I=Object(n.m)(e=>{document.documentElement.style.setProperty("--message-text-size",e+"px"),g({messageTextSize:e})},[g]),w=Object(n.m)(e=>{N(e),C()},[C]),P=Object(T.a)(),M=t&&t.map(e=>!!(a&&a[e]&&a[e].installedDate)&&a[e]).filter(Boolean);return n.a.createElement("div",{className:"settings-content custom-scroll"},n.a.createElement("div",{className:"settings-item pt-3"},n.a.createElement("h4",{className:"settings-item-header"},P("SETTINGS")),n.a.createElement(la,{label:P("TextSize"),range:{min:12,max:20},value:c,onChange:I}),n.a.createElement(fe.a,{icon:"photo",onClick:()=>e(s.m.GeneralChatBackground)},P("ChatBackground"))),n.a.createElement("div",{className:"settings-item"},n.a.createElement("h4",{className:"settings-item-header"},"Animation Level"),n.a.createElement("p",{className:"settings-item-description"},"Choose the desired animations amount."),n.a.createElement(la,{options:Ea,value:r,onChange:S})),ga&&n.a.createElement("div",{className:"settings-item"},n.a.createElement("h4",{className:"settings-item-header"},P("Keyboard")),n.a.createElement(oa.a,{name:"keyboard-send-settings",options:ga,onChange:e=>g({messageSendKeyCombo:e}),selected:l})),n.a.createElement("div",{className:"settings-item"},n.a.createElement("h4",{className:"settings-item-header"},P("AutoDownloadMedia")),n.a.createElement(aa.a,{label:P("Contacts"),checked:o,onCheck:e=>g({shouldAutoDownloadMediaFromContacts:e})}),n.a.createElement(aa.a,{label:P("AutodownloadPrivateChats"),checked:i,onCheck:e=>g({shouldAutoDownloadMediaInPrivateChats:e})}),n.a.createElement(aa.a,{label:P("AutodownloadGroupChats"),checked:m,onCheck:e=>g({shouldAutoDownloadMediaInGroups:e})}),n.a.createElement(aa.a,{label:P("FilterChannels"),checked:d,onCheck:e=>g({shouldAutoDownloadMediaInChannels:e})})),n.a.createElement("div",{className:"settings-item"},n.a.createElement("h4",{className:"settings-item-header"},P("AutoplayMedia")),n.a.createElement(aa.a,{label:P("GifsTab2"),checked:u,onCheck:e=>g({shouldAutoPlayGifs:e})}),n.a.createElement(aa.a,{label:P("VideosTitle"),checked:h,onCheck:e=>g({shouldAutoPlayVideos:e})})),n.a.createElement("div",{className:"settings-item"},n.a.createElement("h4",{className:"settings-item-header"},P("AccDescrStickers")),n.a.createElement(aa.a,{label:P("SuggestStickers"),checked:b,onCheck:e=>g({shouldSuggestStickers:e})}),n.a.createElement(aa.a,{label:P("LoopAnimatedStickers"),checked:p,onCheck:e=>g({shouldLoopStickers:e})}),n.a.createElement("div",{className:"mt-4",ref:O},M&&M.map(e=>n.a.createElement(ba,{key:e.id,stickerSet:e,observeIntersection:f,onClick:w}))),k&&n.a.createElement(pa.a,{isOpen:j,fromSticker:k,onClose:y})))}));let Oa;function fa(e="*",t,a=!1){Oa||(Oa=document.createElement("input"),Oa.setAttribute("type","file")),Oa.setAttribute("accept",e),a?Oa.removeAttribute("multiple"):Oa.setAttribute("multiple","multiple"),Oa.onchange=null,Oa.value="",Oa.onchange=t,Oa.click()}var ja=a(13);a(260);var Ca=Object(n.h)(({wallpaper:e,isSelected:t,onClick:a})=>{const{slug:c,document:r}=e,o="wallpaper"+r.id,i=r.previewBlobUrl,m=Object(E.a)(o+"?size=m"),d=Object(j.a)(r.thumbnail&&r.thumbnail.dataUri,Boolean(m),300),{shouldRenderThumb:u,shouldRenderFullMedia:h,transitionClassNames:b}=Object(ia.a)(m||i,"slow"),[p,g]=Object(n.r)(!1),{mediaData:O,downloadProgress:f}=Object(v.a)(o,!p),k=!1===Object(y.a)(p),{shouldRender:N,transitionClassNames:S}=Object(Q.a)(p&&!O||c===s.n,void 0,k,"slow"),I=Object(n.m)(()=>{(async()=>{const e=await Object(C.e)(O);await ja.d(l.k,l.k,e),a(c)})()},[O,a,c]);Object(n.n)(()=>{O&&I()},[O,I]);const w=Object(n.m)(()=>{O?I():g(e=>!e)},[O,I]),P=Object(le.a)("WallpaperTile",t&&"selected");return n.a.createElement("div",{className:P,onClick:w},n.a.createElement("div",{className:"media-inner"},u&&n.a.createElement("img",{src:d,className:"thumbnail",alt:""}),h&&n.a.createElement("img",{src:m||i,className:"full-media "+b,alt:""}),N&&n.a.createElement("div",{className:Object(le.a)("spinner-container",S)},n.a.createElement(W.a,{progress:f,onClick:w}))))});a(261);const ya=Object(K.g)(e=>e(),6e4,!0);var ka=Object(n.h)(Object(c.h)(e=>{const{isBackgroundBlurred:t,customBackground:a}=e.settings.byKey,{loadedWallpapers:n}=e.settings;return{customBackground:a,isBackgroundBlurred:t,loadedWallpapers:n}},(e,t)=>Object(u.l)(t,["setSettingOption","loadWallpapers","uploadWallpaper"]))(({onScreenSelect:e,customBackground:t,isBackgroundBlurred:a,loadedWallpapers:c,setSettingOption:r,loadWallpapers:l,uploadWallpaper:o})=>{Object(n.n)(()=>{ya(()=>{l()})},[l]);const i=Object(n.m)(e=>{const{files:t}=e.target;t&&t.length>0&&o(t[0])},[o]),m=Object(n.m)(()=>{fa("image/jpeg",i,!0)},[i]),d=Object(n.m)(()=>{e(s.m.GeneralChatBackgroundColor)},[e]),u=Object(n.m)(()=>{r({customBackground:void 0})},[r]),h=Object(n.m)(e=>{r({customBackground:e})},[r]),b=Object(n.m)(e=>{r({isBackgroundBlurred:e.target.checked})},[r]),p=Object(T.a)(),g=c&&c[0]&&c[0].slug===s.n;return n.a.createElement("div",{className:"SettingsGeneralBackground settings-content custom-scroll"},n.a.createElement("div",{className:"settings-item pt-3"},n.a.createElement(fe.a,{icon:"camera-add",className:"mb-0",disabled:g,onClick:m},p("UploadImage")),n.a.createElement(fe.a,{icon:"colorize",className:"mb-0",onClick:d},p("SetColor")),n.a.createElement(fe.a,{icon:"favorite",onClick:u},p("ThemeResetToDefaults")),n.a.createElement(aa.a,{label:p("BackgroundBlurred"),checked:Boolean(a),onChange:b})),c?n.a.createElement("div",{className:"settings-wallpapers"},c.map(e=>n.a.createElement(Ca,{wallpaper:e,isSelected:t===e.slug,onClick:h}))):n.a.createElement(ge.a,null))}));function Na(e){return[parseInt(e.substring(0,2),16),parseInt(e.substring(2,4),16),parseInt(e.substring(4,6),16)]}function Sa(e){const t=e[0].toString(16),a=e[1].toString(16),n=e[2].toString(16);return(1==t.length?"0"+t:t)+(1==a.length?"0"+a:a)+(1==n.length?"0"+n:n)}function Ia([e,t,a]){e/=255,t/=255,a/=255;let n,c,r=Math.max(e,t,a),s=Math.min(e,t,a),l=r,o=r-s;if(c=0==r?0:o/r,r==s)n=0;else{switch(r){case e:n=(t-a)/o+(t({customBackground:e.settings.byKey.customBackground}),(e,t)=>Object(u.l)(t,["setSettingOption"]))(({customBackground:e,setSettingOption:t})=>{const a=Object(n.q)(null),c=Object(n.q)(null),r=Object(n.q)(null),s=Object(n.q)(!0),[l,o]=Object(n.r)(function(e){return e&&e.startsWith("#")?Ia(Na(e.replace("#",""))):Pa}(e)),i=Object(n.q)(l);Object(n.n)(()=>{i.current=l},[l]);const[m,d,b]=Object(De.a)(),[p,g]=Object(n.r)(""),[E,v]=Object(n.r)(""),O=Object(n.q)(),f=Object(n.q)();Object(n.n)(()=>{const e={offsetLeft:c.current.offsetLeft,...Object(u.l)(c.current.getBoundingClientRect(),["top","width","height"])},t={offsetLeft:r.current.offsetLeft,...Object(u.l)(r.current.getBoundingClientRect(),["width"])};function n(t){const n=[Math.min(Math.max(0,t.pageX-e.offsetLeft),e.width-1),Math.min(Math.max(0,t.pageY-e.top+a.current.scrollTop),e.height-1)],{huePosition:c}=Fa(i.current,O.current);o(La({colorPosition:n,huePosition:c},O.current)),d()}function s(e){const{colorPosition:a}=Fa(i.current,O.current),n=Math.min(Math.max(0,e.pageX-t.offsetLeft),t.width-1);o(La({colorPosition:a,huePosition:n},O.current)),d()}O.current={colorRect:e,hueRect:t},Object(h.b)(c.current,{onCapture:n,onDrag:n,onRelease:b,onClick:b,withCursor:!0}),Object(h.b)(r.current,{onCapture:s,onDrag:s,onRelease:b,onClick:b,withCursor:!0})},[d,b]);const{colorPosition:j=[0,0],huePosition:C=0}=O.current?Fa(l,O.current):{},y=Sa(wa(l)),k=l[0],N=Sa(wa([k,1,1]));Object(n.n)(()=>{const e=wa(l),a="#"+Sa(e);g(e.join(", ")),v(a),s.current||t({customBackground:a}),s.current=!1},[l,t]),Object(n.n)(()=>{!function(e,t,a,n){let c,r,s;a.current&&n.current?(c=n.current.colorRect.width,r=n.current.colorRect.height,s=a.current):(c=e.offsetWidth,r=e.offsetHeight,s=e.getContext("2d"),e.width=c,e.height=r,a.current=s);const l=s.createImageData(c,r),o=l.data,i=wa([t,1,1]);let m=0;for(let e=0;e{!function(e){const t=e.offsetWidth;e.width=t,e.height=1;const a=e.getContext("2d"),n=a.createImageData(t,1),c=n.data;let r=0;for(let e=0;e{const t=e.currentTarget.value.replace(/[^\d, ]/g,"").slice(0,13);if(t.match(/^\d{1,3},\s?\d{1,3},\s?\d{1,3}$/)){const e=t.split(",").map(e=>Number(e.trim()));o(Ia(e))}e.currentTarget.value=t},[]),I=Object(n.m)(e=>{const t=e.currentTarget.value.replace(/[^0-9a-fA-F]/g,"").slice(0,6);t.match(/^#?[0-9a-fA-F]{6}$/)&&o(Ia(Na(t.replace("#","")))),e.currentTarget.value=t},[]),w=Object(n.m)(e=>{o(Ia(Na(e.currentTarget.dataset.color.replace("#",""))))},[]),P=Object(le.a)("SettingsGeneralBackgroundColor settings-content custom-scroll",m&&"is-dragging");return n.a.createElement("div",{ref:a,className:P},n.a.createElement("div",{className:"settings-item pt-3"},n.a.createElement("div",{ref:c,className:"color-picker"},n.a.createElement("canvas",null),n.a.createElement("div",{className:"handle",style:`transform: translate(${j[0]}px, ${j[1]}px); background-color: #${y};`})),n.a.createElement("div",{ref:r,className:"hue-picker"},n.a.createElement("canvas",null),n.a.createElement("div",{className:"handle",style:`transform: translateX(${C}px); background-color: #${N};`})),n.a.createElement("div",{className:"tools"},n.a.createElement(ve.a,{value:E,label:"HEX",onChange:I}),n.a.createElement(ve.a,{value:p,label:"RGB",onChange:S}))),n.a.createElement("div",{className:"predefined-colors"},Ma.map(e=>n.a.createElement("div",{className:e==="#"+y?"active":void 0,"data-color":e,style:`background-color: ${e};`,onClick:w}))))}));var Ta=Object(n.h)(Object(c.h)(e=>({hasPrivateChatsNotifications:Boolean(e.settings.byKey.hasPrivateChatsNotifications),hasPrivateChatsMessagePreview:Boolean(e.settings.byKey.hasPrivateChatsMessagePreview),hasGroupNotifications:Boolean(e.settings.byKey.hasGroupNotifications),hasGroupMessagePreview:Boolean(e.settings.byKey.hasGroupMessagePreview),hasBroadcastNotifications:Boolean(e.settings.byKey.hasBroadcastNotifications),hasBroadcastMessagePreview:Boolean(e.settings.byKey.hasBroadcastMessagePreview),hasContactJoinedNotifications:Boolean(e.settings.byKey.hasContactJoinedNotifications)}),(e,t)=>Object(u.l)(t,["loadNotificationsSettings","updateContactSignUpNotification","updateNotificationSettings"]))(({hasPrivateChatsNotifications:e,hasPrivateChatsMessagePreview:t,hasGroupNotifications:a,hasGroupMessagePreview:c,hasBroadcastNotifications:r,hasBroadcastMessagePreview:s,hasContactJoinedNotifications:l,loadNotificationsSettings:o,updateContactSignUpNotification:i,updateNotificationSettings:m})=>{Object(n.n)(()=>{o()},[o]);const d=Object(n.m)((n,l,o)=>{const i="contact"===l?!e:!("group"===l?a:r),d="contact"===l?t:"group"===l?c:s;m({peerType:l,..."silent"===o&&{isSilent:!n.target.checked,isShowPreviews:d},..."showPreviews"===o&&{isShowPreviews:n.target.checked,isSilent:i}})},[s,r,c,a,t,e,m]),u=Object(n.m)(e=>{i({isSilent:!e.target.checked})},[i]),h=Object(T.a)();return n.a.createElement("div",{className:"settings-content custom-scroll"},n.a.createElement("div",{className:"settings-item"},n.a.createElement("h4",{className:"settings-item-header"},h("AutodownloadPrivateChats")),n.a.createElement(aa.a,{label:h("NotificationsForPrivateChats"),subLabel:h(e?"NotificationsEnabled":"NotificationsDisabled"),checked:e,onChange:e=>{d(e,"contact","silent")}}),n.a.createElement(aa.a,{label:h("MessagePreview"),subLabel:h(t?"PreviewEnabled":"PreviewDisabled"),checked:t,onChange:e=>{d(e,"contact","showPreviews")}})),n.a.createElement("div",{className:"settings-item"},n.a.createElement("h4",{className:"settings-item-header"},h("FilterGroups")),n.a.createElement(aa.a,{label:h("NotificationsForGroups"),subLabel:h(a?"NotificationsEnabled":"NotificationsDisabled"),checked:a,onChange:e=>{d(e,"group","silent")}}),n.a.createElement(aa.a,{label:h("MessagePreview"),subLabel:h(c?"PreviewEnabled":"PreviewDisabled"),checked:c,onChange:e=>{d(e,"group","showPreviews")}})),n.a.createElement("div",{className:"settings-item"},n.a.createElement("h4",{className:"settings-item-header"},h("FilterChannels")),n.a.createElement(aa.a,{label:h("NotificationsForChannels"),subLabel:h(r?"NotificationsEnabled":"NotificationsDisabled"),checked:r,onChange:e=>{d(e,"broadcast","silent")}}),n.a.createElement(aa.a,{label:h("MessagePreview"),subLabel:h(s?"PreviewEnabled":"PreviewDisabled"),checked:s,onChange:e=>{d(e,"broadcast","showPreviews")}})),n.a.createElement("div",{className:"settings-item"},n.a.createElement("h4",{className:"settings-item-header"},h("PhoneOther")),n.a.createElement(aa.a,{label:h("ContactJoined"),checked:l,onChange:u})))}));var Ba=Object(n.h)(Object(c.h)(e=>{const{settings:{byKey:{hasPassword:t},privacy:a},blocked:n,activeSessions:c}=e;return{hasPassword:t,blockedCount:n.totalCount,sessionsCount:c.length,visibilityPrivacyPhoneNumber:a.phoneNumber&&a.phoneNumber.visibility,visibilityPrivacyLastSeen:a.lastSeen&&a.lastSeen.visibility,visibilityPrivacyProfilePhoto:a.profilePhoto&&a.profilePhoto.visibility,visibilityPrivacyForwarding:a.forwards&&a.forwards.visibility,visibilityPrivacyGroupChats:a.chatInvite&&a.chatInvite.visibility}},(e,t)=>Object(u.l)(t,["loadBlockedContacts","loadAuthorizations","loadPrivacySettings"]))(({onScreenSelect:e,hasPassword:t,blockedCount:a,sessionsCount:c,visibilityPrivacyPhoneNumber:r,visibilityPrivacyLastSeen:l,visibilityPrivacyProfilePhoto:o,visibilityPrivacyForwarding:i,visibilityPrivacyGroupChats:m,loadPrivacySettings:d,loadBlockedContacts:u,loadAuthorizations:h})=>{Object(n.n)(()=>{u(),h(),d()},[u,h,d]);const b=Object(T.a)();function p(e){switch(e){case"everybody":return b("P2PEverybody");case"contacts":return b("P2PContacts");case"nobody":return b("P2PNobody")}}return n.a.createElement("div",{className:"settings-content custom-scroll"},n.a.createElement("div",{className:"settings-item pt-3"},n.a.createElement(fe.a,{icon:"delete-user",narrow:!0,onClick:()=>e(s.m.PrivacyBlockedUsers)},n.a.createElement("div",{className:"multiline-menu-item"},n.a.createElement("span",{className:"title"},b("BlockedUsers")),a>0&&n.a.createElement("span",{className:"subtitle"},b("Users",a)))),n.a.createElement(fe.a,{icon:"lock",narrow:!0,onClick:()=>e(t?s.m.TwoFaEnabled:s.m.TwoFaDisabled)},n.a.createElement("div",{className:"multiline-menu-item"},n.a.createElement("span",{className:"title"},b("TwoStepVerification")),n.a.createElement("span",{className:"subtitle"},b(t?"PasswordOn":"PasswordOff")))),n.a.createElement(fe.a,{icon:"active-sessions",narrow:!0,onClick:()=>e(s.m.PrivacyActiveSessions)},n.a.createElement("div",{className:"multiline-menu-item"},n.a.createElement("span",{className:"title"},b("SessionsTitle")),c>0&&n.a.createElement("span",{className:"subtitle"},1===c?"1 session":c+" sessions")))),n.a.createElement("div",{className:"settings-item"},n.a.createElement("h4",{className:"settings-item-header mb-4"},b("PrivacyTitle")),n.a.createElement(fe.a,{narrow:!0,onClick:()=>e(s.m.PrivacyPhoneNumber)},n.a.createElement("div",{className:"multiline-menu-item"},n.a.createElement("span",{className:"title"},b("PrivacyPhoneTitle")),n.a.createElement("span",{className:"subtitle"},p(r)))),n.a.createElement(fe.a,{narrow:!0,onClick:()=>e(s.m.PrivacyLastSeen)},n.a.createElement("div",{className:"multiline-menu-item"},n.a.createElement("span",{className:"title"},b("LastSeenTitle")),n.a.createElement("span",{className:"subtitle"},p(l)))),n.a.createElement(fe.a,{narrow:!0,onClick:()=>e(s.m.PrivacyProfilePhoto)},n.a.createElement("div",{className:"multiline-menu-item"},n.a.createElement("span",{className:"title"},b("PrivacyProfilePhotoTitle")),n.a.createElement("span",{className:"subtitle"},p(o)))),n.a.createElement(fe.a,{narrow:!0,onClick:()=>e(s.m.PrivacyForwarding)},n.a.createElement("div",{className:"multiline-menu-item"},n.a.createElement("span",{className:"title"},b("PrivacyForwardsTitle")),n.a.createElement("span",{className:"subtitle"},p(i)))),n.a.createElement(fe.a,{narrow:!0,onClick:()=>e(s.m.PrivacyGroupChats)},n.a.createElement("div",{className:"multiline-menu-item"},n.a.createElement("span",{className:"title"},b("WhoCanAddMe")),n.a.createElement("span",{className:"subtitle"},p(m))))))}));var Da=Object(n.h)(Object(c.h)(e=>({languages:e.settings.byKey.languages,language:e.settings.byKey.language}),(e,t)=>Object(u.l)(t,["loadLanguages","setSettingOption"]))(({languages:e,language:t,loadLanguages:a,setSettingOption:c})=>{const[r,s]=Object(n.r)(t),[l,o,i]=Object(De.a)();Object(n.n)(()=>{a()},[a]);const m=Object(n.m)(e=>{s(e),o(),Object(et.c)(e,()=>{i(),c({language:e})})},[o,i,c]),d=Object(n.p)(()=>e?function(e){return e.map(({langCode:e,nativeName:t,name:a})=>({value:e,label:t,subLabel:a}))}(e):void 0,[e]);return n.a.createElement("div",{className:"settings-content settings-item settings-language custom-scroll"},d?n.a.createElement(oa.a,{name:"keyboard-send-settings",options:d,selected:r,loadingOption:l?r:void 0,onChange:m}):n.a.createElement(ge.a,null))}));function xa(e){switch(e){case s.m.PrivacyPhoneNumber:case s.m.PrivacyPhoneNumberAllowedContacts:case s.m.PrivacyPhoneNumberDeniedContacts:return"phoneNumber";case s.m.PrivacyLastSeen:case s.m.PrivacyLastSeenAllowedContacts:case s.m.PrivacyLastSeenDeniedContacts:return"lastSeen";case s.m.PrivacyProfilePhoto:case s.m.PrivacyProfilePhotoAllowedContacts:case s.m.PrivacyProfilePhotoDeniedContacts:return"profilePhoto";case s.m.PrivacyForwarding:case s.m.PrivacyForwardingAllowedContacts:case s.m.PrivacyForwardingDeniedContacts:return"forwards";case s.m.PrivacyGroupChats:case s.m.PrivacyGroupChatsAllowedContacts:case s.m.PrivacyGroupChatsDeniedContacts:return"chatInvite"}}var Ra=Object(n.h)(Object(c.h)((e,{screen:t})=>{let a;const{chats:{byId:n},settings:{privacy:c}}=e;switch(t){case s.m.PrivacyPhoneNumber:a=c.phoneNumber;break;case s.m.PrivacyLastSeen:a=c.lastSeen;break;case s.m.PrivacyProfilePhoto:a=c.profilePhoto;break;case s.m.PrivacyForwarding:a=c.forwards;break;case s.m.PrivacyGroupChats:a=c.chatInvite}return a?{...a,chatsById:n}:{}},(e,t)=>Object(u.l)(t,["setPrivacyVisibility"]))(({screen:e,onScreenSelect:t,visibility:a,allowUserIds:c,allowChatIds:r,blockUserIds:l,blockChatIds:o,chatsById:i,setPrivacyVisibility:m})=>{const d=Object(T.a)(),u=Object(n.p)(()=>{switch(e){case s.m.PrivacyProfilePhoto:case s.m.PrivacyGroupChats:return[{value:"everybody",label:d("P2PEverybody")},{value:"contacts",label:d("P2PContacts")}];default:return[{value:"everybody",label:d("P2PEverybody")},{value:"contacts",label:d("P2PContacts")},{value:"nobody",label:d("P2PNobody")}]}},[d,e]),h={shouldShowDenied:"nobody"!==a,shouldShowAllowed:"everybody"!==a},b=xa(e),p=Object(n.p)(()=>{switch(e){case s.m.PrivacyPhoneNumber:return d("PrivacyPhoneTitle");case s.m.PrivacyLastSeen:return d("LastSeenTitle");case s.m.PrivacyProfilePhoto:return d("PrivacyProfilePhotoTitle");case s.m.PrivacyForwarding:return d("PrivacyForwardsTitle");case s.m.PrivacyGroupChats:return d("WhoCanAddMe");default:return}},[d,e]),g=Object(n.p)(()=>{switch(e){case s.m.PrivacyLastSeen:return d("CustomHelp");default:return}},[d,e]),E=(()=>{switch(e){case s.m.PrivacyPhoneNumber:return s.m.PrivacyPhoneNumberAllowedContacts;case s.m.PrivacyLastSeen:return s.m.PrivacyLastSeenAllowedContacts;case s.m.PrivacyProfilePhoto:return s.m.PrivacyProfilePhotoAllowedContacts;case s.m.PrivacyForwarding:return s.m.PrivacyForwardingAllowedContacts;default:return s.m.PrivacyGroupChatsAllowedContacts}})(),v=(()=>{switch(e){case s.m.PrivacyPhoneNumber:return s.m.PrivacyPhoneNumberDeniedContacts;case s.m.PrivacyLastSeen:return s.m.PrivacyLastSeenDeniedContacts;case s.m.PrivacyProfilePhoto:return s.m.PrivacyProfilePhotoDeniedContacts;case s.m.PrivacyForwarding:return s.m.PrivacyForwardingDeniedContacts;default:return s.m.PrivacyGroupChatsDeniedContacts}})(),O=Object(n.p)(()=>c&&r&&i?r.reduce((e,t)=>e+(i[t]?i[t].membersCount:0),c.length):0,[r,c,i]),f=Object(n.p)(()=>l&&o&&i?o.reduce((e,t)=>e+(i[t]?i[t].membersCount:0),l.length):0,[o,l,i]),j=Object(n.m)(e=>{m({privacyKey:b,visibility:e})},[b,m]);return n.a.createElement("div",{className:"settings-content custom-scroll"},n.a.createElement("div",{className:"settings-item"},n.a.createElement("h4",{className:"settings-item-header"},p),n.a.createElement(oa.a,{name:"visibility-"+b,options:u,onChange:j,selected:a}),g&&n.a.createElement("p",{className:"settings-item-description-larger"},g)),n.a.createElement("div",{className:"settings-item"},n.a.createElement("h4",{className:"settings-item-header mb-4"},d("PrivacyExceptions")),h.shouldShowAllowed&&n.a.createElement(fe.a,{narrow:!0,icon:"add-user",onClick:()=>{t(E)}},n.a.createElement("div",{className:"multiline-menu-item full-size"},O>0&&n.a.createElement("span",{className:"date"},"+",O),n.a.createElement("span",{className:"title"},d("AlwaysShareWith")),n.a.createElement("span",{className:"subtitle"},d("EditAdminAddUsers")))),h.shouldShowDenied&&n.a.createElement(fe.a,{narrow:!0,icon:"delete-user",onClick:()=>{t(v)}},n.a.createElement("div",{className:"multiline-menu-item full-size"},f>0&&n.a.createElement("span",{className:"date"},"−",f),n.a.createElement("span",{className:"title"},d("NeverShareWith")),n.a.createElement("span",{className:"subtitle"},d("EditAdminAddUsers"))))))}));function Ua(e){return[e.region,e.country].filter(Boolean).join(", ")}function Ga(e){return`${e.deviceModel}${e.deviceModel?", ":""} ${e.platform} ${e.systemVersion}`}var za=Object(n.h)(Object(c.h)(e=>({activeSessions:e.activeSessions}),(e,t)=>Object(u.l)(t,["loadAuthorizations","terminateAuthorization","terminateAllAuthorizations"]))(({activeSessions:e,loadAuthorizations:t,terminateAuthorization:a,terminateAllAuthorizations:c})=>{const[r,s,l]=Object(De.a)();Object(n.n)(()=>{t()},[t]);const o=Object(n.m)(e=>{a({hash:e})},[a]),i=Object(n.m)(()=>{l(),c()},[l,c]),m=Object(n.p)(()=>e.find(e=>e.isCurrent),[e]),d=Object(n.p)(()=>e.filter(e=>!e.isCurrent),[e]),u=Object(T.a)();function h(e){return n.a.createElement(fe.a,{key:e.hash,ripple:!0,narrow:!0,contextActions:[{title:"Terminate",icon:"stop",handler:()=>{o(e.hash)}}]},n.a.createElement("div",{className:"multiline-menu-item full-size"},n.a.createElement("span",{className:"date"},Object(U.g)(1e3*e.dateActive)),n.a.createElement("span",{className:"title"},e.appName),n.a.createElement("span",{className:"subtitle black tight"},Ga(e)),n.a.createElement("span",{className:"subtitle"},e.ip," - ",Ua(e))))}return n.a.createElement("div",{className:"settings-content custom-scroll"},m&&(p=m,n.a.createElement("div",{className:"settings-item"},n.a.createElement("h4",{className:"settings-item-header mb-4"},u("AuthSessions.CurrentSession")),n.a.createElement(fe.a,{narrow:!0,inactive:!0},n.a.createElement("div",{className:"multiline-menu-item"},n.a.createElement("span",{className:"title"},p.appName),n.a.createElement("span",{className:"subtitle black tight"},Ga(p)),n.a.createElement("span",{className:"subtitle"},p.ip," - ",Ua(p)))),n.a.createElement(fe.a,{className:"destructive mb-0",icon:"stop",ripple:!0,narrow:!0,onClick:s},u("TerminateAllSessions")))),d&&(b=d,n.a.createElement("div",{className:"settings-item"},n.a.createElement("h4",{className:"settings-item-header mb-4"},"Other Sessions"),b.map(h))),d&&n.a.createElement(Dt.a,{isOpen:r,onClose:l,text:"Are you sure you want to terminate all other sessions?",confirmLabel:"Terminate All Other Sessions",confirmHandler:i,confirmIsDestructive:!0}),";");var b,p}));var qa=Object(n.h)(Object(c.h)(e=>{const{chats:{byId:t},users:{byId:a},blocked:{ids:n}}=e;return{chatsByIds:t,usersByIds:a,blockedIds:n}},(e,t)=>Object(u.l)(t,["unblockContact"]))(({chatsByIds:e,usersByIds:t,blockedIds:a,unblockContact:c})=>{const r=Object(n.m)(e=>{c({contactId:e})},[c]),s=Object(T.a)();return n.a.createElement("div",{className:"settings-fab-wrapper"},n.a.createElement("div",{className:"settings-content infinite-scroll"},n.a.createElement("div",{className:"settings-item"},n.a.createElement("p",{className:"settings-item-description-larger mt-0 mb-2"},s("BlockedUsersInfo"))),n.a.createElement("div",{className:"chat-list custom-scroll"},a&&a.length?n.a.createElement("div",{className:"scroll-container"},a.map((a,c)=>function(a,c,s){const o=Object(d.lb)(a),i=o?t[a]:void 0,m=o?void 0:e[a],u=Object(le.a)("Chat chat-item-clickable blocked-list-item",o?"private":"group");return n.a.createElement(fe.a,{key:a,className:u,ripple:!0,narrow:!0,contextActions:[{title:"Unblock",icon:"unlock",handler:()=>{r(a)}}],style:`top: ${(s+c)*l.g}px;`},n.a.createElement(z.a,{size:"medium",user:i,chat:m}),n.a.createElement("div",{className:"contact-info"},n.a.createElement("h3",null,Object(G.a)((o?Object(d.Z)(i):Object(d.l)(m))||"")),i&&i.phoneNumber&&n.a.createElement("div",{className:"contact-phone"},Object(Rt.c)(i.phoneNumber)),i&&!i.phoneNumber&&i.username&&n.a.createElement("div",{className:"contact-username"},"@",i.username)))}(a,c,0))):a&&!a.length?n.a.createElement("div",{className:"no-results"},"List is empty"):n.a.createElement(ge.a,{key:"loading"}))),n.a.createElement(zt,{isShown:!0,onClick:()=>{},className:"not-implemented",ariaLabel:"Add a blocked user"},n.a.createElement("i",{className:"icon-add"})))})),$a=a(119);var Ha=Object(n.h)(Object(c.h)(e=>({animatedEmoji:Object(m.c)(e,"🔐")}))(({animatedEmoji:e,onScreenSelect:t})=>{const a=Object(T.a)();return n.a.createElement("div",{className:"settings-content two-fa custom-scroll"},n.a.createElement("div",{className:"settings-content-header"},n.a.createElement($a.a,{sticker:e}),n.a.createElement("p",{className:"settings-item-description mb-3"},Object(G.a)(a("EnabledPasswordText"),["br"]))),n.a.createElement("div",{className:"settings-item pt-0 no-border"},n.a.createElement(fe.a,{icon:"edit",onClick:()=>t(s.m.TwoFaChangePasswordCurrent)},a("ChangePassword")),n.a.createElement(fe.a,{icon:"password-off",onClick:()=>t(s.m.TwoFaTurnOff)},a("TurnPasswordOff")),n.a.createElement(fe.a,{icon:"email",onClick:()=>t(s.m.TwoFaRecoveryEmailCurrentPassword)},a("SetRecoveryEmail"))))})),Va=a(137),Wa=a(138);var Ya=Object(n.h)(({error:e,isLoading:t,expectedPassword:a,placeholder:c="Current Password",hint:r,submitLabel:s,clearError:l,onSubmit:o})=>{const[i,m]=Object(n.r)(""),[d,u]=Object(n.r)(!1),h=Object(n.m)(e=>{a&&e!==a?m("Passwords Should Be Equal"):o(e)},[o,a]),b=Object(n.m)(()=>{l&&l(),m("")},[l]),p=Object(T.a)();return n.a.createElement("div",{className:"settings-content two-fa custom-scroll"},n.a.createElement("div",{className:"settings-content-header"},n.a.createElement(Va.a,{isBig:!0,isPasswordVisible:d})),n.a.createElement("div",{className:"settings-item pt-0 no-border"},n.a.createElement(Wa.a,{error:i||e,hint:r,placeholder:c,submitLabel:s||p("Next"),clearError:b,isLoading:t,isPasswordVisible:d,onChangePasswordVisibility:u,onSubmit:h})))});var Ka=Object(n.h)(Object(c.h)(e=>({animatedEmoji:Object(m.c)(e,"🔐")}))(({animatedEmoji:e,onStart:t})=>{const a=Object(T.a)();return n.a.createElement("div",{className:"settings-content two-fa custom-scroll"},n.a.createElement("div",{className:"settings-content-header"},n.a.createElement($a.a,{sticker:e}),n.a.createElement("p",{className:"settings-item-description mb-3"},a("SetAdditionalPasswordInfo"))),n.a.createElement("div",{className:"settings-item pt-0 no-border"},n.a.createElement(R.a,{onClick:t},a("EditAdminTransferSetPassword"))))}));const Za=o.f?550:400;var Qa=Object(n.h)(Object(c.h)((e,{icon:t})=>({animatedEmoji:Object(m.c)(e,"email"===t?"💌":"💡")}))(({animatedEmoji:e,type:t="text",isLoading:a,error:c,placeholder:r,shouldConfirm:s,clearError:l,onSubmit:i})=>{const m=Object(n.q)(null),[d,u]=Object(n.r)(""),[h,b,p]=Object(De.a)(!1);Object(n.n)(()=>{o.k||setTimeout(()=>{m.current.focus()},Za)},[]);const g=Object(T.a)();return n.a.createElement("div",{className:"settings-content two-fa custom-scroll"},n.a.createElement("div",{className:"settings-content-header"},n.a.createElement($a.a,{sticker:e})),n.a.createElement("div",{className:"settings-item pt-0 no-border"},n.a.createElement("form",{action:"",onSubmit:e=>{e.preventDefault(),m.current&&i(d)}},n.a.createElement(ve.a,{ref:m,value:d,inputMode:t,label:r,error:c,onChange:e=>{c&&l&&l(),u(e.target.value)}}),d?n.a.createElement(R.a,{type:"submit",isLoading:a,ripple:!0},g("Continue")):n.a.createElement(R.a,{isText:!0,isLoading:a,ripple:!0,onClick:s?b:()=>{i()}},g("YourEmailSkip"))),s&&n.a.createElement(Ee.a,{className:"narrow",isOpen:h,title:g("YourEmailSkipWarning"),onClose:p},Object(G.a)(g("YourEmailSkipWarningText"),["br","simple_markdown"]),n.a.createElement("div",{className:"dialog-buttons"},n.a.createElement(R.a,{color:"danger",ripple:!0,isText:!0,className:"confirm-dialog-button",onClick:()=>{p(),i()}},g("YourEmailSkip")),n.a.createElement(R.a,{color:"primary",ripple:!0,isText:!0,className:"confirm-dialog-button",onClick:p},g("Cancel"))))))}));var _a=Object(n.h)(Object(c.h)(e=>({animatedEmoji:Object(m.c)(e,"🥳")}))(({animatedEmoji:e,onScreenSelect:t})=>{const a=Object(T.a)();return n.a.createElement("div",{className:"settings-content two-fa custom-scroll"},n.a.createElement("div",{className:"settings-content-header"},n.a.createElement($a.a,{sticker:e}),n.a.createElement("p",{className:"settings-item-description mb-3"},a("TwoStepVerificationPasswordSetInfo"))),n.a.createElement("div",{className:"settings-item pt-0 no-border"},n.a.createElement(R.a,{onClick:()=>{t(s.m.Privacy)}},a("TwoStepVerificationPasswordReturnSettings"))))}));const Xa=o.f?550:400;var Ja=Object(n.h)(Object(c.h)(e=>({animatedEmoji:Object(m.c)(e,"💌"),codeLength:e.twoFaSettings.waitingEmailCodeLength}))(({animatedEmoji:e,codeLength:t,isLoading:a,error:c,clearError:r,onSubmit:s})=>{const l=Object(n.q)(null),[i,m]=Object(n.r)("");Object(n.n)(()=>{o.k||setTimeout(()=>{l.current.focus()},Xa)},[]);const d=Object(T.a)();return n.a.createElement("div",{className:"settings-content two-fa custom-scroll"},n.a.createElement("div",{className:"settings-content-header"},n.a.createElement($a.a,{sticker:e})),n.a.createElement("div",{className:"settings-item pt-0 no-border"},n.a.createElement(ve.a,{value:i,ref:l,inputMode:"decimal",label:d("YourEmailCode"),error:c,onChange:e=>{c&&r&&r();const a=e.target.value.slice(0,t);a.length===t&&s(a),m(a),e.target.value=a}}),a&&n.a.createElement(ge.a,null)))}));var en=Object(n.h)(Object(c.h)(e=>({...e.twoFaSettings}),(e,t)=>Object(u.l)(t,["updatePassword","updateRecoveryEmail","clearPassword","provideTwoFaEmailCode","checkPassword","clearTwoFaError"]))(({currentScreen:e,state:t,hint:a,isLoading:c,error:r,waitingEmailCodeLength:l,dispatch:o,onScreenSelect:i,updatePassword:m,checkPassword:d,clearTwoFaError:u,updateRecoveryEmail:h,provideTwoFaEmailCode:b,clearPassword:p})=>{Object(n.n)(()=>{l&&(e===s.m.TwoFaNewPasswordEmail?i(s.m.TwoFaNewPasswordEmailCode):e===s.m.TwoFaRecoveryEmail&&i(s.m.TwoFaRecoveryEmailCode))},[e,i,l]);const g=Object(n.m)(()=>{o({type:"reset"}),i(s.m.TwoFaNewPassword)},[o,i]),E=Object(n.m)(e=>{o({type:"setPassword",payload:e}),i(s.m.TwoFaNewPasswordConfirm)},[o,i]),v=Object(n.m)(()=>{i(s.m.TwoFaNewPasswordHint)},[i]),O=Object(n.m)(e=>{o({type:"setHint",payload:e}),i(s.m.TwoFaNewPasswordEmail)},[o,i]),f=Object(n.m)(e=>{o({type:"setEmail",payload:e}),m({...t,email:e,onSuccess:()=>{i(s.m.TwoFaCongratulations)}})},[o,i,t,m]),j=Object(n.m)(e=>{o({type:"setCurrentPassword",payload:e}),d({currentPassword:e,onSuccess:()=>{i(s.m.TwoFaChangePasswordNew)}})},[d,o,i]),C=Object(n.m)(e=>{o({type:"setPassword",payload:e}),i(s.m.TwoFaChangePasswordConfirm)},[o,i]),y=Object(n.m)(()=>{i(s.m.TwoFaChangePasswordHint)},[i]),k=Object(n.m)(e=>{o({type:"setHint",payload:e}),m({...t,hint:e,onSuccess:()=>{i(s.m.TwoFaCongratulations)}})},[o,i,t,m]),N=Object(n.m)(e=>{p({currentPassword:e,onSuccess:()=>{i(s.m.Privacy)}})},[p,i]),S=Object(n.m)(e=>{o({type:"setCurrentPassword",payload:e}),d({currentPassword:e,onSuccess:()=>{i(s.m.TwoFaRecoveryEmail)}})},[d,o,i]),I=Object(n.m)(e=>{o({type:"setEmail",payload:e}),h({...t,email:e,onSuccess:()=>{i(s.m.TwoFaCongratulations)}})},[o,i,t,h]),w=Object(n.m)(e=>{b({code:e})},[b]),P=Object(T.a)();switch(e){case s.m.TwoFaDisabled:return n.a.createElement(Ka,{onStart:g});case s.m.TwoFaNewPassword:return n.a.createElement(Ya,{placeholder:P("EnterPassword"),submitLabel:P("Continue"),onSubmit:E});case s.m.TwoFaNewPasswordConfirm:return n.a.createElement(Ya,{expectedPassword:t.password,placeholder:P("PleaseReEnterPassword"),submitLabel:P("Continue"),onSubmit:v});case s.m.TwoFaNewPasswordHint:return n.a.createElement(Qa,{icon:"hint",placeholder:P("PasswordHintPlaceholder"),onSubmit:O});case s.m.TwoFaNewPasswordEmail:return n.a.createElement(Qa,{icon:"email",type:"email",isLoading:c,error:r,clearError:u,placeholder:P("RecoveryEmailTitle"),shouldConfirm:!0,onSubmit:f});case s.m.TwoFaNewPasswordEmailCode:return n.a.createElement(Ja,{isLoading:c,error:r,clearError:u,onSubmit:w});case s.m.TwoFaCongratulations:return n.a.createElement(_a,{onScreenSelect:i});case s.m.TwoFaEnabled:return n.a.createElement(Ha,{onScreenSelect:i});case s.m.TwoFaChangePasswordCurrent:return n.a.createElement(Ya,{isLoading:c,error:r,clearError:u,hint:a,onSubmit:j});case s.m.TwoFaChangePasswordNew:return n.a.createElement(Ya,{placeholder:P("PleaseEnterNewFirstPassword"),onSubmit:C});case s.m.TwoFaChangePasswordConfirm:return n.a.createElement(Ya,{expectedPassword:t.password,placeholder:P("PleaseReEnterPassword"),onSubmit:y});case s.m.TwoFaChangePasswordHint:return n.a.createElement(Qa,{isLoading:c,error:r,clearError:u,icon:"hint",placeholder:P("PasswordHintPlaceholder"),onSubmit:k});case s.m.TwoFaTurnOff:return n.a.createElement(Ya,{isLoading:c,error:r,clearError:u,hint:a,onSubmit:N});case s.m.TwoFaRecoveryEmailCurrentPassword:return n.a.createElement(Ya,{isLoading:c,error:r,clearError:u,hint:a,onSubmit:S});case s.m.TwoFaRecoveryEmail:return n.a.createElement(Qa,{icon:"email",type:"email",placeholder:P("RecoveryEmailTitle"),onSubmit:I});case s.m.TwoFaRecoveryEmailCode:return n.a.createElement(Ja,{isLoading:c,error:r,clearError:u,onSubmit:w});default:return}}));var tn=Object(n.h)(({itemIds:e,selectedIds:t,filterValue:a,filterPlaceholder:c,notFoundText:r,searchInputId:s,isLoading:l,onSelectedIdsChange:o,onFilterChange:i,onLoadMore:m})=>{const u=Object(n.q)(null),h=t.length>10;Object(n.n)(()=>{setTimeout(()=>{requestAnimationFrame(()=>{u.current.focus()})},500)},[]);const b=Object(n.m)(e=>{const a=[...t];a.includes(e)?a.splice(a.indexOf(e),1):a.push(e),o(a),i("")},[t,o,i]),p=Object(n.m)(e=>{const{value:t}=e.currentTarget;i(t)},[i]),[g,E]=Object(pe.a)(m,e,Boolean(a)),v=Object(T.a)();return n.a.createElement("div",{className:"Picker"},n.a.createElement("div",{className:"picker-header custom-scroll"},t.map((e,a)=>n.a.createElement(Je.a,{chatOrUserId:e,isMinimized:h&&an.a.createElement(fe.a,{key:e,className:"chat-item-clickable picker-list-item",onClick:()=>b(e),ripple:!0},n.a.createElement(aa.a,{label:"",checked:t.includes(e)}),Object(d.lb)(e)?n.a.createElement(je.a,{userId:e}):n.a.createElement(Ce.a,{chatId:e})))):l||!g||g.length?n.a.createElement(ge.a,null):n.a.createElement("p",{className:"no-results"},r||"Sorry, nothing found."))});function an(e,t){const{privacy:a}=e.settings;switch(t){case s.m.PrivacyPhoneNumberAllowedContacts:case s.m.PrivacyPhoneNumberDeniedContacts:return a.phoneNumber;case s.m.PrivacyLastSeenAllowedContacts:case s.m.PrivacyLastSeenDeniedContacts:return a.lastSeen;case s.m.PrivacyProfilePhotoAllowedContacts:case s.m.PrivacyProfilePhotoDeniedContacts:return a.profilePhoto;case s.m.PrivacyForwardingAllowedContacts:case s.m.PrivacyForwardingDeniedContacts:return a.forwards;case s.m.PrivacyGroupChatsDeniedContacts:case s.m.PrivacyGroupChatsAllowedContacts:return a.chatInvite}}var nn=Object(n.h)(Object(c.h)((e,{screen:t})=>{const{chats:{byId:a,listIds:n,orderedPinnedIds:c},currentUserId:r}=e;return{currentUserId:r,chatsById:a,listIds:n.active,orderedPinnedIds:c.active,archivedPinnedIds:c.archived,archivedListIds:n.archived,settings:an(e,t)}},(e,t)=>Object(u.l)(t,["setPrivacySettings"]))(({currentUserId:e,isAllowList:t,screen:a,settings:c,chatsById:r,listIds:l,orderedPinnedIds:o,archivedListIds:i,archivedPinnedIds:m,setPrivacySettings:u,onScreenSelect:h})=>{const b=Object(n.p)(()=>c?t?[...c.allowUserIds,...c.allowChatIds]:[...c.blockUserIds,...c.blockChatIds]:[],[t,c]),[p,g]=Object(n.r)(""),[E,v]=Object(n.r)(!1),[O,f]=Object(n.r)(b),j=Object(n.p)(()=>{const e=l?Object(d.Ab)(r,l,o,"all"):void 0,t=i?Object(d.Ab)(r,i,m,"archived"):void 0;if(e||t)return[...e?[...e.pinnedChats,...e.otherChats]:[],...t?t.otherChats:[]]},[r,l,o,i,m]),C=Object(n.p)(()=>{if(j)return j.filter(t=>(Object(d.lb)(t.id)&&t.id!==e||Object(d.kb)(t))&&(!p||Object(be.a)(Object(d.l)(t),p)||b.includes(t.id))).map(({id:e})=>e)},[j,e,p,b]),y=Object(n.m)(e=>{f(e),v(!0)},[]),k=Object(n.m)(()=>{u({privacyKey:xa(a),isAllowList:Boolean(t),contactsIds:O}),h(s.m.Privacy)},[t,O,h,a,u]),N=Object(T.a)();return n.a.createElement("div",{className:"NewChat-inner step-1"},n.a.createElement(tn,{itemIds:C||[],selectedIds:O,filterValue:p,filterPlaceholder:N(t?"AlwaysShareWithPlaceholder":"NeverShareWithPlaceholder"),searchInputId:"new-group-picker-search",onSelectedIdsChange:y,onFilterChange:g}),n.a.createElement(zt,{isShown:E,onClick:k,ariaLabel:N(t?"AlwaysShareWithTitle":"NeverShareWithTitle")},n.a.createElement("i",{className:"icon-arrow-right"})))}));a(263);const cn=Object.keys(s.m).length/2;var rn=Object(n.h)(({currentScreen:e,onScreenSelect:t,onReset:a})=>{const[c,r]=Nt(At,Lt),[l,i]=Nt(Bt,Tt),m=Object(n.m)(()=>{e!==s.m.FoldersCreateFolder&&e!==s.m.FoldersEditFolder||setTimeout(()=>{r({type:"reset"})},200),e!==s.m.FoldersIncludedChats&&e!==s.m.FoldersExcludedChats?a():"create"===c.mode?t(s.m.FoldersCreateFolder):t(s.m.FoldersEditFolder)},[c.mode,r,e,a,t]),d=Object(n.m)(()=>{r({type:"saveFilters"}),m()},[r,m]);function u(){return n.a.createElement(n.a.Fragment,null,n.a.createElement(xt,{currentScreen:e,onReset:m,onSaveFilter:d,editedFolderId:c.folderId}),function(){switch(e){case s.m.Main:return n.a.createElement(Ut,{onScreenSelect:t});case s.m.EditProfile:return n.a.createElement(Yt,null);case s.m.General:return n.a.createElement(va,{onScreenSelect:t});case s.m.Notifications:return n.a.createElement(Ta,null);case s.m.Privacy:return n.a.createElement(Ba,{onScreenSelect:t});case s.m.Language:return n.a.createElement(Da,null);case s.m.GeneralChatBackground:return n.a.createElement(ka,{onScreenSelect:t});case s.m.GeneralChatBackgroundColor:return n.a.createElement(Aa,{onScreenSelect:t});case s.m.PrivacyActiveSessions:return n.a.createElement(za,null);case s.m.PrivacyBlockedUsers:return n.a.createElement(qa,null);case s.m.PrivacyPhoneNumber:case s.m.PrivacyLastSeen:case s.m.PrivacyProfilePhoto:case s.m.PrivacyForwarding:case s.m.PrivacyGroupChats:return n.a.createElement(Ra,{screen:e,onScreenSelect:t});case s.m.PrivacyPhoneNumberAllowedContacts:case s.m.PrivacyLastSeenAllowedContacts:case s.m.PrivacyProfilePhotoAllowedContacts:case s.m.PrivacyForwardingAllowedContacts:case s.m.PrivacyGroupChatsAllowedContacts:return n.a.createElement(nn,{isAllowList:!0,screen:e,onScreenSelect:t});case s.m.PrivacyPhoneNumberDeniedContacts:case s.m.PrivacyLastSeenDeniedContacts:case s.m.PrivacyProfilePhotoDeniedContacts:case s.m.PrivacyForwardingDeniedContacts:case s.m.PrivacyGroupChatsDeniedContacts:return n.a.createElement(nn,{screen:e,onScreenSelect:t});case s.m.Folders:case s.m.FoldersCreateFolder:case s.m.FoldersEditFolder:case s.m.FoldersIncludedChats:case s.m.FoldersExcludedChats:return n.a.createElement(ra,{currentScreen:e,state:c,dispatch:r,onScreenSelect:t,onReset:m});case s.m.TwoFaDisabled:case s.m.TwoFaNewPassword:case s.m.TwoFaNewPasswordConfirm:case s.m.TwoFaNewPasswordHint:case s.m.TwoFaNewPasswordEmail:case s.m.TwoFaNewPasswordEmailCode:case s.m.TwoFaCongratulations:case s.m.TwoFaEnabled:case s.m.TwoFaChangePasswordCurrent:case s.m.TwoFaChangePasswordNew:case s.m.TwoFaChangePasswordConfirm:case s.m.TwoFaChangePasswordHint:case s.m.TwoFaTurnOff:case s.m.TwoFaRecoveryEmailCurrentPassword:case s.m.TwoFaRecoveryEmail:case s.m.TwoFaRecoveryEmailCode:return n.a.createElement(en,{currentScreen:e,state:l,dispatch:i,onScreenSelect:t});default:return}}())}return n.a.createElement(x.a,{id:"Settings",name:o.f?"slide-layers":"push-slide",activeKey:e,renderCount:cn},u)});const sn=Object(K.g)(e=>e(),6e4,!0);var ln=Object(n.h)(Object(c.h)(e=>{const{userIds:t}=e.contactList||{},{byId:a}=e.users;return{usersById:a,contactIds:t}},(e,t)=>Object(u.l)(t,["loadContactList","openChat"]))(({filter:e,usersById:t,contactIds:a,loadContactList:c,openChat:r})=>{Object(n.n)(()=>{sn(()=>{c()})});const s=Object(n.m)(e=>{r({id:e})},[r]),l=Object(n.p)(()=>{if(!a)return;const n=e?a.filter(a=>{const n=t[a];if(!n)return!1;const c=Object(d.Z)(n);return c&&Object(be.a)(c,e)}):a;return Object(d.W)(n,t)},[e,t,a]),[i,m]=Object(pe.a)(void 0,l,Boolean(e));return n.a.createElement(Oe.a,{items:i,onLoadMore:m,className:"chat-list custom-scroll"},i&&i.length?i.map(e=>n.a.createElement(fe.a,{key:e,className:"chat-item-clickable",onClick:()=>s(e),ripple:!o.f},n.a.createElement(je.a,{userId:e,forceShowSelf:!0,avatarSize:"large"}))):i&&!i.length?n.a.createElement("p",{className:"no-results",key:"no-results"},e.length?"No contacts matched your search.":"Contact list is empty."):n.a.createElement(ge.a,{key:"loading"}))}));const on=Object(K.g)(e=>e(),6e4,!0);var mn=Object(n.h)(Object(c.h)(e=>{const{userIds:t}=e.contactList||{},{byId:a}=e.users,{query:n,fetchingStatus:c,globalResults:r,localResults:s}=e.globalSearch,{users:l}=r||{},{users:o}=s||{};return{usersById:a,localContactIds:t,searchQuery:n,isSearching:c&&c.chats,globalUsers:l,localUsers:o}},(e,t)=>Object(u.l)(t,["loadContactList","setGlobalSearchQuery"]))(({isChannel:e,selectedMemberIds:t,onSelectedMemberIdsChange:a,onNextStep:c,onReset:r,usersById:s,localContactIds:l,searchQuery:o,isSearching:i,localUsers:m,globalUsers:h,loadContactList:b,setGlobalSearchQuery:p})=>{Object(n.n)(()=>{on(()=>{b()})});const g=Object(n.m)(e=>{p({query:e})},[p]),E=Object(n.p)(()=>{if(!o)return l||[];const e=l?l.filter(e=>{const t=s[e];if(!t)return!1;const a=Object(d.Z)(t);return a&&Object(be.a)(a,o)}):[];return Object(d.W)(Object(u.o)([...e,...m?m.map(e=>e.id):[],...h?h.map(e=>e.id):[]]),s,t)},[o,l,m,h,s,t]),v=Object(n.m)(()=>{t.length&&(p({query:""}),c())},[t,p,c]),O=Object(T.a)();return n.a.createElement("div",{className:"NewChat step-1"},n.a.createElement("div",{className:"left-header"},n.a.createElement(R.a,{round:!0,size:"smaller",color:"translucent",onClick:r,ariaLabel:"Return to Chat List"},n.a.createElement("i",{className:"icon-arrow-left"})),n.a.createElement("h3",null,O("GroupAddMembers"))),n.a.createElement("div",{className:"NewChat-inner step-1"},n.a.createElement(tn,{itemIds:E,selectedIds:t,filterValue:o,filterPlaceholder:O("SendMessageTo"),searchInputId:"new-group-picker-search",isLoading:i,onSelectedIdsChange:a,onFilterChange:g}),n.a.createElement(zt,{isShown:Boolean(t.length),onClick:v,ariaLabel:e?"Continue To Channel Info":"Continue To Group Info"},n.a.createElement("i",{className:"icon-arrow-right"}))))}));var dn=Object(n.h)(Object(c.h)(e=>{const{progress:t,error:a}=e.chatCreation||{};return{creationProgress:t,creationError:a}},(e,t)=>Object(u.l)(t,["createGroupChat","createChannel"]))(({isChannel:e,memberIds:t,onReset:a,creationProgress:c,creationError:r,createGroupChat:l,createChannel:o})=>{const i=Object(T.a)(),[m,d]=Object(n.r)(""),[u,h]=Object(n.r)(""),[b,p]=Object(n.r)(),[g,E]=Object(n.r)(),v=c===s.a.InProgress,O=Object(n.m)(e=>{const{value:t}=e.currentTarget,a=t.replace(/^\s+/,"");d(a),a!==t&&(e.currentTarget.value=a)},[]),f=Object(n.m)(e=>{h(e.currentTarget.value)},[]),j=Object(n.m)(()=>{m.length?t.length>199?E("Sorry, creating supergroups is not yet supported"):l({title:m,photo:b,memberIds:t}):E("Chat title can't be empty")},[m,t,l,b,"Chat title can't be empty","Sorry, creating supergroups is not yet supported"]),C=Object(n.m)(()=>{m.length?o({title:m,about:u,photo:b,memberIds:t}):E("Channel title can't be empty")},[m,o,u,b,t,"Channel title can't be empty"]);Object(n.n)(()=>{c===s.a.Complete&&a(!0)},[c,a]);const y=r||("Chat title can't be empty"!==g&&"Channel title can't be empty"!==g?g:void 0);return n.a.createElement("div",{className:"NewChat"},n.a.createElement("div",{className:"left-header"},n.a.createElement(R.a,{round:!0,size:"smaller",color:"translucent",onClick:()=>a(),ariaLabel:"Return to member selection"},n.a.createElement("i",{className:"icon-arrow-left"})),n.a.createElement("h3",null,i(e?"NewChannel":"NewGroup"))),n.a.createElement("div",{className:"NewChat-inner step-2"},n.a.createElement(Gt.a,{onChange:p,title:i("AddPhoto")}),n.a.createElement(ve.a,{value:m,onChange:O,label:i(e?"EnterChannelName":"GroupName"),error:"Chat title can't be empty"===g||"Channel title can't be empty"===g?g:void 0}),e&&n.a.createElement(n.a.Fragment,null,n.a.createElement(ve.a,{value:u,onChange:f,label:i("DescriptionOptionalPlaceholder")}),n.a.createElement("p",{className:"note"},i("DescriptionInfo"))),y&&n.a.createElement("p",{className:"error"},y),n.a.createElement("h3",{className:"chat-members-heading"},i("GroupInfo.ParticipantCount",t.length,"i")),n.a.createElement("div",{className:"chat-members-list custom-scroll"},t.map(e=>n.a.createElement(fe.a,{inactive:!0,className:"chat-item-clickable"},n.a.createElement(je.a,{userId:e}))))),n.a.createElement(zt,{isShown:0!==m.length,onClick:e?C:j,disabled:v,ariaLabel:e?i("ChannelIntro.CreateChannel"):"Create Group"},v?n.a.createElement(B.a,{color:"white"}):n.a.createElement("i",{className:"icon-arrow-right"})))}));a(264);const un=Object.keys(s.d).length/2;var hn=Object(n.h)(({isChannel:e=!1,content:t,onContentChange:a,onReset:c})=>{const[r,l]=Object(n.r)([]),i=Object(n.m)(()=>{a(e?s.d.NewChannelStep2:s.d.NewGroupStep2)},[e,a]);return n.a.createElement(x.a,{id:"NewChat",name:o.f?"slide-layers":"push-slide",renderCount:un,activeKey:t},()=>{switch(t){case s.d.NewChannelStep1:case s.d.NewGroupStep1:return n.a.createElement(mn,{isChannel:e,selectedMemberIds:r,onSelectedMemberIdsChange:l,onNextStep:i,onReset:c});case s.d.NewChannelStep2:case s.d.NewGroupStep2:return n.a.createElement(dn,{isChannel:e,memberIds:r,onReset:c});default:return}})}),bn=a(176);a(265);var pn=Object(n.h)(({onReset:e})=>{const t=Object(T.a)();return n.a.createElement("div",{className:"ArchivedChats"},n.a.createElement("div",{className:"left-header"},n.a.createElement(R.a,{round:!0,size:"smaller",color:"translucent",onClick:e,ariaLabel:"Return to chat list"},n.a.createElement("i",{className:"icon-arrow-left"})),n.a.createElement("h3",null,t("ArchivedChats"))),n.a.createElement(bn.a,{folderType:"archived",noChatsText:"Archive is empty."}))});const gn={Down:!0,ArrowDown:!0,Up:!0,ArrowUp:!0,Left:!0,ArrowLeft:!0,Right:!0,ArrowRight:!0," ":!0,PageUp:!0,PageDown:!0,End:!0,Home:!0,Tab:!0},En=e=>{e.preventDefault()};function vn(e){gn[e.key]&&En(e)}function On(){document.addEventListener("wheel",En,{passive:!1}),window.ontouchmove=En,document.onkeydown=vn}function fn(){document.removeEventListener("wheel",En),window.ontouchmove=null,document.onkeydown=null}var jn=a(48),Cn=a(158);function yn(e,t){return e?"Copy Selected Text":t?"Copy Text":"Copy"}var kn=a(162),Nn=a(47);a(266);var Sn=({isOpen:e,message:t,anchor:a,canSendNow:c,canReschedule:s,canReply:l,canEdit:o,canPin:i,canUnpin:m,canDelete:u,canForward:h,canFaveSticker:b,canUnfaveSticker:p,canCopy:g,canCopyLink:E,canSelect:v,onReply:O,onEdit:f,onPin:j,onUnpin:C,onForward:y,onDelete:N,onFaveSticker:S,onUnfaveSticker:I,onSelect:w,onSend:P,onReschedule:M,onClose:F,onCloseAnimationEnd:L,onCopyLink:A})=>{Object(n.n)(()=>{Object(k.b)(200)},[e]);const B=function(e,t,a){const n=[],c=Object(d.N)(e),s=Object(d.G)(e),l=Object(d.D)(e,"inline"),o=s&&l&&Cn.a,i=window.getSelection();if(o&&n.push({label:"Copy Media",handler:()=>{jn.b(l,r.ApiMediaFormat.BlobUrl).then(Cn.b),t&&t()}}),c){const e=Boolean(i&&i.anchorNode&&i.anchorNode.parentNode&&i.anchorNode.parentNode.closest(".Message .content-inner")&&""!==i.toString().replace(/(?:\r\n|\r|\n)/g,""));n.push({label:yn(e,o),handler:()=>{const a=e&&i?i.toString():c;Object(Cn.c)(a),t&&t()}})}return a&&n.push({label:"CopyMessageLink",handler:()=>{a(),t&&t()}}),n}(t,F,E?A:void 0),D=Object(n.m)(()=>document.querySelector(`.active > .MessageList div[data-message-id="${t.id}"]`),[t.id]),x=Object(n.m)(()=>document.querySelector(".active > .MessageList"),[]),R=Object(n.m)(()=>document.querySelector(".MessageContextMenu .bubble"),[]),{positionX:U,positionY:G,style:z}=Object(kn.a)(a,D,x,R,10,document.querySelector(".MiddleHeader").offsetHeight),q=Object(T.a)();return n.a.createElement(Nn.a,{isOpen:e,positionX:U,positionY:G,style:z,className:"MessageContextMenu fluid",onClose:F,onCloseAnimationEnd:L},c&&n.a.createElement(V.a,{icon:"send-outline",onClick:P},q("MessageScheduleSend")),s&&n.a.createElement(V.a,{icon:"schedule",onClick:M},q("MessageScheduleEditTime")),l&&n.a.createElement(V.a,{icon:"reply",onClick:O},q("Reply")),o&&n.a.createElement(V.a,{icon:"edit",onClick:f},q("Edit")),b&&n.a.createElement(V.a,{icon:"favorite",onClick:S},q("AddToFavorites")),p&&n.a.createElement(V.a,{icon:"favorite",onClick:I},q("Stickers.RemoveFromFavorites")),g&&B.map(e=>n.a.createElement(V.a,{key:e.label,icon:"copy",onClick:e.handler},q(e.label))),i&&n.a.createElement(V.a,{icon:"pin",onClick:j},q("DialogPin")),m&&n.a.createElement(V.a,{icon:"unpin",onClick:C},q("DialogUnpin")),h&&n.a.createElement(V.a,{icon:"forward",onClick:y},q("Forward")),v&&n.a.createElement(V.a,{icon:"select",onClick:w},q("Common.Select")),u&&n.a.createElement(V.a,{destructive:!0,icon:"delete",onClick:N},q("Delete")))};var In=Object(n.h)(Object(c.h)((e,{message:t,messageListType:a})=>{const{threadId:n}=Object(m.x)(e)||{},{noOptions:c,canReply:r,canPin:s,canUnpin:l,canDelete:o,canEdit:i,canForward:d,canFaveSticker:u,canUnfaveSticker:h,canCopy:b,canCopyLink:p,canSelect:g}=n&&Object(m.b)(e,t,n)||{},E="pinned"===a,v="scheduled"===a;return{noOptions:c,canSendNow:v,canReschedule:v,canReply:!E&&!v&&r,canPin:!v&&s,canUnpin:!v&&l,canDelete:o,canEdit:!E&&i,canForward:!v&&d,canFaveSticker:!v&&u,canUnfaveSticker:!v&&h,canCopy:b,canCopyLink:!v&&p,canSelect:g}},(e,t)=>Object(u.l)(t,["setReplyingToId","setEditingId","pinMessage","openForwardMenu","faveSticker","unfaveSticker","toggleMessageSelection","sendScheduledMessages","rescheduleMessage","loadMessageLink"]))(({isOpen:e,messageListType:t,message:a,album:c,anchor:r,onClose:s,onCloseAnimationEnd:l,noOptions:o,canSendNow:i,canReschedule:m,canReply:d,canPin:u,canUnpin:h,canDelete:b,canEdit:p,canForward:g,canFaveSticker:E,canUnfaveSticker:v,canCopy:O,canCopyLink:f,canSelect:j,setReplyingToId:C,setEditingId:y,pinMessage:k,openForwardMenu:N,faveSticker:S,unfaveSticker:I,toggleMessageSelection:w,sendScheduledMessages:P,rescheduleMessage:M,loadMessageLink:F})=>{const{transitionClassNames:L}=Object(Q.a)(e,l,void 0,!1),[A,T]=Object(n.r)(!0),[B,D]=Object(n.r)(!1),[x,R]=Object(n.r)(!1),[G,z,q]=Object(De.a)(),$=Object(n.m)(()=>{T(!1),D(!0)},[]),H=Object(n.m)(()=>{T(!1),s()},[s]),V=Object(n.m)(()=>{D(!1),s()},[s]),W=Object(n.m)(()=>{R(!1),s()},[s]),Y=Object(n.m)(()=>{q(),s()},[q,s]),K=Object(n.m)(()=>{C({messageId:a.id}),H()},[C,a.id,H]),Z=Object(n.m)(()=>{y({messageId:a.id}),H()},[y,a.id,H]),_=Object(n.m)(()=>{T(!1),R(!0)},[]),X=Object(n.m)(()=>{k({messageId:a.id,isUnpin:!0}),H()},[k,a.id,H]),J=Object(n.m)(()=>{if(H(),c&&c.messages){const e=c.messages.map(({id:e})=>e);N({fromChatId:a.chatId,messageIds:e})}else N({fromChatId:a.chatId,messageIds:[a.id]})},[N,a,H,c]),ee=Object(n.m)(()=>{H(),S({sticker:a.content.sticker})},[H,a.content.sticker,S]),te=Object(n.m)(()=>{H(),I({sticker:a.content.sticker})},[H,a.content.sticker,I]),ae=Object(n.m)(()=>{const e=c&&c.messages?{messageId:a.id,childMessageIds:c.messages.map(({id:e})=>e),withShift:!1}:{messageId:a.id,withShift:!1};w(e),H()},[H,a.id,w,c]),ne=Object(n.m)(()=>{P({chatId:a.chatId,id:a.id}),H()},[H,a.chatId,a.id,P]),ce=Object(n.m)(()=>{T(!1),z()},[z]),re=Object(n.m)(e=>{M({chatId:a.chatId,messageId:a.id,scheduledAt:Math.round(e.getTime()/1e3)})},[a.chatId,a.id,M]),se=Object(n.m)(()=>{F({messageId:a.id,chatId:a.chatId}),H()},[H,F,a.chatId,a.id]);if(Object(n.n)(()=>(On(),fn),[]),o)return void H();const le=new Date;return le.setFullYear(le.getFullYear()+1),n.a.createElement("div",{className:["ContextMenuContainer",L].join(" ")},n.a.createElement(Sn,{message:a,isOpen:A,anchor:r,canSendNow:i,canReschedule:m,canReply:d,canDelete:b,canPin:u,canUnpin:h,canEdit:p,canForward:g,canFaveSticker:E,canUnfaveSticker:v,canCopy:O,canCopyLink:f,canSelect:j,onReply:K,onEdit:Z,onPin:_,onUnpin:X,onForward:J,onDelete:$,onFaveSticker:ee,onUnfaveSticker:te,onSelect:ae,onSend:ne,onReschedule:ce,onClose:H,onCopyLink:se}),n.a.createElement(Ae,{isOpen:B,isSchedule:"scheduled"===t,onClose:V,album:c,message:a}),n.a.createElement(Te,{isOpen:x,messageId:a.id,chatId:a.chatId,onClose:W}),n.a.createElement(Le,{isOpen:G,withTimePicker:!0,selectedAt:1e3*a.date,maxAt:Object(U.k)(le),isFutureMode:!0,onClose:Y,onSubmit:re}))}));a(267);var wn=Object(n.h)(Object(c.h)((e,{fromSticker:t})=>({stickerSet:Object(m.sb)(e,t.stickerSetId)}),(e,t)=>Object(u.l)(t,["loadStickers","toggleStickerSet","sendMessage"]))(({isOpen:e,fromSticker:t,stickerSet:a,onClose:c,loadStickers:r,toggleStickerSet:s,sendMessage:o})=>{const i=Object(n.q)(null),{observe:m}=Object(sa.a)({rootRef:i,throttleMs:200,isDisabled:!e});Object(n.n)(()=>{if(e){const{stickerSetId:e,stickerSetAccessHash:a}=t;r({stickerSetId:e,stickerSetAccessHash:a})}},[e,t,r]);const d=Object(n.m)(e=>{e={...e,isPreloadedGlobally:!0},o({sticker:e}),c()},[c,o]),u=Object(n.m)(()=>{s({stickerSetId:t.stickerSetId}),c()},[t.stickerSetId,c,s]);return n.a.createElement(Ee.a,{className:"StickerSetModal",isOpen:e,onClose:c,hasCloseButton:!0,title:a?a.title:"Sticker Set"},a&&a.stickers?n.a.createElement(n.a.Fragment,null,n.a.createElement("div",{ref:i,className:"stickers custom-scroll"},a.stickers.map(e=>n.a.createElement(ha,{sticker:e,size:l.jb,observeIntersection:m,onClick:d,clickArg:e}))),n.a.createElement("div",{className:"button-wrapper"},n.a.createElement(R.a,{size:"smaller",fluid:!0,color:a.installedDate?"danger":"primary",onClick:u},`${a.installedDate?"Remove":"Add"} ${a.count} stickers`))):n.a.createElement(ge.a,null))})),Pn=a(114);a(268);var Mn=Object(n.h)(Object(c.h)((e,{chatId:t})=>{const a=Object(m.f)(e,t);return!a||a.isRestricted?{}:{chat:a,isMuted:a.isMuted,isPrivate:Object(d.lb)(a.id),canDeleteChat:Object(d.d)(a)}},(e,t)=>Object(u.l)(t,["updateChatMutedState","enterMessageSelectMode"]))(({chatId:e,isOpen:t,anchor:a,isChannel:c,canSubscribe:r,canSearch:s,canMute:l,canSelect:i,canLeave:m,chat:d,isPrivate:u,isMuted:h,canDeleteChat:b,onSubscribeChannel:p,onSearchClick:g,onClose:E,onCloseAnimationEnd:v,updateChatMutedState:O,enterMessageSelectMode:f})=>{const[j,C]=Object(n.r)(!0),[y,k]=Object(n.r)(!1),{x:N,y:S}=a;Object(Q.a)(t,v,void 0,!1);const I=Object(n.m)(()=>{C(!1),k(!0)},[]),w=Object(n.m)(()=>{C(!1),E()},[E]),P=Object(n.m)(()=>{k(!1),E()},[E]),M=Object(n.m)(()=>{O({chatId:e,isMuted:!h}),w()},[e,w,h,O]),F=Object(n.m)(()=>{p(),w()},[w,p]),L=Object(n.m)(()=>{g(),w()},[w,g]),A=Object(n.m)(()=>{f(),w()},[w,f]);Object(n.n)(()=>(On(),fn),[]);const B=Object(T.a)();return n.a.createElement(Pn.a,null,n.a.createElement("div",{className:"HeaderMenuContainer"},n.a.createElement(Nn.a,{isOpen:j,positionX:"right",style:`left: ${N}px;top: ${S}px;`,onClose:w},o.f&&r&&n.a.createElement(V.a,{icon:c?"channel":"group",onClick:F},B(c?"Subscribe":"Join Group")),o.f&&s&&n.a.createElement(V.a,{icon:"search",onClick:L},B("Search")),l&&n.a.createElement(V.a,{icon:h?"unmute":"mute",onClick:M},B(h?"ChatsUnmute":"ChatsMute")),i&&n.a.createElement(V.a,{icon:"select",onClick:A},B("ReportSelectMessages")),m&&n.a.createElement(V.a,{destructive:!0,icon:"delete",onClick:I},B(u?"Delete":b?"Delete and Leave":"Leave"))),d&&n.a.createElement($e.a,{isOpen:y,onClose:P,chat:d})))})),Fn=a(142);a(269);const Ln=Object(K.a)(e=>e(),200,!1);var An=Object(n.h)(Object(c.h)(e=>{const t=Object(m.q)(e);if(!t)return{};const{query:a,results:n}=Object(m.z)(e)||{},{totalCount:c,foundIds:r}=n||{};return{chat:t,query:a,totalCount:c,foundIds:r}},(e,t)=>Object(u.l)(t,["setLocalTextSearchQuery","searchTextMessagesLocal","focusMessage","closeLocalTextSearch","searchMessagesByDate"]))(({isActive:e,chat:t,query:a,totalCount:c,foundIds:r,setLocalTextSearchQuery:s,searchTextMessagesLocal:l,focusMessage:o,closeLocalTextSearch:i,searchMessagesByDate:m})=>{const d=Object(n.q)(null),[u,h]=Object(n.r)(0),[b,p,g]=Object(De.a)();Object(n.n)(()=>{const{visualViewport:e}=window;if(!e)return;const t=document.getElementById("Main"),a=()=>{const{activeElement:a}=document;if(a&&a===d.current){const{pageTop:a,height:n}=e;t.style.transform=`translateY(${a}px)`,t.style.height=n+"px",document.documentElement.scrollTop=a}else t.style.transform="",t.style.height=""};return e.addEventListener("resize",a),()=>{e.removeEventListener("resize",a)}},[]),Object(n.n)(()=>{t&&r&&r.length?(o({chatId:t.id,messageId:r[r.length-1]}),h(0)):h(-1)},[t,o,r]),Object(n.n)(()=>{Array.from(document.querySelectorAll("input")).forEach(t=>{t.disabled=Boolean(e&&t!==d.current)}),Array.from(document.querySelectorAll("div[contenteditable]")).forEach(t=>{t.contentEditable=e?"false":"true"})},[e]),Object(n.n)(()=>{e||d.current.blur()},[e]),Object(n.o)(()=>{document.querySelector("#MobileSearch input").blur()},[b]);const E=Object(n.m)(e=>{s({query:e}),e.length&&Ln(l)},[l,s]),v=Object(n.m)(e=>{m({timestamp:e.valueOf()/1e3}),g()},[g,m]),O=Object(n.m)(()=>{if(t&&r){const e=u+1;o({chatId:t.id,messageId:r[r.length-1-e]}),h(e)}},[t,u,o,r]),f=Object(n.m)(()=>{if(t&&r){const e=u-1;o({chatId:t.id,messageId:r[r.length-1-e]}),h(e)}},[t,u,o,r]),j=Object(T.a)();return n.a.createElement("div",{id:"MobileSearch",className:e?"active":""},n.a.createElement("div",{className:"header"},n.a.createElement(R.a,{size:"smaller",round:!0,color:"translucent",onClick:i},n.a.createElement("i",{className:"icon-arrow-left"})),n.a.createElement(Fn.a,{ref:d,value:a,onChange:E})),n.a.createElement("div",{className:"footer"},n.a.createElement("div",{className:"counter"},a?r&&r.length?`${u+1} of ${c}`:r&&!r.length?"No results":"":n.a.createElement(R.a,{round:!0,size:"smaller",color:"translucent",onClick:p,ariaLabel:"Search messages by date"},n.a.createElement("i",{className:"icon-calendar"}))),n.a.createElement(R.a,{round:!0,size:"smaller",color:"translucent",onClick:O,disabled:!r||!r.length||u===r.length-1},n.a.createElement("i",{className:"icon-up"})),n.a.createElement(R.a,{round:!0,size:"smaller",color:"translucent",onClick:f,disabled:!r||!r.length||0===u},n.a.createElement("i",{className:"icon-down"}))),n.a.createElement(Le,{isOpen:b,isPastMode:!0,submitButtonLabel:j("JumpToDate"),onClose:g,onSubmit:v}))})),Tn=a(53),Bn=a(178),Dn=a(167),xn=a(171);var Rn=function(e,t){const a=e.scrollTop,n=a+e.offsetHeight,c=t.offsetTop,r=c+t.offsetHeight;return c>a&&r{const l=Object(n.q)(null),{shouldRender:o,transitionClassNames:i}=Object(Q.a)(e,void 0,void 0,!1),m=Object(n.m)(e=>{if(!s)return-1;const t=s.length;return Object(Gn.a)(t,e)},[s]),[d,u]=Object(n.r)(-1),h=Object(n.m)((e,t)=>{t.preventDefault(),u(t=>m(t+e))},[u,m]),b=Object(n.m)((e,t=!1)=>{const a=r&&r[e];a&&c(a,t)},[r,c]),p=Object(n.m)(e=>{if(s&&s.length&&d>-1){const t=s[d];t&&(e.preventDefault(),b(t.userId,!0))}},[s,d,b]);Object(n.n)(()=>e?Object(xe.a)({onEsc:a,onUp:e=>h(-1,e),onDown:e=>h(1,e),onEnter:p,onTab:p}):void 0,[e,a,h,p]),Object(n.n)(()=>{s&&!s.length&&a()},[s,a]),Object(n.n)(()=>{u(0)},[t]),Object(n.n)(()=>{!function(e,t){const a=t.current;if(!a||e<0)return;const{visibleIndexes:n,allElements:c}=function(e,t,a=0,n=!1,c=!1){const r=e.scrollTop,s=r+e.offsetHeight,l="string"==typeof t?e.querySelectorAll(t):t,{length:o}=l,i=[];let m=!1;for(let e=0;e=r-a&&d<=s+a:o<=s+a&&d>=r-a)i.push(e),m=!0;else if(m&&!n)break}return{allElements:l,visibleIndexes:i}}(a,".chat-item-clickable",8,!0,!0);if(!c.length||!c[e])return;const r=n[0];if(!n.includes(e)||e===r&&!Rn(a,c[r])){const t=e>n[n.length-1]?"start":"end";Object(Un.a)(a,c[e],t,10)}}(d,l)},[d]);const g=Object(y.a)(s&&s.length?s:void 0,o),E=s&&!s.length?g:s;if(!o||E&&!E.length)return;const v=Object(le.a)("MentionMenu custom-scroll",i);return n.a.createElement("div",{className:v,ref:l},E&&E.map(({userId:e},t)=>n.a.createElement(fe.a,{key:e,className:"chat-item-clickable scroll-item",onClick:()=>b(e),focus:d===t},n.a.createElement(je.a,{userId:e,avatarSize:"small",withHandle:!0}))))});a(271);var qn=Object(n.h)(({attachments:e,caption:t,canSuggestMembers:a,groupChatMembers:c,currentUserId:r,usersById:s,onCaptionUpdate:o,onSend:i,onClear:m})=>{const d=Object(y.a)(e),u=e.length?e:d,h=Boolean(e.length),{isMentionMenuOpen:p,mentionFilter:g,closeMentionMenu:E,insertMention:v,mentionFilteredMembers:O}=Object(Bn.a)(a&&h,t,o,l.r,c,r,s);Object(n.n)(()=>h?Object(b.a)(m):void 0,[h,m]);const f=Object(n.m)(()=>{h&&i()},[h,i]),j=Object(T.a)();if(!u)return;const C=u.every(e=>e.mimeType.startsWith("image/")),k=u.every(e=>e.mimeType.startsWith("video/"));let N="";N=C?1===u.length?"Send Photo":`Send ${u.length} Photos`:k?1===u.length?"Send Video":`Send ${u.length} Videos`:1===u.length?"Send File":`Send ${u.length} Files`;const S=u.every(e=>e.quick);return n.a.createElement(Ee.a,{isOpen:h,onClose:m,header:function(){if(u)return n.a.createElement("div",{className:"modal-header-condensed"},n.a.createElement(R.a,{round:!0,color:"translucent",size:"smaller",ariaLabel:"Cancel attachments",onClick:m},n.a.createElement("i",{className:"icon-close"})),n.a.createElement("div",{className:"modal-title"},N),n.a.createElement(R.a,{color:"primary",size:"smaller",className:"modal-action-button",onClick:f},j("Send")))}(),className:"AttachmentModal"},S?n.a.createElement("div",{className:"media-wrapper custom-scroll"},u.map(e=>e.mimeType.startsWith("image/")?n.a.createElement("img",{src:e.blobUrl,alt:""}):n.a.createElement("video",{src:e.blobUrl,autoPlay:!0,muted:!0,loop:!0}))):n.a.createElement("div",{className:"document-wrapper custom-scroll"},u.map(e=>n.a.createElement(Dn.a,{name:e.filename,extension:Object(Tn.d)(e.filename,e.mimeType),previewData:e.previewBlobUrl,size:e.size,smaller:!0}))),n.a.createElement("div",{className:"attachment-caption-wrapper"},n.a.createElement(zn,{isOpen:p,onClose:E,filter:g,onInsertUserName:v,filteredChatMembers:O,usersById:s}),n.a.createElement(xn.a,{id:"caption-input-text",html:t,editableInputId:l.r,placeholder:j("Caption"),onUpdate:o,onSend:i,shouldSetFocus:h})))}),$n=a(123);a(272);var Hn=Object(n.h)(({isOpen:e,onSend:t,onClear:a})=>{const c=Object(n.q)(null),r=Object(n.q)(null),s=Object(n.q)(null),[l,o]=Object(n.r)(""),[i,m]=Object(n.r)([""]),[d,u]=Object(n.r)(!0),[h,p]=Object(n.r)(!1),[g,E]=Object(n.r)(!1),[v,O]=Object(n.r)(),[f,j]=Object(n.r)(),[C,y]=Object(n.r)(!1),k=Object(n.m)(t=>{e&&t.current&&t.current.focus()},[e]);Object(n.n)(()=>e?Object(b.a)(a):void 0,[e,a]),Object(n.n)(()=>{e||(o(""),m([""]),u(!0),p(!1),E(!1),O(""),j(""),y(!1))},[e]),Object(n.n)(()=>k(c),[k,e]),Object(n.o)(()=>{const e=s.current;e&&v!==e.innerHTML&&(e.innerHTML=v)},[v]);const N=Object(n.m)((e=[])=>{m([...e,""]),requestAnimationFrame(()=>{const e=r.current;e&&(e.classList.toggle("overflown",e.scrollHeight>320),e.scrollTo({top:e.scrollHeight,behavior:"smooth"}))})},[]),S=Object(n.m)(()=>{if(y(!1),!e)return;const a=l.trim().substring(0,255),n=i.map(e=>e.trim().substring(0,100)).filter(e=>e.length);if(!a||n.length<2)return o(a),n.length?n.length<2?N(n):m(n):N(),void y(!0);if(g&&(!f||!n[Number(f)]))return void y(!0);const c={summary:{question:a,answers:n.map((e,t)=>({text:e.trim(),option:String(t),...String(t)===f&&{correct:!0}})),...!d&&{isPublic:!0},...h&&{multipleChoice:!0},...g&&{quiz:!0}}};if(g){const{text:e,entities:t}=v&&Object($n.a)(v.substring(0,200))||{};c.quiz={correctAnswers:[f],...e&&{solution:e},...t&&{solutionEntities:t}}}t(c)},[e,l,i,g,f,d,h,t,N,v]),I=Object(n.m)((e,t)=>{const a=[...i];a[e]=t,a[a.length-1].trim().length&&a.length<10?N(a):m(a)},[i,N]),w=Object(n.m)(e=>{const t=[...i];t.splice(e,1),m(t),requestAnimationFrame(()=>{r.current&&r.current.classList.toggle("overflown",r.current.scrollHeight>320)})},[i]),P=Object(n.m)(e=>{j(e)},[j]),M=Object(n.m)(e=>{u(e.target.checked)},[]),F=Object(n.m)(e=>{p(e.target.checked)},[]),L=Object(n.m)(e=>{E(e.target.checked)},[]),A=Object(n.m)(e=>{13===e.keyCode&&S()},[S]),B=Object(n.m)(()=>{if(C&&!l.trim().length)return"Please enter the question"},[C,l]),D=Object(n.m)(e=>{const t=i.map(e=>e.trim()).filter(e=>e.length);if(C&&t.length<2&&!i[e].trim().length)return"Please enter at least two options"},[C,i]),x=Object(T.a)();function U(){return i.map((e,t)=>n.a.createElement("div",{className:"option-wrapper"},n.a.createElement(ve.a,{label:t!==i.length-1||10===i.length?"Option "+(t+1):"Add an Option",error:D(t),value:e,onChange:e=>I(t,e.currentTarget.value),onKeyPress:A}),t!==i.length-1&&n.a.createElement(R.a,{className:"option-remove-button",round:!0,color:"translucent",size:"smaller",ariaLabel:"Remove option",onClick:()=>w(t)},n.a.createElement("i",{className:"icon-close"}))))}return n.a.createElement(Ee.a,{isOpen:e,onClose:a,header:n.a.createElement("div",{className:"modal-header-condensed"},n.a.createElement(R.a,{round:!0,color:"translucent",size:"smaller",ariaLabel:"Cancel poll creation",onClick:a},n.a.createElement("i",{className:"icon-close"})),n.a.createElement("div",{className:"modal-title"},x("NewPoll")),n.a.createElement(R.a,{color:"primary",size:"smaller",className:"modal-action-button",onClick:S},x("Create"))),className:"PollModal"},n.a.createElement(ve.a,{ref:c,label:x("AskAQuestion"),value:l,error:B(),onChange:e=>o(e.currentTarget.value),onKeyPress:A}),n.a.createElement("div",{className:"options-divider"}),n.a.createElement("div",{className:"options-list custom-scroll",ref:r},n.a.createElement("h3",{className:"options-header"},"Options"),C&&function(){const e=i.map(e=>e.trim()).filter(e=>e.length);return g&&(!f||!e[Number(f)])&&n.a.createElement("p",{className:"error"},"Please choose the correct answer")}(),g?n.a.createElement(oa.a,{name:"correctOption",options:U().map((e,t)=>({value:String(t),label:e,hidden:t===i.length-1})),onChange:P}):U()),n.a.createElement("div",{className:"options-divider"}),n.a.createElement("div",{className:"quiz-mode"},n.a.createElement(aa.a,{label:x("PollAnonymous"),checked:d,onChange:M}),n.a.createElement(aa.a,{label:x("PollMultiple"),checked:h,disabled:g,onChange:F}),n.a.createElement(aa.a,{label:x("PollQuiz"),checked:g,disabled:h,onChange:L}),g&&n.a.createElement(n.a.Fragment,null,n.a.createElement("h3",{className:"options-header"},"Solution"),n.a.createElement("div",{ref:s,className:"form-control",contentEditable:!0,onChange:e=>O(e.currentTarget.innerHTML)}),n.a.createElement("div",{className:"note"},"Users will see this comment after choosing a wrong answer, good for educational purposes."))))});let Vn;function Wn(e,t,a=250){const c=Object(n.q)(!1);Object(n.n)(()=>{Vn&&(clearTimeout(Vn),Vn=void 0),e&&!o.k&&(Vn=window.setTimeout(()=>{c.current||t()},2*a))},[e,a,t]);return[Object(n.m)(()=>{c.current=!0},[]),Object(n.m)(()=>{c.current=!1,Vn&&(clearTimeout(Vn),Vn=void 0),Vn=window.setTimeout(()=>{c.current||t()},a)},[a,t])]}var Yn=a(67),Kn=a(143);a(273);var Zn=Object(n.h)(({emoji:e,onClick:t})=>{const a=Object(n.m)(()=>{t(e.native,e.id)},[e,t]);return n.a.createElement("div",{className:"EmojiButton",onClick:a,title:e.colons},o.c?e.native:n.a.createElement("img",{src:`/img-apple-64/${e.image}.png`,alt:"",loading:"lazy"}))});var Qn=Object(n.h)(({category:e,index:t,allEmojis:a,observeIntersection:c,shouldRender:r,onEmojiSelect:s})=>{const l=Object(n.q)(null);Object(sa.c)(l,c);const{transitionClassNames:i}=Object(Q.a)(r,void 0,void 0,"slow"),m=Object(T.a)(),d=o.f?Math.floor((S.a.get().width-8)/44):9,u=44*Math.ceil(e.emojis.length/d);return n.a.createElement("div",{ref:l,key:e.id,id:"emoji-category-"+t,className:"symbol-set"},n.a.createElement("p",{className:"symbol-set-name"},m("recent"===e.id?"RecentStickers":"Emoji"+t)),n.a.createElement("div",{className:Object(le.a)("symbol-set-container",i),style:`height: ${u}px;`},r&&e.emojis.map(e=>{const t=a[e],c="id"in t?t:t[1];return n.a.createElement(Zn,{key:c.id,emoji:c,onClick:s})})))});a(274);const _n={recent:"icon-recent",people:"icon-smile",nature:"icon-animals",foods:"icon-eats",activity:"icon-sport",places:"icon-car",objects:"icon-lamp",symbols:"icon-language",flags:"icon-flag"},Xn=[];let Jn,ec,tc;var ac=Object(n.h)(Object(c.h)(e=>Object(u.l)(e,["recentEmojis"]),(e,t)=>Object(u.l)(t,["addRecentEmoji"]))(({className:e,onEmojiSelect:t,recentEmojis:c,addRecentEmoji:r})=>{const s=Object(n.q)(null),i=Object(n.q)(null),[m,d]=Object(n.r)(),[u,h]=Object(n.r)(),[b,p]=Object(n.r)(0),{observe:g}=Object(sa.a)({rootRef:s,throttleMs:200},e=>{e.forEach(e=>{const{id:t}=e.target;if(!t||!t.startsWith("emoji-category-"))return;const a=Number(t.replace("emoji-category-",""));Xn[a]=e.isIntersecting});const t=Xn.map((e,t)=>({index:t,isIntersecting:e})).filter(({isIntersecting:e})=>e);t.length&&p(t[Math.floor(t.length/2)].index)});Object(Ve.a)(i,!o.f),Object(n.n)(()=>{if(!m)return;const e=i.current;if(!e)return;const t=42*b-e.offsetWidth/2+21;Object(Kn.a)(e,t)},[m,b]);const E=Object(T.a)(),v=Object(n.p)(()=>{if(!m)return ze.a;const e=[...m];return c&&c.length&&e.unshift({id:"recent",name:E("RecentStickers"),emojis:c}),e},[m,E,c]);Object(n.n)(()=>{setTimeout(()=>{const e=()=>{d(tc.categories),h(tc.emojis)};tc?e():async function(){Jn||(Jn=a.e(9).then(a.t.bind(null,303,3)),ec=(await Jn).default,tc=Object(Yn.b)(ec));return Jn}().then(e)},200)},[]);const O=Object(n.m)(e=>{p(e);const t=document.getElementById("emoji-category-"+e);Object(Un.a)(s.current,t,"start",50,800)},[]),f=Object(n.m)((e,a)=>{t(e),r({emoji:a})},[r,t]),j=Object(ot.a)([],l.J);const C=Object(le.a)("EmojiPicker",e);return u&&j?n.a.createElement("div",{className:C},n.a.createElement("div",{ref:i,className:"EmojiPicker-header"},v.map((function(e,t){const a=_n[e.id];return a&&n.a.createElement(R.a,{className:"symbol-set-button "+(t===b?"activated":""),round:!0,faded:!0,color:"translucent",onClick:()=>O(t),ariaLabel:e.name},n.a.createElement("i",{className:a}))}))),n.a.createElement("div",{ref:s,className:"EmojiPicker-main no-selection no-scrollbar"},v.map((e,t)=>n.a.createElement(Qn,{category:e,index:t,allEmojis:u,observeIntersection:g,shouldRender:b>=t-1&&b<=t+1,onEmojiSelect:f})))):n.a.createElement("div",{className:C},n.a.createElement(ge.a,null))}));const nc=o.f?8:16;var cc=Object(n.h)(({stickerSet:e,loadAndPlay:t,index:a,observeIntersection:c,shouldRender:r,onStickerSelect:s,onStickerUnfave:i})=>{const m=Object(n.q)(null);Object(sa.c)(m,c);const{transitionClassNames:d}=Object(Q.a)(r,void 0,void 0,"slow"),u=o.f?Math.floor((S.a.get().width-8)/(l.kb+nc)):5,h=Math.ceil(e.count/u)*(l.kb+nc);return n.a.createElement("div",{ref:m,key:e.id,id:"sticker-set-"+a,className:"symbol-set"},n.a.createElement("p",{className:"symbol-set-name"},e.title),n.a.createElement("div",{className:Object(le.a)("symbol-set-container",d),style:`height: ${h}px;`},r&&e.stickers&&e.stickers.map(a=>n.a.createElement(ha,{key:a.id,sticker:a,size:l.kb,observeIntersection:c,noAnimate:!t,onClick:s,clickArg:a,onUnfaveClick:"favorite"===e.id?i:void 0}))))});a(275);const rc=[];var sc=Object(n.h)(Object(c.h)(e=>{const{setsById:t,added:a,recent:n,favorite:c}=e.stickers;return{recentStickers:n.stickers,favoriteStickers:c.stickers,stickerSetsById:t,addedSetIds:a.setIds,shouldPlay:e.settings.byKey.shouldLoopStickers}},(e,t)=>Object(u.l)(t,["loadStickerSets","loadRecentStickers","loadFavoriteStickers","loadAddedStickers","addRecentSticker","unfaveSticker"]))(({className:e,loadAndPlay:t,canSendStickers:a,recentStickers:c,favoriteStickers:r,addedSetIds:s,stickerSetsById:o,shouldPlay:i,onStickerSelect:m,loadStickerSets:d,loadRecentStickers:u,loadFavoriteStickers:h,loadAddedStickers:b,addRecentSticker:p,unfaveSticker:g})=>{const E=Object(n.q)(null),v=Object(n.q)(null),[O,f]=Object(n.r)(0),{observe:j}=Object(sa.a)({rootRef:E,throttleMs:200},e=>{e.forEach(e=>{const{id:t}=e.target;if(!t||!t.startsWith("sticker-set-"))return;const a=Number(t.replace("sticker-set-",""));rc[a]=e.isIntersecting});const t=rc.map((e,t)=>({index:t,isIntersecting:e})).filter(({isIntersecting:e})=>e);t.length&&f(t[Math.floor(t.length/2)].index)}),{observe:C}=Object(sa.a)({rootRef:v}),y=Object(T.a)(),k=Boolean(s),N=Object(n.p)(()=>s?[{id:"recent",title:y("RecentStickers"),stickers:c,count:c.length},{id:"favorite",title:y("FavoriteStickers"),stickers:r,count:r.length},...s.map(e=>o[e]).filter(Boolean)]:ze.a,[s,y,c,r,o]),S=Object(n.p)(()=>k&&0===N.filter(e=>e.stickers&&e.stickers.length).length,[N,k]);Object(n.n)(()=>{t&&(d(),u(),h())},[t,h,u,d]),Object(n.n)(()=>{s&&s.length&&b()},[s,b]),Object(Ve.a)(v),Object(n.n)(()=>{if(!k)return;const e=v.current;if(!e)return;const t=52*O-(e.offsetWidth/2-26);Object(Kn.a)(e,t)},[k,O]);const I=Object(n.m)(e=>{f(e);const t=document.getElementById("sticker-set-"+e);Object(Un.a)(E.current,t,"start",void 0,500)},[]),w=Object(n.m)(e=>{m(e),p({sticker:e})},[p,m]),P=Object(n.m)(e=>{g({sticker:e})},[g]),M=Object(ot.a)([],l.bb);const F=Object(le.a)("StickerPicker",e);return k&&M&&!S&&a?n.a.createElement("div",{className:F},n.a.createElement("div",{ref:v,className:"StickerPicker-header no-selection no-scrollbar"},N.map((function(e,t){const a=e.stickers&&e.stickers[0],c=Object(le.a)("symbol-set-button sticker-set-button",t===O&&"activated");return"recent"===e.id||"favorite"===e.id||e.hasThumbnail||!a?n.a.createElement(R.a,{key:e.id,className:c,ariaLabel:e.title,round:!0,faded:"recent"===e.id||"favorite"===e.id,color:"translucent",onClick:()=>I(t)},"recent"===e.id?n.a.createElement("i",{className:"icon-recent"}):"favorite"===e.id?n.a.createElement("i",{className:"icon-favorite"}):e.isAnimated?n.a.createElement(da,{stickerSet:e,observeIntersection:C}):n.a.createElement(ua,{stickerSet:e,observeIntersection:C})):n.a.createElement(ha,{key:e.id,sticker:a,size:l.lb,title:e.title,className:c,observeIntersection:C,onClick:I,clickArg:t})}))),n.a.createElement("div",{ref:E,className:"StickerPicker-main no-scrollbar"},N.map((e,a)=>n.a.createElement(cc,{key:e.id,stickerSet:e,loadAndPlay:Boolean(i&&t),index:a,observeIntersection:j,shouldRender:O>=a-1&&O<=a+1,onStickerSelect:w,onStickerUnfave:P})))):n.a.createElement("div",{className:F},a?S?n.a.createElement("div",{className:"picker-disabled"},"You have no saved Stickers."):n.a.createElement(ge.a,null):n.a.createElement("div",{className:"picker-disabled"},"Sending stickers is not allowed in this chat."))}));a(276);function lc(){return(lc=Object.assign||function(e){for(var t=1;t{const s=Object(n.q)(null),l=Object(n.q)(null),o="gif"+e.id,i=Object(sa.b)(s,t)&&!a,m=Object(E.a)(o+"?size=m",!i,r.ApiMediaFormat.BlobUrl),d=Object(j.a)(e.thumbnail&&e.thumbnail.dataUri,Boolean(m)),u=m||d,h=Object(E.a)(o,!i,r.ApiMediaFormat.BlobUrl),b=Boolean(i&&h),{transitionClassNames:p}=Object(ia.a)(u||h,"slow"),{isBuffered:g,bufferingHandlers:v}=Object(_.a)(!0),O=i&&!g;Object(J.a)(l,[b]);const f=Object(n.m)(()=>c({...e,blobUrl:h}),[c,e,h]),C=Object(le.a)("GifButton",e.width&&e.height&&e.width({savedGifs:e.gifs.saved.gifs}),(e,t)=>Object(u.l)(t,["loadSavedGifs"]))(({className:e,loadAndPlay:t,canSendGifs:a,savedGifs:c,onGifSelect:r,loadSavedGifs:s})=>{const o=Object(n.q)(null),{observe:i}=Object(sa.a)({rootRef:o,debounceMs:300});Object(n.n)(()=>{t&&s()},[t,s]);const m=Object(ot.a)([],l.bb);return n.a.createElement("div",{ref:o,className:Object(le.a)("GifPicker no-scrollbar",e)},a?m&&c&&c.length?c.map(e=>n.a.createElement(oc,{key:e.id,gif:e,observeIntersection:i,isDisabled:!t,onClick:r})):m&&c?n.a.createElement("div",{className:"picker-disabled"},"No saved GIFs."):n.a.createElement(ge.a,null):n.a.createElement("div",{className:"picker-disabled"},"Sending GIFs is not allowed in this chat."))}));let mc;!function(e){e[e.Emoji=0]="Emoji",e[e.Stickers=1]="Stickers",e[e.GIFs=2]="GIFs"}(mc||(mc={}));const dc=Object.values(mc).filter(e=>"string"==typeof e),uc={[mc.Emoji]:"icon-smile",[mc.Stickers]:"icon-stickers",[mc.GIFs]:"icon-gifs"};var hc=Object(n.h)(({activeTab:e,onSwitchTab:t,onRemoveSymbol:a,onSearchOpen:c})=>{function r(a){return n.a.createElement(R.a,{className:"symbol-tab-button "+(e===a?"activated":""),onClick:()=>t(a),ariaLabel:dc[a],round:!0,faded:!0,color:"translucent"},n.a.createElement("i",{className:uc[a]}))}const s=Object(n.m)(()=>{c(e===mc.Stickers?"stickers":"gifs")},[e,c]);return n.a.createElement("div",{className:"SymbolMenu-footer",onClick:function(e){e.stopPropagation()}},e!==mc.Emoji&&n.a.createElement(R.a,{className:"symbol-search-button",ariaLabel:e===mc.Stickers?"Search Stickers":"Search GIFs",round:!0,faded:!0,color:"translucent",onClick:s},n.a.createElement("i",{className:"icon-search"})),r(mc.Emoji),r(mc.Stickers),r(mc.GIFs),e===mc.Emoji&&n.a.createElement(R.a,{className:"symbol-delete-button",onClick:a,ariaLabel:"Remove Symbol",round:!0,faded:!0,color:"translucent"},n.a.createElement("i",{className:"icon-delete-left"})))});a(278);let bc=!1;var pc=Object(n.h)(({isOpen:e,allowedAttachmentOptions:t,onLoad:a,onClose:c,onEmojiSelect:r,onStickerSelect:s,onGifSelect:l,onRemoveSymbol:i,onSearchOpen:m})=>{const[d,u]=Object(n.r)(0),[h,b]=Wn(e,c),{shouldRender:p,transitionClassNames:g}=Object(Q.a)(e,c,!1,!1);!bc&&e&&(bc=!0),Object(n.n)(()=>{a()},[a]),Object(n.o)(()=>{if(o.f)return e&&(document.body.classList.add("enable-symbol-menu-transforms"),document.body.classList.add("is-symbol-menu-open")),()=>{e&&Object(K.b)(()=>{document.body.classList.remove("is-symbol-menu-open"),setTimeout(()=>{document.body.classList.remove("enable-symbol-menu-transforms")},350)})}},[e]);const E=Object(n.m)(e=>{c(),m(e)},[c,m]),v=Object(T.a)(),{canSendStickers:O,canSendGifs:f}=t;function j(t,a){switch(d){case mc.Emoji:return n.a.createElement(ac,{className:"picker-tab",onEmojiSelect:r});case mc.Stickers:return n.a.createElement(sc,{className:"picker-tab",loadAndPlay:!!O&&(e&&(t||a)),canSendStickers:O,onStickerSelect:s});case mc.GIFs:return n.a.createElement(ic,{className:"picker-tab",loadAndPlay:!!f&&(e&&(t||a)),canSendGifs:f,onGifSelect:l})}}const C=n.a.createElement(n.a.Fragment,null,n.a.createElement("div",{className:"SymbolMenu-main",onClick:function(e){e.stopPropagation()}},bc&&n.a.createElement(x.a,{name:"slide",activeKey:d,renderCount:dc.length},j)),o.f&&n.a.createElement(R.a,{round:!0,faded:!0,color:"translucent",ariaLabel:v("Close"),className:"symbol-close-button",size:"tiny",onClick:c},n.a.createElement("i",{className:"icon-close"})),n.a.createElement(hc,{activeTab:d,onSwitchTab:u,onRemoveSymbol:i,onSearchOpen:E}));if(o.f){if(!p)return;const e=Object(le.a)("SymbolMenu mobile-menu",g);return n.a.createElement(Pn.a,null,n.a.createElement("div",{className:e},C))}return n.a.createElement(Nn.a,{isOpen:e,positionX:"left",positionY:"bottom",onClose:c,className:"SymbolMenu",onCloseAnimationEnd:c,onMouseEnter:o.k?void 0:h,onMouseLeave:o.k?void 0:b,noCloseOnBackdrop:!o.k},C)});a(279);var gc=Object(n.h)(({isOpen:e,allowedAttachmentOptions:t,onFileSelect:a,onPollCreate:c,onClose:r})=>{const[s,i]=Wn(e,r),m=Object(n.m)((e,t)=>{const{files:n}=e.target;n&&n.length>0&&a(Array.from(n),t)},[a]),d=Object(n.m)(()=>{fa(l.j,e=>m(e,!0))},[m]),u=Object(n.m)(()=>{fa("*",e=>m(e,!1))},[m]),h=Object(T.a)(),{canAttachMedia:b,canAttachPolls:p}=t;return n.a.createElement(Nn.a,{isOpen:e,autoClose:!0,positionX:"right",positionY:"bottom",onClose:r,className:"AttachMenu fluid",onCloseAnimationEnd:r,onMouseEnter:o.k?void 0:s,onMouseLeave:o.k?void 0:i,noCloseOnBackdrop:!o.k},!b&&n.a.createElement(V.a,{className:"media-disabled",disabled:!0},"Posting media content is not allowed in this group."),b&&n.a.createElement(n.a.Fragment,null,n.a.createElement(V.a,{icon:"photo",onClick:d},h("AttachmentMenu.PhotoOrVideo")),n.a.createElement(V.a,{icon:"document",onClick:u},"Document")),p&&n.a.createElement(V.a,{icon:"poll",onClick:c},h("Poll")))});a(280);var Ec=Object(n.h)(Object(c.h)(e=>{const{stickers:t}=e.stickers.forEmoji;return{stickers:t}},(e,t)=>Object(u.l)(t,["clearStickersForEmoji"]))(({isOpen:e,onStickerSelect:t,stickers:a,clearStickersForEmoji:c})=>{const r=Object(n.q)(null),{shouldRender:s,transitionClassNames:i}=Object(Q.a)(e,void 0,void 0,!1),m=Object(y.a)(a,!0),d=a||m,{observe:u}=Object(sa.a)({rootRef:r,throttleMs:200});Object(n.n)(()=>e?Object(b.a)(c):void 0,[e,c]);const h=Object(le.a)("EmojiTooltip custom-scroll",i);return n.a.createElement("div",{ref:r,className:h,onMouseEnter:o.k?void 0:()=>{document.body.classList.add("no-select")},onMouseLeave:o.k?void 0:()=>{document.body.classList.remove("no-select")}},s&&d?d.map(e=>n.a.createElement(ha,{key:e.id,sticker:e,size:l.kb,observeIntersection:u,onClick:t,clickArg:e})):s?n.a.createElement(ge.a,null):void 0)}));a(281);var vc=Object(n.h)(Object(c.h)((e,{messageId:t})=>{const{chatId:a}=Object(m.x)(e)||{};return a?{message:Object(m.k)(e,a,t)}:{}},(e,t)=>Object(u.l)(t,["clickInlineButton"]))(({isOpen:e,message:t,onClose:a,clickInlineButton:c})=>{const[r,s]=Wn(e,a);if(t&&t.keyboardButtons)return n.a.createElement(Nn.a,{isOpen:e,autoClose:!0,positionX:"right",positionY:"bottom",onClose:a,className:"KeyboardMenu",onCloseAnimationEnd:a,onMouseEnter:o.k?void 0:r,onMouseLeave:o.k?void 0:s,noCloseOnBackdrop:!o.k},n.a.createElement("div",{className:"content"},t.keyboardButtons.map(e=>n.a.createElement("div",{className:"row"},e.map(e=>n.a.createElement(R.a,{ripple:!0,disabled:"NOT_SUPPORTED"===e.type,onClick:()=>c({button:e})},e.text))))))}));a(282);var Oc=Object(n.h)(({isOpen:e,onSilentSend:t,onScheduleSend:a,onClose:c,onCloseAnimationEnd:r})=>{const[s,l]=Wn(e,c),i=Object(T.a)();return n.a.createElement(Nn.a,{isOpen:e,autoClose:!0,positionX:"right",positionY:"bottom",className:"CustomSendMenu",onClose:c,onCloseAnimationEnd:r,onMouseEnter:o.k?void 0:s,onMouseLeave:o.k?void 0:l,noCloseOnBackdrop:!o.k},t&&n.a.createElement(V.a,{icon:"mute",onClick:t},i("SendWithoutSound")),a&&n.a.createElement(V.a,{icon:"schedule",onClick:a},i("ScheduleMessage")))}),fc=a(124),jc=a(152),Cc=a(160);a(283);var yc=Object(n.h)(Object(c.h)((e,{chatId:t})=>{const a=Object(m.f)(e,t),n=a&&Object(m.m)(e,a.id);if(!a||!n)return{};const{query:c,results:r}=Object(m.z)(e)||{},{totalCount:s,foundIds:l}=r||{};return{chat:a,messagesById:n,query:c,totalCount:s,foundIds:l}},(e,t)=>Object(u.l)(t,["searchTextMessagesLocal","focusMessage"]))(({chatId:e,threadId:t,chat:a,messagesById:r,query:s,totalCount:l,foundIds:o,searchTextMessagesLocal:i,focusMessage:h})=>{const b=Object(n.p)(()=>{if(!(s&&o&&o.length&&r))return ze.a;const n=o.map(n=>{const s=r[n];if(!s)return;const l=s.senderId?Object(m.Bb)(Object(c.e)(),s.senderId):void 0;let o;if(a&&Object(d.jb)(a))o=a;else if(s.forwardInfo){const{isChannelPost:e,fromChatId:t}=s.forwardInfo;o=e&&t?Object(m.f)(Object(c.e)(),t):void 0}else o=s.senderId?Object(m.f)(Object(c.e)(),s.senderId):void 0;return{message:s,senderUser:l,senderChat:o,onClick:()=>h({chatId:e,threadId:t,messageId:n})}}).filter(Boolean);return Object(u.k)(n,({message:e})=>e.date,"desc")},[e,t,h,o,a,r,s]);return n.a.createElement(Oe.a,{className:"RightSearch custom-scroll",items:b,preloadBackwards:0,onLoadMore:i,noFastList:!0},n.a.createElement("p",{className:"helper-text"},s?1===l?"1 message found":(b.length&&(l||b.length)||"No")+" messages found":"Search messages"),b.map(({message:e,senderUser:t,senderChat:a,onClick:c})=>{const r=a?Object(d.l)(a):Object(d.Z)(t),l=Object(d.M)(e);return n.a.createElement(fe.a,{className:"chat-item-clickable search-result-message m-0",onClick:c},n.a.createElement(z.a,{chat:a,user:t}),n.a.createElement("div",{className:"info"},n.a.createElement("div",{className:"title"},n.a.createElement("h3",null,r&&Object(G.a)(r)),n.a.createElement(Cc.a,{message:e})),n.a.createElement("div",{className:"subtitle"},Object(G.a)(l,["emoji","highlight"],{highlight:s}))))}))}));var kc=Object(n.h)(Object(c.h)((e,{stickerSetId:t})=>({set:Object(m.sb)(e,t),shouldPlay:Object(m.rb)(e)}),(e,t)=>Object(u.l)(t,["loadStickers","toggleStickerSet"]))(({stickerSetId:e,observeIntersection:t,set:a,shouldPlay:c,loadStickers:r,toggleStickerSet:s,isSomeModalOpen:o,onModalToggle:i})=>{const m=a&&Boolean(a.installedDate),d=Boolean(a&&a.stickers),[u,h,b]=Object(De.a)();Object(f.a)(()=>{i(u)},[u,i]);const p=Object(n.p)(()=>{if(!a)return[];const e=(a.covers||[]).map(({id:e})=>e),t=a.stickers?a.stickers.filter(({id:t})=>!e.includes(t)):[];return[...a.covers||[],...t].slice(0,5)},[a]);Object(n.n)(()=>{!d&&p.length<5&&r({stickerSetId:e})},[d,p.length,r,e]);const g=Object(n.m)(()=>{s({stickerSetId:e})},[s,e]);if(!a)return;const E=p.length>0;return n.a.createElement("div",{key:a.id,className:"sticker-set"},n.a.createElement("div",{className:"sticker-set-header"},n.a.createElement("div",{className:"title-wrapper"},n.a.createElement("h3",{className:"title"},a.title),n.a.createElement("p",{className:"count"},a.count," stickers")),n.a.createElement(R.a,{className:m?"is-added":void 0,color:"primary",size:"tiny",pill:!0,fluid:!0,onClick:g},m?"Added":"Add")),n.a.createElement("div",{className:"sticker-set-main"},!E&&n.a.createElement(B.a,null),E&&p.map(e=>n.a.createElement(ha,{sticker:e,size:l.mb,observeIntersection:t,noAnimate:!c||u||o,onClick:h}))),E&&n.a.createElement(pa.a,{isOpen:u,fromSticker:p[0],onClose:b}))}));a(284);const Nc=Object(K.g)(e=>e(),6e4,!0);var Sc=Object(n.h)(Object(c.h)(e=>{const t=Object(m.y)(e),{query:a,resultIds:n}=t||{},{featured:c}=e.stickers;return{query:a,featuredIds:c.setIds,resultIds:n}},(e,t)=>Object(u.l)(t,["loadFeaturedStickers"]))(({query:e,featuredIds:t,resultIds:a,loadFeaturedStickers:c})=>{const r=Object(n.q)(null),[s,l]=Object(n.r)(!1),{observe:o}=Object(sa.a)({rootRef:r,throttleMs:200});return Object(n.n)(()=>{Nc(()=>{c()})}),n.a.createElement("div",{ref:r,className:"StickerSearch custom-scroll"},function(){if(void 0!==e)return!e&&t?t.map(e=>n.a.createElement(kc,{key:e,stickerSetId:e,observeIntersection:o,isSomeModalOpen:s,onModalToggle:l})):a?a.length?a.map(e=>n.a.createElement(kc,{key:e,stickerSetId:e,observeIntersection:o,isSomeModalOpen:s,onModalToggle:l})):n.a.createElement("p",{className:"helper-text"},"Nothing found."):n.a.createElement(ge.a,null)}())}));a(285);var Ic=Object(n.h)(Object(c.h)(e=>{const t=Object(m.r)(e),{query:a,results:n}=t||{},{chatId:c}=Object(m.x)(e)||{},r=c?Object(m.f)(e,c):void 0;return{query:a,results:n,chat:r,isChatWithBot:r?Object(m.M)(e,r):void 0}},(e,t)=>Object(u.l)(t,["searchMoreGifs","sendMessage","setGifSearchQuery"]))(({query:e,results:t,chat:a,isChatWithBot:c,searchMoreGifs:r,sendMessage:s,setGifSearchQuery:l})=>{const i=Object(n.q)(null),{observe:m}=Object(sa.a)({rootRef:i,debounceMs:300}),{canSendGifs:u}=Object(d.c)(a,c),h=Object(n.m)(e=>{u&&s({gif:e}),o.k&&l({query:void 0})},[u,s,l]),b=Object(T.a)();const p=Boolean(void 0!==e&&t&&t.length);return n.a.createElement("div",{className:"GifSearch"},n.a.createElement(Oe.a,{ref:i,className:Object(le.a)("gif-container custom-scroll",p&&"grid"),items:t,itemSelector:".GifButton",preloadBackwards:96,noFastList:!0,onLoadMore:r},function(){if(void 0!==e)return t?t.length?t.map(e=>n.a.createElement(oc,{key:e.id,gif:e,observeIntersection:m,onClick:h})):n.a.createElement("p",{className:"helper-text"},b("NoGIFsFound")):n.a.createElement(ge.a,null)}()))}));a(286);let wc,Pc;function Mc(e){return fetch(e).then(e=>e.json())}function Fc(e,t){const a=new Date(t),n=a.getMonth()+1,c=a.getDate();return Mc(`${e}/${`${a.getFullYear()}-${n<10?"0":""}${n}/${c<10?"0":""}${c}`}.json`)}var Lc=Object(n.h)(()=>{const e=Object(n.q)(null),[t,c]=Object(n.r)(!1),[r,s]=Object(n.r)(0);return Object(n.n)(()=>{(async()=>{if(await async function(){return wc||(wc=a.e(6).then(a.bind(null,304)),Pc=await wc),wc}(),!t)return void c(!0);const n=await Mc("./chartDummyData/growth.json");Pc.create(e.current.children[0],n),s(1);const r=await Mc("./chartDummyData/notifications.json");r.onZoom=e=>Fc("chartDummyData/notifications_zoom",e),Pc.create(e.current.children[1],r),s(2);const l=await Mc("./chartDummyData/interactions.json");Pc.create(e.current.children[2],l),s(3);const o=await Mc("./chartDummyData/views.json");o.onZoom=e=>Fc("chartDummyData/views_zoom",e),Pc.create(e.current.children[3],o),s(4);const i=await Mc("./chartDummyData/languages.json");Pc.create(e.current.children[4],i),s(5)})()},[t]),n.a.createElement("div",{className:Object(le.a)("Statistics custom-scroll",t&&"ready"),ref:e},t?n.a.createElement(n.a.Fragment,null,n.a.createElement("div",{className:Object(le.a)("chat-container",r<1&&"hidden")}),n.a.createElement("div",{className:Object(le.a)("chat-container",r<2&&"hidden")}),n.a.createElement("div",{className:Object(le.a)("chat-container",r<3&&"hidden")}),n.a.createElement("div",{className:Object(le.a)("chat-container",r<4&&"hidden")}),n.a.createElement("div",{className:Object(le.a)("chat-container",r<5&&"hidden")})):n.a.createElement(ge.a,null))});a(287);var Ac=Object(n.h)(Object(c.h)((e,{answer:t})=>{const{voters:a,offsets:n}=e.pollResults;return{voters:a&&a[t.option],offset:n&&n[t.option]||""}},(e,t)=>Object(u.l)(t,["loadPollOptionResults","openChat","closePollResults"]))(({chat:e,message:t,answer:a,answerVote:c,totalVoters:r,voters:s,offset:l,loadPollOptionResults:o,openChat:i,closePollResults:m})=>{const d=Object(y.a)(c.votersCount),[u,h]=Object(n.r)(!0),b=Boolean(s),{option:p,text:g}=a;Object(n.n)(()=>{b&&d===c.votersCount||o({chat:e,messageId:t.id,option:p,offset:l,limit:4,shouldResetVoters:!0})},[c.votersCount,b]);const E=Object(n.m)(()=>{h(!0),o({chat:e,messageId:t.id,option:p,offset:l,limit:50})},[e,o,t.id,l,p]);Object(n.n)(()=>{h(!1)},[s]);const v=Object(n.m)(e=>{i({id:e}),m()},[m,i]);return n.a.createElement("div",{className:"PollAnswerResults"},n.a.createElement("div",{className:"poll-voters"},s?s.map(e=>n.a.createElement(fe.a,{key:e,className:"chat-item-clickable",onClick:()=>v(e)},n.a.createElement(je.a,{avatarSize:"tiny",userId:e,forceShowSelf:!0,noStatusOrTyping:!0}))):n.a.createElement(ge.a,null),s&&function(){const e=c.votersCount-s.length;return c.votersCount>4&&e>0&&n.a.createElement(Xt,{count:e,itemName:"voter",isLoading:u,onClick:E})}()),n.a.createElement("div",{className:"answer-head"},n.a.createElement("span",{className:"answer-title"},g),n.a.createElement("span",{className:"answer-percent"},(O=c.votersCount,(f=r)>0?(O/f*100).toFixed():0),"%")));var O,f}));a(288);var Tc=Object(n.h)(Object(c.h)(e=>{const{pollResults:{chatId:t,messageId:a},lastSyncTime:n}=e;if(!t||!a)return{};return{chat:Object(m.f)(e,t),message:Object(m.k)(e,t,a),lastSyncTime:n}})(({chat:e,message:t,lastSyncTime:a})=>{if(!t||!e)return n.a.createElement(ge.a,null);const{summary:c,results:r}=Object(d.H)(t);if(!r.results)return;const s=Object(u.c)(r.results,"option");return n.a.createElement("div",{className:"PollResults"},n.a.createElement("h3",{className:"poll-question"},c.question),n.a.createElement("div",{className:"poll-results-list custom-scroll"},a&&c.answers.map(a=>n.a.createElement(Ac,{key:`${t.id}-${a.option}`,chat:e,message:t,answer:a,answerVote:s[a.option],totalVoters:r.totalVoters})),!a&&n.a.createElement(ge.a,null)))}));a(154);var Bc=Object(n.h)(Object(c.h)((e,{userId:t})=>{const a=Object(m.Bb)(e,t),n=Object(m.f)(e,t),{progress:c}=e.management;return{user:a,chat:n,progress:c}},(e,t)=>Object(u.l)(t,["updateContact","deleteUser","closeManagement","openChat","deleteHistory"]))(({userId:e,user:t,chat:a,progress:c,updateContact:r,deleteUser:l,deleteHistory:o,closeManagement:i,openChat:m})=>{const[d,u,h]=Object(De.a)(),[b,p]=Object(n.r)(!1),[g,E]=Object(n.r)(),v=Object(T.a)(),O=t&&t.firstName||"",f=t&&t.lastName||"",j=a?a.isMuted:void 0,[C,y]=Object(n.r)(O),[k,N]=Object(n.r)(f),[S,I]=Object(n.r)(!j);Object(n.n)(()=>{I(!j)},[j]),Object(n.n)(()=>{p(!1),h()},[h,e]),Object(n.n)(()=>{y(O),N(f)},[O,f,t]),Object(n.n)(()=>{c===s.f.Complete&&(p(!1),E(void 0),h())},[h,c]);const w=Object(n.m)(e=>{y(e.target.value),p(!0)},[]),P=Object(n.m)(e=>{N(e.target.value),p(!0)},[]),M=Object(n.m)(e=>{I(e.target.checked),p(!0)},[]),F=Object(n.m)(()=>{const t=C.trim(),a=k.trim();t.length||E("Please provide first name"),r({userId:e,isMuted:!S,firstName:t,lastName:a})},[C,k,r,e,S]),L=Object(n.m)(()=>{a.lastMessage&&o({chatId:a.id,maxId:a.lastMessage.id,shouldDeleteForAll:!1}),l({userId:e}),h(),i(),m({id:void 0})},[a.id,a.lastMessage,h,i,o,l,m,e]);if(!t)return;const A=c===s.f.InProgress;return n.a.createElement("div",{className:"Management"},n.a.createElement("div",{className:"custom-scroll"},n.a.createElement("div",{className:"section"},n.a.createElement(je.a,{userId:t.id,avatarSize:"jumbo",status:"original name",withMediaViewer:!0,withFullInfo:!0}),n.a.createElement(ve.a,{id:"user-first-name",label:v("UserInfo.FirstNamePlaceholder"),onChange:w,value:C,error:"Please provide first name"===g?g:void 0}),n.a.createElement(ve.a,{id:"user-last-name",label:v("UserInfo.LastNamePlaceholder"),onChange:P,value:k}),n.a.createElement("div",{className:"ListItem no-selection narrow"},n.a.createElement(aa.a,{checked:S,label:v("Notifications"),subLabel:v(S?"UserInfo.NotificationsEnabled":"UserInfo.NotificationsDisabled"),onChange:M}))),n.a.createElement("div",{className:"section"},n.a.createElement(fe.a,{icon:"delete",ripple:!0,destructive:!0,onClick:u},v("DeleteContact")))),n.a.createElement(zt,{isShown:b,onClick:F,disabled:A,ariaLabel:v("Save")},A?n.a.createElement(B.a,{color:"white"}):n.a.createElement("i",{className:"icon-check"})),n.a.createElement(Dt.a,{isOpen:d,onClose:h,text:v("AreYouSureDeleteContact"),confirmLabel:v("DeleteContact"),confirmHandler:L,confirmIsDestructive:!0}))}));var Dc=Object(n.h)(Object(c.h)((e,{chatId:t})=>{const a=Object(m.f)(e,t),{progress:n}=e.management,c=Boolean(a.fullInfo&&a.fullInfo.linkedChatId);return{chat:a,progress:n,isBasicGroup:Object(d.ib)(a),hasLinkedChannel:c}},(e,t)=>Object(u.l)(t,["togglePreHistoryHidden","updateChat","closeManagement","deleteHistory","leaveChannel","deleteChannel","openChat"]))(({chatId:e,chat:t,progress:a,isBasicGroup:c,hasLinkedChannel:l,onScreenSelect:o,togglePreHistoryHidden:i,updateChat:m,deleteHistory:u,leaveChannel:h,deleteChannel:b,closeManagement:p,openChat:g})=>{const[v,O,f]=Object(De.a)(),j=t.title,C=t.fullInfo&&t.fullInfo.about||"",[y,k]=Object(n.r)(!1),[N,S]=Object(n.r)(j),[I,w]=Object(n.r)(C),[P,M]=Object(n.r)(),[F,L]=Object(n.r)(),A=Object(d.f)(t),D=Object(E.a)(A,!1,r.ApiMediaFormat.BlobUrl),x=Object(T.a)();Object(n.n)(()=>{a===s.f.Complete&&(k(!1),L(void 0))},[a]);const R=Object(n.m)(()=>{o(s.g.ChatPrivacyType)},[o]),U=Object(n.m)(()=>{o(s.g.Discussion)},[o]),z=Object(n.m)(()=>{o(s.g.GroupPermissions)},[o]),q=Object(n.m)(()=>{o(s.g.ChatAdministrators)},[o]),$=Object(n.m)(e=>{M(e),k(!0)},[]),H=Object(n.m)(e=>{S(e.target.value),k(!0)},[]),V=Object(n.m)(e=>{w(e.target.value),k(!0)},[]),W=Object(n.m)(()=>{const t=N.trim(),a=I.trim();t.length?m({chatId:e,title:t,about:a,photo:P}):L("Group title can't be empty")},[I,e,P,N,m]),Y=Object(n.m)(()=>{o(s.g.GroupMembers)},[o]),K=Object(n.m)(()=>{if(!t.fullInfo)return;const{isPreHistoryHidden:e}=t.fullInfo;i({chatId:t.id,isEnabled:!e})},[t,i]),Z=Object(n.p)(()=>{if(!t.defaultBannedRights)return 0;let e=["sendMessages","sendMedia","embedLinks","sendPolls","changeInfo","inviteUsers","pinMessages"].filter(e=>!t.defaultBannedRights[e]).length;const{sendStickers:a,sendGifs:n}=t.defaultBannedRights;return a||n||(e+=1),e},[t]),Q=t.fullInfo&&t.fullInfo.adminMembers&&t.fullInfo.adminMembers.length||0,_=Object(n.m)(()=>{c?u({chatId:t.id,maxId:t.lastMessage.id,shouldDeleteForAll:!1}):t.isCreator?b({chatId:t.id}):h({chatId:t.id}),f(),p(),g({id:void 0})},[c,t.isCreator,t.id,t.lastMessage,f,p,u,h,b,g]);if(t.isRestricted)return;const X=a===s.f.InProgress;return n.a.createElement("div",{className:"Management"},n.a.createElement("div",{className:"custom-scroll"},n.a.createElement("div",{className:"section"},n.a.createElement(Gt.a,{currentAvatarBlobUrl:D,onChange:$}),n.a.createElement(ve.a,{id:"group-title",label:x("GroupName"),onChange:H,value:N,error:"Group title can't be empty"===F?F:void 0}),n.a.createElement(ve.a,{id:"group-about",className:"mb-2",label:x("DescriptionPlaceholder"),onChange:V,value:I}),t.isCreator&&n.a.createElement(fe.a,{icon:"lock",ripple:!0,onClick:R},n.a.createElement("div",{className:"multiline-item"},n.a.createElement("span",{className:"title"},x("GroupType")),n.a.createElement("span",{className:"subtitle"},t.username?x("TypePublic"):x("TypePrivate")))),l&&n.a.createElement(fe.a,{icon:"message",ripple:!0,onClick:U},n.a.createElement("div",{className:"multiline-item"},n.a.createElement("span",{className:"title"},x("LinkedChannel")),n.a.createElement("span",{className:"subtitle"},x("DiscussionUnlink")))),n.a.createElement(fe.a,{icon:"permissions",ripple:!0,onClick:z},n.a.createElement("div",{className:"multiline-item"},n.a.createElement("span",{className:"title"},x("ChannelPermissions")),n.a.createElement("span",{className:"subtitle"},Z,"/",8))),n.a.createElement(fe.a,{icon:"admin",ripple:!0,onClick:q},n.a.createElement("div",{className:"multiline-item"},n.a.createElement("span",{className:"title"},x("ChannelAdministrators")),n.a.createElement("span",{className:"subtitle"},Object(ma.a)(Q))))),n.a.createElement("div",{className:"section"},n.a.createElement(fe.a,{icon:"group",ripple:!0,onClick:Y},n.a.createElement("div",{className:"multiline-item"},n.a.createElement("span",{className:"title"},x("GroupMembers")),n.a.createElement("span",{className:"subtitle"},Object(ma.a)(t.membersCount)))),t.fullInfo&&n.a.createElement("div",{className:"ListItem narrow no-selection"},n.a.createElement(aa.a,{checked:!t.fullInfo.isPreHistoryHidden,label:x("ChatHistory"),onChange:K}))),n.a.createElement("div",{className:"section"},n.a.createElement(fe.a,{icon:"delete",ripple:!0,destructive:!0,onClick:O},x("DeleteMega")))),n.a.createElement(zt,{isShown:y,onClick:W,disabled:X,ariaLabel:x("Save")},X?n.a.createElement(B.a,{color:"white"}):n.a.createElement("i",{className:"icon-check"})),n.a.createElement(Dt.a,{isOpen:v,onClose:f,textParts:Object(G.a)(c||!t.isCreator?x("AreYouSureDeleteAndExit"):x("AreYouSureDeleteThisChatWithGroup",t.title),["br","simple_markdown"]),confirmLabel:c||!t.isCreator?x("DeleteMega"):x("DeleteGroupForAll"),confirmHandler:_,confirmIsDestructive:!0}))}));var xc=Object(n.h)(Object(c.h)((e,{chatId:t})=>({chat:Object(m.f)(e,t),currentUserId:e.currentUserId}),(e,t)=>Object(u.l)(t,["updateChatDefaultBannedRights"]))(({onScreenSelect:e,onChatMemberSelect:t,chat:a,currentUserId:c,updateChatDefaultBannedRights:r})=>{const[l,o]=Object(n.r)({}),[i,m]=Object(n.r)(!1),[d,u]=Object(n.r)(!1),h=Object(T.a)(),b=Object(n.m)(()=>{e(s.g.GroupRemovedUsers)},[e]),p=Object(n.m)(()=>{e(s.g.GroupUserPermissionsCreate)},[e]),g=Object(n.m)(a=>{t(a.userId,a.promotedByUserId===c),e(s.g.GroupUserPermissions)},[c,t,e]);Object(n.n)(()=>{o(a&&a.defaultBannedRights||{}),m(!1),setTimeout(()=>{u(!1)},250)},[a]);const E=Object(n.m)(e=>{const{name:t}=e.target;function a(e){return!e||void 0}o(e=>({...e,[t]:a(e[t]),..."sendStickers"===t&&{sendGifs:a(e[t])}})),m(!0)},[]),v=Object(n.m)(()=>{a&&(u(!0),r({chatId:a.id,bannedRights:l}))},[a,l,r]),O=Object(n.p)(()=>a&&a.fullInfo&&a.fullInfo.kickedMembers?a.fullInfo.kickedMembers.length:0,[a]),f=Object(n.p)(()=>a&&a.fullInfo&&a.fullInfo.members?a.fullInfo.members.filter(({bannedRights:e})=>!!e):[],[a]),j=Object(n.m)(e=>{const{bannedRights:t}=e;if(!t||!a)return;const{defaultBannedRights:n}=a;return Object.keys(t).reduce((e,a)=>{if(!t[a]||n&&n[a]||"sendInline"===a||"viewMessages"===a||"sendGames"===a)return e;const c=function(e){switch(e){case"sendMessages":return"UserRestrictionsNoSend";case"sendMedia":return"UserRestrictionsNoSendMedia";case"sendStickers":return"UserRestrictionsNoSendStickers";case"embedLinks":return"UserRestrictionsNoEmbedLinks";case"sendPolls":return"UserRestrictionsNoSendPolls";case"changeInfo":return"UserRestrictionsNoChangeInfo";case"inviteUsers":return"UserRestrictionsInviteUsers";case"pinMessages":return"UserRestrictionsPinMessages";default:return}}(a);if(!c)return e;const r=h(c);return`${e}${e.length?", "+r:r}`},"")},[a,h]);return n.a.createElement("div",{className:"Management"},n.a.createElement("div",{className:"custom-scroll"},n.a.createElement("div",{className:"section"},n.a.createElement("h3",{className:"section-heading"},h("ChannelPermissionsHeader")),n.a.createElement("div",{className:"ListItem no-selection"},n.a.createElement(aa.a,{name:"sendMessages",checked:!l.sendMessages,label:h("UserRestrictionsSend"),blocking:!0,onChange:E})),n.a.createElement("div",{className:"ListItem no-selection"},n.a.createElement(aa.a,{name:"sendMedia",checked:!l.sendMedia,label:h("UserRestrictionsSendMedia"),blocking:!0,onChange:E})),n.a.createElement("div",{className:"ListItem no-selection"},n.a.createElement(aa.a,{name:"sendStickers",checked:!l.sendStickers&&!l.sendGifs,label:h("UserRestrictionsSendStickers"),blocking:!0,onChange:E})),n.a.createElement("div",{className:"ListItem no-selection"},n.a.createElement(aa.a,{name:"sendPolls",checked:!l.sendPolls,label:h("UserRestrictionsSendPolls"),blocking:!0,onChange:E})),n.a.createElement("div",{className:"ListItem no-selection"},n.a.createElement(aa.a,{name:"embedLinks",checked:!l.embedLinks,label:h("UserRestrictionsEmbedLinks"),blocking:!0,onChange:E})),n.a.createElement("div",{className:"ListItem no-selection"},n.a.createElement(aa.a,{name:"inviteUsers",checked:!l.inviteUsers,label:h("UserRestrictionsInviteUsers"),blocking:!0,onChange:E})),n.a.createElement("div",{className:"ListItem no-selection"},n.a.createElement(aa.a,{name:"pinMessages",checked:!l.pinMessages,label:h("UserRestrictionsPinMessages"),blocking:!0,onChange:E})),n.a.createElement("div",{className:"ListItem no-selection"},n.a.createElement(aa.a,{name:"changeInfo",checked:!l.changeInfo,label:h("UserRestrictionsChangeInfo"),blocking:!0,onChange:E}))),n.a.createElement("div",{className:"section"},n.a.createElement(fe.a,{icon:"delete-user",ripple:!0,narrow:!0,onClick:b},n.a.createElement("div",{className:"multiline-item"},n.a.createElement("span",{className:"title"},h("ChannelBlockedUsers")),n.a.createElement("span",{className:"subtitle"},O)))),n.a.createElement("div",{className:"section"},n.a.createElement("h3",{className:"section-heading"},h("PrivacyExceptions")),n.a.createElement(fe.a,{icon:"add-user",ripple:!0,onClick:p},h("ChannelAddException")),f.map(e=>n.a.createElement(fe.a,{key:e.userId,className:"chat-item-clickable exceptions-member",ripple:!0,onClick:()=>g(e)},n.a.createElement(je.a,{userId:e.userId,status:j(e)}))))),n.a.createElement(zt,{isShown:i,onClick:v,ariaLabel:h("Save"),disabled:d},d?n.a.createElement(B.a,{color:"white"}):n.a.createElement("i",{className:"icon-check"})))}));var Rc=Object(n.h)(Object(c.h)((e,{chatId:t})=>{const a=Object(m.f)(e,t),{byId:n}=e.users;return{chat:a,usersById:n}},(e,t)=>Object(u.l)(t,["updateChatMemberBannedRights"]))(({chat:e,usersById:t,updateChatMemberBannedRights:a})=>{const c=Object(T.a)(),r=Object(n.p)(()=>e&&e.fullInfo&&e.fullInfo.kickedMembers?e.fullInfo.kickedMembers:[],[e]),s=Object(n.m)(e=>{if(!e.kickedByUserId)return;const a=t[e.kickedByUserId];return a?c("UserRemovedBy",Object(d.Z)(a)):void 0},[c,t]),l=Object(n.m)(t=>{if(e)return[{title:c("Unblock"),icon:"delete",destructive:!0,handler:()=>a({chatId:e.id,userId:t.userId,bannedRights:{}})}]},[c,e,a]);return n.a.createElement("div",{className:"Management"},n.a.createElement("div",{className:"custom-scroll"},n.a.createElement("div",{className:"section"},n.a.createElement("p",{className:"text-muted"},c("NoBlockedGroup2")),r.map(e=>n.a.createElement(fe.a,{key:e.userId,className:"chat-item-clickable",ripple:!0,contextActions:l(e)},n.a.createElement(je.a,{userId:e.userId,status:s(e)}))))))}));var Uc=Object(n.h)(Object(c.h)((e,{chatId:t})=>{const a=Object(m.f)(e,t),{progress:n}=e.management;return{chat:a,progress:n,isSignaturesShown:Boolean(a&&a.isSignaturesShown)}},(e,t)=>Object(u.l)(t,["toggleSignatures","updateChat","closeManagement","leaveChannel","deleteChannel","openChat"]))(({chatId:e,chat:t,progress:a,isSignaturesShown:c,onScreenSelect:l,updateChat:o,toggleSignatures:i,closeManagement:m,leaveChannel:u,deleteChannel:h,openChat:b})=>{const p=t&&t.title||"",g=t&&t.fullInfo&&t.fullInfo.about||"",v=t&&t.fullInfo&&t.fullInfo.linkedChatId,[O,f,j]=Object(De.a)(),[C,y]=Object(n.r)(!1),[k,N]=Object(n.r)(p),[S,I]=Object(n.r)(g),[w,P]=Object(n.r)(),[M,F]=Object(n.r)(),L=t&&Object(d.f)(t),A=Object(E.a)(L,!1,r.ApiMediaFormat.BlobUrl),D=Object(T.a)();Object(n.n)(()=>{a===s.f.Complete&&(y(!1),F(void 0))},[a]);const x=t&&t.fullInfo&&t.fullInfo.adminMembers&&t.fullInfo.adminMembers.length||0,R=Object(n.m)(()=>{l(s.g.ChatPrivacyType)},[l]),U=Object(n.m)(()=>{l(s.g.Discussion)},[l]),G=Object(n.m)(()=>{l(s.g.ChatAdministrators)},[l]),z=Object(n.m)(e=>{P(e),y(!0)},[]),q=Object(n.m)(e=>{N(e.target.value),y(!0)},[]),$=Object(n.m)(e=>{I(e.target.value),y(!0)},[]),H=Object(n.m)(()=>{const t=k.trim(),a=S.trim();t.length?o({chatId:e,title:t,about:a,photo:w}):F("Channel title can't be empty")},[S,e,w,k,o]),V=Object(n.m)(()=>{i({chatId:e,isEnabled:!c})},[e,c,i]),W=Object(n.m)(()=>{l(s.g.ChannelSubscribers)},[l]),Y=Object(n.m)(()=>{t.isCreator?h({chatId:t.id}):u({chatId:t.id}),j(),m(),b({id:void 0})},[t.isCreator,t.id,j,m,u,h,b]);if(t.isRestricted)return;const K=a===s.f.InProgress;return n.a.createElement("div",{className:"Management"},n.a.createElement("div",{className:"custom-scroll"},n.a.createElement("div",{className:"section"},n.a.createElement(Gt.a,{currentAvatarBlobUrl:A,onChange:z}),n.a.createElement(ve.a,{id:"channel-title",label:D("EnterChannelName"),onChange:q,value:k,error:"Channel title can't be empty"===M?M:void 0}),n.a.createElement(ve.a,{id:"channel-about",className:"mb-2",label:D("DescriptionPlaceholder"),onChange:$,value:S}),t.isCreator&&n.a.createElement(fe.a,{icon:"lock",ripple:!0,onClick:R},n.a.createElement("div",{className:"multiline-item"},n.a.createElement("span",{className:"title"},D("ChannelType")),n.a.createElement("span",{className:"subtitle"},t.username?D("TypePublic"):D("TypePrivate")))),n.a.createElement(fe.a,{icon:"message",ripple:!0,onClick:U},n.a.createElement("div",{className:"multiline-item"},n.a.createElement("span",{className:"title"},D("Discussion")),n.a.createElement("span",{className:"subtitle"},D(v?"DiscussionUnlink":"Add")))),n.a.createElement(fe.a,{icon:"admin",ripple:!0,onClick:G},n.a.createElement("div",{className:"multiline-item"},n.a.createElement("span",{className:"title"},D("ChannelAdministrators")),n.a.createElement("span",{className:"subtitle"},x))),n.a.createElement("div",{className:"ListItem no-selection narrow"},n.a.createElement(aa.a,{checked:c,label:D("ChannelSignMessages"),onChange:V}))),n.a.createElement("div",{className:"section"},n.a.createElement(fe.a,{icon:"group",ripple:!0,onClick:W},n.a.createElement("div",{className:"multiline-item"},n.a.createElement("span",{className:"title"},D("ChannelSubscribers")),n.a.createElement("span",{className:"subtitle"},D("Subscribers",t.membersCount,"i"))))),n.a.createElement("div",{className:"section"},n.a.createElement(fe.a,{icon:"delete",ripple:!0,destructive:!0,onClick:f},t.isCreator?D("ChannelDelete"):D("LeaveChannel")))),n.a.createElement(zt,{isShown:C,onClick:H,disabled:K,ariaLabel:D("Save")},K?n.a.createElement(B.a,{color:"white"}):n.a.createElement("i",{className:"icon-check"})),n.a.createElement(Dt.a,{isOpen:O,onClose:j,text:t.isCreator?D("ChannelDeleteAlert"):D("ChannelLeaveAlert"),confirmLabel:t.isCreator?D("ChannelDelete"):D("LeaveChannel"),confirmHandler:Y,confirmIsDestructive:!0}))})),Gc=a(52);var zc=Object(n.h)(Object(c.h)((e,{chatId:t})=>{const a=Object(m.f)(e,t),{isUsernameAvailable:n}=Object(m.X)(e,t);return{chat:a,isChannel:Object(d.jb)(a),progress:e.management.progress,isUsernameAvailable:n}},(e,t)=>Object(u.l)(t,["checkPublicLink","updatePublicLink","updatePrivateLink"]))(({chat:e,isChannel:t,progress:a,isUsernameAvailable:c,checkPublicLink:r,updatePublicLink:l,updatePrivateLink:o})=>{const i=Boolean(e.username),m=e.fullInfo&&e.fullInfo.inviteLink,[d,u]=Object(n.r)(i?"public":"private"),[h,b]=Object(n.r)(),[p,g,E]=Object(De.a)(),v="public"===d&&h&&c||"private"===d&&i;Object(n.n)(()=>{d&&!m&&o()},[d,m,o]);const O=Object(n.m)(e=>{u(e)},[]),f=Object(n.m)(()=>{l({username:"public"===d?h:""})},[d,l,h]),j=Object(n.m)(()=>{E(),o()},[E,o]),C=Object(T.a)(),y=t?"Channel":"Mega",k=t?"Channel":"Group",N=[{value:"private",label:C(y+"Private"),subLabel:C(y+"PrivateInfo")},{value:"public",label:C(y+"Public"),subLabel:C(y+"PublicInfo")}],S=a===s.f.InProgress;return n.a.createElement("div",{className:"Management"},n.a.createElement("div",{className:"custom-scroll"},n.a.createElement("div",{className:"section"},n.a.createElement("h3",{className:"section-heading"},C(k+"Type")),n.a.createElement(oa.a,{selected:d,name:"channel-type",options:N,onChange:O})),"private"===d?n.a.createElement("div",{className:"section"},m?n.a.createElement(n.a.Fragment,null,n.a.createElement(Gc.a,{url:m,className:"group-link",text:m}),n.a.createElement("p",{className:"section-info"},C(y+"PrivateLinkHelp")),n.a.createElement(fe.a,{icon:"delete",ripple:!0,destructive:!0,onClick:g},C("RevokeLink")),n.a.createElement(Dt.a,{isOpen:p,onClose:E,text:C("RevokeAlert"),confirmLabel:C("RevokeButton"),confirmHandler:j,confirmIsDestructive:!0})):n.a.createElement(ge.a,null)):n.a.createElement("div",{className:"section no-border"},n.a.createElement(Vt,{asLink:!0,currentUsername:e.username,isLoading:S,isUsernameAvailable:c,checkUsername:r,onChange:b}),n.a.createElement("p",{className:"section-info"},C(k+".Username.CreatePublicLinkHelp")))),n.a.createElement(zt,{isShown:v,disabled:S,ariaLabel:C("Save"),onClick:f},S?n.a.createElement(B.a,{color:"white"}):n.a.createElement("i",{className:"icon-check"})))}));var qc=Object(n.h)(Object(c.h)((e,{chatId:t})=>{const a=Object(m.f)(e,t),{forDiscussionIds:n,byId:c}=e.chats;return{chat:a,chatsByIds:c,forDiscussionIds:n,linkedChat:a&&a.fullInfo&&a.fullInfo.linkedChatId?Object(m.f)(e,a.fullInfo.linkedChatId):void 0,isChannel:a&&Object(d.jb)(a)}},(e,t)=>Object(u.l)(t,["loadGroupsForDiscussion","linkDiscussionGroup","unlinkDiscussionGroup"]))(({chat:e,chatId:t,chatsByIds:a,linkedChat:c,forDiscussionIds:r,isChannel:o,onScreenSelect:i,loadGroupsForDiscussion:m,linkDiscussionGroup:d,unlinkDiscussionGroup:u})=>{const[h,b]=Object(n.r)(),[p,g]=Object(n.r)(),[E,v]=Object(n.r)(!1),O=Object(n.m)(()=>v(!0),[]),[f,j,C]=Object(De.a)(),[y,k,N]=Object(De.a)(),S=Object(T.a)(),I=c&&c.id;Object(n.n)(()=>{m()},[m]),Object(n.n)(()=>{p||Object(Kt.a)("DiscussionGroups").then(g)},[p]);const w=Object(n.m)(()=>{C(),u({channelId:o?t:I}),o||i(s.g.Initial)},[C,u,o,t,I,i]),P=Object(n.m)(()=>{N(),d({channelId:t,chatId:h})},[N,d,t,h]);function M(){const e=a[h];if(e)return n.a.createElement("div",{className:"modal-header"},n.a.createElement(z.a,{size:"tiny",chat:e}),n.a.createElement("div",{className:"modal-title"},S("Channel.DiscussionGroup.LinkGroup")))}function F(){const t=a[h];if(t)return t.hasPrivateLink?Object(G.a)(`Do you want to make **${t.title}** the discussion board for **${e.title}**?`,["br","simple_markdown"]):Object(G.a)(`Do you want to make **${t.title}** the discussion board for **${e.title}**?\n\nAnyone from the channel will be able to see messages in this group.`,["br","simple_markdown"])}return n.a.createElement("div",{className:"Management"},n.a.createElement("div",{className:"custom-scroll"},n.a.createElement("div",{className:"section"},n.a.createElement("div",{className:"section-icon"},p&&n.a.createElement(Zt.a,{id:"discussionGroupsDucks",size:l.eb,animationData:p,play:E,noLoop:!0,onLoad:O})),c&&n.a.createElement("div",null,n.a.createElement(fe.a,{className:"chat-item-clickable",inactive:!0},n.a.createElement(Ce.a,{chatId:c.id})),n.a.createElement(fe.a,{icon:"delete",ripple:!0,destructive:!0,onClick:j},S(o?"DiscussionUnlinkGroup":"DiscussionUnlinkChannel")),n.a.createElement(Dt.a,{isOpen:f,onClose:C,header:n.a.createElement("div",{className:"modal-header"},n.a.createElement(z.a,{size:"tiny",chat:c}),n.a.createElement("div",{className:"modal-title"},S(o?"DiscussionUnlinkGroup":"DiscussionUnlinkChannel"))),textParts:Object(G.a)(S(o?"DiscussionUnlinkChannelAlert":"DiscussionUnlinkGroupAlert",c.title),["br","simple_markdown"]),confirmLabel:S(o?"DiscussionUnlinkGroup":"DiscussionUnlinkChannel"),confirmHandler:w,confirmIsDestructive:!0})),!c&&n.a.createElement("div",null,n.a.createElement("p",{className:"section-help"},S("DiscussionChannelHelp")),n.a.createElement("div",{teactFastList:!0},n.a.createElement(fe.a,{key:"create-group",icon:"group",ripple:!0,teactOrderKey:0,className:"not-implemented"},S("DiscussionCreateGroup")),r?r.map((e,t)=>n.a.createElement(fe.a,{key:e,teactOrderKey:t+1,className:"chat-item-clickable scroll-item",onClick:()=>{b(e),k()}},n.a.createElement(Ce.a,{chatId:e}))):n.a.createElement(Xe.a,{key:"nothing-found",teactOrderKey:0,text:"No discussion groups found"})),n.a.createElement("p",{className:"mt-4 mb-0 section-help"},S("DiscussionChannelHelp2")),n.a.createElement(Dt.a,{isOpen:y,onClose:N,header:M(),textParts:F(),confirmLabel:S("DiscussionLinkGroup"),confirmHandler:P,isButtonsInOneRow:!0})))))}));var $c=Object(n.h)(Object(c.h)((e,{chatId:t,isPromotedByCurrentUser:a})=>{const n=Object(m.f)(e,t);return{chat:n,isFormFullyDisabled:!(n.isCreator||a)}},(e,t)=>Object(u.l)(t,["updateChatMemberBannedRights"]))(({chat:e,selectedChatMemberId:t,onScreenSelect:a,updateChatMemberBannedRights:c,isFormFullyDisabled:r})=>{const[l,o]=Object(n.r)({}),[i,m]=Object(n.r)(!1),[d,u]=Object(n.r)(!1),[h,b,p]=Object(De.a)(),g=Object(T.a)(),E=Object(n.p)(()=>{if(e&&e.fullInfo&&e.fullInfo.members)return e.fullInfo.members.find(({userId:e})=>e===t)},[e,t]);Object(n.n)(()=>{e&&e.fullInfo&&t&&!E&&a(s.g.GroupPermissions)},[e,a,E,t]),Object(n.n)(()=>{o(E&&E.bannedRights||e&&e.defaultBannedRights||{}),m(!1),u(!1)},[e,E]);const v=Object(n.m)(e=>{const{name:t}=e.target;function a(e){return!e||void 0}o(e=>({...e,[t]:a(e[t]),..."sendStickers"===t&&{sendGifs:a(e[t])}})),m(!0)},[]),O=Object(n.m)(()=>{e&&t&&(u(!0),c({chatId:e.id,userId:t,bannedRights:l}))},[e,t,l,c]),f=Object(n.m)(()=>{e&&t&&c({chatId:e.id,userId:t,bannedRights:{viewMessages:!0}})},[e,t,c]),j=Object(n.m)(t=>!!r||!(!e||!e.defaultBannedRights)&&e.defaultBannedRights[t],[e,r]);if(E)return n.a.createElement("div",{className:"Management"},n.a.createElement("div",{className:"custom-scroll"},n.a.createElement("div",{className:"section"},n.a.createElement(fe.a,{inactive:!0,className:"chat-item-clickable"},n.a.createElement(je.a,{userId:E.userId})),n.a.createElement("h3",{className:"section-heading mt-4"},g("UserRestrictionsCanDo")),n.a.createElement("div",{className:"ListItem no-selection"},n.a.createElement(aa.a,{name:"sendMessages",checked:!l.sendMessages,label:g("UserRestrictionsSend"),blocking:!0,disabled:j("sendMessages"),onChange:v})),n.a.createElement("div",{className:"ListItem no-selection"},n.a.createElement(aa.a,{name:"sendMedia",checked:!l.sendMedia,label:g("UserRestrictionsSendMedia"),blocking:!0,disabled:j("sendMedia"),onChange:v})),n.a.createElement("div",{className:"ListItem no-selection"},n.a.createElement(aa.a,{name:"sendStickers",checked:!l.sendStickers&&!l.sendGifs,label:g("UserRestrictionsSendStickers"),blocking:!0,disabled:j("sendStickers"),onChange:v})),n.a.createElement("div",{className:"ListItem no-selection"},n.a.createElement(aa.a,{name:"sendPolls",checked:!l.sendPolls,label:g("UserRestrictionsSendPolls"),blocking:!0,disabled:j("sendPolls"),onChange:v})),n.a.createElement("div",{className:"ListItem no-selection"},n.a.createElement(aa.a,{name:"embedLinks",checked:!l.embedLinks,label:g("UserRestrictionsEmbedLinks"),blocking:!0,disabled:j("embedLinks"),onChange:v})),n.a.createElement("div",{className:"ListItem no-selection"},n.a.createElement(aa.a,{name:"inviteUsers",checked:!l.inviteUsers,label:g("UserRestrictionsInviteUsers"),blocking:!0,disabled:j("inviteUsers"),onChange:v})),n.a.createElement("div",{className:"ListItem no-selection"},n.a.createElement(aa.a,{name:"pinMessages",checked:!l.pinMessages,label:g("UserRestrictionsPinMessages"),blocking:!0,disabled:j("pinMessages"),onChange:v})),n.a.createElement("div",{className:"ListItem no-selection"},n.a.createElement(aa.a,{name:"changeInfo",checked:!l.changeInfo,label:g("UserRestrictionsChangeInfo"),blocking:!0,disabled:j("changeInfo"),onChange:v}))),!r&&n.a.createElement("div",{className:"section"},n.a.createElement(fe.a,{icon:"delete-user",ripple:!0,destructive:!0,onClick:b},g("UserRestrictionsBlock")))),n.a.createElement(zt,{isShown:i,onClick:O,ariaLabel:g("Save"),disabled:d},d?n.a.createElement(B.a,{color:"white"}):n.a.createElement("i",{className:"icon-check"})),n.a.createElement(Dt.a,{isOpen:h,onClose:p,text:"Are you sure you want to ban and remove this user from the group?",confirmLabel:"Remove",confirmHandler:f,confirmIsDestructive:!0}))}));var Hc=Object(n.h)(Object(c.h)((e,{chatId:t})=>{const a=Object(m.f)(e,t),{byId:n}=e.users;return{chat:a,currentUserId:e.currentUserId,isChannel:Object(d.jb)(a),usersById:n}})(({chat:e,isChannel:t,currentUserId:a,usersById:c,onScreenSelect:r,onChatMemberSelect:l})=>{const o=Object(T.a)();const i=Object(n.p)(()=>e.fullInfo&&e.fullInfo.adminMembers?e.fullInfo.adminMembers.sort((e,t)=>e.isOwner?-1:t.isOwner?1:0):[],[e]),m=Object(n.m)(e=>{l(e.userId,e.promotedByUserId===a),r(s.g.ChatAdminRights)},[a,l,r]),u=Object(n.m)(e=>{if(e.isOwner)return o("ChannelCreator");const t=e.promotedByUserId?c[e.promotedByUserId]:void 0;return t?o("EditAdminPromotedBy",Object(d.Z)(t)):o("ChannelAdmin")},[o,c]);return n.a.createElement("div",{className:"Management"},n.a.createElement("div",{className:"custom-scroll"},n.a.createElement("div",{className:"section"},n.a.createElement(fe.a,{icon:"recent",ripple:!0,onClick:function(){r(s.g.GroupRecentActions)}},n.a.createElement("div",{className:"multiline-item"},n.a.createElement("span",{className:"title"},o("EventLog")),n.a.createElement("span",{className:"subtitle"},o(t?"EventLogInfoDetailChannel":"EventLogInfoDetail"))))),n.a.createElement("div",{className:"section"},n.a.createElement("p",{className:"text-muted"},t?"You can add administrators to help you manage your channel.":"You can add administrators to help you manage your group."),i.map(e=>n.a.createElement(fe.a,{key:e.userId,className:"chat-item-clickable",ripple:!0,onClick:()=>m(e)},n.a.createElement(je.a,{userId:e.userId,status:u(e),forceShowSelf:!0}))))))}));var Vc=Object(n.h)(Object(c.h)((e,{chatId:t})=>({chat:Object(m.f)(e,t)}))(({chat:e})=>{const t=Object(T.a)(),a=Object(n.p)(()=>e&&e.fullInfo&&e.fullInfo.adminMembers?e.fullInfo.adminMembers.sort((e,t)=>e.isOwner?-1:t.isOwner?1:0):[],[e]),c=Object(n.m)(e=>e.isOwner?t("ChannelCreator"):t("ChannelAdmin"),[t]);return n.a.createElement("div",{className:"Management"},n.a.createElement("div",{className:"custom-scroll"},n.a.createElement("div",{className:"section not-implemented"},n.a.createElement("h3",{className:"section-heading"},"Actions"),n.a.createElement("div",{className:"ListItem no-selection"},n.a.createElement(aa.a,{name:"changeInfo",checked:!0,label:t("EventLogAllEvents"),onChange:void 0})),n.a.createElement("div",{className:"ListItem no-selection"},n.a.createElement(aa.a,{name:"changeInfo",checked:!0,label:t("EventLogFilterNewAdmins"),onChange:void 0})),n.a.createElement("div",{className:"ListItem no-selection"},n.a.createElement(aa.a,{name:"changeInfo",checked:!0,label:t("EventLogFilterNewMembers"),onChange:void 0})),n.a.createElement("div",{className:"ListItem no-selection"},n.a.createElement(aa.a,{name:"changeInfo",checked:!0,label:t("EventLogFilterChannelInfo"),onChange:void 0})),n.a.createElement("div",{className:"ListItem no-selection"},n.a.createElement(aa.a,{name:"changeInfo",checked:!0,label:t("EventLogFilterDeletedMessages"),onChange:void 0})),n.a.createElement("div",{className:"ListItem no-selection"},n.a.createElement(aa.a,{name:"changeInfo",checked:!0,label:t("EventLogFilterEditedMessages"),onChange:void 0})),n.a.createElement("div",{className:"ListItem no-selection"},n.a.createElement(aa.a,{name:"changeInfo",checked:!0,label:t("EventLogFilterLeavingMembers"),onChange:void 0}))),n.a.createElement("div",{className:"section not-implemented"},n.a.createElement("h3",{className:"section-heading"},"Admins"),n.a.createElement("div",{className:"ListItem no-selection"},n.a.createElement(aa.a,{name:"changeInfo",checked:!0,label:t("EventLogAllAdmins"),onChange:void 0})),a.map(e=>n.a.createElement(fe.a,{key:e.userId,className:"chat-item-clickable picker-list-item",onClick:void 0,ripple:!0},n.a.createElement(aa.a,{label:"",checked:!0}),n.a.createElement(je.a,{userId:e.userId,status:c(e),forceShowSelf:!0}))))))}));var Wc=Object(n.h)(Object(c.h)((e,{chatId:t,isPromotedByCurrentUser:a})=>{const n=Object(m.f)(e,t),{byId:c}=e.users,{currentUserId:r}=e;return{chat:n,usersById:c,currentUserId:r,isChannel:Object(d.jb)(n),isFormFullyDisabled:!(n.isCreator||a)}},(e,t)=>Object(u.l)(t,["updateChatAdmin"]))(({selectedChatMemberId:e,onScreenSelect:t,chat:a,usersById:c,currentUserId:r,isChannel:l,isFormFullyDisabled:o,updateChatAdmin:i})=>{const[m,u]=Object(n.r)({}),[h,b]=Object(n.r)(!1),[p,g]=Object(n.r)(!1),[E,v,O]=Object(De.a)(),[f,j]=Object(n.r)(""),C=Object(T.a)(),y=Object(n.p)(()=>{if(a.fullInfo&&a.fullInfo.adminMembers)return a.fullInfo.adminMembers.find(({userId:t})=>t===e)},[a,e]);Object(n.n)(()=>{a&&a.fullInfo&&e&&!y&&t(s.g.ChatAdministrators)},[a,t,y,e]),Object(n.n)(()=>{u(y&&y.adminRights||{}),j((y&&y.customTitle||"").substr(0,16)),b(!1),g(!1)},[y]);const k=Object(n.m)(e=>{const{name:t}=e.target;u(e=>{return{...e,[t]:(a=e[t],!a||void 0)};var a}),b(!0)},[]),N=Object(n.m)(()=>{e&&(g(!0),i({chatId:a.id,userId:e,adminRights:m,customTitle:f}))},[a,e,m,f,i]),S=Object(n.m)(()=>{e&&(i({chatId:a.id,userId:e,adminRights:{}}),O())},[a.id,O,e,i]),I=Object(n.m)(e=>!Object(d.ib)(a)&&(!(!o&&a.adminRights)||!a.adminRights[e]),[a,o]),w=Object(n.p)(()=>{if(!y)return;if(y.isOwner)return C("ChannelCreator");const e=y.promotedByUserId?c[y.promotedByUserId]:void 0;return e?C("EditAdminPromotedBy",Object(d.Z)(e)):C("ChannelAdmin")},[y,c,C]),P=Object(n.m)(e=>{const{value:t}=e.target;j(t),b(!0)},[]);if(y)return n.a.createElement("div",{className:"Management"},n.a.createElement("div",{className:"custom-scroll"},n.a.createElement("div",{className:"section"},n.a.createElement(fe.a,{inactive:!0,className:"chat-item-clickable"},n.a.createElement(je.a,{userId:y.userId,status:w,forceShowSelf:!0})),n.a.createElement("h3",{className:"section-heading mt-4"},C("EditAdminWhatCanDo")),n.a.createElement("div",{className:"ListItem no-selection"},n.a.createElement(aa.a,{name:"changeInfo",checked:!!m.changeInfo,label:C(l?"EditAdminChangeChannelInfo":"EditAdminChangeGroupInfo"),blocking:!0,disabled:I("changeInfo"),onChange:k})),l&&n.a.createElement("div",{className:"ListItem no-selection"},n.a.createElement(aa.a,{name:"postMessages",checked:!!m.postMessages,label:C("EditAdminPostMessages"),blocking:!0,disabled:I("postMessages"),onChange:k})),l&&n.a.createElement("div",{className:"ListItem no-selection"},n.a.createElement(aa.a,{name:"editMessages",checked:!!m.editMessages,label:C("EditAdminEditMessages"),blocking:!0,disabled:I("editMessages"),onChange:k})),n.a.createElement("div",{className:"ListItem no-selection"},n.a.createElement(aa.a,{name:"deleteMessages",checked:!!m.deleteMessages,label:C(l?"EditAdminDeleteMessages":"EditAdminGroupDeleteMessages"),blocking:!0,disabled:I("deleteMessages"),onChange:k})),!l&&n.a.createElement("div",{className:"ListItem no-selection"},n.a.createElement(aa.a,{name:"banUsers",checked:!!m.banUsers,label:C("EditAdminBanUsers"),blocking:!0,disabled:I("banUsers"),onChange:k})),n.a.createElement("div",{className:"ListItem no-selection"},n.a.createElement(aa.a,{name:"inviteUsers",checked:!!m.inviteUsers,label:C("EditAdminAddUsers"),blocking:!0,disabled:I("inviteUsers"),onChange:k})),!l&&n.a.createElement("div",{className:"ListItem no-selection"},n.a.createElement(aa.a,{name:"pinMessages",checked:!!m.pinMessages,label:C("EditAdminPinMessages"),blocking:!0,disabled:I("pinMessages"),onChange:k})),n.a.createElement("div",{className:"ListItem no-selection"},n.a.createElement(aa.a,{name:"addAdmins",checked:!!m.addAdmins,label:C("EditAdminAddAdmins"),blocking:!0,disabled:I("addAdmins"),onChange:k})),!l&&n.a.createElement("div",{className:"ListItem no-selection"},n.a.createElement(aa.a,{name:"anonymous",checked:!!m.anonymous,label:C("EditAdminSendAnonymously"),blocking:!0,disabled:I("anonymous"),onChange:k})),o&&n.a.createElement("p",{className:"section-info mb-4"},C("Channel.EditAdmin.CannotEdit")),!l&&n.a.createElement(ve.a,{id:"admin-title",label:C("EditAdminRank"),onChange:P,value:f,disabled:o,maxLength:16}),r!==e&&!o&&n.a.createElement(fe.a,{icon:"delete",ripple:!0,destructive:!0,onClick:v},C("EditAdminRemoveAdmin")))),n.a.createElement(zt,{isShown:h,onClick:N,ariaLabel:C("Save"),disabled:p},p?n.a.createElement(B.a,{color:"white"}):n.a.createElement("i",{className:"icon-check"})),n.a.createElement(Dt.a,{isOpen:E,onClose:O,text:"Are you sure you want to dismiss this admin?",confirmLabel:"Dismiss",confirmHandler:S,confirmIsDestructive:!0}))}));var Yc=Object(n.h)(Object(c.h)((e,{chatId:t})=>{const a=Object(m.f)(e,t),{byId:n}=e.users;return{members:a&&a.fullInfo&&a.fullInfo.members,usersById:n,isChannel:a&&Object(d.jb)(a)}},(e,t)=>Object(u.l)(t,["openUserInfo"]))(({members:e,usersById:t,isChannel:a,openUserInfo:c})=>{const r=Object(n.p)(()=>{if(e&&t)return Object(d.W)(e.map(({userId:e})=>e),t)},[e,t]),s=Object(n.m)(e=>{c({id:e})},[c]);return n.a.createElement("div",{className:"Management"},n.a.createElement("div",{className:"custom-scroll"},n.a.createElement("div",{className:"section",teactFastList:!0},r?r.map((e,t)=>n.a.createElement(fe.a,{key:e,teactOrderKey:t,className:"chat-item-clickable scroll-item",onClick:()=>s(e)},n.a.createElement(je.a,{userId:e,forceShowSelf:!0}))):n.a.createElement(Xe.a,{teactOrderKey:0,key:"nothing-found",text:a?"No subscribers found":"No members found"}))))}));var Kc=Object(n.h)(Object(c.h)((e,{chatId:t})=>{const a=Object(m.f)(e,t),{byId:n}=e.users;return{members:a&&a.fullInfo&&a.fullInfo.members,usersById:n,isChannel:a&&Object(d.jb)(a)}})(({usersById:e,members:t,isChannel:a,onScreenSelect:c,onChatMemberSelect:r})=>{const l=Object(n.p)(()=>{if(t&&e)return Object(d.W)(t.filter(e=>!e.isOwner).map(({userId:e})=>e),e)},[t,e]),o=Object(n.m)(e=>{r(e),c(s.g.GroupUserPermissions)},[r,c]);return n.a.createElement("div",{className:"Management"},n.a.createElement("div",{className:"custom-scroll"},n.a.createElement("div",{className:"section",teactFastList:!0},l?l.map((e,t)=>n.a.createElement(fe.a,{key:e,teactOrderKey:t,className:"chat-item-clickable scroll-item",onClick:()=>o(e)},n.a.createElement(je.a,{userId:e,forceShowSelf:!0}))):n.a.createElement(Xe.a,{teactOrderKey:0,key:"nothing-found",text:a?"No subscribers found":"No members found"}))))}));var Zc=Object(n.h)(Object(c.h)(e=>({managementType:Object(m.t)(e)}))(({chatId:e,currentScreen:t,selectedChatMemberId:a,isPromotedByCurrentUser:c,onScreenSelect:r,onChatMemberSelect:l,managementType:o})=>{switch(t){case s.g.Initial:switch(o){case"user":return n.a.createElement(Bc,{key:e,userId:e});case"group":return n.a.createElement(Dc,{key:e,chatId:e,onScreenSelect:r});case"channel":return n.a.createElement(Uc,{key:e,chatId:e,onScreenSelect:r})}break;case s.g.ChatPrivacyType:return n.a.createElement(zc,{chatId:e});case s.g.Discussion:return n.a.createElement(qc,{chatId:e,onScreenSelect:r});case s.g.GroupPermissions:return n.a.createElement(xc,{chatId:e,onScreenSelect:r,onChatMemberSelect:l});case s.g.GroupRemovedUsers:return n.a.createElement(Rc,{chatId:e});case s.g.GroupUserPermissionsCreate:return n.a.createElement(Kc,{chatId:e,onChatMemberSelect:l,onScreenSelect:r});case s.g.GroupUserPermissions:return n.a.createElement($c,{chatId:e,selectedChatMemberId:a,isPromotedByCurrentUser:c,onScreenSelect:r});case s.g.ChatAdministrators:return n.a.createElement(Hc,{chatId:e,onScreenSelect:r,onChatMemberSelect:l});case s.g.GroupRecentActions:return n.a.createElement(Vc,{chatId:e});case s.g.ChatAdminRights:return n.a.createElement(Wc,{chatId:e,selectedChatMemberId:a,isPromotedByCurrentUser:c,onScreenSelect:r});case s.g.ChannelSubscribers:case s.g.GroupMembers:return n.a.createElement(Yc,{chatId:e})}}));const Qc={USD:"$",EUR:"€",GBP:"£",JPY:"¥",RUB:"₽",UAH:"₴",INR:"₹",AED:"د.إ"};function _c(e){return e&&Qc[e]||""}const Xc=/^4[0-9]{12}(?:[0-9]{1,3})?$/,Jc=/^5[1-5][0-9]{11,14}$/,er=/^2[2-7][0-9]{11,14}$/;let tr;!function(e){e[e.Default=0]="Default",e[e.Visa=1]="Visa",e[e.Mastercard=2]="Mastercard"}(tr||(tr={}));const ar={[tr.Default]:"",[tr.Visa]:"visa",[tr.Mastercard]:"mastercard"};function nr(e){return e=e.replace(/\s/g,""),Xc.test(e)?tr.Visa:Jc.test(e)||er.test(e)?tr.Mastercard:tr.Default}var cr=a(54);const rr={streetLine1:"",streetLine2:"",city:"",state:"",countryIso2:"",postCode:"",fullName:"",email:"",phone:"",shipping:"",cardNumber:"",cardholder:"",expiry:"",cvv:"",billingCountry:"",billingZip:"",saveInfo:!0,saveCredentials:!1,formErrors:{}},sr=(e,t)=>{switch(t.type){case"changeAddress1":return{...e,streetLine1:t.payload,formErrors:{...e.formErrors,streetLine1:void 0}};case"changeAddress2":return{...e,streetLine2:t.payload,formErrors:{...e.formErrors,streetLine2:void 0}};case"changeCity":return{...e,city:t.payload,formErrors:{...e.formErrors,city:void 0}};case"changeState":return{...e,state:t.payload,formErrors:{...e.formErrors,state:void 0}};case"changeCountry":return{...e,countryIso2:t.payload,billingCountry:lr(t.payload),formErrors:{...e.formErrors,countryIso2:void 0}};case"changePostCode":return{...e,postCode:t.payload,formErrors:{...e.formErrors,postCode:void 0}};case"changeFullName":return{...e,fullName:t.payload,formErrors:{...e.formErrors,fullName:void 0}};case"changeEmail":return{...e,email:t.payload,formErrors:{...e.formErrors,email:void 0}};case"changePhone":return{...e,phone:t.payload,formErrors:{...e.formErrors,phone:void 0}};case"changeShipping":return{...e,shipping:t.payload};case"changeCardNumber":return{...e,cardNumber:t.payload,formErrors:{...e.formErrors,cardNumber:void 0}};case"changeCardholder":return{...e,cardholder:t.payload,formErrors:{...e.formErrors,cardholder:void 0}};case"changeExpiryDate":return{...e,expiry:t.payload,formErrors:{...e.formErrors,expiry:void 0}};case"changeCvvCode":return{...e,cvv:t.payload,formErrors:{...e.formErrors,cvv:void 0}};case"changeBillingCountry":return{...e,billingCountry:t.payload,formErrors:{...e.formErrors,billingCountry:void 0}};case"changeBillingZip":return{...e,billingZip:t.payload,formErrors:{...e.formErrors,billingZip:void 0}};case"changeSaveInfo":return{...e,saveInfo:t.payload};case"changeSaveCredentials":return{...e,saveCredentials:t.payload};case"updateUserInfo":return t.payload.countryIso2?{...e,...t.payload,billingCountry:lr(t.payload.countryIso2)}:{...e,...t.payload};case"setFormErrors":return{...e,formErrors:{...e.formErrors,...t.payload}};default:return e}};function lr(e){const t=Rt.a.find(({id:t})=>t===e);return t?t.name:""}function or(e,t=400){Object(n.n)(()=>{o.k||setTimeout(()=>{Object(K.b)(()=>{e.current&&e.current.focus()})},t)},[e,t])}var ir=Object(n.h)(e=>{const{id:t,value:a,label:c,hasArrow:r,error:s,ref:l,placeholder:o,onChange:i,children:m}=e,d=s||c,u=Object(le.a)("input-group",a&&"touched",s&&"error",d&&"with-label",r&&"with-arrow","input-group");return n.a.createElement("div",{className:u},n.a.createElement("select",{className:"form-control",id:t,value:a||"",onChange:i,placeholder:o||c,ref:l},m),d&&t&&n.a.createElement("label",{htmlFor:t},d))});a(289);var mr=Object(n.h)(({state:e,needEmail:t,needPhone:a,needName:c,needAddress:r,dispatch:s})=>{const l=Object(n.q)(null),o=Object(n.q)(null),i=Object(n.q)(null);Object(n.n)(()=>{i.current&&i.current.value!==e.countryIso2&&(i.current.value=e.countryIso2)},[e.countryIso2]);const m=Object(T.a)();or(l);const d=Object(n.m)(e=>{s({type:"changeAddress1",payload:e.target.value})},[s]),u=Object(n.m)(e=>{s({type:"changeAddress2",payload:e.target.value})},[s]),h=Object(n.m)(e=>{s({type:"changeCity",payload:e.target.value})},[s]),b=Object(n.m)(e=>{s({type:"changeState",payload:e.target.value})},[s]),p=Object(n.m)(e=>{s({type:"changeCountry",payload:e.target.value})},[s]),g=Object(n.m)(e=>{s({type:"changePostCode",payload:e.target.value})},[s]),E=Object(n.m)(e=>{s({type:"changeFullName",payload:e.target.value})},[s]),v=Object(n.m)(e=>{s({type:"changeEmail",payload:e.target.value})},[s]),O=Object(n.m)(e=>{let{value:t}=e.target;t="+"+t.replace(/\D/g,""),o.current&&(o.current.value=t),s({type:"changePhone",payload:t})},[s]),f=Object(n.m)(e=>{s({type:"changeSaveInfo",payload:e.target.value})},[s]),{formErrors:j}=e;return n.a.createElement("div",{className:"ShippingInfo"},n.a.createElement("form",null,r?n.a.createElement("div",null,n.a.createElement("h5",null,m("PaymentShippingAddress")),n.a.createElement(ve.a,{ref:l,label:"Address1 (Street)",onChange:d,value:e.streetLine1,inputMode:"text",error:j.streetLine1}),n.a.createElement(ve.a,{label:"Address2 (Street)",onChange:u,value:e.streetLine2,inputMode:"text",error:j.streetLine2}),n.a.createElement(ve.a,{label:"City",onChange:h,value:e.city,inputMode:"text",error:j.city}),n.a.createElement(ve.a,{label:"State",onChange:b,value:e.state,inputMode:"text",error:j.state}),n.a.createElement(ir,{label:"Country",placeholder:"Country",onChange:p,value:e.countryIso2,hasArrow:Boolean(!0),id:"shipping-country",error:j.countryIso2,ref:i},Rt.a.map(({name:e,id:t})=>n.a.createElement("option",{value:t,className:"county-item"},e))),n.a.createElement(ve.a,{label:"Post Code",onChange:g,value:e.postCode,inputMode:"text",error:j.postCode})):void 0,c||t||a?n.a.createElement("h5",null,m("PaymentShippingReceiver")):void 0,c&&n.a.createElement(ve.a,{label:"Full name",onChange:E,value:e.fullName,inputMode:"text",error:j.fullName}),t&&n.a.createElement(ve.a,{label:"Email",onChange:v,value:e.email,inputMode:"email",error:j.email}),a&&n.a.createElement(ve.a,{label:"Phone number",onChange:O,value:e.phone,inputMode:"tel",error:j.phone,ref:o}),n.a.createElement(aa.a,{label:m("PaymentShippingSave"),subLabel:m("PaymentShippingSaveInfo"),checked:Boolean(e.saveInfo),onChange:f})))});a(290);var dr=Object(n.h)(({state:e,shippingOptions:t,currency:a,dispatch:c})=>{Object(n.n)(()=>{t&&!e.shipping&&c({type:"changeShipping",payload:t[0].id})},[t,e.shipping,c]);const r=Object(n.m)(e=>{c({type:"changeShipping",payload:e})},[c]),s=Object(n.p)(()=>t.map(({id:e,title:t,amount:n})=>({label:t,subLabel:`${a} ${String(n/100)}`,value:e})),[t,a]);return n.a.createElement("div",{className:"Shipping"},n.a.createElement("form",null,n.a.createElement("p",null,"Select shipping method"),n.a.createElement(oa.a,{name:"shipping-options",options:s,onChange:r,selected:e.shipping})))});a(291);function ur(e,t,a,c=!1){return n.a.createElement("div",{className:"price-info-item "+(c?"price-info-item-main":"")},n.a.createElement("div",{className:"title"},e),n.a.createElement("div",{className:"value"},`${a||""} ${(t/100).toFixed(2)}`))}function hr(e,t,a){return n.a.createElement("div",{className:"checkout-info-item"},n.a.createElement("i",{className:e}," "),n.a.createElement("div",{className:"info"},n.a.createElement("div",{className:"title"},t),n.a.createElement("p",{className:"data"},a)))}var br=Object(n.h)(({invoiceContent:e,prices:t,shippingPrices:a,checkoutInfo:c,currency:r,totalPrice:s})=>{const{photoUrl:l,title:o,text:i}=e||{},{paymentMethod:m,paymentProvider:d,shippingAddress:u,name:h,phone:b,shippingMethod:p}=c||{};return n.a.createElement("div",{className:"Checkout"},n.a.createElement("div",{className:"description has-image"},l&&n.a.createElement("img",{src:l,alt:""}),n.a.createElement("div",{className:"text"},n.a.createElement("h5",null,o),n.a.createElement("p",null,i))),n.a.createElement("div",{className:"price-info"},t&&t.map(e=>ur(e.label,e.amount,r,!1)),a&&a.map(e=>ur(e.label,e.amount,r,!1)),void 0!==s&&ur("Total",s,r,!0)),n.a.createElement("div",{className:"invoice-info"},m&&hr("icon-card",m,"Payment method"),d&&hr("stripe-provider",d,"Payment provider"),u&&hr("icon-location",u,"Shipping address"),h&&hr("icon-user",h,"Name"),b&&hr("icon-phone",b,"Phone number"),p&&hr("icon-truck",p,"Shipping method")))});var pr=Object(n.h)(({value:e,error:t,onChange:a})=>{const c=Object(n.q)(null),r=Object(n.m)(t=>{if("Backspace"===t.key&&"/"===e.charAt(e.length-1)){const t=e.slice(0,e.length-1);c.current&&(c.current.value=t)}},[e]),s=Object(n.m)(e=>{a(function(e){const t=(e=e.replace(/[^\d]/g,"").slice(0,4)).match(/.{1,2}/g);return t&&t[0]&&Number(t[0])>12&&(t[0]="12"),t&&t[0]&&2===t[0].length&&!t[1]&&(t[1]=""),t?t.join("/"):""}(e.target.value))},[a]);return n.a.createElement(ve.a,{label:"Expiry date",ref:c,onChange:s,onKeyDown:r,value:e,error:t,inputMode:"numeric",maxLength:5})}),gr=(a(292),a.p+"mastercard.4216118edafe23cc2dec7b8807ba4622.svg"),Er=a.p+"visa.e5a7c336e1deb4b92a636e2e053878c4.svg";var vr=Object(n.h)(({value:e,error:t,onChange:a})=>{const c=Object(n.q)(null);or(c);const[r,s]=Object(n.r)(tr.Default);Object(n.n)(()=>{const t=nr(e);s(t)},[]);const l=Object(n.m)(e=>{const t=function(e){const t=(e=e.replace(/[^\d]/g,"")).match(/.{1,4}/g);return t?t.join(" "):""}(e.target.value),n=nr(e.target.value);s(n),a(t),c.current&&(c.current.value=t)},[a,c]),o=function(e){switch(e){case tr.Mastercard:return n.a.createElement("img",{src:gr,alt:""});case tr.Visa:return n.a.createElement("img",{src:Er,alt:""});default:return}}(r);return n.a.createElement("div",{className:"CardInput"},n.a.createElement("span",{className:"left-addon"},o),n.a.createElement(ve.a,{ref:c,label:"Card number",onChange:l,value:e,inputMode:"numeric",className:r?"has-left-addon":"",error:t,maxLength:23}))});a(293);var Or=Object(n.h)(({state:e,canSaveCredentials:t,needCardholderName:a,needCountry:c,needZip:r,dispatch:s})=>{const l=Object(n.q)(null);Object(n.n)(()=>{l.current&&l.current.value!==e.billingCountry&&(l.current.value=e.billingCountry)},[e.billingCountry]);const o=Object(n.m)(e=>{s({type:"changeCardNumber",payload:e})},[s]),i=Object(n.m)(e=>{s({type:"changeCardholder",payload:e.target.value.toUpperCase()})},[s]),m=Object(n.m)(e=>{s({type:"changeExpiryDate",payload:e})},[s]),d=Object(n.m)(e=>{s({type:"changeCvvCode",payload:e.target.value})},[s]),u=Object(n.m)(e=>{s({type:"changeBillingCountry",payload:e.target.value})},[s]),h=Object(n.m)(e=>{s({type:"changeBillingZip",payload:e.target.value})},[s]),b=Object(n.m)(e=>{s({type:"changeSaveCredentials",payload:e.target.value})},[s]),p=Object(T.a)(),{formErrors:g={}}=e;return n.a.createElement("div",{className:"PaymentInfo"},n.a.createElement("form",null,n.a.createElement("h5",null,p("PaymentCardTitle")),n.a.createElement(vr,{onChange:o,value:e.cardNumber,error:g.cardNumber}),a&&n.a.createElement(ve.a,{label:"Name on card",onChange:i,value:e.cardholder,inputMode:"text",error:g.cardholder}),n.a.createElement("section",{className:"inline-inputs"},n.a.createElement(pr,{value:e.expiry,onChange:m,error:g.expiry}),n.a.createElement(ve.a,{label:"CVV code",onChange:d,value:e.cvv,inputMode:"numeric",maxLength:3,error:g.cvv})),c||r?n.a.createElement("h5",null,p("PaymentBillingAddress")):void 0,c&&n.a.createElement(ir,{label:"Country",placeholder:"Country",onChange:u,value:e.billingCountry,hasArrow:Boolean(!0),id:"billing-country",error:g.billingCountry,ref:l},Rt.a.map(({name:e})=>n.a.createElement("option",{value:e,className:"county-item"},e))),r&&n.a.createElement(ve.a,{label:"Post Code",onChange:h,value:e.billingZip,inputMode:"text",error:g.billingZip}),t&&n.a.createElement(aa.a,{label:p("PaymentCardSavePaymentInformation"),checked:e.saveCredentials,onChange:b})))});a(174);var fr=Object(n.h)(Object(c.h)(e=>{const{step:t,shippingOptions:a,savedInfo:n,canSaveCredentials:c,invoice:r,invoiceContent:s,nativeProvider:l,nativeParams:o,passwordMissing:i,error:m}=e.payment,d=Boolean(r&&(!l||"stripe"!==l)),{needCardholderName:u,needCountry:h,needZip:b}=o||{},{nameRequested:p,phoneRequested:g,emailRequested:E,shippingAddressRequested:v,flexible:O,phoneToProvider:f,emailToProvider:j,currency:C,prices:y}=r||{};return{step:t,shippingOptions:a,savedInfo:n,canSaveCredentials:c,nativeProvider:l,passwordMissing:i,nameRequested:p,shippingAddressRequested:v,phoneRequested:g,emailRequested:E,flexible:O,phoneToProvider:f,emailToProvider:j,currency:C,prices:y,isProviderError:d,invoiceContent:s,needCardholderName:u,needCountry:h,needZip:b,error:m,globalErrors:e.errors}},(e,t)=>Object(u.l)(t,["validateRequestedInfo","sendPaymentForm","setPaymentStep","sendCredentialsInfo","clearPaymentError"]))(({isOpen:e,onClose:t,step:a,shippingOptions:c,savedInfo:r,canSaveCredentials:l,nameRequested:o,shippingAddressRequested:i,phoneRequested:m,emailRequested:d,phoneToProvider:u,emailToProvider:h,currency:b,passwordMissing:p,isProviderError:g,invoiceContent:E,nativeProvider:v,prices:O,needCardholderName:f,needCountry:j,needZip:C,error:y,globalErrors:k,validateRequestedInfo:N,sendPaymentForm:S,setPaymentStep:I,sendCredentialsInfo:w,clearPaymentError:P})=>{const[M,F]=Nt(sr,rr),L=_c(b),[A,D]=Object(n.r)(!1),U=Object(T.a)();Object(n.n)(()=>{(a||y||k)&&D(!1)},[a,y,k]),Object(n.n)(()=>{if(y&&y.field)F({type:"setFormErrors",payload:{[y.field]:y.fieldError}});else if(k&&k.length){const e=Object(cr.a)(k);F({type:"setFormErrors",payload:{...e}})}},[y,k,F]),Object(n.n)(()=>{if(r){const{name:e,phone:t,email:a,shippingAddress:n}=r;F({type:"updateUserInfo",payload:{fullName:e,phone:t&&"+"!==t.charAt(0)?"+"+t:t,email:a,...n||{}}})}},[r,F]);const G=Object(n.m)(()=>{P()},[P]),z=Object(n.p)(()=>a!==s.i.Checkout?0:function(e=[],t,a){const n=t?Cr(t,a):[];let c=0;const r=e.concat(n||[]);return c=r.reduce((e,t)=>e+t.amount,c),c}(O,c,M.shipping),[a,M.shipping,O,c]),q=Object(n.p)(()=>{if(a===s.i.Checkout)return function(e,t,a){const n=`${function(e){const t=nr(e);return ar[t]||""}(e.cardNumber)} *${e.cardNumber.slice(-4)}`,c=e.streetLine1?`${e.streetLine1}, ${e.city}, ${e.countryIso2}`:void 0,{phone:r,fullName:s}=e,l=t?jr(t,e.shipping):void 0,o=l?l.title:void 0;return{paymentMethod:n,paymentProvider:a,shippingAddress:c,name:s,phone:r,shippingMethod:o}}(M,c,v||"")},[a,M,c,v]);const $=Object(n.m)(()=>{const{saveInfo:e}=M,t=function(e){const{streetLine1:t,streetLine2:a,city:n,state:c,countryIso2:r,postCode:s,fullName:l,phone:o,email:i}=e;return{name:l,phone:o,email:i,shippingAddress:{streetLine1:t,streetLine2:a,city:n,state:c,countryIso2:r,postCode:s}}}(M);N({requestInfo:t,saveInfo:e})},[N,M]),H=Object(n.m)(()=>{const e=function(e){const{cardNumber:t,cardholder:a,expiry:n,cvv:c,billingCountry:r,billingZip:s}=e,[l,o]=n.split("/");return{data:{cardNumber:t,cardholder:a,expiryMonth:l,expiryYear:o,cvv:c,country:r,zip:s}}}(M);w({credentials:e})},[w,M]),V=Object(n.m)(()=>{S({shippingOptionId:M.shipping,saveCredentials:M.saveCredentials})},[S,M]),W=Object(n.m)(e=>{I({step:e})},[I]),Y=Object(n.m)(()=>{switch(D(!0),a){case s.i.ShippingInfo:return $();case s.i.Shipping:return W(s.i.PaymentInfo);case s.i.PaymentInfo:return H();case s.i.Checkout:return V();default:return()=>{}}},[a,$,W,H,V]),K=Object(n.p)(()=>{switch(a){case s.i.ShippingInfo:return U("PaymentShippingInfo");case s.i.Shipping:return U("PaymentShippingMethod");case s.i.PaymentInfo:return U("PaymentCardInfo");case s.i.Checkout:return U("PaymentCheckout");default:return""}},[a,U]),Z=Object(n.p)(()=>{switch(a){case s.i.Checkout:return`Pay ${L}${(z/100).toFixed(2)}`;default:return"Next Step"}},[a,z,L]);return g?n.a.createElement(Ee.a,{className:"error",isOpen:e,onClose:t},"Sorry, Telegram T doesn't support payments with this provider yet. Please use one of our mobile apps to do this.",n.a.createElement(R.a,{isText:!0,onClick:t},"OK")):n.a.createElement(Ee.a,{className:"PaymentModal",isOpen:e,onClose:t},n.a.createElement("div",{className:"header"},n.a.createElement(R.a,{className:"close-button",color:"translucent",round:!0,size:"smaller",onClick:t,ariaLabel:"Close"},n.a.createElement("i",{className:"icon-close"})),n.a.createElement("h3",null,K)),void 0!==a?n.a.createElement(x.a,{name:"slide",activeKey:a},()=>n.a.createElement("div",{className:"content custom-scroll"},function(e){switch(e){case s.i.ShippingInfo:return n.a.createElement(mr,{state:M,dispatch:F,needAddress:Boolean(i),needEmail:Boolean(d||h),needPhone:Boolean(m||u),needName:Boolean(o)});case s.i.Shipping:return n.a.createElement(dr,{state:M,dispatch:F,shippingOptions:c||[],currency:L});case s.i.PaymentInfo:return n.a.createElement(Or,{state:M,dispatch:F,canSaveCredentials:Boolean(!p&&l),needCardholderName:f,needCountry:j,needZip:C});case s.i.Checkout:return n.a.createElement(br,{prices:O,shippingPrices:M.shipping&&c?Cr(c,M.shipping):void 0,totalPrice:z,invoiceContent:E,checkoutInfo:q,currency:L});default:return}}(a))):n.a.createElement("div",{className:"empty-content"},n.a.createElement(B.a,{color:"gray"})),n.a.createElement("div",{className:"footer"},n.a.createElement(R.a,{type:"submit",onClick:Y,disabled:A,isLoading:A},Z)),y&&!y.field&&function(){if(y)return n.a.createElement(Ee.a,{className:"error",isOpen:Boolean(y),onClose:G},n.a.createElement("h4",null,y.description||"Error"),y.description||"Error",n.a.createElement(R.a,{isText:!0,onClick:P},"OK"))}())}));function jr(e,t){return e.find(({id:e})=>e===t)}function Cr(e,t){const a=jr(e,t);return a?a.prices:void 0}var yr=Object(n.h)(Object(c.h)(e=>{const{receipt:t}=e.payment,{currency:a,prices:n,info:c,totalAmount:r,credentialsTitle:s,shippingPrices:l,shippingMethod:o,photoUrl:i,text:m,title:d}=t||{};return{currency:a,prices:n,info:c,totalAmount:r,credentialsTitle:s,shippingPrices:l,shippingMethod:o,photoUrl:i,text:m,title:d}})(({isOpen:e,onClose:t,prices:a,shippingPrices:c,totalAmount:r,currency:s,info:l,photoUrl:o,text:i,title:m,credentialsTitle:d,shippingMethod:u})=>{const h=Object(T.a)(),b=_c(s),p=Object(n.p)(()=>function(e,t,a){if(!t)return{paymentMethod:e};const{shippingAddress:n}=t,c=n&&n.streetLine1?`${n.streetLine1}, ${n.city}, ${n.countryIso2}`:void 0,{phone:r,name:s}=t;return{paymentMethod:e,paymentProvider:"Stripe",shippingAddress:c,name:s,phone:r,shippingMethod:a}}(d,l,u),[l,u,d]);return n.a.createElement(Ee.a,{className:"PaymentModal PaymentModal-receipt",isOpen:e,onClose:t},n.a.createElement("div",null,n.a.createElement("div",{className:"header"},n.a.createElement(R.a,{className:"close-button",color:"translucent",round:!0,size:"smaller",onClick:t,ariaLabel:"Close"},n.a.createElement("i",{className:"icon-close"})),n.a.createElement("h3",null," ",h("PaymentReceipt")," ")),n.a.createElement("div",{className:"receipt-content custom-scroll"},n.a.createElement(br,{prices:a,shippingPrices:c,totalPrice:r,invoiceContent:{photoUrl:o,text:i,title:m},checkoutInfo:p,currency:b}))))}))},,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var n=a(5),c=a(48);const r={MonkeyIdle:a.p+"TwoFactorSetupMonkeyIdle.dea4a492c144df84ddab778dc8a3f0cd.tgs",MonkeyTracking:a.p+"TwoFactorSetupMonkeyTracking.eb5a7a6f166fb7589c12e6248561fb58.tgs",MonkeyClose:a.p+"TwoFactorSetupMonkeyClose.604c4c833d322b7e6c3ea19bef058241.tgs",MonkeyPeek:a.p+"TwoFactorSetupMonkeyPeek.1905436b042520363d7e59f5d7f903ab.tgs",FoldersAll:a.p+"FoldersAll.3f9f9e243d19f0fbf9aaaff11cbd4572.tgs",FoldersNew:a.p+"FoldersNew.9a40d71c0c8be70f5bd14ff2d7bc1593.tgs",DiscussionGroups:a.p+"DiscussionGroupsDucks.9ea453d1be9d1b0ee77a992f8e587485.tgs"};function s(e){const t=r[e].replace(window.location.origin,"");return c.b("file"+t,n.ApiMediaFormat.Lottie)}},,,,function(e,t,a){"use strict";var n=a(0),c=a(8),r=a(1),s=a(14),l=a(93),o=a(31),i=a(98),m=a(16);a(140);const d={type:"blob",quality:.8,format:"jpeg",circle:!1};let u,h,b;var p=Object(n.h)(({file:e,onChange:t,onClose:c})=>{const[p,g]=Object(n.r)(!1);Object(n.n)(()=>{e&&(p?async function(e){try{const t=document.getElementById("avatar-crop");if(!t)return;const{offsetWidth:a,offsetHeight:n}=t;b=new u(t,{enableZoom:!0,boundary:{width:a,height:n},viewport:{width:a-16,height:n-16,type:"circle"}});const c=await Object(s.a)(e);await b.bind({url:c})}catch(e){r.l&&console.error(e)}}(e):async function(){return h||(h=Promise.all([a.e(5),a.e(8)]).then(a.bind(null,301)),u=(await h).default),h}().then(()=>g(!0)))},[e,p]);const E=Object(l.a)();return n.a.createElement(i.a,{isOpen:Boolean(e),onClose:c,title:"Drag to reposition",className:"CropModal",hasCloseButton:!0},p?n.a.createElement("div",{id:"avatar-crop"}):n.a.createElement(m.a,null),n.a.createElement(o.a,{className:"confirm-button",round:!0,color:"primary",onClick:async function(){if(!b)return;const e=await b.result(d),a="string"==typeof e?e:Object(s.b)(e,"avatar.jpg");t(a)},ariaLabel:E("CropImage")},n.a.createElement("i",{className:"icon-check"})))});a(141);t.a=Object(n.h)(({title:e="Change your profile picture",disabled:t,currentAvatarBlobUrl:a,onChange:r})=>{const[s,l]=Object(n.r)(),[o,i]=Object(n.r)(a);Object(n.n)(()=>{i(a)},[a]);const m=Object(c.a)(o&&"filled",t&&"disabled");return n.a.createElement("div",{className:"AvatarEditable"},n.a.createElement("label",{className:m,role:"button",tabIndex:0,title:e},n.a.createElement("input",{type:"file",onChange:function(e){const t=e.target;t&&t.files&&t.files[0]&&(l(t.files[0]),t.value="")},accept:"image/png, image/jpeg"}),n.a.createElement("i",{className:"icon-camera-add"}),o&&n.a.createElement("img",{src:o,alt:"Avatar"})),n.a.createElement(p,{file:s,onClose:function(){l(void 0)},onChange:function(e){l(void 0),r(e),o&&URL.revokeObjectURL(o),i(URL.createObjectURL(e))}}))})},,,,,function(e,t,a){},,,,,,,,,,,,function(e,t,a){"use strict";var n=a(0),c=a(1),r=a(7),s=a(116),l=a(105);a(125);const o=[0,50],i=[0,20],m=[20,0],d=r.f?c.db:c.cb;t.a=Object(n.h)(({isPasswordVisible:e,isBig:t})=>{const[a,r]=Object(n.r)(),[u,h]=Object(n.r)(),[b,p]=Object(n.r)(!1),[g,E]=Object(n.r)(!1);Object(n.n)(()=>{a?setTimeout(()=>E(!0),2e3):Object(s.a)("MonkeyClose").then(r)},[a]),Object(n.n)(()=>{u||Object(s.a)("MonkeyPeek").then(h)},[u]);const v=Object(n.m)(()=>p(!0),[]);return n.a.createElement("div",{id:"monkey",className:t?"big":""},!b&&n.a.createElement("div",{className:"monkey-preview"}),a&&n.a.createElement(l.a,{id:"closeMonkey",size:t?c.nb:d,className:g?"hidden":"shown",animationData:a,playSegment:o,noLoop:!0,onLoad:v}),u&&n.a.createElement(l.a,{id:"peekMonkey",size:t?c.nb:d,className:g?"shown":"hidden",animationData:u,playSegment:e?i:m,noLoop:!0}))})},function(e,t,a){"use strict";var n=a(0),c=a(1),r=a(7),s=a(8),l=a(31);const o=r.f?550:400;t.a=Object(n.h)(({isLoading:e=!1,isPasswordVisible:t,error:a,hint:i,placeholder:m="Password",submitLabel:d="Next",clearError:u,onChangePasswordVisibility:h,onInputChange:b,onSubmit:p})=>{const g=Object(n.q)(null),[E,v]=Object(n.r)(""),[O,f]=Object(n.r)(!1);return Object(n.n)(()=>{r.k||setTimeout(()=>{g.current.focus()},o)},[]),n.a.createElement("form",{action:"",onSubmit:function(t){t.preventDefault(),e||O&&p(E)},autoComplete:"off"},n.a.createElement("div",{className:Object(s.a)("input-group password-input",E&&"touched",a&&"error")},n.a.createElement("input",{ref:g,className:"form-control",type:t?"text":"password",id:"sign-in-password",value:E||"",autoComplete:"current-password",onChange:function(e){a&&u();const{target:t}=e;v(t.value),f(t.value.length>=c.O),b&&b(t.value)}}),n.a.createElement("label",null,a||i||m),n.a.createElement("div",{className:"toggle-password",onClick:function(){h(!t)},role:"button",tabIndex:0,title:"Toggle password visibility"},n.a.createElement("i",{className:t?"icon-eye":"icon-eye-closed"}))),O&&n.a.createElement(l.a,{type:"submit",ripple:!0,isLoading:e},d))})},,function(e,t,a){},function(e,t,a){},,,,,,,,,,,,,function(e,t,a){},,,,,,,,,,,,,,,,,,,function(e,t,a){},function(e,t,a){},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,a){},function(e,t,a){},function(e,t,a){},function(e,t,a){},function(e,t,a){},function(e,t,a){},function(e,t,a){},function(e,t,a){},function(e,t,a){},function(e,t,a){},function(e,t,a){},function(e,t,a){},function(e,t,a){},function(e,t,a){},function(e,t,a){},function(e,t,a){},function(e,t,a){},function(e,t,a){},function(e,t,a){},function(e,t,a){},function(e,t,a){},function(e,t,a){},function(e,t,a){},function(e,t,a){},function(e,t,a){},function(e,t,a){},function(e,t,a){},function(e,t,a){},function(e,t,a){},function(e,t,a){},function(e,t,a){},function(e,t,a){},function(e,t,a){},function(e,t,a){},function(e,t,a){},function(e,t,a){},function(e,t,a){},function(e,t,a){},function(e,t,a){},function(e,t,a){},function(e,t,a){},function(e,t,a){},function(e,t,a){},function(e,t,a){},function(e,t,a){},function(e,t,a){},function(e,t,a){},function(e,t,a){},function(e,t,a){},function(e,t,a){},function(e,t,a){},function(e,t,a){},function(e,t,a){},function(e,t,a){},function(e,t,a){},function(e,t,a){},function(e,t,a){}])]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[2],Array(90).concat([function(e,t,a){"use strict";a.r(t),a.d(t,"MediaViewer",(function(){return he})),a.d(t,"ForwardPicker",(function(){return ye})),a.d(t,"Errors",(function(){return Se})),a.d(t,"Notifications",(function(){return we})),a.d(t,"CalendarModal",(function(){return Le})),a.d(t,"DeleteMessageModal",(function(){return Ae})),a.d(t,"PinMessageModal",(function(){return Te})),a.d(t,"UnpinAllMessagesModal",(function(){return Be})),a.d(t,"MessageSelectToolbar",(function(){return Ue})),a.d(t,"LeftSearch",(function(){return kt})),a.d(t,"Settings",(function(){return rn})),a.d(t,"ContactList",(function(){return ln})),a.d(t,"NewChat",(function(){return hn})),a.d(t,"NewChatStep1",(function(){return mn})),a.d(t,"NewChatStep2",(function(){return dn})),a.d(t,"ArchivedChats",(function(){return pn})),a.d(t,"ContextMenuContainer",(function(){return In})),a.d(t,"StickerSetModal",(function(){return wn})),a.d(t,"HeaderMenuContainer",(function(){return Mn})),a.d(t,"MobileSearch",(function(){return An})),a.d(t,"AttachmentModal",(function(){return qn})),a.d(t,"PollModal",(function(){return Hn})),a.d(t,"SymbolMenu",(function(){return pc})),a.d(t,"AttachMenu",(function(){return gc})),a.d(t,"MentionMenu",(function(){return zn})),a.d(t,"EmojiTooltip",(function(){return Ec})),a.d(t,"BotKeyboardMenu",(function(){return vc})),a.d(t,"CustomSendMenu",(function(){return Oc})),a.d(t,"DropArea",(function(){return fc.b})),a.d(t,"TextFormatter",(function(){return jc.a})),a.d(t,"RightSearch",(function(){return yc})),a.d(t,"StickerSearch",(function(){return Sc})),a.d(t,"GifSearch",(function(){return Ic})),a.d(t,"Statistics",(function(){return Lc})),a.d(t,"PollResults",(function(){return Tc})),a.d(t,"Management",(function(){return Zc})),a.d(t,"PaymentModal",(function(){return fr})),a.d(t,"ReceiptModal",(function(){return yr}));var n=a(0),c=a(2),r=a(5),s=a(18),l=a(1),o=a(7),i=a(103),m=a(6),d=a(4),u=a(3),h=a(127),b=a(42),p=a(165),g=a(29),E=a(97),v=a(112),O=a(168),f=a(106),j=a(135),C=a(14);var y=a(38),k=a(43),N=a(134),S=a(49);function I(e,t,a,n){const{mediaEl:c}=L(t,n);if(!c)return;const{width:r}=S.a.get();let o,m=!1;if(n){const{photo:e,video:t,webPage:a}=Object(d.v)(n);m=Boolean(t),o=t?Object(d.bb)(t):Object(d.R)(e||a.photo)}else o=i.a;const{width:u,height:h}=Object(i.j)(e,m),{width:b,height:p}=Object(i.e)(u,h,o.width,o.height),g=(r-b)/2,E=function(e){const t=window.matchMedia(i.b);let a=4.125;e&&(a+=t.matches?.875:3.375);return a*i.c}(e)+(h-p)/2;let{top:v,left:O,width:f,height:j}=c.getBoundingClientRect();if([s.h.SharedMedia,s.h.Album,s.h.ScheduledAlbum,s.h.SearchResult].includes(t)){const e=function(e,t,a,n,c,r){if(e===t){const s=Math.max(c,r)*(e/t);n-=(s-c)/2,a-=(s-r)/2,c=s,r=s}else if(e>t){const a=c;n-=((c=r*(e/t))-a)/2}else if(t>e){const n=r;a-=((r=c*(t/e))-n)/2}return{top:a,left:n,width:c,height:r}}(b,p,v,O,f,j);v=e.top,O=e.left,f=e.width,j=e.height}const C=O+f/2-(g+b/2),y=v+j/2-(E+p/2),k=f/b,N=j/p,I=P(a||c);F(I,{top:E+"px",left:g+"px",width:b+"px",height:p+"px",transform:`translate3d(${C}px, ${y}px, 0) scale(${k}, ${N})`}),A(I,t),document.body.classList.add("ghost-animating"),requestAnimationFrame(()=>{document.body.appendChild(I),requestAnimationFrame(()=>{I.style.transform="",function(e){e.firstChild.style.objectFit="default",e.classList.remove("rounded-corners","circle")}(I),setTimeout(()=>{requestAnimationFrame(()=>{document.body.removeChild(I),document.body.classList.remove("ghost-animating")})},200+l.c)})})}function w(e,t,a){const{container:n,mediaEl:c}=L(e,a);if(!c)return;const r=document.getElementById("MediaViewer").querySelector(".active .media-viewer-content img, .active .media-viewer-content video");if(!r||!c)return;const{top:o,left:i,width:m,height:d}=r.getBoundingClientRect(),{top:u,left:h,width:b,height:p}=c.getBoundingClientRect();let g=u;if(!function(e){if("none"===e.style.display)return!1;const t=e.getBoundingClientRect(),{height:a}=S.a.get();return t.top<=a&&t.top+t.height>=0}(n)){const{height:e}=S.a.get();g=uf?O=f:f>O&&(f=O));const C=P(t||c);F(C,{top:g+"px",left:h+"px",width:b+"px",height:p+"px",transform:`translate3d(${E}px, ${v}px, 0) scale(${O}, ${f})`}),requestAnimationFrame(()=>{document.body.classList.add("ghost-animating"),document.body.appendChild(C),requestAnimationFrame(()=>{C.style.transform="",j&&(C.style.opacity="0"),A(C,e),setTimeout(()=>{requestAnimationFrame(()=>{document.body.removeChild(C),document.body.classList.remove("ghost-animating")})},200+l.c)})})}function P(e){const t=document.createElement("div");t.classList.add("ghost");const a=new Image;return"string"==typeof e?a.src=e:e instanceof HTMLVideoElement?a.src=e.poster:a.src=e.src,t.appendChild(a),t}function M(e,t){const a=document.querySelector(".active > .MessageList");let n=e.offsetTop+t.closest(".content-inner, .WebPage").offsetTop;return e.id.includes("album-media-")&&(n+=e.parentElement.offsetTop+e.closest(".Message").offsetTop),n>a.scrollTop&&n+t.offsetHeight{if(n&&t)return{sender:Object(d.lb)(t)?Object(m.Bb)(e,t):Object(m.f)(e,t)};if(!a||!t)return{};const c=Object(m.k)(e,t,a);return{message:c,sender:c&&Object(m.ob)(e,c)}},(e,t)=>Object(u.l)(t,["closeMediaViewer","focusMessage"]))(({chatId:e,messageId:t,sender:a,isAvatar:c,message:r,closeMediaViewer:s,focusMessage:l})=>{const o=Object(n.m)(()=>{s(),l({chatId:e,messageId:t})},[e,l,t,s]);if(Object(T.a)(),!a||!r&&!c)return;const i=a.id<0,m=Object(d.U)(a);return n.a.createElement("div",{className:"SenderInfo",onClick:o},i?n.a.createElement(z.a,{key:a.id,size:"medium",chat:a}):n.a.createElement(z.a,{key:a.id,size:"medium",user:a}),n.a.createElement("div",{className:"meta"},n.a.createElement("div",{className:"title"},m&&Object(G.a)(m)),n.a.createElement("div",{className:"date"},c?"Profile photo":Object(U.d)(1e3*r.date))))}),$=a(166),H=a(56),V=a(32),W=a(113);a(238);var Y=({mediaData:e,isVideo:t,isZoomed:a,message:c,fileName:r,isAvatar:s,onCloseMediaViewer:l,onForward:i,onZoomToggle:m})=>{const[u,h]=Object(n.r)(!1),b=t&&c?Object(d.D)(c,"download"):void 0,{mediaData:p,downloadProgress:g}=Object(v.a)(b,!u);Object(n.n)(()=>{u&&p&&(Object($.a)(p,r),h(!1))},[r,p,u]),Object(n.n)(()=>{h(!1)},[b]);const E=Object(n.m)(e=>{e.stopPropagation(),h(e=>!e)},[]),O=Object(T.a)(),f=Object(n.p)(()=>({onTrigger:e,isOpen:t})=>n.a.createElement(R.a,{round:!0,size:"smaller",color:"translucent",className:t?"active":void 0,onClick:e,ariaLabel:"More actions"},n.a.createElement("i",{className:"icon-more"})),[]);return o.f?n.a.createElement("div",{className:"MediaViewerActions-mobile"},n.a.createElement(H.a,{trigger:f,positionX:"right"},!s&&n.a.createElement(V.a,{icon:"forward",onClick:i},O("Forward")),t?n.a.createElement(V.a,{icon:u?"close":"download",onClick:E},u?Math.round(100*g)+"% Downloading...":"Download"):n.a.createElement(V.a,{icon:"download",href:e,download:r},O("AccActionDownload"))),u&&n.a.createElement(W.a,{progress:g,size:"s",noCross:!0})):n.a.createElement("div",{className:"MediaViewerActions"},!s&&n.a.createElement(n.a.Fragment,null,n.a.createElement(R.a,{round:!0,size:"smaller",color:"translucent-white",ariaLabel:O("Forward"),onClick:i},n.a.createElement("i",{className:"icon-forward"}))),t?n.a.createElement(R.a,{round:!0,size:"smaller",color:"translucent-white",ariaLabel:O("AccActionDownload"),onClick:E},u?n.a.createElement(W.a,{progress:g,size:"s",onClick:E}):n.a.createElement("i",{className:"icon-download"})):n.a.createElement(R.a,{href:e,download:r,round:!0,size:"smaller",color:"translucent-white",ariaLabel:O("AccActionDownload")},n.a.createElement("i",{className:"icon-download"})),n.a.createElement(R.a,{round:!0,size:"smaller",color:"translucent-white",ariaLabel:a?"Zoom Out":"Zoom In",onClick:m},n.a.createElement("i",{className:a?"icon-zoom-out":"icon-zoom-in"})),n.a.createElement(R.a,{round:!0,size:"smaller",color:"translucent-white",ariaLabel:O("Close"),onClick:l},n.a.createElement("i",{className:"icon-close"})))},K=a(9);a(239);var Z=({text:e="",isHideable:t,onClick:a})=>{const[c,r]=Object(n.r)(!1);return Object(n.n)(()=>{const e=document.querySelector(".MediaViewerFooter .media-text"),t=()=>{const t=e?e.clientHeight:0;r(t>2*i.c)};t();const a=Object(K.g)(t,500,!0);return window.addEventListener("resize",a,!1),()=>{window.removeEventListener("resize",a,!1)}},[]),n.a.createElement("div",{className:"MediaViewerFooter "+(t?"hideable":""),onClick:function(t){e&&t.stopPropagation()}},e&&n.a.createElement("div",{className:"media-viewer-footer-content",onClick:a},n.a.createElement("p",{className:"media-text custom-scroll "+(c?"multiline":"")},e)))},Q=a(27),_=a(121);const X=function(){if(void 0!==document.fullscreenElement)return"fullscreenElement";if(void 0!==document.mozFullScreenElement)return"mozFullScreenElement";if(void 0!==document.webkitFullscreenElement)return"webkitFullscreenElement";return""}();var J=a(136),ee=a(133);const te=["bytes","kB","MB","GB","TB","PB"];var ae=e=>{const t=0===e?0:Math.floor(Math.log(e)/Math.log(1024));return`${(e/1024**Math.floor(t)).toFixed(1)} ${te[t]}`};a(240);const ne=e=>{e.stopPropagation()};var ce=({bufferedProgress:e,currentTime:t,duration:a,fileSize:c,isForceVisible:r,isForceMobileVersion:s,isPlayed:l,isFullscreenSupported:i,isFullscreen:m,onChangeFullscreen:d,onPlayPause:u,onSeek:h})=>{const[b,p]=Object(n.r)(!0);Object(n.n)(()=>{r&&p(r)},[r]),Object(n.n)(()=>{let e;return r||(o.f?p(!1):e=window.setTimeout(()=>{p(!1)},800)),()=>{e&&window.clearTimeout(e)}},[r]),Object(n.n)(()=>((b||r)&&document.body.classList.add("video-controls-visible"),()=>{document.body.classList.remove("video-controls-visible")}),[r,b]);const g=Object(T.a)();var E,v;if(b||r)return n.a.createElement("div",{className:"VideoPlayerControls "+(s?"mobile":""),onClick:ne},function(e,t,a,c){const r=e/t*100,s=100*a;return n.a.createElement("div",{className:"player-seekline"},n.a.createElement("div",{className:"player-seekline-track"},n.a.createElement("div",{className:"player-seekline-buffered",style:`width: ${s||0}%`}),n.a.createElement("div",{className:"player-seekline-played",style:`width: ${r||0}%`}),n.a.createElement("input",{min:"0",max:"100",step:.01,type:"range",onInput:c,className:"player-seekline-input",value:r||0})))}(t,a,e,h),n.a.createElement(R.a,{ariaLabel:g("AccActionPlay"),size:"tiny",ripple:!o.f,color:"translucent-white",className:"play",onClick:u},n.a.createElement("i",{className:l?"icon-pause":"icon-play"})),function(e,t){return n.a.createElement("div",{className:"player-time"},`${Object(U.e)(e)} / ${Object(U.e)(t)}`)}(t,a),e<1&&(E=e,v=c,n.a.createElement("div",{className:"player-file-size"},`${ae(v*E)} / ${ae(v)}`)),i&&n.a.createElement(R.a,{ariaLabel:"Fullscreen",size:"tiny",color:"translucent-white",className:"fullscreen",onClick:d},n.a.createElement("i",{className:""+(m?"icon-smallscreen":"icon-fullscreen")})))};a(241);function re(){return(re=Object.assign||function(e){for(var t=1;t{const d=Object(n.q)(null),[u,h]=Object(n.r)(!o.k||!o.d),[b,p]=Object(n.r)(0),[g,E]=Object(n.r)(!0),[v,O,f]=function(e,t){const[a,c]=Object(n.r)(Boolean(X&&document[X]));return Object(n.o)(()=>{const a=()=>{c(Boolean(X&&document[X]))},n=()=>{c(!0)},r=()=>{c(!1),t(!1)},s=e.current;return document.addEventListener("fullscreenchange",a,!1),document.addEventListener("webkitfullscreenchange",a,!1),document.addEventListener("mozfullscreenchange",a,!1),s&&(s.addEventListener("webkitbeginfullscreen",n,!1),s.addEventListener("webkitendfullscreen",r,!1)),()=>{document.removeEventListener("fullscreenchange",a,!1),document.removeEventListener("webkitfullscreenchange",a,!1),document.removeEventListener("mozfullscreenchange",a,!1),s&&(s.removeEventListener("webkitbeginfullscreen",n,!1),s.removeEventListener("webkitendfullscreen",r,!1))}},[]),X||"iOS"===o.n?[a,()=>{e.current&&(X||"iOS"===o.n)&&(e.current.requestFullscreen?e.current.requestFullscreen():e.current.webkitRequestFullscreen?e.current.webkitRequestFullscreen():e.current.webkitEnterFullscreen?e.current.webkitEnterFullscreen():e.current.mozRequestFullScreen&&e.current.mozRequestFullScreen(),c(!0))},()=>{e.current&&(document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitCancelFullScreen?document.webkitCancelFullScreen():document.webkitExitFullscreen&&document.webkitExitFullscreen(),c(!1))}]:[!1]}(d,h),{isBuffered:j,bufferedProgress:C,bufferingHandlers:y}=Object(_.a)(),{shouldRender:k,transitionClassNames:N}=Object(Q.a)(!j,void 0,void 0,"slow");Object(n.n)(()=>{i||!l?d.current.pause():e&&!o.k&&Object(ee.a)(d.current)},[i,l,e]),Object(n.n)(()=>{d.current.currentTime===d.current.duration?(p(0),h(!1)):p(d.current.currentTime)},[b]);const S=Object(n.m)(e=>{e.stopPropagation(),u?(d.current.pause(),h(!1)):(d.current.play(),h(!0))},[u]);Object(J.a)(d,[]);const I=Object(n.m)(()=>{E(!0)},[]),w=Object(n.m)(()=>{E(!1)},[]),P=Object(n.m)(e=>{p(e.currentTarget.currentTime)},[]),M=Object(n.m)(()=>{p(0),h(!1)},[]),F=Object(n.m)(()=>{v&&f?f():!v&&O&&O()},[f,v,O]),L=Object(n.m)(e=>{e.stopPropagation(),d.current.currentTime=Number(e.target.value)*d.current.duration/100},[]),A=Object(n.m)(e=>{e.stopPropagation(),E(!g)},[g]);Object(n.n)(()=>{const e=e=>{"Enter"!==e.key&&" "!==e.key||S(e)};return document.addEventListener("keydown",e,!1),()=>{document.removeEventListener("keydown",e,!1)}},[S]);const T=c&&`width: ${c.width}px; height: ${c.height}px`,B=`background-image: url(${a})`;return n.a.createElement("div",{className:"VideoPlayer",onClick:!t&&o.f?A:void 0,onMouseOver:t?void 0:I,onMouseOut:t?void 0:w},n.a.createElement("div",{style:T},n.a.createElement("video",re({ref:d,autoPlay:o.k,playsInline:!0,loop:t,muted:t,id:"media-viewer-video",style:B,onEnded:M},y,{onTimeUpdate:P}),e&&n.a.createElement("source",{src:e}))),k&&n.a.createElement("div",{className:["spinner-container",N].join(" ")},!j&&n.a.createElement("div",{className:"buffering"},"Buffering..."),n.a.createElement(W.a,{size:"xl",progress:j?1:r,square:!0,onClick:m})),!t&&!k&&n.a.createElement(ce,{isPlayed:u,bufferedProgress:C,currentTime:b,isFullscreenSupported:Boolean(O),isFullscreen:v,fileSize:s,duration:d.current?d.current.duration:0,isForceVisible:!u||g,isForceMobileVersion:c&&c.width<400,onSeek:L,onChangeFullscreen:F,onPlayPause:S}))}),le=a(8);a(242);var oe=Object(n.h)(({isShown:e,onChangeZoom:t})=>{const{transitionClassNames:a}=Object(Q.a)(e),c=Object(y.a)(e),r=Object(n.q)(null),[s,l]=Object(n.r)(1),i=Object(n.q)(!1);Object(n.n)(()=>{e&&!c&&l(1.5)},[e,c]);const m=Object(n.m)(()=>{i.current=!0},[]),d=Object(n.m)(()=>{i.current=!1,1===s&&t(s,!i.current)},[t,s]);Object(n.n)(()=>{t(s,!i.current)},[s,t]);const u=Object(T.a)(),h=Object(le.a)("ZoomControls",a);return n.a.createElement("div",{className:h},n.a.createElement(R.a,{disabled:1===s,size:"tiny",color:"translucent-white",ariaLabel:u("ZoomOut"),className:"zoom-out",ripple:!o.f,onClick:()=>{r.current&&l(Math.max(1,s-.5))}},n.a.createElement("i",{className:"icon-zoom-out"})),n.a.createElement(R.a,{disabled:3===s,size:"tiny",color:"translucent-white",ariaLabel:"Zoom In",className:"zoom-in",ripple:!o.f,onClick:()=>{r.current&&l(Math.min(3,s+.5))}},n.a.createElement("i",{className:"icon-zoom-in"})),n.a.createElement("div",{className:"seekline"},n.a.createElement("div",{className:"seekline-track"},n.a.createElement("div",{className:"seekline-played",style:`width: ${50*(s-1)}%`}),n.a.createElement("input",{ref:r,min:1,max:3,step:"0.5",value:s,type:"range",className:"seekline-input",onChange:e=>{l(Math.min(3,Math.max(Number(e.target.value),1)))},onMouseDown:m,onMouseUp:d}))))});a(243);const ie=[1,0,0,1,0,0],me={1:1,1.5:1.5,2:2.2,2.5:3.3,3:5.5};var de=Object(n.h)(({children:e,className:t,noWrap:a,canPan:c,zoomLevel:r,panDeltaX:s,panDeltaY:l,onPan:o})=>{const i=me[r]||r,[m,d]=Object(n.r)(!1),[h,b]=Object(n.r)({dx:s,dy:l,x:0,y:0}),[p,g]=Object(n.r)(ie),E=Object(n.q)(null),v=Object(n.q)(null);Object(n.n)(()=>{const e=i||p[0],t=s||p[4],a=l||p[5],n=[...p];p[0]!==e&&(n[0]=e||n[0],n[3]=e||n[3]),p[4]!==t&&(n[4]=t),p[5]!==a&&(n[5]=a),Object(u.a)(p,n)||g(function(e,t,a){const n=a&&a.querySelector(".active img");if(!a||!n)return t;const c=a.getBoundingClientRect(),r=n.getBoundingClientRect(),s=r.width/e*t[0],l=r.height/e*t[3],o=(c.width-s)/2+t[4],i=(c.height-l)/2+t[5];return c.width&&c.width-150{c||g(ie)},[c]),Object(n.n)(()=>{v.current&&(v.current.style.transform=`matrix(${p.toString()})`)},[a,p]);return a?e:n.a.createElement("div",{ref:E,className:"pan-wrapper "+(t||""),onMouseDown:e=>{if(!c)return;e.stopPropagation(),e.preventDefault();const t={dx:p[4],dy:p[5],x:e.pageX,y:e.pageY};b(t),d(!0),E.current&&E.current.classList.add("move")},onMouseUp:()=>{d(!1),E.current&&E.current.classList.remove("move"),o&&o(p[4],p[5])},onMouseMove:e=>{if(m){const t=function(e,t){const a=[...p],n=h.x-e,c=h.y-t;return a[4]=h.dx-n,a[5]=h.dy-c,a}(e.pageX,e.pageY);g(t),v.current&&(v.current.style.transform=`matrix(${p.toString()})`)}}},n.a.createElement("div",{ref:v,className:"pan-container"},e))});a(244);function ue(e,t){return e?n.a.createElement("img",{src:e,alt:"",style:t?`width: ${t.width}px`:"",draggable:!1}):n.a.createElement("div",{className:"spinner-wrapper",style:t?`width: ${t.width}px`:""},n.a.createElement(B.a,{color:"white"}))}var he=Object(n.h)(Object(c.h)(e=>{const{chatId:t,threadId:a,messageId:n,avatarOwnerId:c,origin:r}=e.mediaViewer,{animationLevel:l}=e.settings.byKey;if(r===s.h.SearchResult){if(!t||!n)return{animationLevel:l};const a=Object(m.k)(e,t,n);return a?{chatId:t,messageId:n,senderId:a.senderId,origin:r,message:a,animationLevel:l}:{animationLevel:l}}if(c){return{messageId:-1,senderId:c,avatarOwner:Object(m.f)(e,c)||Object(m.Bb)(e,c),animationLevel:l,origin:r}}if(!(t&&a&&n))return{animationLevel:l};let o,i,d;if(o=r&&[s.h.ScheduledAlbum,s.h.ScheduledInline].includes(r)?Object(m.kb)(e,t,n):Object(m.k)(e,t,n),!o)return{animationLevel:l};if(i=r&&[s.h.ScheduledAlbum,s.h.ScheduledInline].includes(r)?Object(m.lb)(e,t):Object(m.m)(e,t),r===s.h.Inline||r===s.h.Album)d=Object(m.bb)(e,t,a)||Object(m.W)(e,t,a);else if(r===s.h.SharedMedia){const t=Object(m.u)(e),{foundIds:a}=t&&t.resultsByType&&t.resultsByType.media||{};d=a}return{chatId:t,threadId:a,messageId:n,senderId:o.senderId,origin:r,message:o,chatMessages:i,collectionIds:d,animationLevel:l}},(e,t)=>Object(u.l)(t,["openMediaViewer","closeMediaViewer","openForwardMenu","focusMessage"]))(({chatId:e,threadId:t,messageId:a,senderId:c,origin:m,avatarOwner:u,message:S,chatMessages:P,collectionIds:M,openMediaViewer:F,closeMediaViewer:L,openForwardMenu:A,focusMessage:B,animationLevel:U})=>{const G=Object(n.q)(null),z=Boolean(u||a),$=S?Object(d.Q)(S):void 0,H=S?Object(d.G)(S):void 0,V=S?Object(d.O)(S):void 0,W=Boolean($),K=Boolean(H||$),Q=Boolean(V),_=V?V.isGif:void 0,X=m===s.h.SharedMedia,J=m===s.h.SearchResult,ee=U>=1?"mv-slide":"none",te=2===U?"slide-fade":"none",ae=2===U,ne=u?`avatar${u.id}.jpg`:S&&Object(d.B)(S),ce=Object(y.a)(c),[re,le]=Object(n.r)(!1),[ie,me]=Object(n.r)(!1),[he,be]=Object(n.r)(1),[pe,ge]=Object(n.r)({x:0,y:0}),Ee=Object(n.p)(()=>W&&a?[a]:Object(d.i)(P||{},M||[],X),[W,a,P,M,X]),ve=a?Ee.indexOf(a):-1,Oe=0===ve||-1===ve,fe=ve===Ee.length-1||-1===ve;function je(e){return u?Object(d.f)(u,e?"big":"normal"):S&&Object(d.D)(S,e?"viewerFull":"viewerPreview")}!z||ce&&ce===c&&G.current||(G.current=ve);const Ce=Object(E.a)(S&&(X||J)&&Object(d.D)(S,"pictogram"),void 0,r.ApiMediaFormat.BlobUrl,void 0,ae&&350),ye=Object(E.a)(je(),void 0,u?r.ApiMediaFormat.DataUri:r.ApiMediaFormat.BlobUrl,void 0,ae&&350),{mediaData:ke,downloadProgress:Ne}=Object(v.a)(je(!0),void 0,S&&Object(d.C)(S,"viewerFull"),void 0,ae&&350),Se=H||V?(H||V).blobUrl:void 0;let Ie=!Q&&(Se||ke)||ye||Ce;const we=function(e){const t=Object(n.q)();let a=!1;Object(f.a)(()=>{if(a=!0,t.current=void 0,!e)return;const n=new Image;if(n.src=e,!n.width)return;const c=Object(C.f)(n);Object(O.a)(c.getContext("2d"),0,0,c.width,c.height,2,2),t.current=c.toDataURL()},[e]);const c=Object(j.a)(e||void 0,Boolean(t.current));return t.current||!a&&c||e||void 0}(!Ie&&S&&Object(d.E)(S));Ie||m===s.h.SearchResult||(Ie=we);const Pe=K?Object(d.R)(W?Object(d.Q)(S):Object(d.G)(S)):void 0,Me=Q?Object(d.bb)(Object(d.O)(S)):void 0;Object(n.n)(()=>{o.f&&document.body.classList.toggle("is-media-viewer-open",z)},[z]);const Fe=Object(g.a)();Object(n.n)(()=>{const e=window.matchMedia(i.b);return"function"==typeof e.addEventListener?e.addEventListener("change",Fe):"function"==typeof e.addListener&&e.addListener(Fe),()=>{"function"==typeof e.removeEventListener?e.removeEventListener("change",Fe):"function"==typeof e.removeListener&&e.removeListener(Fe)}},[Fe]);const Le=Object(y.a)(S),Ae=Object(y.a)(m),Te=Object(y.a)(u),Be=Object(y.a)(Ie);Object(n.n)(()=>{if(ae&&z&&!Le&&!Te){Object(k.b)(350+l.c);const e=S?Object(N.a)(S):void 0;I(Boolean(e),m,Ie,S)}ae&&!z&&(Le||Te)&&(Object(k.b)(350+l.c),w(Ae,Be,Le||void 0))},[ae,z,m,Ae,S,Le,Te,Ie,Be]),Object(n.n)(()=>{let e;return ie?le(!0):e=window.setTimeout(()=>{le(!1)},350),()=>{e&&window.clearTimeout(e)}},[ie]);const De=()=>{me(!1),be(1),ge({x:0,y:0})},xe=Object(n.m)(()=>{me(!ie),be(ie?1:1.5),ie&&ge({x:0,y:0})},[ie]),Re=Object(n.m)((e,t=!1)=>{be(e),1===e&&t&&De()},[]),Ue=Object(n.m)(()=>{L(),De()},[L]),Ge=Object(n.m)(()=>{Ue(),B({chatId:e,threadId:t,messageId:a})},[Ue,e,t,B,a]),ze=Object(n.m)(()=>{A({fromChatId:e,messageIds:[a]}),De()},[A,e,a]);Object(n.n)(()=>z?Object(b.a)(()=>{ie?De():Ue()}):void 0,[Ue,z,ie]),Object(n.n)(()=>{Q&&!_&&Object(p.b)()},[_,Q]);const qe=Object(n.m)((e,t)=>{let a=Ee.indexOf(e);return(-1===t&&a>0||1===t&&a{Oe||F({chatId:e,threadId:t,messageId:a?qe(a,-1):void 0,origin:m})},[e,t,qe,Oe,a,F,m]),He=Object(n.m)(()=>{fe||F({chatId:e,threadId:t,messageId:a?qe(a,1):void 0,origin:m})},[e,t,qe,fe,a,F,m]);Object(n.n)(()=>{const e=e=>{switch(e.key){case"Left":case"ArrowLeft":$e();break;case"Right":case"ArrowRight":He()}};return document.addEventListener("keydown",e,!1),()=>{document.removeEventListener("keydown",e,!1)}}),Object(n.n)(()=>{const e=document.querySelector(".slide-container > .active, .slide-container > .to");if(!e)return;const t=_&&!o.d;return Object(h.b)(e,{excludedClosestSelector:".backdrop, .navigation, .media-viewer-head, .media-viewer-footer"+(t?"":", .VideoPlayer"),onClick:()=>{ie||Ue()},onSwipe:o.k?(e,t)=>{t===h.a.Right?$e():t===h.a.Left?He():Ue()}:void 0})},[Ue,_,ie,He,$e,re]);const Ve=Object(n.m)((e,t)=>{ge({x:e,y:t})},[]),We=Object(T.a)();function Ye(t){if(u)return n.a.createElement("div",{key:e,className:"media-viewer-content"},ue(ke||ye,Object(i.g)(i.a,!1)));if(S){const e=Object(N.a)(S),c=Boolean(e);return n.a.createElement("div",{key:a,className:"media-viewer-content "+(c?"has-footer":"")},K&&ue(Se||ke||ye||Ce,S&&Object(i.g)(Pe,c)),Q&&n.a.createElement(se,{key:a,url:Se||ke,isGif:_,posterData:Ie,posterSize:S&&Object(i.g)(Me,c,!0),downloadProgress:Ne,fileSize:V.size,isMediaViewerOpen:z,noPlay:!t,onClose:Ue}),e&&n.a.createElement(Z,{text:e,onClick:Ge,isHideable:Q}))}}function Ke(){return n.a.createElement(q,{key:u?u.id:a,chatId:u?u.id:e,messageId:a,isAvatar:Boolean(u)})}return n.a.createElement(D.a,{id:"MediaViewer",className:ie?"zoomed":"",isOpen:z},()=>n.a.createElement(n.a.Fragment,null,n.a.createElement("div",{className:"media-viewer-head"},o.f&&n.a.createElement(R.a,{className:"media-viewer-close",round:!0,size:"smaller",color:"translucent-white",ariaLabel:We("Close"),onClick:Ue},n.a.createElement("i",{className:"icon-close"})),n.a.createElement(x.a,{activeKey:G.current,name:te},Ke),n.a.createElement(Y,{mediaData:ke||ye,isVideo:Q,isZoomed:ie,message:S,fileName:ne,onCloseMediaViewer:Ue,onForward:ze,onZoomToggle:xe,isAvatar:Boolean(u)})),n.a.createElement(de,{noWrap:!re,canPan:ie,panDeltaX:pe.x,panDeltaY:pe.y,zoomLevel:he,onPan:Ve},n.a.createElement(x.a,{className:"slide-container",activeKey:ve,name:ee},Ye)),!Oe&&n.a.createElement("button",{type:"button",className:"navigation prev "+(Q&&!_&&"inline"),"aria-label":We("AccDescrPrevious"),onClick:$e}),!fe&&n.a.createElement("button",{type:"button",className:"navigation next "+(Q&&!_&&"inline"),"aria-label":We("Next"),onClick:He}),n.a.createElement(oe,{isShown:ie,onChangeZoom:Re})))})),be=a(46),pe=a(118),ge=a(16),Ee=a(98),ve=a(39),Oe=a(101),fe=a(94),je=a(96),Ce=a(111);a(245);var ye=Object(n.h)(Object(c.h)(e=>{const{chats:{byId:t,listIds:a,orderedPinnedIds:n},currentUserId:c}=e;return{chatsById:t,listIds:a.active,orderedPinnedIds:n.active,currentUser:c?Object(m.Bb)(e,c):void 0}},(e,t)=>Object(u.l)(t,["setForwardChatId","exitForwardMode","loadMoreChats"]))(({chatsById:e,listIds:t,orderedPinnedIds:a,currentUser:c,isOpen:r,setForwardChatId:s,exitForwardMode:l,loadMoreChats:i})=>{const[m,u]=Object(n.r)(""),h=Object(n.q)(null);Object(n.n)(()=>{r?o.f||setTimeout(()=>{requestAnimationFrame(()=>{h.current&&h.current.focus()})},500):(h.current&&h.current.blur(),setTimeout(()=>{u("")},300))},[r]);const b=Object(n.p)(()=>{const n=t?Object(d.Ab)(e,t,a):void 0;if(!n)return;const r=c?e[c.id]:void 0;return[...r?[r]:[],...n.pinnedChats.filter(({id:e})=>!r||e!==r.id),...n.otherChats.filter(({id:e})=>!r||e!==r.id)]},[e,t,a,c]),p=Object(n.p)(()=>{if(b)return b.filter(e=>!m||Object(be.a)(Object(d.l)(e,c),m)).map(({id:e})=>e)},[b,m,c]),[g,E]=Object(pe.a)(i,p,Boolean(m)),v=Object(n.m)(e=>{u(e.currentTarget.value)},[]),O=Object(T.a)(),f=n.a.createElement("div",{className:"modal-header"},n.a.createElement(R.a,{round:!0,color:"translucent",size:"smaller",ariaLabel:O("Close"),onClick:l},n.a.createElement("i",{className:"icon-close"})),n.a.createElement(ve.a,{ref:h,value:m,onChange:v,placeholder:O("ForwardTo")}));return n.a.createElement(Ee.a,{isOpen:r,onClose:l,className:"ForwardPicker",header:f},g&&g.length?n.a.createElement(Oe.a,{className:"picker-list custom-scroll",items:g,onLoadMore:E,isDisabled:Boolean(m)},g.map(e=>n.a.createElement(fe.a,{key:e,className:"chat-item-clickable force-rounded-corners",onClick:()=>s({id:e})},Object(d.lb)(e)?n.a.createElement(je.a,{userId:e}):n.a.createElement(Ce.a,{chatId:e})))):g&&!g.length?n.a.createElement("p",{className:"no-results"},"Sorry, nothing found."):n.a.createElement(ge.a,null))})),ke=a(157);a(246);function Ne(e){return e.isSlowMode?"Slowmode enabled":"Something went wrong"}var Se=Object(n.h)(Object(c.h)(e=>Object(u.l)(e,["errors"]),(e,t)=>Object(u.l)(t,["dismissError"]))(({errors:e,dismissError:t})=>{const a=Object(T.a)();if(e.length)return n.a.createElement("div",{id:"Errors"},e.map(e=>n.a.createElement(Ee.a,{isOpen:!0,onClose:t,className:"error",title:Ne(e)},n.a.createElement("p",null,Object(ke.a)(e)),n.a.createElement(R.a,{isText:!0,onClick:t},a("OK")))))})),Ie=a(169);var we=Object(n.h)(Object(c.h)(e=>Object(u.l)(e,["notifications"]),(e,t)=>Object(u.l)(t,["dismissNotification"]))(({notifications:e,dismissNotification:t})=>{if(e.length)return n.a.createElement("div",{id:"Notifications"},e.map(({message:e})=>n.a.createElement(Ie.a,{message:Object(G.a)(e,["emoji","br","links"]),onDismiss:t})))}));a(247);const Pe=["M","T","W","T","F","S","S"];function Me(e,t,a,n,c){const r=new Date(e,t,a,0,0,0,0),s=n&&new Date(n.getFullYear(),n.getMonth(),n.getDate(),0,0,0,0),l=c&&new Date(c.getFullYear(),c.getMonth(),c.getDate(),0,0,0,0);return!!(l&&r>l)||!!(s&&r{const h=new Date,b=Object(n.p)(()=>e?new Date(e):new Date,[e]),p=t?new Date(t):void 0,[g,E]=Object(n.r)(b),[v,O]=Object(n.r)(Fe(b.getHours())),[f,j]=Object(n.r)(Fe(b.getMinutes())),C=g.getFullYear(),y=g.getMonth(),k=g.getDate();Object(n.n)(()=>{r&&E(b)},[r,b]);const N=c&&C>=h.getFullYear()&&y>=h.getMonth()||p&&C>=p.getFullYear()&&y>=p.getMonth(),S=a&&C<=h.getFullYear()&&y<=h.getMonth(),I=Object(n.p)(()=>function(e,t){const a=[],n=new Date;n.setFullYear(e),n.setMonth(t),n.setDate(1);const c=n.getDay();for(let e=1;e{const t=e.target.value.replace(/[^\d]+/g,"");if(!t.length)return O(""),void(e.target.value="");const a=Math.max(0,Math.min(Number(t),23)),n=new Date(g.getTime());n.setHours(a),E(n);const c=Fe(a);O(c),e.target.value=c},[g]),P=Object(n.m)(e=>{const t=e.target.value.replace(/[^\d]+/g,"");if(!t.length)return j(""),void(e.target.value="");const a=Math.max(0,Math.min(Number(t),59)),n=new Date(g.getTime());n.setMinutes(a),E(n);const c=Fe(a);j(c),e.target.value=c},[g]);return n.a.createElement(Ee.a,{isOpen:r,onClose:m,className:"CalendarModal"},n.a.createElement("div",{className:"container"},n.a.createElement("div",{className:"month-selector"},n.a.createElement(R.a,{round:!0,size:"smaller",color:"translucent",onClick:m},n.a.createElement("i",{className:"icon-close"})),n.a.createElement("h4",null,Object(U.f)(g,o.f)),n.a.createElement(R.a,{round:!0,size:"smaller",color:"translucent",disabled:S,onClick:S?void 0:function(){E(e=>{const t=new Date(e);return t.setMonth(t.getMonth()-1),t})}},n.a.createElement("i",{className:"icon-previous"})),n.a.createElement(R.a,{round:!0,size:"smaller",color:"translucent",disabled:N,onClick:N?void 0:function(){E(e=>{const t=new Date(e);return t.setMonth(t.getMonth()+1),t})}},n.a.createElement("i",{className:"icon-next"})))),n.a.createElement("div",{className:"calendar-wrapper"},n.a.createElement("div",{className:"calendar-grid"},Pe.map(e=>n.a.createElement("div",{className:"day-button faded weekday"},n.a.createElement("span",null,e))),I.map(e=>n.a.createElement("div",{role:"button",tabIndex:0,onClick:()=>{return t=e,void E(e=>{const a=new Date(e);return a.setDate(t),a});var t},className:Object(le.a)("day-button",Me(C,y,e,a?h:void 0,c?h:p)?"disabled":""+(e?"clickable":""),e===k&&"selected")},!!e&&n.a.createElement("span",null,e))))),s&&n.a.createElement("div",{className:"timepicker"},n.a.createElement("input",{type:"text",className:"form-control",inputMode:"decimal",value:v,onChange:w}),":",n.a.createElement("input",{type:"text",className:"form-control",inputMode:"decimal",value:f,onChange:P})),n.a.createElement("div",{className:"footer"},n.a.createElement(R.a,{onClick:function(){d(g)}},s?function(e){const t=Object(U.c)(e,!0);return`Send ${"Today"===t?t:"on "+t} at ${Object(U.h)(e)}`}(g):l),i&&n.a.createElement(R.a,{onClick:u,isText:!0},i)))});var Ae=Object(n.h)(Object(c.h)((e,{message:t,isSchedule:a})=>{const{threadId:n}=Object(m.x)(e)||{},{canDeleteForAll:c}=n&&Object(m.b)(e,t,n)||{},r=Object(m.f)(e,t.chatId);return{canDeleteForAll:!a&&c,contactFirstName:r&&Object(d.lb)(r.id)?Object(d.Y)(Object(m.Bb)(e,Object(d.T)(r))):void 0,willDeleteForCurrentUserOnly:r&&Object(d.ib)(r)&&!c,willDeleteForAll:r&&Object(d.nb)(r)}},(e,t)=>Object(u.l)(t,["deleteMessages","deleteScheduledMessages"]))(({isOpen:e,isSchedule:t,message:a,album:c,canDeleteForAll:r,contactFirstName:s,willDeleteForCurrentUserOnly:l,willDeleteForAll:o,onClose:i,deleteMessages:m,deleteScheduledMessages:d})=>{const u=Object(n.m)(()=>{const e=c&&c.messages?c.messages.map(({id:e})=>e):[a.id];m({messageIds:e,shouldDeleteForAll:!0}),i()},[m,a.id,i,c]),h=Object(n.m)(()=>{const e=c&&c.messages?c.messages.map(({id:e})=>e):[a.id];t?d({messageIds:e}):m({messageIds:e,shouldDeleteForAll:!1}),i()},[c,a.id,t,i,d,m]),b=Object(T.a)();return n.a.createElement(Ee.a,{isOpen:e,onClose:i,onEnter:e&&!r?h:void 0,className:"delete",title:b("DeleteSingleMessagesTitle")},n.a.createElement("p",null,b("AreYouSureDeleteSingleMessage")),l&&n.a.createElement("p",null,"This will delete it just for you, not for other participants in the chat."),o&&n.a.createElement("p",null,"This will delete it for everyone in this chat."),r&&n.a.createElement(R.a,{color:"danger",className:"confirm-dialog-button",isText:!0,onClick:u},"Delete for ",s?"me and ":"Everyone",s&&Object(G.a)(s)),n.a.createElement(R.a,{color:"danger",className:"confirm-dialog-button",isText:!0,onClick:h},"Delete",r?" just for me":""),n.a.createElement(R.a,{className:"confirm-dialog-button",isText:!0,onClick:i},b("Cancel")))}));var Te=Object(n.h)(Object(c.h)((e,{chatId:t})=>{const a=Object(d.lb)(t),n=Object(m.N)(e,t),c=Object(m.f)(e,t),r=!!c&&Object(d.jb)(c),s=!!c&&Object(d.ib)(c),l=!!c&&Object(d.nb)(c);return{isPrivateChat:a,isChatWithSelf:n,isChannel:r,isGroup:s,isSuperGroup:l,canPinForAll:a&&!n||l||s,contactFirstName:c&&Object(d.lb)(c.id)?Object(d.Y)(Object(m.Bb)(e,Object(d.T)(c))):void 0}},(e,t)=>Object(u.l)(t,["pinMessage"]))(({isOpen:e,messageId:t,chatId:a,isChannel:c,isGroup:r,isSuperGroup:s,canPinForAll:l,contactFirstName:o,onClose:i,pinMessage:m})=>{const d=Object(n.m)(()=>{m({chatId:a,messageId:t,isUnpin:!1}),i()},[m,a,t,i]),u=Object(n.m)(()=>{m({chatId:a,messageId:t,isUnpin:!1,isOneSide:!0,isSilent:!0}),i()},[a,t,i,m]),h=Object(T.a)();return n.a.createElement(Ee.a,{isOpen:e,onClose:i,className:"pin",header:n.a.createElement("div",{className:"modal-header"},n.a.createElement("h3",{className:"modal-title"},h("PinMessageAlertTitle")))},c?n.a.createElement("p",null,h("PinMessageAlertChannel")):r||s?n.a.createElement("p",null,h("PinMessageAlert")):n.a.createElement("p",null,h("PinMessageAlertChat")),n.a.createElement(R.a,{className:"confirm-dialog-button",isText:!0,onClick:u},h("DialogPin")),l&&n.a.createElement(R.a,{className:"confirm-dialog-button",isText:!0,onClick:d},o?"Pin for me and "+o:"Pin and notify all memebers"),n.a.createElement(R.a,{className:"confirm-dialog-button",isText:!0,onClick:i},h("Cancel")))}));var Be=Object(n.h)(Object(c.h)((e,{chatId:t})=>{const a=t?Object(m.eb)(e,t):[];return{pinnedMessagesCount:a?a.length:0}})(({isOpen:e,pinnedMessagesCount:t,onClose:a,onUnpin:c})=>{const r=Object(T.a)();return n.a.createElement(Ee.a,{isOpen:e,onClose:a,className:"unpin-all",header:n.a.createElement("div",{className:"modal-header"},n.a.createElement("h3",{className:"modal-title"},r("UnpinAllMessages")))},n.a.createElement("p",null,"Do you want to unpin all ",t," messages in this chat?"),n.a.createElement(R.a,{className:"confirm-dialog-button",isText:!0,onClick:c},r("DialogUnpin")),n.a.createElement(R.a,{className:"confirm-dialog-button",isText:!0,onClick:a},r("Cancel")))})),De=a(36),xe=a(50);var Re=Object(n.h)(Object(c.h)((e,{isSchedule:t})=>{const{messageIds:a}=e.selectedMessages||{},{canDeleteForAll:n}=Object(m.e)(e),c=Object(m.q)(e);return{selectedMessageIds:a,canDeleteForAll:!t&&n,contactFirstName:c&&Object(d.lb)(c.id)?Object(d.Y)(Object(m.Bb)(e,Object(d.T)(c))):void 0,willDeleteForCurrentUserOnly:c&&Object(d.ib)(c)&&!n,willDeleteForAll:c&&Object(d.nb)(c)}},(e,t)=>Object(u.l)(t,["deleteMessages","deleteScheduledMessages","exitMessageSelectMode"]))(({isOpen:e,isSchedule:t,selectedMessageIds:a,canDeleteForAll:c,contactFirstName:r,willDeleteForCurrentUserOnly:s,willDeleteForAll:l,onClose:o,deleteMessages:i,deleteScheduledMessages:m,exitMessageSelectMode:d})=>{const u=Object(n.m)(()=>{i({messageIds:a,shouldDeleteForAll:!0}),d(),o()},[i,d,a,o]),h=Object(n.m)(()=>{t?m({messageIds:a}):i({messageIds:a,shouldDeleteForAll:!1}),d(),o()},[t,d,o,m,a,i]),b=Object(T.a)();if(a)return n.a.createElement(Ee.a,{isOpen:e,onClose:o,onEnter:c?void 0:h,className:"delete",title:"Delete Messages?"},n.a.createElement("p",null,b("AreYouSureDeleteFewMessages")),s&&n.a.createElement("p",null,"This will delete them just for you, not for other participants in the chat."),l&&n.a.createElement("p",null,"This will delete them for everyone in this chat."),c&&n.a.createElement(R.a,{color:"danger",className:"confirm-dialog-button",isText:!0,onClick:u},"Delete for ",r?"me and ":"Everyone",r&&Object(G.a)(r)),n.a.createElement(R.a,{color:"danger",className:"confirm-dialog-button",isText:!0,onClick:h},"Delete",c?" just for me":""),n.a.createElement(R.a,{className:"confirm-dialog-button",isText:!0,onClick:o},b("Cancel")))}));a(248);var Ue=Object(n.h)(Object(c.h)(e=>{const{type:t}=Object(m.x)(e)||{},{canDelete:a}=Object(m.e)(e);return{isSchedule:"scheduled"===t,selectedMessagesCount:Object(m.nb)(e),canDeleteMessages:a}},(e,t)=>Object(u.l)(t,["exitMessageSelectMode","openForwardMenuForSelectedMessages"]))(({canPost:e,isActive:t,messageListType:a,isSchedule:c,selectedMessagesCount:r,canDeleteMessages:s,exitMessageSelectMode:l,openForwardMenuForSelectedMessages:o})=>{const[i,m,d]=Object(De.a)();Object(n.n)(()=>t&&!i?Object(xe.a)({onBackspace:m,onDelete:m,onEsc:l}):void 0,[t,i,m,l]);const u=Object(y.a)(r||void 0,!0),h=t?r:u,b=Object(T.a)(),p=b("VoiceOver.Chat.MessagesSelected",h),g=Object(le.a)("MessageSelectToolbar",e&&"with-composer",t&&"shown");return n.a.createElement("div",{className:g},n.a.createElement("div",{className:"MessageSelectToolbar-inner"},n.a.createElement(R.a,{color:"translucent",round:!0,onClick:l,ariaLabel:"Exit select mode"},n.a.createElement("i",{className:"icon-close"})),n.a.createElement("span",{className:"MessageSelectToolbar-count",title:p},p),!!r&&n.a.createElement("div",{className:"MessageSelectToolbar-actions"},"scheduled"!==a&&n.a.createElement(V.a,{icon:"forward",ariaLabel:"Forward Messages",onClick:o},n.a.createElement("span",{className:"item-text"},b("Forward"))),n.a.createElement(V.a,{destructive:!0,icon:"delete",onClick:m,disabled:!s,ariaLabel:b("EditAdminGroupDeleteMessages")},n.a.createElement("span",{className:"item-text"},b("Delete"))))),n.a.createElement(Re,{isOpen:i,isSchedule:c,onClose:d}))})),Ge=a(156),ze=a(44),qe=a(159),$e=a(147);var He=Object(n.h)(Object(c.h)((e,{chatId:t})=>{const a=Object(m.f)(e,t),n=a&&Object(d.T)(a);return{chat:a,privateChatUser:n?Object(m.Bb)(e,n):void 0,isPinned:Object(m.L)(e,t)}})(({chatId:e,chat:t,privateChatUser:a,isPinned:c,withHandle:r,onClick:s})=>{const[l,o,i]=Object(De.a)(),m=Object(qe.a)({chat:t,privateChatUser:a,isPinned:c,handleDelete:o});if(t)return n.a.createElement(fe.a,{className:"chat-item-clickable search-result",onClick:()=>s(e),contextActions:m},Object(d.lb)(e)?n.a.createElement(je.a,{userId:e,withHandle:r,avatarSize:"large"}):n.a.createElement(Ce.a,{chatId:e,withHandle:r,avatarSize:"large"}),n.a.createElement($e.a,{isOpen:l,onClose:i,chat:t}))})),Ve=a(128);a(249);const We=Object(K.g)(e=>e(),6e4,!0);var Ye=Object(n.h)(Object(c.h)(e=>{const{userIds:t}=e.topPeers,a=e.users.byId,{recentlyFoundChatIds:n}=e.globalSearch;return{topUserIds:t,usersById:a,recentlyFoundChatIds:n}},(e,t)=>Object(u.l)(t,["loadTopUsers","loadContactList","openChat","addRecentlyFoundChatId","clearRecentlyFoundChats"]))(({topUserIds:e,usersById:t,recentlyFoundChatIds:a,onReset:c,loadTopUsers:r,loadContactList:s,openChat:l,addRecentlyFoundChatId:o,clearRecentlyFoundChats:i})=>{const m=Object(n.q)(null);Object(n.n)(()=>{We(()=>{r(),s()})},[r,s]),Object(Ve.a)(m,!e);const u=Object(n.m)(e=>{l({id:e}),c(),setTimeout(()=>{o({id:e})},250)},[l,o,c]),h=Object(T.a)();return n.a.createElement("div",{className:"RecentContacts custom-scroll"},e&&n.a.createElement("div",{className:"top-peers-section"},n.a.createElement("div",{ref:m,className:"top-peers no-selection"},e.map(e=>n.a.createElement("div",{className:"top-peer-item",onClick:()=>u(e)},n.a.createElement(z.a,{user:t[e]}),n.a.createElement("div",{className:"top-peer-name"},Object(G.a)(Object(d.Y)(t[e]))))))),a&&n.a.createElement("div",{className:"search-section pt-1"},n.a.createElement("h3",{className:"section-heading mt-0 recent-chats-header"},h("Recent"),n.a.createElement(R.a,{round:!0,size:"smaller",color:"translucent",ariaLabel:"Clear recent chats",onClick:i},n.a.createElement("i",{className:"icon-close"}))),a.map(e=>n.a.createElement(He,{chatId:e,onClick:u}))))})),Ke=a(130),Ze=a(110);a(250);var Qe=Object(n.h)(Object(c.h)((e,{chatId:t})=>{const a=Object(m.f)(e,t);if(!a)return{};const n=Object(d.T)(a);return{chat:a,...n&&{privateChatUser:Object(m.Bb)(e,n)},lastSyncTime:e.lastSyncTime}},(e,t)=>Object(u.l)(t,["focusMessage"]))(({message:e,searchQuery:t,chatId:a,chat:c,privateChatUser:r,focusMessage:s,lastSyncTime:l})=>{const i=Object(d.E)(e),m=Object(E.a)(Object(d.D)(e,"micro")),u=Object(n.m)(()=>{s({chatId:a,messageId:e.id})},[a,s,e.id]);if(Object(T.a)(),c)return n.a.createElement(fe.a,{className:"ChatMessage chat-item-clickable",ripple:!o.f,onClick:u},n.a.createElement(z.a,{chat:c,user:r,withOnlineStatus:!0,isSavedMessages:r&&r.isSelf,lastSyncTime:l}),n.a.createElement("div",{className:"info"},n.a.createElement("div",{className:"info-row"},n.a.createElement("div",{className:"title"},n.a.createElement("h3",null,Object(G.a)(Object(d.l)(c,r))),c.isVerified&&n.a.createElement(Ke.a,null)),n.a.createElement("div",{className:"message-date"},n.a.createElement(Ze.a,{className:"date"},Object(U.g)(1e3*e.date)))),n.a.createElement("div",{className:"subtitle"},n.a.createElement("div",{className:"message"},function(e,t,a){if(!t)return Object(G.a)(Object(d.M)(e));return n.a.createElement("span",{className:"media-preview"},n.a.createElement("img",{src:t,alt:""}),Object(d.O)(e)&&n.a.createElement("i",{className:"icon-play"}),Object(G.a)(Object(d.M)(e,!0),["emoji","highlight"],{highlight:a}))}(e,m||i,t)))))}));a(251);var _e=Object(n.h)(({searchDate:e,onSelect:t})=>{const a=Object(n.p)(()=>function(e){if(e.match(/^\d{2,4}-\d{2}-\d{2}$/g)){const t=new Date(e);return[{date:t,text:Object(U.a)(t)}]}const t=[],a=new Date,n=a.getFullYear(),c=a.getTime()>new Date(`${n}-${e}`).getTime()?n:n-1;for(let a=0;a<8;a++){const n=new Date(`${c-a}-${e}`);t.push({date:n,text:Object(U.a)(n)})}return t}(e),[e]);return n.a.createElement("section",{className:"DateSuggest custom-scroll custom-scroll-x"},a.map(({date:e,text:a})=>n.a.createElement("div",{onClick:()=>t(e),className:"date-item",key:a},n.a.createElement("i",{className:"icon-calendar"}),n.a.createElement("span",null,a))))}),Xe=a(108),Je=a(126),et=a(10);const tt=(e,t)=>Number(t.isVerified)-Number(e.isVerified),at=Object(K.g)(e=>e(),500,!0);var nt=Object(n.h)(Object(c.h)(e=>{const{byId:t}=e.chats,{byId:a}=e.users,{userIds:n}=e.contactList||{};if(!n)return{chatsById:t,usersById:a};const{currentUserId:c,messages:r,lastSyncTime:s}=e,{fetchingStatus:l,globalResults:o,localResults:i,resultsByType:m}=e.globalSearch,{chats:d,users:u}=o||{},{chats:h,users:b}=i||{},{byChatId:p}=r,{foundIds:g}=m&&m.text||{};return{currentUserId:c,localContactIds:n,localChats:h,localUsers:b,globalChats:d,globalUsers:u,foundIds:g,globalMessagesByChatId:p,chatsById:t,usersById:a,fetchingStatus:l,lastSyncTime:s}},(e,t)=>Object(u.l)(t,["openChat","addRecentlyFoundChatId","searchMessagesGlobal","setGlobalSearchChatId"]))(({searchQuery:e,searchDate:t,dateSearchQuery:a,currentUserId:c,localContactIds:r,localChats:l,localUsers:i,globalChats:m,globalUsers:h,foundIds:b,globalMessagesByChatId:p,chatsById:g,usersById:E,fetchingStatus:v,lastSyncTime:O,onReset:f,onSearchDateSelect:j,openChat:C,addRecentlyFoundChatId:y,searchMessagesGlobal:k,setGlobalSearchChatId:N})=>{const[S,I]=Object(n.r)(!1),[w,P]=Object(n.r)(!1),M=Object(n.m)(({direction:t})=>{O&&t===s.e.Backwards&&at(()=>{k({type:"text",query:e})})},[O,k,e]),F=Object(n.m)(e=>{C({id:e}),e!==c&&y({id:e}),o.f||f()},[c,C,y,f]),L=Object(n.m)(e=>{N({id:e})},[N]),A=Object(n.p)(()=>{if(!e||e.startsWith("@")&&e.length<2)return ze.a;const t=r?r.filter(t=>{const a=E[t];if(!a)return!1;const n=Object(d.Z)(a);return n&&Object(be.a)(n,e)||Object(be.a)(a.username,e)}).map(e=>E[e]):[];return Object(u.o)([...Object(be.a)(Object(et.b)("SavedMessages"),e)?[c]:[],...[...t,...l||[],...i||[]].sort(tt).map(e=>e.id)])},[e,r,l,i,E,c]),B=Object(n.p)(()=>!e||e.length<4||!m||!h?ze.a:Object(u.o)([...m,...h].sort(tt).map(e=>e.id)),[m,h,e]),D=Object(n.p)(()=>(e||t)&&b&&0!==b.length?b.map(e=>{const[t,a]=e.split("_").map(Number);return p&&p[t]&&p[t].byId[a]}).filter(Boolean).sort((e,t)=>t.date-e.date):ze.a,[b,p,e,t]),x=Object(n.m)(()=>{I(!S)},[S]),R=Object(n.m)(()=>{P(!w)},[w]),U=Object(T.a)();const G=v&&!v.chats&&!v.messages&&!A.length&&!B.length&&!D.length;return e||t?n.a.createElement(Oe.a,{className:"LeftSearch custom-scroll",items:D,onLoadMore:M,noFastList:!0},a&&n.a.createElement("div",{className:"chat-selection no-selection no-scrollbar"},n.a.createElement(_e,{searchDate:a,onSelect:j})),G&&n.a.createElement(Xe.a,null),!!A.length&&n.a.createElement("div",{className:"chat-selection no-selection no-scrollbar"},A.map(e=>n.a.createElement(Je.a,{chatOrUserId:e,onClick:L,clickArg:e}))),!!A.length&&n.a.createElement("div",{className:"search-section"},n.a.createElement("h3",{className:"section-heading"},A.length>3&&n.a.createElement(Ze.a,{onClick:x},S?"Show less":"Show more"),"Contacts and Chats"),A.map((e,t)=>{if(S||!(t>=3))return n.a.createElement(He,{chatId:e,onClick:F})})),!!B.length&&n.a.createElement("div",{className:"search-section"},n.a.createElement("h3",{className:"section-heading"},B.length>3&&n.a.createElement(Ze.a,{onClick:R},w?"Show less":"Show more"),"Global Search"),B.map((e,t)=>{if(w||!(t>=3))return n.a.createElement(He,{chatId:e,withHandle:!0,onClick:F})})),!!D.length&&n.a.createElement("div",{className:"search-section"},n.a.createElement("h3",{className:"section-heading"},U("SearchMessages")),D.map((function(t){const a=Object(d.M)(t),c=g[t.chatId];if(a&&c)return n.a.createElement(Qe,{chatId:t.chatId,message:t,searchQuery:e})})))):n.a.createElement(Ye,{onReset:f})}));const ct=Object(K.g)(e=>e(),500,!0);var rt=Object(n.h)(Object(c.h)(e=>{const{byId:t}=e.chats,{currentUserId:a,messages:{byChatId:n},lastSyncTime:c}=e,{fetchingStatus:r,resultsByType:s}=e.globalSearch,{foundIds:l}=s&&s.text||{};return{currentUserId:a,foundIds:l,globalMessagesByChatId:n,chatsById:t,fetchingStatus:r,lastSyncTime:c}},(e,t)=>Object(u.l)(t,["searchMessagesGlobal"]))(({searchQuery:e,currentUserId:t,dateSearchQuery:a,foundIds:c,globalMessagesByChatId:r,chatsById:l,fetchingStatus:o,lastSyncTime:i,searchMessagesGlobal:m,onSearchDateSelect:u})=>{const h=Object(n.m)(({direction:a})=>{i&&a===s.e.Backwards&&ct(()=>{m({type:"text",query:e,chatId:t})})},[t,i,m,e]),b=Object(n.p)(()=>c&&0!==c.length?c.map(e=>{const[t,a]=e.split("_").map(Number);return r&&r[t]&&r[t].byId[a]}).filter(Boolean).sort((e,t)=>t.date-e.date):ze.a,[c,r]);const p=o&&!o.chats&&!o.messages&&!b.length;return n.a.createElement("div",{className:"LeftSearch"},n.a.createElement(Oe.a,{className:"search-content custom-scroll chat-list",items:b,onLoadMore:h,noFastList:!0},a&&n.a.createElement("div",{className:"chat-selection no-selection no-scrollbar"},n.a.createElement(_e,{searchDate:a,onSelect:u})),p&&n.a.createElement(Xe.a,null),!!b.length&&b.map((function(t){const a=Object(d.M)(t),c=l[t.chatId];if(a&&c)return n.a.createElement(Qe,{chatId:t.chatId,message:t,searchQuery:e})}))))}));function st(e){return(t,a)=>{const{byId:n}=t.chats,{byId:c}=t.users,{fetchingStatus:r,resultsByType:s,chatId:l}=t.globalSearch,o="audio"!==e?e:a&&a.isVoice?"voice":"audio",{byChatId:i}=t.messages,{foundIds:m}=s&&s[o]||{};return{isLoading:void 0===m||!!r&&Boolean(r.chats||r.messages),chatsById:n,usersById:c,globalMessagesByChatId:i,foundIds:m,searchChatId:l,lastSyncTime:t.lastSyncTime}}}var lt=a(153),ot=a(109);const it=Object(K.g)(e=>e(),500,!0);var mt=Object(n.h)(Object(c.h)(st("media"),(e,t)=>Object(u.l)(t,["searchMessagesGlobal","openMediaViewer"]))(({searchQuery:e,searchChatId:t,isLoading:a,globalMessagesByChatId:c,foundIds:r,lastSyncTime:o,searchMessagesGlobal:i,openMediaViewer:m})=>{const d=Object(n.m)(({direction:a})=>{o&&a===s.e.Backwards&&it(()=>{i({type:"media",query:e,chatId:t})})},[o,i,e,t]),u=Object(n.p)(()=>r&&c?r.map(e=>{const[t,a]=e.split("_").map(Number);return c[t]&&c[t].byId[a]}).filter(Boolean):ze.a,[c,r]),h=Object(n.m)((e,t)=>{m({chatId:t,messageId:e,origin:s.h.SearchResult})},[m]);const b=Object(ot.a)([e],l.db)&&!a,p=b&&r&&r.length>0&&!e,g=b&&r&&r.length>0&&e,E=Object(le.a)("search-content custom-scroll",g&&"chat-list");return n.a.createElement("div",{className:"LeftSearch"},n.a.createElement(Oe.a,{className:E,items:u,itemSelector:e?".ListItem":".Media",onLoadMore:d,noFastList:!0},!b&&n.a.createElement(ge.a,null),b&&(!r||0===r.length)&&n.a.createElement(Xe.a,null),p&&n.a.createElement("div",{className:"media-list"},u.map(e=>n.a.createElement(lt.a,{key:e.id,idPrefix:"search-media",message:e,onClick:h}))),g&&u.map(e=>n.a.createElement(Qe,{key:e.id,chatId:e.chatId,message:e}))))}));function dt(e,t,a){const{senderId:n}=e;if(!n)return;const c=Object(d.lb)(n)?a[n]:t[n];let r=Object(d.U)(c);const s=t[e.chatId];return s&&(Object(d.lb)(n)&&c.isSelf?r="You → "+Object(d.l)(s):Object(d.kb)(s)&&(r+=" → "+Object(d.l)(s))),r}var ut=a(172);const ht=Object(K.g)(e=>e(),500,!0);var bt=Object(n.h)(Object(c.h)(st("links"),(e,t)=>Object(u.l)(t,["searchMessagesGlobal","focusMessage"]))(({searchQuery:e,searchChatId:t,isLoading:a,chatsById:c,usersById:r,globalMessagesByChatId:o,foundIds:i,lastSyncTime:m,searchMessagesGlobal:d,focusMessage:u})=>{const h=Object(n.m)(({direction:a})=>{m&&a===s.e.Backwards&&ht(()=>{d({type:"links",query:e,chatId:t})})},[m,d,e,t]),b=Object(n.p)(()=>i&&o?i.map(e=>{const[t,a]=e.split("_").map(Number);return o[t]&&o[t].byId[a]}).filter(Boolean):ze.a,[o,i]),p=Object(n.m)((e,t)=>{u({chatId:t,messageId:e})},[u]);const g=Object(ot.a)([e],l.db)&&!a;return n.a.createElement("div",{className:"LeftSearch"},n.a.createElement(Oe.a,{className:"search-content documents-list custom-scroll",items:b,onLoadMore:h,noFastList:!0},!g&&n.a.createElement(ge.a,null),g&&(!i||0===i.length)&&n.a.createElement(Xe.a,null),g&&i&&i.length>0&&b.map((e,t)=>{const a=0===t||Object(U.n)(e.date)!==Object(U.n)(b[t-1].date);return n.a.createElement("div",{className:"ListItem",key:e.id},a&&n.a.createElement("p",{className:"section-heading"},Object(U.f)(new Date(1e3*e.date))),n.a.createElement(ut.a,{key:e.id,message:e,senderTitle:dt(e,c,r),onMessageClick:p}))})))})),pt=a(150);const gt=Object(K.g)(e=>e(),500,!0);var Et=Object(n.h)(Object(c.h)(st("documents"),(e,t)=>Object(u.l)(t,["searchMessagesGlobal","focusMessage"]))(({searchQuery:e,searchChatId:t,isLoading:a,chatsById:c,usersById:r,globalMessagesByChatId:o,foundIds:i,lastSyncTime:m,searchMessagesGlobal:u,focusMessage:h})=>{const b=Object(n.m)(({direction:a})=>{m&&a===s.e.Backwards&>(()=>{u({type:"documents",query:e,chatId:t})})},[m,u,e,t]),p=Object(n.p)(()=>i&&o?i.map(e=>{const[t,a]=e.split("_").map(Number),n=o[t]&&o[t].byId[a];return n&&Object(d.y)(n)?n:void 0}).filter(Boolean):ze.a,[o,i]),g=Object(n.m)((e,t)=>{h({chatId:t,messageId:e})},[h]);const E=Object(ot.a)([e],l.db)&&!a;return n.a.createElement("div",{className:"LeftSearch"},n.a.createElement(Oe.a,{className:"search-content documents-list custom-scroll",items:p,onLoadMore:b,noFastList:!0},!E&&n.a.createElement(ge.a,null),E&&(!i||0===i.length)&&n.a.createElement(Xe.a,null),E&&i&&i.length>0&&p.map((e,t)=>{const a=0===t||Object(U.n)(e.date)!==Object(U.n)(p[t-1].date);return n.a.createElement("div",{className:"ListItem",key:e.id},a&&n.a.createElement("p",{className:"section-heading"},Object(U.f)(new Date(1e3*e.date))),n.a.createElement(pt.a,{message:e,withDate:!0,datetime:e.date,smaller:!0,sender:dt(e,c,r),className:"scroll-item",onDateClick:g}))})))})),vt=a(155);const Ot=Object(K.g)(e=>e(),500,!0);var ft=Object(n.h)(Object(c.h)(st("audio"),(e,t)=>Object(u.l)(t,["searchMessagesGlobal","focusMessage","openAudioPlayer"]))(({isVoice:e,searchQuery:t,searchChatId:a,isLoading:c,chatsById:r,usersById:o,globalMessagesByChatId:i,foundIds:m,lastSyncTime:d,searchMessagesGlobal:u,focusMessage:h,openAudioPlayer:b})=>{const p=e?"voice":"audio",g=Object(n.m)(({direction:e})=>{d&&e===s.e.Backwards&&Ot(()=>{u({type:p,query:t,chatId:a})})},[p,d,u,t,a]),E=Object(n.p)(()=>m&&i?m.map(e=>{const[t,a]=e.split("_").map(Number);return i[t]&&i[t].byId[a]}).filter(Boolean):ze.a,[i,m]),v=Object(n.m)((e,t)=>{h({chatId:t,messageId:e})},[h]),O=Object(n.m)((e,t)=>{b({chatId:t,messageId:e})},[b]);const f=Object(ot.a)([t],l.db)&&!c;return n.a.createElement("div",{className:"LeftSearch"},n.a.createElement(Oe.a,{className:"search-content documents-list custom-scroll",items:E,onLoadMore:g,noFastList:!0},!f&&n.a.createElement(ge.a,null),f&&(!m||0===m.length)&&n.a.createElement(Xe.a,null),f&&m&&m.length>0&&E.map((e,t)=>{const a=0===t||Object(U.n)(e.date)!==Object(U.n)(E[t-1].date);return n.a.createElement("div",{className:"ListItem",key:e.id},a&&n.a.createElement("p",{className:"section-heading"},Object(U.f)(new Date(1e3*e.date))),n.a.createElement(vt.a,{key:e.id,message:e,renderingFor:"searchResult",senderTitle:dt(e,r,o),date:e.date,lastSyncTime:d,className:"scroll-item",onPlay:O,onDateClick:v}))})))}));a(252);const jt=[{type:s.c.ChatList,title:"SearchAllChatsShort"},{type:s.c.Media,title:"SharedMediaTab2"},{type:s.c.Links,title:"SharedLinksTab2"},{type:s.c.Files,title:"SharedFilesTab2"},{type:s.c.Music,title:"SharedMusicTab2"},{type:s.c.Voice,title:"SharedVoiceTab2"}],Ct=[{type:s.c.ChatList,title:"All Messages"},...jt.slice(1)],yt=Object.keys(s.c).length/2;var kt=Object(n.h)(Object(c.h)(e=>{const{currentContent:t,chatId:a}=e.globalSearch;return{currentContent:t,chatId:a}},(e,t)=>Object(u.l)(t,["setGlobalSearchContent","setGlobalSearchDate"]))(({searchQuery:e,searchDate:t,currentContent:a=s.c.ChatList,chatId:c,setGlobalSearchContent:r,setGlobalSearchDate:l,onReset:o})=>{const[i,m]=Object(n.r)(0),d=Object(n.p)(()=>Object(U.l)(e),[e]),u=Object(n.m)(e=>{const t=jt[e];r({content:t.type}),m(e)},[r]),h=Object(n.m)(e=>{l({date:e.getTime()/1e3})},[l]);return n.a.createElement("div",{className:"LeftSearch"},n.a.createElement(Ge.a,{activeTab:i,tabs:c?Ct:jt,onSwitchTab:u}),n.a.createElement(x.a,{name:"slide",renderCount:yt,activeKey:a},()=>{switch(a){case s.c.ChatList:return c?n.a.createElement(rt,{searchQuery:e,dateSearchQuery:d,onReset:o,onSearchDateSelect:h}):n.a.createElement(nt,{searchQuery:e,searchDate:t,dateSearchQuery:d,onReset:o,onSearchDateSelect:h});case s.c.Media:return n.a.createElement(mt,{searchQuery:e});case s.c.Links:return n.a.createElement(bt,{searchQuery:e});case s.c.Files:return n.a.createElement(Et,{searchQuery:e});case s.c.Music:return n.a.createElement(ft,{key:"audio",searchQuery:e});case s.c.Voice:return n.a.createElement(ft,{key:"voice",isVoice:!0,searchQuery:e});default:return}}))}));function Nt(e,t){const a=Object(n.q)(e),[c,r]=Object(n.r)(t);return[c,Object(n.m)(e=>{r(t=>a.current(t,e))},[])]}const St=[{icon:"user",title:"FilterContacts",key:"contacts"},{icon:"non-contacts",title:"FilterNonContacts",key:"nonContacts"},{icon:"group",title:"FilterGroups",key:"groups"},{icon:"channel",title:"FilterChannels",key:"channels"},{icon:"bots",title:"FilterBots",key:"bots"}],It=[{icon:"mute",title:"FilterMuted",key:"excludeMuted"},{icon:"archive",title:"FilterArchived",key:"excludeArchived"},{icon:"readchats",title:"FilterRead",key:"excludeRead"}],wt=["includedChatIds","bots","channels","groups","contacts","nonContacts"],Pt=["excludedChatIds","excludeArchived","excludeMuted","excludeRead"];function Mt(e,t,a){let n=[],c=[];if("included"===t){const{includedChatIds:t,...r}=a?e.includeFilters||{}:Object(u.l)(e.folder,wt);n=t||[],c=Object.keys(r).filter(e=>Boolean(r[e]))}else{const{excludedChatIds:t,...r}=a?e.excludeFilters||{}:Object(u.l)(e.folder,Pt);n=t||[],c=Object.keys(r).filter(e=>Boolean(r[e]))}return{selectedChatIds:n,selectedChatTypes:c}}function Ft(e){if(e){const{includedChatIds:t,...a}=e;if(Object.values(a).filter(Boolean).length>1||t&&t.length)return"";if(a.bots)return"Bots";if(a.groups)return"Groups";if(a.channels)return"Channels";if(a.contacts)return"Contacts";if(a.nonContacts)return"Non-Contacts"}return""}const Lt={mode:"create",chatFilter:"",folder:{title:"",includedChatIds:[],excludedChatIds:[]}},At=(e,t)=>{switch(t.type){case"setTitle":return{...e,folder:{...e.folder,title:t.payload},isTouched:!0};case"editIncludeFilters":return{...e,includeFilters:Object(u.l)(e.folder,wt)};case"editExcludeFilters":return{...e,excludeFilters:Object(u.l)(e.folder,Pt)};case"setIncludeFilters":return{...e,includeFilters:t.payload,chatFilter:""};case"setExcludeFilters":return{...e,excludeFilters:t.payload,chatFilter:""};case"saveFilters":return e.includeFilters?{...e,folder:{...Object(u.j)(e.folder,wt),title:e.folder.title?e.folder.title:Ft(e.includeFilters),...e.includeFilters},includeFilters:void 0,chatFilter:"",isTouched:!0}:e.excludeFilters?{...e,folder:{...Object(u.j)(e.folder,Pt),...e.excludeFilters},excludeFilters:void 0,chatFilter:"",isTouched:!0}:e;case"editFolder":{const{id:e,description:a,...n}=t.payload;return{mode:"edit",folderId:e,folder:n,chatFilter:""}}case"setChatFilter":return{...e,chatFilter:t.payload};case"setIsLoading":return{...e,isLoading:t.payload};case"setError":return{...e,error:t.payload};case"reset":return Lt;default:return e}};const Tt={currentPassword:"",password:"",hint:"",email:""},Bt=(e,t)=>{switch(t.type){case"setCurrentPassword":return{...e,currentPassword:t.payload};case"setPassword":return{...e,password:t.payload};case"setHint":return{...e,hint:t.payload};case"setEmail":return{...e,email:t.payload};case"reset":return Tt;default:return e}};var Dt=a(107);var xt=Object(n.h)(Object(c.h)(void 0,(e,t)=>Object(u.l)(t,["signOut","deleteChatFolder"]))(({currentScreen:e,editedFolderId:t,onReset:a,onSaveFilter:c,signOut:r,deleteChatFolder:l})=>{const[i,m]=Object(n.r)(!1),[d,u]=Object(n.r)(!1),h=Object(n.m)(()=>{m(!0)},[]),b=Object(n.m)(()=>{m(!1)},[]),p=Object(n.m)(()=>{u(!0)},[]),g=Object(n.m)(()=>{u(!1)},[]),E=Object(n.m)(()=>{b(),r()},[b,r]),v=Object(n.m)(()=>{g(),l({id:t}),a()},[t,g,l,a]),O=Object(n.p)(()=>({onTrigger:e,isOpen:t})=>n.a.createElement(R.a,{round:!0,ripple:!o.f,size:"smaller",color:"translucent",className:t?"active":"",onClick:e,ariaLabel:"More actions"},n.a.createElement("i",{className:"icon-more"})),[]),f=Object(T.a)();return n.a.createElement("div",{className:"left-header"},n.a.createElement(R.a,{round:!0,size:"smaller",color:"translucent",onClick:a,ariaLabel:f("AccDescrGoBack")},n.a.createElement("i",{className:"icon-arrow-left"})),function(){switch(e){case s.m.EditProfile:return n.a.createElement("h3",null,f("EditProfile"));case s.m.General:return n.a.createElement("h3",null,f("General"));case s.m.Notifications:return n.a.createElement("h3",null,f("Notifications"));case s.m.Privacy:return n.a.createElement("h3",null,f("PrivacySettings"));case s.m.Language:return n.a.createElement("h3",null,f("Language"));case s.m.GeneralChatBackground:return n.a.createElement("h3",null,f("ChatBackground"));case s.m.GeneralChatBackgroundColor:return n.a.createElement("h3",null,f("SetColor"));case s.m.PrivacyPhoneNumber:return n.a.createElement("h3",null,f("PrivacyPhone"));case s.m.PrivacyLastSeen:return n.a.createElement("h3",null,f("PrivacyLastSeen"));case s.m.PrivacyProfilePhoto:return n.a.createElement("h3",null,f("Privacy.ProfilePhoto"));case s.m.PrivacyForwarding:return n.a.createElement("h3",null,f("PrivacyForwards"));case s.m.PrivacyGroupChats:return n.a.createElement("h3",null,f("AutodownloadGroupChats"));case s.m.PrivacyPhoneNumberAllowedContacts:case s.m.PrivacyLastSeenAllowedContacts:case s.m.PrivacyProfilePhotoAllowedContacts:case s.m.PrivacyForwardingAllowedContacts:case s.m.PrivacyGroupChatsAllowedContacts:return n.a.createElement("h3",null,f("AlwaysShareWith"));case s.m.PrivacyPhoneNumberDeniedContacts:case s.m.PrivacyLastSeenDeniedContacts:case s.m.PrivacyProfilePhotoDeniedContacts:case s.m.PrivacyForwardingDeniedContacts:case s.m.PrivacyGroupChatsDeniedContacts:return n.a.createElement("h3",null,f("NeverShareWith"));case s.m.PrivacyActiveSessions:return n.a.createElement("h3",null,f("SessionsTitle"));case s.m.PrivacyBlockedUsers:return n.a.createElement("h3",null,f("BlockedUsers"));case s.m.TwoFaDisabled:case s.m.TwoFaEnabled:return n.a.createElement("h3",null,f("TwoStepVerification"));case s.m.TwoFaNewPassword:case s.m.TwoFaChangePasswordNew:case s.m.TwoFaChangePasswordConfirm:return n.a.createElement("h3",null,f("EnterPassword"));case s.m.TwoFaNewPasswordConfirm:return n.a.createElement("h3",null,f("PleaseReEnterPassword"));case s.m.TwoFaNewPasswordHint:case s.m.TwoFaChangePasswordHint:return n.a.createElement("h3",null,f("PasswordHint"));case s.m.TwoFaNewPasswordEmail:case s.m.TwoFaRecoveryEmail:return n.a.createElement("h3",null,f("RecoveryEmailTitle"));case s.m.TwoFaNewPasswordEmailCode:case s.m.TwoFaRecoveryEmailCode:return n.a.createElement("h3",null,"Recovery Email Code");case s.m.TwoFaCongratulations:return n.a.createElement("h3",null,f("TwoStepVerificationPasswordSet"));case s.m.TwoFaChangePasswordCurrent:case s.m.TwoFaTurnOff:case s.m.TwoFaRecoveryEmailCurrentPassword:return n.a.createElement("h3",null,f("PleaseEnterCurrentPassword"));case s.m.Folders:return n.a.createElement("h3",null,f("Filters"));case s.m.FoldersCreateFolder:return n.a.createElement("h3",null,f("FilterNew"));case s.m.FoldersEditFolder:return n.a.createElement("div",{className:"settings-main-header"},n.a.createElement("h3",null,f("FilterEdit")),t&&n.a.createElement(H.a,{className:"settings-more-menu",trigger:O,positionX:"right"},n.a.createElement(V.a,{icon:"delete",destructive:!0,onClick:p},"Delete Folder")));case s.m.FoldersIncludedChats:case s.m.FoldersExcludedChats:return n.a.createElement("div",{className:"settings-main-header"},e===s.m.FoldersIncludedChats?n.a.createElement("h3",null,f("FilterInclude")):n.a.createElement("h3",null,f("FilterExclude")),n.a.createElement(R.a,{round:!0,size:"smaller",color:"translucent",className:"color-primary",onClick:c,ariaLabel:f("AutoDeleteConfirm")},n.a.createElement("i",{className:"icon-check"})));default:return n.a.createElement("div",{className:"settings-main-header"},n.a.createElement("h3",null,f("SETTINGS")),n.a.createElement(H.a,{className:"settings-more-menu",trigger:O,positionX:"right"},n.a.createElement(V.a,{icon:"logout",onClick:h},f("LogOutTitle"))))}}(),n.a.createElement(Dt.a,{isOpen:i,onClose:b,text:"Are you sure you want to log out?",confirmLabel:"Log Out",confirmHandler:E,confirmIsDestructive:!0}),n.a.createElement(Dt.a,{isOpen:d,onClose:g,text:"Are you sure you want to delete this folder?",confirmLabel:"Delete",confirmHandler:v,confirmIsDestructive:!0}))})),Rt=a(19);var Ut=Object(n.h)(Object(c.h)(e=>{const{currentUserId:t}=e;return{currentUser:t?Object(m.Bb)(e,t):void 0}})(({onScreenSelect:e,currentUser:t})=>{const a=Object(T.a)();return n.a.createElement("div",{className:"settings-content custom-scroll"},n.a.createElement("div",{className:"settings-main-menu"},t&&n.a.createElement("div",{className:"settings-current-user"},n.a.createElement(z.a,{user:t,size:"jumbo"}),n.a.createElement("p",{className:"name"},Object(d.Z)(t)),n.a.createElement("p",{className:"phone"},Object(Rt.c)(t.phoneNumber))),n.a.createElement(fe.a,{icon:"edit",onClick:()=>e(s.m.EditProfile)},a("EditProfile")),n.a.createElement(fe.a,{icon:"folder",onClick:()=>e(s.m.Folders)},a("Filters")),n.a.createElement(fe.a,{icon:"settings",onClick:()=>e(s.m.General)},a("GeneralSettings")),n.a.createElement(fe.a,{icon:"unmute",onClick:()=>e(s.m.Notifications)},a("Notifications")),n.a.createElement(fe.a,{icon:"lock",onClick:()=>e(s.m.Privacy)},a("PrivacySettings")),n.a.createElement(fe.a,{icon:"language",onClick:()=>e(s.m.Language)},a("Language"))))})),Gt=a(120);a(253);var zt=({isShown:e,className:t,color:a="primary",ariaLabel:c,disabled:r,onClick:s,children:l})=>{const o=Object(le.a)("FloatingActionButton",e&&"revealed",t);return n.a.createElement(R.a,{className:o,color:a,round:!0,disabled:r,onClick:e&&!r?s:void 0,ariaLabel:c,tabIndex:-1},l)};const qt=/https:\/\/t\.me\/?/i,$t=/^([a-zA-Z0-9_]+)$/,Ht=Object(K.a)(e=>e(),250,!1);var Vt=Object(n.h)(({currentUsername:e,asLink:t,isLoading:a,isUsernameAvailable:c,checkUsername:r,onChange:s})=>{const[l,o]=Object(n.r)(e||""),i=Object(T.a)(),m=t?"SetUrl":"Username",d=i(t?"SetUrlPlaceholder":"Username"),[u,h]=Object(n.p)(()=>l.length?l.length<5?[void 0,d+" is too short"]:l.length>32?[void 0,d+" is too long"]:$t.test(l)?void 0===c?[]:[c?i(m+"Available","Username"):void 0,!1===c?i(m+"InUse"):void 0]:[void 0,d+" contains invalid characters"]:[],[l,c,i,m,d]);Object(n.n)(()=>{o(e||"")},[t,e]);const b=Object(n.m)(e=>{const a=e.target.value.trim().replace(qt,"");o(a),e.target.value=`${t?"https://t.me/":""}${a}`;const n=function(e){return e.length>=5&&e.length<=32&&$t.test(e)}(a);n&&Ht(()=>{r({username:a})}),s&&s(!!n&&a)},[t,r,s]);return n.a.createElement(ve.a,{value:`${t?"https://t.me/":""}${l}`,onChange:b,label:d,error:h,success:u,readOnly:a})});const Wt=Object(K.g)(e=>e(),6e4,!0);var Yt=Object(n.h)(Object(c.h)(e=>{const{currentUserId:t}=e,{progress:a,isUsernameAvailable:n}=e.profileEdit||{},c=t?Object(m.Bb)(e,t):void 0;if(!c)return{progress:a,isUsernameAvailable:n};const{firstName:r,lastName:s,username:l,fullInfo:o}=c,{bio:i}=o||{};return{currentAvatarHash:Object(d.f)(c),currentFirstName:r,currentLastName:s,currentBio:i,currentUsername:l,progress:a,isUsernameAvailable:n}},(e,t)=>Object(u.l)(t,["loadCurrentUser","updateProfile","checkUsername"]))(({currentAvatarHash:e,currentFirstName:t,currentLastName:a,currentBio:c,currentUsername:l,progress:o,isUsernameAvailable:i,loadCurrentUser:m,updateProfile:d,checkUsername:u})=>{const[h,b]=Object(n.r)(!1),[p,g]=Object(n.r)(!1),[v,O]=Object(n.r)(),[f,j]=Object(n.r)(),[C,y]=Object(n.r)(t||""),[k,N]=Object(n.r)(a||""),[S,I]=Object(n.r)(c||""),[w,P]=Object(n.r)(l||""),M=Object(E.a)(e,!1,r.ApiMediaFormat.BlobUrl),F=o===s.j.InProgress,L=!1===w,A=Object(n.p)(()=>!L&&(Boolean(f)||p||!0===i),[f,p,L,i]);Object(n.n)(()=>{Wt(()=>{m()})},[m]),Object(n.n)(()=>{j(void 0)},[M]),Object(n.n)(()=>{y(t||""),N(a||""),I(c||"")},[t,a,c]),Object(n.n)(()=>{P(l||"")},[l]),Object(n.n)(()=>{o===s.j.Complete&&(g(!1),b(!1),O(void 0))},[o]);const D=Object(n.m)(e=>{j(e)},[]),x=Object(n.m)(e=>{y(e.target.value),g(!0)},[]),R=Object(n.m)(e=>{N(e.target.value),g(!0)},[]),U=Object(n.m)(e=>{I(e.target.value),g(!0)},[]),z=Object(n.m)(e=>{P(e),b(!0)},[]),q=Object(n.m)(()=>{const e=C.trim(),t=k.trim(),a=S.trim();e.length?a.length>70?O("Bio can' be longer than 70 characters"):d({photo:f,...p&&{firstName:e,lastName:t,bio:a},...h&&{username:w}}):O("Please provide your first name")},[f,C,k,S,p,w,h,d]),$=Object(T.a)();return n.a.createElement("div",{className:"settings-fab-wrapper"},n.a.createElement("div",{className:"settings-content custom-scroll"},n.a.createElement("div",{className:"settings-edit-profile"},n.a.createElement(Gt.a,{currentAvatarBlobUrl:M,onChange:D,title:"Edit your profile photo",disabled:F}),n.a.createElement(ve.a,{value:C,onChange:x,label:$("FirstName"),disabled:F,error:"Please provide your first name"===v?v:void 0}),n.a.createElement(ve.a,{value:k,onChange:R,label:$("LastName"),disabled:F}),n.a.createElement(ve.a,{value:S,onChange:U,label:$("UserBio"),disabled:F,error:"Bio can' be longer than 70 characters"===v?v:void 0}),n.a.createElement("p",{className:"settings-item-description"},Object(G.a)($("BioAbout"),["br","simple_markdown"]))),n.a.createElement("div",{className:"settings-item"},n.a.createElement("h4",{className:"settings-item-header"},$("Username")),n.a.createElement(Vt,{currentUsername:w||"",isLoading:F,isUsernameAvailable:i,checkUsername:u,onChange:z}),n.a.createElement("p",{className:"settings-item-description"},Object(G.a)($("UsernameHelp"),["br","simple_markdown"])),w&&n.a.createElement("p",{className:"settings-item-description"},"This link opens a chat with you:",n.a.createElement("br",null),n.a.createElement("span",{className:"username-link"},"https://t.me/",w)))),n.a.createElement(zt,{isShown:A,onClick:q,disabled:F,ariaLabel:"Save changes"},F?n.a.createElement(B.a,{color:"white"}):n.a.createElement("i",{className:"icon-check"})))})),Kt=a(116),Zt=a(105);const Qt=Object(K.g)(e=>e(),6e4,!0);var _t=Object(n.h)(Object(c.h)(e=>{const{chats:{byId:t},users:{byId:a}}=e,{orderedIds:n,byId:c,recommended:r}=e.chatFolders;return{chatsById:t,usersById:a,orderedFolderIds:n,foldersById:c,recommendedChatFolders:r}},(e,t)=>Object(u.l)(t,["loadRecommendedChatFolders","addChatFolder","showError"]))(({onCreateFolder:e,onEditFolder:t,chatsById:a,usersById:c,orderedFolderIds:r,foldersById:s,recommendedChatFolders:o,loadRecommendedChatFolders:i,addChatFolder:m,showError:u})=>{const[h,b]=Object(n.r)(),[p,g]=Object(n.r)(!1),E=Object(n.m)(()=>g(!0),[]);Object(n.n)(()=>{h||Object(Kt.a)("FoldersAll").then(b)},[h]),Object(n.n)(()=>{Qt(()=>{i()})},[i]);const v=Object(n.m)(()=>{Object.keys(s).length>=10?u({error:{message:"DIALOG_FILTERS_TOO_MUCH"}}):e()},[s,u,e]),O=Object(T.a)(),f=Object(n.p)(()=>{if(!r)return;const e=Object.keys(a).map(Number);return r.map(t=>{const n=s[t];return{id:n.id,title:n.title,subtitle:Object(d.o)(a,c,n,e,O)}})},[r,a,s,c,O]),j=Object(n.m)(e=>{Object.keys(s).length>=10?u({error:{message:"DIALOG_FILTERS_TOO_MUCH"}}):m({folder:e})},[s,m,u]);return n.a.createElement("div",{className:"settings-content custom-scroll"},n.a.createElement("div",{className:"settings-content-header"},n.a.createElement("div",{className:"settings-content-icon"},h&&n.a.createElement(Zt.a,{id:"settingsFoldersMain",size:l.hb,animationData:h,play:p,noLoop:!0,onLoad:E})),n.a.createElement("p",{className:"settings-item-description mb-3"},O("CreateNewFilterInfo")),n.a.createElement(R.a,{className:"with-icon mb-2",color:"primary",size:"smaller",pill:!0,fluid:!0,onClick:v},n.a.createElement("i",{className:"icon-add"}),O("CreateNewFilter"))),n.a.createElement("div",{className:"settings-item pt-3"},n.a.createElement("h4",{className:"settings-item-header mb-3"},O("Filters")),f&&f.length?f.map(e=>n.a.createElement(fe.a,{className:"mb-2",narrow:!0,onClick:()=>t(s[e.id])},n.a.createElement("div",{className:"multiline-item"},n.a.createElement("span",{className:"title"},e.title),n.a.createElement("span",{className:"subtitle"},e.subtitle)))):f&&!f.length?n.a.createElement("p",{className:"settings-item-description my-4"},"You have no folders yet."):n.a.createElement(ge.a,null)),o&&!!o.length&&n.a.createElement("div",{className:"settings-item pt-3"},n.a.createElement("h4",{className:"settings-item-header mb-3"},O("FilterRecommended")),o.map(e=>n.a.createElement(fe.a,{className:"mb-2",narrow:!0,onClick:()=>j(e)},n.a.createElement("div",{className:"settings-folders-recommended-item"},n.a.createElement("div",{className:"multiline-item"},n.a.createElement("span",{className:"title"},e.title),n.a.createElement("span",{className:"subtitle"},e.description)),n.a.createElement(R.a,{className:"px-3",color:"primary",size:"tiny",pill:!0,fluid:!0},O("Add")))))))}));a(254);var Xt=({count:e,itemName:t,itemPluralName:a,isLoading:c,onClick:r})=>n.a.createElement(R.a,{className:"ShowMoreButton",color:"translucent",size:"smaller",isText:!0,isLoading:c,onClick:r},n.a.createElement("i",{className:"icon-down"}),"Show ",e," more ",e>1?a||t+"s":t);const Jt="Please provide a title for this folder.",ea="Please select at least one chat for this folder.";var ta=Object(n.h)(Object(c.h)(e=>{const{listIds:t}=e.chats;return{loadedActiveChatIds:t.active,loadedArchivedChatIds:t.archived}},(e,t)=>Object(u.l)(t,["editChatFolder","addChatFolder","loadMoreChats"]))(({state:e,dispatch:t,onAddIncludedChats:a,onAddExcludedChats:c,onReset:r,loadedActiveChatIds:s,loadedArchivedChatIds:o,editChatFolder:i,addChatFolder:m,loadMoreChats:h})=>{const[b,p]=Object(n.r)(),[g,E]=Object(n.r)(!1),v=Object(n.m)(()=>E(!0),[]),[O,f]=Object(n.r)(!1),[j,C]=Object(n.r)(!1),{selectedChatIds:y,selectedChatTypes:k}=Mt(e,"included"),{selectedChatIds:N,selectedChatTypes:S}=Mt(e,"excluded");Object(n.n)(()=>{b||Object(Kt.a)("FoldersNew").then(p)},[b]),Object(n.n)(()=>{f(!1),C(!1)},[e.folderId]);const[I,w]=Object(n.p)(()=>{const e=new Set([...s||[],...o||[]]),t=Object(u.f)(y,e),a=Object(u.f)(N,e);return[O?t:t.slice(0,5-k.length),j?a:a.slice(0,5-S.length)]},[N,y,k,S,j,O,s,o]);Object(n.n)(()=>{(I.lengthf(!0):()=>C(!0);return n.a.createElement(n.a.Fragment,null,t.map(t=>function(e,t){const a="included"===t?St.find(({key:t})=>t===e):It.find(({key:t})=>t===e);if(a)return n.a.createElement(fe.a,{key:a.key,className:"settings-folders-list-item mb-1",icon:a.icon,narrow:!0,inactive:!0},P(a.title))}(t,e)),a.map(e=>n.a.createElement(fe.a,{className:"settings-folders-list-item mb-1",narrow:!0,inactive:!0},Object(d.lb)(e)?n.a.createElement(je.a,{avatarSize:"small",userId:e}):n.a.createElement(Ce.a,{avatarSize:"small",chatId:e}))),!c&&r>0&&n.a.createElement(Xt,{count:r,itemName:"chat",onClick:s}))}return n.a.createElement("div",{className:"settings-fab-wrapper"},n.a.createElement("div",{className:"settings-content custom-scroll"},n.a.createElement("div",{className:"settings-content-header"},n.a.createElement("div",{className:"settings-content-icon"},b&&n.a.createElement(Zt.a,{id:"settingsFoldersEdit",size:l.hb,animationData:b,play:g&&String(e.folderId),noLoop:!0,onLoad:v})),"create"===e.mode&&n.a.createElement("p",{className:"settings-item-description mb-3"},P("FilterIncludeInfo")),n.a.createElement(ve.a,{className:"mb-0",label:P("FilterNameHint"),value:e.folder.title,onChange:function(e){const{currentTarget:a}=e;t({type:"setTitle",payload:a.value.trim()})},error:e.error&&e.error===Jt?Jt:void 0})),n.a.createElement("div",{className:"settings-item no-border pt-3"},e.error&&e.error===ea&&n.a.createElement("p",{className:"settings-item-description color-danger mb-2"},e.error),n.a.createElement("h4",{className:"settings-item-header mb-3"},P("FilterInclude")),n.a.createElement(fe.a,{className:"settings-folders-list-item color-primary mb-0",icon:"add",onClick:a},P("FilterAddChats")),M("included")),n.a.createElement("div",{className:"settings-item no-border pt-3"},n.a.createElement("h4",{className:"settings-item-header mb-3"},P("FilterExclude")),n.a.createElement(fe.a,{className:"settings-folders-list-item color-primary mb-0",icon:"add",onClick:c},P("FilterAddChats")),M("excluded"))),n.a.createElement(zt,{isShown:!!e.isTouched,disabled:e.isLoading,onClick:function(){const{title:a}=e.folder;a?y.length||Object.keys(k).length?(t({type:"setIsLoading",payload:!0}),"edit"===e.mode?i({id:e.folderId,folderUpdate:e.folder}):m({folder:e.folder}),setTimeout(()=>{r()},500)):t({type:"setError",payload:ea}):t({type:"setError",payload:Jt})},ariaLabel:"edit"===e.mode?"Save changes":"Create folder"},e.isLoading?n.a.createElement(B.a,{color:"white"}):n.a.createElement("i",{className:"icon-check"})))})),aa=a(40);a(173),a(255);var na=Object(n.h)(({mode:e,chatIds:t,selectedIds:a,selectedChatTypes:c,filterValue:r,onSelectedIdsChange:s,onSelectedChatTypesChange:l,onFilterChange:o,onLoadMore:i})=>{const m=Object(n.q)(null),u="included"===e?St:It,h=a.length+c.length>10,b=a.length>=100;Object(n.n)(()=>{setTimeout(()=>{requestAnimationFrame(()=>{m.current.focus()})},500)},[]);const p=Object(n.m)(e=>{const t=[...a];t.includes(e)?t.splice(t.indexOf(e),1):t.push(e),s(t)},[a,s]),g=Object(n.m)(e=>{const t=[...c];t.includes(e)?t.splice(t.indexOf(e),1):t.push(e),l(t)},[c,l]),E=Object(n.m)(e=>{const{value:t}=e.currentTarget;o(t)},[o]),v=Object(T.a)();const[O,f]=Object(pe.a)(i,t,Boolean(r));return n.a.createElement("div",{className:"Picker SettingsFoldersChatsPicker"},n.a.createElement("div",{className:"picker-header custom-scroll"},c.map((function(e){const t=u.find(({key:t})=>e===t);if(t)return n.a.createElement(Je.a,{icon:t.icon,title:v(t.title),isMinimized:h,canClose:!0,onClick:g,clickArg:t.key})})),a.map((e,t)=>n.a.createElement(Je.a,{chatOrUserId:e,isMinimized:h&&tg(e.key),ripple:!0},n.a.createElement("i",{className:"icon-"+e.icon}),n.a.createElement("h3",{className:"chat-type"},v(e.title)),n.a.createElement(aa.a,{label:"",checked:c.includes(e.key),round:!0}))})),n.a.createElement("div",{key:"divider",className:"picker-list-divider"}),n.a.createElement("h4",{key:"header2",className:"settings-item-header"},v("FilterChats"))),O&&O.length?O.map((function(e){const t=a.includes(e);return n.a.createElement(fe.a,{key:e,className:"chat-item-clickable picker-list-item chat-item",onClick:()=>p(e),ripple:!0,disabled:!t&&b},Object(d.lb)(e)?n.a.createElement(je.a,{userId:e}):n.a.createElement(Ce.a,{chatId:e,withChatType:!0}),n.a.createElement(aa.a,{label:"",checked:t,round:!0}))})):O&&!O.length?n.a.createElement("p",{className:"no-results",key:"no-results"},"Sorry, nothing found."):n.a.createElement(ge.a,{key:"loading"})))});var ca=Object(n.h)(Object(c.h)(e=>{const{chats:{byId:t,listIds:a,orderedPinnedIds:n}}=e;return{chatsById:t,listIds:a.active,orderedPinnedIds:n.active,archivedPinnedIds:n.archived,archivedListIds:a.archived}},(e,t)=>Object(u.l)(t,["loadMoreChats"]))(({mode:e,state:t,dispatch:a,chatsById:c,listIds:r,orderedPinnedIds:s,archivedListIds:l,archivedPinnedIds:o,loadMoreChats:i})=>{const{chatFilter:m}=t,{selectedChatIds:u,selectedChatTypes:h}=Mt(t,e,!0),b=Object(n.p)(()=>{const e=r?Object(d.Ab)(c,r,s,"all"):void 0,t=l?Object(d.Ab)(c,l,o,"archived"):void 0;if(e||t)return[...e?[...e.pinnedChats,...e.otherChats]:[],...t?t.otherChats:[]]},[c,r,s,l,o]),p=Object(n.p)(()=>{if(b)return b.filter(e=>!m||Object(be.a)(Object(d.l)(e),m)||u.includes(e.id)).map(({id:e})=>e)},[b,m,u]),g=Object(n.m)(e=>{a({type:"setChatFilter",payload:e})},[a]),E=Object(n.m)(n=>{a("included"===e?{type:"setIncludeFilters",payload:{...t.includeFilters,includedChatIds:n}}:{type:"setExcludeFilters",payload:{...t.excludeFilters,excludedChatIds:n}})},[e,t,a]),v=Object(n.m)(t=>{const n={};t.forEach(e=>{n[e]=!0}),a("included"===e?{type:"setIncludeFilters",payload:{includedChatIds:u,...n}}:{type:"setExcludeFilters",payload:{excludedChatIds:u,...n}})},[e,u,a]);return p?n.a.createElement(na,{mode:e,chatIds:p,selectedIds:u,selectedChatTypes:h,filterValue:m,onSelectedIdsChange:E,onSelectedChatTypesChange:v,onFilterChange:g,onLoadMore:i}):n.a.createElement(ge.a,null)}));a(256);var ra=Object(n.h)(({currentScreen:e,state:t,dispatch:a,onScreenSelect:c,onReset:r})=>{const l=Object(n.m)(()=>{e!==s.m.FoldersCreateFolder&&e!==s.m.FoldersEditFolder||setTimeout(()=>{a({type:"reset"})},200),e!==s.m.FoldersIncludedChats&&e!==s.m.FoldersExcludedChats?r():"create"===t.mode?c(s.m.FoldersCreateFolder):c(s.m.FoldersEditFolder)},[t.mode,a,e,r,c]),o=Object(n.m)(()=>{a({type:"reset"}),c(s.m.FoldersCreateFolder)},[c,a]),i=Object(n.m)(e=>{a({type:"editFolder",payload:e}),c(s.m.FoldersEditFolder)},[a,c]),m=Object(n.m)(()=>{a({type:"editIncludeFilters"}),c(s.m.FoldersIncludedChats)},[a,c]),d=Object(n.m)(()=>{a({type:"editExcludeFilters"}),c(s.m.FoldersExcludedChats)},[a,c]);switch(e){case s.m.Folders:return n.a.createElement(_t,{onCreateFolder:o,onEditFolder:i});case s.m.FoldersCreateFolder:case s.m.FoldersEditFolder:return n.a.createElement(ta,{state:t,dispatch:a,onAddIncludedChats:m,onAddExcludedChats:d,onReset:l});case s.m.FoldersIncludedChats:return n.a.createElement(ca,{mode:"included",state:t,dispatch:a});case s.m.FoldersExcludedChats:return n.a.createElement(ca,{mode:"excluded",state:t,dispatch:a});default:return}}),sa=a(95);a(257);var la=Object(n.h)(({options:e,range:t,label:a,value:c,disabled:r,onChange:s})=>{const l=Object(n.m)(e=>{s(Number(e.currentTarget.value))},[s]),o=Object(le.a)("RangeSlider",r&&"disabled"),i=Object(n.p)(()=>{if(e)return c/(e.length-1)*100;if(t){const e=(t.max-t.min)/(t.step||1);return(c-t.min)/e*100}return 0},[c,e,t]),[m,d,u]=Object(n.p)(()=>e?[0,e.length-1,1]:t?[t.min,t.max,t.step||1]:[0,0,0],[t,e]);return n.a.createElement("div",{className:o},a&&n.a.createElement("div",{className:"slider-top-row"},n.a.createElement("span",{className:"label"},a),t&&n.a.createElement("span",{className:"value"},c)),n.a.createElement("div",{className:"slider-main"},n.a.createElement("div",{className:"slider-fill-track",style:`width: ${i}%`}),n.a.createElement("input",{min:m,max:d,value:c,step:u,type:"range",onChange:l}),e&&n.a.createElement("div",{className:"slider-options"},e.map((e,t)=>n.a.createElement("div",{className:Object(le.a)("slider-option no-selection",t===c&&"active"),onClick:()=>s(t)},e)))))}),oa=a(117),ia=a(102),ma=a(45);var da=Object(n.h)(({size:e=l.nb,stickerSet:t,observeIntersection:a})=>{const c=Object(n.q)(null),s=Object(sa.b)(c,a),o="stickerSet"+t.id,i=Object(E.a)(o,!s,r.ApiMediaFormat.Lottie),{shouldRenderFullMedia:m,transitionClassNames:d}=Object(ia.a)(i,"slow");return n.a.createElement("div",{ref:c,className:"sticker-set-cover"},!m&&Object(ma.c)(t.title,2),m&&i&&n.a.createElement(Zt.a,{id:o,size:e,animationData:i,className:d}))});var ua=Object(n.h)(({stickerSet:e,observeIntersection:t})=>{const a=Object(n.q)(null),c=Object(sa.b)(a,t),r=Object(E.a)(e.hasThumbnail&&"stickerSet"+e.id,!c),{shouldRenderFullMedia:s,transitionClassNames:l}=Object(ia.a)(r,"slow");return n.a.createElement("div",{ref:a,className:"sticker-set-cover"},!s&&Object(ma.c)(e.title,2),s&&n.a.createElement("img",{src:r,className:l,alt:""}))});a(258);var ha=Object(n.h)(({sticker:e,size:t,observeIntersection:a,noAnimate:c,title:s,className:l,onClick:o,clickArg:i,onUnfaveClick:m})=>{const d=Object(n.q)(null),{isAnimated:u}=e,h="sticker"+e.id,b="sticker-button-"+e.id,p=Object(sa.b)(d,a),g=e.thumbnail?e.thumbnail.dataUri:void 0,v=Object(E.a)(h+"?size=m",!p,r.ApiMediaFormat.BlobUrl),O=p&&!c,f=Object(E.a)(h,!O,r.ApiMediaFormat.Lottie),[j,C,y]=Object(De.a)(Boolean(f)),k=j&&O,{shouldRenderThumb:N,shouldRenderFullMedia:S,transitionClassNames:I}=Object(ia.a)(v||k,"slow");Object(n.n)(()=>{O||y()},[y,O]);const w=Object(le.a)("StickerButton",u&&"animated",b,l),P=N&&g?`background-image: url('${g}');`:"";return n.a.createElement("div",{ref:d,className:w,title:s||e&&e.emoji,style:P,"data-sticker-id":e.id,onClick:function(){o&&o(i)}},S&&!k&&n.a.createElement("img",{src:v,className:I}),O&&f&&n.a.createElement(Zt.a,{id:h,animationData:f,play:!0,size:t,isLowPriority:!0,onLoad:C}),m&&n.a.createElement(R.a,{className:"sticker-unfave-button",color:"dark",round:!0,onClick:function(t){t.stopPropagation(),t.preventDefault(),m(e)}},n.a.createElement("i",{className:"icon-close"})))});a(259);var ba=Object(n.h)(({stickerSet:e,observeIntersection:t,onClick:a})=>{const c=Object(T.a)();if(!e||!e.stickers)return;const r=e.stickers&&e.stickers[0];return e.hasThumbnail||!r?n.a.createElement(fe.a,{narrow:!0,className:"SettingsStickerSet",inactive:!r,onClick:()=>r&&a(r)},n.a.createElement(R.a,{ariaLabel:e.title,color:"translucent"},e.isAnimated?n.a.createElement(da,{size:l.ib,stickerSet:e,observeIntersection:t}):n.a.createElement(ua,{stickerSet:e,observeIntersection:t})),n.a.createElement("div",{className:"multiline-menu-item"},n.a.createElement("div",{className:"title"},e.title),n.a.createElement("div",{className:"subtitle"},c("StickerPack.StickerCount",e.count,"i")))):n.a.createElement(fe.a,{narrow:!0,className:"SettingsStickerSet",onClick:()=>a(r)},n.a.createElement(ha,{sticker:r,size:l.ib,title:e.title,observeIntersection:t}),n.a.createElement("div",{className:"multiline-menu-item"},n.a.createElement("div",{className:"title"},e.title),n.a.createElement("div",{className:"subtitle"},c("StickerPack.StickerCount",e.count,"i"))))}),pa=a(151);const ga=o.k?void 0:[{value:"enter",label:"Send by Enter",subLabel:"New line by Shift + Enter"},{value:"ctrl-enter",label:`Send by ${o.e?"Cmd":"Ctrl"} + Enter`,subLabel:"New line by Enter"}],Ea=["Solid and Steady","Nice and Fast","Lots of Stuff"];var va=Object(n.h)(Object(c.h)(e=>({...Object(u.l)(e.settings.byKey,["messageTextSize","animationLevel","messageSendKeyCombo","shouldAutoDownloadMediaFromContacts","shouldAutoDownloadMediaInPrivateChats","shouldAutoDownloadMediaInGroups","shouldAutoDownloadMediaInChannels","shouldAutoPlayGifs","shouldAutoPlayVideos","shouldSuggestStickers","shouldLoopStickers"]),stickerSetIds:e.stickers.added.setIds,stickerSetsById:e.stickers.setsById}),(e,t)=>Object(u.l)(t,["setSettingOption","loadStickerSets","loadAddedStickers"]))(({onScreenSelect:e,stickerSetIds:t,stickerSetsById:a,messageTextSize:c,animationLevel:r,messageSendKeyCombo:l,shouldAutoDownloadMediaFromContacts:o,shouldAutoDownloadMediaInPrivateChats:i,shouldAutoDownloadMediaInGroups:m,shouldAutoDownloadMediaInChannels:d,shouldAutoPlayGifs:u,shouldAutoPlayVideos:h,shouldSuggestStickers:b,shouldLoopStickers:p,setSettingOption:g,loadStickerSets:E,loadAddedStickers:v})=>{const O=Object(n.q)(null),{observe:f}=Object(sa.a)({rootRef:O}),[j,C,y]=Object(De.a)(),[k,N]=Object(n.r)();Object(n.n)(()=>{E()},[E]),Object(n.n)(()=>{t&&t.length&&v()},[t,v]);const S=Object(n.m)(e=>{Ea.forEach((t,a)=>{document.body.classList.toggle("animation-level-"+a,e===a)}),g({animationLevel:e})},[g]),I=Object(n.m)(e=>{document.documentElement.style.setProperty("--message-text-size",e+"px"),g({messageTextSize:e})},[g]),w=Object(n.m)(e=>{N(e),C()},[C]),P=Object(T.a)(),M=t&&t.map(e=>!!(a&&a[e]&&a[e].installedDate)&&a[e]).filter(Boolean);return n.a.createElement("div",{className:"settings-content custom-scroll"},n.a.createElement("div",{className:"settings-item pt-3"},n.a.createElement("h4",{className:"settings-item-header"},P("SETTINGS")),n.a.createElement(la,{label:P("TextSize"),range:{min:12,max:20},value:c,onChange:I}),n.a.createElement(fe.a,{icon:"photo",onClick:()=>e(s.m.GeneralChatBackground)},P("ChatBackground"))),n.a.createElement("div",{className:"settings-item"},n.a.createElement("h4",{className:"settings-item-header"},"Animation Level"),n.a.createElement("p",{className:"settings-item-description"},"Choose the desired animations amount."),n.a.createElement(la,{options:Ea,value:r,onChange:S})),ga&&n.a.createElement("div",{className:"settings-item"},n.a.createElement("h4",{className:"settings-item-header"},P("Keyboard")),n.a.createElement(oa.a,{name:"keyboard-send-settings",options:ga,onChange:e=>g({messageSendKeyCombo:e}),selected:l})),n.a.createElement("div",{className:"settings-item"},n.a.createElement("h4",{className:"settings-item-header"},P("AutoDownloadMedia")),n.a.createElement(aa.a,{label:P("Contacts"),checked:o,onCheck:e=>g({shouldAutoDownloadMediaFromContacts:e})}),n.a.createElement(aa.a,{label:P("AutodownloadPrivateChats"),checked:i,onCheck:e=>g({shouldAutoDownloadMediaInPrivateChats:e})}),n.a.createElement(aa.a,{label:P("AutodownloadGroupChats"),checked:m,onCheck:e=>g({shouldAutoDownloadMediaInGroups:e})}),n.a.createElement(aa.a,{label:P("FilterChannels"),checked:d,onCheck:e=>g({shouldAutoDownloadMediaInChannels:e})})),n.a.createElement("div",{className:"settings-item"},n.a.createElement("h4",{className:"settings-item-header"},P("AutoplayMedia")),n.a.createElement(aa.a,{label:P("GifsTab2"),checked:u,onCheck:e=>g({shouldAutoPlayGifs:e})}),n.a.createElement(aa.a,{label:P("VideosTitle"),checked:h,onCheck:e=>g({shouldAutoPlayVideos:e})})),n.a.createElement("div",{className:"settings-item"},n.a.createElement("h4",{className:"settings-item-header"},P("AccDescrStickers")),n.a.createElement(aa.a,{label:P("SuggestStickers"),checked:b,onCheck:e=>g({shouldSuggestStickers:e})}),n.a.createElement(aa.a,{label:P("LoopAnimatedStickers"),checked:p,onCheck:e=>g({shouldLoopStickers:e})}),n.a.createElement("div",{className:"mt-4",ref:O},M&&M.map(e=>n.a.createElement(ba,{key:e.id,stickerSet:e,observeIntersection:f,onClick:w}))),k&&n.a.createElement(pa.a,{isOpen:j,fromSticker:k,onClose:y})))}));let Oa;function fa(e="*",t,a=!1){Oa||(Oa=document.createElement("input"),Oa.setAttribute("type","file")),Oa.setAttribute("accept",e),a?Oa.removeAttribute("multiple"):Oa.setAttribute("multiple","multiple"),Oa.onchange=null,Oa.value="",Oa.onchange=t,Oa.click()}var ja=a(13);a(260);var Ca=Object(n.h)(({wallpaper:e,isSelected:t,onClick:a})=>{const{slug:c,document:r}=e,o="wallpaper"+r.id,i=r.previewBlobUrl,m=Object(E.a)(o+"?size=m"),d=Object(j.a)(r.thumbnail&&r.thumbnail.dataUri,Boolean(m),300),{shouldRenderThumb:u,shouldRenderFullMedia:h,transitionClassNames:b}=Object(ia.a)(m||i,"slow"),[p,g]=Object(n.r)(!1),{mediaData:O,downloadProgress:f}=Object(v.a)(o,!p),k=!1===Object(y.a)(p),{shouldRender:N,transitionClassNames:S}=Object(Q.a)(p&&!O||c===s.n,void 0,k,"slow"),I=Object(n.m)(()=>{(async()=>{const e=await Object(C.e)(O);await ja.d(l.l,l.l,e),a(c)})()},[O,a,c]);Object(n.n)(()=>{O&&I()},[O,I]);const w=Object(n.m)(()=>{O?I():g(e=>!e)},[O,I]),P=Object(le.a)("WallpaperTile",t&&"selected");return n.a.createElement("div",{className:P,onClick:w},n.a.createElement("div",{className:"media-inner"},u&&n.a.createElement("img",{src:d,className:"thumbnail",alt:""}),h&&n.a.createElement("img",{src:m||i,className:"full-media "+b,alt:""}),N&&n.a.createElement("div",{className:Object(le.a)("spinner-container",S)},n.a.createElement(W.a,{progress:f,onClick:w}))))});a(261);const ya=Object(K.g)(e=>e(),6e4,!0);var ka=Object(n.h)(Object(c.h)(e=>{const{isBackgroundBlurred:t,customBackground:a}=e.settings.byKey,{loadedWallpapers:n}=e.settings;return{customBackground:a,isBackgroundBlurred:t,loadedWallpapers:n}},(e,t)=>Object(u.l)(t,["setSettingOption","loadWallpapers","uploadWallpaper"]))(({onScreenSelect:e,customBackground:t,isBackgroundBlurred:a,loadedWallpapers:c,setSettingOption:r,loadWallpapers:l,uploadWallpaper:o})=>{Object(n.n)(()=>{ya(()=>{l()})},[l]);const i=Object(n.m)(e=>{const{files:t}=e.target;t&&t.length>0&&o(t[0])},[o]),m=Object(n.m)(()=>{fa("image/jpeg",i,!0)},[i]),d=Object(n.m)(()=>{e(s.m.GeneralChatBackgroundColor)},[e]),u=Object(n.m)(()=>{r({customBackground:void 0})},[r]),h=Object(n.m)(e=>{r({customBackground:e})},[r]),b=Object(n.m)(e=>{r({isBackgroundBlurred:e.target.checked})},[r]),p=Object(T.a)(),g=c&&c[0]&&c[0].slug===s.n;return n.a.createElement("div",{className:"SettingsGeneralBackground settings-content custom-scroll"},n.a.createElement("div",{className:"settings-item pt-3"},n.a.createElement(fe.a,{icon:"camera-add",className:"mb-0",disabled:g,onClick:m},p("UploadImage")),n.a.createElement(fe.a,{icon:"colorize",className:"mb-0",onClick:d},p("SetColor")),n.a.createElement(fe.a,{icon:"favorite",onClick:u},p("ThemeResetToDefaults")),n.a.createElement(aa.a,{label:p("BackgroundBlurred"),checked:Boolean(a),onChange:b})),c?n.a.createElement("div",{className:"settings-wallpapers"},c.map(e=>n.a.createElement(Ca,{wallpaper:e,isSelected:t===e.slug,onClick:h}))):n.a.createElement(ge.a,null))}));function Na(e){return[parseInt(e.substring(0,2),16),parseInt(e.substring(2,4),16),parseInt(e.substring(4,6),16)]}function Sa(e){const t=e[0].toString(16),a=e[1].toString(16),n=e[2].toString(16);return(1==t.length?"0"+t:t)+(1==a.length?"0"+a:a)+(1==n.length?"0"+n:n)}function Ia([e,t,a]){e/=255,t/=255,a/=255;let n,c,r=Math.max(e,t,a),s=Math.min(e,t,a),l=r,o=r-s;if(c=0==r?0:o/r,r==s)n=0;else{switch(r){case e:n=(t-a)/o+(t({customBackground:e.settings.byKey.customBackground}),(e,t)=>Object(u.l)(t,["setSettingOption"]))(({customBackground:e,setSettingOption:t})=>{const a=Object(n.q)(null),c=Object(n.q)(null),r=Object(n.q)(null),s=Object(n.q)(!0),[l,o]=Object(n.r)(function(e){return e&&e.startsWith("#")?Ia(Na(e.replace("#",""))):Pa}(e)),i=Object(n.q)(l);Object(n.n)(()=>{i.current=l},[l]);const[m,d,b]=Object(De.a)(),[p,g]=Object(n.r)(""),[E,v]=Object(n.r)(""),O=Object(n.q)(),f=Object(n.q)();Object(n.n)(()=>{const e={offsetLeft:c.current.offsetLeft,...Object(u.l)(c.current.getBoundingClientRect(),["top","width","height"])},t={offsetLeft:r.current.offsetLeft,...Object(u.l)(r.current.getBoundingClientRect(),["width"])};function n(t){const n=[Math.min(Math.max(0,t.pageX-e.offsetLeft),e.width-1),Math.min(Math.max(0,t.pageY-e.top+a.current.scrollTop),e.height-1)],{huePosition:c}=Fa(i.current,O.current);o(La({colorPosition:n,huePosition:c},O.current)),d()}function s(e){const{colorPosition:a}=Fa(i.current,O.current),n=Math.min(Math.max(0,e.pageX-t.offsetLeft),t.width-1);o(La({colorPosition:a,huePosition:n},O.current)),d()}O.current={colorRect:e,hueRect:t},Object(h.b)(c.current,{onCapture:n,onDrag:n,onRelease:b,onClick:b,withCursor:!0}),Object(h.b)(r.current,{onCapture:s,onDrag:s,onRelease:b,onClick:b,withCursor:!0})},[d,b]);const{colorPosition:j=[0,0],huePosition:C=0}=O.current?Fa(l,O.current):{},y=Sa(wa(l)),k=l[0],N=Sa(wa([k,1,1]));Object(n.n)(()=>{const e=wa(l),a="#"+Sa(e);g(e.join(", ")),v(a),s.current||t({customBackground:a}),s.current=!1},[l,t]),Object(n.n)(()=>{!function(e,t,a,n){let c,r,s;a.current&&n.current?(c=n.current.colorRect.width,r=n.current.colorRect.height,s=a.current):(c=e.offsetWidth,r=e.offsetHeight,s=e.getContext("2d"),e.width=c,e.height=r,a.current=s);const l=s.createImageData(c,r),o=l.data,i=wa([t,1,1]);let m=0;for(let e=0;e{!function(e){const t=e.offsetWidth;e.width=t,e.height=1;const a=e.getContext("2d"),n=a.createImageData(t,1),c=n.data;let r=0;for(let e=0;e{const t=e.currentTarget.value.replace(/[^\d, ]/g,"").slice(0,13);if(t.match(/^\d{1,3},\s?\d{1,3},\s?\d{1,3}$/)){const e=t.split(",").map(e=>Number(e.trim()));o(Ia(e))}e.currentTarget.value=t},[]),I=Object(n.m)(e=>{const t=e.currentTarget.value.replace(/[^0-9a-fA-F]/g,"").slice(0,6);t.match(/^#?[0-9a-fA-F]{6}$/)&&o(Ia(Na(t.replace("#","")))),e.currentTarget.value=t},[]),w=Object(n.m)(e=>{o(Ia(Na(e.currentTarget.dataset.color.replace("#",""))))},[]),P=Object(le.a)("SettingsGeneralBackgroundColor settings-content custom-scroll",m&&"is-dragging");return n.a.createElement("div",{ref:a,className:P},n.a.createElement("div",{className:"settings-item pt-3"},n.a.createElement("div",{ref:c,className:"color-picker"},n.a.createElement("canvas",null),n.a.createElement("div",{className:"handle",style:`transform: translate(${j[0]}px, ${j[1]}px); background-color: #${y};`})),n.a.createElement("div",{ref:r,className:"hue-picker"},n.a.createElement("canvas",null),n.a.createElement("div",{className:"handle",style:`transform: translateX(${C}px); background-color: #${N};`})),n.a.createElement("div",{className:"tools"},n.a.createElement(ve.a,{value:E,label:"HEX",onChange:I}),n.a.createElement(ve.a,{value:p,label:"RGB",onChange:S}))),n.a.createElement("div",{className:"predefined-colors"},Ma.map(e=>n.a.createElement("div",{className:e==="#"+y?"active":void 0,"data-color":e,style:`background-color: ${e};`,onClick:w}))))}));var Ta=Object(n.h)(Object(c.h)(e=>({hasPrivateChatsNotifications:Boolean(e.settings.byKey.hasPrivateChatsNotifications),hasPrivateChatsMessagePreview:Boolean(e.settings.byKey.hasPrivateChatsMessagePreview),hasGroupNotifications:Boolean(e.settings.byKey.hasGroupNotifications),hasGroupMessagePreview:Boolean(e.settings.byKey.hasGroupMessagePreview),hasBroadcastNotifications:Boolean(e.settings.byKey.hasBroadcastNotifications),hasBroadcastMessagePreview:Boolean(e.settings.byKey.hasBroadcastMessagePreview),hasContactJoinedNotifications:Boolean(e.settings.byKey.hasContactJoinedNotifications)}),(e,t)=>Object(u.l)(t,["loadNotificationsSettings","updateContactSignUpNotification","updateNotificationSettings"]))(({hasPrivateChatsNotifications:e,hasPrivateChatsMessagePreview:t,hasGroupNotifications:a,hasGroupMessagePreview:c,hasBroadcastNotifications:r,hasBroadcastMessagePreview:s,hasContactJoinedNotifications:l,loadNotificationsSettings:o,updateContactSignUpNotification:i,updateNotificationSettings:m})=>{Object(n.n)(()=>{o()},[o]);const d=Object(n.m)((n,l,o)=>{const i="contact"===l?!e:!("group"===l?a:r),d="contact"===l?t:"group"===l?c:s;m({peerType:l,..."silent"===o&&{isSilent:!n.target.checked,isShowPreviews:d},..."showPreviews"===o&&{isShowPreviews:n.target.checked,isSilent:i}})},[s,r,c,a,t,e,m]),u=Object(n.m)(e=>{i({isSilent:!e.target.checked})},[i]),h=Object(T.a)();return n.a.createElement("div",{className:"settings-content custom-scroll"},n.a.createElement("div",{className:"settings-item"},n.a.createElement("h4",{className:"settings-item-header"},h("AutodownloadPrivateChats")),n.a.createElement(aa.a,{label:h("NotificationsForPrivateChats"),subLabel:h(e?"NotificationsEnabled":"NotificationsDisabled"),checked:e,onChange:e=>{d(e,"contact","silent")}}),n.a.createElement(aa.a,{label:h("MessagePreview"),subLabel:h(t?"PreviewEnabled":"PreviewDisabled"),checked:t,onChange:e=>{d(e,"contact","showPreviews")}})),n.a.createElement("div",{className:"settings-item"},n.a.createElement("h4",{className:"settings-item-header"},h("FilterGroups")),n.a.createElement(aa.a,{label:h("NotificationsForGroups"),subLabel:h(a?"NotificationsEnabled":"NotificationsDisabled"),checked:a,onChange:e=>{d(e,"group","silent")}}),n.a.createElement(aa.a,{label:h("MessagePreview"),subLabel:h(c?"PreviewEnabled":"PreviewDisabled"),checked:c,onChange:e=>{d(e,"group","showPreviews")}})),n.a.createElement("div",{className:"settings-item"},n.a.createElement("h4",{className:"settings-item-header"},h("FilterChannels")),n.a.createElement(aa.a,{label:h("NotificationsForChannels"),subLabel:h(r?"NotificationsEnabled":"NotificationsDisabled"),checked:r,onChange:e=>{d(e,"broadcast","silent")}}),n.a.createElement(aa.a,{label:h("MessagePreview"),subLabel:h(s?"PreviewEnabled":"PreviewDisabled"),checked:s,onChange:e=>{d(e,"broadcast","showPreviews")}})),n.a.createElement("div",{className:"settings-item"},n.a.createElement("h4",{className:"settings-item-header"},h("PhoneOther")),n.a.createElement(aa.a,{label:h("ContactJoined"),checked:l,onChange:u})))}));var Ba=Object(n.h)(Object(c.h)(e=>{const{settings:{byKey:{hasPassword:t},privacy:a},blocked:n,activeSessions:c}=e;return{hasPassword:t,blockedCount:n.totalCount,sessionsCount:c.length,visibilityPrivacyPhoneNumber:a.phoneNumber&&a.phoneNumber.visibility,visibilityPrivacyLastSeen:a.lastSeen&&a.lastSeen.visibility,visibilityPrivacyProfilePhoto:a.profilePhoto&&a.profilePhoto.visibility,visibilityPrivacyForwarding:a.forwards&&a.forwards.visibility,visibilityPrivacyGroupChats:a.chatInvite&&a.chatInvite.visibility}},(e,t)=>Object(u.l)(t,["loadBlockedContacts","loadAuthorizations","loadPrivacySettings"]))(({onScreenSelect:e,hasPassword:t,blockedCount:a,sessionsCount:c,visibilityPrivacyPhoneNumber:r,visibilityPrivacyLastSeen:l,visibilityPrivacyProfilePhoto:o,visibilityPrivacyForwarding:i,visibilityPrivacyGroupChats:m,loadPrivacySettings:d,loadBlockedContacts:u,loadAuthorizations:h})=>{Object(n.n)(()=>{u(),h(),d()},[u,h,d]);const b=Object(T.a)();function p(e){switch(e){case"everybody":return b("P2PEverybody");case"contacts":return b("P2PContacts");case"nobody":return b("P2PNobody")}}return n.a.createElement("div",{className:"settings-content custom-scroll"},n.a.createElement("div",{className:"settings-item pt-3"},n.a.createElement(fe.a,{icon:"delete-user",narrow:!0,onClick:()=>e(s.m.PrivacyBlockedUsers)},n.a.createElement("div",{className:"multiline-menu-item"},n.a.createElement("span",{className:"title"},b("BlockedUsers")),a>0&&n.a.createElement("span",{className:"subtitle"},b("Users",a)))),n.a.createElement(fe.a,{icon:"lock",narrow:!0,onClick:()=>e(t?s.m.TwoFaEnabled:s.m.TwoFaDisabled)},n.a.createElement("div",{className:"multiline-menu-item"},n.a.createElement("span",{className:"title"},b("TwoStepVerification")),n.a.createElement("span",{className:"subtitle"},b(t?"PasswordOn":"PasswordOff")))),n.a.createElement(fe.a,{icon:"active-sessions",narrow:!0,onClick:()=>e(s.m.PrivacyActiveSessions)},n.a.createElement("div",{className:"multiline-menu-item"},n.a.createElement("span",{className:"title"},b("SessionsTitle")),c>0&&n.a.createElement("span",{className:"subtitle"},1===c?"1 session":c+" sessions")))),n.a.createElement("div",{className:"settings-item"},n.a.createElement("h4",{className:"settings-item-header mb-4"},b("PrivacyTitle")),n.a.createElement(fe.a,{narrow:!0,onClick:()=>e(s.m.PrivacyPhoneNumber)},n.a.createElement("div",{className:"multiline-menu-item"},n.a.createElement("span",{className:"title"},b("PrivacyPhoneTitle")),n.a.createElement("span",{className:"subtitle"},p(r)))),n.a.createElement(fe.a,{narrow:!0,onClick:()=>e(s.m.PrivacyLastSeen)},n.a.createElement("div",{className:"multiline-menu-item"},n.a.createElement("span",{className:"title"},b("LastSeenTitle")),n.a.createElement("span",{className:"subtitle"},p(l)))),n.a.createElement(fe.a,{narrow:!0,onClick:()=>e(s.m.PrivacyProfilePhoto)},n.a.createElement("div",{className:"multiline-menu-item"},n.a.createElement("span",{className:"title"},b("PrivacyProfilePhotoTitle")),n.a.createElement("span",{className:"subtitle"},p(o)))),n.a.createElement(fe.a,{narrow:!0,onClick:()=>e(s.m.PrivacyForwarding)},n.a.createElement("div",{className:"multiline-menu-item"},n.a.createElement("span",{className:"title"},b("PrivacyForwardsTitle")),n.a.createElement("span",{className:"subtitle"},p(i)))),n.a.createElement(fe.a,{narrow:!0,onClick:()=>e(s.m.PrivacyGroupChats)},n.a.createElement("div",{className:"multiline-menu-item"},n.a.createElement("span",{className:"title"},b("WhoCanAddMe")),n.a.createElement("span",{className:"subtitle"},p(m))))))}));var Da=Object(n.h)(Object(c.h)(e=>({languages:e.settings.byKey.languages,language:e.settings.byKey.language}),(e,t)=>Object(u.l)(t,["loadLanguages","setSettingOption"]))(({languages:e,language:t,loadLanguages:a,setSettingOption:c})=>{const[r,s]=Object(n.r)(t),[l,o,i]=Object(De.a)();Object(n.n)(()=>{a()},[a]);const m=Object(n.m)(e=>{s(e),o(),Object(et.c)(e,()=>{i(),c({language:e})})},[o,i,c]),d=Object(n.p)(()=>e?function(e){return e.map(({langCode:e,nativeName:t,name:a})=>({value:e,label:t,subLabel:a}))}(e):void 0,[e]);return n.a.createElement("div",{className:"settings-content settings-item settings-language custom-scroll"},d?n.a.createElement(oa.a,{name:"keyboard-send-settings",options:d,selected:r,loadingOption:l?r:void 0,onChange:m}):n.a.createElement(ge.a,null))}));function xa(e){switch(e){case s.m.PrivacyPhoneNumber:case s.m.PrivacyPhoneNumberAllowedContacts:case s.m.PrivacyPhoneNumberDeniedContacts:return"phoneNumber";case s.m.PrivacyLastSeen:case s.m.PrivacyLastSeenAllowedContacts:case s.m.PrivacyLastSeenDeniedContacts:return"lastSeen";case s.m.PrivacyProfilePhoto:case s.m.PrivacyProfilePhotoAllowedContacts:case s.m.PrivacyProfilePhotoDeniedContacts:return"profilePhoto";case s.m.PrivacyForwarding:case s.m.PrivacyForwardingAllowedContacts:case s.m.PrivacyForwardingDeniedContacts:return"forwards";case s.m.PrivacyGroupChats:case s.m.PrivacyGroupChatsAllowedContacts:case s.m.PrivacyGroupChatsDeniedContacts:return"chatInvite"}}var Ra=Object(n.h)(Object(c.h)((e,{screen:t})=>{let a;const{chats:{byId:n},settings:{privacy:c}}=e;switch(t){case s.m.PrivacyPhoneNumber:a=c.phoneNumber;break;case s.m.PrivacyLastSeen:a=c.lastSeen;break;case s.m.PrivacyProfilePhoto:a=c.profilePhoto;break;case s.m.PrivacyForwarding:a=c.forwards;break;case s.m.PrivacyGroupChats:a=c.chatInvite}return a?{...a,chatsById:n}:{}},(e,t)=>Object(u.l)(t,["setPrivacyVisibility"]))(({screen:e,onScreenSelect:t,visibility:a,allowUserIds:c,allowChatIds:r,blockUserIds:l,blockChatIds:o,chatsById:i,setPrivacyVisibility:m})=>{const d=Object(T.a)(),u=Object(n.p)(()=>{switch(e){case s.m.PrivacyProfilePhoto:case s.m.PrivacyGroupChats:return[{value:"everybody",label:d("P2PEverybody")},{value:"contacts",label:d("P2PContacts")}];default:return[{value:"everybody",label:d("P2PEverybody")},{value:"contacts",label:d("P2PContacts")},{value:"nobody",label:d("P2PNobody")}]}},[d,e]),h={shouldShowDenied:"nobody"!==a,shouldShowAllowed:"everybody"!==a},b=xa(e),p=Object(n.p)(()=>{switch(e){case s.m.PrivacyPhoneNumber:return d("PrivacyPhoneTitle");case s.m.PrivacyLastSeen:return d("LastSeenTitle");case s.m.PrivacyProfilePhoto:return d("PrivacyProfilePhotoTitle");case s.m.PrivacyForwarding:return d("PrivacyForwardsTitle");case s.m.PrivacyGroupChats:return d("WhoCanAddMe");default:return}},[d,e]),g=Object(n.p)(()=>{switch(e){case s.m.PrivacyLastSeen:return d("CustomHelp");default:return}},[d,e]),E=(()=>{switch(e){case s.m.PrivacyPhoneNumber:return s.m.PrivacyPhoneNumberAllowedContacts;case s.m.PrivacyLastSeen:return s.m.PrivacyLastSeenAllowedContacts;case s.m.PrivacyProfilePhoto:return s.m.PrivacyProfilePhotoAllowedContacts;case s.m.PrivacyForwarding:return s.m.PrivacyForwardingAllowedContacts;default:return s.m.PrivacyGroupChatsAllowedContacts}})(),v=(()=>{switch(e){case s.m.PrivacyPhoneNumber:return s.m.PrivacyPhoneNumberDeniedContacts;case s.m.PrivacyLastSeen:return s.m.PrivacyLastSeenDeniedContacts;case s.m.PrivacyProfilePhoto:return s.m.PrivacyProfilePhotoDeniedContacts;case s.m.PrivacyForwarding:return s.m.PrivacyForwardingDeniedContacts;default:return s.m.PrivacyGroupChatsDeniedContacts}})(),O=Object(n.p)(()=>c&&r&&i?r.reduce((e,t)=>e+(i[t]?i[t].membersCount:0),c.length):0,[r,c,i]),f=Object(n.p)(()=>l&&o&&i?o.reduce((e,t)=>e+(i[t]?i[t].membersCount:0),l.length):0,[o,l,i]),j=Object(n.m)(e=>{m({privacyKey:b,visibility:e})},[b,m]);return n.a.createElement("div",{className:"settings-content custom-scroll"},n.a.createElement("div",{className:"settings-item"},n.a.createElement("h4",{className:"settings-item-header"},p),n.a.createElement(oa.a,{name:"visibility-"+b,options:u,onChange:j,selected:a}),g&&n.a.createElement("p",{className:"settings-item-description-larger"},g)),n.a.createElement("div",{className:"settings-item"},n.a.createElement("h4",{className:"settings-item-header mb-4"},d("PrivacyExceptions")),h.shouldShowAllowed&&n.a.createElement(fe.a,{narrow:!0,icon:"add-user",onClick:()=>{t(E)}},n.a.createElement("div",{className:"multiline-menu-item full-size"},O>0&&n.a.createElement("span",{className:"date"},"+",O),n.a.createElement("span",{className:"title"},d("AlwaysShareWith")),n.a.createElement("span",{className:"subtitle"},d("EditAdminAddUsers")))),h.shouldShowDenied&&n.a.createElement(fe.a,{narrow:!0,icon:"delete-user",onClick:()=>{t(v)}},n.a.createElement("div",{className:"multiline-menu-item full-size"},f>0&&n.a.createElement("span",{className:"date"},"−",f),n.a.createElement("span",{className:"title"},d("NeverShareWith")),n.a.createElement("span",{className:"subtitle"},d("EditAdminAddUsers"))))))}));function Ua(e){return[e.region,e.country].filter(Boolean).join(", ")}function Ga(e){return`${e.deviceModel}${e.deviceModel?", ":""} ${e.platform} ${e.systemVersion}`}var za=Object(n.h)(Object(c.h)(e=>({activeSessions:e.activeSessions}),(e,t)=>Object(u.l)(t,["loadAuthorizations","terminateAuthorization","terminateAllAuthorizations"]))(({activeSessions:e,loadAuthorizations:t,terminateAuthorization:a,terminateAllAuthorizations:c})=>{const[r,s,l]=Object(De.a)();Object(n.n)(()=>{t()},[t]);const o=Object(n.m)(e=>{a({hash:e})},[a]),i=Object(n.m)(()=>{l(),c()},[l,c]),m=Object(n.p)(()=>e.find(e=>e.isCurrent),[e]),d=Object(n.p)(()=>e.filter(e=>!e.isCurrent),[e]),u=Object(T.a)();function h(e){return n.a.createElement(fe.a,{key:e.hash,ripple:!0,narrow:!0,contextActions:[{title:"Terminate",icon:"stop",handler:()=>{o(e.hash)}}]},n.a.createElement("div",{className:"multiline-menu-item full-size"},n.a.createElement("span",{className:"date"},Object(U.g)(1e3*e.dateActive)),n.a.createElement("span",{className:"title"},e.appName),n.a.createElement("span",{className:"subtitle black tight"},Ga(e)),n.a.createElement("span",{className:"subtitle"},e.ip," - ",Ua(e))))}return n.a.createElement("div",{className:"settings-content custom-scroll"},m&&(p=m,n.a.createElement("div",{className:"settings-item"},n.a.createElement("h4",{className:"settings-item-header mb-4"},u("AuthSessions.CurrentSession")),n.a.createElement(fe.a,{narrow:!0,inactive:!0},n.a.createElement("div",{className:"multiline-menu-item"},n.a.createElement("span",{className:"title"},p.appName),n.a.createElement("span",{className:"subtitle black tight"},Ga(p)),n.a.createElement("span",{className:"subtitle"},p.ip," - ",Ua(p)))),n.a.createElement(fe.a,{className:"destructive mb-0",icon:"stop",ripple:!0,narrow:!0,onClick:s},u("TerminateAllSessions")))),d&&(b=d,n.a.createElement("div",{className:"settings-item"},n.a.createElement("h4",{className:"settings-item-header mb-4"},"Other Sessions"),b.map(h))),d&&n.a.createElement(Dt.a,{isOpen:r,onClose:l,text:"Are you sure you want to terminate all other sessions?",confirmLabel:"Terminate All Other Sessions",confirmHandler:i,confirmIsDestructive:!0}),";");var b,p}));var qa=Object(n.h)(Object(c.h)(e=>{const{chats:{byId:t},users:{byId:a},blocked:{ids:n}}=e;return{chatsByIds:t,usersByIds:a,blockedIds:n}},(e,t)=>Object(u.l)(t,["unblockContact"]))(({chatsByIds:e,usersByIds:t,blockedIds:a,unblockContact:c})=>{const r=Object(n.m)(e=>{c({contactId:e})},[c]),s=Object(T.a)();return n.a.createElement("div",{className:"settings-fab-wrapper"},n.a.createElement("div",{className:"settings-content infinite-scroll"},n.a.createElement("div",{className:"settings-item"},n.a.createElement("p",{className:"settings-item-description-larger mt-0 mb-2"},s("BlockedUsersInfo"))),n.a.createElement("div",{className:"chat-list custom-scroll"},a&&a.length?n.a.createElement("div",{className:"scroll-container"},a.map((a,c)=>function(a,c,s){const o=Object(d.lb)(a),i=o?t[a]:void 0,m=o?void 0:e[a],u=Object(le.a)("Chat chat-item-clickable blocked-list-item",o?"private":"group");return n.a.createElement(fe.a,{key:a,className:u,ripple:!0,narrow:!0,contextActions:[{title:"Unblock",icon:"unlock",handler:()=>{r(a)}}],style:`top: ${(s+c)*l.h}px;`},n.a.createElement(z.a,{size:"medium",user:i,chat:m}),n.a.createElement("div",{className:"contact-info"},n.a.createElement("h3",null,Object(G.a)((o?Object(d.Z)(i):Object(d.l)(m))||"")),i&&i.phoneNumber&&n.a.createElement("div",{className:"contact-phone"},Object(Rt.c)(i.phoneNumber)),i&&!i.phoneNumber&&i.username&&n.a.createElement("div",{className:"contact-username"},"@",i.username)))}(a,c,0))):a&&!a.length?n.a.createElement("div",{className:"no-results"},"List is empty"):n.a.createElement(ge.a,{key:"loading"}))),n.a.createElement(zt,{isShown:!0,onClick:()=>{},className:"not-implemented",ariaLabel:"Add a blocked user"},n.a.createElement("i",{className:"icon-add"})))})),$a=a(119);var Ha=Object(n.h)(Object(c.h)(e=>({animatedEmoji:Object(m.c)(e,"🔐")}))(({animatedEmoji:e,onScreenSelect:t})=>{const a=Object(T.a)();return n.a.createElement("div",{className:"settings-content two-fa custom-scroll"},n.a.createElement("div",{className:"settings-content-header"},n.a.createElement($a.a,{sticker:e}),n.a.createElement("p",{className:"settings-item-description mb-3"},Object(G.a)(a("EnabledPasswordText"),["br"]))),n.a.createElement("div",{className:"settings-item pt-0 no-border"},n.a.createElement(fe.a,{icon:"edit",onClick:()=>t(s.m.TwoFaChangePasswordCurrent)},a("ChangePassword")),n.a.createElement(fe.a,{icon:"password-off",onClick:()=>t(s.m.TwoFaTurnOff)},a("TurnPasswordOff")),n.a.createElement(fe.a,{icon:"email",onClick:()=>t(s.m.TwoFaRecoveryEmailCurrentPassword)},a("SetRecoveryEmail"))))})),Va=a(137),Wa=a(138);var Ya=Object(n.h)(({error:e,isLoading:t,expectedPassword:a,placeholder:c="Current Password",hint:r,submitLabel:s,clearError:l,onSubmit:o})=>{const[i,m]=Object(n.r)(""),[d,u]=Object(n.r)(!1),h=Object(n.m)(e=>{a&&e!==a?m("Passwords Should Be Equal"):o(e)},[o,a]),b=Object(n.m)(()=>{l&&l(),m("")},[l]),p=Object(T.a)();return n.a.createElement("div",{className:"settings-content two-fa custom-scroll"},n.a.createElement("div",{className:"settings-content-header"},n.a.createElement(Va.a,{isBig:!0,isPasswordVisible:d})),n.a.createElement("div",{className:"settings-item pt-0 no-border"},n.a.createElement(Wa.a,{error:i||e,hint:r,placeholder:c,submitLabel:s||p("Next"),clearError:b,isLoading:t,isPasswordVisible:d,onChangePasswordVisibility:u,onSubmit:h})))});var Ka=Object(n.h)(Object(c.h)(e=>({animatedEmoji:Object(m.c)(e,"🔐")}))(({animatedEmoji:e,onStart:t})=>{const a=Object(T.a)();return n.a.createElement("div",{className:"settings-content two-fa custom-scroll"},n.a.createElement("div",{className:"settings-content-header"},n.a.createElement($a.a,{sticker:e}),n.a.createElement("p",{className:"settings-item-description mb-3"},a("SetAdditionalPasswordInfo"))),n.a.createElement("div",{className:"settings-item pt-0 no-border"},n.a.createElement(R.a,{onClick:t},a("EditAdminTransferSetPassword"))))}));const Za=o.f?550:400;var Qa=Object(n.h)(Object(c.h)((e,{icon:t})=>({animatedEmoji:Object(m.c)(e,"email"===t?"💌":"💡")}))(({animatedEmoji:e,type:t="text",isLoading:a,error:c,placeholder:r,shouldConfirm:s,clearError:l,onSubmit:i})=>{const m=Object(n.q)(null),[d,u]=Object(n.r)(""),[h,b,p]=Object(De.a)(!1);Object(n.n)(()=>{o.k||setTimeout(()=>{m.current.focus()},Za)},[]);const g=Object(T.a)();return n.a.createElement("div",{className:"settings-content two-fa custom-scroll"},n.a.createElement("div",{className:"settings-content-header"},n.a.createElement($a.a,{sticker:e})),n.a.createElement("div",{className:"settings-item pt-0 no-border"},n.a.createElement("form",{action:"",onSubmit:e=>{e.preventDefault(),m.current&&i(d)}},n.a.createElement(ve.a,{ref:m,value:d,inputMode:t,label:r,error:c,onChange:e=>{c&&l&&l(),u(e.target.value)}}),d?n.a.createElement(R.a,{type:"submit",isLoading:a,ripple:!0},g("Continue")):n.a.createElement(R.a,{isText:!0,isLoading:a,ripple:!0,onClick:s?b:()=>{i()}},g("YourEmailSkip"))),s&&n.a.createElement(Ee.a,{className:"narrow",isOpen:h,title:g("YourEmailSkipWarning"),onClose:p},Object(G.a)(g("YourEmailSkipWarningText"),["br","simple_markdown"]),n.a.createElement("div",{className:"dialog-buttons"},n.a.createElement(R.a,{color:"danger",ripple:!0,isText:!0,className:"confirm-dialog-button",onClick:()=>{p(),i()}},g("YourEmailSkip")),n.a.createElement(R.a,{color:"primary",ripple:!0,isText:!0,className:"confirm-dialog-button",onClick:p},g("Cancel"))))))}));var _a=Object(n.h)(Object(c.h)(e=>({animatedEmoji:Object(m.c)(e,"🥳")}))(({animatedEmoji:e,onScreenSelect:t})=>{const a=Object(T.a)();return n.a.createElement("div",{className:"settings-content two-fa custom-scroll"},n.a.createElement("div",{className:"settings-content-header"},n.a.createElement($a.a,{sticker:e}),n.a.createElement("p",{className:"settings-item-description mb-3"},a("TwoStepVerificationPasswordSetInfo"))),n.a.createElement("div",{className:"settings-item pt-0 no-border"},n.a.createElement(R.a,{onClick:()=>{t(s.m.Privacy)}},a("TwoStepVerificationPasswordReturnSettings"))))}));const Xa=o.f?550:400;var Ja=Object(n.h)(Object(c.h)(e=>({animatedEmoji:Object(m.c)(e,"💌"),codeLength:e.twoFaSettings.waitingEmailCodeLength}))(({animatedEmoji:e,codeLength:t,isLoading:a,error:c,clearError:r,onSubmit:s})=>{const l=Object(n.q)(null),[i,m]=Object(n.r)("");Object(n.n)(()=>{o.k||setTimeout(()=>{l.current.focus()},Xa)},[]);const d=Object(T.a)();return n.a.createElement("div",{className:"settings-content two-fa custom-scroll"},n.a.createElement("div",{className:"settings-content-header"},n.a.createElement($a.a,{sticker:e})),n.a.createElement("div",{className:"settings-item pt-0 no-border"},n.a.createElement(ve.a,{value:i,ref:l,inputMode:"decimal",label:d("YourEmailCode"),error:c,onChange:e=>{c&&r&&r();const a=e.target.value.slice(0,t);a.length===t&&s(a),m(a),e.target.value=a}}),a&&n.a.createElement(ge.a,null)))}));var en=Object(n.h)(Object(c.h)(e=>({...e.twoFaSettings}),(e,t)=>Object(u.l)(t,["updatePassword","updateRecoveryEmail","clearPassword","provideTwoFaEmailCode","checkPassword","clearTwoFaError"]))(({currentScreen:e,state:t,hint:a,isLoading:c,error:r,waitingEmailCodeLength:l,dispatch:o,onScreenSelect:i,updatePassword:m,checkPassword:d,clearTwoFaError:u,updateRecoveryEmail:h,provideTwoFaEmailCode:b,clearPassword:p})=>{Object(n.n)(()=>{l&&(e===s.m.TwoFaNewPasswordEmail?i(s.m.TwoFaNewPasswordEmailCode):e===s.m.TwoFaRecoveryEmail&&i(s.m.TwoFaRecoveryEmailCode))},[e,i,l]);const g=Object(n.m)(()=>{o({type:"reset"}),i(s.m.TwoFaNewPassword)},[o,i]),E=Object(n.m)(e=>{o({type:"setPassword",payload:e}),i(s.m.TwoFaNewPasswordConfirm)},[o,i]),v=Object(n.m)(()=>{i(s.m.TwoFaNewPasswordHint)},[i]),O=Object(n.m)(e=>{o({type:"setHint",payload:e}),i(s.m.TwoFaNewPasswordEmail)},[o,i]),f=Object(n.m)(e=>{o({type:"setEmail",payload:e}),m({...t,email:e,onSuccess:()=>{i(s.m.TwoFaCongratulations)}})},[o,i,t,m]),j=Object(n.m)(e=>{o({type:"setCurrentPassword",payload:e}),d({currentPassword:e,onSuccess:()=>{i(s.m.TwoFaChangePasswordNew)}})},[d,o,i]),C=Object(n.m)(e=>{o({type:"setPassword",payload:e}),i(s.m.TwoFaChangePasswordConfirm)},[o,i]),y=Object(n.m)(()=>{i(s.m.TwoFaChangePasswordHint)},[i]),k=Object(n.m)(e=>{o({type:"setHint",payload:e}),m({...t,hint:e,onSuccess:()=>{i(s.m.TwoFaCongratulations)}})},[o,i,t,m]),N=Object(n.m)(e=>{p({currentPassword:e,onSuccess:()=>{i(s.m.Privacy)}})},[p,i]),S=Object(n.m)(e=>{o({type:"setCurrentPassword",payload:e}),d({currentPassword:e,onSuccess:()=>{i(s.m.TwoFaRecoveryEmail)}})},[d,o,i]),I=Object(n.m)(e=>{o({type:"setEmail",payload:e}),h({...t,email:e,onSuccess:()=>{i(s.m.TwoFaCongratulations)}})},[o,i,t,h]),w=Object(n.m)(e=>{b({code:e})},[b]),P=Object(T.a)();switch(e){case s.m.TwoFaDisabled:return n.a.createElement(Ka,{onStart:g});case s.m.TwoFaNewPassword:return n.a.createElement(Ya,{placeholder:P("EnterPassword"),submitLabel:P("Continue"),onSubmit:E});case s.m.TwoFaNewPasswordConfirm:return n.a.createElement(Ya,{expectedPassword:t.password,placeholder:P("PleaseReEnterPassword"),submitLabel:P("Continue"),onSubmit:v});case s.m.TwoFaNewPasswordHint:return n.a.createElement(Qa,{icon:"hint",placeholder:P("PasswordHintPlaceholder"),onSubmit:O});case s.m.TwoFaNewPasswordEmail:return n.a.createElement(Qa,{icon:"email",type:"email",isLoading:c,error:r,clearError:u,placeholder:P("RecoveryEmailTitle"),shouldConfirm:!0,onSubmit:f});case s.m.TwoFaNewPasswordEmailCode:return n.a.createElement(Ja,{isLoading:c,error:r,clearError:u,onSubmit:w});case s.m.TwoFaCongratulations:return n.a.createElement(_a,{onScreenSelect:i});case s.m.TwoFaEnabled:return n.a.createElement(Ha,{onScreenSelect:i});case s.m.TwoFaChangePasswordCurrent:return n.a.createElement(Ya,{isLoading:c,error:r,clearError:u,hint:a,onSubmit:j});case s.m.TwoFaChangePasswordNew:return n.a.createElement(Ya,{placeholder:P("PleaseEnterNewFirstPassword"),onSubmit:C});case s.m.TwoFaChangePasswordConfirm:return n.a.createElement(Ya,{expectedPassword:t.password,placeholder:P("PleaseReEnterPassword"),onSubmit:y});case s.m.TwoFaChangePasswordHint:return n.a.createElement(Qa,{isLoading:c,error:r,clearError:u,icon:"hint",placeholder:P("PasswordHintPlaceholder"),onSubmit:k});case s.m.TwoFaTurnOff:return n.a.createElement(Ya,{isLoading:c,error:r,clearError:u,hint:a,onSubmit:N});case s.m.TwoFaRecoveryEmailCurrentPassword:return n.a.createElement(Ya,{isLoading:c,error:r,clearError:u,hint:a,onSubmit:S});case s.m.TwoFaRecoveryEmail:return n.a.createElement(Qa,{icon:"email",type:"email",placeholder:P("RecoveryEmailTitle"),onSubmit:I});case s.m.TwoFaRecoveryEmailCode:return n.a.createElement(Ja,{isLoading:c,error:r,clearError:u,onSubmit:w});default:return}}));var tn=Object(n.h)(({itemIds:e,selectedIds:t,filterValue:a,filterPlaceholder:c,notFoundText:r,searchInputId:s,isLoading:l,onSelectedIdsChange:o,onFilterChange:i,onLoadMore:m})=>{const u=Object(n.q)(null),h=t.length>10;Object(n.n)(()=>{setTimeout(()=>{requestAnimationFrame(()=>{u.current.focus()})},500)},[]);const b=Object(n.m)(e=>{const a=[...t];a.includes(e)?a.splice(a.indexOf(e),1):a.push(e),o(a),i("")},[t,o,i]),p=Object(n.m)(e=>{const{value:t}=e.currentTarget;i(t)},[i]),[g,E]=Object(pe.a)(m,e,Boolean(a)),v=Object(T.a)();return n.a.createElement("div",{className:"Picker"},n.a.createElement("div",{className:"picker-header custom-scroll"},t.map((e,a)=>n.a.createElement(Je.a,{chatOrUserId:e,isMinimized:h&&an.a.createElement(fe.a,{key:e,className:"chat-item-clickable picker-list-item",onClick:()=>b(e),ripple:!0},n.a.createElement(aa.a,{label:"",checked:t.includes(e)}),Object(d.lb)(e)?n.a.createElement(je.a,{userId:e}):n.a.createElement(Ce.a,{chatId:e})))):l||!g||g.length?n.a.createElement(ge.a,null):n.a.createElement("p",{className:"no-results"},r||"Sorry, nothing found."))});function an(e,t){const{privacy:a}=e.settings;switch(t){case s.m.PrivacyPhoneNumberAllowedContacts:case s.m.PrivacyPhoneNumberDeniedContacts:return a.phoneNumber;case s.m.PrivacyLastSeenAllowedContacts:case s.m.PrivacyLastSeenDeniedContacts:return a.lastSeen;case s.m.PrivacyProfilePhotoAllowedContacts:case s.m.PrivacyProfilePhotoDeniedContacts:return a.profilePhoto;case s.m.PrivacyForwardingAllowedContacts:case s.m.PrivacyForwardingDeniedContacts:return a.forwards;case s.m.PrivacyGroupChatsDeniedContacts:case s.m.PrivacyGroupChatsAllowedContacts:return a.chatInvite}}var nn=Object(n.h)(Object(c.h)((e,{screen:t})=>{const{chats:{byId:a,listIds:n,orderedPinnedIds:c},currentUserId:r}=e;return{currentUserId:r,chatsById:a,listIds:n.active,orderedPinnedIds:c.active,archivedPinnedIds:c.archived,archivedListIds:n.archived,settings:an(e,t)}},(e,t)=>Object(u.l)(t,["setPrivacySettings"]))(({currentUserId:e,isAllowList:t,screen:a,settings:c,chatsById:r,listIds:l,orderedPinnedIds:o,archivedListIds:i,archivedPinnedIds:m,setPrivacySettings:u,onScreenSelect:h})=>{const b=Object(n.p)(()=>c?t?[...c.allowUserIds,...c.allowChatIds]:[...c.blockUserIds,...c.blockChatIds]:[],[t,c]),[p,g]=Object(n.r)(""),[E,v]=Object(n.r)(!1),[O,f]=Object(n.r)(b),j=Object(n.p)(()=>{const e=l?Object(d.Ab)(r,l,o,"all"):void 0,t=i?Object(d.Ab)(r,i,m,"archived"):void 0;if(e||t)return[...e?[...e.pinnedChats,...e.otherChats]:[],...t?t.otherChats:[]]},[r,l,o,i,m]),C=Object(n.p)(()=>{if(j)return j.filter(t=>(Object(d.lb)(t.id)&&t.id!==e||Object(d.kb)(t))&&(!p||Object(be.a)(Object(d.l)(t),p)||b.includes(t.id))).map(({id:e})=>e)},[j,e,p,b]),y=Object(n.m)(e=>{f(e),v(!0)},[]),k=Object(n.m)(()=>{u({privacyKey:xa(a),isAllowList:Boolean(t),contactsIds:O}),h(s.m.Privacy)},[t,O,h,a,u]),N=Object(T.a)();return n.a.createElement("div",{className:"NewChat-inner step-1"},n.a.createElement(tn,{itemIds:C||[],selectedIds:O,filterValue:p,filterPlaceholder:N(t?"AlwaysShareWithPlaceholder":"NeverShareWithPlaceholder"),searchInputId:"new-group-picker-search",onSelectedIdsChange:y,onFilterChange:g}),n.a.createElement(zt,{isShown:E,onClick:k,ariaLabel:N(t?"AlwaysShareWithTitle":"NeverShareWithTitle")},n.a.createElement("i",{className:"icon-arrow-right"})))}));a(263);const cn=Object.keys(s.m).length/2;var rn=Object(n.h)(({currentScreen:e,onScreenSelect:t,onReset:a})=>{const[c,r]=Nt(At,Lt),[l,i]=Nt(Bt,Tt),m=Object(n.m)(()=>{e!==s.m.FoldersCreateFolder&&e!==s.m.FoldersEditFolder||setTimeout(()=>{r({type:"reset"})},200),e!==s.m.FoldersIncludedChats&&e!==s.m.FoldersExcludedChats?a():"create"===c.mode?t(s.m.FoldersCreateFolder):t(s.m.FoldersEditFolder)},[c.mode,r,e,a,t]),d=Object(n.m)(()=>{r({type:"saveFilters"}),m()},[r,m]);function u(){return n.a.createElement(n.a.Fragment,null,n.a.createElement(xt,{currentScreen:e,onReset:m,onSaveFilter:d,editedFolderId:c.folderId}),function(){switch(e){case s.m.Main:return n.a.createElement(Ut,{onScreenSelect:t});case s.m.EditProfile:return n.a.createElement(Yt,null);case s.m.General:return n.a.createElement(va,{onScreenSelect:t});case s.m.Notifications:return n.a.createElement(Ta,null);case s.m.Privacy:return n.a.createElement(Ba,{onScreenSelect:t});case s.m.Language:return n.a.createElement(Da,null);case s.m.GeneralChatBackground:return n.a.createElement(ka,{onScreenSelect:t});case s.m.GeneralChatBackgroundColor:return n.a.createElement(Aa,{onScreenSelect:t});case s.m.PrivacyActiveSessions:return n.a.createElement(za,null);case s.m.PrivacyBlockedUsers:return n.a.createElement(qa,null);case s.m.PrivacyPhoneNumber:case s.m.PrivacyLastSeen:case s.m.PrivacyProfilePhoto:case s.m.PrivacyForwarding:case s.m.PrivacyGroupChats:return n.a.createElement(Ra,{screen:e,onScreenSelect:t});case s.m.PrivacyPhoneNumberAllowedContacts:case s.m.PrivacyLastSeenAllowedContacts:case s.m.PrivacyProfilePhotoAllowedContacts:case s.m.PrivacyForwardingAllowedContacts:case s.m.PrivacyGroupChatsAllowedContacts:return n.a.createElement(nn,{isAllowList:!0,screen:e,onScreenSelect:t});case s.m.PrivacyPhoneNumberDeniedContacts:case s.m.PrivacyLastSeenDeniedContacts:case s.m.PrivacyProfilePhotoDeniedContacts:case s.m.PrivacyForwardingDeniedContacts:case s.m.PrivacyGroupChatsDeniedContacts:return n.a.createElement(nn,{screen:e,onScreenSelect:t});case s.m.Folders:case s.m.FoldersCreateFolder:case s.m.FoldersEditFolder:case s.m.FoldersIncludedChats:case s.m.FoldersExcludedChats:return n.a.createElement(ra,{currentScreen:e,state:c,dispatch:r,onScreenSelect:t,onReset:m});case s.m.TwoFaDisabled:case s.m.TwoFaNewPassword:case s.m.TwoFaNewPasswordConfirm:case s.m.TwoFaNewPasswordHint:case s.m.TwoFaNewPasswordEmail:case s.m.TwoFaNewPasswordEmailCode:case s.m.TwoFaCongratulations:case s.m.TwoFaEnabled:case s.m.TwoFaChangePasswordCurrent:case s.m.TwoFaChangePasswordNew:case s.m.TwoFaChangePasswordConfirm:case s.m.TwoFaChangePasswordHint:case s.m.TwoFaTurnOff:case s.m.TwoFaRecoveryEmailCurrentPassword:case s.m.TwoFaRecoveryEmail:case s.m.TwoFaRecoveryEmailCode:return n.a.createElement(en,{currentScreen:e,state:l,dispatch:i,onScreenSelect:t});default:return}}())}return n.a.createElement(x.a,{id:"Settings",name:o.f?"slide-layers":"push-slide",activeKey:e,renderCount:cn},u)});const sn=Object(K.g)(e=>e(),6e4,!0);var ln=Object(n.h)(Object(c.h)(e=>{const{userIds:t}=e.contactList||{},{byId:a}=e.users;return{usersById:a,contactIds:t}},(e,t)=>Object(u.l)(t,["loadContactList","openChat"]))(({filter:e,usersById:t,contactIds:a,loadContactList:c,openChat:r})=>{Object(n.n)(()=>{sn(()=>{c()})});const s=Object(n.m)(e=>{r({id:e})},[r]),l=Object(n.p)(()=>{if(!a)return;const n=e?a.filter(a=>{const n=t[a];if(!n)return!1;const c=Object(d.Z)(n);return c&&Object(be.a)(c,e)}):a;return Object(d.W)(n,t)},[e,t,a]),[i,m]=Object(pe.a)(void 0,l,Boolean(e));return n.a.createElement(Oe.a,{items:i,onLoadMore:m,className:"chat-list custom-scroll"},i&&i.length?i.map(e=>n.a.createElement(fe.a,{key:e,className:"chat-item-clickable",onClick:()=>s(e),ripple:!o.f},n.a.createElement(je.a,{userId:e,forceShowSelf:!0,avatarSize:"large"}))):i&&!i.length?n.a.createElement("p",{className:"no-results",key:"no-results"},e.length?"No contacts matched your search.":"Contact list is empty."):n.a.createElement(ge.a,{key:"loading"}))}));const on=Object(K.g)(e=>e(),6e4,!0);var mn=Object(n.h)(Object(c.h)(e=>{const{userIds:t}=e.contactList||{},{byId:a}=e.users,{query:n,fetchingStatus:c,globalResults:r,localResults:s}=e.globalSearch,{users:l}=r||{},{users:o}=s||{};return{usersById:a,localContactIds:t,searchQuery:n,isSearching:c&&c.chats,globalUsers:l,localUsers:o}},(e,t)=>Object(u.l)(t,["loadContactList","setGlobalSearchQuery"]))(({isChannel:e,selectedMemberIds:t,onSelectedMemberIdsChange:a,onNextStep:c,onReset:r,usersById:s,localContactIds:l,searchQuery:o,isSearching:i,localUsers:m,globalUsers:h,loadContactList:b,setGlobalSearchQuery:p})=>{Object(n.n)(()=>{on(()=>{b()})});const g=Object(n.m)(e=>{p({query:e})},[p]),E=Object(n.p)(()=>{if(!o)return l||[];const e=l?l.filter(e=>{const t=s[e];if(!t)return!1;const a=Object(d.Z)(t);return a&&Object(be.a)(a,o)}):[];return Object(d.W)(Object(u.o)([...e,...m?m.map(e=>e.id):[],...h?h.map(e=>e.id):[]]),s,t)},[o,l,m,h,s,t]),v=Object(n.m)(()=>{t.length&&(p({query:""}),c())},[t,p,c]),O=Object(T.a)();return n.a.createElement("div",{className:"NewChat step-1"},n.a.createElement("div",{className:"left-header"},n.a.createElement(R.a,{round:!0,size:"smaller",color:"translucent",onClick:r,ariaLabel:"Return to Chat List"},n.a.createElement("i",{className:"icon-arrow-left"})),n.a.createElement("h3",null,O("GroupAddMembers"))),n.a.createElement("div",{className:"NewChat-inner step-1"},n.a.createElement(tn,{itemIds:E,selectedIds:t,filterValue:o,filterPlaceholder:O("SendMessageTo"),searchInputId:"new-group-picker-search",isLoading:i,onSelectedIdsChange:a,onFilterChange:g}),n.a.createElement(zt,{isShown:Boolean(t.length),onClick:v,ariaLabel:e?"Continue To Channel Info":"Continue To Group Info"},n.a.createElement("i",{className:"icon-arrow-right"}))))}));var dn=Object(n.h)(Object(c.h)(e=>{const{progress:t,error:a}=e.chatCreation||{};return{creationProgress:t,creationError:a}},(e,t)=>Object(u.l)(t,["createGroupChat","createChannel"]))(({isChannel:e,memberIds:t,onReset:a,creationProgress:c,creationError:r,createGroupChat:l,createChannel:o})=>{const i=Object(T.a)(),[m,d]=Object(n.r)(""),[u,h]=Object(n.r)(""),[b,p]=Object(n.r)(),[g,E]=Object(n.r)(),v=c===s.a.InProgress,O=Object(n.m)(e=>{const{value:t}=e.currentTarget,a=t.replace(/^\s+/,"");d(a),a!==t&&(e.currentTarget.value=a)},[]),f=Object(n.m)(e=>{h(e.currentTarget.value)},[]),j=Object(n.m)(()=>{m.length?t.length>199?E("Sorry, creating supergroups is not yet supported"):l({title:m,photo:b,memberIds:t}):E("Chat title can't be empty")},[m,t,l,b,"Chat title can't be empty","Sorry, creating supergroups is not yet supported"]),C=Object(n.m)(()=>{m.length?o({title:m,about:u,photo:b,memberIds:t}):E("Channel title can't be empty")},[m,o,u,b,t,"Channel title can't be empty"]);Object(n.n)(()=>{c===s.a.Complete&&a(!0)},[c,a]);const y=r||("Chat title can't be empty"!==g&&"Channel title can't be empty"!==g?g:void 0);return n.a.createElement("div",{className:"NewChat"},n.a.createElement("div",{className:"left-header"},n.a.createElement(R.a,{round:!0,size:"smaller",color:"translucent",onClick:()=>a(),ariaLabel:"Return to member selection"},n.a.createElement("i",{className:"icon-arrow-left"})),n.a.createElement("h3",null,i(e?"NewChannel":"NewGroup"))),n.a.createElement("div",{className:"NewChat-inner step-2"},n.a.createElement(Gt.a,{onChange:p,title:i("AddPhoto")}),n.a.createElement(ve.a,{value:m,onChange:O,label:i(e?"EnterChannelName":"GroupName"),error:"Chat title can't be empty"===g||"Channel title can't be empty"===g?g:void 0}),e&&n.a.createElement(n.a.Fragment,null,n.a.createElement(ve.a,{value:u,onChange:f,label:i("DescriptionOptionalPlaceholder")}),n.a.createElement("p",{className:"note"},i("DescriptionInfo"))),y&&n.a.createElement("p",{className:"error"},y),n.a.createElement("h3",{className:"chat-members-heading"},i("GroupInfo.ParticipantCount",t.length,"i")),n.a.createElement("div",{className:"chat-members-list custom-scroll"},t.map(e=>n.a.createElement(fe.a,{inactive:!0,className:"chat-item-clickable"},n.a.createElement(je.a,{userId:e}))))),n.a.createElement(zt,{isShown:0!==m.length,onClick:e?C:j,disabled:v,ariaLabel:e?i("ChannelIntro.CreateChannel"):"Create Group"},v?n.a.createElement(B.a,{color:"white"}):n.a.createElement("i",{className:"icon-arrow-right"})))}));a(264);const un=Object.keys(s.d).length/2;var hn=Object(n.h)(({isChannel:e=!1,content:t,onContentChange:a,onReset:c})=>{const[r,l]=Object(n.r)([]),i=Object(n.m)(()=>{a(e?s.d.NewChannelStep2:s.d.NewGroupStep2)},[e,a]);return n.a.createElement(x.a,{id:"NewChat",name:o.f?"slide-layers":"push-slide",renderCount:un,activeKey:t},()=>{switch(t){case s.d.NewChannelStep1:case s.d.NewGroupStep1:return n.a.createElement(mn,{isChannel:e,selectedMemberIds:r,onSelectedMemberIdsChange:l,onNextStep:i,onReset:c});case s.d.NewChannelStep2:case s.d.NewGroupStep2:return n.a.createElement(dn,{isChannel:e,memberIds:r,onReset:c});default:return}})}),bn=a(176);a(265);var pn=Object(n.h)(({onReset:e})=>{const t=Object(T.a)();return n.a.createElement("div",{className:"ArchivedChats"},n.a.createElement("div",{className:"left-header"},n.a.createElement(R.a,{round:!0,size:"smaller",color:"translucent",onClick:e,ariaLabel:"Return to chat list"},n.a.createElement("i",{className:"icon-arrow-left"})),n.a.createElement("h3",null,t("ArchivedChats"))),n.a.createElement(bn.a,{folderType:"archived",noChatsText:"Archive is empty."}))});const gn={Down:!0,ArrowDown:!0,Up:!0,ArrowUp:!0,Left:!0,ArrowLeft:!0,Right:!0,ArrowRight:!0," ":!0,PageUp:!0,PageDown:!0,End:!0,Home:!0,Tab:!0},En=e=>{e.preventDefault()};function vn(e){gn[e.key]&&En(e)}function On(){document.addEventListener("wheel",En,{passive:!1}),window.ontouchmove=En,document.onkeydown=vn}function fn(){document.removeEventListener("wheel",En),window.ontouchmove=null,document.onkeydown=null}var jn=a(48),Cn=a(158);function yn(e,t){return e?"Copy Selected Text":t?"Copy Text":"Copy"}var kn=a(162),Nn=a(47);a(266);var Sn=({isOpen:e,message:t,anchor:a,canSendNow:c,canReschedule:s,canReply:l,canEdit:o,canPin:i,canUnpin:m,canDelete:u,canForward:h,canFaveSticker:b,canUnfaveSticker:p,canCopy:g,canCopyLink:E,canSelect:v,onReply:O,onEdit:f,onPin:j,onUnpin:C,onForward:y,onDelete:N,onFaveSticker:S,onUnfaveSticker:I,onSelect:w,onSend:P,onReschedule:M,onClose:F,onCloseAnimationEnd:L,onCopyLink:A})=>{Object(n.n)(()=>{Object(k.b)(200)},[e]);const B=function(e,t,a){const n=[],c=Object(d.N)(e),s=Object(d.G)(e),l=Object(d.D)(e,"inline"),o=s&&l&&Cn.a,i=window.getSelection();if(o&&n.push({label:"Copy Media",handler:()=>{jn.b(l,r.ApiMediaFormat.BlobUrl).then(Cn.b),t&&t()}}),c){const e=Boolean(i&&i.anchorNode&&i.anchorNode.parentNode&&i.anchorNode.parentNode.closest(".Message .content-inner")&&""!==i.toString().replace(/(?:\r\n|\r|\n)/g,""));n.push({label:yn(e,o),handler:()=>{const a=e&&i?i.toString():c;Object(Cn.c)(a),t&&t()}})}return a&&n.push({label:"CopyMessageLink",handler:()=>{a(),t&&t()}}),n}(t,F,E?A:void 0),D=Object(n.m)(()=>document.querySelector(`.active > .MessageList div[data-message-id="${t.id}"]`),[t.id]),x=Object(n.m)(()=>document.querySelector(".active > .MessageList"),[]),R=Object(n.m)(()=>document.querySelector(".MessageContextMenu .bubble"),[]),{positionX:U,positionY:G,style:z}=Object(kn.a)(a,D,x,R,10,document.querySelector(".MiddleHeader").offsetHeight),q=Object(T.a)();return n.a.createElement(Nn.a,{isOpen:e,positionX:U,positionY:G,style:z,className:"MessageContextMenu fluid",onClose:F,onCloseAnimationEnd:L},c&&n.a.createElement(V.a,{icon:"send-outline",onClick:P},q("MessageScheduleSend")),s&&n.a.createElement(V.a,{icon:"schedule",onClick:M},q("MessageScheduleEditTime")),l&&n.a.createElement(V.a,{icon:"reply",onClick:O},q("Reply")),o&&n.a.createElement(V.a,{icon:"edit",onClick:f},q("Edit")),b&&n.a.createElement(V.a,{icon:"favorite",onClick:S},q("AddToFavorites")),p&&n.a.createElement(V.a,{icon:"favorite",onClick:I},q("Stickers.RemoveFromFavorites")),g&&B.map(e=>n.a.createElement(V.a,{key:e.label,icon:"copy",onClick:e.handler},q(e.label))),i&&n.a.createElement(V.a,{icon:"pin",onClick:j},q("DialogPin")),m&&n.a.createElement(V.a,{icon:"unpin",onClick:C},q("DialogUnpin")),h&&n.a.createElement(V.a,{icon:"forward",onClick:y},q("Forward")),v&&n.a.createElement(V.a,{icon:"select",onClick:w},q("Common.Select")),u&&n.a.createElement(V.a,{destructive:!0,icon:"delete",onClick:N},q("Delete")))};var In=Object(n.h)(Object(c.h)((e,{message:t,messageListType:a})=>{const{threadId:n}=Object(m.x)(e)||{},{noOptions:c,canReply:r,canPin:s,canUnpin:l,canDelete:o,canEdit:i,canForward:d,canFaveSticker:u,canUnfaveSticker:h,canCopy:b,canCopyLink:p,canSelect:g}=n&&Object(m.b)(e,t,n)||{},E="pinned"===a,v="scheduled"===a;return{noOptions:c,canSendNow:v,canReschedule:v,canReply:!E&&!v&&r,canPin:!v&&s,canUnpin:!v&&l,canDelete:o,canEdit:!E&&i,canForward:!v&&d,canFaveSticker:!v&&u,canUnfaveSticker:!v&&h,canCopy:b,canCopyLink:!v&&p,canSelect:g}},(e,t)=>Object(u.l)(t,["setReplyingToId","setEditingId","pinMessage","openForwardMenu","faveSticker","unfaveSticker","toggleMessageSelection","sendScheduledMessages","rescheduleMessage","loadMessageLink"]))(({isOpen:e,messageListType:t,message:a,album:c,anchor:r,onClose:s,onCloseAnimationEnd:l,noOptions:o,canSendNow:i,canReschedule:m,canReply:d,canPin:u,canUnpin:h,canDelete:b,canEdit:p,canForward:g,canFaveSticker:E,canUnfaveSticker:v,canCopy:O,canCopyLink:f,canSelect:j,setReplyingToId:C,setEditingId:y,pinMessage:k,openForwardMenu:N,faveSticker:S,unfaveSticker:I,toggleMessageSelection:w,sendScheduledMessages:P,rescheduleMessage:M,loadMessageLink:F})=>{const{transitionClassNames:L}=Object(Q.a)(e,l,void 0,!1),[A,T]=Object(n.r)(!0),[B,D]=Object(n.r)(!1),[x,R]=Object(n.r)(!1),[G,z,q]=Object(De.a)(),$=Object(n.m)(()=>{T(!1),D(!0)},[]),H=Object(n.m)(()=>{T(!1),s()},[s]),V=Object(n.m)(()=>{D(!1),s()},[s]),W=Object(n.m)(()=>{R(!1),s()},[s]),Y=Object(n.m)(()=>{q(),s()},[q,s]),K=Object(n.m)(()=>{C({messageId:a.id}),H()},[C,a.id,H]),Z=Object(n.m)(()=>{y({messageId:a.id}),H()},[y,a.id,H]),_=Object(n.m)(()=>{T(!1),R(!0)},[]),X=Object(n.m)(()=>{k({messageId:a.id,isUnpin:!0}),H()},[k,a.id,H]),J=Object(n.m)(()=>{if(H(),c&&c.messages){const e=c.messages.map(({id:e})=>e);N({fromChatId:a.chatId,messageIds:e})}else N({fromChatId:a.chatId,messageIds:[a.id]})},[N,a,H,c]),ee=Object(n.m)(()=>{H(),S({sticker:a.content.sticker})},[H,a.content.sticker,S]),te=Object(n.m)(()=>{H(),I({sticker:a.content.sticker})},[H,a.content.sticker,I]),ae=Object(n.m)(()=>{const e=c&&c.messages?{messageId:a.id,childMessageIds:c.messages.map(({id:e})=>e),withShift:!1}:{messageId:a.id,withShift:!1};w(e),H()},[H,a.id,w,c]),ne=Object(n.m)(()=>{P({chatId:a.chatId,id:a.id}),H()},[H,a.chatId,a.id,P]),ce=Object(n.m)(()=>{T(!1),z()},[z]),re=Object(n.m)(e=>{M({chatId:a.chatId,messageId:a.id,scheduledAt:Math.round(e.getTime()/1e3)})},[a.chatId,a.id,M]),se=Object(n.m)(()=>{F({messageId:a.id,chatId:a.chatId}),H()},[H,F,a.chatId,a.id]);if(Object(n.n)(()=>(On(),fn),[]),o)return void H();const le=new Date;return le.setFullYear(le.getFullYear()+1),n.a.createElement("div",{className:["ContextMenuContainer",L].join(" ")},n.a.createElement(Sn,{message:a,isOpen:A,anchor:r,canSendNow:i,canReschedule:m,canReply:d,canDelete:b,canPin:u,canUnpin:h,canEdit:p,canForward:g,canFaveSticker:E,canUnfaveSticker:v,canCopy:O,canCopyLink:f,canSelect:j,onReply:K,onEdit:Z,onPin:_,onUnpin:X,onForward:J,onDelete:$,onFaveSticker:ee,onUnfaveSticker:te,onSelect:ae,onSend:ne,onReschedule:ce,onClose:H,onCopyLink:se}),n.a.createElement(Ae,{isOpen:B,isSchedule:"scheduled"===t,onClose:V,album:c,message:a}),n.a.createElement(Te,{isOpen:x,messageId:a.id,chatId:a.chatId,onClose:W}),n.a.createElement(Le,{isOpen:G,withTimePicker:!0,selectedAt:1e3*a.date,maxAt:Object(U.k)(le),isFutureMode:!0,onClose:Y,onSubmit:re}))}));a(267);var wn=Object(n.h)(Object(c.h)((e,{fromSticker:t})=>({stickerSet:Object(m.sb)(e,t.stickerSetId)}),(e,t)=>Object(u.l)(t,["loadStickers","toggleStickerSet","sendMessage"]))(({isOpen:e,fromSticker:t,stickerSet:a,onClose:c,loadStickers:r,toggleStickerSet:s,sendMessage:o})=>{const i=Object(n.q)(null),{observe:m}=Object(sa.a)({rootRef:i,throttleMs:200,isDisabled:!e});Object(n.n)(()=>{if(e){const{stickerSetId:e,stickerSetAccessHash:a}=t;r({stickerSetId:e,stickerSetAccessHash:a})}},[e,t,r]);const d=Object(n.m)(e=>{e={...e,isPreloadedGlobally:!0},o({sticker:e}),c()},[c,o]),u=Object(n.m)(()=>{s({stickerSetId:t.stickerSetId}),c()},[t.stickerSetId,c,s]);return n.a.createElement(Ee.a,{className:"StickerSetModal",isOpen:e,onClose:c,hasCloseButton:!0,title:a?a.title:"Sticker Set"},a&&a.stickers?n.a.createElement(n.a.Fragment,null,n.a.createElement("div",{ref:i,className:"stickers custom-scroll"},a.stickers.map(e=>n.a.createElement(ha,{sticker:e,size:l.lb,observeIntersection:m,onClick:d,clickArg:e}))),n.a.createElement("div",{className:"button-wrapper"},n.a.createElement(R.a,{size:"smaller",fluid:!0,color:a.installedDate?"danger":"primary",onClick:u},`${a.installedDate?"Remove":"Add"} ${a.count} stickers`))):n.a.createElement(ge.a,null))})),Pn=a(114);a(268);var Mn=Object(n.h)(Object(c.h)((e,{chatId:t})=>{const a=Object(m.f)(e,t);return!a||a.isRestricted?{}:{chat:a,isMuted:a.isMuted,isPrivate:Object(d.lb)(a.id),canDeleteChat:Object(d.d)(a)}},(e,t)=>Object(u.l)(t,["updateChatMutedState","enterMessageSelectMode"]))(({chatId:e,isOpen:t,anchor:a,isChannel:c,canSubscribe:r,canSearch:s,canMute:l,canSelect:i,canLeave:m,chat:d,isPrivate:u,isMuted:h,canDeleteChat:b,onSubscribeChannel:p,onSearchClick:g,onClose:E,onCloseAnimationEnd:v,updateChatMutedState:O,enterMessageSelectMode:f})=>{const[j,C]=Object(n.r)(!0),[y,k]=Object(n.r)(!1),{x:N,y:S}=a;Object(Q.a)(t,v,void 0,!1);const I=Object(n.m)(()=>{C(!1),k(!0)},[]),w=Object(n.m)(()=>{C(!1),E()},[E]),P=Object(n.m)(()=>{k(!1),E()},[E]),M=Object(n.m)(()=>{O({chatId:e,isMuted:!h}),w()},[e,w,h,O]),F=Object(n.m)(()=>{p(),w()},[w,p]),L=Object(n.m)(()=>{g(),w()},[w,g]),A=Object(n.m)(()=>{f(),w()},[w,f]);Object(n.n)(()=>(On(),fn),[]);const B=Object(T.a)();return n.a.createElement(Pn.a,null,n.a.createElement("div",{className:"HeaderMenuContainer"},n.a.createElement(Nn.a,{isOpen:j,positionX:"right",style:`left: ${N}px;top: ${S}px;`,onClose:w},o.f&&r&&n.a.createElement(V.a,{icon:c?"channel":"group",onClick:F},B(c?"Subscribe":"Join Group")),o.f&&s&&n.a.createElement(V.a,{icon:"search",onClick:L},B("Search")),l&&n.a.createElement(V.a,{icon:h?"unmute":"mute",onClick:M},B(h?"ChatsUnmute":"ChatsMute")),i&&n.a.createElement(V.a,{icon:"select",onClick:A},B("ReportSelectMessages")),m&&n.a.createElement(V.a,{destructive:!0,icon:"delete",onClick:I},B(u?"Delete":b?"Delete and Leave":"Leave"))),d&&n.a.createElement($e.a,{isOpen:y,onClose:P,chat:d})))})),Fn=a(142);a(269);const Ln=Object(K.a)(e=>e(),200,!1);var An=Object(n.h)(Object(c.h)(e=>{const t=Object(m.q)(e);if(!t)return{};const{query:a,results:n}=Object(m.z)(e)||{},{totalCount:c,foundIds:r}=n||{};return{chat:t,query:a,totalCount:c,foundIds:r}},(e,t)=>Object(u.l)(t,["setLocalTextSearchQuery","searchTextMessagesLocal","focusMessage","closeLocalTextSearch","searchMessagesByDate"]))(({isActive:e,chat:t,query:a,totalCount:c,foundIds:r,setLocalTextSearchQuery:s,searchTextMessagesLocal:l,focusMessage:o,closeLocalTextSearch:i,searchMessagesByDate:m})=>{const d=Object(n.q)(null),[u,h]=Object(n.r)(0),[b,p,g]=Object(De.a)();Object(n.n)(()=>{const{visualViewport:e}=window;if(!e)return;const t=document.getElementById("Main"),a=()=>{const{activeElement:a}=document;if(a&&a===d.current){const{pageTop:a,height:n}=e;t.style.transform=`translateY(${a}px)`,t.style.height=n+"px",document.documentElement.scrollTop=a}else t.style.transform="",t.style.height=""};return e.addEventListener("resize",a),()=>{e.removeEventListener("resize",a)}},[]),Object(n.n)(()=>{t&&r&&r.length?(o({chatId:t.id,messageId:r[r.length-1]}),h(0)):h(-1)},[t,o,r]),Object(n.n)(()=>{Array.from(document.querySelectorAll("input")).forEach(t=>{t.disabled=Boolean(e&&t!==d.current)}),Array.from(document.querySelectorAll("div[contenteditable]")).forEach(t=>{t.contentEditable=e?"false":"true"})},[e]),Object(n.n)(()=>{e||d.current.blur()},[e]),Object(n.o)(()=>{document.querySelector("#MobileSearch input").blur()},[b]);const E=Object(n.m)(e=>{s({query:e}),e.length&&Ln(l)},[l,s]),v=Object(n.m)(e=>{m({timestamp:e.valueOf()/1e3}),g()},[g,m]),O=Object(n.m)(()=>{if(t&&r){const e=u+1;o({chatId:t.id,messageId:r[r.length-1-e]}),h(e)}},[t,u,o,r]),f=Object(n.m)(()=>{if(t&&r){const e=u-1;o({chatId:t.id,messageId:r[r.length-1-e]}),h(e)}},[t,u,o,r]),j=Object(T.a)();return n.a.createElement("div",{id:"MobileSearch",className:e?"active":""},n.a.createElement("div",{className:"header"},n.a.createElement(R.a,{size:"smaller",round:!0,color:"translucent",onClick:i},n.a.createElement("i",{className:"icon-arrow-left"})),n.a.createElement(Fn.a,{ref:d,value:a,onChange:E})),n.a.createElement("div",{className:"footer"},n.a.createElement("div",{className:"counter"},a?r&&r.length?`${u+1} of ${c}`:r&&!r.length?"No results":"":n.a.createElement(R.a,{round:!0,size:"smaller",color:"translucent",onClick:p,ariaLabel:"Search messages by date"},n.a.createElement("i",{className:"icon-calendar"}))),n.a.createElement(R.a,{round:!0,size:"smaller",color:"translucent",onClick:O,disabled:!r||!r.length||u===r.length-1},n.a.createElement("i",{className:"icon-up"})),n.a.createElement(R.a,{round:!0,size:"smaller",color:"translucent",onClick:f,disabled:!r||!r.length||0===u},n.a.createElement("i",{className:"icon-down"}))),n.a.createElement(Le,{isOpen:b,isPastMode:!0,submitButtonLabel:j("JumpToDate"),onClose:g,onSubmit:v}))})),Tn=a(53),Bn=a(178),Dn=a(167),xn=a(171);var Rn=function(e,t){const a=e.scrollTop,n=a+e.offsetHeight,c=t.offsetTop,r=c+t.offsetHeight;return c>a&&r{const l=Object(n.q)(null),{shouldRender:o,transitionClassNames:i}=Object(Q.a)(e,void 0,void 0,!1),m=Object(n.m)(e=>{if(!s)return-1;const t=s.length;return Object(Gn.a)(t,e)},[s]),[d,u]=Object(n.r)(-1),h=Object(n.m)((e,t)=>{t.preventDefault(),u(t=>m(t+e))},[u,m]),b=Object(n.m)((e,t=!1)=>{const a=r&&r[e];a&&c(a,t)},[r,c]),p=Object(n.m)(e=>{if(s&&s.length&&d>-1){const t=s[d];t&&(e.preventDefault(),b(t.userId,!0))}},[s,d,b]);Object(n.n)(()=>e?Object(xe.a)({onEsc:a,onUp:e=>h(-1,e),onDown:e=>h(1,e),onEnter:p,onTab:p}):void 0,[e,a,h,p]),Object(n.n)(()=>{s&&!s.length&&a()},[s,a]),Object(n.n)(()=>{u(0)},[t]),Object(n.n)(()=>{!function(e,t){const a=t.current;if(!a||e<0)return;const{visibleIndexes:n,allElements:c}=function(e,t,a=0,n=!1,c=!1){const r=e.scrollTop,s=r+e.offsetHeight,l="string"==typeof t?e.querySelectorAll(t):t,{length:o}=l,i=[];let m=!1;for(let e=0;e=r-a&&d<=s+a:o<=s+a&&d>=r-a)i.push(e),m=!0;else if(m&&!n)break}return{allElements:l,visibleIndexes:i}}(a,".chat-item-clickable",8,!0,!0);if(!c.length||!c[e])return;const r=n[0];if(!n.includes(e)||e===r&&!Rn(a,c[r])){const t=e>n[n.length-1]?"start":"end";Object(Un.a)(a,c[e],t,10)}}(d,l)},[d]);const g=Object(y.a)(s&&s.length?s:void 0,o),E=s&&!s.length?g:s;if(!o||E&&!E.length)return;const v=Object(le.a)("MentionMenu custom-scroll",i);return n.a.createElement("div",{className:v,ref:l},E&&E.map(({userId:e},t)=>n.a.createElement(fe.a,{key:e,className:"chat-item-clickable scroll-item",onClick:()=>b(e),focus:d===t},n.a.createElement(je.a,{userId:e,avatarSize:"small",withHandle:!0}))))});a(271);var qn=Object(n.h)(({attachments:e,caption:t,canSuggestMembers:a,groupChatMembers:c,currentUserId:r,usersById:s,onCaptionUpdate:o,onSend:i,onClear:m})=>{const d=Object(y.a)(e),u=e.length?e:d,h=Boolean(e.length),{isMentionMenuOpen:p,mentionFilter:g,closeMentionMenu:E,insertMention:v,mentionFilteredMembers:O}=Object(Bn.a)(a&&h,t,o,l.s,c,r,s);Object(n.n)(()=>h?Object(b.a)(m):void 0,[h,m]);const f=Object(n.m)(()=>{h&&i()},[h,i]),j=Object(T.a)();if(!u)return;const C=u.every(e=>e.mimeType.startsWith("image/")),k=u.every(e=>e.mimeType.startsWith("video/"));let N="";N=C?1===u.length?"Send Photo":`Send ${u.length} Photos`:k?1===u.length?"Send Video":`Send ${u.length} Videos`:1===u.length?"Send File":`Send ${u.length} Files`;const S=u.every(e=>e.quick);return n.a.createElement(Ee.a,{isOpen:h,onClose:m,header:function(){if(u)return n.a.createElement("div",{className:"modal-header-condensed"},n.a.createElement(R.a,{round:!0,color:"translucent",size:"smaller",ariaLabel:"Cancel attachments",onClick:m},n.a.createElement("i",{className:"icon-close"})),n.a.createElement("div",{className:"modal-title"},N),n.a.createElement(R.a,{color:"primary",size:"smaller",className:"modal-action-button",onClick:f},j("Send")))}(),className:"AttachmentModal"},S?n.a.createElement("div",{className:"media-wrapper custom-scroll"},u.map(e=>e.mimeType.startsWith("image/")?n.a.createElement("img",{src:e.blobUrl,alt:""}):n.a.createElement("video",{src:e.blobUrl,autoPlay:!0,muted:!0,loop:!0}))):n.a.createElement("div",{className:"document-wrapper custom-scroll"},u.map(e=>n.a.createElement(Dn.a,{name:e.filename,extension:Object(Tn.d)(e.filename,e.mimeType),previewData:e.previewBlobUrl,size:e.size,smaller:!0}))),n.a.createElement("div",{className:"attachment-caption-wrapper"},n.a.createElement(zn,{isOpen:p,onClose:E,filter:g,onInsertUserName:v,filteredChatMembers:O,usersById:s}),n.a.createElement(xn.a,{id:"caption-input-text",html:t,editableInputId:l.s,placeholder:j("Caption"),onUpdate:o,onSend:i,shouldSetFocus:h})))}),$n=a(123);a(272);var Hn=Object(n.h)(({isOpen:e,onSend:t,onClear:a})=>{const c=Object(n.q)(null),r=Object(n.q)(null),s=Object(n.q)(null),[l,o]=Object(n.r)(""),[i,m]=Object(n.r)([""]),[d,u]=Object(n.r)(!0),[h,p]=Object(n.r)(!1),[g,E]=Object(n.r)(!1),[v,O]=Object(n.r)(),[f,j]=Object(n.r)(),[C,y]=Object(n.r)(!1),k=Object(n.m)(t=>{e&&t.current&&t.current.focus()},[e]);Object(n.n)(()=>e?Object(b.a)(a):void 0,[e,a]),Object(n.n)(()=>{e||(o(""),m([""]),u(!0),p(!1),E(!1),O(""),j(""),y(!1))},[e]),Object(n.n)(()=>k(c),[k,e]),Object(n.o)(()=>{const e=s.current;e&&v!==e.innerHTML&&(e.innerHTML=v)},[v]);const N=Object(n.m)((e=[])=>{m([...e,""]),requestAnimationFrame(()=>{const e=r.current;e&&(e.classList.toggle("overflown",e.scrollHeight>320),e.scrollTo({top:e.scrollHeight,behavior:"smooth"}))})},[]),S=Object(n.m)(()=>{if(y(!1),!e)return;const a=l.trim().substring(0,255),n=i.map(e=>e.trim().substring(0,100)).filter(e=>e.length);if(!a||n.length<2)return o(a),n.length?n.length<2?N(n):m(n):N(),void y(!0);if(g&&(!f||!n[Number(f)]))return void y(!0);const c={summary:{question:a,answers:n.map((e,t)=>({text:e.trim(),option:String(t),...String(t)===f&&{correct:!0}})),...!d&&{isPublic:!0},...h&&{multipleChoice:!0},...g&&{quiz:!0}}};if(g){const{text:e,entities:t}=v&&Object($n.a)(v.substring(0,200))||{};c.quiz={correctAnswers:[f],...e&&{solution:e},...t&&{solutionEntities:t}}}t(c)},[e,l,i,g,f,d,h,t,N,v]),I=Object(n.m)((e,t)=>{const a=[...i];a[e]=t,a[a.length-1].trim().length&&a.length<10?N(a):m(a)},[i,N]),w=Object(n.m)(e=>{const t=[...i];t.splice(e,1),m(t),requestAnimationFrame(()=>{r.current&&r.current.classList.toggle("overflown",r.current.scrollHeight>320)})},[i]),P=Object(n.m)(e=>{j(e)},[j]),M=Object(n.m)(e=>{u(e.target.checked)},[]),F=Object(n.m)(e=>{p(e.target.checked)},[]),L=Object(n.m)(e=>{E(e.target.checked)},[]),A=Object(n.m)(e=>{13===e.keyCode&&S()},[S]),B=Object(n.m)(()=>{if(C&&!l.trim().length)return"Please enter the question"},[C,l]),D=Object(n.m)(e=>{const t=i.map(e=>e.trim()).filter(e=>e.length);if(C&&t.length<2&&!i[e].trim().length)return"Please enter at least two options"},[C,i]),x=Object(T.a)();function U(){return i.map((e,t)=>n.a.createElement("div",{className:"option-wrapper"},n.a.createElement(ve.a,{label:t!==i.length-1||10===i.length?"Option "+(t+1):"Add an Option",error:D(t),value:e,onChange:e=>I(t,e.currentTarget.value),onKeyPress:A}),t!==i.length-1&&n.a.createElement(R.a,{className:"option-remove-button",round:!0,color:"translucent",size:"smaller",ariaLabel:"Remove option",onClick:()=>w(t)},n.a.createElement("i",{className:"icon-close"}))))}return n.a.createElement(Ee.a,{isOpen:e,onClose:a,header:n.a.createElement("div",{className:"modal-header-condensed"},n.a.createElement(R.a,{round:!0,color:"translucent",size:"smaller",ariaLabel:"Cancel poll creation",onClick:a},n.a.createElement("i",{className:"icon-close"})),n.a.createElement("div",{className:"modal-title"},x("NewPoll")),n.a.createElement(R.a,{color:"primary",size:"smaller",className:"modal-action-button",onClick:S},x("Create"))),className:"PollModal"},n.a.createElement(ve.a,{ref:c,label:x("AskAQuestion"),value:l,error:B(),onChange:e=>o(e.currentTarget.value),onKeyPress:A}),n.a.createElement("div",{className:"options-divider"}),n.a.createElement("div",{className:"options-list custom-scroll",ref:r},n.a.createElement("h3",{className:"options-header"},"Options"),C&&function(){const e=i.map(e=>e.trim()).filter(e=>e.length);return g&&(!f||!e[Number(f)])&&n.a.createElement("p",{className:"error"},"Please choose the correct answer")}(),g?n.a.createElement(oa.a,{name:"correctOption",options:U().map((e,t)=>({value:String(t),label:e,hidden:t===i.length-1})),onChange:P}):U()),n.a.createElement("div",{className:"options-divider"}),n.a.createElement("div",{className:"quiz-mode"},n.a.createElement(aa.a,{label:x("PollAnonymous"),checked:d,onChange:M}),n.a.createElement(aa.a,{label:x("PollMultiple"),checked:h,disabled:g,onChange:F}),n.a.createElement(aa.a,{label:x("PollQuiz"),checked:g,disabled:h,onChange:L}),g&&n.a.createElement(n.a.Fragment,null,n.a.createElement("h3",{className:"options-header"},"Solution"),n.a.createElement("div",{ref:s,className:"form-control",contentEditable:!0,onChange:e=>O(e.currentTarget.innerHTML)}),n.a.createElement("div",{className:"note"},"Users will see this comment after choosing a wrong answer, good for educational purposes."))))});let Vn;function Wn(e,t,a=250){const c=Object(n.q)(!1);Object(n.n)(()=>{Vn&&(clearTimeout(Vn),Vn=void 0),e&&!o.k&&(Vn=window.setTimeout(()=>{c.current||t()},2*a))},[e,a,t]);return[Object(n.m)(()=>{c.current=!0},[]),Object(n.m)(()=>{c.current=!1,Vn&&(clearTimeout(Vn),Vn=void 0),Vn=window.setTimeout(()=>{c.current||t()},a)},[a,t])]}var Yn=a(67),Kn=a(143);a(273);var Zn=Object(n.h)(({emoji:e,onClick:t})=>{const a=Object(n.m)(()=>{t(e.native,e.id)},[e,t]);return n.a.createElement("div",{className:"EmojiButton",onClick:a,title:e.colons},o.c?e.native:n.a.createElement("img",{src:`/img-apple-64/${e.image}.png`,alt:"",loading:"lazy"}))});var Qn=Object(n.h)(({category:e,index:t,allEmojis:a,observeIntersection:c,shouldRender:r,onEmojiSelect:s})=>{const l=Object(n.q)(null);Object(sa.c)(l,c);const{transitionClassNames:i}=Object(Q.a)(r,void 0,void 0,"slow"),m=Object(T.a)(),d=o.f?Math.floor((S.a.get().width-8)/44):9,u=44*Math.ceil(e.emojis.length/d);return n.a.createElement("div",{ref:l,key:e.id,id:"emoji-category-"+t,className:"symbol-set"},n.a.createElement("p",{className:"symbol-set-name"},m("recent"===e.id?"RecentStickers":"Emoji"+t)),n.a.createElement("div",{className:Object(le.a)("symbol-set-container",i),style:`height: ${u}px;`},r&&e.emojis.map(e=>{const t=a[e],c="id"in t?t:t[1];return n.a.createElement(Zn,{key:c.id,emoji:c,onClick:s})})))});a(274);const _n={recent:"icon-recent",people:"icon-smile",nature:"icon-animals",foods:"icon-eats",activity:"icon-sport",places:"icon-car",objects:"icon-lamp",symbols:"icon-language",flags:"icon-flag"},Xn=[];let Jn,ec,tc;var ac=Object(n.h)(Object(c.h)(e=>Object(u.l)(e,["recentEmojis"]),(e,t)=>Object(u.l)(t,["addRecentEmoji"]))(({className:e,onEmojiSelect:t,recentEmojis:c,addRecentEmoji:r})=>{const s=Object(n.q)(null),i=Object(n.q)(null),[m,d]=Object(n.r)(),[u,h]=Object(n.r)(),[b,p]=Object(n.r)(0),{observe:g}=Object(sa.a)({rootRef:s,throttleMs:200},e=>{e.forEach(e=>{const{id:t}=e.target;if(!t||!t.startsWith("emoji-category-"))return;const a=Number(t.replace("emoji-category-",""));Xn[a]=e.isIntersecting});const t=Xn.map((e,t)=>({index:t,isIntersecting:e})).filter(({isIntersecting:e})=>e);t.length&&p(t[Math.floor(t.length/2)].index)});Object(Ve.a)(i,!o.f),Object(n.n)(()=>{if(!m)return;const e=i.current;if(!e)return;const t=42*b-e.offsetWidth/2+21;Object(Kn.a)(e,t)},[m,b]);const E=Object(T.a)(),v=Object(n.p)(()=>{if(!m)return ze.a;const e=[...m];return c&&c.length&&e.unshift({id:"recent",name:E("RecentStickers"),emojis:c}),e},[m,E,c]);Object(n.n)(()=>{setTimeout(()=>{const e=()=>{d(tc.categories),h(tc.emojis)};tc?e():async function(){Jn||(Jn=a.e(9).then(a.t.bind(null,303,3)),ec=(await Jn).default,tc=Object(Yn.b)(ec));return Jn}().then(e)},200)},[]);const O=Object(n.m)(e=>{p(e);const t=document.getElementById("emoji-category-"+e);Object(Un.a)(s.current,t,"start",50,800)},[]),f=Object(n.m)((e,a)=>{t(e),r({emoji:a})},[r,t]),j=Object(ot.a)([],l.L);const C=Object(le.a)("EmojiPicker",e);return u&&j?n.a.createElement("div",{className:C},n.a.createElement("div",{ref:i,className:"EmojiPicker-header"},v.map((function(e,t){const a=_n[e.id];return a&&n.a.createElement(R.a,{className:"symbol-set-button "+(t===b?"activated":""),round:!0,faded:!0,color:"translucent",onClick:()=>O(t),ariaLabel:e.name},n.a.createElement("i",{className:a}))}))),n.a.createElement("div",{ref:s,className:"EmojiPicker-main no-selection no-scrollbar"},v.map((e,t)=>n.a.createElement(Qn,{category:e,index:t,allEmojis:u,observeIntersection:g,shouldRender:b>=t-1&&b<=t+1,onEmojiSelect:f})))):n.a.createElement("div",{className:C},n.a.createElement(ge.a,null))}));const nc=o.f?8:16;var cc=Object(n.h)(({stickerSet:e,loadAndPlay:t,index:a,observeIntersection:c,shouldRender:r,onStickerSelect:s,onStickerUnfave:i})=>{const m=Object(n.q)(null);Object(sa.c)(m,c);const{transitionClassNames:d}=Object(Q.a)(r,void 0,void 0,"slow"),u=o.f?Math.floor((S.a.get().width-8)/(l.mb+nc)):5,h=Math.ceil(e.count/u)*(l.mb+nc);return n.a.createElement("div",{ref:m,key:e.id,id:"sticker-set-"+a,className:"symbol-set"},n.a.createElement("p",{className:"symbol-set-name"},e.title),n.a.createElement("div",{className:Object(le.a)("symbol-set-container",d),style:`height: ${h}px;`},r&&e.stickers&&e.stickers.map(a=>n.a.createElement(ha,{key:a.id,sticker:a,size:l.mb,observeIntersection:c,noAnimate:!t,onClick:s,clickArg:a,onUnfaveClick:"favorite"===e.id?i:void 0}))))});a(275);const rc=[];var sc=Object(n.h)(Object(c.h)(e=>{const{setsById:t,added:a,recent:n,favorite:c}=e.stickers;return{recentStickers:n.stickers,favoriteStickers:c.stickers,stickerSetsById:t,addedSetIds:a.setIds,shouldPlay:e.settings.byKey.shouldLoopStickers}},(e,t)=>Object(u.l)(t,["loadStickerSets","loadRecentStickers","loadFavoriteStickers","loadAddedStickers","addRecentSticker","unfaveSticker"]))(({className:e,loadAndPlay:t,canSendStickers:a,recentStickers:c,favoriteStickers:r,addedSetIds:s,stickerSetsById:o,shouldPlay:i,onStickerSelect:m,loadStickerSets:d,loadRecentStickers:u,loadFavoriteStickers:h,loadAddedStickers:b,addRecentSticker:p,unfaveSticker:g})=>{const E=Object(n.q)(null),v=Object(n.q)(null),[O,f]=Object(n.r)(0),{observe:j}=Object(sa.a)({rootRef:E,throttleMs:200},e=>{e.forEach(e=>{const{id:t}=e.target;if(!t||!t.startsWith("sticker-set-"))return;const a=Number(t.replace("sticker-set-",""));rc[a]=e.isIntersecting});const t=rc.map((e,t)=>({index:t,isIntersecting:e})).filter(({isIntersecting:e})=>e);t.length&&f(t[Math.floor(t.length/2)].index)}),{observe:C}=Object(sa.a)({rootRef:v}),y=Object(T.a)(),k=Boolean(s),N=Object(n.p)(()=>s?[{id:"recent",title:y("RecentStickers"),stickers:c,count:c.length},{id:"favorite",title:y("FavoriteStickers"),stickers:r,count:r.length},...s.map(e=>o[e]).filter(Boolean)]:ze.a,[s,y,c,r,o]),S=Object(n.p)(()=>k&&0===N.filter(e=>e.stickers&&e.stickers.length).length,[N,k]);Object(n.n)(()=>{t&&(d(),u(),h())},[t,h,u,d]),Object(n.n)(()=>{s&&s.length&&b()},[s,b]),Object(Ve.a)(v),Object(n.n)(()=>{if(!k)return;const e=v.current;if(!e)return;const t=52*O-(e.offsetWidth/2-26);Object(Kn.a)(e,t)},[k,O]);const I=Object(n.m)(e=>{f(e);const t=document.getElementById("sticker-set-"+e);Object(Un.a)(E.current,t,"start",void 0,500)},[]),w=Object(n.m)(e=>{m(e),p({sticker:e})},[p,m]),P=Object(n.m)(e=>{g({sticker:e})},[g]),M=Object(ot.a)([],l.db);const F=Object(le.a)("StickerPicker",e);return k&&M&&!S&&a?n.a.createElement("div",{className:F},n.a.createElement("div",{ref:v,className:"StickerPicker-header no-selection no-scrollbar"},N.map((function(e,t){const a=e.stickers&&e.stickers[0],c=Object(le.a)("symbol-set-button sticker-set-button",t===O&&"activated");return"recent"===e.id||"favorite"===e.id||e.hasThumbnail||!a?n.a.createElement(R.a,{key:e.id,className:c,ariaLabel:e.title,round:!0,faded:"recent"===e.id||"favorite"===e.id,color:"translucent",onClick:()=>I(t)},"recent"===e.id?n.a.createElement("i",{className:"icon-recent"}):"favorite"===e.id?n.a.createElement("i",{className:"icon-favorite"}):e.isAnimated?n.a.createElement(da,{stickerSet:e,observeIntersection:C}):n.a.createElement(ua,{stickerSet:e,observeIntersection:C})):n.a.createElement(ha,{key:e.id,sticker:a,size:l.nb,title:e.title,className:c,observeIntersection:C,onClick:I,clickArg:t})}))),n.a.createElement("div",{ref:E,className:"StickerPicker-main no-scrollbar"},N.map((e,a)=>n.a.createElement(cc,{key:e.id,stickerSet:e,loadAndPlay:Boolean(i&&t),index:a,observeIntersection:j,shouldRender:O>=a-1&&O<=a+1,onStickerSelect:w,onStickerUnfave:P})))):n.a.createElement("div",{className:F},a?S?n.a.createElement("div",{className:"picker-disabled"},"You have no saved Stickers."):n.a.createElement(ge.a,null):n.a.createElement("div",{className:"picker-disabled"},"Sending stickers is not allowed in this chat."))}));a(276);function lc(){return(lc=Object.assign||function(e){for(var t=1;t{const s=Object(n.q)(null),l=Object(n.q)(null),o="gif"+e.id,i=Object(sa.b)(s,t)&&!a,m=Object(E.a)(o+"?size=m",!i,r.ApiMediaFormat.BlobUrl),d=Object(j.a)(e.thumbnail&&e.thumbnail.dataUri,Boolean(m)),u=m||d,h=Object(E.a)(o,!i,r.ApiMediaFormat.BlobUrl),b=Boolean(i&&h),{transitionClassNames:p}=Object(ia.a)(u||h,"slow"),{isBuffered:g,bufferingHandlers:v}=Object(_.a)(!0),O=i&&!g;Object(J.a)(l,[b]);const f=Object(n.m)(()=>c({...e,blobUrl:h}),[c,e,h]),C=Object(le.a)("GifButton",e.width&&e.height&&e.width({savedGifs:e.gifs.saved.gifs}),(e,t)=>Object(u.l)(t,["loadSavedGifs"]))(({className:e,loadAndPlay:t,canSendGifs:a,savedGifs:c,onGifSelect:r,loadSavedGifs:s})=>{const o=Object(n.q)(null),{observe:i}=Object(sa.a)({rootRef:o,debounceMs:300});Object(n.n)(()=>{t&&s()},[t,s]);const m=Object(ot.a)([],l.db);return n.a.createElement("div",{ref:o,className:Object(le.a)("GifPicker no-scrollbar",e)},a?m&&c&&c.length?c.map(e=>n.a.createElement(oc,{key:e.id,gif:e,observeIntersection:i,isDisabled:!t,onClick:r})):m&&c?n.a.createElement("div",{className:"picker-disabled"},"No saved GIFs."):n.a.createElement(ge.a,null):n.a.createElement("div",{className:"picker-disabled"},"Sending GIFs is not allowed in this chat."))}));let mc;!function(e){e[e.Emoji=0]="Emoji",e[e.Stickers=1]="Stickers",e[e.GIFs=2]="GIFs"}(mc||(mc={}));const dc=Object.values(mc).filter(e=>"string"==typeof e),uc={[mc.Emoji]:"icon-smile",[mc.Stickers]:"icon-stickers",[mc.GIFs]:"icon-gifs"};var hc=Object(n.h)(({activeTab:e,onSwitchTab:t,onRemoveSymbol:a,onSearchOpen:c})=>{function r(a){return n.a.createElement(R.a,{className:"symbol-tab-button "+(e===a?"activated":""),onClick:()=>t(a),ariaLabel:dc[a],round:!0,faded:!0,color:"translucent"},n.a.createElement("i",{className:uc[a]}))}const s=Object(n.m)(()=>{c(e===mc.Stickers?"stickers":"gifs")},[e,c]);return n.a.createElement("div",{className:"SymbolMenu-footer",onClick:function(e){e.stopPropagation()}},e!==mc.Emoji&&n.a.createElement(R.a,{className:"symbol-search-button",ariaLabel:e===mc.Stickers?"Search Stickers":"Search GIFs",round:!0,faded:!0,color:"translucent",onClick:s},n.a.createElement("i",{className:"icon-search"})),r(mc.Emoji),r(mc.Stickers),r(mc.GIFs),e===mc.Emoji&&n.a.createElement(R.a,{className:"symbol-delete-button",onClick:a,ariaLabel:"Remove Symbol",round:!0,faded:!0,color:"translucent"},n.a.createElement("i",{className:"icon-delete-left"})))});a(278);let bc=!1;var pc=Object(n.h)(({isOpen:e,allowedAttachmentOptions:t,onLoad:a,onClose:c,onEmojiSelect:r,onStickerSelect:s,onGifSelect:l,onRemoveSymbol:i,onSearchOpen:m})=>{const[d,u]=Object(n.r)(0),[h,b]=Wn(e,c),{shouldRender:p,transitionClassNames:g}=Object(Q.a)(e,c,!1,!1);!bc&&e&&(bc=!0),Object(n.n)(()=>{a()},[a]),Object(n.o)(()=>{if(o.f)return e&&(document.body.classList.add("enable-symbol-menu-transforms"),document.body.classList.add("is-symbol-menu-open")),()=>{e&&Object(K.b)(()=>{document.body.classList.remove("is-symbol-menu-open"),setTimeout(()=>{document.body.classList.remove("enable-symbol-menu-transforms")},350)})}},[e]);const E=Object(n.m)(e=>{c(),m(e)},[c,m]),v=Object(T.a)(),{canSendStickers:O,canSendGifs:f}=t;function j(t,a){switch(d){case mc.Emoji:return n.a.createElement(ac,{className:"picker-tab",onEmojiSelect:r});case mc.Stickers:return n.a.createElement(sc,{className:"picker-tab",loadAndPlay:!!O&&(e&&(t||a)),canSendStickers:O,onStickerSelect:s});case mc.GIFs:return n.a.createElement(ic,{className:"picker-tab",loadAndPlay:!!f&&(e&&(t||a)),canSendGifs:f,onGifSelect:l})}}const C=n.a.createElement(n.a.Fragment,null,n.a.createElement("div",{className:"SymbolMenu-main",onClick:function(e){e.stopPropagation()}},bc&&n.a.createElement(x.a,{name:"slide",activeKey:d,renderCount:dc.length},j)),o.f&&n.a.createElement(R.a,{round:!0,faded:!0,color:"translucent",ariaLabel:v("Close"),className:"symbol-close-button",size:"tiny",onClick:c},n.a.createElement("i",{className:"icon-close"})),n.a.createElement(hc,{activeTab:d,onSwitchTab:u,onRemoveSymbol:i,onSearchOpen:E}));if(o.f){if(!p)return;const e=Object(le.a)("SymbolMenu mobile-menu",g);return n.a.createElement(Pn.a,null,n.a.createElement("div",{className:e},C))}return n.a.createElement(Nn.a,{isOpen:e,positionX:"left",positionY:"bottom",onClose:c,className:"SymbolMenu",onCloseAnimationEnd:c,onMouseEnter:o.k?void 0:h,onMouseLeave:o.k?void 0:b,noCloseOnBackdrop:!o.k},C)});a(279);var gc=Object(n.h)(({isOpen:e,allowedAttachmentOptions:t,onFileSelect:a,onPollCreate:c,onClose:r})=>{const[s,i]=Wn(e,r),m=Object(n.m)((e,t)=>{const{files:n}=e.target;n&&n.length>0&&a(Array.from(n),t)},[a]),d=Object(n.m)(()=>{fa(l.k,e=>m(e,!0))},[m]),u=Object(n.m)(()=>{fa("*",e=>m(e,!1))},[m]),h=Object(T.a)(),{canAttachMedia:b,canAttachPolls:p}=t;return n.a.createElement(Nn.a,{isOpen:e,autoClose:!0,positionX:"right",positionY:"bottom",onClose:r,className:"AttachMenu fluid",onCloseAnimationEnd:r,onMouseEnter:o.k?void 0:s,onMouseLeave:o.k?void 0:i,noCloseOnBackdrop:!o.k},!b&&n.a.createElement(V.a,{className:"media-disabled",disabled:!0},"Posting media content is not allowed in this group."),b&&n.a.createElement(n.a.Fragment,null,n.a.createElement(V.a,{icon:"photo",onClick:d},h("AttachmentMenu.PhotoOrVideo")),n.a.createElement(V.a,{icon:"document",onClick:u},"Document")),p&&n.a.createElement(V.a,{icon:"poll",onClick:c},h("Poll")))});a(280);var Ec=Object(n.h)(Object(c.h)(e=>{const{stickers:t}=e.stickers.forEmoji;return{stickers:t}},(e,t)=>Object(u.l)(t,["clearStickersForEmoji"]))(({isOpen:e,onStickerSelect:t,stickers:a,clearStickersForEmoji:c})=>{const r=Object(n.q)(null),{shouldRender:s,transitionClassNames:i}=Object(Q.a)(e,void 0,void 0,!1),m=Object(y.a)(a,!0),d=a||m,{observe:u}=Object(sa.a)({rootRef:r,throttleMs:200});Object(n.n)(()=>e?Object(b.a)(c):void 0,[e,c]);const h=Object(le.a)("EmojiTooltip custom-scroll",i);return n.a.createElement("div",{ref:r,className:h,onMouseEnter:o.k?void 0:()=>{document.body.classList.add("no-select")},onMouseLeave:o.k?void 0:()=>{document.body.classList.remove("no-select")}},s&&d?d.map(e=>n.a.createElement(ha,{key:e.id,sticker:e,size:l.mb,observeIntersection:u,onClick:t,clickArg:e})):s?n.a.createElement(ge.a,null):void 0)}));a(281);var vc=Object(n.h)(Object(c.h)((e,{messageId:t})=>{const{chatId:a}=Object(m.x)(e)||{};return a?{message:Object(m.k)(e,a,t)}:{}},(e,t)=>Object(u.l)(t,["clickInlineButton"]))(({isOpen:e,message:t,onClose:a,clickInlineButton:c})=>{const[r,s]=Wn(e,a);if(t&&t.keyboardButtons)return n.a.createElement(Nn.a,{isOpen:e,autoClose:!0,positionX:"right",positionY:"bottom",onClose:a,className:"KeyboardMenu",onCloseAnimationEnd:a,onMouseEnter:o.k?void 0:r,onMouseLeave:o.k?void 0:s,noCloseOnBackdrop:!o.k},n.a.createElement("div",{className:"content"},t.keyboardButtons.map(e=>n.a.createElement("div",{className:"row"},e.map(e=>n.a.createElement(R.a,{ripple:!0,disabled:"NOT_SUPPORTED"===e.type,onClick:()=>c({button:e})},e.text))))))}));a(282);var Oc=Object(n.h)(({isOpen:e,onSilentSend:t,onScheduleSend:a,onClose:c,onCloseAnimationEnd:r})=>{const[s,l]=Wn(e,c),i=Object(T.a)();return n.a.createElement(Nn.a,{isOpen:e,autoClose:!0,positionX:"right",positionY:"bottom",className:"CustomSendMenu",onClose:c,onCloseAnimationEnd:r,onMouseEnter:o.k?void 0:s,onMouseLeave:o.k?void 0:l,noCloseOnBackdrop:!o.k},t&&n.a.createElement(V.a,{icon:"mute",onClick:t},i("SendWithoutSound")),a&&n.a.createElement(V.a,{icon:"schedule",onClick:a},i("ScheduleMessage")))}),fc=a(124),jc=a(152),Cc=a(160);a(283);var yc=Object(n.h)(Object(c.h)((e,{chatId:t})=>{const a=Object(m.f)(e,t),n=a&&Object(m.m)(e,a.id);if(!a||!n)return{};const{query:c,results:r}=Object(m.z)(e)||{},{totalCount:s,foundIds:l}=r||{};return{chat:a,messagesById:n,query:c,totalCount:s,foundIds:l}},(e,t)=>Object(u.l)(t,["searchTextMessagesLocal","focusMessage"]))(({chatId:e,threadId:t,chat:a,messagesById:r,query:s,totalCount:l,foundIds:o,searchTextMessagesLocal:i,focusMessage:h})=>{const b=Object(n.p)(()=>{if(!(s&&o&&o.length&&r))return ze.a;const n=o.map(n=>{const s=r[n];if(!s)return;const l=s.senderId?Object(m.Bb)(Object(c.e)(),s.senderId):void 0;let o;if(a&&Object(d.jb)(a))o=a;else if(s.forwardInfo){const{isChannelPost:e,fromChatId:t}=s.forwardInfo;o=e&&t?Object(m.f)(Object(c.e)(),t):void 0}else o=s.senderId?Object(m.f)(Object(c.e)(),s.senderId):void 0;return{message:s,senderUser:l,senderChat:o,onClick:()=>h({chatId:e,threadId:t,messageId:n})}}).filter(Boolean);return Object(u.k)(n,({message:e})=>e.date,"desc")},[e,t,h,o,a,r,s]);return n.a.createElement(Oe.a,{className:"RightSearch custom-scroll",items:b,preloadBackwards:0,onLoadMore:i,noFastList:!0},n.a.createElement("p",{className:"helper-text"},s?1===l?"1 message found":(b.length&&(l||b.length)||"No")+" messages found":"Search messages"),b.map(({message:e,senderUser:t,senderChat:a,onClick:c})=>{const r=a?Object(d.l)(a):Object(d.Z)(t),l=Object(d.M)(e);return n.a.createElement(fe.a,{className:"chat-item-clickable search-result-message m-0",onClick:c},n.a.createElement(z.a,{chat:a,user:t}),n.a.createElement("div",{className:"info"},n.a.createElement("div",{className:"title"},n.a.createElement("h3",null,r&&Object(G.a)(r)),n.a.createElement(Cc.a,{message:e})),n.a.createElement("div",{className:"subtitle"},Object(G.a)(l,["emoji","highlight"],{highlight:s}))))}))}));var kc=Object(n.h)(Object(c.h)((e,{stickerSetId:t})=>({set:Object(m.sb)(e,t),shouldPlay:Object(m.rb)(e)}),(e,t)=>Object(u.l)(t,["loadStickers","toggleStickerSet"]))(({stickerSetId:e,observeIntersection:t,set:a,shouldPlay:c,loadStickers:r,toggleStickerSet:s,isSomeModalOpen:o,onModalToggle:i})=>{const m=a&&Boolean(a.installedDate),d=Boolean(a&&a.stickers),[u,h,b]=Object(De.a)();Object(f.a)(()=>{i(u)},[u,i]);const p=Object(n.p)(()=>{if(!a)return[];const e=(a.covers||[]).map(({id:e})=>e),t=a.stickers?a.stickers.filter(({id:t})=>!e.includes(t)):[];return[...a.covers||[],...t].slice(0,5)},[a]);Object(n.n)(()=>{!d&&p.length<5&&r({stickerSetId:e})},[d,p.length,r,e]);const g=Object(n.m)(()=>{s({stickerSetId:e})},[s,e]);if(!a)return;const E=p.length>0;return n.a.createElement("div",{key:a.id,className:"sticker-set"},n.a.createElement("div",{className:"sticker-set-header"},n.a.createElement("div",{className:"title-wrapper"},n.a.createElement("h3",{className:"title"},a.title),n.a.createElement("p",{className:"count"},a.count," stickers")),n.a.createElement(R.a,{className:m?"is-added":void 0,color:"primary",size:"tiny",pill:!0,fluid:!0,onClick:g},m?"Added":"Add")),n.a.createElement("div",{className:"sticker-set-main"},!E&&n.a.createElement(B.a,null),E&&p.map(e=>n.a.createElement(ha,{sticker:e,size:l.ob,observeIntersection:t,noAnimate:!c||u||o,onClick:h}))),E&&n.a.createElement(pa.a,{isOpen:u,fromSticker:p[0],onClose:b}))}));a(284);const Nc=Object(K.g)(e=>e(),6e4,!0);var Sc=Object(n.h)(Object(c.h)(e=>{const t=Object(m.y)(e),{query:a,resultIds:n}=t||{},{featured:c}=e.stickers;return{query:a,featuredIds:c.setIds,resultIds:n}},(e,t)=>Object(u.l)(t,["loadFeaturedStickers"]))(({query:e,featuredIds:t,resultIds:a,loadFeaturedStickers:c})=>{const r=Object(n.q)(null),[s,l]=Object(n.r)(!1),{observe:o}=Object(sa.a)({rootRef:r,throttleMs:200});return Object(n.n)(()=>{Nc(()=>{c()})}),n.a.createElement("div",{ref:r,className:"StickerSearch custom-scroll"},function(){if(void 0!==e)return!e&&t?t.map(e=>n.a.createElement(kc,{key:e,stickerSetId:e,observeIntersection:o,isSomeModalOpen:s,onModalToggle:l})):a?a.length?a.map(e=>n.a.createElement(kc,{key:e,stickerSetId:e,observeIntersection:o,isSomeModalOpen:s,onModalToggle:l})):n.a.createElement("p",{className:"helper-text"},"Nothing found."):n.a.createElement(ge.a,null)}())}));a(285);var Ic=Object(n.h)(Object(c.h)(e=>{const t=Object(m.r)(e),{query:a,results:n}=t||{},{chatId:c}=Object(m.x)(e)||{},r=c?Object(m.f)(e,c):void 0;return{query:a,results:n,chat:r,isChatWithBot:r?Object(m.M)(e,r):void 0}},(e,t)=>Object(u.l)(t,["searchMoreGifs","sendMessage","setGifSearchQuery"]))(({query:e,results:t,chat:a,isChatWithBot:c,searchMoreGifs:r,sendMessage:s,setGifSearchQuery:l})=>{const i=Object(n.q)(null),{observe:m}=Object(sa.a)({rootRef:i,debounceMs:300}),{canSendGifs:u}=Object(d.c)(a,c),h=Object(n.m)(e=>{u&&s({gif:e}),o.k&&l({query:void 0})},[u,s,l]),b=Object(T.a)();const p=Boolean(void 0!==e&&t&&t.length);return n.a.createElement("div",{className:"GifSearch"},n.a.createElement(Oe.a,{ref:i,className:Object(le.a)("gif-container custom-scroll",p&&"grid"),items:t,itemSelector:".GifButton",preloadBackwards:96,noFastList:!0,onLoadMore:r},function(){if(void 0!==e)return t?t.length?t.map(e=>n.a.createElement(oc,{key:e.id,gif:e,observeIntersection:m,onClick:h})):n.a.createElement("p",{className:"helper-text"},b("NoGIFsFound")):n.a.createElement(ge.a,null)}()))}));a(286);let wc,Pc;function Mc(e){return fetch(e).then(e=>e.json())}function Fc(e,t){const a=new Date(t),n=a.getMonth()+1,c=a.getDate();return Mc(`${e}/${`${a.getFullYear()}-${n<10?"0":""}${n}/${c<10?"0":""}${c}`}.json`)}var Lc=Object(n.h)(()=>{const e=Object(n.q)(null),[t,c]=Object(n.r)(!1),[r,s]=Object(n.r)(0);return Object(n.n)(()=>{(async()=>{if(await async function(){return wc||(wc=a.e(6).then(a.bind(null,304)),Pc=await wc),wc}(),!t)return void c(!0);const n=await Mc("./chartDummyData/growth.json");Pc.create(e.current.children[0],n),s(1);const r=await Mc("./chartDummyData/notifications.json");r.onZoom=e=>Fc("chartDummyData/notifications_zoom",e),Pc.create(e.current.children[1],r),s(2);const l=await Mc("./chartDummyData/interactions.json");Pc.create(e.current.children[2],l),s(3);const o=await Mc("./chartDummyData/views.json");o.onZoom=e=>Fc("chartDummyData/views_zoom",e),Pc.create(e.current.children[3],o),s(4);const i=await Mc("./chartDummyData/languages.json");Pc.create(e.current.children[4],i),s(5)})()},[t]),n.a.createElement("div",{className:Object(le.a)("Statistics custom-scroll",t&&"ready"),ref:e},t?n.a.createElement(n.a.Fragment,null,n.a.createElement("div",{className:Object(le.a)("chat-container",r<1&&"hidden")}),n.a.createElement("div",{className:Object(le.a)("chat-container",r<2&&"hidden")}),n.a.createElement("div",{className:Object(le.a)("chat-container",r<3&&"hidden")}),n.a.createElement("div",{className:Object(le.a)("chat-container",r<4&&"hidden")}),n.a.createElement("div",{className:Object(le.a)("chat-container",r<5&&"hidden")})):n.a.createElement(ge.a,null))});a(287);var Ac=Object(n.h)(Object(c.h)((e,{answer:t})=>{const{voters:a,offsets:n}=e.pollResults;return{voters:a&&a[t.option],offset:n&&n[t.option]||""}},(e,t)=>Object(u.l)(t,["loadPollOptionResults","openChat","closePollResults"]))(({chat:e,message:t,answer:a,answerVote:c,totalVoters:r,voters:s,offset:l,loadPollOptionResults:o,openChat:i,closePollResults:m})=>{const d=Object(y.a)(c.votersCount),[u,h]=Object(n.r)(!0),b=Boolean(s),{option:p,text:g}=a;Object(n.n)(()=>{b&&d===c.votersCount||o({chat:e,messageId:t.id,option:p,offset:l,limit:4,shouldResetVoters:!0})},[c.votersCount,b]);const E=Object(n.m)(()=>{h(!0),o({chat:e,messageId:t.id,option:p,offset:l,limit:50})},[e,o,t.id,l,p]);Object(n.n)(()=>{h(!1)},[s]);const v=Object(n.m)(e=>{i({id:e}),m()},[m,i]);return n.a.createElement("div",{className:"PollAnswerResults"},n.a.createElement("div",{className:"poll-voters"},s?s.map(e=>n.a.createElement(fe.a,{key:e,className:"chat-item-clickable",onClick:()=>v(e)},n.a.createElement(je.a,{avatarSize:"tiny",userId:e,forceShowSelf:!0,noStatusOrTyping:!0}))):n.a.createElement(ge.a,null),s&&function(){const e=c.votersCount-s.length;return c.votersCount>4&&e>0&&n.a.createElement(Xt,{count:e,itemName:"voter",isLoading:u,onClick:E})}()),n.a.createElement("div",{className:"answer-head"},n.a.createElement("span",{className:"answer-title"},g),n.a.createElement("span",{className:"answer-percent"},(O=c.votersCount,(f=r)>0?(O/f*100).toFixed():0),"%")));var O,f}));a(288);var Tc=Object(n.h)(Object(c.h)(e=>{const{pollResults:{chatId:t,messageId:a},lastSyncTime:n}=e;if(!t||!a)return{};return{chat:Object(m.f)(e,t),message:Object(m.k)(e,t,a),lastSyncTime:n}})(({chat:e,message:t,lastSyncTime:a})=>{if(!t||!e)return n.a.createElement(ge.a,null);const{summary:c,results:r}=Object(d.H)(t);if(!r.results)return;const s=Object(u.c)(r.results,"option");return n.a.createElement("div",{className:"PollResults"},n.a.createElement("h3",{className:"poll-question"},c.question),n.a.createElement("div",{className:"poll-results-list custom-scroll"},a&&c.answers.map(a=>n.a.createElement(Ac,{key:`${t.id}-${a.option}`,chat:e,message:t,answer:a,answerVote:s[a.option],totalVoters:r.totalVoters})),!a&&n.a.createElement(ge.a,null)))}));a(154);var Bc=Object(n.h)(Object(c.h)((e,{userId:t})=>{const a=Object(m.Bb)(e,t),n=Object(m.f)(e,t),{progress:c}=e.management;return{user:a,chat:n,progress:c}},(e,t)=>Object(u.l)(t,["updateContact","deleteUser","closeManagement","openChat","deleteHistory"]))(({userId:e,user:t,chat:a,progress:c,updateContact:r,deleteUser:l,deleteHistory:o,closeManagement:i,openChat:m})=>{const[d,u,h]=Object(De.a)(),[b,p]=Object(n.r)(!1),[g,E]=Object(n.r)(),v=Object(T.a)(),O=t&&t.firstName||"",f=t&&t.lastName||"",j=a?a.isMuted:void 0,[C,y]=Object(n.r)(O),[k,N]=Object(n.r)(f),[S,I]=Object(n.r)(!j);Object(n.n)(()=>{I(!j)},[j]),Object(n.n)(()=>{p(!1),h()},[h,e]),Object(n.n)(()=>{y(O),N(f)},[O,f,t]),Object(n.n)(()=>{c===s.f.Complete&&(p(!1),E(void 0),h())},[h,c]);const w=Object(n.m)(e=>{y(e.target.value),p(!0)},[]),P=Object(n.m)(e=>{N(e.target.value),p(!0)},[]),M=Object(n.m)(e=>{I(e.target.checked),p(!0)},[]),F=Object(n.m)(()=>{const t=C.trim(),a=k.trim();t.length||E("Please provide first name"),r({userId:e,isMuted:!S,firstName:t,lastName:a})},[C,k,r,e,S]),L=Object(n.m)(()=>{a.lastMessage&&o({chatId:a.id,maxId:a.lastMessage.id,shouldDeleteForAll:!1}),l({userId:e}),h(),i(),m({id:void 0})},[a.id,a.lastMessage,h,i,o,l,m,e]);if(!t)return;const A=c===s.f.InProgress;return n.a.createElement("div",{className:"Management"},n.a.createElement("div",{className:"custom-scroll"},n.a.createElement("div",{className:"section"},n.a.createElement(je.a,{userId:t.id,avatarSize:"jumbo",status:"original name",withMediaViewer:!0,withFullInfo:!0}),n.a.createElement(ve.a,{id:"user-first-name",label:v("UserInfo.FirstNamePlaceholder"),onChange:w,value:C,error:"Please provide first name"===g?g:void 0}),n.a.createElement(ve.a,{id:"user-last-name",label:v("UserInfo.LastNamePlaceholder"),onChange:P,value:k}),n.a.createElement("div",{className:"ListItem no-selection narrow"},n.a.createElement(aa.a,{checked:S,label:v("Notifications"),subLabel:v(S?"UserInfo.NotificationsEnabled":"UserInfo.NotificationsDisabled"),onChange:M}))),n.a.createElement("div",{className:"section"},n.a.createElement(fe.a,{icon:"delete",ripple:!0,destructive:!0,onClick:u},v("DeleteContact")))),n.a.createElement(zt,{isShown:b,onClick:F,disabled:A,ariaLabel:v("Save")},A?n.a.createElement(B.a,{color:"white"}):n.a.createElement("i",{className:"icon-check"})),n.a.createElement(Dt.a,{isOpen:d,onClose:h,text:v("AreYouSureDeleteContact"),confirmLabel:v("DeleteContact"),confirmHandler:L,confirmIsDestructive:!0}))}));var Dc=Object(n.h)(Object(c.h)((e,{chatId:t})=>{const a=Object(m.f)(e,t),{progress:n}=e.management,c=Boolean(a.fullInfo&&a.fullInfo.linkedChatId);return{chat:a,progress:n,isBasicGroup:Object(d.ib)(a),hasLinkedChannel:c}},(e,t)=>Object(u.l)(t,["togglePreHistoryHidden","updateChat","closeManagement","deleteHistory","leaveChannel","deleteChannel","openChat"]))(({chatId:e,chat:t,progress:a,isBasicGroup:c,hasLinkedChannel:l,onScreenSelect:o,togglePreHistoryHidden:i,updateChat:m,deleteHistory:u,leaveChannel:h,deleteChannel:b,closeManagement:p,openChat:g})=>{const[v,O,f]=Object(De.a)(),j=t.title,C=t.fullInfo&&t.fullInfo.about||"",[y,k]=Object(n.r)(!1),[N,S]=Object(n.r)(j),[I,w]=Object(n.r)(C),[P,M]=Object(n.r)(),[F,L]=Object(n.r)(),A=Object(d.f)(t),D=Object(E.a)(A,!1,r.ApiMediaFormat.BlobUrl),x=Object(T.a)();Object(n.n)(()=>{a===s.f.Complete&&(k(!1),L(void 0))},[a]);const R=Object(n.m)(()=>{o(s.g.ChatPrivacyType)},[o]),U=Object(n.m)(()=>{o(s.g.Discussion)},[o]),z=Object(n.m)(()=>{o(s.g.GroupPermissions)},[o]),q=Object(n.m)(()=>{o(s.g.ChatAdministrators)},[o]),$=Object(n.m)(e=>{M(e),k(!0)},[]),H=Object(n.m)(e=>{S(e.target.value),k(!0)},[]),V=Object(n.m)(e=>{w(e.target.value),k(!0)},[]),W=Object(n.m)(()=>{const t=N.trim(),a=I.trim();t.length?m({chatId:e,title:t,about:a,photo:P}):L("Group title can't be empty")},[I,e,P,N,m]),Y=Object(n.m)(()=>{o(s.g.GroupMembers)},[o]),K=Object(n.m)(()=>{if(!t.fullInfo)return;const{isPreHistoryHidden:e}=t.fullInfo;i({chatId:t.id,isEnabled:!e})},[t,i]),Z=Object(n.p)(()=>{if(!t.defaultBannedRights)return 0;let e=["sendMessages","sendMedia","embedLinks","sendPolls","changeInfo","inviteUsers","pinMessages"].filter(e=>!t.defaultBannedRights[e]).length;const{sendStickers:a,sendGifs:n}=t.defaultBannedRights;return a||n||(e+=1),e},[t]),Q=t.fullInfo&&t.fullInfo.adminMembers&&t.fullInfo.adminMembers.length||0,_=Object(n.m)(()=>{c?u({chatId:t.id,maxId:t.lastMessage.id,shouldDeleteForAll:!1}):t.isCreator?b({chatId:t.id}):h({chatId:t.id}),f(),p(),g({id:void 0})},[c,t.isCreator,t.id,t.lastMessage,f,p,u,h,b,g]);if(t.isRestricted)return;const X=a===s.f.InProgress;return n.a.createElement("div",{className:"Management"},n.a.createElement("div",{className:"custom-scroll"},n.a.createElement("div",{className:"section"},n.a.createElement(Gt.a,{currentAvatarBlobUrl:D,onChange:$}),n.a.createElement(ve.a,{id:"group-title",label:x("GroupName"),onChange:H,value:N,error:"Group title can't be empty"===F?F:void 0}),n.a.createElement(ve.a,{id:"group-about",className:"mb-2",label:x("DescriptionPlaceholder"),onChange:V,value:I}),t.isCreator&&n.a.createElement(fe.a,{icon:"lock",ripple:!0,onClick:R},n.a.createElement("div",{className:"multiline-item"},n.a.createElement("span",{className:"title"},x("GroupType")),n.a.createElement("span",{className:"subtitle"},t.username?x("TypePublic"):x("TypePrivate")))),l&&n.a.createElement(fe.a,{icon:"message",ripple:!0,onClick:U},n.a.createElement("div",{className:"multiline-item"},n.a.createElement("span",{className:"title"},x("LinkedChannel")),n.a.createElement("span",{className:"subtitle"},x("DiscussionUnlink")))),n.a.createElement(fe.a,{icon:"permissions",ripple:!0,onClick:z},n.a.createElement("div",{className:"multiline-item"},n.a.createElement("span",{className:"title"},x("ChannelPermissions")),n.a.createElement("span",{className:"subtitle"},Z,"/",8))),n.a.createElement(fe.a,{icon:"admin",ripple:!0,onClick:q},n.a.createElement("div",{className:"multiline-item"},n.a.createElement("span",{className:"title"},x("ChannelAdministrators")),n.a.createElement("span",{className:"subtitle"},Object(ma.a)(Q))))),n.a.createElement("div",{className:"section"},n.a.createElement(fe.a,{icon:"group",ripple:!0,onClick:Y},n.a.createElement("div",{className:"multiline-item"},n.a.createElement("span",{className:"title"},x("GroupMembers")),n.a.createElement("span",{className:"subtitle"},Object(ma.a)(t.membersCount)))),t.fullInfo&&n.a.createElement("div",{className:"ListItem narrow no-selection"},n.a.createElement(aa.a,{checked:!t.fullInfo.isPreHistoryHidden,label:x("ChatHistory"),onChange:K}))),n.a.createElement("div",{className:"section"},n.a.createElement(fe.a,{icon:"delete",ripple:!0,destructive:!0,onClick:O},x("DeleteMega")))),n.a.createElement(zt,{isShown:y,onClick:W,disabled:X,ariaLabel:x("Save")},X?n.a.createElement(B.a,{color:"white"}):n.a.createElement("i",{className:"icon-check"})),n.a.createElement(Dt.a,{isOpen:v,onClose:f,textParts:Object(G.a)(c||!t.isCreator?x("AreYouSureDeleteAndExit"):x("AreYouSureDeleteThisChatWithGroup",t.title),["br","simple_markdown"]),confirmLabel:c||!t.isCreator?x("DeleteMega"):x("DeleteGroupForAll"),confirmHandler:_,confirmIsDestructive:!0}))}));var xc=Object(n.h)(Object(c.h)((e,{chatId:t})=>({chat:Object(m.f)(e,t),currentUserId:e.currentUserId}),(e,t)=>Object(u.l)(t,["updateChatDefaultBannedRights"]))(({onScreenSelect:e,onChatMemberSelect:t,chat:a,currentUserId:c,updateChatDefaultBannedRights:r})=>{const[l,o]=Object(n.r)({}),[i,m]=Object(n.r)(!1),[d,u]=Object(n.r)(!1),h=Object(T.a)(),b=Object(n.m)(()=>{e(s.g.GroupRemovedUsers)},[e]),p=Object(n.m)(()=>{e(s.g.GroupUserPermissionsCreate)},[e]),g=Object(n.m)(a=>{t(a.userId,a.promotedByUserId===c),e(s.g.GroupUserPermissions)},[c,t,e]);Object(n.n)(()=>{o(a&&a.defaultBannedRights||{}),m(!1),setTimeout(()=>{u(!1)},250)},[a]);const E=Object(n.m)(e=>{const{name:t}=e.target;function a(e){return!e||void 0}o(e=>({...e,[t]:a(e[t]),..."sendStickers"===t&&{sendGifs:a(e[t])}})),m(!0)},[]),v=Object(n.m)(()=>{a&&(u(!0),r({chatId:a.id,bannedRights:l}))},[a,l,r]),O=Object(n.p)(()=>a&&a.fullInfo&&a.fullInfo.kickedMembers?a.fullInfo.kickedMembers.length:0,[a]),f=Object(n.p)(()=>a&&a.fullInfo&&a.fullInfo.members?a.fullInfo.members.filter(({bannedRights:e})=>!!e):[],[a]),j=Object(n.m)(e=>{const{bannedRights:t}=e;if(!t||!a)return;const{defaultBannedRights:n}=a;return Object.keys(t).reduce((e,a)=>{if(!t[a]||n&&n[a]||"sendInline"===a||"viewMessages"===a||"sendGames"===a)return e;const c=function(e){switch(e){case"sendMessages":return"UserRestrictionsNoSend";case"sendMedia":return"UserRestrictionsNoSendMedia";case"sendStickers":return"UserRestrictionsNoSendStickers";case"embedLinks":return"UserRestrictionsNoEmbedLinks";case"sendPolls":return"UserRestrictionsNoSendPolls";case"changeInfo":return"UserRestrictionsNoChangeInfo";case"inviteUsers":return"UserRestrictionsInviteUsers";case"pinMessages":return"UserRestrictionsPinMessages";default:return}}(a);if(!c)return e;const r=h(c);return`${e}${e.length?", "+r:r}`},"")},[a,h]);return n.a.createElement("div",{className:"Management"},n.a.createElement("div",{className:"custom-scroll"},n.a.createElement("div",{className:"section"},n.a.createElement("h3",{className:"section-heading"},h("ChannelPermissionsHeader")),n.a.createElement("div",{className:"ListItem no-selection"},n.a.createElement(aa.a,{name:"sendMessages",checked:!l.sendMessages,label:h("UserRestrictionsSend"),blocking:!0,onChange:E})),n.a.createElement("div",{className:"ListItem no-selection"},n.a.createElement(aa.a,{name:"sendMedia",checked:!l.sendMedia,label:h("UserRestrictionsSendMedia"),blocking:!0,onChange:E})),n.a.createElement("div",{className:"ListItem no-selection"},n.a.createElement(aa.a,{name:"sendStickers",checked:!l.sendStickers&&!l.sendGifs,label:h("UserRestrictionsSendStickers"),blocking:!0,onChange:E})),n.a.createElement("div",{className:"ListItem no-selection"},n.a.createElement(aa.a,{name:"sendPolls",checked:!l.sendPolls,label:h("UserRestrictionsSendPolls"),blocking:!0,onChange:E})),n.a.createElement("div",{className:"ListItem no-selection"},n.a.createElement(aa.a,{name:"embedLinks",checked:!l.embedLinks,label:h("UserRestrictionsEmbedLinks"),blocking:!0,onChange:E})),n.a.createElement("div",{className:"ListItem no-selection"},n.a.createElement(aa.a,{name:"inviteUsers",checked:!l.inviteUsers,label:h("UserRestrictionsInviteUsers"),blocking:!0,onChange:E})),n.a.createElement("div",{className:"ListItem no-selection"},n.a.createElement(aa.a,{name:"pinMessages",checked:!l.pinMessages,label:h("UserRestrictionsPinMessages"),blocking:!0,onChange:E})),n.a.createElement("div",{className:"ListItem no-selection"},n.a.createElement(aa.a,{name:"changeInfo",checked:!l.changeInfo,label:h("UserRestrictionsChangeInfo"),blocking:!0,onChange:E}))),n.a.createElement("div",{className:"section"},n.a.createElement(fe.a,{icon:"delete-user",ripple:!0,narrow:!0,onClick:b},n.a.createElement("div",{className:"multiline-item"},n.a.createElement("span",{className:"title"},h("ChannelBlockedUsers")),n.a.createElement("span",{className:"subtitle"},O)))),n.a.createElement("div",{className:"section"},n.a.createElement("h3",{className:"section-heading"},h("PrivacyExceptions")),n.a.createElement(fe.a,{icon:"add-user",ripple:!0,onClick:p},h("ChannelAddException")),f.map(e=>n.a.createElement(fe.a,{key:e.userId,className:"chat-item-clickable exceptions-member",ripple:!0,onClick:()=>g(e)},n.a.createElement(je.a,{userId:e.userId,status:j(e)}))))),n.a.createElement(zt,{isShown:i,onClick:v,ariaLabel:h("Save"),disabled:d},d?n.a.createElement(B.a,{color:"white"}):n.a.createElement("i",{className:"icon-check"})))}));var Rc=Object(n.h)(Object(c.h)((e,{chatId:t})=>{const a=Object(m.f)(e,t),{byId:n}=e.users;return{chat:a,usersById:n}},(e,t)=>Object(u.l)(t,["updateChatMemberBannedRights"]))(({chat:e,usersById:t,updateChatMemberBannedRights:a})=>{const c=Object(T.a)(),r=Object(n.p)(()=>e&&e.fullInfo&&e.fullInfo.kickedMembers?e.fullInfo.kickedMembers:[],[e]),s=Object(n.m)(e=>{if(!e.kickedByUserId)return;const a=t[e.kickedByUserId];return a?c("UserRemovedBy",Object(d.Z)(a)):void 0},[c,t]),l=Object(n.m)(t=>{if(e)return[{title:c("Unblock"),icon:"delete",destructive:!0,handler:()=>a({chatId:e.id,userId:t.userId,bannedRights:{}})}]},[c,e,a]);return n.a.createElement("div",{className:"Management"},n.a.createElement("div",{className:"custom-scroll"},n.a.createElement("div",{className:"section"},n.a.createElement("p",{className:"text-muted"},c("NoBlockedGroup2")),r.map(e=>n.a.createElement(fe.a,{key:e.userId,className:"chat-item-clickable",ripple:!0,contextActions:l(e)},n.a.createElement(je.a,{userId:e.userId,status:s(e)}))))))}));var Uc=Object(n.h)(Object(c.h)((e,{chatId:t})=>{const a=Object(m.f)(e,t),{progress:n}=e.management;return{chat:a,progress:n,isSignaturesShown:Boolean(a&&a.isSignaturesShown)}},(e,t)=>Object(u.l)(t,["toggleSignatures","updateChat","closeManagement","leaveChannel","deleteChannel","openChat"]))(({chatId:e,chat:t,progress:a,isSignaturesShown:c,onScreenSelect:l,updateChat:o,toggleSignatures:i,closeManagement:m,leaveChannel:u,deleteChannel:h,openChat:b})=>{const p=t&&t.title||"",g=t&&t.fullInfo&&t.fullInfo.about||"",v=t&&t.fullInfo&&t.fullInfo.linkedChatId,[O,f,j]=Object(De.a)(),[C,y]=Object(n.r)(!1),[k,N]=Object(n.r)(p),[S,I]=Object(n.r)(g),[w,P]=Object(n.r)(),[M,F]=Object(n.r)(),L=t&&Object(d.f)(t),A=Object(E.a)(L,!1,r.ApiMediaFormat.BlobUrl),D=Object(T.a)();Object(n.n)(()=>{a===s.f.Complete&&(y(!1),F(void 0))},[a]);const x=t&&t.fullInfo&&t.fullInfo.adminMembers&&t.fullInfo.adminMembers.length||0,R=Object(n.m)(()=>{l(s.g.ChatPrivacyType)},[l]),U=Object(n.m)(()=>{l(s.g.Discussion)},[l]),G=Object(n.m)(()=>{l(s.g.ChatAdministrators)},[l]),z=Object(n.m)(e=>{P(e),y(!0)},[]),q=Object(n.m)(e=>{N(e.target.value),y(!0)},[]),$=Object(n.m)(e=>{I(e.target.value),y(!0)},[]),H=Object(n.m)(()=>{const t=k.trim(),a=S.trim();t.length?o({chatId:e,title:t,about:a,photo:w}):F("Channel title can't be empty")},[S,e,w,k,o]),V=Object(n.m)(()=>{i({chatId:e,isEnabled:!c})},[e,c,i]),W=Object(n.m)(()=>{l(s.g.ChannelSubscribers)},[l]),Y=Object(n.m)(()=>{t.isCreator?h({chatId:t.id}):u({chatId:t.id}),j(),m(),b({id:void 0})},[t.isCreator,t.id,j,m,u,h,b]);if(t.isRestricted)return;const K=a===s.f.InProgress;return n.a.createElement("div",{className:"Management"},n.a.createElement("div",{className:"custom-scroll"},n.a.createElement("div",{className:"section"},n.a.createElement(Gt.a,{currentAvatarBlobUrl:A,onChange:z}),n.a.createElement(ve.a,{id:"channel-title",label:D("EnterChannelName"),onChange:q,value:k,error:"Channel title can't be empty"===M?M:void 0}),n.a.createElement(ve.a,{id:"channel-about",className:"mb-2",label:D("DescriptionPlaceholder"),onChange:$,value:S}),t.isCreator&&n.a.createElement(fe.a,{icon:"lock",ripple:!0,onClick:R},n.a.createElement("div",{className:"multiline-item"},n.a.createElement("span",{className:"title"},D("ChannelType")),n.a.createElement("span",{className:"subtitle"},t.username?D("TypePublic"):D("TypePrivate")))),n.a.createElement(fe.a,{icon:"message",ripple:!0,onClick:U},n.a.createElement("div",{className:"multiline-item"},n.a.createElement("span",{className:"title"},D("Discussion")),n.a.createElement("span",{className:"subtitle"},D(v?"DiscussionUnlink":"Add")))),n.a.createElement(fe.a,{icon:"admin",ripple:!0,onClick:G},n.a.createElement("div",{className:"multiline-item"},n.a.createElement("span",{className:"title"},D("ChannelAdministrators")),n.a.createElement("span",{className:"subtitle"},x))),n.a.createElement("div",{className:"ListItem no-selection narrow"},n.a.createElement(aa.a,{checked:c,label:D("ChannelSignMessages"),onChange:V}))),n.a.createElement("div",{className:"section"},n.a.createElement(fe.a,{icon:"group",ripple:!0,onClick:W},n.a.createElement("div",{className:"multiline-item"},n.a.createElement("span",{className:"title"},D("ChannelSubscribers")),n.a.createElement("span",{className:"subtitle"},D("Subscribers",t.membersCount,"i"))))),n.a.createElement("div",{className:"section"},n.a.createElement(fe.a,{icon:"delete",ripple:!0,destructive:!0,onClick:f},t.isCreator?D("ChannelDelete"):D("LeaveChannel")))),n.a.createElement(zt,{isShown:C,onClick:H,disabled:K,ariaLabel:D("Save")},K?n.a.createElement(B.a,{color:"white"}):n.a.createElement("i",{className:"icon-check"})),n.a.createElement(Dt.a,{isOpen:O,onClose:j,text:t.isCreator?D("ChannelDeleteAlert"):D("ChannelLeaveAlert"),confirmLabel:t.isCreator?D("ChannelDelete"):D("LeaveChannel"),confirmHandler:Y,confirmIsDestructive:!0}))})),Gc=a(52);var zc=Object(n.h)(Object(c.h)((e,{chatId:t})=>{const a=Object(m.f)(e,t),{isUsernameAvailable:n}=Object(m.X)(e,t);return{chat:a,isChannel:Object(d.jb)(a),progress:e.management.progress,isUsernameAvailable:n}},(e,t)=>Object(u.l)(t,["checkPublicLink","updatePublicLink","updatePrivateLink"]))(({chat:e,isChannel:t,progress:a,isUsernameAvailable:c,checkPublicLink:r,updatePublicLink:l,updatePrivateLink:o})=>{const i=Boolean(e.username),m=e.fullInfo&&e.fullInfo.inviteLink,[d,u]=Object(n.r)(i?"public":"private"),[h,b]=Object(n.r)(),[p,g,E]=Object(De.a)(),v="public"===d&&h&&c||"private"===d&&i;Object(n.n)(()=>{d&&!m&&o()},[d,m,o]);const O=Object(n.m)(e=>{u(e)},[]),f=Object(n.m)(()=>{l({username:"public"===d?h:""})},[d,l,h]),j=Object(n.m)(()=>{E(),o()},[E,o]),C=Object(T.a)(),y=t?"Channel":"Mega",k=t?"Channel":"Group",N=[{value:"private",label:C(y+"Private"),subLabel:C(y+"PrivateInfo")},{value:"public",label:C(y+"Public"),subLabel:C(y+"PublicInfo")}],S=a===s.f.InProgress;return n.a.createElement("div",{className:"Management"},n.a.createElement("div",{className:"custom-scroll"},n.a.createElement("div",{className:"section"},n.a.createElement("h3",{className:"section-heading"},C(k+"Type")),n.a.createElement(oa.a,{selected:d,name:"channel-type",options:N,onChange:O})),"private"===d?n.a.createElement("div",{className:"section"},m?n.a.createElement(n.a.Fragment,null,n.a.createElement(Gc.a,{url:m,className:"group-link",text:m}),n.a.createElement("p",{className:"section-info"},C(y+"PrivateLinkHelp")),n.a.createElement(fe.a,{icon:"delete",ripple:!0,destructive:!0,onClick:g},C("RevokeLink")),n.a.createElement(Dt.a,{isOpen:p,onClose:E,text:C("RevokeAlert"),confirmLabel:C("RevokeButton"),confirmHandler:j,confirmIsDestructive:!0})):n.a.createElement(ge.a,null)):n.a.createElement("div",{className:"section no-border"},n.a.createElement(Vt,{asLink:!0,currentUsername:e.username,isLoading:S,isUsernameAvailable:c,checkUsername:r,onChange:b}),n.a.createElement("p",{className:"section-info"},C(k+".Username.CreatePublicLinkHelp")))),n.a.createElement(zt,{isShown:v,disabled:S,ariaLabel:C("Save"),onClick:f},S?n.a.createElement(B.a,{color:"white"}):n.a.createElement("i",{className:"icon-check"})))}));var qc=Object(n.h)(Object(c.h)((e,{chatId:t})=>{const a=Object(m.f)(e,t),{forDiscussionIds:n,byId:c}=e.chats;return{chat:a,chatsByIds:c,forDiscussionIds:n,linkedChat:a&&a.fullInfo&&a.fullInfo.linkedChatId?Object(m.f)(e,a.fullInfo.linkedChatId):void 0,isChannel:a&&Object(d.jb)(a)}},(e,t)=>Object(u.l)(t,["loadGroupsForDiscussion","linkDiscussionGroup","unlinkDiscussionGroup"]))(({chat:e,chatId:t,chatsByIds:a,linkedChat:c,forDiscussionIds:r,isChannel:o,onScreenSelect:i,loadGroupsForDiscussion:m,linkDiscussionGroup:d,unlinkDiscussionGroup:u})=>{const[h,b]=Object(n.r)(),[p,g]=Object(n.r)(),[E,v]=Object(n.r)(!1),O=Object(n.m)(()=>v(!0),[]),[f,j,C]=Object(De.a)(),[y,k,N]=Object(De.a)(),S=Object(T.a)(),I=c&&c.id;Object(n.n)(()=>{m()},[m]),Object(n.n)(()=>{p||Object(Kt.a)("DiscussionGroups").then(g)},[p]);const w=Object(n.m)(()=>{C(),u({channelId:o?t:I}),o||i(s.g.Initial)},[C,u,o,t,I,i]),P=Object(n.m)(()=>{N(),d({channelId:t,chatId:h})},[N,d,t,h]);function M(){const e=a[h];if(e)return n.a.createElement("div",{className:"modal-header"},n.a.createElement(z.a,{size:"tiny",chat:e}),n.a.createElement("div",{className:"modal-title"},S("Channel.DiscussionGroup.LinkGroup")))}function F(){const t=a[h];if(t)return t.hasPrivateLink?Object(G.a)(`Do you want to make **${t.title}** the discussion board for **${e.title}**?`,["br","simple_markdown"]):Object(G.a)(`Do you want to make **${t.title}** the discussion board for **${e.title}**?\n\nAnyone from the channel will be able to see messages in this group.`,["br","simple_markdown"])}return n.a.createElement("div",{className:"Management"},n.a.createElement("div",{className:"custom-scroll"},n.a.createElement("div",{className:"section"},n.a.createElement("div",{className:"section-icon"},p&&n.a.createElement(Zt.a,{id:"discussionGroupsDucks",size:l.gb,animationData:p,play:E,noLoop:!0,onLoad:O})),c&&n.a.createElement("div",null,n.a.createElement(fe.a,{className:"chat-item-clickable",inactive:!0},n.a.createElement(Ce.a,{chatId:c.id})),n.a.createElement(fe.a,{icon:"delete",ripple:!0,destructive:!0,onClick:j},S(o?"DiscussionUnlinkGroup":"DiscussionUnlinkChannel")),n.a.createElement(Dt.a,{isOpen:f,onClose:C,header:n.a.createElement("div",{className:"modal-header"},n.a.createElement(z.a,{size:"tiny",chat:c}),n.a.createElement("div",{className:"modal-title"},S(o?"DiscussionUnlinkGroup":"DiscussionUnlinkChannel"))),textParts:Object(G.a)(S(o?"DiscussionUnlinkChannelAlert":"DiscussionUnlinkGroupAlert",c.title),["br","simple_markdown"]),confirmLabel:S(o?"DiscussionUnlinkGroup":"DiscussionUnlinkChannel"),confirmHandler:w,confirmIsDestructive:!0})),!c&&n.a.createElement("div",null,n.a.createElement("p",{className:"section-help"},S("DiscussionChannelHelp")),n.a.createElement("div",{teactFastList:!0},n.a.createElement(fe.a,{key:"create-group",icon:"group",ripple:!0,teactOrderKey:0,className:"not-implemented"},S("DiscussionCreateGroup")),r?r.map((e,t)=>n.a.createElement(fe.a,{key:e,teactOrderKey:t+1,className:"chat-item-clickable scroll-item",onClick:()=>{b(e),k()}},n.a.createElement(Ce.a,{chatId:e}))):n.a.createElement(Xe.a,{key:"nothing-found",teactOrderKey:0,text:"No discussion groups found"})),n.a.createElement("p",{className:"mt-4 mb-0 section-help"},S("DiscussionChannelHelp2")),n.a.createElement(Dt.a,{isOpen:y,onClose:N,header:M(),textParts:F(),confirmLabel:S("DiscussionLinkGroup"),confirmHandler:P,isButtonsInOneRow:!0})))))}));var $c=Object(n.h)(Object(c.h)((e,{chatId:t,isPromotedByCurrentUser:a})=>{const n=Object(m.f)(e,t);return{chat:n,isFormFullyDisabled:!(n.isCreator||a)}},(e,t)=>Object(u.l)(t,["updateChatMemberBannedRights"]))(({chat:e,selectedChatMemberId:t,onScreenSelect:a,updateChatMemberBannedRights:c,isFormFullyDisabled:r})=>{const[l,o]=Object(n.r)({}),[i,m]=Object(n.r)(!1),[d,u]=Object(n.r)(!1),[h,b,p]=Object(De.a)(),g=Object(T.a)(),E=Object(n.p)(()=>{if(e&&e.fullInfo&&e.fullInfo.members)return e.fullInfo.members.find(({userId:e})=>e===t)},[e,t]);Object(n.n)(()=>{e&&e.fullInfo&&t&&!E&&a(s.g.GroupPermissions)},[e,a,E,t]),Object(n.n)(()=>{o(E&&E.bannedRights||e&&e.defaultBannedRights||{}),m(!1),u(!1)},[e,E]);const v=Object(n.m)(e=>{const{name:t}=e.target;function a(e){return!e||void 0}o(e=>({...e,[t]:a(e[t]),..."sendStickers"===t&&{sendGifs:a(e[t])}})),m(!0)},[]),O=Object(n.m)(()=>{e&&t&&(u(!0),c({chatId:e.id,userId:t,bannedRights:l}))},[e,t,l,c]),f=Object(n.m)(()=>{e&&t&&c({chatId:e.id,userId:t,bannedRights:{viewMessages:!0}})},[e,t,c]),j=Object(n.m)(t=>!!r||!(!e||!e.defaultBannedRights)&&e.defaultBannedRights[t],[e,r]);if(E)return n.a.createElement("div",{className:"Management"},n.a.createElement("div",{className:"custom-scroll"},n.a.createElement("div",{className:"section"},n.a.createElement(fe.a,{inactive:!0,className:"chat-item-clickable"},n.a.createElement(je.a,{userId:E.userId})),n.a.createElement("h3",{className:"section-heading mt-4"},g("UserRestrictionsCanDo")),n.a.createElement("div",{className:"ListItem no-selection"},n.a.createElement(aa.a,{name:"sendMessages",checked:!l.sendMessages,label:g("UserRestrictionsSend"),blocking:!0,disabled:j("sendMessages"),onChange:v})),n.a.createElement("div",{className:"ListItem no-selection"},n.a.createElement(aa.a,{name:"sendMedia",checked:!l.sendMedia,label:g("UserRestrictionsSendMedia"),blocking:!0,disabled:j("sendMedia"),onChange:v})),n.a.createElement("div",{className:"ListItem no-selection"},n.a.createElement(aa.a,{name:"sendStickers",checked:!l.sendStickers&&!l.sendGifs,label:g("UserRestrictionsSendStickers"),blocking:!0,disabled:j("sendStickers"),onChange:v})),n.a.createElement("div",{className:"ListItem no-selection"},n.a.createElement(aa.a,{name:"sendPolls",checked:!l.sendPolls,label:g("UserRestrictionsSendPolls"),blocking:!0,disabled:j("sendPolls"),onChange:v})),n.a.createElement("div",{className:"ListItem no-selection"},n.a.createElement(aa.a,{name:"embedLinks",checked:!l.embedLinks,label:g("UserRestrictionsEmbedLinks"),blocking:!0,disabled:j("embedLinks"),onChange:v})),n.a.createElement("div",{className:"ListItem no-selection"},n.a.createElement(aa.a,{name:"inviteUsers",checked:!l.inviteUsers,label:g("UserRestrictionsInviteUsers"),blocking:!0,disabled:j("inviteUsers"),onChange:v})),n.a.createElement("div",{className:"ListItem no-selection"},n.a.createElement(aa.a,{name:"pinMessages",checked:!l.pinMessages,label:g("UserRestrictionsPinMessages"),blocking:!0,disabled:j("pinMessages"),onChange:v})),n.a.createElement("div",{className:"ListItem no-selection"},n.a.createElement(aa.a,{name:"changeInfo",checked:!l.changeInfo,label:g("UserRestrictionsChangeInfo"),blocking:!0,disabled:j("changeInfo"),onChange:v}))),!r&&n.a.createElement("div",{className:"section"},n.a.createElement(fe.a,{icon:"delete-user",ripple:!0,destructive:!0,onClick:b},g("UserRestrictionsBlock")))),n.a.createElement(zt,{isShown:i,onClick:O,ariaLabel:g("Save"),disabled:d},d?n.a.createElement(B.a,{color:"white"}):n.a.createElement("i",{className:"icon-check"})),n.a.createElement(Dt.a,{isOpen:h,onClose:p,text:"Are you sure you want to ban and remove this user from the group?",confirmLabel:"Remove",confirmHandler:f,confirmIsDestructive:!0}))}));var Hc=Object(n.h)(Object(c.h)((e,{chatId:t})=>{const a=Object(m.f)(e,t),{byId:n}=e.users;return{chat:a,currentUserId:e.currentUserId,isChannel:Object(d.jb)(a),usersById:n}})(({chat:e,isChannel:t,currentUserId:a,usersById:c,onScreenSelect:r,onChatMemberSelect:l})=>{const o=Object(T.a)();const i=Object(n.p)(()=>e.fullInfo&&e.fullInfo.adminMembers?e.fullInfo.adminMembers.sort((e,t)=>e.isOwner?-1:t.isOwner?1:0):[],[e]),m=Object(n.m)(e=>{l(e.userId,e.promotedByUserId===a),r(s.g.ChatAdminRights)},[a,l,r]),u=Object(n.m)(e=>{if(e.isOwner)return o("ChannelCreator");const t=e.promotedByUserId?c[e.promotedByUserId]:void 0;return t?o("EditAdminPromotedBy",Object(d.Z)(t)):o("ChannelAdmin")},[o,c]);return n.a.createElement("div",{className:"Management"},n.a.createElement("div",{className:"custom-scroll"},n.a.createElement("div",{className:"section"},n.a.createElement(fe.a,{icon:"recent",ripple:!0,onClick:function(){r(s.g.GroupRecentActions)}},n.a.createElement("div",{className:"multiline-item"},n.a.createElement("span",{className:"title"},o("EventLog")),n.a.createElement("span",{className:"subtitle"},o(t?"EventLogInfoDetailChannel":"EventLogInfoDetail"))))),n.a.createElement("div",{className:"section"},n.a.createElement("p",{className:"text-muted"},t?"You can add administrators to help you manage your channel.":"You can add administrators to help you manage your group."),i.map(e=>n.a.createElement(fe.a,{key:e.userId,className:"chat-item-clickable",ripple:!0,onClick:()=>m(e)},n.a.createElement(je.a,{userId:e.userId,status:u(e),forceShowSelf:!0}))))))}));var Vc=Object(n.h)(Object(c.h)((e,{chatId:t})=>({chat:Object(m.f)(e,t)}))(({chat:e})=>{const t=Object(T.a)(),a=Object(n.p)(()=>e&&e.fullInfo&&e.fullInfo.adminMembers?e.fullInfo.adminMembers.sort((e,t)=>e.isOwner?-1:t.isOwner?1:0):[],[e]),c=Object(n.m)(e=>e.isOwner?t("ChannelCreator"):t("ChannelAdmin"),[t]);return n.a.createElement("div",{className:"Management"},n.a.createElement("div",{className:"custom-scroll"},n.a.createElement("div",{className:"section not-implemented"},n.a.createElement("h3",{className:"section-heading"},"Actions"),n.a.createElement("div",{className:"ListItem no-selection"},n.a.createElement(aa.a,{name:"changeInfo",checked:!0,label:t("EventLogAllEvents"),onChange:void 0})),n.a.createElement("div",{className:"ListItem no-selection"},n.a.createElement(aa.a,{name:"changeInfo",checked:!0,label:t("EventLogFilterNewAdmins"),onChange:void 0})),n.a.createElement("div",{className:"ListItem no-selection"},n.a.createElement(aa.a,{name:"changeInfo",checked:!0,label:t("EventLogFilterNewMembers"),onChange:void 0})),n.a.createElement("div",{className:"ListItem no-selection"},n.a.createElement(aa.a,{name:"changeInfo",checked:!0,label:t("EventLogFilterChannelInfo"),onChange:void 0})),n.a.createElement("div",{className:"ListItem no-selection"},n.a.createElement(aa.a,{name:"changeInfo",checked:!0,label:t("EventLogFilterDeletedMessages"),onChange:void 0})),n.a.createElement("div",{className:"ListItem no-selection"},n.a.createElement(aa.a,{name:"changeInfo",checked:!0,label:t("EventLogFilterEditedMessages"),onChange:void 0})),n.a.createElement("div",{className:"ListItem no-selection"},n.a.createElement(aa.a,{name:"changeInfo",checked:!0,label:t("EventLogFilterLeavingMembers"),onChange:void 0}))),n.a.createElement("div",{className:"section not-implemented"},n.a.createElement("h3",{className:"section-heading"},"Admins"),n.a.createElement("div",{className:"ListItem no-selection"},n.a.createElement(aa.a,{name:"changeInfo",checked:!0,label:t("EventLogAllAdmins"),onChange:void 0})),a.map(e=>n.a.createElement(fe.a,{key:e.userId,className:"chat-item-clickable picker-list-item",onClick:void 0,ripple:!0},n.a.createElement(aa.a,{label:"",checked:!0}),n.a.createElement(je.a,{userId:e.userId,status:c(e),forceShowSelf:!0}))))))}));var Wc=Object(n.h)(Object(c.h)((e,{chatId:t,isPromotedByCurrentUser:a})=>{const n=Object(m.f)(e,t),{byId:c}=e.users,{currentUserId:r}=e;return{chat:n,usersById:c,currentUserId:r,isChannel:Object(d.jb)(n),isFormFullyDisabled:!(n.isCreator||a)}},(e,t)=>Object(u.l)(t,["updateChatAdmin"]))(({selectedChatMemberId:e,onScreenSelect:t,chat:a,usersById:c,currentUserId:r,isChannel:l,isFormFullyDisabled:o,updateChatAdmin:i})=>{const[m,u]=Object(n.r)({}),[h,b]=Object(n.r)(!1),[p,g]=Object(n.r)(!1),[E,v,O]=Object(De.a)(),[f,j]=Object(n.r)(""),C=Object(T.a)(),y=Object(n.p)(()=>{if(a.fullInfo&&a.fullInfo.adminMembers)return a.fullInfo.adminMembers.find(({userId:t})=>t===e)},[a,e]);Object(n.n)(()=>{a&&a.fullInfo&&e&&!y&&t(s.g.ChatAdministrators)},[a,t,y,e]),Object(n.n)(()=>{u(y&&y.adminRights||{}),j((y&&y.customTitle||"").substr(0,16)),b(!1),g(!1)},[y]);const k=Object(n.m)(e=>{const{name:t}=e.target;u(e=>{return{...e,[t]:(a=e[t],!a||void 0)};var a}),b(!0)},[]),N=Object(n.m)(()=>{e&&(g(!0),i({chatId:a.id,userId:e,adminRights:m,customTitle:f}))},[a,e,m,f,i]),S=Object(n.m)(()=>{e&&(i({chatId:a.id,userId:e,adminRights:{}}),O())},[a.id,O,e,i]),I=Object(n.m)(e=>!Object(d.ib)(a)&&(!(!o&&a.adminRights)||!a.adminRights[e]),[a,o]),w=Object(n.p)(()=>{if(!y)return;if(y.isOwner)return C("ChannelCreator");const e=y.promotedByUserId?c[y.promotedByUserId]:void 0;return e?C("EditAdminPromotedBy",Object(d.Z)(e)):C("ChannelAdmin")},[y,c,C]),P=Object(n.m)(e=>{const{value:t}=e.target;j(t),b(!0)},[]);if(y)return n.a.createElement("div",{className:"Management"},n.a.createElement("div",{className:"custom-scroll"},n.a.createElement("div",{className:"section"},n.a.createElement(fe.a,{inactive:!0,className:"chat-item-clickable"},n.a.createElement(je.a,{userId:y.userId,status:w,forceShowSelf:!0})),n.a.createElement("h3",{className:"section-heading mt-4"},C("EditAdminWhatCanDo")),n.a.createElement("div",{className:"ListItem no-selection"},n.a.createElement(aa.a,{name:"changeInfo",checked:!!m.changeInfo,label:C(l?"EditAdminChangeChannelInfo":"EditAdminChangeGroupInfo"),blocking:!0,disabled:I("changeInfo"),onChange:k})),l&&n.a.createElement("div",{className:"ListItem no-selection"},n.a.createElement(aa.a,{name:"postMessages",checked:!!m.postMessages,label:C("EditAdminPostMessages"),blocking:!0,disabled:I("postMessages"),onChange:k})),l&&n.a.createElement("div",{className:"ListItem no-selection"},n.a.createElement(aa.a,{name:"editMessages",checked:!!m.editMessages,label:C("EditAdminEditMessages"),blocking:!0,disabled:I("editMessages"),onChange:k})),n.a.createElement("div",{className:"ListItem no-selection"},n.a.createElement(aa.a,{name:"deleteMessages",checked:!!m.deleteMessages,label:C(l?"EditAdminDeleteMessages":"EditAdminGroupDeleteMessages"),blocking:!0,disabled:I("deleteMessages"),onChange:k})),!l&&n.a.createElement("div",{className:"ListItem no-selection"},n.a.createElement(aa.a,{name:"banUsers",checked:!!m.banUsers,label:C("EditAdminBanUsers"),blocking:!0,disabled:I("banUsers"),onChange:k})),n.a.createElement("div",{className:"ListItem no-selection"},n.a.createElement(aa.a,{name:"inviteUsers",checked:!!m.inviteUsers,label:C("EditAdminAddUsers"),blocking:!0,disabled:I("inviteUsers"),onChange:k})),!l&&n.a.createElement("div",{className:"ListItem no-selection"},n.a.createElement(aa.a,{name:"pinMessages",checked:!!m.pinMessages,label:C("EditAdminPinMessages"),blocking:!0,disabled:I("pinMessages"),onChange:k})),n.a.createElement("div",{className:"ListItem no-selection"},n.a.createElement(aa.a,{name:"addAdmins",checked:!!m.addAdmins,label:C("EditAdminAddAdmins"),blocking:!0,disabled:I("addAdmins"),onChange:k})),!l&&n.a.createElement("div",{className:"ListItem no-selection"},n.a.createElement(aa.a,{name:"anonymous",checked:!!m.anonymous,label:C("EditAdminSendAnonymously"),blocking:!0,disabled:I("anonymous"),onChange:k})),o&&n.a.createElement("p",{className:"section-info mb-4"},C("Channel.EditAdmin.CannotEdit")),!l&&n.a.createElement(ve.a,{id:"admin-title",label:C("EditAdminRank"),onChange:P,value:f,disabled:o,maxLength:16}),r!==e&&!o&&n.a.createElement(fe.a,{icon:"delete",ripple:!0,destructive:!0,onClick:v},C("EditAdminRemoveAdmin")))),n.a.createElement(zt,{isShown:h,onClick:N,ariaLabel:C("Save"),disabled:p},p?n.a.createElement(B.a,{color:"white"}):n.a.createElement("i",{className:"icon-check"})),n.a.createElement(Dt.a,{isOpen:E,onClose:O,text:"Are you sure you want to dismiss this admin?",confirmLabel:"Dismiss",confirmHandler:S,confirmIsDestructive:!0}))}));var Yc=Object(n.h)(Object(c.h)((e,{chatId:t})=>{const a=Object(m.f)(e,t),{byId:n}=e.users;return{members:a&&a.fullInfo&&a.fullInfo.members,usersById:n,isChannel:a&&Object(d.jb)(a)}},(e,t)=>Object(u.l)(t,["openUserInfo"]))(({members:e,usersById:t,isChannel:a,openUserInfo:c})=>{const r=Object(n.p)(()=>{if(e&&t)return Object(d.W)(e.map(({userId:e})=>e),t)},[e,t]),s=Object(n.m)(e=>{c({id:e})},[c]);return n.a.createElement("div",{className:"Management"},n.a.createElement("div",{className:"custom-scroll"},n.a.createElement("div",{className:"section",teactFastList:!0},r?r.map((e,t)=>n.a.createElement(fe.a,{key:e,teactOrderKey:t,className:"chat-item-clickable scroll-item",onClick:()=>s(e)},n.a.createElement(je.a,{userId:e,forceShowSelf:!0}))):n.a.createElement(Xe.a,{teactOrderKey:0,key:"nothing-found",text:a?"No subscribers found":"No members found"}))))}));var Kc=Object(n.h)(Object(c.h)((e,{chatId:t})=>{const a=Object(m.f)(e,t),{byId:n}=e.users;return{members:a&&a.fullInfo&&a.fullInfo.members,usersById:n,isChannel:a&&Object(d.jb)(a)}})(({usersById:e,members:t,isChannel:a,onScreenSelect:c,onChatMemberSelect:r})=>{const l=Object(n.p)(()=>{if(t&&e)return Object(d.W)(t.filter(e=>!e.isOwner).map(({userId:e})=>e),e)},[t,e]),o=Object(n.m)(e=>{r(e),c(s.g.GroupUserPermissions)},[r,c]);return n.a.createElement("div",{className:"Management"},n.a.createElement("div",{className:"custom-scroll"},n.a.createElement("div",{className:"section",teactFastList:!0},l?l.map((e,t)=>n.a.createElement(fe.a,{key:e,teactOrderKey:t,className:"chat-item-clickable scroll-item",onClick:()=>o(e)},n.a.createElement(je.a,{userId:e,forceShowSelf:!0}))):n.a.createElement(Xe.a,{teactOrderKey:0,key:"nothing-found",text:a?"No subscribers found":"No members found"}))))}));var Zc=Object(n.h)(Object(c.h)(e=>({managementType:Object(m.t)(e)}))(({chatId:e,currentScreen:t,selectedChatMemberId:a,isPromotedByCurrentUser:c,onScreenSelect:r,onChatMemberSelect:l,managementType:o})=>{switch(t){case s.g.Initial:switch(o){case"user":return n.a.createElement(Bc,{key:e,userId:e});case"group":return n.a.createElement(Dc,{key:e,chatId:e,onScreenSelect:r});case"channel":return n.a.createElement(Uc,{key:e,chatId:e,onScreenSelect:r})}break;case s.g.ChatPrivacyType:return n.a.createElement(zc,{chatId:e});case s.g.Discussion:return n.a.createElement(qc,{chatId:e,onScreenSelect:r});case s.g.GroupPermissions:return n.a.createElement(xc,{chatId:e,onScreenSelect:r,onChatMemberSelect:l});case s.g.GroupRemovedUsers:return n.a.createElement(Rc,{chatId:e});case s.g.GroupUserPermissionsCreate:return n.a.createElement(Kc,{chatId:e,onChatMemberSelect:l,onScreenSelect:r});case s.g.GroupUserPermissions:return n.a.createElement($c,{chatId:e,selectedChatMemberId:a,isPromotedByCurrentUser:c,onScreenSelect:r});case s.g.ChatAdministrators:return n.a.createElement(Hc,{chatId:e,onScreenSelect:r,onChatMemberSelect:l});case s.g.GroupRecentActions:return n.a.createElement(Vc,{chatId:e});case s.g.ChatAdminRights:return n.a.createElement(Wc,{chatId:e,selectedChatMemberId:a,isPromotedByCurrentUser:c,onScreenSelect:r});case s.g.ChannelSubscribers:case s.g.GroupMembers:return n.a.createElement(Yc,{chatId:e})}}));const Qc={USD:"$",EUR:"€",GBP:"£",JPY:"¥",RUB:"₽",UAH:"₴",INR:"₹",AED:"د.إ"};function _c(e){return e&&Qc[e]||""}const Xc=/^4[0-9]{12}(?:[0-9]{1,3})?$/,Jc=/^5[1-5][0-9]{11,14}$/,er=/^2[2-7][0-9]{11,14}$/;let tr;!function(e){e[e.Default=0]="Default",e[e.Visa=1]="Visa",e[e.Mastercard=2]="Mastercard"}(tr||(tr={}));const ar={[tr.Default]:"",[tr.Visa]:"visa",[tr.Mastercard]:"mastercard"};function nr(e){return e=e.replace(/\s/g,""),Xc.test(e)?tr.Visa:Jc.test(e)||er.test(e)?tr.Mastercard:tr.Default}var cr=a(54);const rr={streetLine1:"",streetLine2:"",city:"",state:"",countryIso2:"",postCode:"",fullName:"",email:"",phone:"",shipping:"",cardNumber:"",cardholder:"",expiry:"",cvv:"",billingCountry:"",billingZip:"",saveInfo:!0,saveCredentials:!1,formErrors:{}},sr=(e,t)=>{switch(t.type){case"changeAddress1":return{...e,streetLine1:t.payload,formErrors:{...e.formErrors,streetLine1:void 0}};case"changeAddress2":return{...e,streetLine2:t.payload,formErrors:{...e.formErrors,streetLine2:void 0}};case"changeCity":return{...e,city:t.payload,formErrors:{...e.formErrors,city:void 0}};case"changeState":return{...e,state:t.payload,formErrors:{...e.formErrors,state:void 0}};case"changeCountry":return{...e,countryIso2:t.payload,billingCountry:lr(t.payload),formErrors:{...e.formErrors,countryIso2:void 0}};case"changePostCode":return{...e,postCode:t.payload,formErrors:{...e.formErrors,postCode:void 0}};case"changeFullName":return{...e,fullName:t.payload,formErrors:{...e.formErrors,fullName:void 0}};case"changeEmail":return{...e,email:t.payload,formErrors:{...e.formErrors,email:void 0}};case"changePhone":return{...e,phone:t.payload,formErrors:{...e.formErrors,phone:void 0}};case"changeShipping":return{...e,shipping:t.payload};case"changeCardNumber":return{...e,cardNumber:t.payload,formErrors:{...e.formErrors,cardNumber:void 0}};case"changeCardholder":return{...e,cardholder:t.payload,formErrors:{...e.formErrors,cardholder:void 0}};case"changeExpiryDate":return{...e,expiry:t.payload,formErrors:{...e.formErrors,expiry:void 0}};case"changeCvvCode":return{...e,cvv:t.payload,formErrors:{...e.formErrors,cvv:void 0}};case"changeBillingCountry":return{...e,billingCountry:t.payload,formErrors:{...e.formErrors,billingCountry:void 0}};case"changeBillingZip":return{...e,billingZip:t.payload,formErrors:{...e.formErrors,billingZip:void 0}};case"changeSaveInfo":return{...e,saveInfo:t.payload};case"changeSaveCredentials":return{...e,saveCredentials:t.payload};case"updateUserInfo":return t.payload.countryIso2?{...e,...t.payload,billingCountry:lr(t.payload.countryIso2)}:{...e,...t.payload};case"setFormErrors":return{...e,formErrors:{...e.formErrors,...t.payload}};default:return e}};function lr(e){const t=Rt.a.find(({id:t})=>t===e);return t?t.name:""}function or(e,t=400){Object(n.n)(()=>{o.k||setTimeout(()=>{Object(K.b)(()=>{e.current&&e.current.focus()})},t)},[e,t])}var ir=Object(n.h)(e=>{const{id:t,value:a,label:c,hasArrow:r,error:s,ref:l,placeholder:o,onChange:i,children:m}=e,d=s||c,u=Object(le.a)("input-group",a&&"touched",s&&"error",d&&"with-label",r&&"with-arrow","input-group");return n.a.createElement("div",{className:u},n.a.createElement("select",{className:"form-control",id:t,value:a||"",onChange:i,placeholder:o||c,ref:l},m),d&&t&&n.a.createElement("label",{htmlFor:t},d))});a(289);var mr=Object(n.h)(({state:e,needEmail:t,needPhone:a,needName:c,needAddress:r,dispatch:s})=>{const l=Object(n.q)(null),o=Object(n.q)(null),i=Object(n.q)(null);Object(n.n)(()=>{i.current&&i.current.value!==e.countryIso2&&(i.current.value=e.countryIso2)},[e.countryIso2]);const m=Object(T.a)();or(l);const d=Object(n.m)(e=>{s({type:"changeAddress1",payload:e.target.value})},[s]),u=Object(n.m)(e=>{s({type:"changeAddress2",payload:e.target.value})},[s]),h=Object(n.m)(e=>{s({type:"changeCity",payload:e.target.value})},[s]),b=Object(n.m)(e=>{s({type:"changeState",payload:e.target.value})},[s]),p=Object(n.m)(e=>{s({type:"changeCountry",payload:e.target.value})},[s]),g=Object(n.m)(e=>{s({type:"changePostCode",payload:e.target.value})},[s]),E=Object(n.m)(e=>{s({type:"changeFullName",payload:e.target.value})},[s]),v=Object(n.m)(e=>{s({type:"changeEmail",payload:e.target.value})},[s]),O=Object(n.m)(e=>{let{value:t}=e.target;t="+"+t.replace(/\D/g,""),o.current&&(o.current.value=t),s({type:"changePhone",payload:t})},[s]),f=Object(n.m)(e=>{s({type:"changeSaveInfo",payload:e.target.value})},[s]),{formErrors:j}=e;return n.a.createElement("div",{className:"ShippingInfo"},n.a.createElement("form",null,r?n.a.createElement("div",null,n.a.createElement("h5",null,m("PaymentShippingAddress")),n.a.createElement(ve.a,{ref:l,label:"Address1 (Street)",onChange:d,value:e.streetLine1,inputMode:"text",error:j.streetLine1}),n.a.createElement(ve.a,{label:"Address2 (Street)",onChange:u,value:e.streetLine2,inputMode:"text",error:j.streetLine2}),n.a.createElement(ve.a,{label:"City",onChange:h,value:e.city,inputMode:"text",error:j.city}),n.a.createElement(ve.a,{label:"State",onChange:b,value:e.state,inputMode:"text",error:j.state}),n.a.createElement(ir,{label:"Country",placeholder:"Country",onChange:p,value:e.countryIso2,hasArrow:Boolean(!0),id:"shipping-country",error:j.countryIso2,ref:i},Rt.a.map(({name:e,id:t})=>n.a.createElement("option",{value:t,className:"county-item"},e))),n.a.createElement(ve.a,{label:"Post Code",onChange:g,value:e.postCode,inputMode:"text",error:j.postCode})):void 0,c||t||a?n.a.createElement("h5",null,m("PaymentShippingReceiver")):void 0,c&&n.a.createElement(ve.a,{label:"Full name",onChange:E,value:e.fullName,inputMode:"text",error:j.fullName}),t&&n.a.createElement(ve.a,{label:"Email",onChange:v,value:e.email,inputMode:"email",error:j.email}),a&&n.a.createElement(ve.a,{label:"Phone number",onChange:O,value:e.phone,inputMode:"tel",error:j.phone,ref:o}),n.a.createElement(aa.a,{label:m("PaymentShippingSave"),subLabel:m("PaymentShippingSaveInfo"),checked:Boolean(e.saveInfo),onChange:f})))});a(290);var dr=Object(n.h)(({state:e,shippingOptions:t,currency:a,dispatch:c})=>{Object(n.n)(()=>{t&&!e.shipping&&c({type:"changeShipping",payload:t[0].id})},[t,e.shipping,c]);const r=Object(n.m)(e=>{c({type:"changeShipping",payload:e})},[c]),s=Object(n.p)(()=>t.map(({id:e,title:t,amount:n})=>({label:t,subLabel:`${a} ${String(n/100)}`,value:e})),[t,a]);return n.a.createElement("div",{className:"Shipping"},n.a.createElement("form",null,n.a.createElement("p",null,"Select shipping method"),n.a.createElement(oa.a,{name:"shipping-options",options:s,onChange:r,selected:e.shipping})))});a(291);function ur(e,t,a,c=!1){return n.a.createElement("div",{className:"price-info-item "+(c?"price-info-item-main":"")},n.a.createElement("div",{className:"title"},e),n.a.createElement("div",{className:"value"},`${a||""} ${(t/100).toFixed(2)}`))}function hr(e,t,a){return n.a.createElement("div",{className:"checkout-info-item"},n.a.createElement("i",{className:e}," "),n.a.createElement("div",{className:"info"},n.a.createElement("div",{className:"title"},t),n.a.createElement("p",{className:"data"},a)))}var br=Object(n.h)(({invoiceContent:e,prices:t,shippingPrices:a,checkoutInfo:c,currency:r,totalPrice:s})=>{const{photoUrl:l,title:o,text:i}=e||{},{paymentMethod:m,paymentProvider:d,shippingAddress:u,name:h,phone:b,shippingMethod:p}=c||{};return n.a.createElement("div",{className:"Checkout"},n.a.createElement("div",{className:"description has-image"},l&&n.a.createElement("img",{src:l,alt:""}),n.a.createElement("div",{className:"text"},n.a.createElement("h5",null,o),n.a.createElement("p",null,i))),n.a.createElement("div",{className:"price-info"},t&&t.map(e=>ur(e.label,e.amount,r,!1)),a&&a.map(e=>ur(e.label,e.amount,r,!1)),void 0!==s&&ur("Total",s,r,!0)),n.a.createElement("div",{className:"invoice-info"},m&&hr("icon-card",m,"Payment method"),d&&hr("stripe-provider",d,"Payment provider"),u&&hr("icon-location",u,"Shipping address"),h&&hr("icon-user",h,"Name"),b&&hr("icon-phone",b,"Phone number"),p&&hr("icon-truck",p,"Shipping method")))});var pr=Object(n.h)(({value:e,error:t,onChange:a})=>{const c=Object(n.q)(null),r=Object(n.m)(t=>{if("Backspace"===t.key&&"/"===e.charAt(e.length-1)){const t=e.slice(0,e.length-1);c.current&&(c.current.value=t)}},[e]),s=Object(n.m)(e=>{a(function(e){const t=(e=e.replace(/[^\d]/g,"").slice(0,4)).match(/.{1,2}/g);return t&&t[0]&&Number(t[0])>12&&(t[0]="12"),t&&t[0]&&2===t[0].length&&!t[1]&&(t[1]=""),t?t.join("/"):""}(e.target.value))},[a]);return n.a.createElement(ve.a,{label:"Expiry date",ref:c,onChange:s,onKeyDown:r,value:e,error:t,inputMode:"numeric",maxLength:5})}),gr=(a(292),a.p+"mastercard.4216118edafe23cc2dec7b8807ba4622.svg"),Er=a.p+"visa.e5a7c336e1deb4b92a636e2e053878c4.svg";var vr=Object(n.h)(({value:e,error:t,onChange:a})=>{const c=Object(n.q)(null);or(c);const[r,s]=Object(n.r)(tr.Default);Object(n.n)(()=>{const t=nr(e);s(t)},[]);const l=Object(n.m)(e=>{const t=function(e){const t=(e=e.replace(/[^\d]/g,"")).match(/.{1,4}/g);return t?t.join(" "):""}(e.target.value),n=nr(e.target.value);s(n),a(t),c.current&&(c.current.value=t)},[a,c]),o=function(e){switch(e){case tr.Mastercard:return n.a.createElement("img",{src:gr,alt:""});case tr.Visa:return n.a.createElement("img",{src:Er,alt:""});default:return}}(r);return n.a.createElement("div",{className:"CardInput"},n.a.createElement("span",{className:"left-addon"},o),n.a.createElement(ve.a,{ref:c,label:"Card number",onChange:l,value:e,inputMode:"numeric",className:r?"has-left-addon":"",error:t,maxLength:23}))});a(293);var Or=Object(n.h)(({state:e,canSaveCredentials:t,needCardholderName:a,needCountry:c,needZip:r,dispatch:s})=>{const l=Object(n.q)(null);Object(n.n)(()=>{l.current&&l.current.value!==e.billingCountry&&(l.current.value=e.billingCountry)},[e.billingCountry]);const o=Object(n.m)(e=>{s({type:"changeCardNumber",payload:e})},[s]),i=Object(n.m)(e=>{s({type:"changeCardholder",payload:e.target.value.toUpperCase()})},[s]),m=Object(n.m)(e=>{s({type:"changeExpiryDate",payload:e})},[s]),d=Object(n.m)(e=>{s({type:"changeCvvCode",payload:e.target.value})},[s]),u=Object(n.m)(e=>{s({type:"changeBillingCountry",payload:e.target.value})},[s]),h=Object(n.m)(e=>{s({type:"changeBillingZip",payload:e.target.value})},[s]),b=Object(n.m)(e=>{s({type:"changeSaveCredentials",payload:e.target.value})},[s]),p=Object(T.a)(),{formErrors:g={}}=e;return n.a.createElement("div",{className:"PaymentInfo"},n.a.createElement("form",null,n.a.createElement("h5",null,p("PaymentCardTitle")),n.a.createElement(vr,{onChange:o,value:e.cardNumber,error:g.cardNumber}),a&&n.a.createElement(ve.a,{label:"Name on card",onChange:i,value:e.cardholder,inputMode:"text",error:g.cardholder}),n.a.createElement("section",{className:"inline-inputs"},n.a.createElement(pr,{value:e.expiry,onChange:m,error:g.expiry}),n.a.createElement(ve.a,{label:"CVV code",onChange:d,value:e.cvv,inputMode:"numeric",maxLength:3,error:g.cvv})),c||r?n.a.createElement("h5",null,p("PaymentBillingAddress")):void 0,c&&n.a.createElement(ir,{label:"Country",placeholder:"Country",onChange:u,value:e.billingCountry,hasArrow:Boolean(!0),id:"billing-country",error:g.billingCountry,ref:l},Rt.a.map(({name:e})=>n.a.createElement("option",{value:e,className:"county-item"},e))),r&&n.a.createElement(ve.a,{label:"Post Code",onChange:h,value:e.billingZip,inputMode:"text",error:g.billingZip}),t&&n.a.createElement(aa.a,{label:p("PaymentCardSavePaymentInformation"),checked:e.saveCredentials,onChange:b})))});a(174);var fr=Object(n.h)(Object(c.h)(e=>{const{step:t,shippingOptions:a,savedInfo:n,canSaveCredentials:c,invoice:r,invoiceContent:s,nativeProvider:l,nativeParams:o,passwordMissing:i,error:m}=e.payment,d=Boolean(r&&(!l||"stripe"!==l)),{needCardholderName:u,needCountry:h,needZip:b}=o||{},{nameRequested:p,phoneRequested:g,emailRequested:E,shippingAddressRequested:v,flexible:O,phoneToProvider:f,emailToProvider:j,currency:C,prices:y}=r||{};return{step:t,shippingOptions:a,savedInfo:n,canSaveCredentials:c,nativeProvider:l,passwordMissing:i,nameRequested:p,shippingAddressRequested:v,phoneRequested:g,emailRequested:E,flexible:O,phoneToProvider:f,emailToProvider:j,currency:C,prices:y,isProviderError:d,invoiceContent:s,needCardholderName:u,needCountry:h,needZip:b,error:m,globalErrors:e.errors}},(e,t)=>Object(u.l)(t,["validateRequestedInfo","sendPaymentForm","setPaymentStep","sendCredentialsInfo","clearPaymentError"]))(({isOpen:e,onClose:t,step:a,shippingOptions:c,savedInfo:r,canSaveCredentials:l,nameRequested:o,shippingAddressRequested:i,phoneRequested:m,emailRequested:d,phoneToProvider:u,emailToProvider:h,currency:b,passwordMissing:p,isProviderError:g,invoiceContent:E,nativeProvider:v,prices:O,needCardholderName:f,needCountry:j,needZip:C,error:y,globalErrors:k,validateRequestedInfo:N,sendPaymentForm:S,setPaymentStep:I,sendCredentialsInfo:w,clearPaymentError:P})=>{const[M,F]=Nt(sr,rr),L=_c(b),[A,D]=Object(n.r)(!1),U=Object(T.a)();Object(n.n)(()=>{(a||y||k)&&D(!1)},[a,y,k]),Object(n.n)(()=>{if(y&&y.field)F({type:"setFormErrors",payload:{[y.field]:y.fieldError}});else if(k&&k.length){const e=Object(cr.a)(k);F({type:"setFormErrors",payload:{...e}})}},[y,k,F]),Object(n.n)(()=>{if(r){const{name:e,phone:t,email:a,shippingAddress:n}=r;F({type:"updateUserInfo",payload:{fullName:e,phone:t&&"+"!==t.charAt(0)?"+"+t:t,email:a,...n||{}}})}},[r,F]);const G=Object(n.m)(()=>{P()},[P]),z=Object(n.p)(()=>a!==s.i.Checkout?0:function(e=[],t,a){const n=t?Cr(t,a):[];let c=0;const r=e.concat(n||[]);return c=r.reduce((e,t)=>e+t.amount,c),c}(O,c,M.shipping),[a,M.shipping,O,c]),q=Object(n.p)(()=>{if(a===s.i.Checkout)return function(e,t,a){const n=`${function(e){const t=nr(e);return ar[t]||""}(e.cardNumber)} *${e.cardNumber.slice(-4)}`,c=e.streetLine1?`${e.streetLine1}, ${e.city}, ${e.countryIso2}`:void 0,{phone:r,fullName:s}=e,l=t?jr(t,e.shipping):void 0,o=l?l.title:void 0;return{paymentMethod:n,paymentProvider:a,shippingAddress:c,name:s,phone:r,shippingMethod:o}}(M,c,v||"")},[a,M,c,v]);const $=Object(n.m)(()=>{const{saveInfo:e}=M,t=function(e){const{streetLine1:t,streetLine2:a,city:n,state:c,countryIso2:r,postCode:s,fullName:l,phone:o,email:i}=e;return{name:l,phone:o,email:i,shippingAddress:{streetLine1:t,streetLine2:a,city:n,state:c,countryIso2:r,postCode:s}}}(M);N({requestInfo:t,saveInfo:e})},[N,M]),H=Object(n.m)(()=>{const e=function(e){const{cardNumber:t,cardholder:a,expiry:n,cvv:c,billingCountry:r,billingZip:s}=e,[l,o]=n.split("/");return{data:{cardNumber:t,cardholder:a,expiryMonth:l,expiryYear:o,cvv:c,country:r,zip:s}}}(M);w({credentials:e})},[w,M]),V=Object(n.m)(()=>{S({shippingOptionId:M.shipping,saveCredentials:M.saveCredentials})},[S,M]),W=Object(n.m)(e=>{I({step:e})},[I]),Y=Object(n.m)(()=>{switch(D(!0),a){case s.i.ShippingInfo:return $();case s.i.Shipping:return W(s.i.PaymentInfo);case s.i.PaymentInfo:return H();case s.i.Checkout:return V();default:return()=>{}}},[a,$,W,H,V]),K=Object(n.p)(()=>{switch(a){case s.i.ShippingInfo:return U("PaymentShippingInfo");case s.i.Shipping:return U("PaymentShippingMethod");case s.i.PaymentInfo:return U("PaymentCardInfo");case s.i.Checkout:return U("PaymentCheckout");default:return""}},[a,U]),Z=Object(n.p)(()=>{switch(a){case s.i.Checkout:return`Pay ${L}${(z/100).toFixed(2)}`;default:return"Next Step"}},[a,z,L]);return g?n.a.createElement(Ee.a,{className:"error",isOpen:e,onClose:t},"Sorry, Telegram T doesn't support payments with this provider yet. Please use one of our mobile apps to do this.",n.a.createElement(R.a,{isText:!0,onClick:t},"OK")):n.a.createElement(Ee.a,{className:"PaymentModal",isOpen:e,onClose:t},n.a.createElement("div",{className:"header"},n.a.createElement(R.a,{className:"close-button",color:"translucent",round:!0,size:"smaller",onClick:t,ariaLabel:"Close"},n.a.createElement("i",{className:"icon-close"})),n.a.createElement("h3",null,K)),void 0!==a?n.a.createElement(x.a,{name:"slide",activeKey:a},()=>n.a.createElement("div",{className:"content custom-scroll"},function(e){switch(e){case s.i.ShippingInfo:return n.a.createElement(mr,{state:M,dispatch:F,needAddress:Boolean(i),needEmail:Boolean(d||h),needPhone:Boolean(m||u),needName:Boolean(o)});case s.i.Shipping:return n.a.createElement(dr,{state:M,dispatch:F,shippingOptions:c||[],currency:L});case s.i.PaymentInfo:return n.a.createElement(Or,{state:M,dispatch:F,canSaveCredentials:Boolean(!p&&l),needCardholderName:f,needCountry:j,needZip:C});case s.i.Checkout:return n.a.createElement(br,{prices:O,shippingPrices:M.shipping&&c?Cr(c,M.shipping):void 0,totalPrice:z,invoiceContent:E,checkoutInfo:q,currency:L});default:return}}(a))):n.a.createElement("div",{className:"empty-content"},n.a.createElement(B.a,{color:"gray"})),n.a.createElement("div",{className:"footer"},n.a.createElement(R.a,{type:"submit",onClick:Y,disabled:A,isLoading:A},Z)),y&&!y.field&&function(){if(y)return n.a.createElement(Ee.a,{className:"error",isOpen:Boolean(y),onClose:G},n.a.createElement("h4",null,y.description||"Error"),y.description||"Error",n.a.createElement(R.a,{isText:!0,onClick:P},"OK"))}())}));function jr(e,t){return e.find(({id:e})=>e===t)}function Cr(e,t){const a=jr(e,t);return a?a.prices:void 0}var yr=Object(n.h)(Object(c.h)(e=>{const{receipt:t}=e.payment,{currency:a,prices:n,info:c,totalAmount:r,credentialsTitle:s,shippingPrices:l,shippingMethod:o,photoUrl:i,text:m,title:d}=t||{};return{currency:a,prices:n,info:c,totalAmount:r,credentialsTitle:s,shippingPrices:l,shippingMethod:o,photoUrl:i,text:m,title:d}})(({isOpen:e,onClose:t,prices:a,shippingPrices:c,totalAmount:r,currency:s,info:l,photoUrl:o,text:i,title:m,credentialsTitle:d,shippingMethod:u})=>{const h=Object(T.a)(),b=_c(s),p=Object(n.p)(()=>function(e,t,a){if(!t)return{paymentMethod:e};const{shippingAddress:n}=t,c=n&&n.streetLine1?`${n.streetLine1}, ${n.city}, ${n.countryIso2}`:void 0,{phone:r,name:s}=t;return{paymentMethod:e,paymentProvider:"Stripe",shippingAddress:c,name:s,phone:r,shippingMethod:a}}(d,l,u),[l,u,d]);return n.a.createElement(Ee.a,{className:"PaymentModal PaymentModal-receipt",isOpen:e,onClose:t},n.a.createElement("div",null,n.a.createElement("div",{className:"header"},n.a.createElement(R.a,{className:"close-button",color:"translucent",round:!0,size:"smaller",onClick:t,ariaLabel:"Close"},n.a.createElement("i",{className:"icon-close"})),n.a.createElement("h3",null," ",h("PaymentReceipt")," ")),n.a.createElement("div",{className:"receipt-content custom-scroll"},n.a.createElement(br,{prices:a,shippingPrices:c,totalPrice:r,invoiceContent:{photoUrl:o,text:i,title:m},checkoutInfo:p,currency:b}))))}))},,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var n=a(5),c=a(48);const r={MonkeyIdle:a.p+"TwoFactorSetupMonkeyIdle.dea4a492c144df84ddab778dc8a3f0cd.tgs",MonkeyTracking:a.p+"TwoFactorSetupMonkeyTracking.eb5a7a6f166fb7589c12e6248561fb58.tgs",MonkeyClose:a.p+"TwoFactorSetupMonkeyClose.604c4c833d322b7e6c3ea19bef058241.tgs",MonkeyPeek:a.p+"TwoFactorSetupMonkeyPeek.1905436b042520363d7e59f5d7f903ab.tgs",FoldersAll:a.p+"FoldersAll.3f9f9e243d19f0fbf9aaaff11cbd4572.tgs",FoldersNew:a.p+"FoldersNew.9a40d71c0c8be70f5bd14ff2d7bc1593.tgs",DiscussionGroups:a.p+"DiscussionGroupsDucks.9ea453d1be9d1b0ee77a992f8e587485.tgs"};function s(e){const t=r[e].replace(window.location.origin,"");return c.b("file"+t,n.ApiMediaFormat.Lottie)}},,,,function(e,t,a){"use strict";var n=a(0),c=a(8),r=a(1),s=a(14),l=a(93),o=a(31),i=a(98),m=a(16);a(140);const d={type:"blob",quality:.8,format:"jpeg",circle:!1};let u,h,b;var p=Object(n.h)(({file:e,onChange:t,onClose:c})=>{const[p,g]=Object(n.r)(!1);Object(n.n)(()=>{e&&(p?async function(e){try{const t=document.getElementById("avatar-crop");if(!t)return;const{offsetWidth:a,offsetHeight:n}=t;b=new u(t,{enableZoom:!0,boundary:{width:a,height:n},viewport:{width:a-16,height:n-16,type:"circle"}});const c=await Object(s.a)(e);await b.bind({url:c})}catch(e){r.m&&console.error(e)}}(e):async function(){return h||(h=Promise.all([a.e(5),a.e(8)]).then(a.bind(null,301)),u=(await h).default),h}().then(()=>g(!0)))},[e,p]);const E=Object(l.a)();return n.a.createElement(i.a,{isOpen:Boolean(e),onClose:c,title:"Drag to reposition",className:"CropModal",hasCloseButton:!0},p?n.a.createElement("div",{id:"avatar-crop"}):n.a.createElement(m.a,null),n.a.createElement(o.a,{className:"confirm-button",round:!0,color:"primary",onClick:async function(){if(!b)return;const e=await b.result(d),a="string"==typeof e?e:Object(s.b)(e,"avatar.jpg");t(a)},ariaLabel:E("CropImage")},n.a.createElement("i",{className:"icon-check"})))});a(141);t.a=Object(n.h)(({title:e="Change your profile picture",disabled:t,currentAvatarBlobUrl:a,onChange:r})=>{const[s,l]=Object(n.r)(),[o,i]=Object(n.r)(a);Object(n.n)(()=>{i(a)},[a]);const m=Object(c.a)(o&&"filled",t&&"disabled");return n.a.createElement("div",{className:"AvatarEditable"},n.a.createElement("label",{className:m,role:"button",tabIndex:0,title:e},n.a.createElement("input",{type:"file",onChange:function(e){const t=e.target;t&&t.files&&t.files[0]&&(l(t.files[0]),t.value="")},accept:"image/png, image/jpeg"}),n.a.createElement("i",{className:"icon-camera-add"}),o&&n.a.createElement("img",{src:o,alt:"Avatar"})),n.a.createElement(p,{file:s,onClose:function(){l(void 0)},onChange:function(e){l(void 0),r(e),o&&URL.revokeObjectURL(o),i(URL.createObjectURL(e))}}))})},,,,,function(e,t,a){},,,,,,,,,,,,function(e,t,a){"use strict";var n=a(0),c=a(1),r=a(7),s=a(116),l=a(105);a(125);const o=[0,50],i=[0,20],m=[20,0],d=r.f?c.fb:c.eb;t.a=Object(n.h)(({isPasswordVisible:e,isBig:t})=>{const[a,r]=Object(n.r)(),[u,h]=Object(n.r)(),[b,p]=Object(n.r)(!1),[g,E]=Object(n.r)(!1);Object(n.n)(()=>{a?setTimeout(()=>E(!0),2e3):Object(s.a)("MonkeyClose").then(r)},[a]),Object(n.n)(()=>{u||Object(s.a)("MonkeyPeek").then(h)},[u]);const v=Object(n.m)(()=>p(!0),[]);return n.a.createElement("div",{id:"monkey",className:t?"big":""},!b&&n.a.createElement("div",{className:"monkey-preview"}),a&&n.a.createElement(l.a,{id:"closeMonkey",size:t?c.pb:d,className:g?"hidden":"shown",animationData:a,playSegment:o,noLoop:!0,onLoad:v}),u&&n.a.createElement(l.a,{id:"peekMonkey",size:t?c.pb:d,className:g?"shown":"hidden",animationData:u,playSegment:e?i:m,noLoop:!0}))})},function(e,t,a){"use strict";var n=a(0),c=a(1),r=a(7),s=a(8),l=a(31);const o=r.f?550:400;t.a=Object(n.h)(({isLoading:e=!1,isPasswordVisible:t,error:a,hint:i,placeholder:m="Password",submitLabel:d="Next",clearError:u,onChangePasswordVisibility:h,onInputChange:b,onSubmit:p})=>{const g=Object(n.q)(null),[E,v]=Object(n.r)(""),[O,f]=Object(n.r)(!1);return Object(n.n)(()=>{r.k||setTimeout(()=>{g.current.focus()},o)},[]),n.a.createElement("form",{action:"",onSubmit:function(t){t.preventDefault(),e||O&&p(E)},autoComplete:"off"},n.a.createElement("div",{className:Object(s.a)("input-group password-input",E&&"touched",a&&"error")},n.a.createElement("input",{ref:g,className:"form-control",type:t?"text":"password",id:"sign-in-password",value:E||"",autoComplete:"current-password",onChange:function(e){a&&u();const{target:t}=e;v(t.value),f(t.value.length>=c.Q),b&&b(t.value)}}),n.a.createElement("label",null,a||i||m),n.a.createElement("div",{className:"toggle-password",onClick:function(){h(!t)},role:"button",tabIndex:0,title:"Toggle password visibility"},n.a.createElement("i",{className:t?"icon-eye":"icon-eye-closed"}))),O&&n.a.createElement(l.a,{type:"submit",ripple:!0,isLoading:e},d))})},,function(e,t,a){},function(e,t,a){},,,,,,,,,,,,,function(e,t,a){},,,,,,,,,,,,,,,,,,,function(e,t,a){},function(e,t,a){},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,a){},function(e,t,a){},function(e,t,a){},function(e,t,a){},function(e,t,a){},function(e,t,a){},function(e,t,a){},function(e,t,a){},function(e,t,a){},function(e,t,a){},function(e,t,a){},function(e,t,a){},function(e,t,a){},function(e,t,a){},function(e,t,a){},function(e,t,a){},function(e,t,a){},function(e,t,a){},function(e,t,a){},function(e,t,a){},function(e,t,a){},function(e,t,a){},function(e,t,a){},function(e,t,a){},function(e,t,a){},function(e,t,a){},function(e,t,a){},function(e,t,a){},function(e,t,a){},function(e,t,a){},function(e,t,a){},function(e,t,a){},function(e,t,a){},function(e,t,a){},function(e,t,a){},function(e,t,a){},function(e,t,a){},function(e,t,a){},function(e,t,a){},function(e,t,a){},function(e,t,a){},function(e,t,a){},function(e,t,a){},function(e,t,a){},function(e,t,a){},function(e,t,a){},function(e,t,a){},function(e,t,a){},function(e,t,a){},function(e,t,a){},function(e,t,a){},function(e,t,a){},function(e,t,a){},function(e,t,a){},function(e,t,a){},function(e,t,a){},function(e,t,a){}])]); \ No newline at end of file diff --git a/dist/3.186fa7c0f46f0fc2b14a.css b/dist/3.186fa7c0f46f0fc2b14a.css deleted file mode 100644 index 7695f305..00000000 --- a/dist/3.186fa7c0f46f0fc2b14a.css +++ /dev/null @@ -1 +0,0 @@ -.Switcher{display:inline-flex;align-items:center;position:relative;margin:0}.Switcher.disabled{pointer-events:none;opacity:.5}.Switcher input{height:0;width:0;visibility:hidden;position:absolute;z-index:var(--z-below);opacity:0}.Switcher .widget{cursor:pointer;text-indent:-999px;width:2.125rem;height:.875rem;background:var(--color-gray);display:inline-block;border-radius:.5rem;position:relative}.Switcher .widget:after{content:"";position:absolute;top:-.125rem;left:0;width:1.125rem;height:1.125rem;background:var(--color-background);border-radius:.75rem;border:.125rem solid var(--color-gray)}.Switcher input:checked+.widget{background:var(--color-primary)}.Switcher input:checked+.widget:after{left:calc(100% - 1.125rem);transform:translateX(calc(-100% + 1.125rem));border-color:var(--color-primary)}#LeftMainHeader{position:relative}#LeftMainHeader .animated-menu-icon{position:absolute}#LeftMainHeader .animated-menu-icon,#LeftMainHeader .animated-menu-icon:after,#LeftMainHeader .animated-menu-icon:before{width:1.125rem;height:.125rem;border-radius:.125rem;background-color:var(--color-text-secondary);transition:transform .25s;transform:rotate(0)}#LeftMainHeader .animated-menu-icon:after,#LeftMainHeader .animated-menu-icon:before{position:absolute;left:0;content:""}#LeftMainHeader .animated-menu-icon:before{top:-.3125rem}#LeftMainHeader .animated-menu-icon:after{top:.3125rem}#LeftMainHeader .animated-menu-icon.state-back{transform:rotate(180deg)}#LeftMainHeader .animated-menu-icon.state-back:before{transform:rotate(45deg) scaleX(.75) translate(.375rem,-.1875rem)}#LeftMainHeader .animated-menu-icon.state-back:after{transform:rotate(-45deg) scaleX(.75) translate(.375rem,.1875rem)}#LeftMainHeader .archived-badge{min-width:1.5rem;height:1.5rem;margin-left:auto;background:var(--color-gray);border-radius:.75rem;padding:0 .45rem;color:#fff;font-size:.875rem;line-height:1.5rem;font-weight:500;text-align:center;flex-shrink:0}.Transition>div:not(.active) #LeftMainHeader .Menu .bubble,body.animating-right-column #LeftMainHeader .Menu .bubble{transition:none!important}#ConnectionState{flex:0 0 auto;display:flex;align-items:center;margin:0 .5rem .5rem;padding:.75rem;background:var(--color-yellow);border-radius:var(--border-radius-default)}#ConnectionState>.Spinner{--spinner-size:1.75rem}#ConnectionState>.state-text{color:var(--color-text-lighter);font-weight:500;line-height:2rem;margin-left:1.9rem;white-space:nowrap}@media (max-width:950px){#ConnectionState>.state-text{margin-left:1.2rem}}.NewChatButton{position:absolute;right:1rem;bottom:1rem;transform:translateY(5rem);transition:transform .25s cubic-bezier(.34,1.56,.64,1)}body.animation-level-0 .NewChatButton{transform:none!important;opacity:0;transition:opacity .15s}body.animation-level-0 .NewChatButton.revealed{opacity:1}.NewChatButton.revealed{transform:translateY(0)}@media (max-width:600px){.NewChatButton.revealed{transform:translateZ(10px);transform-style:preserve-3d}}.NewChatButton.menu-is-open:before{content:"";display:block;position:absolute;top:-13rem;left:-11rem;right:-1rem;bottom:-1rem;z-index:-1}.is-touch-env .NewChatButton .Menu>.backdrop{position:absolute;left:-100vw;right:-100vw;top:-100vh;bottom:-100vh}.NewChatButton>.Button .icon-close,.NewChatButton>.Button .icon-new-chat-filled{position:absolute}.NewChatButton>.Button:not(.active) .icon-new-chat-filled{animation:grow-icon .4s ease-out}.NewChatButton>.Button:not(.active) .icon-close{animation:hide-icon .4s ease-out forwards}.NewChatButton>.Button.active .icon-close{animation:grow-icon .4s ease-out}.NewChatButton>.Button.active .icon-new-chat-filled{animation:hide-icon .4s ease-out forwards}#LeftColumn-main{height:100%;position:relative;display:flex;flex-direction:column;overflow:hidden;z-index:1}#LeftColumn-main>.Transition{flex:1;overflow:hidden}#LeftColumn-main .ChatFolders{height:100%;display:flex;flex-direction:column;overflow:hidden}#LeftColumn-main .ChatFolders .tabs-placeholder{height:2.625rem;transition:height .15s ease}#LeftColumn-main .ChatFolders .tabs-placeholder:not(.open){height:0}#LeftColumn-main .ChatFolders .TabList{justify-content:flex-start;padding-left:.5625rem;padding-bottom:1px;border-bottom:0;z-index:1}#LeftColumn-main .ChatFolders .Tab{flex:0 0 auto;padding-left:.625rem;padding-right:.625rem}#LeftColumn-main .ChatFolders .Tab>span{padding-left:.5rem;padding-right:.5rem}#LeftColumn-main .ChatFolders>.Transition{flex:1;overflow:hidden}#LeftColumn-main .chat-list,#LeftColumn-main .LeftSearch,#LeftColumn-main .RecentContacts,#LeftColumn-main .search-content{height:100%;overflow-y:auto}#LeftColumn{overflow:hidden}#NewChat{height:100%}.left-header{height:var(--header-height);padding:.375rem 1.25rem .5rem .8125rem;display:flex;align-items:center;flex-shrink:0;background-color:var(--color-background)}.left-header h3{margin-bottom:0;font-size:1.25rem;font-weight:500;margin-left:1.375rem}.left-header .SearchInput{margin-left:.875rem;max-width:calc(100% - 3.625rem)}@media (max-width:600px){.left-header .SearchInput{max-width:calc(100% - 3.375rem)}}@media (max-width:600px){.left-header{padding:.5rem}}.AudioPlayer{display:flex;margin-left:auto;margin-top:-.25rem;margin-bottom:-.25rem}body.animation-level-0 .AudioPlayer{transition:none!important}.AudioPlayer>.Button{flex-shrink:0;margin:.125rem}.AudioPlayer>.toggle-play{--color-text-secondary:var(--color-primary);--color-text-secondary-rgb:var(--color-primary-shade-rgb);--color-primary-shade:var(--color-green);--color-white:var(--color-background-own)}.MiddleHeader .AudioPlayer+.HeaderActions{margin-left:1.5rem}.AudioPlayer .toggle-play.smaller{width:3rem;height:3rem}.AudioPlayer .toggle-play.smaller i{font-size:1.625rem;margin-top:-.025rem}.AudioPlayer .toggle-play i{position:absolute;font-size:1.9375rem;margin-top:-.05rem}.AudioPlayer .toggle-play i.icon-play{margin-left:.1rem}.AudioPlayer .toggle-play .icon-pause,.AudioPlayer .toggle-play .icon-play{opacity:1;transform:scale(1);transition:opacity .4s,transform .6s cubic-bezier(.34,1.56,.64,1)}.AudioPlayer .toggle-play.loading .icon-pause,.AudioPlayer .toggle-play.loading .icon-play,.AudioPlayer .toggle-play.pause .icon-play,.AudioPlayer .toggle-play.play .icon-pause{opacity:0;transform:scale(.5)}.AudioPlayer-content{display:flex;justify-content:center;flex-direction:column;flex-shrink:1;padding:.25rem .5rem;position:relative;overflow:hidden;cursor:pointer;max-width:15rem;border-radius:var(--border-radius-messages-small)}.AudioPlayer-content:hover{background-color:rgba(var(--color-text-secondary-rgb),.08)}@media (min-width:1440px) and (max-width:1500px){.AudioPlayer-content{max-width:14rem}}.AudioPlayer .AudioPlayer-content .title{display:block;font-weight:500;font-size:.875rem!important;line-height:1rem;height:1rem;margin-bottom:.125rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.AudioPlayer-content .subtitle{font-size:.85rem!important;color:var(--color-text-secondary);line-height:1.125rem;height:1.125rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin:0}.MiddleHeader{display:flex;align-items:center;width:100%;box-shadow:0 2px 2px var(--color-light-shadow);background:var(--color-background);padding:.5rem .8125rem .5rem 1.5rem;position:relative;z-index:var(--z-middle-header)}@media (max-width:600px){.MiddleHeader{padding:.5rem;position:relative;transform:translateZ(10px);transform-style:preserve-3d}}.MiddleHeader .Transition{width:100%;min-width:0}.MiddleHeader .Transition>div{display:flex;align-items:center;width:100%}.MiddleHeader .back-button{margin-left:-.5rem;margin-right:.5rem;position:relative}@media (max-width:600px){.MiddleHeader .back-button{margin-left:0}}.MiddleHeader .back-button .unread-count{min-width:1.25rem;height:1.25rem;padding:0 .375rem;border-radius:.625rem;font-size:.75rem;line-height:1.25rem;font-weight:500;text-align:center;position:absolute;top:-.25rem;right:-.5rem;background:var(--color-gray);color:#fff;pointer-events:none}.MiddleHeader .back-button .unread-count.active{background:var(--color-primary)}.MiddleHeader .chat-info-wrapper{flex-grow:1;overflow:hidden}.MiddleHeader .header-tools{display:flex;align-items:center;justify-content:flex-end;margin-left:auto;flex-shrink:0}body.animation-level-0 .MiddleHeader .header-tools,body.animation-level-0 .MiddleHeader .header-tools .AudioPlayer,body.animation-level-0 .MiddleHeader .header-tools .HeaderActions,body.animation-level-0 .MiddleHeader .header-tools .HeaderPinnedMessage-wrapper{transition:none!important}@media (min-width:1276px) and (max-width:1439px){.MiddleHeader .header-tools .HeaderActions{transform:translateZ(0);transition:transform var(--layer-transition)}#Main.right-column-open .MiddleHeader .header-tools .HeaderActions{transform:translate3d(calc(var(--right-column-width)*-1),0,0)}}@media (min-width:1440px){.MiddleHeader .header-tools{transform:translateZ(0);transition:transform var(--layer-transition)}#Main.right-column-open .MiddleHeader .header-tools{transform:translate3d(calc(var(--right-column-width)*-1),0,0)}}.Transition>div:not(.active) .MiddleHeader .header-tools,body.animating-right-column .MiddleHeader .header-tools{pointer-events:none}@media (min-width:1276px) and (max-width:1439px){.MiddleHeader:not(.tools-stacked) .header-tools .AudioPlayer,.MiddleHeader:not(.tools-stacked) .header-tools .HeaderPinnedMessage-wrapper{opacity:1}#Main.right-column-open .MiddleHeader:not(.tools-stacked) .header-tools .AudioPlayer,#Main.right-column-open .MiddleHeader:not(.tools-stacked) .header-tools .HeaderPinnedMessage-wrapper{opacity:0}}.MiddleHeader.tools-stacked .header-tools .AudioPlayer,.MiddleHeader.tools-stacked .header-tools .HeaderPinnedMessage-wrapper{position:absolute;top:100%;left:0;right:0;height:2.875rem;overflow:hidden;box-shadow:0 2px 2px var(--color-light-shadow);display:flex;flex-direction:row-reverse;padding:.375rem .5rem .375rem .75rem;background:var(--color-background)}.MiddleHeader.tools-stacked .header-tools .AudioPlayer:before,.MiddleHeader.tools-stacked .header-tools .HeaderPinnedMessage-wrapper:before{content:"";display:block;position:absolute;top:-2px;left:0;right:0;height:2px;box-shadow:0 2px 2px var(--color-light-shadow)}.MiddleHeader.tools-stacked .header-tools .AudioPlayer .HeaderPinnedMessage,.MiddleHeader.tools-stacked .header-tools .HeaderPinnedMessage-wrapper .HeaderPinnedMessage{max-width:unset}.MiddleHeader.tools-stacked .header-tools .AudioPlayer{height:3.25rem;flex-direction:row;padding:.375rem .5rem}.MiddleHeader.tools-stacked .header-tools .AudioPlayer-content{padding:0 .5rem;flex-grow:1}.MiddleHeader.tools-stacked .header-tools .AudioPlayer>.Button{margin:0}.MiddleHeader.tools-stacked .header-tools .AudioPlayer>.player-close{margin-left:auto}.MiddleHeader.tools-stacked .header-tools .HeaderPinnedMessage{flex-grow:1;padding-top:0;padding-bottom:0}.MiddleHeader.tools-stacked .header-tools .HeaderPinnedMessage:before{top:.125rem;bottom:.125rem}.MiddleHeader.tools-stacked .header-tools .HeaderPinnedMessage .message-text{max-width:none}@media (min-width:1150px){#Main.right-column-open .MiddleHeader.tools-stacked .header-tools .AudioPlayer,#Main.right-column-open .MiddleHeader.tools-stacked .header-tools .HeaderPinnedMessage-wrapper{padding-right:calc(.5rem + var(--right-column-width))}}.MiddleHeader.tools-stacked.animated .header-tools .AudioPlayer,.MiddleHeader.tools-stacked.animated .header-tools .HeaderPinnedMessage-wrapper{animation:fade-in var(--layer-transition) forwards}body.animation-level-0 .MiddleHeader.tools-stacked.animated .header-tools .AudioPlayer,body.animation-level-0 .MiddleHeader.tools-stacked.animated .header-tools .HeaderPinnedMessage-wrapper{animation:none}.MiddleHeader h3{font-weight:500;font-size:1.125rem;line-height:1.375rem;white-space:pre;margin:0;overflow:hidden;text-overflow:ellipsis}@media (max-width:600px){.MiddleHeader h3{display:block;overflow:hidden;text-overflow:ellipsis}}@media (min-width:1275px){#Main.right-column-open .MiddleHeader h3{max-width:calc(100% - var(--right-column-width))}}.MiddleHeader .ChatInfo{cursor:pointer;display:flex;align-items:center}.MiddleHeader .ChatInfo .info{display:flex;flex-direction:column;justify-content:center;flex-grow:1;overflow:hidden}.MiddleHeader .ChatInfo .title{display:flex;align-items:center}.MiddleHeader .ChatInfo .title .VerifiedIcon{width:1.25rem;height:1.25rem;margin-left:.25rem;margin-top:.05rem}.MiddleHeader .Avatar{margin-right:.625rem;width:2.5rem;height:2.5rem;font-size:1.0625rem}.MiddleHeader .status,.MiddleHeader .typing-status{font-size:.875rem;line-height:1.125rem;margin:0;color:var(--color-text-secondary);overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.MiddleHeader .status.online,.MiddleHeader .typing-status.online{color:var(--color-primary)}.MiddleHeader .Button.smaller{width:2.5rem;height:2.5rem}.MiddleHeader .HeaderPinnedMessage-wrapper{display:flex;align-items:center;margin-left:auto;cursor:default;flex-direction:row-reverse}body.animation-level-1 .MiddleHeader .HeaderPinnedMessage-wrapper .ripple-container{display:none}.MiddleHeader .HeaderPinnedMessage-wrapper .HeaderPinnedMessage{min-width:16rem}.MiddleHeader .HeaderPinnedMessage-wrapper>.Button{flex-shrink:0}.MiddleHeader .HeaderPinnedMessage{display:flex;flex-shrink:1;margin-top:-.25rem;margin-bottom:-.25rem;padding:.25rem .25rem .25rem .375rem;border-radius:var(--border-radius-messages-small);position:relative;overflow:hidden;cursor:pointer}.MiddleHeader .HeaderPinnedMessage:hover{background-color:rgba(var(--color-text-secondary-rgb),.08)}.MiddleHeader .HeaderPinnedMessage .pinned-message-border{position:relative;height:2.25rem;margin:.125rem 0;width:.125rem;min-width:.125rem;overflow:hidden}.MiddleHeader .HeaderPinnedMessage .pinned-message-border .pinned-message-border-wrapper-1{height:2.25rem;width:.125rem;border-radius:.0625rem;background:var(--color-primary)}.MiddleHeader .HeaderPinnedMessage .pinned-message-border .pinned-message-border-wrapper{background-color:rgba(var(--color-primary-rgb),.5);position:relative;will-change:transform;transition:transform .25s ease-in-out}.MiddleHeader .HeaderPinnedMessage .pinned-message-border .pinned-message-border-mark{position:absolute;left:0;top:0;width:.125rem;background:var(--color-primary);border-radius:.0625rem;will-change:transform;transition:transform .25s ease-in-out}.MiddleHeader .HeaderPinnedMessage .message-text{overflow:hidden;margin-left:.4rem;margin-top:.125rem;max-width:15rem}@media (min-width:1440px) and (max-width:1500px){.MiddleHeader .HeaderPinnedMessage .message-text{max-width:14rem}}.MiddleHeader .HeaderPinnedMessage .message-text .title{font-weight:500;font-size:.875rem;line-height:1rem;height:1rem;color:var(--color-primary);margin-bottom:.125rem;white-space:pre}.MiddleHeader .HeaderPinnedMessage .message-text p{font-size:.875rem;line-height:1.125rem;height:1.125rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin:0}.MiddleHeader .HeaderPinnedMessage .emoji-small{width:1rem;height:1rem}.MiddleHeader .HeaderPinnedMessage>img{width:2.25rem;height:2.25rem;object-fit:cover;border-radius:.25rem;margin-left:.4rem;margin-top:.125rem;flex-shrink:0}.MiddleHeader .HeaderPinnedMessage>img+.message-text{max-width:12rem}.MiddleHeader .HeaderActions{flex-shrink:0;margin-left:auto;display:flex;align-items:center;justify-content:flex-end}.MiddleHeader .HeaderActions .toggle-right-pane-button.active{color:var(--color-primary);opacity:1}.MiddleHeader .HeaderActions .Button,.MiddleHeader .HeaderPinnedMessage-wrapper .Button{margin-left:.25rem}.MiddleHeader .HeaderActions .Button.tiny,.MiddleHeader .HeaderPinnedMessage-wrapper .Button.tiny{margin-right:.625rem}@media (max-width:600px){.MiddleHeader .AudioPlayer,.MiddleHeader .HeaderPinnedMessage-wrapper{position:absolute;top:100%;left:0;right:0;height:2.875rem;overflow:hidden;box-shadow:0 2px 2px var(--color-light-shadow);display:flex;flex-direction:row-reverse;padding:.375rem .5rem .375rem .75rem;background:var(--color-background)}.MiddleHeader .AudioPlayer:before,.MiddleHeader .HeaderPinnedMessage-wrapper:before{content:"";display:block;position:absolute;top:-2px;left:0;right:0;height:2px;box-shadow:0 2px 2px var(--color-light-shadow)}.MiddleHeader .AudioPlayer .HeaderPinnedMessage,.MiddleHeader .HeaderPinnedMessage-wrapper .HeaderPinnedMessage{max-width:unset}.MiddleHeader .AudioPlayer{height:3.25rem;flex-direction:row;padding:.375rem .5rem}.MiddleHeader .AudioPlayer-content{padding:0 .5rem;flex-grow:1}.MiddleHeader .AudioPlayer>.Button{margin:0}.MiddleHeader .AudioPlayer>.player-close{margin-left:auto}.MiddleHeader .HeaderPinnedMessage{flex-grow:1;padding-top:0;padding-bottom:0}.MiddleHeader .HeaderPinnedMessage:before{top:.125rem;bottom:.125rem}.MiddleHeader .HeaderPinnedMessage .message-text{max-width:none}.MiddleHeader .AudioPlayer,.MiddleHeader .HeaderPinnedMessage-wrapper{transform:translateZ(0)}}@media (min-width:925px) and (max-width:1149.9px){.MiddleHeader .AudioPlayer,.MiddleHeader .HeaderPinnedMessage-wrapper{position:absolute}}@keyframes fade-in{0%{opacity:0}to{opacity:1}}.EmbeddedMessage{display:flex;align-items:center;font-size:.875rem;line-height:1.125rem;margin:0 -.25rem .0625rem;padding:.1875rem .25rem .1875rem .4375rem;border-radius:var(--border-radius-messages-small);position:relative;overflow:hidden;cursor:pointer}body.animation-level-1 .EmbeddedMessage .ripple-container{display:none}.custom-shape .EmbeddedMessage{max-width:15rem;padding:.5rem;margin:0;background-color:var(--background-color);box-shadow:0 1px 2px var(--color-default-shadow)}.custom-shape .EmbeddedMessage:before{left:.625rem;top:.625rem;bottom:.625rem}.custom-shape .EmbeddedMessage img:not(.emoji){margin-left:.5rem}.EmbeddedMessage:before{content:"";display:block;position:absolute;top:.3125rem;bottom:.3125rem;left:.3125rem;width:2px;background:var(--accent-color);border-radius:2px}.EmbeddedMessage:hover{background-color:var(--hover-color)}.EmbeddedMessage:active{background-color:var(--active-color)}.EmbeddedMessage .message-text{overflow:hidden;margin-left:.5rem}.EmbeddedMessage .message-text .message-title{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-bottom:.125rem}.EmbeddedMessage .message-text p{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;height:1.125rem;margin-bottom:0}.EmbeddedMessage .message-text p:after{content:none;display:none}.EmbeddedMessage .message-text .emoji{width:1.125rem!important;height:1.125rem!important;vertical-align:-4px!important}.EmbeddedMessage .embedded-action-message{color:var(--accent-color);opacity:.75}.EmbeddedMessage img:not(.emoji){width:2rem;height:2rem;object-fit:cover;border-radius:.25rem;margin-left:.25rem;flex-shrink:0}.EmbeddedMessage.inside-input{padding-left:.5625rem;margin:0 0 -.125rem -.1875rem;display:grid;grid-template-columns:auto 1fr;grid-template-rows:1fr;width:100%;--accent-color:var(--color-primary);--hover-color:rgba(var(--color-text-secondary-rgb),0.08)}.EmbeddedMessage.inside-input:before{bottom:.3125rem}.EmbeddedMessage.inside-input img:not(.emoji){margin-left:.125rem}.EmbeddedMessage.inside-input .message-text{margin-left:.375rem}.EmbeddedMessage.inside-input .message-title{font-weight:500;color:var(--accent-color)}.MessageMeta{position:absolute;height:1.25rem;bottom:0;right:0;display:flex;align-items:center;background:hsla(0,0%,60%,.6);border-radius:.65rem;padding:0 .25rem;color:#fff;cursor:pointer;max-width:100%}.MessageMeta .message-signature,.MessageMeta .message-time,.MessageMeta .message-views{font-size:.75rem;white-space:nowrap}.MessageMeta .message-time{margin-right:.1875rem}.MessageMeta .message-views{margin-left:.1875rem}.MessageMeta .message-signature{overflow:hidden;text-overflow:ellipsis;margin-right:.375rem}.MessageMeta .icon-channelviews{margin-left:.125rem;margin-right:.375rem;font-size:1.125rem;position:relative;top:-.0625rem}.has-solid-background .MessageMeta{color:rgba(var(--color-text-meta-rgb),.75);background:none}.media:not(.text) .MessageMeta,.Message .custom-shape .MessageMeta{background:rgba(0,0,0,.2);--color-accent-own:#fff;--color-accent:#fff;color:#fff!important;opacity:1;bottom:.25rem;right:.25rem;left:auto;height:1.125rem;padding:0 .3125rem 0 .375rem}.media:not(.text) .MessageMeta .MessageOutgoingStatus i,.Message .custom-shape .MessageMeta .MessageOutgoingStatus i{background:transparent}.is-forwarded.media:not(.text) .MessageMeta{bottom:.9rem;right:.8rem}.emoji-only .MessageMeta{right:0}.Message.own .has-solid-background .MessageMeta{color:var(--color-message-meta-own)}.MessageMeta .MessageOutgoingStatus{margin-left:-.1875rem;font-size:1.1875rem}.Message.own .MessageMeta .MessageOutgoingStatus{color:var(--color-accent-own)}.message-content.has-replies:not(.custom-shape) .MessageMeta{bottom:3.375rem}.message-content.has-replies.text:not(.custom-shape) .MessageMeta{bottom:3.4375rem}.Message:not(.own) .custom-shape .reply-message+.MessageMeta{right:auto;left:13.2rem;bottom:.25rem}.Message:not(.own) .emoji-only-1 .reply-message+.MessageMeta{left:2.5rem}.Message:not(.own) .emoji-only-2 .reply-message+.MessageMeta{left:5.5rem}.Message:not(.own) .emoji-only-3 .reply-message+.MessageMeta{left:6.5rem}.Sticker:not(.inactive){cursor:pointer}.Sticker.inactive{pointer-events:none}.Contact{display:flex;align-items:center;padding:.25rem}.Contact.interactive{cursor:pointer}.Contact .Avatar{margin-right:.8rem}.Contact .contact-info{padding:.5rem .5rem .5rem 0;white-space:nowrap;overflow:hidden}.Contact .contact-info .contact-name{font-size:1rem;line-height:1rem;margin-bottom:.25rem;font-weight:500}.Contact .contact-info .contact-phone{line-height:1rem;color:var(--secondary-color)}.PollOption{display:flex;flex-flow:row nowrap;margin-bottom:.75rem}.PollOption:last-child{margin-bottom:0}.PollOption .poll-option-text{word-break:break-word}.PollOption .poll-option-share{position:relative;margin-top:.125rem;width:1.75rem;margin-right:.5rem;flex-shrink:0;font-weight:500;font-size:.875rem;text-align:right}.PollOption .poll-option-share.limit-width{display:inline-flex;justify-content:center;font-size:.75rem}.PollOption .poll-option-chosen{position:absolute;right:0;bottom:-5px;width:1rem;height:1rem;background:var(--accent-color);color:var(--background-color);border-radius:.5rem;font-size:.75rem;text-align:center}.PollOption .poll-option-chosen.wrong{background:var(--color-error)}.is-forwarded .PollOption .poll-option-chosen>i{margin-left:1px}.PollOption .poll-option-chosen.animate{opacity:0;animation-name:PollOptionIconAnimate;animation-delay:.09s;animation-duration:.3s;animation-fill-mode:forwards}.PollOption .poll-option-right{flex-grow:1}.PollOption .poll-option-answer{position:relative}.PollOption .poll-option-line{position:relative;width:0;height:.25rem;min-width:.5rem;border-radius:.125rem;margin-top:.5rem;background:var(--accent-color);transform-origin:0 0;transition:transform .3s;transition-delay:.09s}.PollOption .poll-line{width:30px;height:35px;position:absolute;left:-27px;bottom:-5px;transition:stroke-dashoffset .3s,stroke-dasharray .3s;stroke-dashoffset:0;stroke-dasharray:0,200%}.PollOption .poll-line path{stroke-width:4px;stroke-linecap:round;stroke:var(--accent-color);fill:none}.PollOption .wrong .poll-option-line{background:var(--color-error)}.PollOption .wrong .poll-line path{stroke:var(--color-error)}@keyframes PollOptionIconAnimate{0%{opacity:0}to{opacity:1}}.Poll{min-width:15rem}@media (max-width:600px){.Poll{min-width:50vw}}.Poll .poll-question{font-weight:500;line-height:1.25rem;margin:.125rem 0;word-break:break-word}.Poll .poll-type,.Poll .poll-voters-count{color:var(--secondary-color);font-size:.875rem}.Poll .poll-type{margin-bottom:.5rem;display:flex;align-items:center;min-height:1.375rem}.Poll .poll-voters-count{margin:.4375rem 0 .3125rem;text-align:center}.Poll .poll-answers{padding-top:.25rem;padding-bottom:1rem}.Poll .Checkbox,.Poll .Radio{padding-left:2.25rem}.Poll .Checkbox:last-child,.Poll .Radio:last-child{margin-bottom:.75rem}.Poll .Checkbox.disabled,.Poll .Radio.disabled{opacity:1!important;cursor:not-allowed}.Poll .Checkbox .Checkbox-main:before,.Poll .Checkbox .Radio-main:before,.Poll .Radio .Checkbox-main:before,.Poll .Radio .Radio-main:before{left:.125rem;background-color:var(--background-color)}.Message.own .Poll .Checkbox .Checkbox-main:before,.Message.own .Poll .Checkbox .Radio-main:before,.Message.own .Poll .Radio .Checkbox-main:before,.Message.own .Poll .Radio .Radio-main:before{border-color:var(--accent-color)}.Poll .Checkbox .Checkbox-main:after,.Poll .Checkbox .Radio-main:after,.Poll .Radio .Checkbox-main:after,.Poll .Radio .Radio-main:after{left:.4375rem;background-color:var(--accent-color)}.Poll .Checkbox input:checked~.Checkbox-main:before,.Poll .Checkbox input:checked~.Radio-main:before,.Poll .Radio input:checked~.Checkbox-main:before,.Poll .Radio input:checked~.Radio-main:before{border-color:var(--accent-color)}.Poll .Checkbox .Spinner,.Poll .Radio .Spinner{left:.125rem}.Poll .Checkbox .Checkbox-main:after{left:.125rem;background-color:var(--color-primary)}.Message.own .Poll .Checkbox .Checkbox-main:after{background-color:var(--accent-color)}.Poll .Spinner>div{background-image:var(--spinner-gray-data)}.Message.own .Poll .Spinner>div{background-image:var(--spinner-green-data)}.Poll .poll-recent-voters{display:inline-flex;align-items:center;vertical-align:text-bottom;margin-left:.875rem;margin-right:.5rem;margin-top:-2px}.Poll .poll-recent-voters .Avatar{border:1px solid var(--color-white);margin-right:0;box-sizing:initial}.Poll .poll-recent-voters .Avatar:not(:first-child){margin-left:-3px}.Poll .poll-countdown{margin-left:auto;font-size:.75rem;transition:color .2s}.Poll .poll-countdown.hurry-up{color:var(--color-error)}.Poll .poll-countdown.hurry-up .poll-countdown-progress{stroke:var(--color-error)}.Poll .poll-countdown svg{vertical-align:-3px}.Poll .poll-countdown-progress{stroke:var(--color-primary);fill:transparent;stroke-width:2;stroke-linecap:round;transition:stroke-dashoffset 2s,stroke .2s}.Poll .poll-quiz-help{margin:-.625rem 0 -.625rem auto}.Message:not(.own) .Poll .poll-quiz-help{color:var(--color-primary)}.Poll .poll-answers,.Poll .poll-results{padding-top:.25rem;padding-bottom:.5rem}.Poll .Button{text-transform:none;font-size:1rem}.Message.own .Poll .Button{color:var(--accent-color);--color-primary-shade-rgb:var(--color-text-green-rgb)}.Poll>.Button{margin-top:-.125rem;margin-bottom:-.0625rem}.WebPage{margin-top:.25rem;margin-bottom:.125rem;padding-left:.625rem;font-size:.875rem;line-height:1.125rem;max-width:29rem;position:relative}.WebPage:before{content:"";display:block;position:absolute;top:0;bottom:0;left:0;width:2px;background:var(--accent-color);border-radius:2px}.WebPage .media-inner{margin:0 0 .375rem!important}.WebPage .media-inner,.WebPage .media-inner.small-image img,.WebPage .media-inner img{border-radius:var(--border-radius-messages-small)!important}.WebPage .media-inner.square-image{width:5rem;height:5rem;min-height:0;margin-bottom:0!important}.WebPage .media-inner.square-image img{width:100%;height:100%}.WebPage.with-square-photo{display:flex;margin-bottom:1rem}.WebPage.with-square-photo .WebPage-text{order:1;padding-right:1rem}.WebPage.with-square-photo .media-inner{order:2;flex-shrink:0}.WebPage:not(.with-square-photo) .site-description:last-child:after,.WebPage:not(.with-square-photo) .site-name:last-child:after,.WebPage:not(.with-square-photo) .site-title:last-child:after{content:"";display:inline-block;width:var(--meta-safe-area-size);height:.5rem}.WebPage .site-description,.WebPage .site-name,.WebPage .site-title{word-break:break-word}.WebPage .site-name{color:var(--accent-color);font-weight:500}.WebPage .site-title{font-weight:500;margin-bottom:.125rem}.WebPage .site-description{line-height:1rem;margin-bottom:0}.Invoice .title{color:var(--accent-color);font-weight:500}.Invoice .description{position:relative}.Invoice .description.has-image .invoice-image{max-width:100%;height:20rem}@media (max-width:600px){.Invoice .description.has-image .invoice-image{height:10rem}}.Invoice .description.has-image .description-text{position:absolute;top:0;padding:.25rem .5rem;margin:.25rem;background-color:rgba(90,110,70,.6);border-radius:var(--border-radius-messages-small);color:var(--color-text);font-weight:500}.Album{position:relative;overflow:hidden}.message-content.media.text .Album{margin:-.3125rem -.5rem .3125rem}.forwarded-message .Album{margin-bottom:.125rem}.message-content.media.text .forwarded-message .Album{margin:0 0 .3125rem;--border-bottom-left-radius:inherit;--border-bottom-right-radius:inherit}.Album>.album-item-select-wrapper .media-inner,.message-content.media.text .Album>.album-item-select-wrapper .media-inner{margin:0!important}.Album>.album-item-select-wrapper .media-inner,.Album>.album-item-select-wrapper .media-inner img,.Album>.album-item-select-wrapper .media-inner video{border-radius:0!important;object-fit:cover}.RoundVideo{position:relative;width:200px;height:200px;cursor:pointer}.RoundVideo .thumbnail-wrapper{width:200px;height:200px;border-radius:50%;overflow:hidden}.RoundVideo .video-wrapper{position:absolute;left:0;top:0;border-radius:50%;overflow:hidden}.RoundVideo .progress{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none}.RoundVideo .progress-circle{stroke:#fff;fill:transparent;stroke-width:4;stroke-opacity:.35;stroke-linecap:round}.InlineButtons{display:flex;flex-direction:column}.InlineButtons .row{display:flex;flex-direction:row}.InlineButtons .Button{flex:1;width:auto;margin:.125rem;background:rgba(90,110,70,.6);border-radius:var(--border-radius-messages-small);font-weight:500;text-transform:none}.InlineButtons .Button:hover{background:rgba(90,110,70,.4)!important}.InlineButtons .Button:first-of-type{margin-left:0}.InlineButtons .Button:last-of-type{margin-right:0}.InlineButtons .row:first-of-type .Button{margin-top:.25rem!important}.InlineButtons .row:last-of-type .Button{margin-bottom:0}.InlineButtons .row:last-of-type .Button:first-of-type{border-bottom-left-radius:var(--border-radius-messages)}.InlineButtons .row:last-of-type .Button:last-of-type{border-bottom-right-radius:var(--border-radius-messages)}.CommentButton{--background-color:var(--color-background);--hover-color:var(--color-chat-hover);display:flex;width:100%;align-items:center;padding:.5625rem .25rem .5625rem .625rem;background:var(--background-color);border-bottom-right-radius:var(--border-bottom-right-radius);border-bottom-left-radius:var(--border-bottom-left-radius);font-size:.9375rem;font-weight:500;line-height:2rem;color:var(--accent-color);white-space:nowrap;cursor:pointer;transition:background-color .15s,color .15s}body.animation-level-0 .CommentButton{transition:none!important}.Message .has-appendix .CommentButton:before{content:"";display:block;position:absolute;bottom:-.1875rem;left:-.5625rem;width:.5625rem;height:1.25rem;background-position:0 100%;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='9' height='20' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cdefs%3E%3Cfilter x='-50%25' y='-14.7%25' width='200%25' height='141.2%25' filterUnits='objectBoundingBox' id='a'%3E%3CfeOffset dy='1' in='SourceAlpha' result='shadowOffsetOuter1'/%3E%3CfeGaussianBlur stdDeviation='1' in='shadowOffsetOuter1' result='shadowBlurOuter1'/%3E%3CfeColorMatrix values='0 0 0 0 0.0621962482 0 0 0 0 0.138574144 0 0 0 0 0.185037364 0 0 0 0.15 0' in='shadowBlurOuter1'/%3E%3C/filter%3E%3Cpath d='M3 17h6V0c-.193 2.84-.876 5.767-2.05 8.782-.904 2.325-2.446 4.485-4.625 6.48A1 1 0 003 17z' id='b'/%3E%3C/defs%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cuse fill='%23000' filter='url(%23a)' xlink:href='%23b'/%3E%3Cuse fill='%23FFF' xlink:href='%23b'/%3E%3C/g%3E%3C/svg%3E");opacity:0;transition:opacity .15s,filter .15s}.theme-dark #root .Message .has-appendix .CommentButton:before{filter:invert(.83)}body.animation-level-0 .Message .has-appendix .CommentButton:before{transition:none!important}.custom-shape .CommentButton{position:absolute;right:-3rem;width:2.25rem;bottom:3rem;height:3.375rem;border-radius:1.375rem;padding:.375rem .3125rem .25rem;align-items:flex-start;color:#fff;background-color:rgba(0,0,0,.2);opacity:0;transition:opacity .2s ease}@media (pointer:coarse){.custom-shape .CommentButton{opacity:1!important}}.custom-shape .CommentButton:hover{background-color:rgba(0,0,0,.28)}.Message:hover .custom-shape .CommentButton{opacity:1}.custom-shape .CommentButton:after{content:attr(data-cnt);position:absolute;bottom:-.0625rem;left:0;width:100%;text-align:center;font-size:12px;display:block}.custom-shape .CommentButton[data-cnt="0"]{height:2.25rem}.custom-shape .CommentButton[data-cnt="0"]:after{display:none}.custom-shape .CommentButton .icon-comments-sticker{display:block;font-size:1.5rem;margin:0 auto}.custom-shape .CommentButton .icon-comments,.custom-shape .CommentButton .icon-next,.custom-shape .CommentButton .label,.custom-shape .CommentButton .recent-repliers{display:none}.CommentButton:hover{background:var(--hover-color)}.Message .has-appendix .CommentButton:hover:before{opacity:1}.CommentButton:hover .Avatar{border-color:var(--hover-color)!important}.audio .CommentButton,.is-forwarded .CommentButton,.poll .CommentButton,.text .CommentButton,.voice .CommentButton{border-top:1px solid var(--color-borders)}.message-content.has-solid-background .CommentButton{margin:.375rem -.5rem -.375rem}.message-content.voice .CommentButton{margin-bottom:-.5rem}.message-content.audio .CommentButton{margin-bottom:-.8125rem}.message-content.audio .CommentButton,.message-content.has-solid-background.is-forwarded .CommentButton,.message-content.has-solid-background.text .CommentButton,.message-content.poll .CommentButton,.message-content.voice .CommentButton{margin-right:0;width:calc(100% + 1rem)}.CommentButton .icon-comments-sticker{display:none}.CommentButton .icon-comments{font-size:1.5625rem;line-height:2rem;margin-right:.875rem}.CommentButton .icon-next{margin-left:auto;font-size:1.5rem}.CommentButton .recent-repliers{display:inline-flex;align-items:center;margin-right:.5rem;margin-left:-.125rem}.CommentButton .recent-repliers .Avatar{transition:border .15s;border:2px solid var(--color-background);margin-right:0;z-index:3}.CommentButton .recent-repliers .Avatar+.Avatar{z-index:2}.CommentButton .recent-repliers .Avatar+.Avatar+.Avatar{z-index:1}.CommentButton .recent-repliers .Avatar:not(:first-child){margin-left:-.75rem}.CommentButton.has-unread .label{position:relative}.CommentButton.has-unread .label:after{content:"";display:inline-block;width:.5rem;height:.5rem;border-radius:50%;background:var(--accent-color);margin-left:.75rem}.CommentButton.disabled{cursor:default;pointer-events:none}.Message{display:flex;align-items:flex-end;margin-bottom:.375rem;position:relative;--background-color:var(--color-background);--hover-color:rgba(var(--color-text-secondary-rgb),0.08);--active-color:rgba(var(--color-text-secondary-rgb),0.16);--max-width:29rem;--accent-color:var(--color-primary);--accent-shade-color:var(--color-primary-shade);--secondary-color:var(--color-text-secondary);--meta-safe-area-base:2.25rem;--meta-safe-author-width:0px;--meta-safe-area-size:calc(var(--meta-safe-area-base) + var(--meta-safe-author-width));--deleting-translate-x:-50%;--select-message-scale:0.9;--select-background-color:#fff}.Message>.Avatar,.Message>.message-content-wrapper{opacity:1;transform:scale(1) translateX(0);transition:transform var(--select-transition)}body.animation-level-0 .Message>.Avatar,body.animation-level-0 .Message>.message-content-wrapper{transition:none!important}.Message>.Avatar{position:absolute;bottom:0;left:0}@media (max-width:600px){.Message>.Avatar{width:2.5rem;height:2.5rem}}.Message.last-in-group{margin-bottom:.625rem}.Message.last-in-list{margin-bottom:.375rem}.Message.is-in-selection-mode .Album{border:1px solid var(--select-background-color);background-color:var(--select-background-color)}.Message.has-inline-buttons .message-content{border-bottom-right-radius:var(--border-radius-messages-small)}.Message:not(.own){padding-left:2.5rem}.Message:not(.own).is-thread-top,.no-avatars .Message:not(.own){padding-left:0}@media (max-width:600px){.Message:not(.own){padding-left:2.875rem}.Message:not(.own).is-thread-top,.no-avatars .Message:not(.own){padding-left:.25rem}}.Message.own{flex-direction:row-reverse;--background-color:var(--color-background-own);--hover-color:var(--color-reply-own-hover);--active-color:var(--color-reply-own-active);--max-width:30rem;--accent-color:var(--color-accent-own);--accent-shade-color:var(--color-green);--secondary-color:var(--color-accent-own);--color-code:var(--color-code-own);--color-code-bg:var(--color-code-own-bg);--color-links:var(--color-own-links);--color-links-hover:var(--color-own-links);--meta-safe-area-base:3.5rem;--deleting-translate-x:50%;--color-text-green:var(--color-accent-own)}@media (max-width:600px){.Message.own{padding-right:.25rem}}.Message.is-deleting>.Avatar,.Message.is-deleting>.message-content-wrapper{transition:opacity .2s ease,transform .2s ease-in;opacity:0;transform:scale(.3) translateX(var(--deleting-translate-x));transform-origin:bottom}.Message.has-views{--meta-safe-area-size:calc(var(--meta-safe-area-base) + var(--meta-safe-author-width) + 4rem)}.Message.was-edited{--meta-safe-area-size:calc(var(--meta-safe-area-base) + var(--meta-safe-author-width) + 2.5rem)}.Message.was-edited.has-views{--meta-safe-area-size:calc(var(--meta-safe-area-base) + var(--meta-safe-author-width) + 7.5rem)}.select-mode-active .Message{cursor:pointer;-webkit-user-select:none;user-select:none}.select-mode-active .Message:not(.own)>.Avatar,.select-mode-active .Message:not(.own)>.message-content-wrapper{transform:translateX(2.5rem)}.select-mode-active .Message:not(.is-album):after{content:"";position:absolute;top:-.25rem;bottom:-.25rem;left:-4rem;right:-4rem;z-index:var(--z-message-select-area)}.select-mode-active .Message.is-album .message-select-control,.select-mode-active .Message.is-in-document-group .message-select-control{pointer-events:unset}.select-mode-active .Message .message-select-control{opacity:1}.Message.is-selected .message-select-control{background:var(--color-green)}.Message.is-selected .message-select-control.group-select{background:transparent}.Message .File.file-is-selected .message-select-control,.Message.is-selected .message-select-control.group-select.is-selected{background:var(--color-green)}.Message .Audio .message-select-control{left:1.063rem;bottom:.813rem}html.theme-dark .Message.own .Audio .ProgressSpinner{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUiIGhlaWdodD0iMTUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTguMjE4IDcuNWw1LjYzMy01LjYzM2EuNTA4LjUwOCAwIDEwLS43MTgtLjcxOEw3LjUgNi43ODIgMS44NjcgMS4xNDlhLjUwOC41MDggMCAxMC0uNzE4LjcxOEw2Ljc4MiA3LjVsLTUuNjMzIDUuNjMzYS41MDguNTA4IDAgMTAuNzE4LjcxOEw3LjUgOC4yMThsNS42MzMgNS42MzNhLjUwNi41MDYgMCAwMC43MTggMCAuNTA4LjUwOCAwIDAwMC0uNzE4TDguMjE4IDcuNXoiIGZpbGw9IiNGRkYiIHN0cm9rZT0iI0E0NUQzNyIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPjwvc3ZnPg==)}html.theme-dark .Message.own .Audio .ProgressSpinner circle{stroke:var(--background-color)}.Message .File{position:relative}.Message .File .message-select-control{position:absolute;top:2rem;left:2rem;z-index:2}.Message.own .Message .album-item-select-wrapper{background:var(--color-background-own)}.Message .album-item-select-wrapper .message-select-control{top:.438rem;right:.438rem;left:unset}.Message .album-item-select-wrapper .media-inner{border:0 solid var(--select-background-color);transition:border-width var(--select-transition)}.Message .album-item-select-wrapper img,.Message .album-item-select-wrapper video{transition:transform var(--select-transition)}.Message .album-item-select-wrapper.is-selected .message-select-control{background:var(--color-green)}.Message .album-item-select-wrapper.is-selected img,.Message .album-item-select-wrapper.is-selected video{transform:scale(var(--select-message-scale))}.Message.is-forwarding .message-select-control,.Message.is-selected .message-select-control{background:var(--color-green)}.Message.is-forwarding .Menu .bubble,.Message.is-selected .Menu .bubble{transition:none!important}.Message.is-in-document-group:not(.first-in-document-group):before{top:0!important}.Message.is-in-document-group:not(.first-in-document-group) .message-content{box-shadow:none;border-top-left-radius:0!important;border-top-right-radius:0!important}.Message.is-in-document-group:not(.first-in-document-group) .forwarded-message:before{top:-1.5rem}.Message.is-in-document-group:not(.last-in-document-group){margin-bottom:0}.Message.is-in-document-group:not(.last-in-document-group):before{bottom:0!important}.Message.is-in-document-group:not(.last-in-document-group) .message-content{border-bottom-left-radius:0!important;border-bottom-right-radius:0!important}.Message.is-in-document-group.is-in-selection-mode .Audio:not(.audio-is-selected) .message-select-control:not(.group-select),.Message.is-in-document-group.is-in-selection-mode .File:not(.file-is-selected) .message-select-control:not(.group-select){background:#fff}.Message.is-in-document-group.is-in-selection-mode .Audio:not(.audio-is-selected) .message-select-control:not(.group-select):after,.Message.is-in-document-group.is-in-selection-mode .File:not(.file-is-selected) .message-select-control:not(.group-select):after{content:"";width:1.25rem;height:1.25rem;border-radius:.688rem;background:#fff;border:.125rem solid rgba(0,0,0,.2);position:absolute}.Message.is-in-document-group.is-in-selection-mode.own .message-content .Audio:not(.audio-is-selected) .message-select-control:not(.group-select),.Message.is-in-document-group.is-in-selection-mode.own .message-content .File:not(.file-is-selected) .message-select-control:not(.group-select){background:var(--background-color);border-color:var(--background-color)}.Message.is-in-document-group.is-in-selection-mode.own .message-content .Audio:not(.audio-is-selected) .message-select-control:not(.group-select):after,.Message.is-in-document-group.is-in-selection-mode.own .message-content .File:not(.file-is-selected) .message-select-control:not(.group-select):after{background:var(--background-color);border-color:rgba(var(--color-text-green-rgb),.5)}.Message.is-in-document-group.focused .message-content,.Message.is-in-document-group.has-menu-open .message-content,.Message.is-in-document-group.is-forwarding .message-content,.Message.is-in-document-group.is-selected .message-content{background:var(--color-background-selected)}.Message.is-in-document-group.focused.own .message-content,.Message.is-in-document-group.has-menu-open.own .message-content,.Message.is-in-document-group.is-forwarding.own .message-content,.Message.is-in-document-group.is-selected.own .message-content{--background-color:var(--color-background-own-selected);background:var(--color-background-own-selected)}.Message.is-in-document-group .message-content-wrapper{width:17.1875rem}.Message.is-in-document-group .message-content{transition:background-color var(--select-transition)}.Message .album-item-select-wrapper{position:absolute}.Message .album-item-select-wrapper .message-select-control{position:absolute;z-index:2}.Message .message-select-control{position:absolute;left:0;bottom:.25rem;width:1.5rem;height:1.5rem;border:2px solid #fff;border-radius:50%;z-index:var(--z-message-select-control);display:flex;align-items:center;justify-content:center;color:#fff;font-size:1rem;opacity:0;pointer-events:none;transition:opacity var(--select-transition)}.Message .message-select-control .icon-select{position:absolute;left:-3px;top:-3px;font-size:1.625rem}.Message .Avatar{margin-right:.3rem}.Message.is-in-document-group .message-content.document{padding:.25rem .5rem!important}.Message.is-in-document-group.last-in-document-group .message-content.document{padding-bottom:.5rem!important}.Message.is-in-document-group.first-in-document-group .message-content.document{padding-top:.5rem!important}.Album,.media-inner,.message-content,.message-content.custom-shape .media-inner img,.message-content.media .media-inner img,.message-content.media .media-inner video{border-top-left-radius:var(--border-top-left-radius);border-top-right-radius:var(--border-top-right-radius);border-bottom-left-radius:var(--border-bottom-left-radius);border-bottom-right-radius:var(--border-bottom-right-radius)}.media-inner{overflow:hidden}.media-inner.small-image img{border-radius:0!important}.Message{--border-top-left-radius:var(--border-radius-messages);--border-top-right-radius:var(--border-radius-messages);--border-bottom-left-radius:var(--border-radius-messages);--border-bottom-right-radius:var(--border-radius-messages)}.Message:not(.own).first-in-group:not(.last-in-group),.Message:not(.own):not(.first-in-group):not(.last-in-group){--border-bottom-left-radius:var(--border-radius-messages-small)}.Message:not(.own).last-in-group:not(.first-in-group),.Message:not(.own):not(.first-in-group):not(.last-in-group){--border-top-left-radius:var(--border-radius-messages-small)}.Message:not(.own).last-in-group{--border-bottom-left-radius:var(--border-radius-messages-small)}.Message:not(.own).last-in-group .message-content.has-appendix{--border-bottom-left-radius:0}.Message.own.first-in-group:not(.last-in-group),.Message.own:not(.first-in-group):not(.last-in-group){--border-bottom-right-radius:var(--border-radius-messages-small)}.Message.own.last-in-group:not(.first-in-group),.Message.own:not(.first-in-group):not(.last-in-group){--border-top-right-radius:var(--border-radius-messages-small)}.Message.own.last-in-group{--border-bottom-right-radius:var(--border-radius-messages-small)}.Message.own.last-in-group .message-content.has-appendix{--border-bottom-right-radius:0}.Message .message-content.has-replies:not(.custom-shape) .Album,.Message .message-content.has-replies:not(.custom-shape) .media-inner,.Message .message-content.text .Album,.Message .message-content.text .media-inner{--border-bottom-left-radius:0;--border-bottom-right-radius:0}.Message .message-content.is-reply .EmbeddedMessage+.Album,.Message .message-content.is-reply .EmbeddedMessage+.Audio,.Message .message-content.is-reply .EmbeddedMessage+.File{margin-top:.375rem}.Message .message-content:not(.custom-shape).force-sender-name .Album,.Message .message-content:not(.custom-shape).is-reply .Album,.Message .message-content:not(.custom-shape).is-reply .media-inner,.Message .message-content:not(.is-forwarded) .message-title~.media-inner{--border-top-left-radius:0;--border-top-right-radius:0}.Message .message-content.is-forwarded .content-inner .message-title{margin-bottom:.25rem}.Message .message-action-button{position:absolute;bottom:0;color:#fff;background-color:rgba(0,0,0,.2);opacity:0;transition:opacity .2s ease}@media (pointer:coarse){.Message .message-action-button{opacity:1!important}}.Message .message-action-button:active,.Message .message-action-button:focus,.Message .message-action-button:hover{background-color:rgba(0,0,0,.28)!important}.Message:hover .message-action-button,.Message[data-is-document-group-hover] .message-action-button{opacity:1}.Message.own .message-action-button{left:-3rem}.Message:not(.own) .message-action-button{right:-3rem}.Message .bottom-marker{height:1px;width:1px;visibility:hidden}.Message .custom-shape .message-action-button{bottom:.25rem}.message-content{position:relative;max-width:var(--max-width)}@media (max-width:600px){.message-content{max-width:69vw}}.message-content .text-content{margin:0;word-break:break-word;line-height:1.3125}.message-content:not(.custom-shape){font-size:var(--message-text-size,1rem)}.message-content .matching-text-highlight{background:#cae3f7;border-radius:.25rem;padding:0 .125rem}.message-content .message-title{white-space:nowrap;font-size:.875rem;font-weight:500;line-height:1.25rem;color:var(--accent-color);display:flex}.message-content .message-title,.message-content .message-title>.interactive{overflow:hidden;text-overflow:ellipsis}.message-content .message-title.interactive,.message-content .message-title>.interactive{cursor:pointer}.message-content .message-title.interactive:hover,.message-content .message-title>.interactive:hover{opacity:.85}.message-content .message-title>.color-1{color:var(--color-user-1)}.message-content .message-title>.color-2{color:var(--color-user-2)}.message-content .message-title>.color-4{color:var(--color-user-4)}.message-content .message-title>.color-5{color:var(--color-user-5)}.message-content .message-title>.color-6{color:var(--color-user-6)}.message-content .message-title>.color-7{color:var(--color-user-7)}.message-content .message-title>.color-8{color:var(--color-user-8)}.message-content .message-title+.File{margin-top:.25rem}.message-content .message-title .via{padding:0 .2rem;font-weight:400}.message-content .message-title .admin-title{flex:1;margin-left:1rem;text-align:right;font-weight:400;font-size:.75rem;margin-top:-.1rem;color:rgba(var(--color-text-meta-rgb),.75)}.Message.own .message-content .message-title .admin-title{color:var(--accent-color)}.message-content.has-shadow{box-shadow:0 1px 2px var(--color-default-shadow)}.is-album .message-content,.message-content.has-solid-background{background:var(--background-color)}.message-content.has-solid-background{padding:.3125rem .5rem .375rem}.message-content.has-solid-background .text-content:last-child:after{content:"";display:inline-block;width:var(--meta-safe-area-size);height:1rem}.message-content:not(.has-appendix) .svg-appendix{display:none}.message-content .svg-appendix{position:absolute;bottom:-.1875rem;width:.5625rem;height:1.25rem}.message-content .svg-appendix .corner{fill:var(--background-color)}.Message.own .message-content .svg-appendix{right:-.5625rem}.Message:not(.own) .message-content .svg-appendix{left:-.5625rem}.message-content[data-has-custom-appendix] .svg-appendix .corner{fill:var(--appendix-bg)}.Message .message-content.has-appendix-thumb .svg-appendix{--background-color:#ccc;opacity:1;transition:opacity .5s ease}.message-content.document{padding:.5rem!important}.message-content.document .File+.text-content{margin-top:.313rem}.message-content.audio .Embedded,.message-content.audio .message-title,.message-content.voice .Embedded,.message-content.voice .message-title{margin-top:-.1875rem;margin-bottom:.1875rem}.message-content.voice{padding:.5rem!important}.message-content.voice .Voice+.text-content{margin-top:.5rem}.message-content.audio{min-width:17.1875rem;padding:.5rem .5rem .8125rem!important}.message-content.audio .Audio+.text-content{margin-top:.25rem;margin-bottom:-.4375rem}.message-content:not(.custom-shape) .emoji{display:inline-block;width:1.25rem;background-size:1.25rem;color:transparent;margin-right:1px;vertical-align:text-bottom}.message-content:not(.custom-shape) .emoji::selection{background-color:var(--color-selection-highlight-emoji);color:transparent}.message-content:not(.custom-shape) .text-content .emoji{width:calc(1.25*var(--message-text-size, 1rem));background-size:calc(1.25*var(--message-text-size, 1rem))}.message-content.media .media-inner{display:flex;justify-content:center;align-items:center}.message-content.media .media-inner.interactive{cursor:pointer}.message-content.media .media-inner.interactive.dark video{background-color:#232323}.message-content.media.round.is-reply{width:auto!important}.message-content.media.force-sender-name .Album,.message-content.media.force-sender-name .media-inner,.message-content.media.is-reply .Album,.message-content.media.is-reply .media-inner,.message-content.media.is-via-bot .media-inner,.message-content.media.text .media-inner{margin-left:-.5rem;margin-right:-.5rem}.message-content.media.text .media-inner{margin-top:-.3125rem}.message-content.media.force-sender-name .Album,.message-content.media.is-reply .Album,.message-content.media.is-reply .media-inner,.message-content.media .message-title~.media-inner{margin-top:.375rem;margin-bottom:-.375rem}.message-content.media.text .Album,.message-content.media.text .media-inner{margin-bottom:.375rem}.message-content.media .media-loading{display:flex;align-items:center;justify-content:center}.message-content.media .media-loading:not(.open){opacity:.5;transform:scale(0);transition:opacity .3s ease,transform .3s ease}.message-content.media .icon-download,.message-content.media .icon-large-play{position:absolute;display:flex;align-items:center;justify-content:center;color:#fff;opacity:.7;transition:opacity .15s}.message-content.media .icon-download:hover,.message-content.media .icon-large-play:hover{opacity:1}.message-content.media .icon-download:before,.message-content.media .icon-large-play:before{display:flex;align-items:center;justify-content:center;width:3.375rem;height:3.375rem;border-radius:50%;background:rgba(0,0,0,.25)}.message-content.media .icon-download{font-size:1.5rem}.message-content.media .icon-large-play{font-size:2.5rem}.message-content.media .message-media-duration,.message-content.media .message-upload-progress{background:rgba(0,0,0,.25);color:#fff;font-size:.75rem;position:absolute;left:.1875rem;top:.1875rem;z-index:1;padding:0 .375rem;border-radius:.75rem;line-height:1.125rem}.message-content.media .message-media-duration .icon-muted-chat{vertical-align:-.1875rem;margin-left:.375rem;font-size:1.0625rem}.message-content.custom-shape{line-height:1.2;font-size:10rem}.message-content.custom-shape.is-reply{max-width:100%}.message-content.custom-shape .reply-message{display:flex;align-items:flex-start;flex-direction:row-reverse}.message-content.custom-shape .reply-message>p{margin-bottom:0}.message-content.custom-shape .reply-message .EmbeddedMessage{margin-left:.5rem;border-radius:var(--border-radius-messages)}@media (max-width:600px){.message-content.custom-shape .reply-message .EmbeddedMessage{max-width:calc(90vw - 13rem)}}.message-content.custom-shape .text-content{margin-bottom:1rem}.message-content.custom-shape .media-inner{line-height:1;font-size:1rem;flex-shrink:0}.message-content.custom-shape .media-inner .full-media{top:0;left:0;bottom:0;right:0}.message-content.custom-shape .emoji{display:inline-block;color:transparent}.message-content.custom-shape .emoji::selection{background-color:var(--color-selection-highlight-emoji);color:transparent}.message-content.custom-shape.emoji-only .text-content{margin-bottom:0}.message-content.custom-shape.emoji-only-1{min-width:8rem;font-size:4.5rem}.message-content.custom-shape.emoji-only-1 .content-inner{height:7rem}.message-content.custom-shape.emoji-only-1 .text-content{line-height:1.5;text-align:center}.Message.was-edited .message-content.custom-shape.emoji-only-1{min-width:10rem}.message-content.custom-shape.emoji-only-1 .emoji{width:5rem;height:5rem}.message-content.custom-shape.emoji-only-2{font-size:4rem;margin-top:.5rem;min-width:10rem}.message-content.custom-shape.emoji-only-2.has-comments{margin-top:1.25rem}.Message.was-edited .message-content.custom-shape.emoji-only-2{min-width:12rem}.message-content.custom-shape.emoji-only-2 .emoji{width:4rem;height:4rem}.message-content.custom-shape.emoji-only-3{font-size:3rem;margin-top:1.75rem;min-width:12rem}.message-content.custom-shape.emoji-only-3.has-comments{margin-top:2.5rem}.Message.was-edited .message-content.custom-shape.emoji-only-3{min-width:14rem}.message-content.custom-shape.emoji-only-3 .emoji{width:3rem;height:3rem}.Message:not(.own) .message-content.custom-shape{--hover-color:var(--color-reply-hover);--active-color:var(--color-reply-active)}.Message.own .message-content.custom-shape{--hover-color:var(--color-reply-own-hover);--active-color:var(--color-reply-own-active)}.Message.own .message-content.custom-shape .reply-message{flex-direction:row}.Message.own .message-content.custom-shape .reply-message .EmbeddedMessage{margin-right:.5rem}.forwarded-message{--border-top-left-radius:var(--border-radius-messages-small);--border-top-right-radius:var(--border-radius-messages-small);--border-bottom-left-radius:var(--border-radius-messages-small);--border-bottom-right-radius:var(--border-radius-messages-small)}.message-content:not(.custom-shape) .forwarded-message{position:relative;margin-top:.25rem;padding-left:.625rem}.message-content:not(.custom-shape) .forwarded-message:before{content:"";display:block;position:absolute;top:0;bottom:0;left:.05rem;width:2px;background:var(--accent-color);border-radius:2px}.forwarded-message>.media-inner{margin:0 0 .25rem!important}.long-word-break-all{word-break:break-all}.text-entity-link{color:var(--color-links)!important;text-decoration:none;word-break:none;cursor:pointer}.text-entity-link:active,.text-entity-link:hover,.text-entity-link:visited{color:var(--color-links-hover)!important;text-decoration:underline}.text-entity-code,.text-entity-pre{color:var(--color-code);background:var(--color-code-bg);white-space:pre-wrap;margin:0;padding:1px 2px;border-radius:4px}.MessageList{flex:1;width:100%;overflow-anchor:none;overflow:scroll;overflow-x:hidden;overflow-y:overlay;padding-bottom:.3125rem}.mask-image-enabled .MessageList,body.hide-mask-shadow .mask-image-disabled .MessageList{-webkit-mask-image:linear-gradient(0deg,transparent 0,#000 1rem);mask-image:linear-gradient(0deg,transparent 0,#000 1rem)}.custom-bg-color.mask-image-disabled .MessageList,.custom-bg-image.mask-image-disabled .MessageList{margin-bottom:.3125rem;padding-bottom:0}@media (pointer:coarse){.MessageList{-webkit-user-select:none;-webkit-touch-callout:none;user-select:none;touch-callout:none}}.MessageList.no-avatars .Message>.Avatar{display:none}.MessageList .messages-container{width:100%;max-width:var(--messages-container-width);min-height:100%;margin:0 auto;display:flex;justify-content:flex-end;flex-direction:column;padding:1rem 1rem .5rem 1.125rem}.force-messages-scroll .MessageList .messages-container{margin-top:100vh!important}@media (max-width:600px){.MessageList .messages-container{width:100vw;padding:2.75rem .5rem .5rem;margin:0}}.MessageList.bottom-padding .messages-container{padding-bottom:1rem}.MessageList.bottom-padding-big .messages-container{padding-bottom:4.75rem}@media (max-width:600px){.MessageList.bottom-padding-big .messages-container{padding-bottom:3.5rem}}.MessageList.select-mode-active .messages-container{padding-bottom:5.25rem}.MessageList .ActionMessage,.MessageList .Message{position:relative}.MessageList .ActionMessage:before,.MessageList .Message:before{content:"";position:absolute;top:-.3125rem;bottom:-.3125rem;left:-50vw;right:-50vw;background:#000;z-index:-1;opacity:0;transition:opacity var(--select-transition)}body.animation-level-0 .MessageList .ActionMessage:before,body.animation-level-0 .MessageList .Message:before{transition:none!important}.MessageList .ActionMessage:not(.last-in-group):before,.MessageList .Message:not(.last-in-group):before{bottom:-.1875rem}.MessageList .ActionMessage:not(.first-in-group):before,.MessageList .Message:not(.first-in-group):before{top:-.1875rem}.MessageList .ActionMessage.focused:before,.MessageList .Message.focused:before{transition:none!important}.MessageList .ActionMessage.focused:before,.MessageList .ActionMessage.has-menu-open:before,.MessageList .ActionMessage.is-forwarding:before,.MessageList .ActionMessage.is-selected:before,.MessageList .Message.focused:before,.MessageList .Message.has-menu-open:before,.MessageList .Message.is-forwarding:before,.MessageList .Message.is-selected:before{opacity:.1}.MessageList>.empty{width:100%;height:100%;display:flex;align-items:center;justify-content:center}.MessageList .ActionMessage,.MessageList .empty,.MessageList .local-action-message,.MessageList .sticky-date{text-align:center}.MessageList .ActionMessage>span,.MessageList .empty>span,.MessageList .local-action-message>span,.MessageList .sticky-date>span{display:inline-block;background:rgba(var(--color-text-secondary-rgb),.45);color:#fff;font-size:.9375rem;font-weight:500;line-height:1.5rem;padding:0 .5rem;border-radius:.75rem;word-break:break-word}.MessageList .ActionMessage.rich>span,.MessageList .empty.rich>span,.MessageList .local-action-message.rich>span,.MessageList .sticky-date.rich>span{max-width:80%;text-align:left}.MessageList .ActionMessage.rich a,.MessageList .ActionMessage.rich a:visited,.MessageList .empty.rich a,.MessageList .empty.rich a:visited,.MessageList .local-action-message.rich a,.MessageList .local-action-message.rich a:visited,.MessageList .sticky-date.rich a,.MessageList .sticky-date.rich a:visited{color:var(--color-links-darker)!important}.MessageList .ActionMessage.rich a:active,.MessageList .ActionMessage.rich a:hover,.MessageList .empty.rich a:active,.MessageList .empty.rich a:hover,.MessageList .local-action-message.rich a:active,.MessageList .local-action-message.rich a:hover,.MessageList .sticky-date.rich a:active,.MessageList .sticky-date.rich a:hover{color:var(--color-links-darker-hover)!important}.MessageList .sticky-date{margin-top:1rem;margin-bottom:1rem;z-index:var(--z-sticky-date);pointer-events:none;opacity:1;transition:opacity .3s ease}body:not(.is-scrolling-messages) .MessageList .sticky-date.stuck{opacity:0}body.animation-level-0 .MessageList .sticky-date{transition:none}.MessageList.scrolled .sticky-date{position:sticky;top:.625rem}.has-header-tools .MessageList .sticky-date{top:3.75rem}.MessageList .ActionMessage,.MessageList .local-action-message{margin-top:.5rem;margin-bottom:.5rem}.MessageList .ActionMessage .action-link{cursor:pointer}.MessageList .ActionMessage .action-link:hover{text-decoration:underline}.MessageList .sticky-date+.ActionMessage{margin-top:-.5rem}@media (min-width:1276px){.MessageList{width:100%;transform:translateZ(0);transition:transform var(--layer-transition)}.MessageList .messages-container{width:calc(100% - var(--right-column-width))}body.animation-level-0 .MessageList{transition:none}#Main.right-column-open .MessageList{transform:translate3d(calc(var(--right-column-width)/-2),0,0)}#Main.right-column-open .MessageList:not(.select-mode-active),body.animating-right-column .MessageList:not(.select-mode-active),body:not(.animating-right-column) #Main.right-column-open .MessageList.select-mode-active{width:calc(100% - var(--right-column-width))}#Main.right-column-open .MessageList:not(.select-mode-active) .messages-container,body.animating-right-column .MessageList:not(.select-mode-active) .messages-container,body:not(.animating-right-column) #Main.right-column-open .MessageList.select-mode-active .messages-container{width:100%}}@media (max-width:600px){.MessageList{transition:transform var(--layer-transition)}body.enable-symbol-menu-transforms .MessageList{transform:translateZ(0)}body.is-symbol-menu-open .MessageList{transform:translate3d(0,calc(-1*(var(--symbol-menu-height) + var(--symbol-menu-footer-height))),0)}}.animating>div>.MessageList,.MessageList.has-focusing,.MessageList.select-mode-active,body.has-context-menu .MessageList{padding-right:0}.animating>div>.MessageList::-webkit-scrollbar,.MessageList.has-focusing::-webkit-scrollbar,.MessageList.select-mode-active::-webkit-scrollbar,body.has-context-menu .MessageList::-webkit-scrollbar{width:0}@supports (scrollbar-width:none){.animating>div>.MessageList,.MessageList.has-focusing,.MessageList.select-mode-active,body.has-context-menu .MessageList{padding-right:.6875rem;scrollbar-width:none}}.is-safari.has-context-menu .messages-layout>.MessageList,.is-safari .MessageList.has-focusing,.is-safari .MessageList.select-mode-active{padding-right:.375rem}.ScrollDownButton{--base-bottom-pos:6rem;position:absolute;bottom:var(--base-bottom-pos);right:1rem;opacity:0;transform:translateY(4.5rem);transition:transform .25s cubic-bezier(.34,1.56,.64,1),opacity .2s ease;z-index:10;pointer-events:none}body.animation-level-0 .ScrollDownButton{transform:none!important;transition:opacity .15s}@media (max-width:600px){.ScrollDownButton{right:.5rem;bottom:4.5rem}}.ScrollDownButton-inner{display:flex;flex-direction:column;align-items:center}.ScrollDownButton-inner>.Button{box-shadow:0 1px 2px var(--color-default-shadow)}.ScrollDownButton-inner>.Button i{font-size:1.75rem}@media (min-width:1276px){.ScrollDownButton-inner{transform:translateX(0);transition:transform var(--layer-transition)}body.animation-level-0 .ScrollDownButton-inner{transition:none!important}#Main.right-column-open .ScrollDownButton-inner{transform:translateX(calc(-1*var(--right-column-width)))}}@media (max-width:600px){.ScrollDownButton-inner>.Button{width:2.875rem;height:2.875rem}}.ScrollDownButton.revealed{transform:translateY(0);opacity:1;pointer-events:all}.ScrollDownButton.revealed.no-composer{transform:translateY(2.5rem)}.ScrollDownButton .unread-count{min-width:1.5rem;height:1.5rem;padding:0 .45rem;border-radius:.75rem;font-size:.875rem;line-height:1.5rem;font-weight:500;text-align:center;position:absolute;top:-.3rem;right:-.3rem;background:var(--color-green);color:#fff;pointer-events:none}@media (max-width:600px){.ScrollDownButton .unread-count{top:-.7rem;right:auto}}@media (max-width:600px){body.is-symbol-menu-open .ScrollDownButton{bottom:calc(var(--base-bottom-pos) + var(--symbol-menu-height) + var(--symbol-menu-footer-height))}}.ComposerEmbeddedMessage{height:2.625rem;transition:height .15s ease-out,opacity .15s ease-out}.ComposerEmbeddedMessage:not(.open){height:0!important}.ComposerEmbeddedMessage body.animation-level-0{transition:none!important}.ComposerEmbeddedMessage>div{display:flex;align-items:center;padding-right:.625rem;padding-top:.45rem}.ComposerEmbeddedMessage>div>.Button{flex-shrink:0;background:none!important;width:2.125rem;height:2.125rem;margin:0 .625rem;padding:0;align-self:center}.WebPagePreview{display:flex;align-items:center;margin-bottom:-.75rem;padding-right:.625rem;padding-top:.45rem;padding-left:3.375rem;--accent-color:var(--color-primary)}.ComposerEmbeddedMessage+.WebPagePreview{margin-top:.75rem}.WebPagePreview>.Button{flex-shrink:0;background:none!important;width:2.125rem;height:2.125rem;margin:0 .625rem;padding:0;align-self:center}.WebPagePreview .WebPage{flex-grow:1;margin:.1875rem 0 .1875rem .125rem}.WebPagePreview .WebPage:before{top:.125rem;bottom:.0625rem}.WebPagePreview .WebPage .site-title{margin-top:.125rem;margin-bottom:.1875rem}.Composer{align-items:flex-end}@media (min-width:601px){.select-mode-active+.middle-column-footer .Composer{position:absolute;padding-right:2rem;margin-top:-.5rem}}@media (max-width:600px){.select-mode-active+.middle-column-footer .Composer{padding-right:1rem}}.select-mode-active+.middle-column-footer .Composer:before{right:2.125rem}@media (max-width:600px){.select-mode-active+.middle-column-footer .Composer:before{right:1rem}}.hide-mask-shadow .Composer:before{opacity:0!important}.Composer>.Button{flex-shrink:0;margin-left:.5rem}@media (max-width:600px){.Composer>.Button{width:2.875rem;height:2.875rem}}.Composer>.Button .icon-check,.Composer>.Button .icon-microphone-alt,.Composer>.Button .icon-send{position:absolute}.Composer>.Button:not(:active):not(:focus):not(:hover) .icon-check,.Composer>.Button:not(:active):not(:focus):not(:hover) .icon-send{color:var(--color-primary)}.Composer>.Button.cancel{position:relative;z-index:1}.Composer>.Button.cancel.active,.Composer>.Button.cancel:hover{background:var(--color-chat-hover)}.Composer>.Button.recording{position:relative;z-index:0;transition:box-shadow .1s}.Composer>.Button.send .icon-send{animation:grow-icon .4s ease-out}.Composer>.Button.send .icon-check,.Composer>.Button.send .icon-microphone-alt{animation:hide-icon .4s ease-out forwards}.Composer>.Button.record .icon-microphone-alt{animation:grow-icon .4s ease-out}.Composer>.Button.edit .icon-microphone-alt,.Composer>.Button.edit .icon-send,.Composer>.Button.record .icon-check,.Composer>.Button.record .icon-send{animation:hide-icon .4s ease-out forwards}.Composer>.Button.edit .icon-check{animation:grow-icon .4s ease-out}body.animation-level-0 .Composer>.Button .icon-check,body.animation-level-0 .Composer>.Button .icon-microphone-alt,body.animation-level-0 .Composer>.Button .icon-send,body.animation-level-1 .Composer>.Button .icon-check,body.animation-level-1 .Composer>.Button .icon-microphone-alt,body.animation-level-1 .Composer>.Button .icon-send{animation-duration:0ms!important}.Composer .mobile-symbol-menu-button{width:2.875rem;height:2.875rem;position:relative}.Composer .mobile-symbol-menu-button .icon-keyboard,.Composer .mobile-symbol-menu-button .icon-smile,.Composer .mobile-symbol-menu-button .Spinner{position:absolute}.Composer .mobile-symbol-menu-button .Spinner{--spinner-size:1.5rem}.Composer .mobile-symbol-menu-button .icon-smile{animation:grow-icon .4s ease-out}.Composer .mobile-symbol-menu-button .icon-keyboard,.Composer .mobile-symbol-menu-button .Spinner{animation:hide-icon .4s ease-out forwards}.Composer .mobile-symbol-menu-button.is-loading .Spinner{animation:grow-icon .4s ease-out}.Composer .mobile-symbol-menu-button.is-loading .icon-keyboard,.Composer .mobile-symbol-menu-button.is-loading .icon-smile{animation:hide-icon .4s ease-out forwards}.Composer .mobile-symbol-menu-button.menu-opened .icon-keyboard{animation:grow-icon .4s ease-out}.Composer .mobile-symbol-menu-button.menu-opened .icon-smile,.Composer .mobile-symbol-menu-button.menu-opened .Spinner{animation:hide-icon .4s ease-out forwards}#message-compose{flex-grow:1;max-width:calc(100% - 4rem);background:var(--color-background);border-radius:var(--border-radius-messages);border-bottom-right-radius:0;box-shadow:0 1px 2px var(--color-default-shadow);position:relative;z-index:1}#message-compose .svg-appendix{position:absolute;bottom:-.1875rem;right:-.5625rem;width:.5625rem;height:1.25rem}#message-compose .svg-appendix .corner{fill:var(--color-background)}@media (max-width:600px){#message-compose{max-width:calc(100% - 3rem)}}.message-input-wrapper{display:flex}.message-input-wrapper>.Button{flex-shrink:0;background:none!important;width:3.375rem;height:3.375rem;margin:0;padding:.625rem;align-self:flex-end}@media (max-width:600px){.message-input-wrapper>.Button{width:2.875rem;height:2.875rem;margin:0 .25rem}}.message-input-wrapper>.Button+.Button{margin-left:-.25rem}.message-input-wrapper>.Button.scheduled-button i:after{content:"";position:absolute;top:.75rem;right:.75rem;border:.1875rem solid var(--color-background);box-sizing:initial;width:.5rem;height:.5rem;border-radius:50%;background:var(--color-green-darker);box-shadow:-.375rem -.25rem 0 -.1875rem var(--color-background)}@media (max-width:600px){.message-input-wrapper>.Button.scheduled-button i:after{top:.5rem;right:.5rem}}.message-input-wrapper>.input-group{flex-grow:1;margin-bottom:0}.message-input-wrapper .recording-state{display:inline-block;position:relative;line-height:3.5rem;height:3.5rem;padding:0 3.125rem 0 1rem}.message-input-wrapper .recording-state:after{content:"";width:10px;height:10px;background:var(--color-error);border-radius:5px;position:absolute;top:50%;margin-top:-5px;right:1.375rem}@media (max-width:600px){.message-input-wrapper .recording-state{height:2.875rem;line-height:2.875rem}}#caption-input-text,#message-input-text{position:relative}#caption-input-text .form-control,#message-input-text .form-control{padding-top:calc(1rem - var(--border-width));padding-bottom:calc(1rem - var(--border-width));overflow:hidden;line-height:1.5rem}#caption-input-text .form-control.overflown,#message-input-text .form-control.overflown{overflow-y:auto;overflow-x:hidden}#caption-input-text .form-control.touched+.placeholder-text,#caption-input-text .form-control:focus+.placeholder-text,#message-input-text .form-control.touched+.placeholder-text,#message-input-text .form-control:focus+.placeholder-text{display:none}#caption-input-text .form-control.focus-disabled,#message-input-text .form-control.focus-disabled{pointer-events:none}#caption-input-text .placeholder-text,#message-input-text .placeholder-text{position:absolute;bottom:1rem;color:var(--color-placeholders);pointer-events:none}@media (max-width:600px){#caption-input-text .placeholder-text,#message-input-text .placeholder-text{bottom:.6875rem}}#caption-input-text .text-entity-link,#message-input-text .text-entity-link{color:var(--color-links)!important;cursor:default;text-decoration:none}#caption-input-text .text-entity-link:active,#caption-input-text .text-entity-link:hover,#caption-input-text .text-entity-link:visited,#message-input-text .text-entity-link:active,#message-input-text .text-entity-link:hover,#message-input-text .text-entity-link:visited{color:var(--color-links-hover)!important}#caption-input-text .clone,#message-input-text .clone{position:absolute;top:0;left:0;opacity:0;pointer-events:none;z-index:-10}#message-input-text{flex-grow:1}#message-input-text .form-control{margin-bottom:0;background:transparent!important;border:none!important;border-radius:0!important;box-shadow:none!important;caret-color:var(--color-text);min-height:3.5rem;max-height:26rem;transition:height .1s ease}@media (max-width:600px){#message-input-text .form-control{height:2.875rem;min-height:2.875rem;max-height:16rem;padding-top:calc(.6875rem - var(--border-width));padding-bottom:calc(.6875rem - var(--border-width))}}body.animation-level-0 #message-input-text .form-control{transition:none!important}#message-input-text:not(:only-child) .form-control{padding-left:0;padding-right:0}.ComposerEmbeddedMessage+.message-input-wrapper #message-input-text .form-control.overflown,.WebPagePreview+.message-input-wrapper #message-input-text .form-control.overflown{margin-top:.75rem}#message-input-text .emoji{width:1.25rem;height:1.25rem;margin:0 1px -5px;vertical-align:0;pointer-events:none}#caption-input-text .form-control{min-height:3.25rem;max-height:15rem}#caption-input-text .placeholder-text{bottom:1rem;left:1rem}#middle-column-bg{position:absolute;top:0;left:0;bottom:0;right:0;overflow:hidden;z-index:-1}#middle-column-bg:after,#middle-column-bg:before{content:"";display:block;position:absolute;top:0;left:0;bottom:0;right:0;background-color:#a2af8e}#middle-column-bg:after{background-image:url(chat-bg.0e9c45048ff468c28042bcf15ff9e0d2.jpg);background-position:50%;background-repeat:no-repeat;background-size:cover}body:not(.animation-level-0) #root #middle-column-bg:after{transition:transform var(--layer-transition),opacity .2s!important}body.animation-level-0 #middle-column-bg:after{transition:none}@media (max-width:600px){#middle-column-bg:after{background-image:url(chat-bg-mobile.1f82c474ea90cf313c5ed320b4d04d23.jpg)}}.custom-bg-image>#middle-column-bg:after{background-image:var(--custom-background)!important;filter:blur(0);transform:scale(1.1)}.custom-bg-color>#middle-column-bg:before{background-color:var(--custom-background)!important;filter:blur(0);transform:scale(1.1)}.custom-bg-image.blurred>#middle-column-bg:after{filter:blur(12px)}.custom-bg-color>#middle-column-bg:after{opacity:0}@media screen and (min-width:1276px){body.animation-level-2 #middle-column-bg:after,body.animation-level-2 #middle-column-bg:before{margin:-16rem -5rem -20rem 0;overflow:hidden;transform:scale(1);transform-origin:left center;transition:transform var(--layer-transition)}body.animation-level-2 .custom-bg-image>#middle-column-bg:after{margin:-16rem -5rem -20rem -1rem;transition:transform var(--layer-transition)}body.animation-level-2 #Main.right-column-open :not(.custom-bg-image)>#middle-column-bg:after{transform:scale(.67)}}#MiddleColumn{display:flex;justify-content:center;height:100%;position:relative;z-index:1}@media (max-width:600px){#MiddleColumn{overflow:hidden}}#MiddleColumn .messages-layout{display:flex;flex-direction:column;align-items:center;position:relative}#MiddleColumn .messages-layout,#MiddleColumn .messages-layout>.Transition{width:100%;height:100%;overflow:hidden}#MiddleColumn .messages-layout>.Transition>div{display:flex;flex-direction:column;align-items:center}#MiddleColumn .messaging-disabled-inner{width:100%;padding:1rem;border-radius:var(--border-radius-messages);background:var(--color-background);color:var(--color-text-secondary);text-align:center;box-shadow:0 1px 2px var(--color-default-shadow)}#MiddleColumn .Composer #message-compose{transform:scaleX(1) translateX(0);transition:transform var(--select-transition),border-bottom-right-radius var(--select-transition)}#MiddleColumn .Composer #message-compose:before{transform:scaleX(-1) translateX(0);transition:transform var(--select-transition)}body.animation-level-0 #MiddleColumn .Composer #message-compose,body.animation-level-0 #MiddleColumn .Composer #message-compose:before{transition:none!important}#MiddleColumn .Composer .message-input-wrapper,#MiddleColumn .Composer:before{opacity:1;transition:opacity var(--select-transition)}body.animation-level-0 #MiddleColumn .Composer .message-input-wrapper,body.animation-level-0 #MiddleColumn .Composer:before{transition:none!important}#MiddleColumn .Composer>.Button{opacity:1;transform:scale(1);transition:opacity var(--select-transition),transform var(--select-transition)}body.animation-level-0 #MiddleColumn .Composer>.Button{transition:none!important}#MiddleColumn .Composer.hover-disabled,#MiddleColumn .Composer:not(.shown){pointer-events:none}#MiddleColumn .Composer:not(.shown) .ComposerEmbeddedMessage{height:0}#MiddleColumn .Composer:not(.shown) #message-compose{transform:scaleX(var(--composer-hidden-scale,1)) translateX(var(--composer-translate-x,0));border-bottom-right-radius:var(--border-radius-messages)}#MiddleColumn .Composer:not(.shown) #message-compose:before{transform:scaleX(-1) translateX(200%)}#MiddleColumn .Composer:not(.shown) #editable-message-text{height:3.5rem!important}@media (max-width:600px){#MiddleColumn .Composer:not(.shown) #editable-message-text{height:2.5rem!important}}#MiddleColumn .Composer:not(.shown) .message-input-wrapper,#MiddleColumn .Composer:not(.shown):before{opacity:0}#MiddleColumn .Composer:not(.shown)>.Button{opacity:0!important;transform:scale(.5)}#MiddleColumn .messaging-disabled{transform:scaleX(1);transition:transform var(--select-transition)}#MiddleColumn .messaging-disabled .messaging-disabled-inner span{opacity:1;transition:opacity var(--select-transition)}body.animation-level-0 #MiddleColumn .messaging-disabled,body.animation-level-0 #MiddleColumn .messaging-disabled .messaging-disabled-inner span{transition:none!important}#MiddleColumn .messaging-disabled:not(.shown){transform:scaleX(var(--composer-hidden-scale,1));pointer-events:none}#MiddleColumn .messaging-disabled:not(.shown) .messaging-disabled-inner span{opacity:0}#MiddleColumn .middle-column-footer{width:100%;max-width:var(--messages-container-width);padding:0 1rem;position:relative;display:flex;align-items:flex-end;z-index:var(--z-middle-footer);transform:translateZ(0);transition:transform var(--layer-transition)}body.animation-level-0 #MiddleColumn .middle-column-footer{transition:none!important}@media (min-width:1276px){#MiddleColumn .middle-column-footer{width:calc(100% - var(--right-column-width))}#Main.right-column-open #MiddleColumn .middle-column-footer{transform:translate3d(calc(var(--right-column-width)/-2),0,0)}}@media (max-width:600px){#MiddleColumn .middle-column-footer{padding:0 .5rem}body.is-symbol-menu-open #MiddleColumn .middle-column-footer{transform:translate3d(0,calc(-1*(var(--symbol-menu-height) + var(--symbol-menu-footer-height))),0)}}.Composer,.MessageSelectToolbar,.messaging-disabled{margin-bottom:1.25rem}@media (max-width:600px){.Composer,.MessageSelectToolbar,.messaging-disabled{margin-bottom:.5rem}}.Composer,.MessageSelectToolbar,.messaging-disabled,.unpin-all-button{width:100%;display:flex;justify-content:center;position:relative}.mask-image-disabled .Composer:before,.mask-image-disabled .MessageSelectToolbar:before,.mask-image-disabled .messaging-disabled:before,.mask-image-disabled .unpin-all-button:before{--shadow-color:#84a686;content:"";display:block;position:absolute;top:0;left:.125rem;right:.125rem;height:1.5rem;box-shadow:0 0 .5rem .5rem var(--shadow-color);background:var(--shadow-color);z-index:-1}@media (max-width:600px){.mask-image-disabled .Composer:before,.mask-image-disabled .MessageSelectToolbar:before,.mask-image-disabled .messaging-disabled:before,.mask-image-disabled .unpin-all-button:before{left:0;right:0;z-index:-1;--shadow-color:#678a64}body.is-symbol-menu-open .mask-image-disabled .Composer:before,body.is-symbol-menu-open .mask-image-disabled .MessageSelectToolbar:before,body.is-symbol-menu-open .mask-image-disabled .messaging-disabled:before,body.is-symbol-menu-open .mask-image-disabled .unpin-all-button:before{--shadow-color:#b4bf9e}}@media screen and (min-height:750px){.mask-image-disabled .Composer:before,.mask-image-disabled .MessageSelectToolbar:before,.mask-image-disabled .messaging-disabled:before,.mask-image-disabled .unpin-all-button:before{--shadow-color:#759b72}}@media screen and (min-width:1276px){body.animation-level-2 .mask-image-disabled .Composer:before,body.animation-level-2 .mask-image-disabled .MessageSelectToolbar:before,body.animation-level-2 .mask-image-disabled .messaging-disabled:before,body.animation-level-2 .mask-image-disabled .unpin-all-button:before{--shadow-color:#97af8e}body.animation-level-2 #Main.right-column-open .mask-image-disabled .Composer:before,body.animation-level-2 #Main.right-column-open .mask-image-disabled .MessageSelectToolbar:before,body.animation-level-2 #Main.right-column-open .mask-image-disabled .messaging-disabled:before,body.animation-level-2 #Main.right-column-open .mask-image-disabled .unpin-all-button:before{--shadow-color:#84a686}}@media screen and (min-width:1276px) and (min-height:750px){body.animation-level-2 .mask-image-disabled .Composer:before,body.animation-level-2 .mask-image-disabled .MessageSelectToolbar:before,body.animation-level-2 .mask-image-disabled .messaging-disabled:before,body.animation-level-2 .mask-image-disabled .unpin-all-button:before{--shadow-color:#91a67f}body.animation-level-2 #Main.right-column-open .mask-image-disabled .Composer:before,body.animation-level-2 #Main.right-column-open .mask-image-disabled .MessageSelectToolbar:before,body.animation-level-2 #Main.right-column-open .mask-image-disabled .messaging-disabled:before,body.animation-level-2 #Main.right-column-open .mask-image-disabled .unpin-all-button:before{--shadow-color:#759b72}}.custom-bg-color .Composer:before,.custom-bg-color .MessageSelectToolbar:before,.custom-bg-color .messaging-disabled:before,.custom-bg-color .unpin-all-button:before,.custom-bg-image .Composer:before,.custom-bg-image .MessageSelectToolbar:before,.custom-bg-image .messaging-disabled:before,.custom-bg-image .unpin-all-button:before{display:none}.unpin-button-container{width:100%;display:flex;justify-content:center;position:absolute;margin-top:.25rem;padding-bottom:1rem}.unpin-button-container .unpin-all-button{text-transform:capitalize;color:var(--color-black);height:3.125rem;overflow:visible;box-shadow:0 1px 2px var(--color-default-shadow)}.unpin-button-container .unpin-all-button:hover .icon-unpin{color:var(--color-white)}.select-mode-active+.middle-column-footer .unpin-button-container .unpin-all-button{display:none}.mask-image-disabled .unpin-button-container .unpin-all-button:before{height:3.125rem;border-radius:var(--border-radius-messages)}@media (max-width:600px){.unpin-button-container .unpin-all-button{height:2.5rem}}.unpin-button-container .unpin-all-button .icon-unpin{margin-right:.75rem;margin-left:-.438rem;color:var(--color-text-secondary);font-size:1.5rem}@media (max-width:600px){.unpin-button-container{padding-bottom:.75rem}}.mask-image-disabled .unpin-button-container:before{background:unset}.RightHeader{display:flex;align-items:center;height:var(--header-height);padding:.5rem .8125rem;pointer-events:auto}@media (max-width:600px){.RightHeader{padding:.5rem}}.RightHeader .close-button{flex-shrink:0}.RightHeader>.Transition{flex:1;height:100%}.RightHeader>.Transition>div{display:flex;align-items:center}.RightHeader h3{margin-bottom:0;font-size:1.25rem;font-weight:500;margin-left:1.375rem}.RightHeader .tools{display:flex;margin-left:auto}.RightHeader .SearchInput{margin-left:1rem}@media (min-width:600px){.RightHeader .SearchInput{margin-right:1rem}}.RightHeader .DropdownMenu{margin-left:auto}.Profile{height:100%;overflow-y:scroll;overflow-x:hidden}.Profile>.profile-info>.ChatInfo{grid-area:chat_info}.Profile>.profile-info>.ChatInfo .status.online{color:var(--color-primary)}.Profile>.profile-info>.ChatExtra{padding:0 1.5rem}.Profile>.profile-info>.ChatExtra .item{display:flex;padding:.75rem 0 1rem;text-align:left}.Profile>.profile-info>.ChatExtra .item i{font-size:1.5rem;color:var(--color-text-secondary);margin-right:2rem}.Profile>.profile-info>.ChatExtra .item .title{font-size:1rem;line-height:1.4375rem;margin-bottom:0;font-weight:400;word-break:break-word}.Profile>.profile-info>.ChatExtra .item a.title{color:var(--color-text)}.Profile>.profile-info>.ChatExtra .item .subtitle{margin-bottom:0;font-size:.875rem;color:var(--color-text-secondary)}.shared-media{display:flex;flex-direction:column-reverse}.shared-media .TabList{background:var(--color-background);top:-1px}.shared-media .TabList .Tab{padding:.6875rem .25rem}.shared-media .TabList .Tab i{padding-right:1.5rem;margin-left:-.75rem}.shared-media .Transition{flex:1}.shared-media .content.empty-list{height:100%;padding-top:5rem;display:flex;align-items:flex-start;justify-content:center}.shared-media .content.empty-list .Spinner{--spinner-size:2.75rem}.shared-media .content.media-list{display:grid;padding:.5rem;grid-template-columns:repeat(3,1fr);grid-auto-rows:1fr;grid-gap:.25rem}.shared-media .content.documents-list{padding:1.25rem}.shared-media .content.documents-list .File+.File{margin-top:1.25rem}.shared-media .content.links-list{padding:1.25rem}.shared-media .content.links-list .message-upload-progress,.shared-media .content.links-list .ProgressSpinner{display:none}.shared-media .content.audio-list{padding:1.25rem}.shared-media .content.audio-list .Audio .media-loading{top:0;left:0;display:flex;align-items:center;justify-content:center}.shared-media .content.audio-list .Audio+.Audio{margin-top:1.6875rem}.shared-media .content.members-list{padding:.5rem 1rem}@media (max-width:600px){.shared-media .content.members-list{padding:.5rem 0}}#RightColumn{position:absolute;top:0;right:0;width:var(--right-column-width);height:100%;transform:translate3d(var(--right-column-width),0,0);background:var(--color-background);border-left:1px solid var(--color-borders);z-index:var(--z-right-column);transition:transform var(--layer-transition)}body.animation-level-0 #RightColumn{transition:none}#RightColumn:not(:hover) .Picker .chat-item-clickable:nth-child(n+18){display:none!important}@media (max-width:1275px){#RightColumn{box-shadow:0 .25rem .5rem .1rem var(--color-default-shadow)}}@media (max-width:600px){#RightColumn{width:100vw;transform:translate3d(110vw,0,0)}}#RightColumn>.Transition{height:calc(100% - var(--header-height));overflow:hidden}#RightColumn .Management .section>.ChatInfo,#RightColumn .profile-info>.ChatInfo{padding:0 1.5rem;margin:1rem 0;text-align:center}#RightColumn .Management .section>.ChatInfo .Avatar,#RightColumn .profile-info>.ChatInfo .Avatar{margin:0 auto .5rem}#RightColumn .Management .section>.ChatInfo .Avatar.no-photo,#RightColumn .profile-info>.ChatInfo .Avatar.no-photo{cursor:default!important}#RightColumn .Management .section>.ChatInfo .title,#RightColumn .profile-info>.ChatInfo .title{display:flex;justify-content:center;align-items:center}#RightColumn .Management .section>.ChatInfo .title h3,#RightColumn .profile-info>.ChatInfo .title h3{font-weight:500;font-size:1.25rem;line-height:2rem;white-space:pre-wrap;word-break:break-word}#RightColumn .Management .section>.ChatInfo .title .VerifiedIcon,#RightColumn .profile-info>.ChatInfo .title .VerifiedIcon{margin-left:.25rem;margin-top:.1rem}#RightColumn .Management .section>.ChatInfo .title .emoji,#RightColumn .profile-info>.ChatInfo .title .emoji{width:1.5rem;height:1.5rem;background-size:1.5rem}#RightColumn .Management .section>.ChatInfo .status,#RightColumn .profile-info>.ChatInfo .status{font-size:.875rem;color:#868e96}#RightColumn-wrapper{position:absolute;top:0;left:0;right:0;bottom:0;z-index:var(--z-right-column);overflow:hidden;visibility:hidden;pointer-events:none}@media (max-width:1275px){#RightColumn-wrapper{position:fixed}}#RightColumn-wrapper.is-hidden{display:none}#RightColumn-wrapper .overlay-backdrop{position:absolute;top:0;right:0;bottom:0;left:0;z-index:-1;background:#000;opacity:0}@media (max-width:600px){#RightColumn-wrapper .overlay-backdrop{transition:opacity var(--layer-transition)}body.animation-level-0 #RightColumn-wrapper .overlay-backdrop{transition:none}}#Main.right-column-open #RightColumn-wrapper,body.animating-right-column #RightColumn-wrapper{visibility:visible}@media (max-width:600px){#Main.right-column-open #RightColumn-wrapper .overlay-backdrop{opacity:var(--layer-blackout-opacity)}}#Main.right-column-open #RightColumn-wrapper #RightColumn{pointer-events:auto;transform:translateZ(0)}#Main{display:flex;height:100%;text-align:left;overflow:hidden}@media (min-width:1276px){#Main{position:relative}}@media (max-width:600px){#Main{height:calc(var(--vh, 1vh)*100)}}#LeftColumn{flex:1;min-width:18rem;max-width:26.5rem;height:100%}@media (max-width:600px){#LeftColumn{height:calc(var(--vh, 1vh)*100)}}@media (min-width:1680px){#LeftColumn{border-left:1px solid var(--color-borders)}}@media (max-width:1275px){#LeftColumn{flex:2}}@media (max-width:925px){#LeftColumn{position:fixed;left:0;top:0;height:calc(var(--vh, 1vh)*100);width:26.5rem;transform:translate3d(-5rem,0,0);transition:transform var(--layer-transition)}body.animation-level-0 #LeftColumn{transition:none}#LeftColumn:after{content:"";display:block;position:absolute;left:0;top:0;right:0;bottom:0;background:#000;opacity:var(--layer-blackout-opacity);transition:opacity var(--layer-transition);z-index:1}body.animation-level-0 #LeftColumn:after{transition:none}body.is-android #LeftColumn:after{display:none}body.is-android .middle-column-shown #LeftColumn:after{display:block}#Main:not(.middle-column-open) #LeftColumn{transform:translateZ(0)}#Main:not(.middle-column-open) #LeftColumn:after{opacity:0;pointer-events:none}#Main.middle-column-open #LeftColumn .custom-scroll{overflow:hidden}}@media (max-width:600px){#LeftColumn{max-width:none;width:100vw;transform:translate3d(-20vw,0,0)}}@media (min-width:1680px){#RightColumn{border-right:1px solid var(--color-borders)}}@media (max-width:600px){#RightColumn{height:calc(var(--vh, 1vh)*100 + 1px)}}#MiddleColumn{flex:3;border-left:1px solid var(--color-borders);max-width:75vw}@media (max-width:1275px){#MiddleColumn{max-width:calc(100vw - 26.5rem)}}@media (max-width:66.25rem){#MiddleColumn{max-width:60vw}}@media (min-width:1680px){#MiddleColumn{border-right:1px solid var(--color-borders);max-width:calc(1680px - 26.5rem)}}@media (max-width:925px){#MiddleColumn{max-width:none;position:fixed;left:0;top:0;bottom:0;right:0;transform:translateZ(0);transition:transform var(--layer-transition)}body.animation-level-0 #MiddleColumn{transition:none}#Main:not(.middle-column-open) #MiddleColumn{transform:translate3d(26.5rem,0,0)}}@media (max-width:600px){#MiddleColumn{border-left:none}#Main:not(.middle-column-open) #MiddleColumn{transform:translate3d(100vw,0,0)}#Main.right-column-open #MiddleColumn{transform:translate3d(-20vw,0,0)}}@media (max-width:600px){.SymbolMenu{transition:transform var(--layer-transition)}body.animation-level-0 .SymbolMenu{transition:none}body:not(.is-middle-column-open) .SymbolMenu{transform:translate3d(100vw,0,0)!important}} \ No newline at end of file diff --git a/dist/3.186fa7c0f46f0fc2b14a.js b/dist/3.186fa7c0f46f0fc2b14a.js deleted file mode 100644 index 7591dc0b..00000000 --- a/dist/3.186fa7c0f46f0fc2b14a.js +++ /dev/null @@ -1 +0,0 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[3],{104:function(e,t,a){"use strict";function s(e){const t=e.length;let a=e[0],s=e[0];for(let n=0;na?a=t:tvoid 0!==a[s]?a[s]:void 0!==t[s]?t[s]:e[s]})}function o(e,t,a=!0){let s,n,c=null;return(...r)=>{s=!0,n=r,c||(a&&(s=!1,e(...n)),c=window.setInterval(()=>{if(!s)return window.clearInterval(c),void(c=null);s=!1,e(...n)},t))}}function i(e){let t,a=!1;return function(...s){t=s,a||(a=!0,requestAnimationFrame(()=>{a=!1,e(...t)}))}}function l(e,t,a=!0,s=!0){let n=null;return function(){n?(clearTimeout(n),n=null):a&&e(),n=setTimeout(()=>{s&&e(),n=null},t)}}a.d(t,"b",(function(){return s})),a.d(t,"c",(function(){return n})),a.d(t,"e",(function(){return c})),a.d(t,"d",(function(){return r})),a.d(t,"f",(function(){return o})),a.d(t,"g",(function(){return i})),a.d(t,"a",(function(){return l}))},183:function(e,t,a){},184:function(e,t,a){},185:function(e,t,a){},197:function(e,t,a){},198:function(e,t,a){},199:function(e,t,a){},202:function(e,t,a){},203:function(e,t,a){},204:function(e,t,a){},208:function(e,t,a){},209:function(e,t,a){},211:function(e,t,a){},214:function(e,t,a){},215:function(e,t,a){},216:function(e,t,a){},217:function(e,t,a){},218:function(e,t,a){},219:function(e,t,a){},220:function(e,t,a){},221:function(e,t,a){},222:function(e,t,a){},223:function(e,t,a){},224:function(e,t,a){},226:function(e,t,a){},227:function(e,t,a){},228:function(e,t,a){},229:function(e,t,a){},230:function(e,t,a){},234:function(e,t,a){},235:function(e,t,a){},236:function(e,t,a){},91:function(e,t,a){"use strict";a.r(t),a.d(t,"Main",(function(){return pn}));var s=a(2),n=a(1),c=a(0),r=(a(74),a(37)),o=a(6);Object(s.b)("openChat",(e,t,a)=>{const{id:n,threadId:c,type:i}=a,l=Object(o.x)(e);return!l||l.chatId===n&&l.threadId===c&&l.type===i||(e=Object(r.m)(e),e={...e,messages:{...e.messages,contentToBeScheduled:void 0},...n!==e.forwardMessages.toChatId&&{forwardMessages:{}}},Object(s.g)(e)),Object(r.L)(e,n,c,i)}),Object(s.b)("openChatWithInfo",(e,t,a)=>{Object(s.g)({...e,isChatInfoShown:!0}),t.openChat(a)}),Object(s.b)("resetChatCreation",e=>({...e,chatCreation:void 0}));var i=a(5),l=a(18),d=a(3);let b;Object(s.b)("setScrollOffset",(e,t,a)=>{const{chatId:s,threadId:n,scrollOffset:c}=a;return Object(r.v)(e,s,n,"scrollOffset",c)}),Object(s.b)("setReplyingToId",(e,t,a)=>{const{messageId:s}=a,n=Object(o.x)(e);if(!n)return;const{chatId:c,threadId:i}=n;return Object(r.v)(e,c,i,"replyingToId",s)}),Object(s.b)("setEditingId",(e,t,a)=>{const{messageId:s}=a,n=Object(o.x)(e);if(!n)return;const{chatId:c,threadId:i,type:l}=n,d="scheduled"===l?"editingScheduledId":"editingId";return Object(r.v)(e,c,i,d,s)}),Object(s.b)("editLastMessage",e=>{const{chatId:t,threadId:a}=Object(o.x)(e)||{};if(!t||!a)return;const s=Object(o.m)(e,t),n=Object(o.Cb)(e,t,a);if(!s||!n)return;const c=Object(d.g)(n,t=>Boolean(s[t]&&Object(o.b)(e,s[t],a).canEdit));return c?Object(r.v)(e,t,a,"editingId",c):void 0}),Object(s.b)("openMediaViewer",(e,t,a)=>{const{chatId:s,threadId:n,messageId:c,avatarOwnerId:r,origin:o}=a;return{...e,mediaViewer:{chatId:s,threadId:n,messageId:c,avatarOwnerId:r,origin:o},forwardMessages:{}}}),Object(s.b)("closeMediaViewer",e=>({...e,mediaViewer:{}})),Object(s.b)("openAudioPlayer",(e,t,a)=>{const{chatId:s,threadId:n,messageId:c}=a;return{...e,audioPlayer:{chatId:s,threadId:n,messageId:c}}}),Object(s.b)("closeAudioPlayer",e=>({...e,audioPlayer:{}})),Object(s.b)("openPollResults",(e,t,a)=>{const{chatId:n,messageId:c}=a;Object(o.U)(e)?n===e.pollResults.chatId&&c===e.pollResults.messageId||Object(s.g)({...e,pollResults:{chatId:n,messageId:c,voters:{}}}):window.setTimeout(()=>{const e=Object(s.e)();Object(s.g)({...e,pollResults:{chatId:n,messageId:c,voters:{}}})},450)}),Object(s.b)("closePollResults",e=>{Object(s.g)({...e,pollResults:{}})}),Object(s.b)("focusLastMessage",(e,t)=>{const a=Object(o.x)(e);if(!a)return;const{chatId:s,threadId:n}=a;let c;if(n===i.MAIN_THREAD_ID){const t=Object(o.f)(e,s);c=t&&t.lastMessage?t.lastMessage.id:void 0}else{const t=Object(o.xb)(e,s,n);c=t?t.lastMessageId:void 0}c&&t.focusMessage({chatId:s,threadId:n,messageId:c,noHighlight:!0})}),Object(s.b)("focusMessage",(e,t,a)=>{const{chatId:n,threadId:c=i.MAIN_THREAD_ID,messageListType:d="thread",noHighlight:u,groupedId:m,groupedChatId:h}=a;let{messageId:O}=a;if(void 0!==m){const t=Object(o.H)(e,h,m);t&&t.length&&([O]=t)}const j=Object(o.x)(e),g=!j||n!==j.chatId||c!==j.threadId||d!==j.type;b&&(clearTimeout(b),b=void 0),b=window.setTimeout(()=>{let e=Object(s.e)();e=Object(r.N)(e),e=Object(r.M)(e),Object(s.g)(e)},2e3),e=Object(r.N)(e,n,O,u),e=Object(r.M)(e,void 0),g&&(e=Object(r.M)(e,l.b.Static));const f=Object(o.Cb)(e,n,c);if(f&&f.includes(O))return Object(s.g)(e),void t.openChat({id:n,threadId:c});if(g&&(e=Object(r.v)(e,n,c,"viewportIds",void 0)),e=Object(r.v)(e,n,c,"outlyingIds",void 0),f&&!g){const t=O>f[0]?l.b.Down:l.b.Up;e=Object(r.M)(e,t)}Object(s.g)(e),t.openChat({id:n,threadId:c}),t.loadViewportMessages()}),Object(s.b)("openForwardMenu",(e,t,a)=>{const{fromChatId:s,messageIds:n,groupedId:c}=a;let r;return c&&(r=Object(o.Y)(e,s,c)),{...e,forwardMessages:{fromChatId:s,messageIds:r||n,isModalShown:!0}}}),Object(s.b)("exitForwardMode",e=>{Object(s.g)({...e,forwardMessages:{}})}),Object(s.b)("setForwardChatId",(e,t,a)=>{const{id:n}=a;Object(s.g)({...e,forwardMessages:{...e.forwardMessages,toChatId:n,isModalShown:!1}}),t.openChat({id:n}),t.closeMediaViewer()}),Object(s.b)("openForwardMenuForSelectedMessages",(e,t)=>{if(!e.selectedMessages)return;const{chatId:a,messageIds:s}=e.selectedMessages;t.openForwardMenu({fromChatId:a,messageIds:s})}),Object(s.b)("enterMessageSelectMode",(e,t,a)=>{const{messageId:s}=a||{},n=Object(o.q)(e);return n?Object(r.l)(e,n.id,s):e}),Object(s.b)("toggleMessageSelection",(e,t,a)=>{const{messageId:s,groupedId:n,childMessageIds:c,withShift:i}=a,l=Object(o.x)(e);if(!l)return;const{chatId:d,threadId:b,type:u}=l;return Object(r.E)(e,d,b,u,s,n,c,i)}),Object(s.b)("exitMessageSelectMode",r.m),Object(s.b)("openPollModal",e=>({...e,isPollModalOpen:!0})),Object(s.b)("closePollModal",e=>({...e,isPollModalOpen:!1}));Object(s.b)("setGlobalSearchQuery",(e,t,a)=>{const{query:s}=a,{chatId:n}=e.globalSearch;return Object(r.P)(e,{globalResults:{},localResults:{},resultsByType:void 0,...s?{fetchingStatus:{chats:!n,messages:!0}}:{fetchingStatus:void 0},query:s})}),Object(s.b)("addRecentlyFoundChatId",(e,t,a)=>{const{id:s}=a,{recentlyFoundChatIds:n}=e.globalSearch;if(!n)return Object(r.P)(e,{recentlyFoundChatIds:[s]});const c=n.filter(e=>e!==s);return c.unshift(s),c.length>10&&c.pop(),Object(r.P)(e,{recentlyFoundChatIds:c})}),Object(s.b)("clearRecentlyFoundChats",e=>Object(r.P)(e,{recentlyFoundChatIds:void 0})),Object(s.b)("setGlobalSearchContent",(e,t,a)=>{const{content:s}=a;return Object(r.Q)(e,s)}),Object(s.b)("setGlobalSearchChatId",(e,t,a)=>{const{id:s}=a;return Object(r.P)(e,{chatId:s,query:void 0,resultsByType:void 0})});var u=a(44),m=a(4);Object(s.b)("openLocalTextSearch",e=>{const{chatId:t,threadId:a}=Object(o.x)(e)||{};if(t&&a)return Object(r.W)(e,t,a,!0)}),Object(s.b)("closeLocalTextSearch",e=>{const{chatId:t,threadId:a}=Object(o.x)(e)||{};if(t&&a)return e=Object(r.W)(e,t,a,!1),e=Object(r.s)(e,t,a,void 0)}),Object(s.b)("setLocalTextSearchQuery",(e,t,a)=>{const{chatId:s,threadId:n}=Object(o.x)(e)||{};if(!s||!n)return;const{query:c}=a,i=Object(m.a)(s,n),{query:l}=e.localTextSearch.byChatThreadKey[i]||{};return c!==l&&(e=Object(r.s)(e,s,n,u.a)),e=Object(r.W)(e,s,n,!0,c)}),Object(s.b)("setLocalMediaSearchType",(e,t,a)=>{const{chatId:s}=Object(o.x)(e)||{};if(!s)return;const{mediaType:n}=a;return Object(r.V)(e,s,n)}),Object(s.b)("setStickerSearchQuery",(e,t,a)=>{const{query:s}=a;return{...e,stickers:{...e.stickers,search:{query:s,resultIds:void 0}}}}),Object(s.b)("setGifSearchQuery",(e,t,a)=>{const{query:s}=a;return{...e,gifs:{...e.gifs,search:{query:s,offsetId:void 0,results:void 0}}}}),Object(s.b)("openUserInfo",(e,t,a)=>{const{id:s}=a;t.openChat({id:s})});Object(s.b)("openChat",e=>Object(r.db)(e,void 0)),Object(s.b)("setSettingOption",(e,t,a)=>Object(r.u)(e,a));var h=a(7),O=a(157);Object(s.b)("toggleChatInfo",e=>({...e,isChatInfoShown:!e.isChatInfoShown})),Object(s.b)("toggleManagement",e=>{const{chatId:t}=Object(o.x)(e)||{};if(t)return{...e,management:{byChatId:{...e.management.byChatId,[t]:{...e.management.byChatId[t],isActive:!(e.management.byChatId[t]||{}).isActive}}}}}),Object(s.b)("closeManagement",e=>{const{chatId:t}=Object(o.x)(e)||{};if(t)return{...e,management:{byChatId:{...e.management.byChatId,[t]:{...e.management.byChatId[t],isActive:!1}}}}}),Object(s.b)("toggleStatistics",e=>({...e,isStatisticsShown:!e.isStatisticsShown})),Object(s.b)("openChat",(e,t,a)=>{if(!h.f)return;const{id:s}=a;return{...e,isLeftColumnShown:void 0===s}}),Object(s.b)("toggleLeftColumn",e=>({...e,isLeftColumnShown:!e.isLeftColumnShown})),Object(s.b)("addRecentEmoji",(e,t,a)=>{const{emoji:s}=a,{recentEmojis:n}=e;if(!n)return{...e,recentEmojis:[s]};const c=n.filter(e=>e!==s);return c.unshift(s),c.length>18&&c.pop(),{...e,recentEmojis:c}}),Object(s.b)("addRecentSticker",(e,t,a)=>{const{sticker:s}=a,{recent:n}=e.stickers;if(!n)return{...e,stickers:{...e.stickers,recent:{hash:0,stickers:[s]}}};const c=n.stickers.filter(e=>e.id!==s.id);return c.unshift(s),{...e,stickers:{...e.stickers,recent:{...n,stickers:c}}}}),Object(s.b)("showNotification",(e,t,a)=>{const s=a,n=[...e.notifications],c=n.findIndex(e=>e.message===s.message);return-1!==c&&n.splice(c,1),n.push(s),{...e,notifications:n}}),Object(s.b)("dismissNotification",e=>{const t=[...e.notifications];return t.pop(),{...e,notifications:t}}),Object(s.b)("showError",(e,t,a)=>{const{error:s}=a;if(!Object(O.a)(s))return e;const n=[...e.errors],c=n.findIndex(e=>e.message===s.message);return-1!==c&&n.splice(c,1),n.push(s),{...e,errors:n}}),Object(s.b)("dismissError",e=>{const t=[...e.errors];return t.pop(),{...e,errors:t}}),Object(s.b)("openPaymentModal",(e,t,a)=>{const{messageId:s}=a;return{...e,payment:{...e.payment,messageId:s,isPaymentModalOpen:!0}}}),Object(s.b)("closePaymentModal",e=>{const t=Object(r.g)(e);return Object(r.h)(t)});a(75);var j=a(11),g=a(9);const f=Object(g.g)(e=>e(),1e3,!0),p=Object(g.g)(e=>e(),3e3,!0),I=Object(g.a)(e=>e(),500,!1,!0),v=Object(g.a)(e=>e(),500,!1,!0);async function y(e,t,a){const c=await Object(j.a)("fetchChats",{limit:n.h,offsetDate:a,archived:"archived"===e,withPinned:void 0===Object(s.e)().chats.orderedPinnedIds[e]});if(!c)return;const{chatIds:o}=c;o.length>0&&o[0]===t&&o.shift();let l=Object(s.e)();l=Object(r.e)(l,Object(d.c)(c.users,"id")),l=Object(r.K)(l,Object(d.c)(c.chats,"id")),l=Object(r.G)(l,e,o),l=Object(r.H)(l,e,c),Object.keys(c.draftsById).map(Number).forEach(e=>{l=Object(r.v)(l,e,i.MAIN_THREAD_ID,"draft",c.draftsById[e])}),Object.keys(c.replyingToById).map(Number).forEach(e=>{l=Object(r.v)(l,e,i.MAIN_THREAD_ID,"replyingToId",c.replyingToById[e])}),0!==o.length||l.chats.isFullyLoaded[e]||(l={...l,chats:{...l.chats,isFullyLoaded:{...l.chats.isFullyLoaded,[e]:!0}}}),Object(s.g)(l)}async function w(e){const t=await Object(j.a)("fetchFullChat",e);if(!t)return;const{users:a,fullInfo:n}=t;let c=Object(s.e)();a&&(c=Object(r.e)(c,Object(d.c)(a,"id"))),c=Object(r.F)(c,e.id,{fullInfo:n}),Object(s.g)(c)}async function C(e,t,a){const n=Object(s.e)(),c=Object(o.h)(n,t);if(c&&!c.isMin)return void(a?e.focusMessage({chatId:c.id,messageId:a}):e.openChat({id:c.id}));const i=Object(o.q)(n);e.openChat({id:-1});const l=await Object(j.a)("getChatByUsername",t);if(!l)return i&&e.openChat({id:i.id}),void e.showNotification({message:"User does not exist"});Object(s.g)(Object(r.F)(Object(s.e)(),l.id,l)),a?e.focusMessage({chatId:l.id,messageId:a}):e.openChat({id:l.id})}Object(s.b)("preloadTopChatMessages",(e,t)=>{(async()=>{const a=[];for(let c=0;ce!==l&&!a.includes(e));if(!u)return;a.push(u.id),t.loadViewportMessages({chatId:u.id,threadId:i.MAIN_THREAD_ID}),h.k&&t.loadPinnedMessages({chatId:u.id})}})()}),Object(s.b)("openChat",(e,t,a)=>{const{id:s,threadId:n}=a,{currentUserId:c}=e,r=Object(o.f)(e,s);if(r&&r.hasUnreadMark&&t.toggleChatUnread({id:s}),r)Object(m.mb)(r)&&!r.isMin&&t.requestChatUpdate({chatId:s});else if(s===c)Object(j.a)("fetchChat",{type:"self"});else{const t=Object(o.Bb)(e,s);t&&Object(j.a)("fetchChat",{type:"user",user:t})}if(n!==i.MAIN_THREAD_ID){Object(o.zb)(e,s,n)||t.requestThreadInfoUpdate({chatId:s,threadId:n})}}),Object(s.b)("openSupportChat",(e,t)=>{const a=Object(o.vb)(e);t.openChat({id:a?a.id:-1}),a||(async()=>{const e=await Object(j.a)("fetchChat",{type:"support"});e&&t.openChat({id:e.chatId})})()}),Object(s.b)("loadMoreChats",(e,t,a)=>{const{listType:s="active"}=a,n=e.chats.listIds[s];if(e.chats.isFullyLoaded[s])return;const c=n?n.map(t=>e.chats.byId[t]).filter(t=>Boolean(t&&t.lastMessage)&&!Object(o.L)(e,t.id)).sort((e,t)=>e.lastMessage.date-t.lastMessage.date)[0]:void 0;f(c?()=>y(s,c.id,c.lastMessage.date):()=>y(s))}),Object(s.b)("loadFullChat",(e,t,a)=>{const{chatId:s,force:n}=a,c=Object(o.f)(e,s);c&&(n?w(c):I(()=>w(c)))}),Object(s.b)("loadSuperGroupOnlines",(e,t,a)=>{const{chatId:s}=a,n=Object(o.f)(e,s);n&&v(()=>Object(j.a)("fetchSuperGroupOnlines",n))}),Object(s.b)("loadTopChats",()=>{p(()=>y("active"))}),Object(s.b)("requestChatUpdate",(e,t,a)=>{const{chatId:s}=a,n=Object(o.f)(e,s);n&&Object(j.a)("requestChatUpdate",n)}),Object(s.b)("updateChatMutedState",(e,t,a)=>{const{chatId:s,isMuted:n}=a,c=Object(o.f)(e,s);c&&Object(j.a)("updateChatMutedState",{chat:c,isMuted:n})}),Object(s.b)("createChannel",(e,t,a)=>{const{title:n,about:c,photo:i,memberIds:d}=a;!async function(e,t,a,n){Object(s.g)({...Object(s.e)(),chatCreation:{progress:l.a.InProgress}});const c=await Object(j.a)("createChannel",{title:e,about:a,users:t});if(!c)return;const{id:o,accessHash:i}=c;let d=Object(s.e)();d=Object(r.F)(d,o,c),d={...d,chatCreation:{...d.chatCreation,progress:c?l.a.Complete:l.a.Error}},Object(s.g)(d),Object(s.d)().openChat({id:o}),o&&i&&n&&await Object(j.a)("editChatPhoto",{chatId:o,accessHash:i,photo:n})}(n,d.map(t=>Object(o.Bb)(e,t)).filter(Boolean),c,i)}),Object(s.b)("joinChannel",(e,t,a)=>{const{chatId:s}=a,n=Object(o.f)(e,s);if(!n)return;const{id:c,accessHash:r}=n;c&&r&&Object(j.a)("joinChannel",{channelId:c,accessHash:r})}),Object(s.b)("leaveChannel",(e,t,a)=>{const{chatId:s}=a,n=Object(o.f)(e,s);if(!n)return;const{id:c,accessHash:r}=n;c&&r&&Object(j.a)("leaveChannel",{channelId:c,accessHash:r})}),Object(s.b)("deleteChannel",(e,t,a)=>{const{chatId:s}=a,n=Object(o.f)(e,s);if(!n)return;const{id:c,accessHash:r}=n;c&&r&&Object(j.a)("deleteChannel",{channelId:c,accessHash:r})}),Object(s.b)("createGroupChat",(e,t,a)=>{const{title:n,memberIds:c,photo:i}=a;!async function(e,t,a){Object(s.g)({...Object(s.e)(),chatCreation:{progress:l.a.InProgress}});const n=await Object(j.a)("createGroupChat",{title:e,users:t});if(!n)return;const{id:c}=n;let o=Object(s.e)();o=Object(r.F)(o,c,n),o={...o,chatCreation:{...o.chatCreation,progress:n?l.a.Complete:l.a.Error}},Object(s.g)(o),Object(s.d)().openChat({id:c}),c&&a&&await Object(j.a)("editChatPhoto",{chatId:c,photo:a})}(n,c.map(t=>Object(o.Bb)(e,t)).filter(Boolean),i)}),Object(s.b)("toggleChatPinned",(e,t,a)=>{const{id:s,folderId:c}=a,r=Object(o.f)(e,s);if(r)if(c){const t=Object(o.i)(e,c);if(t){const a=!Object(o.L)(e,s,c),{pinnedChatIds:n,includedChatIds:r}=t,i=a?[s,...n||[]]:(n||[]).filter(e=>e!==s),l=[s,...r];Object(j.a)("editChatFolder",{id:c,folderUpdate:{...t,pinnedChatIds:i,includedChatIds:l}})}}else{const t=Object(o.j)(e,s),a=Object(o.L)(e,s,"archived"===t?n.f:void 0);Object(j.a)("toggleChatPinned",{chat:r,shouldBePinned:!a})}}),Object(s.b)("toggleChatArchived",(e,t,a)=>{const{id:s}=a,c=Object(o.f)(e,s);c&&Object(j.a)("toggleChatArchived",{chat:c,folderId:Object(m.hb)(c)?0:n.f})}),Object(s.b)("loadChatFolders",()=>{!async function(){const e=await Object(j.a)("fetchChatFolders");if(e){const t=Object(s.e)();Object(s.g)({...t,chatFolders:{...t.chatFolders,...e}})}}()}),Object(s.b)("loadRecommendedChatFolders",()=>{!async function(){const e=await Object(j.a)("fetchRecommendedChatFolders");if(e){const t=Object(s.e)();Object(s.g)({...t,chatFolders:{...t.chatFolders,recommended:e}})}}()}),Object(s.b)("editChatFolder",(e,t,a)=>{const{id:s,folderUpdate:n}=a,c=Object(o.i)(e,s);c&&Object(j.a)("editChatFolder",{id:s,folderUpdate:{id:s,emoticon:c.emoticon,pinnedChatIds:c.pinnedChatIds,...n}})}),Object(s.b)("addChatFolder",(e,t,a)=>{const{folder:c}=a,{orderedIds:r}=e.chatFolders;!async function(e,t){const{id:a,description:n,...c}=e;if(await Object(j.a)("editChatFolder",{id:t+1,folderUpdate:{id:t+1,...c}}),!n)return;const r=Object(s.e)(),{recommended:o}=r.chatFolders;o&&Object(s.g)({...r,chatFolders:{...r.chatFolders,recommended:o.filter(({id:e})=>e!==a)}})}(c,r&&r.length?Math.max.apply(Math.max,r):n.f)}),Object(s.b)("deleteChatFolder",(e,t,a)=>{const{id:s}=a;Object(o.i)(e,s)&&async function(e){await Object(j.a)("deleteChatFolder",e)}(s)}),Object(s.b)("toggleChatUnread",(e,t,a)=>{const{id:s}=a,n=Object(o.f)(e,s);n&&(n.unreadCount?Object(j.a)("markMessageListRead",{chat:n,threadId:i.MAIN_THREAD_ID}):Object(j.a)("toggleDialogUnread",{chat:n,hasUnreadMark:!n.hasUnreadMark}))}),Object(s.b)("openTelegramLink",(e,t,a)=>{const{url:s}=a,c=n.V.exec(s);C(t,c[1],c[2]?Number(c[2]):void 0)}),Object(s.b)("openChatByUsername",(e,t,a)=>{const{username:s}=a;C(t,s)}),Object(s.b)("togglePreHistoryHidden",(e,t,a)=>{const{chatId:s,isEnabled:n}=a;let c=Object(o.f)(e,s);c&&(async()=>{if(Object(m.ib)(c)){if(c=await Object(j.a)("migrateChat",c),!c)return;t.openChat({id:c.id})}Object(j.a)("togglePreHistoryHidden",{chat:c,isEnabled:n})})()}),Object(s.b)("updateChatDefaultBannedRights",(e,t,a)=>{const{chatId:s,bannedRights:n}=a,c=Object(o.f)(e,s);c&&Object(j.a)("updateChatDefaultBannedRights",{chat:c,bannedRights:n})}),Object(s.b)("updateChatMemberBannedRights",(e,t,a)=>{const{chatId:n,userId:c,bannedRights:i}=a;let l=Object(o.f)(e,n);const d=Object(o.Bb)(e,c);l&&d&&(async()=>{if(Object(m.ib)(l)){if(l=await Object(j.a)("migrateChat",l),!l)return;t.openChat({id:l.id})}await Object(j.a)("updateChatMemberBannedRights",{chat:l,user:d,bannedRights:i});const e=Object(s.e)(),a=Object(o.f)(e,n);if(!a||!a.fullInfo)return;const{members:b,kickedMembers:u}=a.fullInfo,h=!!i.viewMessages,O=!Object.keys(i).length;Object(s.g)(Object(r.F)(e,n,{fullInfo:{...a.fullInfo,...b&&h&&{members:b.filter(e=>e.userId!==c)},...b&&!h&&{members:b.map(e=>e.userId===c?{...e,bannedRights:i}:e)},...O&&u&&{kickedMembers:u.filter(e=>e.userId!==c)}}}))})()}),Object(s.b)("updateChatAdmin",(e,t,a)=>{const{chatId:n,userId:c,adminRights:i,customTitle:l}=a;let d=Object(o.f)(e,n);const b=Object(o.Bb)(e,c);d&&b&&(async()=>{if(Object(m.ib)(d)){if(d=await Object(j.a)("migrateChat",d),!d)return;t.openChat({id:d.id})}await Object(j.a)("updateChatAdmin",{chat:d,user:b,adminRights:i,customTitle:l});const e=Object(s.e)(),a=Object(o.f)(e,n);if(!a||!a.fullInfo)return;const{adminMembers:u}=a.fullInfo,h=!Object.keys(i).length;Object(s.g)(Object(r.F)(e,n,{fullInfo:{...a.fullInfo,...u&&h&&{adminMembers:u.filter(e=>e.userId!==c)},...u&&!h&&{adminMembers:u.map(e=>e.userId===c?{...e,adminRights:i,customTitle:l}:e)}}}))})()}),Object(s.b)("updateChat",(e,t,a)=>{const{chatId:n,title:c,about:i,photo:d}=a,b=Object(o.f)(e,n);b&&(async()=>{Object(s.g)(Object(r.Z)(Object(s.e)(),l.f.InProgress)),await Promise.all([b.title!==c?Object(j.a)("updateChatTitle",b,c):void 0,b.fullInfo&&b.fullInfo.about!==i?Object(j.a)("updateChatAbout",b,i):void 0,d?Object(j.a)("editChatPhoto",{chatId:n,accessHash:b.accessHash,photo:d}):void 0]),Object(s.g)(Object(r.Z)(Object(s.e)(),l.f.Complete))})()}),Object(s.b)("toggleSignatures",(e,t,a)=>{const{chatId:s,isEnabled:n}=a,c=Object(o.f)(e,s);c&&Object(j.a)("toggleSignatures",{chat:c,isEnabled:n})}),Object(s.b)("loadGroupsForDiscussion",()=>{(async()=>{const e=await Object(j.a)("fetchGroupsForDiscussion");if(!e)return;const t=e.reduce((e,t)=>(t&&(e[t.id]=t),e),{}),a=Object(r.c)(Object(s.e)(),t);Object(s.g)({...a,chats:{...a.chats,forDiscussionIds:Object.keys(t).map(Number)}})})()}),Object(s.b)("linkDiscussionGroup",(e,t,a)=>{const{channelId:s,chatId:n}=a,c=Object(o.f)(e,s);let r=Object(o.f)(e,n);c&&r&&(async()=>{if(Object(m.ib)(r)){if(r=await Object(j.a)("migrateChat",r),!r)return;t.openChat({id:r.id})}let{fullInfo:e}=r;if(!e){const t=await Object(j.a)("fetchFullChat",r);if(!t)return;e=t.fullInfo}e.isPreHistoryHidden&&await Object(j.a)("togglePreHistoryHidden",{chat:r,isEnabled:!1}),Object(j.a)("setDiscussionGroup",{channel:c,chat:r})})()}),Object(s.b)("unlinkDiscussionGroup",(e,t,a)=>{const{channelId:s}=a,n=Object(o.f)(e,s);if(!n)return;let c;n.fullInfo&&n.fullInfo.linkedChatId&&(c=Object(o.f)(e,n.fullInfo.linkedChatId)),(async()=>{await Object(j.a)("setDiscussionGroup",{channel:n}),c&&w(c)})()});var E=a(158);const M=new Map;async function S(e,t,a,c,i=!1,b=!1){const u=e.id;let m;switch(c){case l.e.Backwards:m=void 0;break;case l.e.Around:m=-(Math.round(n.L/2)+1);break;case l.e.Forwards:m=-(n.L+1)}const h=await Object(j.a)("fetchMessages",{chat:Object(o.yb)(Object(s.e)(),u,t),offsetId:a,addOffset:m,limit:n.L,threadId:t});if(!h)return;const{messages:O,users:g,chats:f,threadInfos:p,firstMessageId:I}=h,v=Object(d.c)(O,"id"),y=Object.keys(v).map(Number);let w=Object(s.e)();w=Object(r.b)(w,u,v),w=i?Object(r.bb)(w,u,t,y):Object(r.T)(w,u,t,y),w=Object(r.e)(w,Object(d.c)(g,"id")),w=Object(r.c)(w,Object(d.c)(f,"id")),w=Object(r.jb)(w,u,p),I&&(w=Object(r.v)(w,u,t,"firstMessageId",I));let C=Object(o.W)(w,u,t);const E=Object(o.bb)(w,u,t);if(i&&C&&E&&Object(d.b)(C,E)&&(w=Object(r.T)(w,u,t,E),C=Object(o.W)(w,u,t),w=Object(r.v)(w,u,t,"outlyingIds",void 0),i=!1),!b){const e=i?E:C,{newViewportIds:s}=k(e,a,c);w=Object(r.x)(w,u,t,s)}Object(s.g)(w)}function k(e,t,a){const{length:s}=e,c=t?function(e,t){return te[e.length-1]?e.length-1:e.findIndex((a,s)=>a===t||at)}(e,t):-1,r=a===l.e.Backwards?c:c+1||s,o=r-n.L,i=r+n.L-1,d=e.slice(Math.max(0,o),i+1);let b,u;switch(a){case l.e.Backwards:b=r>0,u=o>=0;break;case l.e.Forwards:b=r0,u=d.length===n.L}return{newViewportIds:d,areSomeLocal:b,areAllLocal:u}}async function N(e){let t;const a=e.attachment?(e,n)=>{M.has(n)||(t=n,M.set(n,a));const c=Object(s.e)();Object(s.g)({...c,fileUploads:{byMessageLocalId:{...c.fileUploads.byMessageLocalId,[n]:{progress:e}}}})}:void 0;e.replyingTo&&await Object(g.f)();const n=Object(s.e)(),c=Object(o.x)(n);if(!c)return;const{threadId:r}=c;e.replyingTo||r===i.MAIN_THREAD_ID||(e.replyingTo=Object(o.zb)(n,e.chat.id,r)),await Object(j.a)("sendMessage",e,a),a&&t&&M.delete(t)}Object(s.b)("loadViewportMessages",(e,t,a)=>{const{direction:s=l.e.Around,isBudgetPreload:c=!1}=a||{};let{chatId:i,threadId:d}=a||{};if(!i){const t=Object(o.x)(e);if(!t)return;i=t.chatId,d=t.threadId}const b=Object(o.f)(e,i);if(!b||b.isRestricted)return;const u=Object(o.Cb)(e,i,d),m=Object(o.W)(e,i,d),h=Object(o.bb)(e,i,d);if(u&&u.length&&s!==l.e.Around){const a=s===l.e.Backwards?u[0]:u[u.length-1],n=Boolean(h),o=n?h:m,{newViewportIds:O,areSomeLocal:j,areAllLocal:g}=k(o,a,s);if(j&&(e=Object(r.x)(e,i,d,O)),async function(e,t,a,s,n,c,r,o){t||await S(n,c,o,r,a,s);s||(await Promise.resolve(),e.loadViewportMessages({chatId:n.id,threadId:c,direction:r,isBudgetPreload:!0}))}(t,g,n,c,b,d,s,a),c)return}else{const t=Object(o.G)(e,i)||Object(o.gb)(e,i,d),a=Boolean(t&&m&&!m.includes(t)),s=(a?h:m)||[],{newViewportIds:u,areSomeLocal:O,areAllLocal:j}=k(s,t,l.e.Around);O&&u.length>=n.L&&(e=Object(r.x)(e,i,d,u)),j||S(b,d,t,l.e.Around,a,c)}return e}),Object(s.b)("loadMessage",(e,t,a)=>{const{chatId:n,messageId:c,replyOriginForId:l}=a,b=Object(o.f)(e,n);b&&async function(e,t,a){const n=await Object(j.a)("fetchMessage",{chat:e,messageId:t});if(!n)return;if(n===i.MESSAGE_DELETED){if(a){let t=Object(s.e)();const n=Object(o.k)(t,e.id,a);t=Object(r.J)(t,e.id,a,{...n,replyToMessageId:void 0}),Object(s.g)(t)}return}let c=Object(s.e)();c=Object(r.J)(c,e.id,t,n.message),c=Object(r.e)(c,Object(d.c)(n.users,"id")),Object(s.g)(c)}(b,c,l)}),Object(s.b)("sendMessage",(e,t,a)=>{const s=Object(o.x)(e);if(!s)return;const{chatId:c,threadId:r,type:i}=s;if("scheduled"===i&&!a.scheduledAt)return{...e,messages:{...e.messages,contentToBeScheduled:a}};const l=Object(o.f)(e,c);t.setReplyingToId({messageId:void 0});const b={...a,chat:l,replyingTo:Object(o.hb)(e,c,r)},u=!a.attachments||a.attachments.length<=1,m=!u&&a.attachments&&a.attachments.length>1;if(u){const{attachments:e,...t}=b;N({...t,attachment:e?e[0]:void 0})}else if(m){const{text:e,entities:t,attachments:a,...s}=b,c=Object(d.n)(a,n.D);for(let a=0;a0?o:void 0}),r.forEach(e=>{N({...s,attachment:e,groupedId:o})})}}else{const{text:e,entities:t,attachments:a,replyingTo:s,...n}=b;e&&N({...n,text:e,entities:t,replyingTo:s}),a.forEach(e=>{N({...n,attachment:e})})}}),Object(s.b)("editMessage",(e,t,a)=>{const{text:s,entities:n}=a,c=Object(o.x)(e);if(!c)return;const{chatId:r,threadId:i,type:l}=c,d=Object(o.f)(e,r),b=Object(o.C)(e,r,i,l);d&&b&&(Object(j.a)("editMessage",{chat:d,message:b,text:s,entities:n}),t.setEditingId({messageId:void 0}))}),Object(s.b)("cancelSendingMessage",(e,t,a)=>{const{chatId:s,messageId:n}=a,c=Object(o.k)(e,s,n),r=c&&M.get(c.previousLocalId||c.id);r&&Object(j.b)(r),t.apiUpdate({"@type":"deleteMessages",ids:[n],chatId:s})}),Object(s.b)("saveDraft",(e,t,a)=>{const{chatId:s,threadId:n,draft:c}=a;if(!c)return;const{text:l,entities:d}=c,b=Object(o.f)(e,s);return n===i.MAIN_THREAD_ID&&Object(j.a)("saveDraft",{chat:b,text:l,entities:d,replyToMsgId:Object(o.hb)(e,s,n)}),Object(r.v)(e,s,n,"draft",c)}),Object(s.b)("clearDraft",(e,t,a)=>{const{chatId:s,threadId:n,localOnly:c}=a;if(!Object(o.A)(e,s,n))return;const l=Object(o.f)(e,s);return c||n!==i.MAIN_THREAD_ID||Object(j.a)("clearDraft",l),Object(r.v)(e,s,n,"draft",void 0)}),Object(s.b)("pinMessage",(e,t,a)=>{const s=Object(o.q)(e);if(!s)return;const{messageId:n,isUnpin:c,isOneSide:r,isSilent:i}=a;Object(j.a)("pinMessage",{chat:s,messageId:n,isUnpin:c,isOneSide:r,isSilent:i})}),Object(s.b)("unpinAllMessages",(e,t,a)=>{const n=Object(o.f)(e,a.chatId);n&&async function(e){await Object(j.a)("unpinAllMessages",{chat:e});let t=Object(s.e)();t=Object(r.v)(t,e.id,i.MAIN_THREAD_ID,"pinnedIds",[]),Object(s.g)(t)}(n)}),Object(s.b)("deleteMessages",(e,t,a)=>{const{messageIds:s,shouldDeleteForAll:n}=a,c=Object(o.x)(e);if(!c)return;const{chatId:r,threadId:i}=c,l=Object(o.f)(e,r);Object(j.a)("deleteMessages",{chat:l,messageIds:s,shouldDeleteForAll:n});const d=Object(o.B)(e,r,i);s.includes(d)&&t.setEditingId({messageId:void 0})}),Object(s.b)("deleteScheduledMessages",(e,t,a)=>{const{messageIds:s}=a,n=Object(o.x)(e);if(!n)return;const{chatId:c}=n,r=Object(o.f)(e,c);Object(j.a)("deleteScheduledMessages",{chat:r,messageIds:s});const i=Object(o.D)(e,c);s.includes(i)&&t.setEditingId({messageId:void 0})}),Object(s.b)("deleteHistory",(e,t,a)=>{const{chatId:s,maxId:n,shouldDeleteForAll:c}=a,r=Object(o.f)(e,s);r&&Object(j.a)("deleteHistory",{chat:r,shouldDeleteForAll:c,maxId:n})}),Object(s.b)("markMessageListRead",(e,t,a)=>{const s=Object(o.x)(e);if(!s)return;const{chatId:n,threadId:c}=s,r=Object(o.yb)(e,n,c);if(!r)return;const{maxId:i}=a;Object(j.a)("markMessageListRead",{chat:r,threadId:c,maxId:i})}),Object(s.b)("markMessagesRead",(e,t,a)=>{const s=Object(o.q)(e);if(!s)return;const{messageIds:n}=a;Object(j.a)("markMessagesRead",{chat:s,messageIds:n})}),Object(s.b)("loadWebPagePreview",(e,t,a)=>{const{text:n}=a;!async function(e){const t=await Object(j.a)("fetchWebPagePreview",{message:e});Object(s.g)({...Object(s.e)(),webPagePreview:t})}(n)}),Object(s.b)("clearWebPagePreview",e=>{if(e.webPagePreview)return{...e,webPagePreview:void 0}}),Object(s.b)("sendPollVote",(e,t,a)=>{const{chatId:s,messageId:n,options:c}=a,r=Object(o.f)(e,s);r&&Object(j.a)("sendPollVote",{chat:r,messageId:n,options:c})}),Object(s.b)("loadPollOptionResults",(e,t,a)=>{const{chat:n,messageId:c,option:o,offset:i,limit:l,shouldResetVoters:b}=a;!async function(e,t,a,n,c,o){const i=await Object(j.a)("loadPollOptionResults",{chat:e,messageId:t,option:a,offset:n,limit:c});if(!i)return;let l=Object(s.e)();l=Object(r.e)(l,Object(d.c)(i.users,"id"));const{voters:b}=l.pollResults;Object(s.g)({...l,pollResults:{...l.pollResults,voters:{...b,[a]:[...!o&&b&&b[a]?b[a]:[],...i&&i.users.map(e=>e.id)].filter((e,t,a)=>a.indexOf(e)===t)},offsets:{...l.pollResults.offsets?l.pollResults.offsets:{},[a]:i.nextOffset||""}}})}(n,c,o,i,l,b)}),Object(s.b)("forwardMessages",e=>{const{fromChatId:t,messageIds:a,toChatId:n}=e.forwardMessages,c=t?Object(o.f)(e,t):void 0,r=n?Object(o.f)(e,n):void 0,i=t&&a?a.sort((e,t)=>e-t).map(a=>Object(o.k)(e,t,a)).filter(Boolean):void 0;c&&r&&i&&i.length&&function(e,t,a){Object(j.a)("forwardMessages",{fromChat:e,toChat:t,messages:a}),Object(s.g)({...Object(s.e)(),forwardMessages:{}})}(c,r,i)}),Object(s.b)("loadScheduledHistory",e=>{const t=Object(o.q)(e);if(!t)return;const{hash:a}=e.scheduledMessages.byChatId[t.id]||{};!async function(e,t){const a=await Object(j.a)("fetchScheduledHistory",{chat:e,hash:t});if(!a)return;const{hash:n,messages:c}=a,o=Object(d.c)(c,"id"),l=Object.keys(o).map(Number).sort((e,t)=>t-e);let b=Object(s.e)();b=Object(r.t)(b,e.id,o,n),b=Object(r.v)(b,e.id,i.MAIN_THREAD_ID,"scheduledIds",l),Object(s.g)(b)}(t,a)}),Object(s.b)("sendScheduledMessages",(e,t,a)=>{const{chatId:s,id:n}=a,c=Object(o.f)(e,s);c&&Object(j.a)("sendScheduledMessages",{chat:c,ids:[n]})}),Object(s.b)("rescheduleMessage",(e,t,a)=>{const{chatId:s,messageId:n,scheduledAt:c}=a,r=Object(o.f)(e,s),i=r&&Object(o.kb)(e,r.id,n);r&&i&&Object(j.a)("rescheduleMessage",{chat:r,message:i,scheduledAt:c})}),Object(s.b)("requestThreadInfoUpdate",(e,t,a)=>{const{chatId:s,threadId:n}=a,c=Object(o.yb)(e,s,n);c&&Object(j.a)("requestThreadInfoUpdate",{chat:c,threadId:n})}),Object(s.b)("loadPinnedMessages",(e,t,a)=>{const{chatId:n}=a,c=Object(o.f)(e,n);c&&async function(e){const t=await Object(j.a)("fetchPinnedMessages",{chat:e});if(!t)return;const{messages:a,chats:n,users:c}=t,o=Object(d.c)(a,"id"),l=Object.keys(o).map(Number).sort((e,t)=>t-e);let b=Object(s.e)();b=Object(r.b)(b,e.id,o),b=Object(r.v)(b,e.id,i.MAIN_THREAD_ID,"pinnedIds",l),b=Object(r.e)(b,Object(d.c)(c,"id")),b=Object(r.c)(b,Object(d.c)(n,"id")),Object(s.g)(b)}(c)}),Object(s.b)("loadMessageLink",(e,t,a)=>{const{messageId:s,chatId:n}=a,c=Object(o.f)(e,n),r=Object(o.k)(e,n,s);c&&r&&(async()=>{const e=await Object(j.a)("fetchMessageLink",{chat:c,message:r});e&&Object(E.c)(e.link)})()});var P=a(46);const T=Object(g.g)(e=>e(),500,!1);async function A(e,t){const a=await Object(j.a)("searchGifs",{query:e,offset:t});a&&Object(s.g)(Object(r.O)(Object(s.e)(),!t,a.gifs,a.nextOffset))}Object(s.b)("loadStickerSets",e=>{const{hash:t}=e.stickers.added||{};!async function(e=0){const t=await Object(j.a)("fetchStickerSets",{hash:e});if(!t)return;Object(s.g)(Object(r.gb)(Object(s.e)(),"added",t.hash,t.sets))}(t)}),Object(s.b)("loadAddedStickers",(e,t)=>{const{setIds:a}=e.stickers.added;a&&a.length&&(async()=>{for(let e=0;e0&&await Object(g.e)(500)})()}),Object(s.b)("loadRecentStickers",e=>{const{hash:t}=e.stickers.recent||{};!async function(e=0){const t=await Object(j.a)("fetchRecentStickers",{hash:e});if(!t)return;const a=Object(s.e)();Object(s.g)({...a,stickers:{...a.stickers,recent:t}})}(t)}),Object(s.b)("loadFavoriteStickers",e=>{const{hash:t}=e.stickers.favorite||{};!async function(e=0){const t=await Object(j.a)("fetchFavoriteStickers",{hash:e});if(!t)return;const a=Object(s.e)();Object(s.g)({...a,stickers:{...a.stickers,favorite:t}})}(t)}),Object(s.b)("loadFeaturedStickers",e=>{const{hash:t}=e.stickers.featured||{};!async function(e=0){const t=await Object(j.a)("fetchFeaturedStickers",{hash:e});if(!t)return;Object(s.g)(Object(r.gb)(Object(s.e)(),"featured",t.hash,t.sets))}(t)}),Object(s.b)("loadStickers",(e,t,a)=>{const{stickerSetId:n}=a;let{stickerSetAccessHash:c}=a;if(!c){const t=Object(o.sb)(e,n);if(!t)return;c=t.accessHash}!async function(e,t){const a=await Object(j.a)("fetchStickers",{stickerSetId:e,accessHash:t});if(!a)return;const{set:n,stickers:c,packs:o}=a;let i=Object(s.e)();i=Object(r.fb)(i,n.id,{...n,stickers:c,packs:o});const l=i.stickers.forEmoji.emoji;l&&o[l]&&(i=Object(r.n)(i));Object(s.g)(i)}(n,c)}),Object(s.b)("loadAnimatedEmojis",()=>{!async function(){const e=await Object(j.a)("fetchAnimatedEmojis");if(!e)return;const{set:t,stickers:a}=e;Object(s.g)(Object(r.p)(Object(s.e)(),{...t,stickers:a}))}()}),Object(s.b)("loadSavedGifs",e=>{const{hash:t}=e.gifs.saved;!async function(e=0){const t=await Object(j.a)("fetchSavedGifs",{hash:e});if(!t)return;const a=Object(s.e)();Object(s.g)({...a,gifs:{...a.gifs,saved:t}})}(t)}),Object(s.b)("faveSticker",(e,t,a)=>{const{sticker:s}=a;s&&Object(j.a)("faveSticker",{sticker:s})}),Object(s.b)("unfaveSticker",(e,t,a)=>{const{sticker:n}=a;n&&function(e){const t=Object(s.e)();Object(s.g)({...t,stickers:{...t.stickers,favorite:{...t.stickers.favorite,stickers:t.stickers.favorite.stickers.filter(({id:t})=>t!==e.id)}}}),Object(j.a)("faveSticker",{sticker:e,unfave:!0})}(n)}),Object(s.b)("toggleStickerSet",(e,t,a)=>{const{stickerSetId:s}=a,n=Object(o.sb)(e,s);if(!n)return;const{accessHash:c,installedDate:r}=n;Object(j.a)(r?"uninstallStickerSet":"installStickerSet",{stickerSetId:s,accessHash:c})}),Object(s.b)("setStickerSearchQuery",(e,t,a)=>{const{query:n}=a;n&&T(()=>{!async function(e,t=0){const a=await Object(j.a)("searchStickers",{query:e,hash:t});if(!a)return;const n=Object(s.e)(),{setsById:c,added:o}=n.stickers,i=a.sets.map(({id:e})=>e);o.setIds&&o.setIds.forEach(t=>{if(!i.includes(t)){const{title:a}=c[t]||{};a&&Object(P.a)(a,e)&&i.unshift(t)}});Object(s.g)(Object(r.gb)(n,"search",a.hash,a.sets,i))}(n)})}),Object(s.b)("setGifSearchQuery",(e,t,a)=>{const{query:s}=a;"string"==typeof s&&T(()=>{A(s)})}),Object(s.b)("searchMoreGifs",e=>{const{query:t,offset:a}=e.gifs.search;"string"==typeof t&&T(()=>{A(t,a)})}),Object(s.b)("loadStickersForEmoji",(e,t,a)=>{const{emoji:n}=a,{hash:c}=e.stickers.forEmoji;T(()=>{!async function(e,t=0){let a=Object(s.e)();Object(s.g)({...a,stickers:{...a.stickers,forEmoji:{...a.stickers.forEmoji,emoji:e}}});const n=await Object(j.a)("fetchStickersForEmoji",{emoji:e,hash:t});if(a=Object(s.e)(),!n||a.stickers.forEmoji.emoji!==e)return;a=Object(r.hb)(a,e,n.stickers,n.hash),Object(s.g)(a)}(n,c)})}),Object(s.b)("clearStickersForEmoji",e=>({...e,stickers:{...e.stickers,forEmoji:{}}}));var x=a(28);const L=Object(g.g)(e=>e(),500,!1);async function R(e="",t,a,c,i,l){let b;if(c){const s=await Object(j.a)("searchMessagesLocal",{chatOrUser:c,query:e,type:t,limit:n.s,offsetId:a,minDate:l,maxDate:i});if(s){const{messages:e,users:t,totalCount:a,nextOffsetId:n}=s;b={messages:e,users:t,chats:[],totalCount:a,nextRate:n}}}else b=await Object(j.a)("searchMessagesGlobal",{query:e,offsetRate:a,limit:n.s,type:t,maxDate:i,minDate:l});let u=Object(s.e)();const m=Object(o.s)(u);if(!b||""!==e&&e!==m)return void Object(s.g)(Object(r.R)(u,{messages:!1}));const{messages:h,users:O,chats:g,totalCount:f,nextRate:p}=b;g.length&&(u=Object(r.c)(u,Object(d.c)(g,"id"))),O.length&&(u=Object(r.e)(u,Object(d.c)(O,"id"))),h.length&&(u=Object(r.d)(u,h)),u=Object(r.S)(u,h,f,t,p),Object(s.g)(u)}async function F(){const e=await Object(j.a)("fetchChats",{limit:n.h,archived:!0,withPinned:!0});if(!e)return;let t=Object(s.e)();t=Object(r.mb)(t,Object(d.c)(e.users,"id")),t=Object(r.K)(t,Object(d.c)(e.chats,"id")),t=Object(r.q)(t,"archived",e.chatIds),t=Object(r.H)(t,"archived",e),Object(s.g)(t)}async function B(){let e=Object(s.e)();const{recentlyFoundChatIds:t}=e.globalSearch,{userIds:a}=e.contactList||{};if(!(a&&a.length||t&&t.length))return;const n=[...t||[],...a||[]].map(t=>Object(o.Bb)(e,t)).filter(Boolean),c=await Object(j.a)("fetchUsers",{users:n});c&&(e=Object(s.e)(),e=Object(r.mb)(e,Object(d.c)(c,"id")),Object(s.g)(e))}Object(s.b)("setGlobalSearchQuery",(e,t,a)=>{const{chatId:c}=e.globalSearch,{query:i}=a;i&&!c&&L(()=>{!async function(e){const t=await Object(j.a)("searchChats",{query:e,limit:n.s});let a=Object(s.e)();const c=Object(o.s)(a);if(!t||!c||e!==c)return void Object(s.g)(Object(r.R)(a,{chats:!1}));const{localChats:i,localUsers:l,globalChats:b,globalUsers:u}=t;(i.length||b.length)&&(a=Object(r.c)(a,Object(d.c)([...i,...b],"id")));(l.length||u.length)&&(a=Object(r.e)(a,Object(d.c)([...l,...u],"id")));a=Object(r.R)(a,{chats:!1}),a=Object(r.P)(a,{localResults:{chats:i,users:l},globalResults:{...a.globalSearch.globalResults,chats:b,users:u}}),Object(s.g)(a)}(i)})}),Object(s.b)("setGlobalSearchDate",(e,t,a)=>{const{date:n}=a,c=n?Object(x.m)(n):n,i=Object(r.P)(e,{date:n,query:"",resultsByType:{...e.globalSearch.resultsByType,text:{totalCount:void 0,foundIds:[],nextOffsetId:0}}});Object(s.g)(i);const{chatId:l}=e.globalSearch;R("","text",void 0,l?Object(o.f)(e,l):void 0,c,n)}),Object(s.b)("searchMessagesGlobal",(e,t,a)=>{const{query:s,resultsByType:n,chatId:c,date:r}=e.globalSearch,i=r?Object(x.m)(r):r,{type:l}=a,{nextOffsetId:d}=n&&n[l]||{};R(s,l,d,c?Object(o.f)(e,c):void 0,i,r)}),Object(s.b)("searchTextMessagesLocal",e=>{const{chatId:t,threadId:a}=Object(o.x)(e)||{},c=t?Object(o.f)(e,t):void 0,l=Object(o.z)(e);if(!c||!l||!a)return;const{query:b,results:u}=l,m=u?u.nextOffsetId:void 0;let h;if(a!==i.MAIN_THREAD_ID){const s=Object(o.xb)(e,t,a);h=s?s.topMessageId:void 0}!async function(e,t,a,c,i){const l=await Object(j.a)("searchMessagesLocal",{chatOrUser:e,type:"text",query:c,topMessageId:a,limit:n.N,offsetId:i});if(!l)return;const{messages:b,users:u,totalCount:m,nextOffsetId:h}=l,O=Object(d.c)(b,"id"),g=Object.keys(O).map(Number);let f=Object(s.e)();const p=Object(o.z)(f);if(!p||c&&c!==p.query)return;f=Object(r.b)(f,e.id,O),f=Object(r.e)(f,Object(d.c)(u,"id")),f=Object(r.X)(f,e.id,t,g,m,h),Object(s.g)(f)}(c,a,h,b,m)}),Object(s.b)("searchMediaMessagesLocal",e=>{const t=Object(o.v)(e),a=t?e.users.byId[t]||e.chats.byId[t]:void 0,c=Object(o.u)(e);if(!a||!c)return;const{currentType:i,resultsByType:l}=c,b=i&&l&&l[i],u=b?b.nextOffsetId:void 0;i&&async function(e,t,a){const c=await Object(j.a)("searchMessagesLocal",{chatOrUser:e,type:t,limit:n.ab,offsetId:a});if(!c)return;const{messages:i,users:l,totalCount:b,nextOffsetId:u}=c,m=Object(d.c)(i,"id"),h=Object.keys(m).map(Number);let O=Object(s.e)();if(!Object(o.u)(O))return;O=Object(r.b)(O,e.id,m),O=Object(r.e)(O,Object(d.c)(l,"id")),O=Object(r.U)(O,e.id,t,h,b,u),Object(s.g)(O)}(a,i,u)}),Object(s.b)("searchMessagesByDate",(e,t,a)=>{const{timestamp:n}=a,{chatId:c}=Object(o.x)(e)||{};if(!c)return;const r=Object(o.f)(e,c);r&&async function(e,t){const a=await Object(j.a)("findFirstMessageIdAfterDate",{chat:e,timestamp:t});if(!a)return;Object(s.d)().focusMessage({chatId:e.id,messageId:a})}(r,n)}),Object(s.b)("checkPublicLink",(e,t,a)=>{const{chatId:n}=Object(o.x)(e)||{};if(!n)return;if(e.management.progress===l.f.InProgress)return;const{username:c}=a;(async()=>{e=Object(r.Z)(e,l.f.InProgress),e=Object(r.Y)(e,n,{isUsernameAvailable:void 0}),Object(s.g)(e);const t=await Object(j.a)("checkChatUsername",{username:c});e=Object(s.e)(),e=Object(r.Z)(e,t?l.f.Complete:l.f.Error),e=Object(r.Y)(e,n,{isUsernameAvailable:t}),Object(s.g)(e)})()}),Object(s.b)("updatePublicLink",(e,t,a)=>{const{chatId:n}=Object(o.x)(e)||{};let c=n&&Object(o.f)(e,n);if(!n||!c)return;const{username:i}=a;(async()=>{if(e=Object(r.Z)(e,l.f.InProgress),Object(s.g)(e),Object(m.ib)(c)){if(c=await Object(j.a)("migrateChat",c),!c)return;t.openChat({id:c.id})}const a=await Object(j.a)("setChatUsername",{chat:c,username:i});e=Object(s.e)(),e=Object(r.Z)(e,a?l.f.Complete:l.f.Error),e=Object(r.Y)(e,n,{isUsernameAvailable:void 0}),Object(s.g)(e)})()}),Object(s.b)("updatePrivateLink",e=>{const{chatId:t}=Object(o.x)(e)||{},a=t&&Object(o.f)(e,t);t&&a&&Object(j.a)("updatePrivateLink",{chat:a})}),Object(s.b)("sync",(e,t)=>{!async function(e){n.l&&console.log(">>> START SYNC");await Object(j.a)("fetchCurrentUser");const t=await async function(){const e=await Object(j.a)("fetchChats",{limit:n.h,withPinned:!0});if(!e)return;let t=Object(s.e)();const{recentlyFoundChatIds:a}=t.globalSearch,{userIds:c}=t.contactList||{},{currentUserId:l}=t,b=[...a||[],...c||[],...l?[l]:[]],u=b.map(e=>Object(o.Bb)(t,e)).filter(Boolean),h=b.map(e=>Object(o.f)(t,e)).filter(Boolean),{chatId:O}=Object(o.x)(t)||{};if(O){const e=Object(o.f)(t,O);if(e&&!b.includes(O)&&h.push(e),Object(m.lb)(O)){const e=Object(o.Bb)(t,O);e&&!b.includes(O)&&u.push(e)}}u.push(...e.users),h.push(...e.chats),t=Object(r.r)(t,Object(d.c)(h,"id")),t=Object(r.q)(t,"active",e.chatIds),t={...t,chats:{...t.chats}},t=Object(r.H)(t,"active",e),Object.keys(e.draftsById).map(Number).forEach(a=>{t=Object(r.v)(t,a,i.MAIN_THREAD_ID,"draft",e.draftsById[a])}),Object.keys(e.replyingToById).map(Number).forEach(a=>{t=Object(r.v)(t,a,i.MAIN_THREAD_ID,"replyingToId",e.replyingToById[a])}),Object(s.g)(t),O&&!t.chats.byId[O]&&Object(s.d)().openChat({id:void 0});return u}();await async function(e){let t=!1,a=e||[],c=Object(s.e)();const{chatId:l}=Object(o.x)(c)||{},b=Object.keys(c.messages.byChatId).map(Number).reduce((e,t)=>{const a=Object(o.A)(c,t,i.MAIN_THREAD_ID);return a?{...e,[t]:a}:e},{});if(l){const e=await(u=c.chats.byId[l],Object(j.a)("fetchMessages",{chat:u,threadId:i.MAIN_THREAD_ID,offsetId:u.lastReadInboxMessageId,addOffset:-(Math.round(n.L/2)+1),limit:n.L}));c=Object(s.e)();const{chatId:b}=Object(o.x)(c)||{};if(e&&b===l){const s=c.messages.byChatId[l],n=Object(d.c)(e.messages,"id"),o=Object.keys(n).map(Number);c={...c,messages:{...c.messages,byChatId:{[l]:{byId:n,threadsById:{[i.MAIN_THREAD_ID]:{...s&&s.threadsById[i.MAIN_THREAD_ID],listedIds:o,viewportIds:o,outlyingIds:void 0}}}}}},c=Object(r.K)(c,Object(d.c)(e.chats,"id")),c=Object(r.jb)(c,l,e.threadInfos),t=!0,a=Array.prototype.concat(a,e.users)}}var u;t||(c={...c,messages:{...c.messages,byChatId:{}}});Object.keys(b).map(Number).forEach(e=>{c=Object(r.v)(c,e,i.MAIN_THREAD_ID,"draft",b[e])}),e?c=Object(r.w)(c,Object(d.c)(a,"id")):a&&(c=Object(r.mb)(c,Object(d.c)(a,"id")));Object(s.g)(c)}(t),Object(s.g)({...Object(s.e)(),lastSyncTime:Date.now()}),n.l&&console.log(">>> FINISH SYNC");e()}(t.afterSync)}),Object(s.b)("afterSync",(e,t)=>{!async function(e){n.l&&console.log(">>> START AFTER-SYNC");e.loadFavoriteStickers(),await Promise.all([B(),F()]),await Object(j.a)("fetchCurrentUser"),n.l&&console.log(">>> FINISH AFTER-SYNC")}(t)});const D=Object(g.a)(e=>e(),500,!1,!0);function U(e,{visibility:t,allowedIds:a,deniedIds:s}){const{users:{byId:n},chats:{byId:c}}=e,r={visibility:t};let o,i;const l=e=>{if(!Object(m.lb)(e))return;const{id:t,accessHash:a}=n[e]||{};return t?{id:t,accessHash:a}:void 0},d=e=>{if(Object(m.lb)(e))return;const t=c[e];return t?{id:t.id}:void 0};return"contacts"!==t&&"nobody"!==t||(o=a.map(l).filter(Boolean),i=a.map(d).filter(Boolean),o.length>0&&(r.allowedUsers=o),i.length>0&&(r.allowedChats=i)),"everybody"!==t&&"contacts"!==t||(o=s.map(l).filter(Boolean),i=s.map(d).filter(Boolean),o.length>0&&(r.blockedUsers=o),i.length>0&&(r.blockedChats=i)),r}Object(s.b)("loadFullUser",(e,t,a)=>{const{userId:s}=a,n=Object(o.Bb)(e,s);if(!n)return;const{id:c,accessHash:r}=n;D(()=>Object(j.a)("fetchFullUser",{id:c,accessHash:r}))}),Object(s.b)("loadUser",(e,t,a)=>{const{userId:n}=a,c=Object(o.Bb)(e,n);c&&(async()=>{const t=await Object(j.a)("fetchUsers",{users:[c]});t&&(e=Object(s.e)(),e=Object(r.mb)(e,Object(d.c)(t,"id")),Object(s.g)(e))})()}),Object(s.b)("loadTopUsers",e=>{const{hash:t,lastRequestedAt:a}=e.topPeers;(!a||Date.now()-a>6e4)&&async function(e){const t=await Object(j.a)("fetchTopUsers",{hash:e});if(!t)return;const{hash:a,ids:n,users:c}=t;let o=Object(s.e)();o=Object(r.e)(o,Object(d.c)(c,"id")),o={...o,topPeers:{...o.topPeers,hash:a,userIds:n,lastRequestedAt:Date.now()}},Object(s.g)(o)}(t)}),Object(s.b)("loadContactList",e=>{const{hash:t}=e.contactList||{};!async function(e){const t=await Object(j.a)("fetchContactList",{hash:e});if(!t)return;let a=Object(r.e)(Object(s.e)(),Object(d.c)(t.users,"id"));a=Object(r.c)(a,Object(d.c)(t.chats,"id"));const n=e=>e.lastName||e.firstName||"",c=new Intl.Collator("en-US"),o=t.users.sort((e,t)=>c.compare(n(e),n(t))).filter(e=>!e.isSelf);Object(s.g)({...a,contactList:{hash:t.hash,userIds:o.map(e=>e.id)}})}(t)}),Object(s.b)("loadCurrentUser",()=>{Object(j.a)("fetchCurrentUser")}),Object(s.b)("updateContact",(e,t,a)=>{const{userId:n,isMuted:c,firstName:i,lastName:d}=a;!async function(e,t,a,n){const c=Object(s.e)(),i=Object(o.Bb)(c,e);if(!i)return;Object(s.d)().updateChatMutedState({chatId:e,isMuted:t}),Object(s.g)(Object(r.Z)(Object(s.e)(),l.f.InProgress));await Object(j.a)("updateContact",{phone:i.phoneNumber,firstName:a,lastName:n})&&Object(s.g)(Object(r.lb)(Object(s.e)(),i.id,{firstName:a,lastName:n}));Object(s.g)(Object(r.Z)(Object(s.e)(),l.f.Complete))}(n,c,i,d)}),Object(s.b)("deleteUser",(e,t,a)=>{const{userId:n}=a;!async function(e){const t=Object(s.e)(),a=Object(o.Bb)(t,e);if(!a)return;const{id:n,accessHash:c}=a;await Object(j.a)("deleteUser",{id:n,accessHash:c})}(n)}),Object(s.b)("clickInlineButton",(e,t,a)=>{const{button:c}=a;switch(c.type){case"command":t.sendBotCommand({command:c.value});break;case"url":c.value.match(n.V)?t.openTelegramLink({url:c.value}):window.open(c.value);break;case"callback":{const t=Object(o.q)(e);if(!t)return;!async function(e,t,a){const n=await Object(j.a)("answerCallbackButton",{chatId:e.id,accessHash:e.accessHash,messageId:t,data:a});if(!n||!n.message)return;const{message:c,alert:r}=n;r?Object(s.d)().showError({error:{message:c}}):Object(s.d)().showNotification({message:c})}(t,c.messageId,c.value);break}case"requestPoll":t.openPollModal();break;case"buy":{const a=Object(o.q)(e),{messageId:s,value:n}=c;if(!a)return;n?t.getReceipt({receiptMessageId:n,chatId:a.id,messageId:s}):(t.getPaymentForm({messageId:s}),t.setInvoiceMessageInfo(Object(o.k)(e,a.id,s)),t.openPaymentModal({messageId:s}));break}}}),Object(s.b)("sendBotCommand",(e,t,a)=>{const{command:s}=a,{currentUserId:n}=e,c=Object(o.q)(e);n&&c&&async function(e,t,a){await Object(j.a)("sendMessage",{chat:e,text:a})}(c,0,s)}),Object(s.b)("updateProfile",(e,t,a)=>{const{photo:n,firstName:c,lastName:i,bio:d,username:b}=a;(async()=>{const{currentUserId:t}=e;if(t){if(Object(s.g)({...Object(s.e)(),profileEdit:{progress:l.j.InProgress}}),n&&await Object(j.a)("updateProfilePhoto",n),c||i||d){if(await Object(j.a)("updateProfile",{firstName:c,lastName:i,about:d})){e=Object(s.e)();const a=t&&Object(o.Bb)(e,t);a&&Object(s.g)(Object(r.lb)(e,a.id,{firstName:c,lastName:i,fullInfo:{...a.fullInfo,bio:d}}))}}if(b){await Object(j.a)("updateUsername",b)&&t&&Object(s.g)(Object(r.lb)(Object(s.e)(),t,{username:b}))}Object(s.g)({...Object(s.e)(),profileEdit:{progress:l.j.Complete}})}})()}),Object(s.b)("checkUsername",(e,t,a)=>{const{username:n}=a;(async()=>{if(e.profileEdit&&e.profileEdit.progress===l.j.InProgress)return;Object(s.g)({...e,profileEdit:{progress:e.profileEdit?e.profileEdit.progress:l.j.Idle,isUsernameAvailable:void 0}});const t=await Object(j.a)("checkUsername",n);e=Object(s.e)(),Object(s.g)({...e,profileEdit:{...e.profileEdit,isUsernameAvailable:t}})})()}),Object(s.b)("loadWallpapers",()=>{(async()=>{const e=await Object(j.a)("fetchWallpapers",0);if(!e)return;const t=Object(s.e)();Object(s.g)({...t,settings:{...t.settings,loadedWallpapers:e.wallpapers}})})()}),Object(s.b)("uploadWallpaper",(e,t,a)=>{const n=a,c=URL.createObjectURL(n);Object(s.g)({...e,settings:{...e.settings,loadedWallpapers:[{slug:l.n,document:{fileName:"",size:n.size,mimeType:n.type,previewBlobUrl:c}},...e.settings.loadedWallpapers||[]]}}),(async()=>{const t=await Object(j.a)("uploadWallpaper",n);if(!t)return;const{wallpaper:a}=t;if(!(e=Object(s.e)()).settings.loadedWallpapers)return;const r=e.settings.loadedWallpapers[0];if(!r||r.slug!==l.n)return;const o={...a,document:{...a.document,previewBlobUrl:c}};Object(s.g)({...e,settings:{...e.settings,loadedWallpapers:[o,...e.settings.loadedWallpapers.slice(1)]}})})()}),Object(s.b)("loadBlockedContacts",()=>{(async()=>{const e=await Object(j.a)("fetchBlockedContacts");if(!e)return;let t=Object(s.e)();e.users&&e.users.length&&(t=Object(r.e)(t,Object(d.c)(e.users,"id"))),e.chats&&e.chats.length&&(t=Object(r.K)(t,Object(d.c)(e.chats,"id"))),t={...t,blocked:{...t.blocked,ids:[...t.blocked.ids||[],...e.blockedIds],totalCount:e.totalCount}},Object(s.g)(t)})()}),Object(s.b)("blockContact",(e,t,a)=>{const{contactId:n}=a;(async()=>{if(!await Object(j.a)("blockContact",n))return;const e=Object(s.e)();Object(s.g)(Object(r.a)(e,n))})()}),Object(s.b)("unblockContact",(e,t,a)=>{const{contactId:n}=a;let c;if(Object(m.lb)(n)){const t=Object(o.Bb)(e,n);if(!t)return;c=t.accessHash}(async()=>{if(!await Object(j.a)("unblockContact",n,c))return;const e=Object(s.e)();Object(s.g)(Object(r.o)(e,n))})()}),Object(s.b)("loadAuthorizations",()=>{(async()=>{const e=await Object(j.a)("fetchAuthorizations");e&&Object(s.g)({...Object(s.e)(),activeSessions:e})})()}),Object(s.b)("terminateAuthorization",(e,t,a)=>{const{hash:n}=a;(async()=>{if(!await Object(j.a)("terminateAuthorization",n))return;const e=Object(s.e)();Object(s.g)({...e,activeSessions:e.activeSessions.filter(e=>e.hash!==n)})})()}),Object(s.b)("terminateAllAuthorizations",()=>{(async()=>{if(!await Object(j.a)("terminateAllAuthorizations"))return;const e=Object(s.e)();Object(s.g)({...e,activeSessions:e.activeSessions.filter(e=>e.isCurrent)})})()}),Object(s.b)("loadNotificationsSettings",()=>{(async()=>{const e=await Object(j.a)("loadNotificationsSettings");e&&Object(s.g)(Object(r.u)(Object(s.e)(),e))})()}),Object(s.b)("updateNotificationSettings",(e,t,a)=>{const{peerType:n,isSilent:c,isShowPreviews:o}=a;(async()=>{await Object(j.a)("updateNotificationSettings",n,{isSilent:c,isShowPreviews:o})&&Object(s.g)(Object(r.ab)(Object(s.e)(),n,c,o))})()}),Object(s.b)("updateContactSignUpNotification",(e,t,a)=>{const{isSilent:n}=a;(async()=>{await Object(j.a)("updateContactSignUpNotification",n)&&Object(s.g)(Object(r.u)(Object(s.e)(),{hasContactJoinedNotifications:!n}))})()}),Object(s.b)("loadLanguages",()=>{(async()=>{const e=await Object(j.a)("fetchLanguages");e&&Object(s.g)(Object(r.u)(Object(s.e)(),{languages:e}))})()}),Object(s.b)("loadPrivacySettings",()=>{(async()=>{const[e,t,a,n,c]=await Promise.all([Object(j.a)("fetchPrivacySettings","phoneNumber"),Object(j.a)("fetchPrivacySettings","lastSeen"),Object(j.a)("fetchPrivacySettings","profilePhoto"),Object(j.a)("fetchPrivacySettings","forwards"),Object(j.a)("fetchPrivacySettings","chatInvite")]);if(!(e&&t&&a&&n&&c))return;const r=Object(s.e)();r.settings.privacy.phoneNumber=e,r.settings.privacy.lastSeen=t,r.settings.privacy.profilePhoto=a,r.settings.privacy.forwards=n,r.settings.privacy.chatInvite=c,Object(s.g)(r)})()}),Object(s.b)("setPrivacyVisibility",(e,t,a)=>{const{privacyKey:n,visibility:c}=a,{privacy:{[n]:r}}=e.settings;if(!r)return;const o=U(e,{visibility:c,allowedIds:[...r.allowUserIds,...r.allowChatIds],deniedIds:[...r.blockUserIds,...r.blockChatIds]});(async()=>{const e=await Object(j.a)("setPrivacySettings",n,o);if(e){const t=Object(s.e)();t.settings.privacy[n]=e,Object(s.g)(t)}})()}),Object(s.b)("setPrivacySettings",(e,t,a)=>{const{privacyKey:n,isAllowList:c,contactsIds:r}=a,{privacy:{[n]:o}}=e.settings;if(!o)return;const i=U(e,{visibility:o.visibility,allowedIds:c?r:[...o.allowUserIds,...o.allowChatIds],deniedIds:c?[...o.blockUserIds,...o.blockChatIds]:r});(async()=>{const e=await Object(j.a)("setPrivacySettings",n,i);if(e){const t=Object(s.e)();t.settings.privacy[n]=e,Object(s.g)(t)}})()}),Object(s.b)("loadPasswordInfo",()=>{(async()=>{const e=await Object(j.a)("getPasswordInfo");if(!e)return;let t=Object(s.e)();t=Object(r.u)(t,{hasPassword:e.hasPassword}),t=Object(r.kb)(t,{hint:e.hint}),Object(s.g)(t)})()}),Object(s.b)("checkPassword",(e,t,a)=>{const{currentPassword:n,onSuccess:c}=a;Object(s.g)(Object(r.kb)(e,{isLoading:!0,error:void 0})),(async()=>{const e=await Object(j.a)("checkPassword",n);Object(s.g)(Object(r.kb)(Object(s.e)(),{isLoading:!1})),e&&c()})()}),Object(s.b)("clearPassword",(e,t,a)=>{const{currentPassword:n,onSuccess:c}=a;Object(s.g)(Object(r.kb)(e,{isLoading:!0,error:void 0})),(async()=>{const e=await Object(j.a)("clearPassword",n);Object(s.g)(Object(r.kb)(Object(s.e)(),{isLoading:!1})),e&&c()})()}),Object(s.b)("updatePassword",(e,t,a)=>{const{currentPassword:n,password:c,hint:o,email:i,onSuccess:l}=a;Object(s.g)(Object(r.kb)(e,{isLoading:!0,error:void 0})),(async()=>{const e=await Object(j.a)("updatePassword",n,c,o,i);Object(s.g)(Object(r.kb)(Object(s.e)(),{isLoading:!1})),e&&l()})()}),Object(s.b)("updateRecoveryEmail",(e,t,a)=>{const{currentPassword:n,email:c,onSuccess:o}=a;Object(s.g)(Object(r.kb)(e,{isLoading:!0,error:void 0})),(async()=>{const e=await Object(j.a)("updateRecoveryEmail",n,c);Object(s.g)(Object(r.kb)(Object(s.e)(),{isLoading:!1,waitingEmailCodeLength:void 0})),e&&o()})()}),Object(s.b)("provideTwoFaEmailCode",(e,t,a)=>{const{code:s}=a;Object(j.a)("provideRecoveryEmailCode",s)}),Object(s.b)("clearTwoFaError",e=>Object(r.kb)(e,{error:void 0}));var H=a(54);Object(s.b)("validateRequestedInfo",(e,t,a)=>{const{requestInfo:n,saveInfo:c}=a,i=Object(o.cb)(e);i&&async function(e,t,a){const n=await Object(j.a)("validateRequestedInfo",{messageId:e,requestInfo:t,shouldSave:a});if(!n)return;const{id:c,shippingOptions:o}=n;if(!c)return;let i=Object(r.C)(Object(s.e)(),c);o?(i=Object(r.eb)(i,o),i=Object(r.A)(i,l.i.Shipping)):i=Object(r.A)(i,l.i.PaymentInfo);Object(s.g)(i)}(i,n,c)}),Object(s.b)("getPaymentForm",(e,t,a)=>{const{messageId:n}=a;n&&async function(e){const t=await Object(j.a)("getPaymentForm",{messageId:e});if(!t)return;let a=Object(r.z)(Object(s.e)(),t),n=l.i.PaymentInfo;a.payment.invoice&&(a.payment.invoice.shippingAddressRequested||a.payment.invoice.nameRequested||a.payment.invoice.phoneRequested||a.payment.invoice.emailRequested)&&(n=l.i.ShippingInfo);a=Object(r.A)(a,n),Object(s.g)(a)}(n)}),Object(s.b)("getReceipt",(e,t,a)=>{const{receiptMessageId:n,chatId:c,messageId:i}=a;i&&n&&c&&async function(e,t,a){const n=await Object(j.a)("getReceipt",t);if(!n)return;let c=Object(s.e)();const i=Object(o.k)(c,a,e);c=Object(r.B)(c,n,i),Object(s.g)(c)}(i,n,c)}),Object(s.b)("clearPaymentError",e=>{Object(s.g)({...e,payment:{...e.payment,error:void 0}})}),Object(s.b)("clearReceipt",e=>{Object(s.g)({...e,payment:{...e.payment,receipt:void 0}})}),Object(s.b)("sendCredentialsInfo",(e,t,a)=>{const n=Object(o.fb)(e);if(!n)return;const{credentials:c}=a,{data:i}=c;!async function(e,t){const a=function(e){const t=Object.keys(e).map(t=>`${t}=${e[t]}`).join("&");return t.length>0?"?"+t:""}({"card[number]":e.cardNumber,"card[exp_month]":e.expiryMonth,"card[exp_year]":e.expiryYear,"card[cvc]":e.cvv,"card[address_zip]":e.zip,"card[address_country]":e.country}),n=await fetch("https://api.stripe.com/v1/tokens"+a,{method:"POST",credentials:"same-origin",headers:{"Content-Type":"application/x-www-form-urlencoded",Authorization:"Bearer "+t}}),c=await n.json();if(c.error){const e=Object(H.b)(c.error),t=Object(s.e)();return void Object(s.g)({...t,payment:{...t.payment,error:{...e}}})}let o=Object(r.D)(Object(s.e)(),{type:c.type,id:c.id});o=Object(r.A)(o,l.i.Checkout),Object(s.g)(o)}(i,n)}),Object(s.b)("sendPaymentForm",(e,t,a)=>{const{shippingOptionId:n,saveCredentials:c}=a,i=Object(o.cb)(e),l=Object(o.db)(e),d=Object(o.fb)(e),b=Object(o.ub)(e);i&&d&&async function(e,t,a,n){if(await Object(j.a)("sendPaymentForm",{messageId:e,credentials:t,requestedInfoId:a,shippingOptionId:n})){const e=Object(r.g)(Object(s.e)());Object(s.g)(Object(r.h)(e))}}(i,{save:c,data:b},l,n)}),Object(s.b)("setPaymentStep",(e,t,a={})=>Object(r.A)(e,a.step||l.i.ShippingInfo)),Object(s.b)("setInvoiceMessageInfo",(e,t,a)=>Object(r.y)(e,a));a(76);Object(s.b)("apiUpdate",(e,t,a)=>{switch(a["@type"]){case"updateChat":Object(o.K)(e,a.id)||t.loadTopChats(),Object(s.g)(Object(r.F)(e,a.id,a.chat));break;case"updateChatJoin":{const n=Object(o.j)(e,a.id);if(!n)break;e=Object(r.G)(e,n,[a.id]),e=Object(r.F)(e,a.id,{isNotJoined:!1}),Object(s.g)(e);const c=Object(o.f)(e,a.id);c&&t.requestChatUpdate({chatId:c.id});break}case"updateChatLeave":{const t=Object(o.j)(e,a.id);if(!t)break;const{[t]:n}=e.chats.listIds;n&&(e=Object(r.q)(e,t,n.filter(e=>e!==a.id))),e=Object(r.F)(e,a.id,{isNotJoined:!0}),Object(s.g)(e);break}case"updateChatInbox":Object(s.g)(Object(r.F)(e,a.id,a.chat));break;case"updateChatTypingStatus":{const{id:t,typingStatus:n}=a;Object(s.g)(Object(r.F)(e,t,{typingStatus:n})),setTimeout(()=>{const e=Object(s.e)(),a=Object(o.f)(e,t);a&&n&&a.typingStatus&&a.typingStatus.timestamp===n.timestamp&&Object(s.g)(Object(r.F)(e,t,{typingStatus:void 0}))},6e3);break}case"newMessage":{if(a.message.senderId===e.currentUserId)return;const t=Object(o.f)(e,a.chatId);if(!t)return;Object(s.g)(Object(r.F)(e,a.chatId,{unreadCount:t.unreadCount?t.unreadCount+1:1,...a.message.hasUnreadMention&&{unreadMentionsCount:t.unreadMentionsCount?t.unreadMentionsCount+1:1}}));break}case"updateCommonBoxMessages":case"updateChannelMessages":{const{ids:t,messageUpdate:n}=a;if(!1!==n.hasUnreadMention)return;t.forEach(t=>{const s="channelId"in a?a.channelId:Object(o.p)(e,t),n=Object(o.f)(e,s);n&&n.unreadMentionsCount&&(e=Object(r.F)(e,s,{unreadMentionsCount:n.unreadMentionsCount-1}))}),Object(s.g)(e);break}case"updateChatFullInfo":{const{fullInfo:t}=a,n=e.chats.byId[a.id];if(!n)return;Object(s.g)(Object(r.F)(e,a.id,{fullInfo:{...n.fullInfo,...t}}));break}case"updatePinnedChatIds":{const{ids:t,folderId:c}=a,r=c===n.f?"archived":"active";e={...e,chats:{...e.chats,orderedPinnedIds:{...e.chats.orderedPinnedIds,[r]:t.length?t:void 0}}},Object(s.g)(e);break}case"updateChatPinned":{const{id:t,isPinned:c}=a,r=Object(o.j)(e,t);if(r){const{[r]:a}=e.chats.orderedPinnedIds;let s=a||[];if(c){if(!s.includes(t)){if("active"===r&&s.length>=n.C){const t=e.chats.listIds.active;s=s.filter(e=>t&&t.includes(e))}s=[t,...s]}}else s=s.filter(e=>e!==t);e={...e,chats:{...e.chats,orderedPinnedIds:{...e.chats.orderedPinnedIds,[r]:s.length?s:void 0}}}}Object(s.g)(e);break}case"updateChatListType":{const{id:t,folderId:n}=a;Object(s.g)(Object(r.I)(e,t,n));break}case"updateChatFolder":{const{id:t,folder:n}=a,{byId:c,orderedIds:r}=e.chatFolders,o=n?{...c,[t]:n}:Object(d.l)(c,Object.keys(c).map(Number).filter(e=>e!==t)),i=n?r&&r.includes(t)?r:[...r||[],t]:r?r.filter(e=>e!==t):void 0;Object(s.g)({...e,chatFolders:{...e.chatFolders,byId:o,orderedIds:i}});break}case"updateChatFoldersOrder":{const{orderedIds:t}=a;Object(s.g)({...e,chatFolders:{...e.chatFolders,orderedIds:t}});break}case"updateRecommendedChatFolders":{const{folders:t}=a;Object(s.g)({...e,chatFolders:{...e.chatFolders,recommended:t}});break}case"updateChatMembers":{const t=e.chats.byId[a.id],{replacedMembers:n,addedMember:c,deletedMemberId:o}=a;if(!t)return;let i=!1,l=t.fullInfo&&t.fullInfo.members?[...t.fullInfo.members]:[];if(n)l=n,i=!0;else if(c)l.length&&l.some(e=>e.userId===c.userId)||(l.push(c),i=!0);else if(l.length&&o){const e=l.findIndex(e=>e.userId===o);e>-1&&(l.slice(e,1),i=!0)}if(i){const n=l.filter(({isOwner:e,isAdmin:t})=>e||t);Object(s.g)(Object(r.F)(e,a.id,{membersCount:l.length,fullInfo:{...t.fullInfo,members:l,adminMembers:n}}))}break}}});function q(e,t,a,s,n=!1){const c=n?Object(o.kb)(e,t,a):Object(o.k)(e,t,a);if(c&&s.content){const{photo:e,video:t,sticker:a,document:n}=Object(m.v)(c);e&&s.content.photo?(s.content.photo.blobUrl=e.blobUrl,s.content.photo.thumbnail=e.thumbnail):t&&s.content.video?s.content.video.blobUrl=t.blobUrl:a&&s.content.sticker?s.content.sticker.isPreloadedGlobally=a.isPreloadedGlobally:n&&s.content.document&&(s.content.document.previewBlobUrl=n.previewBlobUrl)}return n?Object(r.cb)(e,t,a,s):Object(r.J)(e,t,a,s)}function G(e,t){const{id:a,chatId:s}=t;e=Object(r.T)(e,s,i.MAIN_THREAD_ID,[a]),Object(o.V)(e,s,i.MAIN_THREAD_ID)&&(e=Object(r.f)(e,s,i.MAIN_THREAD_ID,a));const{threadInfo:n,firstMessageId:c}=Object(o.wb)(e,s,t)||{};return!c&&Object(m.sb)(t)||n&&(e=Object(r.T)(e,s,n.threadId,[a]),Object(o.V)(e,s,n.threadId)&&(e=Object(r.f)(e,s,n.threadId,a),c||(e=Object(r.v)(e,s,n.threadId,"firstMessageId",t.id)),n.lastMessageId||(e=Object(r.v)(e,s,n.threadId,"threadInfo",{...n,lastMessageId:t.id})))),e}function _(e,t,a,s=!1){const{chats:n}=e,c=n.byId[t]&&n.byId[t].lastMessage;if(c&&!s){if(!(c.id===a.id||c.id===a.previousLocalId||a.id>c.id))return e}return Object(r.F)(e,t,{lastMessage:a})}function z(e,t){const a=Object(o.m)(e,t),s=Object(o.W)(e,t,i.MAIN_THREAD_ID);if(!a||!s)return;let n=s.length;for(;n--;){const e=a[s[n]];if(!e.isDeleting)return e}}function V(e,t,a,n){if(e){t.forEach(t=>{const a=z(n=Object(r.J)(n,e,t,{isDeleting:!0}),e);a&&(n=_(n,e,a,!0))}),Object(s.g)(n),a.requestChatUpdate({chatId:e});const c=[];return t.forEach(t=>{const a=Object(o.k)(n,e,t);if(!a)return;const{threadInfo:s}=Object(o.wb)(n,e,a)||{};s&&c.push(s.threadId)}),Object(d.o)(c).forEach(t=>{a.requestThreadInfoUpdate({chatId:e,threadId:t})}),void setTimeout(()=>{Object(s.g)(Object(r.i)(Object(s.e)(),e,t))},350)}const c=[];t.forEach(e=>{const t=Object(o.p)(n,e);if(t){c.push(t);const a=z(n=Object(r.J)(n,t,e,{isDeleting:!0}),t);a&&(n=_(n,t,a,!0)),setTimeout(()=>{Object(s.g)(Object(r.i)(Object(s.e)(),t,[e]))},350)}}),Object(s.g)(n),Object(d.o)(c).forEach(e=>{a.requestChatUpdate({chatId:e})})}Object(s.b)("apiUpdate",(e,t,a)=>{switch(a["@type"]){case"newMessage":{const{chatId:n,id:c,message:i}=a;e=G(e=q(e,n,c,i),i);if(Object(o.f)(e,n)){const t=Object(o.k)(e,n,c);e=_(e,n,t)}if(i.threadInfo&&(e=Object(r.ib)(e,i.threadInfo.chatId,i.threadInfo.threadId,i.threadInfo)),Object(s.g)(e),Object(o.a)(e,n,i)){!i.isOutgoing||i.content&&i.content.action||t.focusLastMessage();const{threadInfo:a}=Object(o.wb)(e,n,i)||{};a&&t.requestThreadInfoUpdate({chatId:n,threadId:a.threadId})}Object(o.K)(e,n)||t.loadTopChats();break}case"newScheduledMessage":{const{chatId:t,id:n,message:c}=a;e=q(e,t,n,c,!0);const l=Object(o.jb)(e,t)||[];e=Object(r.v)(e,t,i.MAIN_THREAD_ID,"scheduledIds",Object(d.o)([...l,n])),Object(s.g)(e);break}case"updateMessage":{const{chatId:t,id:n,message:c}=a;if(!Object(o.k)(e,t,n))return;e=q(e,t,n,c);const i=Object(o.k)(e,t,n);c.threadInfo&&(e=Object(r.ib)(e,c.threadInfo.chatId,c.threadInfo.threadId,c.threadInfo)),e=_(e,t,i),Object(s.g)(e);break}case"updateScheduledMessage":{const{chatId:t,id:n,message:c}=a;if(!Object(o.kb)(e,t,n))return;e=q(e,t,n,c,!0);const l=Object.keys(Object(o.lb)(e,t)||{}).map(Number).sort((e,t)=>t-e);e=Object(r.v)(e,t,i.MAIN_THREAD_ID,"scheduledIds",l),Object(s.g)(e);break}case"updateMessageSendSucceeded":{const{chatId:t,localId:n,message:c}=a;e=G(e,c);const i=Object(o.k)(e,t,n);e=Object(r.i)(e,t,[n]),c.isScheduled&&(e=Object(r.j)(e,t,[n])),e=Object(r.J)(e,t,c.id,{...i,...c,previousLocalId:n});const l=Object(o.k)(e,t,c.id);e=_(e,t,l),Object(s.g)(e);break}case"updateScheduledMessageSendSucceeded":{const{chatId:t,localId:n,message:c}=a,l=Object(o.jb)(e,t)||[];e=Object(r.v)(e,t,i.MAIN_THREAD_ID,"scheduledIds",[...l,c.id]);const d=Object(o.kb)(e,t,n);e=Object(r.j)(e,t,[n]),e=Object(r.cb)(e,t,c.id,{...d,...c,previousLocalId:n}),Object(s.g)(e);break}case"updatePinnedIds":{const{chatId:t,isPinned:n,messageIds:c}=a,l=Object(o.eb)(e,t)||[],d=n?[...l,...c]:l.filter(e=>!c.includes(e));Object(s.g)(Object(r.v)(e,t,i.MAIN_THREAD_ID,"pinnedIds",d));break}case"updateThreadInfo":{const{chatId:t,threadId:n,threadInfo:c}=a,i={...Object(o.xb)(e,t,n),...c};if(!i.threadId)return;e=Object(r.ib)(e,t,n,i),Object(s.g)(e);break}case"resetMessages":{const{id:n}=a,c=Object(o.m)(e,n);c&&!Object(m.lb)(n)&&(e=Object(r.i)(e,n,Object.keys(c).map(Number)),Object(s.g)(e),t.loadFullChat({chatId:n,force:!0}));break}case"deleteMessages":{const{ids:s,chatId:n}=a;V(n,s,t,e);break}case"deleteScheduledMessages":{const{ids:t,chatId:n}=a;!function(e,t,a,n){if(!e)return;t.forEach(t=>{n=Object(r.cb)(n,e,t,{isDeleting:!0})}),Object(s.g)(n),setTimeout(()=>{n=Object(r.j)(Object(s.e)(),e,t);const a=Object(o.lb)(n,e);n=Object(r.v)(n,e,i.MAIN_THREAD_ID,"scheduledIds",Object.keys(a||{}).map(Number)),Object(s.g)(n)},350)}(n,t,0,e);break}case"deleteHistory":{const{chatId:s}=a;V(s,Object.keys(e.messages.byChatId[s].byId).map(Number),t,e);break}case"updateCommonBoxMessages":{const{ids:t,messageUpdate:n}=a;t.forEach(t=>{const a=Object(o.p)(e,t);a&&(e=Object(r.J)(e,a,t,n))}),Object(s.g)(e);break}case"updateChannelMessages":{const{channelId:t,ids:n,messageUpdate:c}=a;n.forEach(a=>{e=Object(r.J)(e,t,a,c)}),Object(s.g)(e);break}case"updateMessagePoll":{const{pollId:t,pollUpdate:n}=a,c=Object(o.l)(e,t);if(c&&c.content.poll){const t={...c.content.poll,...n},{results:a}=t.results||{};if(a&&!a.some(e=>e.isChosen)){const{results:e}=c.content.poll.results,s=e&&e.filter(e=>e.isChosen);s&&s.forEach(e=>{const s=a.findIndex(t=>t.option===e.option);s>=0&&(t.results.results[s].isChosen=!0)})}Object(s.g)(Object(r.J)(e,c.chatId,c.id,{content:{...c.content,poll:t}}))}break}case"updateMessagePollVote":{const{pollId:t,userId:n,options:c}=a,i=Object(o.l)(e,t);if(!i||!i.content.poll||!i.content.poll.results)break;const{poll:l}=i.content,{recentVoterIds:d,totalVoters:b,results:u}=l.results,m=d?[...d]:[],h=b?b+1:1,O=u?[...u]:[];m.push(n),c.forEach(t=>{const a=O.find(e=>e.option===t),s=O.findIndex(e=>e.option===t),c=a?{...a}:{option:t,votersCount:0};c.votersCount+=1,n===e.currentUserId&&(c.isChosen=!0),s?O[s]=c:O.push(c)}),Object(s.g)(Object(r.J)(e,i.chatId,i.id,{content:{...i.content,poll:{...l,results:{...l.results,recentVoterIds:m,totalVoters:h,results:O}}}}));break}}});var $=a(104);const W=Object($.f)((function(){let e=Object(s.e)();Q.forEach(([t,a])=>{e=Object(r.lb)(e,t,{status:a})}),Object(s.g)(e),Q=[]}),3e3,!0);let Q=[];Object(s.b)("apiUpdate",(e,t,a)=>{switch(a["@type"]){case"deleteUser":return Object(r.k)(e,a.id);case"updateUser":return Object(r.lb)(e,a.id,a.user);case"updateUserStatus":return s=a.userId,n=a.status,Q.push([s,n]),void W();case"updateUserFullInfo":{const{id:t,fullInfo:s}=a,n=e.users.byId[t];if(!n)return;return Object(r.lb)(e,t,{fullInfo:{...n.fullInfo,...s}})}}var s,n}),Object(s.b)("apiUpdate",(e,t,a)=>{switch(a["@type"]){case"updateStickerSet":return Object(r.fb)(e,a.id,a.stickerSet)}}),Object(s.b)("apiUpdate",(e,t,a)=>{switch(a["@type"]){case"updatePeerBlocked":return a.isBlocked?Object(r.a)(Object(s.e)(),a.id):Object(r.o)(Object(s.e)(),a.id);case"updateResetContactList":Object(s.g)({...Object(s.e)(),contactList:{hash:0,userIds:[]}});break;case"updateFavoriteStickers":t.loadFavoriteStickers();break;case"updatePrivacy":e.settings.privacy[a.key]=a.rules}}),Object(s.b)("apiUpdate",(e,t,a)=>{switch(a["@type"]){case"updateNotifySettings":return Object(r.ab)(e,a.peerType,a.isSilent,a.isShowPreviews)}}),Object(s.b)("apiUpdate",(e,t,a)=>{switch(a["@type"]){case"updateTwoFaStateWaitCode":return{...e,twoFaSettings:{...e.twoFaSettings,isLoading:!1,waitingEmailCodeLength:a.length}};case"updateTwoFaError":return{...e,twoFaSettings:{...e.twoFaSettings,error:a.message}}}});var K=a(43),Y=a(27),J=a(8),Z=a(42),X=a(100),ee=a(66),te=a(93),ae=a(56),se=a(32),ne=a(31),ce=a(142),re=a(126);a(183);var oe=Object(c.h)(({id:e,name:t,value:a,label:s,checked:n=!1,disabled:r,onChange:o,onCheck:i})=>{const l=Object(c.m)(e=>{o&&o(e),i&&i(e.currentTarget.checked)},[o,i]),d=Object(J.a)("Switcher",r&&"disabled");return c.a.createElement("label",{className:d,title:s},c.a.createElement("input",{type:"checkbox",id:e,name:t,value:a,checked:n,disabled:r,onChange:l}),c.a.createElement("span",{className:"widget"}))});a(184);const ie=[0,1,2];var le=Object(c.h)(Object(s.h)(e=>{const{query:t,fetchingStatus:a,chatId:s,date:n}=e.globalSearch,{currentUserId:c}=e,{byId:r}=e.chats,{theme:o,animationLevel:i}=e.settings.byKey;return{searchQuery:t,isLoading:!!a&&Boolean(a.chats||a.messages),currentUserId:c,chatsById:r,globalSearchChatId:s,searchDate:n,theme:o,animationLevel:i}},(e,t)=>Object(d.l)(t,["openChat","openSupportChat","setGlobalSearchDate","setGlobalSearchChatId","setSettingOption"]))(({content:e,contactsFilter:t,onSearchQuery:a,onSelectSettings:s,onSelectContacts:n,onSelectArchived:r,setGlobalSearchChatId:o,onReset:i,searchQuery:d,isLoading:b,currentUserId:u,globalSearchChatId:O,searchDate:j,theme:g,animationLevel:f,chatsById:p,openChat:I,openSupportChat:v,setGlobalSearchDate:y,setSettingOption:w})=>{const C=e===l.d.ChatList,E={date:void 0},M={id:void 0},S=Object(c.p)(()=>j?Object(x.a)(new Date(1e3*j)):void 0,[j]),k=Object(c.p)(()=>C&&p?Object.values(p).reduce((e,t)=>Object(m.hb)(t)&&t.unreadCount?e+1:e,0):0,[C,p]),N=Object(c.p)(()=>({onTrigger:e,isOpen:t})=>c.a.createElement(ne.a,{round:!0,ripple:C&&!h.f,size:"smaller",color:"translucent",className:t?"active":"",onClick:C?e:()=>i(),ariaLabel:C?"Open menu":"Return to chat list"},c.a.createElement("div",{className:Object(J.a)("animated-menu-icon",!C&&"state-back")})),[C,i]),P=Object(c.m)(()=>{d||a("")},[d,a]),T=Object(c.m)(()=>{I({id:u})},[u,I]),A=Object(c.m)(e=>{e.stopPropagation();const t="light"===g?"dark":"light";w({theme:t,customBackground:"dark"===t?"#0F0F0F":void 0}),Object(ee.a)(t,f>0)},[f,w,g]),L=Object(c.m)(e=>{e.stopPropagation();const t=0===f?2:0;ie.forEach((e,a)=>{document.body.classList.toggle("animation-level-"+a,t===a)}),w({animationLevel:t})},[f,w]),R=Object(te.a)(),F=Boolean(O)||e===l.d.GlobalSearch||e===l.d.Contacts,B=e===l.d.Contacts?R("SearchFriends"):R("Search");return c.a.createElement("div",{className:"LeftMainHeader"},c.a.createElement("div",{id:"LeftMainHeader",className:"left-header"},c.a.createElement(ae.a,{trigger:N},c.a.createElement(se.a,{icon:"saved-messages",onClick:T},R("SavedMessages")),c.a.createElement(se.a,{icon:"archive",onClick:r},c.a.createElement("span",{className:"menu-item-name"},R("ArchivedChats")),k>0&&c.a.createElement("div",{className:"archived-badge"},k)),c.a.createElement(se.a,{icon:"user",onClick:n},R("Contacts")),c.a.createElement(se.a,{icon:"settings",onClick:s},R("Settings")),c.a.createElement(se.a,{icon:"darkmode",onClick:A},c.a.createElement("span",{className:"menu-item-name"},"Dark Mode"),c.a.createElement(oe,{id:"darkmode",label:"Toggle Dark Mode",checked:"dark"===g})),c.a.createElement(se.a,{icon:"animations",onClick:L},c.a.createElement("span",{className:"menu-item-name"},R("SettingsSearch.Synonyms.Appearance.Animations")),c.a.createElement(oe,{id:"animations",label:"Toggle Animations",checked:f>0})),c.a.createElement(se.a,{icon:"help",onClick:v},R("BotHelp"))),c.a.createElement(ce.a,{inputId:"telegram-search-input",className:O||j?"with-picker-item":"",value:t||d,focused:F,isLoading:b,placeholder:B,canClose:Boolean(O||j),onChange:a,onReset:i,onFocus:P},S&&c.a.createElement(re.a,{icon:"calendar",title:S,canClose:!0,isMinimized:Boolean(O),className:"search-date",onClick:y,clickArg:E}),O&&c.a.createElement(re.a,{chatOrUserId:O,onClick:o,canClose:!0,clickArg:M}))))})),de=a(20);a(185);var be=Object(s.h)(e=>Object(d.l)(e,["connectionState"]))(({connectionState:e})=>{const t=Object(te.a)();return"connectionStateConnecting"===e&&c.a.createElement("div",{id:"ConnectionState"},c.a.createElement(de.a,{color:"black"}),c.a.createElement("div",{className:"state-text"},t("WaitingForNetwork")))}),ue=a(127),me=a(106),he=a(29),Oe=(e,t,a)=>{const s=Object(c.q)(),n=(e=>Object(c.p)(()=>Object(g.g)(e=>e(),e),[e]))(t),r=Object(he.a)();return Object(me.a)(()=>{let t=!0;n(()=>{s.current=e(),t||r()}),t=!1},a),s.current},je=a(156),ge=a(176);var fe=Object(c.h)(Object(s.h)(e=>{const{chats:{byId:t},users:{byId:a},chatFolders:{byId:s,orderedIds:n},lastSyncTime:c}=e;return{chatsById:t,usersById:a,chatFoldersById:s,orderedFolderIds:n,lastSyncTime:c}},(e,t)=>Object(d.l)(t,["loadChatFolders"]))(({chatsById:e,usersById:t,chatFoldersById:a,orderedFolderIds:s,lastSyncTime:n,loadChatFolders:r})=>{const o=Object(c.q)(null),[i,l]=Object(c.r)(0);Object(c.n)(()=>{n&&r()},[n,r]);const b=Object(c.p)(()=>s?s.map(e=>a[e]||{}).filter(Boolean):void 0,[a,s]),u=Oe(()=>{if(!b||!b.length)return;const a=Object.keys(e).map(Number),s=b.map(s=>{const{unreadDialogsCount:n,hasActiveDialogs:c}=Object(m.p)(e,t,s,a)||{};return{id:s.id,badgeCount:n,isBadgeActive:c}});return Object(d.c)(s,"id")},3e3,[b,e,t]),O=Object(c.p)(()=>{if(b&&b.length)return[{title:"All"},...b.map(e=>({title:e.title,...u&&u[e.id]}))]},[b,u]),j=Object(c.m)(e=>{l(e)},[]);Object(c.n)(()=>{O&&O.length&&i>=O.length&&l(0)},[i,O]),Object(c.n)(()=>{if(o.current&&h.k&&O&&O.length)return Object(ue.b)(o.current,{onSwipe:(e,t)=>{t===ue.a.Left?l(Math.min(i+1,O.length-1)):t===ue.a.Right&&l(Math.max(0,i-1))}})},[i,O]);const{shouldRender:g,transitionClassNames:f}=Object(Y.a)(!s,void 0,!0),p=Object(te.a)();function I(){const e=Object.values(a).find(({title:e})=>e===O[i].title);return e&&0!==i?c.a.createElement(ge.a,{folderType:"folder",folderId:e.id,noChatsText:p("FilterNoChatsToDisplay")}):c.a.createElement(ge.a,{folderType:"all"})}return c.a.createElement("div",{className:"ChatFolders"},O&&O.length?c.a.createElement(je.a,{tabs:O,activeTab:i,onSwitchTab:j}):g?c.a.createElement("div",{className:Object(J.a)("tabs-placeholder",f)}):void 0,c.a.createElement(X.a,{ref:o,name:"slide",activeKey:i,renderCount:O?O.length:void 0},I))})),pe=a(12),Ie=a(17),ve=a(16);var ye=e=>{const t=Object(Ie.a)(pe.a.Extra,"LeftSearch");return t?c.a.createElement(t,e):c.a.createElement(ve.a,null)};var we=e=>{const t=Object(Ie.a)(pe.a.Extra,"ContactList");return t?c.a.createElement(t,e):c.a.createElement(ve.a,null)},Ce=a(47);a(197);let Ee;var Me=Object(c.h)(({isShown:e,onNewPrivateChat:t,onNewChannel:a,onNewGroup:s})=>{const[n,r]=Object(c.r)(!1);Object(c.n)(()=>{e||r(!1)},[e]);const o=Object(te.a)(),i=Object(J.a)("NewChatButton",e&&"revealed",n&&"menu-is-open"),l=Object(c.m)(()=>{Ee&&(clearTimeout(Ee),Ee=void 0)},[]),d=Object(c.m)(()=>{Ee&&(clearTimeout(Ee),Ee=void 0),Ee=window.setTimeout(()=>{r(!1)},750)},[]);return c.a.createElement("div",{className:i,onMouseEnter:l,onMouseLeave:d},c.a.createElement(ne.a,{round:!0,color:"primary",className:n?"active":"",onClick:()=>{r(!n)},ariaLabel:n?"Close":"Create new chat",tabIndex:-1},c.a.createElement("i",{className:"icon-new-chat-filled"}),c.a.createElement("i",{className:"icon-close"})),c.a.createElement(Ce.a,{isOpen:n,positionX:"right",positionY:"bottom",autoClose:!0,onClose:()=>{r(!1)}},c.a.createElement(se.a,{icon:"channel",onClick:a},o("NewChannel")),c.a.createElement(se.a,{icon:"group",onClick:s},o("NewGroup")),c.a.createElement(se.a,{icon:"user",onClick:t},"New Private Chat")))});a(198);const Se=Object.keys(l.d).length/2;let ke;var Ne=Object(c.h)(({content:e,searchQuery:t,searchDate:a,contactsFilter:s,onSearchQuery:n,onContentChange:r,onReset:o})=>{const[i,d]=Object(c.r)(h.k),b=Object(c.q)(!1),u=Object(c.m)(()=>{r(l.d.Settings)},[r]),m=Object(c.m)(()=>{r(l.d.Contacts)},[r]),O=Object(c.m)(()=>{r(l.d.NewChannelStep1)},[r]),j=Object(c.m)(()=>{r(l.d.NewGroupStep1)},[r]),g=Object(c.m)(()=>{r(l.d.Archived)},[r]),f=Object(c.m)(()=>{e===l.d.ChatList&&(b.current=!0,d(!0))},[e]),p=Object(c.m)(()=>{b.current=!1,ke&&(clearTimeout(ke),ke=void 0),ke=window.setTimeout(()=>{b.current||d(!1)},250)},[]);return Object(c.n)(()=>{let t;return e!==l.d.ChatList?t=window.setTimeout(()=>{d(!1)},250):(b.current||h.k)&&d(!0),()=>{t&&(clearTimeout(t),t=void 0)}},[e]),c.a.createElement("div",{id:"LeftColumn-main",onMouseEnter:h.k?void 0:f,onMouseLeave:h.k?void 0:p},c.a.createElement(le,{content:e,contactsFilter:s,onSearchQuery:n,onSelectSettings:u,onSelectContacts:m,onSelectArchived:g,onReset:o}),c.a.createElement(be,null),c.a.createElement(X.a,{name:"zoom-fade",renderCount:Se,activeKey:e},()=>{switch(e){case l.d.ChatList:return c.a.createElement(fe,null);case l.d.GlobalSearch:return c.a.createElement(ye,{searchQuery:t,searchDate:a,onReset:o});case l.d.Contacts:return c.a.createElement(we,{filter:s});default:return}}),c.a.createElement(Me,{isShown:i,onNewPrivateChat:m,onNewChannel:O,onNewGroup:j}))});var Pe=e=>{const t=Object(Ie.a)(pe.a.Extra,"Settings");return t?c.a.createElement(t,e):c.a.createElement(ve.a,null)};var Te=e=>{const t=Object(Ie.a)(pe.a.Extra,"NewChat");return t?c.a.createElement(t,e):c.a.createElement(ve.a,null)};var Ae,xe=e=>{const t=Object(Ie.a)(pe.a.Extra,"ArchivedChats");return t?c.a.createElement(t,e):c.a.createElement(ve.a,null)};a(199);!function(e){e[e.Main=0]="Main",e[e.Settings=1]="Settings",e[e.Archived=2]="Archived",e[e.NewGroup=3]="NewGroup",e[e.NewChannel=4]="NewChannel"}(Ae||(Ae={}));const Le=Object.keys(Ae).length/2;var Re=Object(c.h)(Object(s.h)(e=>{const{query:t,date:a}=e.globalSearch;return{searchQuery:t,searchDate:a}},(e,t)=>Object(d.l)(t,["setGlobalSearchQuery","setGlobalSearchChatId","resetChatCreation","setGlobalSearchDate","loadPasswordInfo","clearTwoFaError"]))(({searchQuery:e,searchDate:t,setGlobalSearchQuery:a,setGlobalSearchChatId:s,resetChatCreation:n,setGlobalSearchDate:r,loadPasswordInfo:o,clearTwoFaError:i})=>{const[d,b]=Object(c.r)(l.d.ChatList),[u,m]=Object(c.r)(l.m.Main),[O,j]=Object(c.r)(""),[g,f]=Object(c.r)(0);let p=Ae.Main;switch(d){case l.d.Archived:p=Ae.Archived;break;case l.d.Settings:p=Ae.Settings;break;case l.d.NewChannelStep1:case l.d.NewChannelStep2:p=Ae.NewChannel;break;case l.d.NewGroupStep1:case l.d.NewGroupStep2:p=Ae.NewGroup}const I=Object(c.m)(e=>{if(d!==l.d.NewGroupStep2||e){if(d===l.d.NewGroupStep1){const e=document.getElementById("new-group-picker-search");e&&e.blur()}if(d===l.d.Settings)switch(u){case l.m.EditProfile:case l.m.Folders:case l.m.General:case l.m.Notifications:case l.m.Privacy:case l.m.Language:return void m(l.m.Main);case l.m.GeneralChatBackground:return void m(l.m.General);case l.m.GeneralChatBackgroundColor:return void m(l.m.GeneralChatBackground);case l.m.PrivacyPhoneNumber:case l.m.PrivacyLastSeen:case l.m.PrivacyProfilePhoto:case l.m.PrivacyForwarding:case l.m.PrivacyGroupChats:case l.m.PrivacyActiveSessions:case l.m.PrivacyBlockedUsers:case l.m.TwoFaDisabled:case l.m.TwoFaEnabled:case l.m.TwoFaCongratulations:return void m(l.m.Privacy);case l.m.PrivacyPhoneNumberAllowedContacts:case l.m.PrivacyPhoneNumberDeniedContacts:return void m(l.m.PrivacyPhoneNumber);case l.m.PrivacyLastSeenAllowedContacts:case l.m.PrivacyLastSeenDeniedContacts:return void m(l.m.PrivacyLastSeen);case l.m.PrivacyProfilePhotoAllowedContacts:case l.m.PrivacyProfilePhotoDeniedContacts:return void m(l.m.PrivacyProfilePhoto);case l.m.PrivacyForwardingAllowedContacts:case l.m.PrivacyForwardingDeniedContacts:return void m(l.m.PrivacyForwarding);case l.m.PrivacyGroupChatsAllowedContacts:case l.m.PrivacyGroupChatsDeniedContacts:return void m(l.m.PrivacyGroupChats);case l.m.TwoFaNewPassword:return void m(l.m.TwoFaDisabled);case l.m.TwoFaNewPasswordConfirm:return void m(l.m.TwoFaNewPassword);case l.m.TwoFaNewPasswordHint:return void m(l.m.TwoFaNewPasswordConfirm);case l.m.TwoFaNewPasswordEmail:return void m(l.m.TwoFaNewPasswordHint);case l.m.TwoFaNewPasswordEmailCode:return void m(l.m.TwoFaNewPasswordEmail);case l.m.TwoFaChangePasswordCurrent:case l.m.TwoFaTurnOff:case l.m.TwoFaRecoveryEmailCurrentPassword:return void m(l.m.TwoFaEnabled);case l.m.TwoFaChangePasswordNew:return void m(l.m.TwoFaChangePasswordCurrent);case l.m.TwoFaChangePasswordConfirm:return void m(l.m.TwoFaChangePasswordNew);case l.m.TwoFaChangePasswordHint:return void m(l.m.TwoFaChangePasswordConfirm);case l.m.TwoFaRecoveryEmail:return void m(l.m.TwoFaRecoveryEmailCurrentPassword);case l.m.TwoFaRecoveryEmailCode:return void m(l.m.TwoFaRecoveryEmail);case l.m.FoldersCreateFolder:case l.m.FoldersEditFolder:return void m(l.m.Folders)}b(l.d.ChatList),j(""),a({query:""}),r({date:void 0}),s({id:void 0}),n(),setTimeout(()=>{f(Date.now())},250)}else b(l.d.NewGroupStep1)},[d,a,s,r,n,u]),v=Object(c.m)(t=>{d!==l.d.Contacts?(b(l.d.GlobalSearch),t!==e&&a({query:t})):j(t)},[d,a,e]);return Object(c.n)(()=>d!==l.d.ChatList?Object(Z.a)(()=>I()):void 0,[d,I]),Object(c.n)(()=>{i(),u===l.m.Privacy&&o()},[i,o,u]),c.a.createElement(X.a,{id:"LeftColumn",name:h.f?"slide-layers":"push-slide",renderCount:Le,activeKey:p},()=>{switch(p){case Ae.Archived:return c.a.createElement(xe,{onReset:I});case Ae.Settings:return c.a.createElement(Pe,{currentScreen:u,onScreenSelect:m,onReset:I});case Ae.NewChannel:return c.a.createElement(Te,{key:g,isChannel:!0,content:d,onContentChange:b,onReset:I});case Ae.NewGroup:return c.a.createElement(Te,{key:g,content:d,onContentChange:b,onReset:I});default:return c.a.createElement(Ne,{content:d,searchQuery:e,searchDate:t,contactsFilter:O,onContentChange:b,onSearchQuery:v,onReset:I})}})})),Fe=a(124),Be=a(13),De=a(49);var Ue=()=>{const[e,t]=Object(c.r)(De.a.get());return Object(c.n)(()=>{const e=Object(g.g)(()=>{t(De.a.get())},250,!1);return window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}}),e},He=a(38);function qe(e,t){const a=Object(He.a)(e,!0),s=Object(c.q)(),n=Object(he.a)(),r=null!=e;return r&&s.current&&(clearTimeout(s.current),s.current=void 0),Object(me.a)(()=>{t&&!r&&a&&!s.current&&(s.current=window.setTimeout(()=>{s.current=void 0,n()},t))},[e]),s.current&&t&&!r?a:e}function Ge(e,t){const a=e<=n.T?16:32,s=function(e){if(e>n.Q){const t=Math.min(Math.max(.25*e,288),424),a=Math.min(.25*e,424);return Math.min(e-t-a,728)}if(e>n.P){const t=Math.min(Math.max(.4*e,288),424);return Math.min(e-t,728)}if(e>728)return 728;return e}(e),c=e<=n.T?54:64,r=t?s-a-c:s-a,o=e>n.T?Math.min(s-a,512):s-a,i=o/r,l=r/o;return{composerHiddenScale:i,toolbarHiddenScale:l,composerTranslateX:t?c/2*l:0,toolbarTranslateX:t?c/2*-1*i:0}}var _e=a(132),ze=a(129);function Ve(e,t=!1,a=!1){const s=Object(He.a)(e,t);return a||null!=e?e:s}var $e=a(45),We=a(96),Qe=a(111);var Ke=e=>{const{isOpen:t}=e,a=Object(Ie.a)(pe.a.Extra,"HeaderMenuContainer",!t);return a?c.a.createElement(a,e):void 0};var Ye=Object(c.h)(Object(s.h)((e,{chatId:t,threadId:a,messageListType:s})=>{const n=Object(o.f)(e,t),c=Boolean(n&&Object(m.jb)(n));if(n&&n.isRestricted)return{noMenu:!0};const r=Object(o.N)(e,t),l="thread"===s&&a===i.MAIN_THREAD_ID,d="thread"===s&&a!==i.MAIN_THREAD_ID,b=Object(o.U)(e),u=Boolean(Object(o.J)(e,t)),O=Boolean(l&&n&&(c||Object(m.nb)(n))&&n.isNotJoined),j=l||d,g=l&&!r&&!O,f=!Object(o.Q)(e),p=l&&!O;return{noMenu:!(h.f&&O||h.f&&j||g||f||p),isChannel:c,isRightColumnShown:b,canStartBot:u,canSubscribe:O,canSearch:j,canMute:g,canSelect:f,canLeave:p}},(e,t)=>Object(d.l)(t,["joinChannel","sendBotCommand","openLocalTextSearch"]))(({chatId:e,threadId:t,noMenu:a,isChannel:s,canStartBot:n,canSubscribe:r,canSearch:o,canMute:i,canSelect:l,canLeave:d,isRightColumnShown:b,joinChannel:u,sendBotCommand:m,openLocalTextSearch:O})=>{const j=Object(c.q)(null),[g,f]=Object(c.r)(!1),[p,I]=Object(c.r)(void 0),v=Object(c.m)(()=>{f(!0);const e=j.current.getBoundingClientRect();I({x:e.right,y:e.bottom})},[]),y=Object(c.m)(()=>{f(!1)},[]),w=Object(c.m)(()=>{I(void 0)},[]),C=Object(c.m)(()=>{u({chatId:e})},[u,e]),E=Object(c.m)(()=>{m({command:"/start"})},[m]),M=Object(c.m)(()=>{if(O(),h.f){document.querySelector("#MobileSearch input").focus()}else setTimeout(()=>{const e=document.querySelector(".RightHeader .SearchInput input");e&&e.focus()},400)},[O]),S=Object(te.a)();return c.a.createElement("div",{className:"HeaderActions"},!h.f&&r&&c.a.createElement(ne.a,{size:"tiny",ripple:!0,fluid:!0,onClick:C},S(s?"Subscribe":"Join Group")),!h.f&&n&&c.a.createElement(ne.a,{size:"tiny",ripple:!0,fluid:!0,onClick:E},S("Start")),!h.f&&o&&c.a.createElement(ne.a,{round:!0,ripple:b,color:"translucent",size:"smaller",onClick:M,ariaLabel:"Search in this chat"},c.a.createElement("i",{className:"icon-search"})),(h.f||!r)&&c.a.createElement(ne.a,{ref:j,className:g?"active":"",round:!0,ripple:!h.f,size:"smaller",color:"translucent",disabled:a,ariaLabel:"More actions",onClick:v},c.a.createElement("i",{className:"icon-more"})),p&&c.a.createElement(Ke,{chatId:e,threadId:t,isOpen:g,anchor:p,isChannel:s,canSubscribe:r,canSearch:o,canMute:i,canSelect:l,canLeave:d,onSubscribeChannel:C,onSearchClick:M,onClose:y,onCloseAnimationEnd:w}))})),Je=a(103),Ze=a(35),Xe=a(97),et=a(34);function tt(e){const t=e&&Object(m.E)(e),{sticker:a}=e&&e.content||{},s=t&&a&&!Object(h.o)()&&t.includes("image/webp"),[r,o]=Object(c.r)(et.a),i=e&&e.id;return Object(c.o)(()=>{s&&Object(et.c)("b64-"+i,t).then(o).catch(e=>{n.l&&console.error(e)})},[i,s,t]),s?r:t}var at=a(107),st=a(33),nt=a(36);function ct(e,t,a,s,n){return`M${e},${t+n}a${n},${n},0,0,1,\n ${a},0v${s-2*n}a${n},${n},0,0,1,${-a},0Z`}var rt=Object(c.h)(({count:e,index:t})=>{const a=Object(c.q)(null),s=Object(c.p)(()=>function(e,t){const a=e-t-1,s=function(e){let t=8;1===e?t=36:2===e?t=17:3===e?t=11:(4===e||e>3)&&(t=7.5);return t}(e),n=function(e,t){let a=36;1===e?a=36:2===e?a=17:3===e?a=1===t?12:11:(4===e||e>3)&&(a=7.5);return a}(e,a),c=function(e,t){return e<=3?36:t*e+2*(e-1)}(e,s),r="clipPath"+e,o=function(e,t,a){let s="";if(3===a)s=ct(0,0,2,t,1)+ct(0,12,2,t+1,1)+ct(0,25,2,t,1);else for(let e=0;e\n \n `}(r,s,e),i=function(e,t,a){if(1===a)return 0;if(2===a)return 0===e?0:t+2;return 3===a?0===e?0:1===e?12:25:(t+2)*e}(a,s,e),l=function(e,t,a,s){if(t<=4)return 0;if(e<=1)return 0;if(e>=t-2)return s-36;return(a+4)/2+(e-2)*(a+2)}(a,e,s,c);return{markHeight:n,clipPath:o,markTranslateY:i,trackTranslateY:l,trackHeight:c,clipPathId:r}}(e,t),[e,t]);if(Object(c.n)(()=>{if(!a.current)return;const{trackHeight:e,trackTranslateY:t,markHeight:n,markTranslateY:c,clipPathId:r,clipPath:o}=s,i=a.current.firstElementChild;if(a&&a.current){const s=a.current,{style:l}=s;l.height=e+"px",l.transform=`translateY(-${t}px)`,l.clipPath=`url("#${r}")`;const d=s.querySelector("svg"),b=s.querySelector("div"),u=s.querySelector("defs");d||i&&(i.innerHTML=` ${o} `),u&&(u.innerHTML=o),b&&(b.style.height=n+"px",b.style.transform=`translateY(${c}px)`)}},[s]),1===e)return c.a.createElement("div",{className:"pinned-message-border"},c.a.createElement("div",{className:"pinned-message-border-wrapper-1",ref:a}));const{trackHeight:n,trackTranslateY:r,markHeight:o,markTranslateY:i,clipPathId:l}=s;return c.a.createElement("div",{className:Object(J.a)("pinned-message-border",e>4&&"pinned-message-border-mask")},c.a.createElement("div",{className:"pinned-message-border-wrapper",ref:a,style:`clip-path: url("#${l}"); width: 2px;\n height: ${n}px; transform: translateY(-${r}px);`},c.a.createElement("span",null),c.a.createElement("div",{className:"pinned-message-border-mark",style:`height: ${o}px; transform: translateY(${i}px);`})))});var ot=Object(c.h)(({message:e,count:t,index:a,customTitle:s,className:n,onUnpinMessage:r,onClick:o,onAllPinnedClick:i})=>{const l=tt(e),d=Object(Xe.a)(Object(m.D)(e,"pictogram")),b=Object(m.M)(e,Boolean(l)),[u,h,O]=Object(nt.a)(),j=Object(c.m)(()=>{O(),r&&r(e.id)},[O,r,e.id]),g=Object(te.a)();return c.a.createElement("div",{className:Object(J.a)("HeaderPinnedMessage-wrapper",n)},t>1&&c.a.createElement(ne.a,{round:!0,size:"smaller",color:"translucent",className:"pin-list-button",ariaLabel:g("EventLogFilterPinnedMessages"),onClick:i},c.a.createElement("i",{className:"icon-pin-list"})),r&&c.a.createElement(ne.a,{round:!0,size:"smaller",color:"translucent",ariaLabel:g("UnpinMessageAlertTitle"),className:"unpin-button",onClick:h},c.a.createElement("i",{className:"icon-close"})),c.a.createElement(at.a,{isOpen:u,onClose:O,text:"Would you like to unpin this message?",confirmLabel:"Unpin",confirmHandler:j}),c.a.createElement("div",{className:"HeaderPinnedMessage",onClick:o},c.a.createElement(rt,{count:t,index:a}),l&&function(e,t){const{width:a,height:s}=Object(Je.k)();return c.a.createElement("img",{src:t||e,width:a,height:s,alt:""})}(l,d),c.a.createElement("div",{className:"message-text"},c.a.createElement("div",{className:"title"},s||`${g("PinnedMessage")} ${a>0?"#"+(t-a):""}`),c.a.createElement("p",null,Object(Ze.a)(b))),c.a.createElement(st.a,null)))}),it=a(48),lt=a(164);a(202);var dt=Object(s.h)((e,{message:t})=>{const a=Object(o.ob)(e,t);return{senderName:a?Object(m.U)(a):void 0}},(e,t)=>Object(d.l)(t,["focusMessage","closeAudioPlayer"]))(({message:e,className:t,senderName:a,focusMessage:s,closeAudioPlayer:n})=>{const r=it.c(Object(m.D)(e,"inline")),{playPause:o,isPlaying:i}=Object(lt.a)(Object(m.A)(e),Object(m.r)(e),r,void 0,void 0,!0),l=Object(c.m)(()=>{s({chatId:e.chatId,messageId:e.id})},[s,e.chatId,e.id]),d=Object(c.m)(()=>{i&&o(),n()},[n,i,o]),b=Object(te.a)(),u=Object(m.u)(e);return c.a.createElement("div",{className:Object(J.a)("AudioPlayer",t)},c.a.createElement(ne.a,{round:!0,ripple:!h.f,color:"translucent",size:"smaller",className:Object(J.a)("toggle-play",i?"pause":"play"),onClick:o,ariaLabel:i?"Pause audio":"Play audio"},c.a.createElement("i",{className:"icon-play"}),c.a.createElement("i",{className:"icon-pause"})),c.a.createElement("div",{className:"AudioPlayer-content",onClick:l},u?function(e){const{title:t,performer:a,fileName:s}=e;return c.a.createElement(c.a.Fragment,null,c.a.createElement("div",{className:"title"},Object(Ze.a)(t||s)),a&&c.a.createElement("div",{className:"subtitle"},Object(Ze.a)(a)))}(u):function(e,t){return c.a.createElement(c.a.Fragment,null,c.a.createElement("div",{className:"title"},t&&Object(Ze.a)(t)),c.a.createElement("div",{className:"subtitle"},e))}(b("AttachAudio"),a),c.a.createElement(st.a,null)),c.a.createElement(ne.a,{round:!0,className:"player-close",color:"translucent",size:"smaller",onClick:d,ariaLabel:"Close player"},c.a.createElement("i",{className:"icon-close"})))});a(203);var bt=Object(c.h)(Object(s.h)((e,{chatId:t,threadId:a,messageListType:s})=>{const{isLeftColumnShown:n,lastSyncTime:c}=e,{byId:r}=e.chats,l=Object(o.f)(e,t),{typingStatus:d}=l||{},{chatId:b,messageId:u}=e.audioPlayer,h=b&&u?Object(o.k)(e,b,u):void 0,O=Object(o.yb)(e,t,a);let j;if("pinned"===s){const a=Object(o.eb)(e,t);j=a&&a.length}else if("scheduled"===s){const a=Object(o.jb)(e,t);j=a&&a.length}else if("thread"===s&&a!==i.MAIN_THREAD_ID){const s=Object(o.xb)(e,t,a);s&&(j=s.messagesCount)}let g={typingStatus:d,isLeftColumnShown:n,isRightColumnShown:Object(o.U)(e),isSelectModeActive:Object(o.Q)(e),audioMessage:h,chatTitleLength:l&&Object(m.l)(l).length,chatsById:r,originChatId:O?O.id:t,messagesCount:j,isChatWithSelf:Object(o.N)(e,t),isChatWithBot:l&&Object(o.M)(e,l),lastSyncTime:c};const f=Object(o.m)(e,t);if("thread"===s&&f)if(a===i.MAIN_THREAD_ID){const s=Object(o.eb)(e,t);if(s&&s.length){const t=f[s[0]],{canUnpin:n}=t&&Object(o.b)(e,t,a)||{};g={...g,pinnedMessageIds:s,messagesById:f,canUnpin:n}}}else{const s=Object(o.zb)(e,t,a),n=s?Object(o.k)(e,t,s):void 0,c=n?Object(o.I)(e,n):void 0,r=c?Object(m.U)(c):void 0;g={...g,pinnedMessageIds:s,messagesById:f,canUnpin:!1,topMessageTitle:r}}return g},(e,t)=>Object(d.l)(t,["openChatWithInfo","pinMessage","focusMessage","openChat","loadPinnedMessages","toggleLeftColumn","exitMessageSelectMode"]))(({chatId:e,threadId:t,messageListType:a,pinnedMessageIds:s,messagesById:r,canUnpin:o,topMessageTitle:l,typingStatus:d,isSelectModeActive:b,isLeftColumnShown:u,isRightColumnShown:O,audioMessage:j,chatTitleLength:g,chatsById:f,originChatId:p,messagesCount:I,isChatWithSelf:v,isChatWithBot:y,lastSyncTime:w,openChatWithInfo:C,pinMessage:E,focusMessage:M,openChat:S,loadPinnedMessages:k,toggleLeftColumn:N,exitMessageSelectMode:P})=>{const[T,A]=Object(c.r)(0),x=Array.isArray(s)?s[T]:s,L=r&&x?r[x]:void 0,R=Array.isArray(s)?s.length:s?1:0;Object(c.n)(()=>{t===i.MAIN_THREAD_ID&&w&&k({chatId:e})},[e,k,w,t]),Object(c.n)(()=>{A(0)},[e]),Object(c.n)(()=>{A(R?Object(_e.a)(R,T):-1)},[R,T]),Object(ze.a)(e,x,L);const{width:F}=Ue(),B=F<=n.P,D=F>=n.T&&u,U=Object(c.q)(null),H=Object(c.q)(!0),q=Object(c.m)(()=>{C({id:e})},[C,e]),G=Object(c.m)(t=>{E({chatId:e,messageId:t,isUnpin:!0})},[E,e]),_=Object(c.m)(()=>{if(L){M({chatId:L.chatId,threadId:t,messageId:L.id});const e=Object(_e.a)(R,T+1);A(e)}},[L,M,t,R,T]),z=Object(c.m)(()=>{S({id:e,threadId:i.MAIN_THREAD_ID,type:"pinned"})},[S,e]),V=Object(c.m)(()=>{if(h.f){const e=document.getElementById(n.q);e&&e.blur()}t!==i.MAIN_THREAD_ID||"thread"!==a?("scheduled"===a&&b&&P(),S({id:p,threadId:i.MAIN_THREAD_ID})):h.f?S({id:void 0}):N()},[S,p,t,a,N,b,P]),$=Object(c.p)(()=>{if(!B||!f)return;let e=!1;const t=Object.values(f).reduce((t,a)=>{if(Object(m.hb)(a))return t;const s=a.unreadCount||0;return!s||a.isMuted&&!a.unreadMentionsCount||(e=!0),t+s},0);return t?{isActive:e,totalCount:t}:void 0},[B,f]),W=F>=n.P&&Fn.T&&F30),Q=W||F>n.Q&&F{const e=U.current;if(e)return Q&&oe?void(O||W?(H.current&&(e.classList.add("tools-stacked","animated"),H.current=!1),setTimeout(()=>{e.classList.remove("animated")},350)):(e.classList.remove("tools-stacked"),H.current=!0)):(e.classList.remove("tools-stacked","animated"),void(H.current=!0))},[Q,oe,W,O]);const ie=Object(te.a)();function le(){return"thread"===a&&t===i.MAIN_THREAD_ID?c.a.createElement(c.a.Fragment,null,B&&de(D,$),c.a.createElement("div",{className:"chat-info-wrapper",onClick:q},Object(m.lb)(e)?c.a.createElement(We.a,{userId:e,typingStatus:d,withFullInfo:y,withMediaViewer:!0,withUpdatingStatus:!0}):c.a.createElement(Qe.a,{chatId:e,typingStatus:d,withMediaViewer:!0,withFullInfo:!0,withUpdatingStatus:!0}))):"thread"===a?c.a.createElement(c.a.Fragment,null,de(),c.a.createElement("h3",null,ie("CommentsCount",I))):"pinned"===a?c.a.createElement(c.a.Fragment,null,de(),c.a.createElement("h3",null,ie("PinnedMessagesCount",I))):"scheduled"===a?c.a.createElement(c.a.Fragment,null,de(),c.a.createElement("h3",null,v?ie("Reminders"):ie("messages",I))):void 0}function de(e=!1,t){return c.a.createElement("div",{className:"back-button"},c.a.createElement(ne.a,{round:!0,size:"smaller",color:"translucent",onClick:V,ariaLabel:e?"Close":"Back"},c.a.createElement("div",{className:Object(J.a)("animated-close-icon",!e&&"state-back")})),t&&c.a.createElement("div",{className:"unread-count "+(t.isActive?"active":"")},Object($e.b)(t.totalCount)))}return c.a.createElement("div",{className:"MiddleHeader",ref:U},c.a.createElement(X.a,{name:"slide-fade",activeKey:"thread"===a?t:1},le),c.a.createElement("div",{className:"header-tools"},ae&&ce&&!K&&c.a.createElement(ot,{key:e,message:ce,count:R,index:T,customTitle:re,className:se,onUnpinMessage:o?G:void 0,onClick:_,onAllPinnedClick:z}),K&&ee&&c.a.createElement(dt,{key:Object(m.A)(ee),message:ee,className:Z}),c.a.createElement(Ye,{chatId:e,threadId:t,messageListType:a})))})),ut=a(149);function mt(e){return"albumId"in e}function ht(e,t){let a,s=[],n={originalDate:e[0].date,datetime:Number(Object(x.j)(1e3*e[0].date)),senderGroups:[s]};const c=[n];return e.forEach((r,o)=>{r.isInAlbum?a?(a.messages.push(r),r.content.text&&(a.mainMessage=r)):a={albumId:r.groupedId,messages:[r],mainMessage:r}:s.push(r);const i=e[o+1];if(!a||i&&i.groupedId&&i.groupedId===a.albumId||(s.push(a),a=void 0),i){const e=Number(Object(x.j)(1e3*i.date));n.datetime!==e?(n={originalDate:i.date,datetime:e,senderGroups:[]},c.push(n),s=[],n.senderGroups.push(s)):(i.id===t||r.senderId!==i.senderId||r.isOutgoing!==i.isOutgoing||Object(m.db)(r)||Object(m.db)(i)||r.forwardInfo&&i.forwardInfo&&(r.forwardInfo.senderUserId!==i.forwardInfo.senderUserId||r.forwardInfo.fromChatId!==i.forwardInfo.fromChatId||r.forwardInfo.hiddenUserName!==i.forwardInfo.hiddenUserName)||r.inlineButtons||i.inlineButtons)&&(s=[],n.senderGroups.push(s))}}),c}var Ot=a(95);function jt(){const[e,t]=Object(nt.a)(!1),a=(s=1e3,n=!1,Object(c.p)(()=>Object(g.a)(e=>e(),s,n,r),[s,n,r]));var s,n,r;return{isScrolled:e,updateStickyDates:Object(c.m)((e,s)=>{t(),document.body.classList.contains("is-scrolling-messages")||Object(g.b)(()=>{document.body.classList.add("is-scrolling-messages")}),a(()=>{Object(g.b)(()=>{const t=document.querySelector(".stuck");t&&t.classList.remove("stuck");const a=function(e,t){const a=e.querySelectorAll(".sticky-date"),s=e.scrollTop;return Array.from(a).find(e=>{const{offsetTop:a,offsetHeight:n}=e,c=a-s;return-n<=c&&c<=(t?60:10)})}(e,s);a&&a.classList.add("stuck"),document.body.classList.remove("is-scrolling-messages")})})},[t,a])}}var gt=a(144),ft=a(115);let pt=!1;var It=({containerRef:e,className:t,messageIds:a,containerHeight:s,listItemElementsRef:r,focusingId:o,anchorIdRef:i,anchorTopRef:l,loadMoreForwards:d,loadMoreBackwards:b,isViewportNewest:u,firstUnreadId:m,onFabToggle:h,children:O})=>{const j=Object(c.q)(null),g=Object(c.q)(null),f=Object(c.q)(null),p=Object(c.m)(()=>{if(pt)return;if(!a||!a.length)return void h(!1);if(!u)return void h(!0);const{offsetHeight:t,scrollHeight:s,scrollTop:n}=e.current,c=s-n-t;h(m?!(0===c):!(c<=50))},[a,u,e,h,m]),{observe:I,freeze:v,unfreeze:y}=Object(Ot.a)({rootRef:e,margin:n.K},t=>{if(!d||!b)return;const a=t.find(({isIntersecting:e})=>e);if(!a)return;const{target:s}=a;"backwards-trigger"===s.className?(Object(gt.a)(e.current),b()):"forwards-trigger"===s.className&&s.dataset.isActive&&(Object(gt.a)(e.current),d())});Object(Ot.c)(j,I),Object(Ot.c)(g,I);const{observe:w,freeze:C,unfreeze:E}=Object(Ot.a)({rootRef:e,margin:50},([{target:e}])=>{e.dataset.isActive&&p()});return Object(Ot.c)(f,w),Object(me.a)(()=>{o?(v(),C()):(E(),y())},[o]),Object(me.a)(()=>{if(!r.current)return;const e=r.current.filter(e=>a.includes(Number(e.dataset.messageId))),t=e[1]||e[0];t&&(i.current=t.id,l.current=t.getBoundingClientRect().top)},[a,s]),Object(me.a)(()=>{pt=!0,setTimeout(()=>{pt=!1},100)},[a]),Object(c.n)(p,[m]),c.a.createElement("div",{className:t,teactFastList:!0},c.a.createElement("div",{ref:j,key:"backwards-trigger",className:"backwards-trigger"}),O,c.a.createElement("div",{ref:g,key:"forwards-trigger",className:"forwards-trigger","data-is-active":!u}),c.a.createElement("div",{ref:f,key:"fab-trigger",className:"fab-trigger","data-is-active":u}))},vt=a(131),yt=a(134);function wt(e){return"number"==typeof e}function Ct(e){return e?175:100}function Et(e){const t=Object(m.tb)(e),a=Object(m.qb)(e),s=Object(m.G)(e)||Object(m.Q)(e),n=Object(m.O)(e),c=Boolean(Object(m.Q)(e)),{width:r,height:o}=s?Object(Je.f)(s,t,a,c):Object(Je.h)(n,t,a),i=Ct(Boolean(Object(m.N)(e)));let l=1;re+t,t)}function At(e,t,a){return ea?a:e}function xt(e){const t={width:0,height:0};return e.forEach(({dimensions:e,sides:a})=>{a&kt&&(t.width=e.width+e.x),a&Nt&&(t.height=e.height+e.y)}),t}function Lt(e,t,a,s){const c=a.messages.map(e=>{const t=Et(e);return t.width/t.height});const r=function(e){return e.map(e=>e>1.2?"w":e<.8?"n":"q").join("")}(c),o=function(e){return e.reduce((e,t)=>t+e,1)/e.length}(c),i=c.length,l=c.some(e=>e>2),d=function(e,t,a){return a<=n.T?a/100*69-(t?1.625:0)*Je.c:((e?30:29)-(t?1.625:0))*Je.c}(e,t,s);let b;const u={ratios:c,proportions:r,averageRatio:o,maxWidth:d,minWidth:100,maxHeight:d,spacing:2};return b=i>=5||l?function({ratios:e,averageRatio:t,maxWidth:a,minWidth:s,spacing:n,maxHeight:c=4*a/3}){const r=function(e,t){return e.map(e=>t>1.1?At(e,1,2.75):At(e,.6667,1))}(e,t),o=e.length,i=new Array(o),l=[],d=e=>{const t=[];let s=0;e.forEach(e=>{t.push(((e,t)=>{const s=Tt(r.slice(e,e+t),0);return(a-(t-1)*n)/s})(s,e)),s+=e}),l.push({lineCounts:e,heights:t})};for(let e=1;e!==o;++e){const t=o-e;e<=3&&t<=3&&d([e,t])}for(let e=1;e!==o-1;++e)for(let a=1;a!==o-e;++a){const s=o-e-a;e<=3&&a<=(t<.85?4:3)&&s<=3&&d([e,a,s])}for(let e=1;e!==o-1;++e)for(let t=1;t!==o-e;++t)for(let a=1;a!==o-e-t;++a){const s=o-e-t-a;e<=3&&t<=3&&a<=3&&s<=4&&d([e,t,a,s])}let b,u=0;for(let e=0;e{for(let e=1;e!==r;++e)if(a[e-1]>a[e])return 1.5;return 1})(),m=Math.abs(o-c)*i*d;(!b||m1.4&&t[1]-t[0]<.2?function(e){const{ratios:t,maxWidth:a,spacing:s,maxHeight:n}=e,c=Math.round(Math.min(a/t[0],Math.min(a/t[1],(n-s)/2)));return[{dimensions:{x:0,y:0,width:a,height:c},sides:Pt|St|kt},{dimensions:{x:0,y:c+s,width:a,height:c},sides:Pt|Nt|kt}]}(e):"ww"===a||"qq"===a?function(e){const{ratios:t,maxWidth:a,spacing:s,maxHeight:n}=e,c=(a-s)/2,r=Math.round(Math.min(c/t[0],Math.min(c/t[1],n)));return[{dimensions:{x:0,y:0,width:c,height:r},sides:St|Pt|Nt},{dimensions:{x:c+s,y:0,width:c,height:r},sides:St|kt|Nt}]}(e):function(e){const{ratios:t,minWidth:a,maxWidth:s,spacing:n,maxHeight:c}=e,r=Math.round(1.5*a),o=Math.min(Math.round(Math.max(.4*(s-n),(s-n)/t[0]/(1/t[0]+1/t[1]))),s-n-r),i=s-o-n,l=Math.min(c,Math.round(Math.min(i/t[0],o/t[1])));return[{dimensions:{x:0,y:0,width:i,height:l},sides:St|Pt|Nt},{dimensions:{x:i+n,y:0,width:o,height:l},sides:St|kt|Nt}]}(e)}(u):3===i?function(e){const{proportions:t}=e;return"n"===t[0]?function(e){const{maxHeight:t,spacing:a,ratios:s,maxWidth:n,minWidth:c}=e,r=t,o=Math.round(Math.min((t-a)/2,s[1]*(n-a)/(s[2]+s[1]))),i=r-o-a,l=Math.max(c,Math.round(Math.min((n-a)/2,Math.min(o*s[2],i*s[1])))),d=Math.min(Math.round(r*s[0]),n-a-l);return[{dimensions:{x:0,y:0,width:d,height:r},sides:St|Pt|Nt},{dimensions:{x:d+a,y:0,width:l,height:i},sides:St|kt},{dimensions:{x:d+a,y:i+a,width:l,height:o},sides:Nt|kt}]}(e):function(e){const{maxWidth:t,ratios:a,maxHeight:s,spacing:n}=e,c=t,r=Math.round(Math.min(c/a[0],.66*(s-n))),o=(t-n)/2,i=Math.min(s-r-n,Math.round(Math.min(o/a[1],o/a[2])));return[{dimensions:{x:0,y:0,width:c,height:r},sides:Pt|St|kt},{dimensions:{x:0,y:r+n,width:o,height:i},sides:Nt|Pt},{dimensions:{x:o+n,y:r+n,width:c-o-n,height:i},sides:Nt|kt}]}(e)}(u):function(e){const{proportions:t}=e;return"w"===t[0]?function({maxWidth:e,ratios:t,spacing:a,maxHeight:s,minWidth:n}){const c=e,r=Math.round(Math.min(c/t[0],.66*(s-a))),o=Math.round((e-2*a)/(t[1]+t[2]+t[3])),i=Math.max(n,Math.round(Math.min(.4*(e-2*a),o*t[1]))),l=Math.round(Math.max(Math.max(n,.33*(e-2*a)),o*t[3])),d=c-i-l-2*a,b=Math.min(s-r-a,o);return[{dimensions:{x:0,y:0,width:c,height:r},sides:Pt|St|kt},{dimensions:{x:0,y:r+a,width:i,height:b},sides:Nt|Pt},{dimensions:{x:i+a,y:r+a,width:d,height:b},sides:Nt},{dimensions:{x:i+a+d+a,y:r+a,width:l,height:b},sides:kt|Nt}]}(e):function({maxHeight:e,ratios:t,maxWidth:a,spacing:s,minWidth:n}){const c=e,r=Math.round(Math.min(c*t[0],.6*(a-s))),o=Math.round((e-2*s)/(1/t[1]+1/t[2]+1/t[3])),i=Math.round(o/t[1]),l=Math.round(o/t[2]),d=c-i-l-2*s,b=Math.max(n,Math.min(a-r-s,o));return[{dimensions:{x:0,y:0,width:r,height:c},sides:St|Pt|Nt},{dimensions:{x:r+s,y:0,width:b,height:i},sides:St|kt},{dimensions:{x:r+s,y:i+s,width:b,height:l},sides:kt},{dimensions:{x:r+s,y:i+l+2*s,width:b,height:d},sides:Nt|kt}]}(e)}(u),{layout:b,containerStyle:xt(b)}}let Rt;function Ft(e){return Rt||(Rt=document.createElement("span"),Rt.style.font='400 12px Roboto, "Helvetica Neue", "Apple Color Emoji", sans-serif',Rt.style.whiteSpace="nowrap",Rt.style.position="absolute",Rt.style.left="-999px",Rt.style.opacity=".01",document.body.appendChild(Rt)),Rt.innerHTML=e,Rt.offsetWidth}function Bt(e,t,a,s,n){Object(c.o)(()=>{if(a&&e.current){const t=e.current.closest(".MessageList");Object(ft.a)(t,e.current,n?"end":"center",20,void 0===s?1500:1e3,s)}},[e,t,a,s,n])}var Dt=a(99),Ut=a(177);var Ht=e=>{const{isOpen:t}=e,a=Object(Ie.a)(pe.a.Extra,"ContextMenuContainer",!t);return a?c.a.createElement(a,e):void 0};var qt=Object(c.h)(Object(s.h)((e,{message:t})=>{const a=t.senderId,{targetUserId:s,targetChatId:n}=t.content.action||{},c=t.replyToMessageId,r=c?Object(o.k)(e,t.chatId,c):void 0,i=Object(o.S)(e,t),{direction:l,noHighlight:d}=i&&e.focusedMessage||{},b=Object(o.f)(e,t.chatId);return{sender:b&&(Object(m.jb)(b)||a===t.chatId)?b:a?Object(o.Bb)(e,a):void 0,...s&&{targetUser:Object(o.Bb)(e,s)},targetChatId:n,targetMessage:r,isFocused:i,...i&&{focusDirection:l,noFocusHighlight:d}}})(({message:e,observeIntersection:t,isEmbedded:a,sender:s,targetUser:n,targetMessage:r,targetChatId:o,isFocused:i,focusDirection:l,noFocusHighlight:d})=>{const b=Object(c.q)(null);Object(Ot.c)(b,t),Object(ze.a)(e.chatId,e.replyToMessageId,r),Bt(b,e.chatId,i,l,d),Object(te.a)();const u=Object(Ut.a)(e,s,n,r,o,a?{isEmbedded:!0,asPlain:!0}:void 0),{isContextMenuOpen:m,contextMenuPosition:h,handleBeforeContextMenu:O,handleContextMenu:j,handleContextMenuClose:g,handleContextMenuHide:f}=Object(vt.a)(b),p=void 0!==h;return a?c.a.createElement("span",{className:"embedded-action-message"},Object(Ze.a)(u)):c.a.createElement("div",{ref:b,id:"message"+e.id,className:Object(J.a)("ActionMessage message-list-item",i&&!d&&"focused",p&&"has-menu-open"),"data-message-id":e.id,onMouseDown:O,onContextMenu:j},c.a.createElement("span",null,u),h&&c.a.createElement(Ht,{isOpen:m,anchor:h,message:e,messageListType:"thread",onClose:g,onCloseAnimationEnd:f}))}));a(204);var Gt=({className:e,message:t,sender:a,title:s,customText:n,observeIntersection:r,onClick:o})=>{const i=Object(c.q)(null),l=Object(Ot.b)(i,r),d=Object(Xe.a)(t&&Object(m.D)(t,"pictogram"),!l),b=t&&"sticker-reply-thumb"+t.id,u=tt(t);Object(te.a)();const h=a&&Object(m.U)(a);return c.a.createElement("div",{ref:i,className:Object(J.a)("EmbeddedMessage",e),onClick:t?o:void 0},u&&function(e,t,a){const{width:s,height:n}=Object(Je.k)();return c.a.createElement("img",{id:e,src:a||t,width:s,height:n,alt:""})}(b,u,d),c.a.createElement("div",{className:"message-text"},c.a.createElement("div",{className:"message-title"},Object(Ze.a)(h||s||" ")),c.a.createElement("p",null,t?Object(m.db)(t)?c.a.createElement(qt,{message:t,isEmbedded:!0}):Object(Ze.a)(Object(m.M)(t,Boolean(u))):n||" ")))},_t=a(150),zt=a(155),Vt=a(161);a(208);var $t=({message:e,outgoingStatus:t,signature:a,onClick:s})=>{const n=Object(te.a)();return c.a.createElement("span",{className:"MessageMeta",onClick:s},Boolean(e.views)&&c.a.createElement(c.a.Fragment,null,c.a.createElement("span",{className:"message-views"},Object($e.b)(e.views)),c.a.createElement("i",{className:"icon-channelviews"})),a&&c.a.createElement("span",{className:"message-signature"},Object(Ze.a)(a)),c.a.createElement("span",{className:"message-time"},e.isEdited&&n("EditedMessage")+" ",Object(x.h)(1e3*e.date)),t&&c.a.createElement(Vt.a,{status:t}))},Wt=a(102),Qt=a(105),Kt=a(151);a(209);var Yt=({message:e,observeIntersection:t,observeIntersectionForPlaying:a,shouldLoop:s,lastSyncTime:r})=>{const o=Object(c.q)(null),[i,l,d]=Object(nt.a)(),b=e.content.sticker,{isAnimated:u,stickerSetId:h}=b,O=h===n.I,j=Object(Ot.b)(o,t),g=Object(Ot.b)(o,a),f=b.isPreloadedGlobally?"sticker"+b.id:Object(m.D)(e,"inline"),p=tt(e),I=Object(Xe.a)(f,!j,Object(m.C)(e,"inline",!0),r),v=Boolean(I),[y,w]=Object(nt.a)(v),C=u?y:v,{shouldRenderFullMedia:E,transitionClassNames:M}=Object(Wt.a)(C,"slow"),{width:S,height:k}=Object(Je.l)(b),N=Object(J.a)("thumbnail",!p&&"empty"),P=Object(J.a)("Sticker media-inner",O&&"inactive");return c.a.createElement("div",{ref:o,className:P,onClick:O?void 0:l},!C&&c.a.createElement("img",{id:"sticker-thumb-"+e.id,src:p,width:S,height:k,alt:"",className:N}),!u&&E&&c.a.createElement("img",{id:"sticker-"+e.id,src:I,width:S,height:k,alt:"",className:Object(J.a)("full-media",M)}),u&&v&&c.a.createElement(Qt.a,{key:f,className:Object(J.a)("full-media",M),id:f,animationData:I,size:S,play:g,noLoop:!s,onLoad:w}),c.a.createElement(Kt.a,{isOpen:i,fromSticker:b,onClose:d}))},Jt=a(119),Zt=a(112),Xt=a(135);function ea(e,t){return Object(Xt.a)(Object(m.E)(e),Boolean(t),h.f?n.A:void 0)}var ta=async(e,t,a,s)=>s?"rgba(255,255,255,1)":async function(e,t){const a=new Image;a.src=e,a.width||await new Promise(e=>{a.onload=e});const s=document.createElement("canvas"),n=s.getContext("2d");s.width=a.width,s.height=a.height,n.drawImage(a,0,0,a.width,a.height);const c=t?a.width-1:0,r=a.height-1;return`rgba(${Array.from(n.getImageData(c,r,1,1).data).join(",")})`}(e,t);var aa=a(113);var sa=({id:e,message:t,observeIntersection:a,shouldAutoLoad:s,isInSelectMode:n,isSelected:r,uploadProgress:o,size:i="inline",dimensions:l,shouldAffectAppendix:d,onClick:b,onCancelUpload:u})=>{const h=Object(c.q)(null),O=(Object(m.G)(t)||Object(m.Q)(t)).blobUrl,j=Object(Ot.b)(h,a),[g,f]=Object(c.r)(s),p=g&&j,{mediaData:I,downloadProgress:v}=Object(Zt.a)(Object(m.D)(t,i),!p),y=O||I,w=ea(t,y),{isUploading:C,isTransferring:E,transferProgress:M}=Object(m.s)(t,o||v,p&&!y),S=!1===Object(He.a)(g),{shouldRender:k,transitionClassNames:N}=Object(Y.a)(E,void 0,S,"slow"),{shouldRenderThumb:P,shouldRenderFullMedia:T,transitionClassNames:A}=Object(Wt.a)(y,"slow"),x=Object(c.m)(()=>{C?u&&u(t):y?b&&b(t.id):f(e=>!e)},[y,C,t,u,b]),L=Object(m.tb)(t);Object(c.o)(()=>{if(!d)return;const e=h.current.closest(".message-content");y?ta(y,L,0,r).then(t=>{e.style.setProperty("--appendix-bg",t),e.setAttribute("data-has-custom-appendix","")}):e.classList.add("has-appendix-thumb")},[y,L,d,n,r]);const{width:R,height:F,isSmall:B}=l||Et(t),D=Object(J.a)("media-inner",!C&&"interactive",B&&"small-image",R===F&&"square-image"),U=Object(J.a)("thumbnail",!w&&"empty"),H=l?`width: ${R}px; height: ${F}px; left: ${l.x}px; top: ${l.y}px;`:"";return c.a.createElement("div",{id:e,ref:h,className:D,style:H,onClick:C?void 0:x},P&&c.a.createElement("img",{src:w,className:U,width:R,height:F,alt:""}),T&&c.a.createElement("img",{src:y,className:"full-media "+A,width:R,height:F,alt:""}),k&&c.a.createElement("div",{className:"media-loading "+N},c.a.createElement(aa.a,{progress:M,onClick:C?x:void 0})),!y&&!g&&c.a.createElement("i",{className:"icon-download"}),E&&c.a.createElement("span",{className:"message-upload-progress"},Math.round(100*M),"%"))},na=a(121),ca=a(133);function ra(e,t){const a=Object(c.q)();a.current=t;const s=Object(c.m)(()=>{e.current&&e.current.pause()},[e]),n=Object(c.m)(()=>{e.current&&a.current&&Object(ca.a)(e.current)},[e]);Object(K.a)(s,n)}var oa=a(136);function ia(){return(ia=Object.assign||function(e){for(var t=1;t{const b=Object(c.q)(null),u=Object(c.q)(null),h=t.content.video,O=h.blobUrl,j=Boolean(O)||Object(m.b)(h),g=Object(Ot.b)(b,a),[f,p]=Object(c.r)(s),I=Boolean(f&&g&&o),[v,y]=Object(c.r)(n),w=Object(Xe.a)(Object(m.D)(t,"pictogram"),!(g&&o),Object(m.C)(t,"pictogram"),o),C=ea(t,w),{mediaData:E,downloadProgress:M}=Object(Zt.a)(Object(m.D)(t,"inline"),!I,Object(m.C)(t,"inline"),o),S=w||C,k=O||E,N=Boolean(j&&g&&k),{isBuffered:P,bufferingHandlers:T}=Object(na.a)(!s),{isUploading:A,isTransferring:L,transferProgress:R}=Object(m.s)(t,r||M,I&&j&&!P),F=!1===Object(He.a)(f),{shouldRender:B,transitionClassNames:D}=Object(Y.a)(L,void 0,F),{shouldRenderThumb:U,transitionClassNames:H}=Object(Wt.a)(k,"slow"),[q,G]=Object(c.r)(0),_=Object(c.m)(e=>{G(Math.max(0,e.currentTarget.currentTime-1))},[]),z=Object(m.tb)(t),V=Object(m.qb)(t),{width:$,height:W}=i||Object(Je.h)(h,z,V);ra(u,N),Object(oa.a)(u,[N]);const Q=Object(c.m)(()=>{A?d&&d(t):j&&!k?p(e=>!e):j&&k&&!v?(y(!0),u.current.play()):l&&l(t.id)},[A,j,k,v,l,d,t]),K=Object(J.a)("media-inner dark",!A&&"interactive"),Z=Object(J.a)("thumbnail",!S&&"empty"),X=Object(J.a)("full-media",H),ee=S?`background-image: url(${S}); background-size: cover`:"",te=i?`width: ${$}px; height: ${W}px; left: ${i.x}px; top: ${i.y}px;`:"",ae=N,se=!j&&E,ne=!j||f&&!v&&!B,ce=j&&!f;return c.a.createElement("div",{ref:b,id:e,className:K,style:te,onClick:A?void 0:Q},(U||!N)&&c.a.createElement("img",{src:S,className:Z,width:$,height:W,alt:""}),ae&&c.a.createElement("video",ia({ref:u,className:X,width:$,height:W,autoPlay:v,muted:!0,loop:!0,playsInline:!0,style:ee},T,{onTimeUpdate:_}),c.a.createElement("source",{src:k})),se&&c.a.createElement("img",{src:E,className:"full-media "+H,width:$,height:W,alt:""}),ne&&c.a.createElement("i",{className:"icon-large-play"}),B&&c.a.createElement("div",{className:"media-loading "+D},c.a.createElement(aa.a,{progress:R,onClick:A?Q:void 0})),ce&&c.a.createElement("i",{className:"icon-download"}),L&&!j?c.a.createElement("span",{className:"message-upload-progress"},Math.round(100*R),"%"):L&&j?c.a.createElement("span",{className:"message-upload-progress"},"..."):c.a.createElement("div",{className:"message-media-duration"},h.isGif?"GIF":Object(x.e)(h.duration-q)))},da=a(19);a(211);var ba=Object(s.h)((e,{contact:t})=>({user:Object(o.Bb)(e,t.userId)}),(e,t)=>Object(d.l)(t,["openUserInfo"]))(({contact:e,user:t,openUserInfo:a})=>{const{firstName:s,lastName:n,phoneNumber:r,userId:o}=e,i=Object(c.m)(()=>{a({id:o})},[a,o]);return c.a.createElement("div",{className:Object(J.a)("Contact",Boolean(o)&&"interactive"),onClick:o?i:void 0},c.a.createElement(Dt.a,{size:"large",user:t,text:s||n}),c.a.createElement("div",{className:"contact-info"},c.a.createElement("div",{className:"contact-name"},s," ",n),c.a.createElement("div",{className:"contact-phone"},Object(da.c)(r))))}),ua=a(40);var ma=Object(c.h)(({id:e,options:t,selected:a=[],disabled:s,round:n,loadingOptions:r,onChange:o})=>{const[i,l]=Object(c.r)([]),d=Object(c.m)(e=>{const{value:t,checked:a}=e.currentTarget;let s;s=a?[...i,t]:i.filter(e=>e!==t),l(s),o(s)},[o,i]);return c.a.createElement("div",{id:e,className:"radio-group"},t.map(e=>c.a.createElement(ua.a,{label:e.label,subLabel:e.subLabel,value:e.value,checked:-1!==a.indexOf(e.value),disabled:s,round:n,isLoading:r?-1!==r.indexOf(e.value):void 0,onChange:d})))}),ha=a(117),Oa=a(169);a(214);function ja(e,t){return t>0?(e/t*100).toFixed():0}var ga=({answer:e,voteResults:t,totalVoters:a,maxVotersCount:s,correctResults:n,shouldAnimate:r})=>{const o=t&&t.find(t=>t.option===e.option),i=0===n.length||-1!==n.indexOf(e.option),l=n.length>0&&i||o&&o.isChosen,d=o?ja(o.votersCount,a||0):0,[b,u]=Object(c.r)(r?0:d),m=Object(c.q)(null),h=o?ja(o.votersCount,s||0):0,O=b{r&&u(d)},[r,d]),Object(c.n)(()=>{const e=m.current;if(e&&r){const t=e.firstElementChild,a=O?"":"stroke-dasharray: 100% 200%; stroke-dashoffset: -44";t?t.setAttribute("style",a):e.innerHTML=`\n \n \n `}},[O,r]),!t||!o)return;const j=`width: ${h}%; transform:scaleX(${O?0:1})`;return c.a.createElement("div",{className:"PollOption"},c.a.createElement("div",{className:"poll-option-share "+("100"===d?"limit-width":"")},d,"%",l&&c.a.createElement("span",{className:Object(J.a)("poll-option-chosen",!i&&"wrong",r&&"animate")},c.a.createElement("i",{className:i?"icon-check":"icon-close"}))),c.a.createElement("div",{className:"poll-option-right"},c.a.createElement("div",{className:"poll-option-text"},Object(Ze.a)(e.text)),c.a.createElement("div",{className:Object(J.a)("poll-option-answer",l&&!i&&"wrong")},c.a.createElement("div",{className:"poll-option-corner",ref:m}),c.a.createElement("div",{className:"poll-option-line",style:j}))))};a(215);var fa=Object(c.h)(Object(s.h)((e,{poll:t})=>{const{recentVoterIds:a}=t.results,{byId:s}=e.users;return a&&0!==a.length?{recentVoterIds:a,usersById:s}:{}},(e,t)=>Object(d.l)(t,["loadMessage","openPollResults"]))(({message:e,poll:t,recentVoterIds:a,usersById:s,loadMessage:n,onSendVote:r,openPollResults:o})=>{const{id:i,chatId:l}=e,{summary:d,results:b}=t,[u,m]=Object(c.r)(!1),[h,O]=Object(c.r)([]),[j,g]=Object(c.r)(!1),[f,p]=Object(c.r)(!1),[I,v]=Object(c.r)(!d.closed&&d.closeDate&&d.closeDate>0?Math.min(d.closeDate-Math.floor(Date.now()/1e3),d.closePeriod):0),y=Object(c.q)(null),{results:w,totalVoters:C}=b,E=w&&w.some(e=>e.isChosen),M=!d.closed&&!E,S=!M&&d.isPublic&&Number(b.totalVoters)>0,k=M&&d.multipleChoice,N=w?Math.max(...w.map(e=>e.votersCount)):C,P=w?w.reduce((e,t)=>(t.isCorrect&&e.push(t.option),e),[]):[],T=d.answers.map(e=>({label:e.text,value:e.option,hidden:Boolean(d.quiz&&d.closePeriod&&I<=0)}));Object(c.n)(()=>{u&&t.results.results&&t.results.results.some(e=>e.isChosen)&&m(!1)},[u,t.results.results]),Object(c.n)(()=>{I>0&&setTimeout(()=>v(I-1),1e3);const e=y.current;if(e){const t=12*Math.PI,a=e.lastElementChild,s=e.firstElementChild;if(I<=5&&e.classList.add("hurry-up"),a&&s){const e=(d.closePeriod-I)/d.closePeriod*t;s.textContent=Object(x.e)(I),a.firstElementChild.setAttribute("stroke-dashoffset","-"+e)}else e.innerHTML=`\n ${Object(x.e)(I)}\n \n \n `}},[I,d.closePeriod]),Object(c.n)(()=>{d.quiz&&(I<=0||E&&!d.closed)&&n({chatId:l,messageId:i})},[l,I,E,n,i,d.closed,d.quiz]),Object(c.n)(()=>{let e;return d.quiz&&!d.closed&&d.closePeriod&&d.closePeriod>0&&(e=window.setTimeout(()=>{n({chatId:l,messageId:i})},1e3*d.closePeriod)),()=>{e&&window.clearTimeout(e)}},[M,l,n,i,d.closePeriod,d.closed,d.quiz]);const A=Object(c.p)(()=>a?a.reduce((e,t)=>{const a=s[t];return a&&e.push(a),e},[]):[],[s,a]),L=Object(c.m)(e=>{O([e]),m(!0),p(!0),r([e])},[r]),R=Object(c.m)(e=>{O(e)},[]),F=Object(c.m)(()=>{m(!0),p(!0),r(h)},[r,h]),B=Object(c.m)(()=>{o({chatId:l,messageId:i})},[l,i,o]),D=Object(c.m)(()=>{g(!0)},[]),U=Object(c.m)(()=>{g(!1),p(!1)},[]);Object(c.n)(()=>{if(f&&E&&d.quiz&&b.results&&t.results.solution){b.results.find(e=>e.isChosen&&e.isCorrect)||g(!0)}},[E,f,b.results,d.quiz,t.results.solution]);const H=Object(te.a)();return c.a.createElement("div",{className:"Poll"},j&&t.results.solution&&c.a.createElement(Oa.a,{message:Object(yt.b)(t.results.solution,t.results.solutionEntities),duration:5e3,onDismiss:U}),c.a.createElement("div",{className:"poll-question"},Object(Ze.a)(d.question)),c.a.createElement("div",{className:"poll-type"},function(e){if(void 0===e.isPublic)return" ";if(e.quiz)return e.isPublic?"Quiz":"Anonymous Quiz";if(e.closed)return"Final results";return e.isPublic?"Poll":"Anonymous Poll"}(d),A.length>0&&c.a.createElement("div",{className:"poll-recent-voters"},A.map(e=>c.a.createElement(Dt.a,{size:"micro",user:e}))),I>0&&M&&c.a.createElement("div",{ref:y,className:"poll-countdown"}),d.quiz&&t.results.solution&&!M&&c.a.createElement(ne.a,{round:!0,size:"tiny",color:"translucent",className:"poll-quiz-help",disabled:j,onClick:D,ariaLabel:"Show Solution"},c.a.createElement("i",{className:"icon-lamp"}))),M&&c.a.createElement("div",{className:"poll-answers"},k?c.a.createElement(ma,{options:T,onChange:R,disabled:e.isScheduled||u,loadingOptions:u?h:void 0,round:!0}):c.a.createElement(ha.a,{name:"poll-"+i,options:T,onChange:L,disabled:e.isScheduled||u,loadingOption:u?h[0]:void 0})),!M&&c.a.createElement("div",{className:"poll-results"},d.answers.map((function(e){return c.a.createElement(ga,{key:e.option,shouldAnimate:f,answer:e,voteResults:w,totalVoters:C,maxVotersCount:N,correctResults:P})}))),!S&&!k&&c.a.createElement("div",{className:"poll-voters-count"},function(e,t){if(!t)return e?"No answers yet":"No voters yet";return e?t+" answered":t+" voted"}(d.quiz,b.totalVoters)),k&&c.a.createElement(ne.a,{isText:!0,disabled:0===h.length,size:"tiny",onClick:F},H("PollSubmitVotes")),S&&c.a.createElement(ne.a,{isText:!0,size:"tiny",onClick:B},H("PollViewResults")))})),pa=a(145),Ia=a(52);a(216);var va=Object(c.h)(({message:e,observeIntersection:t,shouldAutoLoad:a,inPreview:s,onMediaClick:n,onCancelMediaTransfer:r})=>{const o=Object(m.P)(e);let i=!1;if(o&&o.photo){const{width:t,height:a}=Et(e);i=t===a}const l=Object(c.m)(()=>{o&&(i||o.hasDocument)?window.open(o.url):n&&n()},[o,i,n]);if(!o)return;const{siteName:d,url:b,displayUrl:u,title:h,description:O,photo:j}=o,g=Object(pa.a)(O,170),f=["WebPage",j?i&&"with-square-photo":!s&&"without-photo"].filter(Boolean).join(" ");return c.a.createElement("div",{className:f,"data-initial":(d||u)[0]},j&&c.a.createElement(sa,{message:e,observeIntersection:t,shouldAutoLoad:a,size:i?"pictogram":"inline",onClick:l,onCancelUpload:r}),c.a.createElement("div",{className:"WebPage-text"},c.a.createElement(Ia.a,{className:"site-name",url:b,text:d||u}),h&&c.a.createElement("p",{className:"site-title"},Object(Ze.a)(h)),g&&c.a.createElement("p",{className:"site-description"},Object(Ze.a)(g,["emoji","br"]))))});a(217);var ya=Object(c.h)(({message:e})=>{const t=Object(m.z)(e),{title:a,text:s,description:n,photoUrl:r}=t;return c.a.createElement("div",{className:"Invoice"},a&&c.a.createElement("p",{className:"title"},Object(Ze.a)(a)),s&&c.a.createElement("p",null,Object(Ze.a)(s,["emoji","br"])),c.a.createElement("div",{className:"description "+(r?"has-image":"")},r&&c.a.createElement("img",{className:"invoice-image",src:r,alt:""}),n&&c.a.createElement("p",{className:"description-text"},Object(Ze.a)(n,["emoji","br"]))))});function wa(e){return Object(c.h)(Object(s.h)((e,t)=>{const{message:a}=t;return{isInSelectMode:Object(o.Q)(e),isSelected:Object(o.T)(e,a.id)}},(e,t)=>Object(d.l)(t,["toggleMessageSelection"]))(t=>{const{isInSelectMode:a,isSelected:s,message:n,toggleMessageSelection:r,dimensions:o}=t,i=Object(c.m)(e=>{e.stopPropagation(),r({messageId:n.id,withShift:e&&e.shiftKey})},[r,n]),l=Object(c.p)(()=>({...t,isInSelectMode:a,isSelected:s,dimensions:{...t.dimensions,x:0,y:0},onClick:a?void 0:t.onClick}),[t,a,s]);return c.a.createElement("div",{className:Object(J.a)("album-item-select-wrapper",s&&"is-selected"),style:o?`left: ${o.x}px; top: ${o.y}px;`:"",onClick:a?i:void 0},a&&c.a.createElement("div",{className:"message-select-control"},s&&c.a.createElement("i",{className:"icon-select"})),c.a.createElement(e,l))}))}a(218);const Ca=wa(sa),Ea=wa(la);var Ma=Object(s.h)(e=>({uploadsById:e.fileUploads.byMessageLocalId}),(e,t)=>Object(d.l)(t,["cancelSendingMessage"]))(({album:e,observeIntersection:t,shouldAutoLoad:a,shouldAutoPlay:s,hasCustomAppendix:n,lastSyncTime:r,isOwn:o,albumLayout:i,onMediaClick:l,uploadsById:d,cancelSendingMessage:b})=>{const u=e.messages.length,h=Object(c.m)(e=>{b({chatId:e.chatId,messageId:e.id})},[b]);const{width:O,height:j}=i.containerStyle;return c.a.createElement("div",{className:"Album",style:`width: ${O}px; height: ${j}px;`},e.messages.map((function(e,b){const{photo:O,video:j}=Object(m.v)(e),g=d[e.previousLocalId||e.id],f=g?g.progress:void 0,{dimensions:p,sides:I}=i.layout[b];if(O){const s=n&&(o?b===u-1:Boolean(I&Pt&&I&Nt));return c.a.createElement(Ca,{id:"album-media-"+e.id,message:e,observeIntersection:t,shouldAutoLoad:a,shouldAffectAppendix:s,uploadProgress:f,dimensions:p,onClick:l,onCancelUpload:h})}if(j)return c.a.createElement(Ea,{id:"album-media-"+e.id,message:e,observeIntersection:t,shouldAutoLoad:a,shouldAutoPlay:s,uploadProgress:f,lastSyncTime:r,dimensions:p,onClick:l,onCancelUpload:h})})))});a(219);function Sa(){return(Sa=Object.assign||function(e){for(var t=1;t{const r=Object(c.q)(null),o=Object(c.q)(null),i=Object(c.q)(null),l=e.content.video,d=Object(Ot.b)(r,t),[b,u]=Object(c.r)(a&&s),h=Boolean(b&&d&&n),{mediaData:O,downloadProgress:j}=Object(Zt.a)(Object(m.D)(e,"inline"),!h,Object(m.C)(e,"inline"),n),g=ea(e,O),{isBuffered:f,bufferingHandlers:p}=Object(na.a)(),I=b&&!f,v=!1===Object(He.a)(b),{shouldRender:y,transitionClassNames:w}=Object(Y.a)(I||!f,void 0,v),{shouldRenderThumb:C,transitionClassNames:E}=Object(Wt.a)(O,"slow"),[M,S]=Object(c.r)(!1),[k,N]=Object(c.r)(0);Object(c.n)(()=>{if(!M)return;const e=188*Math.PI,t=e-k*e,a=i.current,s=o.current,n=s.firstElementChild;n?n.firstElementChild.setAttribute("stroke-dashoffset",t.toString()):s.innerHTML=`\n \n `,N(a.currentTime/a.duration)},[M,k]);const P=Boolean(O&&d);Object(c.n)(()=>{i.current&&(P?Object(ca.a)(i.current):i.current.pause())},[P]),ra(i,P),Object(oa.a)(i,[O]);const T=Object(c.m)(()=>{if(!O)return void u(e=>!e);const e=i.current;M?e.paused?Object(ca.a)(e):e.pause():(e.currentTime=0,S(!0))},[M,O]),A=Object(c.m)(e=>{const t=e.currentTarget;N(t.currentTime/t.duration)},[]),L=Object(c.m)(()=>{S(!1),N(0),Object(ca.a)(i.current),requestAnimationFrame(()=>{o.current.innerHTML=""})},[]),R=Object(J.a)("full-media",E);return c.a.createElement("div",{ref:r,className:"RoundVideo media-inner",onClick:T},C&&c.a.createElement("div",{className:"thumbnail-wrapper"},c.a.createElement("img",{src:g,className:"thumbnail",width:Je.d,height:Je.d,alt:""})),O&&c.a.createElement("div",{className:"video-wrapper"},c.a.createElement("video",Sa({ref:i,className:R,width:Je.d,height:Je.d,autoPlay:!0,muted:!M,loop:!M,playsInline:!0,poster:g,onEnded:M?L:void 0},p,{onTimeUpdate:M?A:void 0}),c.a.createElement("source",{src:O}))),c.a.createElement("div",{className:"progress",ref:o}),y&&c.a.createElement("div",{className:"media-loading "+w},c.a.createElement(aa.a,{progress:j})),!O&&!b&&c.a.createElement("i",{className:"icon-large-play"}),c.a.createElement("div",{className:"message-media-duration"},M?Object(x.e)(i.current.currentTime):Object(x.e)(l.duration),(!M||i.current.paused)&&c.a.createElement("i",{className:"icon-muted-chat"})))};a(220);var Na=({message:e,onClick:t})=>c.a.createElement("div",{className:"InlineButtons"},e.inlineButtons.map(e=>c.a.createElement("div",{className:"row"},e.map(e=>c.a.createElement(ne.a,{size:"tiny",ripple:!0,disabled:"NOT_SUPPORTED"===e.type,onClick:()=>t({button:e})},e.text)))));a(221);var Pa=Object(c.h)(Object(s.h)((e,{message:t})=>{const{threadId:a,chatId:s}=t.threadInfo,n=Object(o.xb)(e,s,a)||t.threadInfo,{byId:c}=e.users,{byId:r}=e.chats;return{threadInfo:n,usersById:c,chatsById:r}},(e,t)=>Object(d.l)(t,["openChat"]))(({disabled:e,threadInfo:t,usersById:a,chatsById:s,openChat:n})=>{const{threadId:r,chatId:o,messagesCount:i,lastMessageId:l,lastReadInboxMessageId:d,recentReplierIds:b}=t,u=Object(c.m)(()=>{n({id:o,threadId:r})},[n,o,r]);if(void 0===i)return;const h=b&&b.map(e=>Object(m.lb)(e)?a[e]:s[e]).filter(Boolean);const O=Boolean(d&&l&&d0&&c.a.createElement("div",{className:"recent-repliers"},h.map(e=>c.a.createElement(Dt.a,{key:e.id,size:"small",user:Object(m.lb)(e.id)?e:void 0,chat:Object(m.lb)(e.id)?void 0:e}))),c.a.createElement("div",{className:"label"},function(e){if(0===e)return"Leave a Comment";if(1===e)return"1 Comment";return Object($e.a)(e)+" Comments"}(i)),c.a.createElement("i",{className:"icon-next"}))}));a(222);function Ta(e){const t=xa(e.currentTarget);t&&t.setAttribute("data-is-document-group-hover","")}function Aa(e){const t=xa(e.currentTarget);t&&t.removeAttribute("data-is-document-group-hover")}function xa(e){let t=e;do{t=t.nextElementSibling}while(t&&!t.classList.contains("last-in-document-group"));return t}var La=Object(c.h)(Object(s.h)((e,t)=>{const{focusedMessage:a,forwardMessages:s,lastSyncTime:n}=e,{message:c,album:r,withSenderName:i,withAvatar:l,threadId:d,messageListType:b}=t,{id:u,chatId:h,viaBotId:O,replyToMessageId:j,isOutgoing:g}=c,f=Object(o.f)(e,h),p=Object(o.N)(e,h),I=f&&Object(m.jb)(f),v=!p&&Object(m.eb)(c),y=i||l||v?Object(o.ob)(e,c):void 0,w=Object(o.I)(e,c),C=O?Object(o.Bb)(e,O):void 0,E=d?Object(o.zb)(e,h,d):void 0,M=c.id===E,S=j===E,k=j&&!S?Object(o.k)(e,h,j):void 0,N=k&&Object(o.ob)(e,k),P=Object(o.Ab)(e,c),T="thread"===b&&(r?r.messages.some(t=>Object(o.S)(e,t)):Object(o.S)(e,c)),{direction:A,noHighlight:x}=T&&a||{},L=s.messageIds&&s.messageIds.includes(u),{query:R}=Object(o.z)(e)||{},F=Object(m.K)(c);let B;return B=r&&r.messages?r.messages.every(({id:t})=>Object(o.T)(e,t)):Object(o.T)(e,u),{forceSenderName:v,sender:y,originSender:w,botSender:C,shouldHideReply:S,isThreadTop:M,replyMessage:k,replyMessageSender:N,...g&&{outgoingStatus:Object(o.ab)(e,c,"scheduled"===b)},..."number"==typeof P&&{uploadProgress:P},isFocused:T,...T&&{focusDirection:A,noFocusHighlight:x},isForwarding:L,isChatWithSelf:p,isChannel:I,lastSyncTime:n,highlight:R,isSingleEmoji:Boolean(F),animatedEmoji:F?Object(o.c)(e,F):void 0,isInSelectMode:Object(o.Q)(e),isSelected:B,isGroupSelected:!!c.groupedId&&!c.isInAlbum&&Object(o.O)(e,h,c.groupedId),threadId:d,isPinnedList:"pinned"===b,shouldAutoLoadMedia:f?Object(o.pb)(e,c,f,y):void 0,shouldAutoPlayMedia:Object(o.qb)(e,c),shouldLoopStickers:Object(o.rb)(e)}},(e,t)=>Object(d.l)(t,["focusMessage","openMediaViewer","openAudioPlayer","cancelSendingMessage","openUserInfo","openChat","markMessagesRead","sendPollVote","toggleMessageSelection","setReplyingToId","openForwardMenu","clickInlineButton"]))(({message:e,observeIntersectionForBottom:t,observeIntersectionForMedia:a,observeIntersectionForAnimatedStickers:s,album:n,withAvatar:r,withSenderName:o,noComments:d,isFirstInGroup:b,isLastInGroup:u,isFirstInDocumentGroup:h,isLastInDocumentGroup:O,isLastInList:j,forceSenderName:g,sender:f,originSender:p,botSender:I,isThreadTop:v,shouldHideReply:y,replyMessage:w,replyMessageSender:C,outgoingStatus:E,uploadProgress:M,isFocused:S,focusDirection:k,noFocusHighlight:N,isForwarding:P,isChatWithSelf:T,isChannel:A,lastSyncTime:x,highlight:L,animatedEmoji:R,isInSelectMode:F,isSelected:B,isGroupSelected:D,threadId:U,messageListType:H,isPinnedList:q,shouldAutoLoadMedia:G,shouldAutoPlayMedia:_,shouldLoopStickers:z,focusMessage:V,openMediaViewer:$,openAudioPlayer:W,openUserInfo:Q,openChat:K,cancelSendingMessage:Y,markMessagesRead:Z,sendPollVote:X,toggleMessageSelection:ee,setReplyingToId:ae,openForwardMenu:se,clickInlineButton:ce})=>{const re=Object(c.q)(null),oe=Object(c.q)(null),ie=Object(c.q)(null);Object(Ot.c)(oe,t);const{width:le}=Ue(),{isContextMenuOpen:de,contextMenuPosition:be,handleBeforeContextMenu:ue,handleContextMenu:me,handleContextMenuClose:he,handleContextMenuHide:Oe}=Object(vt.a)(re),{chatId:je,id:ge,threadInfo:fe}=e,pe=Object(m.tb)(e),Ie="scheduled"===H||e.isScheduled,ve=Object(m.ub)(e)&&!y,ye=Boolean(fe)&&"thread"===H,{forwardInfo:we,viaBotId:Ce}=e,Ee=we&&!T&&!we.isLinkedChannelPost,Me=!!e.groupedId&&!e.isInAlbum,Se=Boolean(n)&&n.messages.length>1,{text:ke,photo:Ne,video:Pe,audio:Te,voice:Ae,document:xe,sticker:Le,contact:Re,poll:Fe,webPage:Be,invoice:De}=Object(m.v)(e),He=Object(m.x)(e),qe=Object(yt.a)(e,L,wt(He)),Ge=void 0!==be,_e=Object(J.a)("Message message-list-item",b&&"first-in-group",u&&"last-in-group",h&&"first-in-document-group",O&&"last-in-document-group",j&&"last-in-list",pe&&"own",Boolean(e.views)&&"has-views",e.isEdited&&"was-edited",ve&&"has-reply",Ge&&"has-menu-open",S&&!N&&"focused",P&&"is-forwarding",e.isDeleting&&"is-deleting",Me&&"is-in-document-group",Se&&"is-album",e.hasUnreadMention&&"has-unread-mention",B&&"is-selected",F&&"is-in-selection-mode",v&&"is-thread-top",Boolean(e.inlineButtons)&&"has-inline-buttons"),Ve=function(e,{hasReply:t,customShape:a,isLastInGroup:s,asForwarded:n,hasThread:c,forceSenderName:r,hasComments:o}={}){const{text:i,photo:l,video:d,audio:b,voice:u,document:h,poll:O,webPage:j,contact:g}=Object(m.v)(e),f=["message-content"],p=(l||d)&&!i,I=Boolean(e.viaBotId);return wt(a)?f.push("emoji-only emoji-only-"+a):i&&f.push("text"),a&&(f.push("custom-shape"),d&&d.isRound&&f.push("round"),o&&f.push("has-comments")),l||d?f.push("media"):b?f.push("audio"):u?f.push("voice"):h?f.push("document"):g?f.push("contact"):O?f.push("poll"):j&&(f.push("web-page"),j.photo&&f.push("media")),n&&!a&&f.push("is-forwarded"),t&&f.push("is-reply"),c&&f.push("has-replies"),I&&f.push("is-via-bot"),r&&f.push("force-sender-name"),a||(f.push("has-shadow"),(t||n||!p||I||r)&&f.push("has-solid-background"),!s||!l&&p||f.push("has-appendix")),f.join(" ")}(e,{hasReply:ve,customShape:He,isLastInGroup:u,asForwarded:Ee,hasThread:ye,forceSenderName:g,hasComments:e.threadInfo&&e.threadInfo.messagesCount>0}),$e=!we||!T&&f?f:p,We=we?p:f,Qe=A&&e.adminTitle||we&&!Ee&&we.adminTitle||void 0;Object(ze.a)(je,ve?e.replyToMessageId:void 0,w,e.id),Bt(re,je,S,k,N),Object(c.n)(()=>{ie.current&&(ie.current.innerHTML=pe?'':'')},[pe]);const Ke=Object(c.m)(t=>{t.stopPropagation(),ee({messageId:ge,groupedId:e.groupedId})},[ge,e.groupedId,ee]),Ye=Object(c.m)(e=>{const t=Se&&n&&n.messages?{messageId:ge,childMessageIds:n.messages.map(({id:e})=>e),withShift:e&&e.shiftKey}:{messageId:ge,withShift:e&&e.shiftKey};ee(t)},[ee,ge,Se,n]),Xe=Object(c.m)(()=>{ae({messageId:ge})},[ae,ge]),et=Object(c.m)(e=>{e.stopPropagation()},[]),tt=Object(c.m)(()=>{$e&&(Object(m.lb)($e.id)?Q({id:$e.id}):K({id:$e.id}))},[$e,Q,K]),at=Object(c.m)(()=>{We&&(Object(m.lb)(We.id)?Q({id:We.id}):K({id:We.id}))},[We,Q,K]),st=Object(c.m)(()=>{I&&Q({id:I.id})},[I,Q]),nt=Object(c.m)(()=>{V({chatId:je,threadId:U,messageId:e.replyToMessageId})},[V,je,U,e.replyToMessageId]),ct=Object(c.m)(()=>{$({chatId:je,threadId:U,messageId:ge,origin:Ie?l.h.ScheduledInline:l.h.Inline})},[je,U,ge,$,Ie]),rt=Object(c.m)(()=>{W({chatId:je,messageId:ge})},[je,ge,W]),ot=Object(c.m)(e=>{$({chatId:je,threadId:U,messageId:e,origin:Ie?l.h.ScheduledAlbum:l.h.Album})},[je,U,$,Ie]),it=Object(c.m)(()=>{Z({messageIds:[ge]})},[ge,Z]),lt=Object(c.m)(()=>{Y({chatId:je,messageId:ge})},[Y,je,ge]),dt=Object(c.m)(e=>{X({chatId:je,messageId:ge,options:e})},[je,ge,X]),bt=Object(c.m)(()=>{se({fromChatId:je,groupedId:e.groupedId})},[se,je,e.groupedId]),ut=Object(c.m)(()=>{if(n&&n.messages){const e=n.messages.map(({id:e})=>e);se({fromChatId:je,messageIds:e})}else se({fromChatId:je,messageIds:[ge]})},[n,se,je,ge]),mt=Object(c.m)(()=>{V({chatId:je,threadId:i.MAIN_THREAD_ID,messageId:ge})},[V,je,ge]),ht=Object(c.m)(()=>{V(Me?{chatId:we.fromChatId,groupedId:e.groupedId,groupedChatId:je}:{chatId:we.fromChatId,messageId:we.fromMessageId})},[V,we,e,je,Me]),jt=Object(te.a)();let gt,ft="";const pt=Object(c.p)(()=>Se?Lt(pe,Boolean(Ee),n,le):void 0,[Se,le,pe,Ee,n]),It=Ee?28:0;if(Se||!Ne&&!Pe)pt&&(gt=Math.max(Ct(Boolean(ke)),pt.containerStyle.width));else{let t;Ne?t=Et(e).width:Pe&&(t=Pe.isRound?Je.d:Et(e).width),t&&(gt=Math.max(Ct(Boolean(ke)),t))}gt&&(ft=`width: ${gt+It}px`);const Mt=Object(c.p)(()=>Qe?Ft(Qe):void 0,[Qe]),St=!(Ge||F||P)&&(!Me||O),kt=St&&A&&!Ie,Nt=St&&(we&&(we.isChannelPost||T&&!pe)&&we.fromMessageId||q),Pt=e.threadInfo&&(!Me||O)&&"thread"===H&&!d;return c.a.createElement("div",{ref:re,id:"message"+ge,className:_e,style:Mt?`--meta-safe-author-width: ${Mt}px`:void 0,"data-message-id":ge,"data-last-message-id":n?n.messages[n.messages.length-1].id:void 0,onClick:F?Ye:void 0,onDoubleClick:F?void 0:Xe,onMouseDown:F?void 0:ue,onContextMenu:F?void 0:me,onMouseEnter:Me&&!O?Ta:void 0,onMouseLeave:Me&&!O?Aa:void 0},c.a.createElement("div",{ref:oe,className:"bottom-marker","data-message-id":ge,"data-has-unread-mention":e.hasUnreadMention}),!Me&&c.a.createElement("div",{className:"message-select-control"},B&&c.a.createElement("i",{className:"icon-select"})),O&&c.a.createElement("div",{className:Object(J.a)("message-select-control group-select",D&&"is-selected"),onClick:Ke},D&&c.a.createElement("i",{className:"icon-select"})),r&&function(){const e=$e&&Object(m.lb)($e.id),t=$e&&e?$e:void 0,a=$e&&!e?$e:void 0,s=!$e&&we?we.hiddenUserName:void 0;return c.a.createElement(Dt.a,{size:"small",user:t,chat:a,text:s,lastSyncTime:x,onClick:t||a?tt:void 0})}(),c.a.createElement("div",{className:"message-content-wrapper",onClick:F&&Me?Ye:void 0},c.a.createElement("div",{className:Ve,style:ft},Ve.includes("has-appendix")&&c.a.createElement("div",{className:"svg-appendix",ref:ie}),Ee&&!He&&(!Me||h)&&c.a.createElement("div",{className:"message-title"},jt("ForwardedMessage")),function(){const t=Object(J.a)("content-inner",Ee&&!He&&"forwarded-message",ve&&"reply-message"),r=u&&!qe&&!Ee&&!ye;return c.a.createElement("div",{className:t,onDoubleClick:et},function(){if(He||!(o&&!Ne&&!Pe||Ee||Ce||g)||Me&&!h)return;let t,a;We?(t=Object(m.U)(We),Ee||(a="color-"+Object(m.X)(We))):we&&we.hiddenUserName&&(t=we.hiddenUserName);return c.a.createElement("div",{className:"message-title"},t?c.a.createElement("span",{className:Object(J.a)(We&&"interactive",a),onClick:We?at:void 0},Object(Ze.a)(t)):I?void 0:" ",I&&c.a.createElement(c.a.Fragment,null,c.a.createElement("span",{className:"via"},jt("ViaBot")),c.a.createElement("span",{className:"interactive",onClick:st},Object(Ze.a)("@"+I.username))),we&&we.isLinkedChannelPost?c.a.createElement("span",{className:"admin-title"},jt("DiscussChannel")):e.adminTitle&&!A?c.a.createElement("span",{className:"admin-title"},e.adminTitle):void 0)}(),ve&&c.a.createElement(Gt,{message:w,sender:C,observeIntersection:a,onClick:nt}),Le&&c.a.createElement(Yt,{message:e,observeIntersection:a,observeIntersectionForPlaying:s,shouldLoop:z,lastSyncTime:x}),R&&c.a.createElement(Jt.a,{isInline:!0,sticker:R,observeIntersection:a,lastSyncTime:x}),Se&&c.a.createElement(Ma,{album:n,albumLayout:pt,observeIntersection:a,shouldAutoLoad:G,shouldAutoPlay:_,isOwn:pe,hasCustomAppendix:r,lastSyncTime:x,onMediaClick:ot}),!Se&&Ne&&c.a.createElement(sa,{message:e,observeIntersection:a,shouldAutoLoad:G,uploadProgress:M,shouldAffectAppendix:r,onClick:ct,onCancelUpload:lt}),!Se&&Pe&&Pe.isRound&&c.a.createElement(ka,{message:e,observeIntersection:a,shouldAutoLoad:G,shouldAutoPlay:_,lastSyncTime:x}),!Se&&Pe&&!Pe.isRound&&c.a.createElement(la,{message:e,observeIntersection:a,shouldAutoLoad:G,shouldAutoPlay:_,uploadProgress:M,lastSyncTime:x,onClick:ct,onCancelUpload:lt}),(Te||Ae)&&c.a.createElement(zt.a,{message:e,uploadProgress:M,lastSyncTime:x,isSelectable:Me,isSelected:B,onPlay:rt,onReadMedia:!Ae||pe&&!T?void 0:it,onCancelUpload:lt}),xe&&c.a.createElement(_t.a,{message:e,observeIntersection:a,uploadProgress:M,isSelectable:Me,isSelected:B,onCancelUpload:lt}),Re&&c.a.createElement(ba,{contact:Re}),Fe&&c.a.createElement(fa,{message:e,poll:Fe,onSendVote:dt}),!R&&qe&&c.a.createElement("p",{className:"text-content"},qe),Be&&c.a.createElement(va,{message:e,observeIntersection:a,shouldAutoLoad:G,onMediaClick:ct,onCancelMediaTransfer:lt}),De&&c.a.createElement(ya,{message:e}))}(),(!Me||O)&&c.a.createElement($t,{message:e,outgoingStatus:E,signature:Qe,onClick:Ye}),kt?c.a.createElement(ne.a,{className:"message-action-button",color:"translucent-white",round:!0,size:"tiny",ariaLabel:"Forward message",onClick:O?bt:ut},c.a.createElement("i",{className:"icon-share-filled"})):Nt?c.a.createElement(ne.a,{className:"message-action-button",color:"translucent-white",round:!0,size:"tiny",ariaLabel:"Focus message",onClick:q?mt:ht},c.a.createElement("i",{className:"icon-arrow-right"})):void 0,Pt&&c.a.createElement(Pa,{message:e,disabled:d})),e.inlineButtons&&c.a.createElement(Na,{message:e,onClick:ce})),be&&c.a.createElement(Ht,{isOpen:de,anchor:be,message:e,album:n,messageListType:H,onClose:he,onCloseAnimationEnd:Oe}))}));a(223);const Ra=h.b?1e3:350,Fa=h.f?300:500,Ba=Object(g.a)(e=>e(),200,!1),Da=Object(g.j)(e=>e());function Ua(e,t,a,s,r,o,i,l,b,u,h,O,j,g=!1){const f=c.a.createElement("div",{className:Object(J.a)("unread-divider","local-action-message"),key:"unread-messages"},c.a.createElement("span",null,e("UnreadMessages"))),p=t.map((t,p,I)=>{const v=t.senderGroups.map((t,n,g)=>{if(1===t.length&&!mt(t[0])&&Object(m.db)(t[0])){const e=t[0];return Object(d.e)([e.id===l.current&&f,c.a.createElement(qt,{key:e.id,message:e,observeIntersection:a})])}let v;return Object(d.h)(t.map((y,w)=>{const C=mt(y)?y.mainMessage:y,E=mt(y)?y:void 0,M=Object(m.tb)(C),S=mt(y),k=t[w+1];C.previousLocalId&&i.current==="message"+C.previousLocalId&&(i.current="message"+C.id);const N=!S&&C.groupedId?C.groupedId:void 0,P=k&&!mt(k)?k.groupedId:void 0,T={isFirstInGroup:0===w,isLastInGroup:w===t.length-1,isFirstInDocumentGroup:Boolean(N&&N!==v),isLastInDocumentGroup:Boolean(N&&N!==P),isLastInList:w===t.length-1&&n===g.length-1&&p===I.length-1};v=N;const A=C.id===l.current&&l.current!==O||C.id===h&&l.current===O,x=Object(m.F)(C),L="scheduled"!==u?x:`${C.date}_${x}`;return Object(d.e)([A&&f,c.a.createElement(La,{key:L,message:C,observeIntersectionForBottom:a,observeIntersectionForMedia:s,observeIntersectionForAnimatedStickers:r,album:E,withAvatar:T.isLastInGroup&&o&&!M&&!(C.id===h),withSenderName:T.isFirstInGroup&&o&&!M,threadId:b,messageListType:u,noComments:!1===j,isFirstInGroup:T.isFirstInGroup,isLastInGroup:T.isLastInGroup,isFirstInDocumentGroup:T.isFirstInDocumentGroup,isLastInDocumentGroup:T.isLastInDocumentGroup,isLastInList:T.isLastInList}),C.id===h&&c.a.createElement("div",{className:"local-action-message",key:"discussion-started"},c.a.createElement("span",null,e("DiscussionStarted")))])}))});return c.a.createElement("div",{className:"message-date-group",key:t.datetime,teactFastList:!0},c.a.createElement("div",{className:"sticky-date",key:"date-header"},c.a.createElement("span",null,g&&t.originalDate===n.Y&&e("MessageScheduledUntilOnline"),g&&t.originalDate!==n.Y&&e("MessageScheduledOn",Object(x.c)(t.datetime,void 0,!0)),!g&&Object(x.c)(t.datetime))),Object(d.h)(v))});return Object(d.h)(p)}var Ha=Object(c.h)(Object(s.h)((e,{chatId:t,threadId:a,type:s})=>{const n=Object(o.f)(e,t);if(!n)return{};const c=Object(o.w)(e,t,a,s),r="scheduled"===s?Object(o.lb)(e,t):Object(o.m)(e,t),l=Object(o.zb)(e,t,a);if(a!==i.MAIN_THREAD_ID&&!(r&&l&&r[l]))return{};const{isRestricted:d,restrictionReason:b,lastMessage:u}=n,h=Object(o.G)(e,t),O=a===i.MAIN_THREAD_ID&&!c&&!n.unreadCount&&!h&&u&&!u.groupedId;let j;if(Object(o.J)(e,t)){const a=Object(o.g)(e,t);j=a.fullInfo?a.fullInfo.botDescription||"NoMessages":"Updating bot info..."}return{isChatLoaded:!0,isRestricted:d,restrictionReason:b,isChannelChat:Object(m.jb)(n),canPost:Object(m.e)(n,a),isChatWithSelf:Object(o.N)(e,t),messageIds:c,messagesById:r,firstUnreadId:Object(o.F)(e,t,a),isViewportNewest:"thread"!==s||Object(o.V)(e,t,a),threadFirstMessageId:Object(o.E)(e,t,a),focusingId:h,isSelectModeActive:Object(o.Q)(e),animationLevel:e.settings.byKey.animationLevel,...O&&{lastMessage:u},botDescription:j,threadTopMessageId:l,hasLinkedChat:n.fullInfo&&"linkedChatId"in n.fullInfo?Boolean(n.fullInfo.linkedChatId):void 0}},(e,t)=>Object(d.l)(t,["loadViewportMessages","markMessageListRead","markMessagesRead","setScrollOffset"]))(({chatId:e,threadId:t,type:a,hasTools:r,onFabToggle:i,isChatLoaded:b,isChannelChat:u,canPost:O,bottomOffset:j,isChatWithSelf:f,messageIds:p,messagesById:I,firstUnreadId:v,isViewportNewest:y,threadFirstMessageId:w,isRestricted:C,restrictionReason:E,focusingId:M,isSelectModeActive:S,animationLevel:k,loadViewportMessages:N,markMessageListRead:P,markMessagesRead:T,setScrollOffset:A,lastMessage:x,botDescription:L,threadTopMessageId:R,hasLinkedChat:F})=>{const B=Object(c.q)(null),D=Object(c.q)(),U=Object(c.q)(),H=Object(c.q)(),q=Object(c.q)(),G=Object(c.q)(),_=Object(c.q)(),z=Object(c.q)(),V=Object(c.q)(!1),[$,W]=Object(c.r)(),[Q,Y]=Object(c.r)(Boolean(M));Object(me.a)(()=>{U.current=void 0,G.current=v,D.current="thread"===a&&Object(o.mb)(Object(s.e)(),e,t)||0},[Boolean(p)]),Object(me.a)(()=>{_.current=v},[v]);const{observe:Z,freeze:X,unfreeze:ee}=Object(Ot.a)({rootRef:B,throttleMs:Ra,margin:Fa}),{observe:ae,freeze:se,unfreeze:ne}=Object(Ot.a)({rootRef:B},e=>{if("thread"!==a)return;let t=0;const s=[];e.forEach(e=>{const{isIntersecting:a,target:n}=e;if(!a)return;const{dataset:c}=n,r=Number(c.lastMessageId||c.messageId);r>t&&(t=r),c.hasUnreadMention&&s.push(r)}),_.current&&t>=_.current&&P({maxId:t}),s.length&&T({messageIds:s})});Object(me.a)(()=>{z.current=M,M?(X(),se()):(ne(),ee())},[M]);const{observe:ce}=Object(Ot.a)({rootRef:B,throttleMs:Ra});Object(c.n)(()=>{M?Y(!0):setTimeout(()=>{Y(!1)},200)},[M]);const re=Object(c.p)(()=>{if(!p||!I)return;const e=!R||p[0]&&w!==p[0]?p:[R,...p];if(!e.length)return;const t=e.map(e=>I[e]);return ht(Object(d.k)(t,["date","id"]),G.current)},[p,I,w,R]),[oe,ie,le]=Object(c.p)(()=>"thread"===a?[Object(g.a)(()=>N({direction:l.e.Backwards}),1e3,!0,!1),Object(g.a)(()=>N({direction:l.e.Forwards}),1e3,!0,!1),Object(g.a)(()=>N({direction:l.e.Around}),1e3,!0,!1)]:[],[N,p]),{isScrolled:de,updateStickyDates:be}=jt(),ue=Object(c.m)(()=>{if(V.current)return void(V.current=!1);const s=B.current;be(s,r),Ba(()=>{Object(g.b)(()=>{s.parentElement&&(D.current=s.scrollHeight-s.scrollTop,"thread"===a&&A({chatId:e,threadId:t,scrollOffset:D.current}))})})},[be,r,a,A,e,t]);Object(c.n)(()=>{if(!("ResizeObserver"in window))return;const e=new ResizeObserver(([e])=>{e.target.offsetParent&&W(e.contentRect.height)});return e.observe(B.current),()=>{e.disconnect()}},[]),Object(c.o)(()=>{h.d&&Da(()=>{if(!B.current.querySelector(".AnimatedSticker.is-playing"))return;const e=B.current.style;e.webkitOverflowScrolling="auto"===e.webkitOverflowScrolling?"":"auto"})}),Object(c.n)(()=>{if(!le||!b||C||M)return;const e=B.current;(!p||p.length{const s=B.current;if(q.current=Array.from(s.querySelectorAll(".message-list-item")),!s.offsetParent)return;const c=y&&p&&p.length{s.parentElement&&s.parentElement.classList.remove("force-messages-scroll")},1e3));const{scrollTop:o,scrollHeight:i,offsetHeight:l}=s,d=D.current,b=q.current[q.current.length-1],u=b?b.offsetHeight:0,m=y&&t&&d-(a||l)-u<=100;let h;const O=p&&e&&p[0]!==e[0],j=p&&e&&p[p.length-1]!==e[e.length-1];if(m&&j&&!O&&(b&&Object(g.b)(()=>{Object(ft.a)(s,b,"end",20)}),h=i-l,D.current=Math.max(i-h,l),!c))return;const f=void 0!==a&&a!==$,I=U.current&&s.querySelector("#"+U.current),v=!I&&G.current&&s.querySelector(".unread-divider");if(m&&f)h=i-l;else if(I){h=o+(I.getBoundingClientRect().top-(H.current||0))}else h=v?v.offsetTop-(r?60:10):i-d;Object(gt.a)(s,h),z.current||(V.current=!0,Object(g.b)(()=>{V.current=!1})),D.current=Math.max(i-h,l)},[p,y,$,r]),Object(c.n)(()=>{(!k||k>0)&&Object(K.b)(200+n.c)},[k,S]);const he=Object(te.a)(),Oe=Boolean(e&&Object(m.lb)(e)),je=Boolean(!Oe&&!u||f),ge=Object(J.a)("MessageList custom-scroll",!je&&"no-avatars",u&&"no-avatars",(!O||"none"!==j)&&"bottom-padding","none"!==j&&"bottom-padding-"+j,S&&"select-mode-active",Q&&"has-focusing",de&&"scrolled");return c.a.createElement("div",{ref:B,className:ge,onScroll:ue},C?c.a.createElement("div",{className:"empty"},c.a.createElement("span",null,E?E.text:"This is a private "+(u?"channel":"chat"))):L?c.a.createElement("div",{className:"empty rich"},c.a.createElement("span",null,Object(Ze.a)(he(L),["br","emoji","links"]))):p&&re?c.a.createElement(It,{containerRef:B,className:"messages-container",messageIds:p,containerHeight:$,listItemElementsRef:q,focusingId:M,anchorIdRef:U,anchorTopRef:H,loadMoreForwards:ie,loadMoreBackwards:oe,isViewportNewest:y,firstUnreadId:v,onFabToggle:i},re&&Ua(he,re,ae,Z,ce,je,U,G,t,a,R,w,F,"scheduled"===a)):p?c.a.createElement("div",{className:"empty"},c.a.createElement("span",null,he("NoMessages"))):x?c.a.createElement("div",{className:"messages-container"},Ua(he,ht([x]),ae,Z,ce,je,U,G,t,a,R,w,F,!1)):c.a.createElement(ve.a,{color:"white"}))}));a(224);var qa=Object(c.h)(Object(s.h)(e=>{const t=Object(o.x)(e);if(!t)return{};const{chatId:a,threadId:s,type:n}=t,c=Object(o.f)(e,a);return{messageListType:n,canPost:c&&Object(m.e)(c,s),unreadCount:c&&s===i.MAIN_THREAD_ID&&"thread"===n?c.unreadCount:void 0}},(e,t)=>Object(d.l)(t,["focusLastMessage"]))(({isShown:e,messageListType:t,canPost:a,unreadCount:s,focusLastMessage:n})=>{const r=Object(c.q)(null),o=Object(c.m)(()=>{if(e)if("thread"===t)n();else{const e=r.current.parentElement.querySelector(".MessageList"),t=e.querySelectorAll(".message-list-item"),a=t[t.length-1];if(!a)return;Object(ft.a)(e,a,"end",20)}},[e,t,n]),i=Object(J.a)("ScrollDownButton",e&&"revealed",!a&&"no-composer");return c.a.createElement("div",{ref:r,className:i},c.a.createElement("div",{className:"ScrollDownButton-inner"},c.a.createElement(ne.a,{color:"secondary",round:!0,onClick:o,ariaLabel:"Scroll to bottom"},c.a.createElement("i",{className:"icon-arrow-down"})),Boolean(s)&&c.a.createElement("div",{className:"unread-count"},Object($e.b)(s))))})),Ga=a(122),_a=a(123),za=a(14);async function Va(e,t,a,s){const n=URL.createObjectURL(t),{type:c,size:r}=t;let o,i;if(c.startsWith("image/"))if(a){const a=await Object(za.g)(n),{width:r,height:i}=a;if(r>1280||i>1280||"image/jpeg"!==c){const c=await function(e){return new Promise(t=>{const a=document.createElement("canvas"),s=a.getContext("2d");let{width:n,height:c}=e;(n>1280||c>1280)&&(n>=c?(c*=1280/n,n=1280):(n*=1280/c,c=1280)),a.width=n,a.height=c,s.drawImage(e,0,0,e.width,e.height,0,0,n,c),a.toBlob(t,"image/jpeg",100)})}(a);return c?(URL.revokeObjectURL(n),Va(e,c,!0,s)):Va(e,t,!1,s)}o={width:r,height:i}}else i=n;else if(c.startsWith("video/")){if(r<10485760){const{videoWidth:e,videoHeight:t,duration:a}=await Object(za.h)(n);o={width:e,height:t,duration:a}}i=await Object(za.c)(n)}return{blobUrl:n,filename:e,mimeType:c,size:r,quick:o,previewBlobUrl:i,...s}}var $a=a(170),Wa=a.p+"8ccc0b555efcec3616377aea078dda16.js";const Qa={encoderPath:Wa,reuseWorker:!0},Ka={type:"audio/ogg"};let Ya,Ja,Za;async function Xa(){return Ya||(Ya=a.e(10).then(a.t.bind(null,302,7)),Ja=(await Ya).default,Za=new Ja(Qa)),Ya}async function es(e){await async function(){await Xa(),await Za.start()}();const t=Date.now();let a;const s=[],n=[];Za.ondataavailable=e=>{s.push(e)};const c=function(e,t){const a=e.sourceNode,s=a.context.createAnalyser();s.fftSize=64,a.connect(s);const n=s.frequencyBinCount,c=new Uint8Array(n);let r=!1;return function e(){if(r)return;s.getByteFrequencyData(c);const a=c.reduce((e,t)=>e+t,0),o=a/n/255;t(o<.1?0:o),requestAnimationFrame(e)}(),()=>{r=!0}}(Za,t=>{n.push(255*t),e(t)});return{stop:()=>new Promise((e,r)=>{Za.onstop=()=>{e({blob:new Blob(s,Ka),duration:Math.round(((a||Date.now())-t)/1e3),waveform:n})},Za.onerror=r;const o=Math.max(0,t+1e3-Date.now());setTimeout(()=>{Za.stop(),c()},o)}),pause:()=>{const e=Math.max(0,t+1e3-Date.now());setTimeout(()=>{Za.pause(),a=Date.now(),c()},e)}}}const ts=["image/png","image/jpeg","image/gif"];function as(e){const{text:t,entities:a}=e||{};if(!t)return"";const s=Object(yt.b)(t,a,void 0,void 0,!0);return Array.isArray(s)?s.join(""):s}let ss,ns;var cs=a(58);var rs=a(178);var os=e=>{const{isOpen:t}=e,a=Object(Ie.a)(pe.a.Extra,"DeleteMessageModal",!t);return a?c.a.createElement(a,e):void 0};function is(){return(is=Object.assign||function(e){for(var t=1;t{const a=Object(c.q)(!1),s=Object(c.m)(()=>{if(a.current=!0,ds)return ds=!1,void e();ls&&(clearTimeout(ls),ls=void 0),ls=window.setTimeout(()=>{a.current&&e()},200)},[e]),n=Object(c.m)(()=>{a.current=!1},[]);return c.a.createElement(ne.a,is({},t,{onMouseEnter:h.k?void 0:s,onMouseLeave:h.k?void 0:n,onClick:h.k?e:void 0}))});var us=e=>{const{isOpen:t}=e,a=Object(Ie.a)(pe.a.Extra,"AttachMenu",!t);return a?c.a.createElement(a,e):void 0};var ms=e=>{const{isOpen:t}=e,a=Object(Ie.a)(pe.a.Extra,"SymbolMenu",!t);return a?c.a.createElement(a,e):void 0};var hs=e=>{const{isOpen:t}=e,a=Object(Ie.a)(pe.a.Extra,"MentionMenu",!t);return a?c.a.createElement(a,e):void 0};var Os=e=>{const{isOpen:t}=e,a=Object(Ie.a)(pe.a.Extra,"CustomSendMenu",!t);return a?c.a.createElement(a,e):void 0};var js=e=>{const{isOpen:t}=e,a=Object(Ie.a)(pe.a.Extra,"EmojiTooltip",!t);return a?c.a.createElement(a,e):void 0};var gs=e=>{const{isOpen:t}=e,a=Object(Ie.a)(pe.a.Extra,"BotKeyboardMenu",!t);return a?c.a.createElement(a,e):void 0},fs=a(171),ps=a(109);a(226);var Is=Object(c.h)(Object(s.h)(e=>{const{chatId:t,threadId:a,type:s}=Object(o.x)(e)||{};if(!t||!a||!s)return{};const{currentUserId:n,forwardMessages:{fromChatId:c,toChatId:r,messageIds:i}}=e,l=Object(o.hb)(e,t,a),d="scheduled"===s?Object(o.D)(e,t):Object(o.B)(e,t,a),b=e.settings.byKey.animationLevel>=1,u=r===t;let h,O;if(l?h=Object(o.k)(e,t,l):d?h=Object(o.C)(e,t,a,s):u&&1===i.length&&(h=Object(o.k)(e,c,i[0])),l&&h){const{forwardInfo:a}=h,s=t===n;a&&(a.isChannelPost||s)&&(O=Object(o.I)(e,h)),O||(O=Object(o.ob)(e,h))}else u&&(O=Object(m.lb)(c)?Object(o.Bb)(e,c):Object(o.f)(e,c));return{replyingToId:l,editingId:d,message:h,sender:O,shouldAnimate:b,forwardedMessagesCount:u?i.length:void 0}},(e,t)=>Object(d.l)(t,["setReplyingToId","setEditingId","focusMessage","exitForwardMode"]))(({replyingToId:e,editingId:t,message:a,sender:s,shouldAnimate:n,forwardedMessagesCount:r,setReplyingToId:o,setEditingId:i,focusMessage:l,exitForwardMode:d})=>{const b=Boolean((e||t)&&a||s&&r),u=Object(ps.a)([r],r?300:void 0),{shouldRender:m,transitionClassNames:h}=Object(Y.a)(u&&b,void 0,!n,void 0,!n),O=Object(c.m)(()=>{e?o({messageId:void 0}):t?i({messageId:void 0}):r&&d()},[e,t,r,o,i,d]);Object(c.n)(()=>b?Object(Z.a)(O):void 0,[b,O]);const j=Object(c.m)(()=>{l({chatId:a.chatId,messageId:a.id})},[l,a]),g=Object(J.a)("ComposerEmbeddedMessage",h),f=r&&r>1?r+" forwarded messages":void 0;if(m)return c.a.createElement("div",{className:g},c.a.createElement("div",null,c.a.createElement(ne.a,{round:!0,color:"translucent",ariaLabel:"Cancel replying",onClick:O},c.a.createElement("i",{className:"icon-close"})),c.a.createElement(Gt,{className:"inside-input",message:a,sender:s,customText:f,title:t?"Edit Message":void 0,onClick:j})))}));var vs=e=>{const{attachments:t}=e,a=Object(Ie.a)(pe.a.Extra,"AttachmentModal",!t.length);return a?c.a.createElement(a,e):void 0};var ys=e=>{const{isOpen:t}=e,a=Object(Ie.a)(pe.a.Extra,"PollModal",!t);return a?c.a.createElement(a,e):void 0};var ws=e=>{const{isOpen:t}=e,a=Object(Ie.a)(pe.a.Extra,"DropArea",!t);return a?c.a.createElement(a,e):void 0};a(227);const Cs=/https?:\/\/(www.)?([a-zA-Z0-9.-]{2,256})([a-zA-Z/.-]{1,256})([?|#][=&#a-zA-Z0-9]{2,128})?/;var Es=Object(c.h)(Object(s.h)(e=>Object(d.l)(e,["webPagePreview"]),(e,t)=>Object(d.l)(t,["loadWebPagePreview","clearWebPagePreview"]))(({chatId:e,messageText:t,webPagePreview:a,loadWebPagePreview:s,clearWebPagePreview:n})=>{const r=Object(c.p)(()=>{const{text:e,entities:a}=Object(_a.a)(t),s=a&&a.find(({type:e})=>e===i.ApiMessageEntityTypes.TextUrl);if(s)return s.url;const n=e.match(Cs);return n?n[0]:void 0},[t]);if(Object(c.n)(()=>{r?s({text:r}):n()},[n,r,s]),Object(me.a)(()=>{n()},[e]),!a||!t.length)return;const{photo:o,...l}=a,d={content:{webPage:l}};return c.a.createElement("div",{className:"WebPagePreview"},c.a.createElement(va,{message:d,inPreview:!0}))})),Ms=a(114);var Ss=e=>{const{isOpen:t}=e,a=Object(Ie.a)(pe.a.Extra,"CalendarModal",!t);return a?c.a.createElement(a,e):void 0};var ks=e=>{const{isOpen:t}=e,a=Object(Ie.a)(pe.a.Extra,"PaymentModal",!t);return a?c.a.createElement(a,e):void 0};var Ns,Ps=e=>{const{isOpen:t}=e,a=Object(Ie.a)(pe.a.Extra,"ReceiptModal",!t);return a?c.a.createElement(a,e):void 0};a(228);!function(e){e.Send="send",e.Record="record",e.Edit="edit"}(Ns||(Ns={}));var Ts=Object(c.h)(Object(s.h)((e,{chatId:t,threadId:a,messageListType:s})=>{const n=Object(o.f)(e,t),c=n&&Object(o.o)(e,n),r=n?Object(o.M)(e,n):void 0,l=Object(o.N)(e,t),d=r&&Object(o.Z)(e,t),b=Object(o.jb)(e,t);return{editingMessage:Object(o.C)(e,t,a,s),connectionState:e.connectionState,draft:Object(o.A)(e,t,a),chat:n,isChatWithBot:r,isChatWithSelf:l,canScheduleUntilOnline:!l&&!r&&n&&c&&Object(m.lb)(t)&&c.status&&Boolean(c.status.wasOnline),isRightColumnShown:Object(o.U)(e),isSelectModeActive:Object(o.Q)(e),withScheduledButton:a===i.MAIN_THREAD_ID&&"thread"===s&&Boolean(b&&b.length),shouldSchedule:"scheduled"===s,botKeyboardMessageId:d?d.id:void 0,isForwarding:t===e.forwardMessages.toChatId,canSuggestMembers:n&&Object(m.kb)(n),isPollModalOpen:e.isPollModalOpen,stickersForEmoji:e.stickers.forEmoji.stickers,groupChatMembers:n&&n.fullInfo&&n.fullInfo.members,currentUserId:e.currentUserId,usersById:e.users.byId,lastSyncTime:e.lastSyncTime,contentToBeScheduled:e.messages.contentToBeScheduled,isPaymentModalOpen:e.payment.isPaymentModalOpen,isReceiptModalOpen:Boolean(e.payment.receipt),shouldSuggestStickers:e.settings.byKey.shouldSuggestStickers}},(e,t)=>Object(d.l)(t,["sendMessage","editMessage","saveDraft","clearDraft","showError","setStickerSearchQuery","setGifSearchQuery","forwardMessages","openPollModal","closePollModal","closePaymentModal","clearReceipt","loadScheduledHistory","openChat"]))(({dropAreaState:e,shouldSchedule:t,canScheduleUntilOnline:a,onDropHide:r,editingMessage:o,chatId:l,threadId:d,messageListType:b,draft:u,chat:O,connectionState:j,isChatWithBot:f,isChatWithSelf:p,isRightColumnShown:I,isSelectModeActive:v,isForwarding:y,canSuggestMembers:w,isPollModalOpen:C,isPaymentModalOpen:E,isReceiptModalOpen:M,botKeyboardMessageId:S,withScheduledButton:k,stickersForEmoji:N,groupChatMembers:P,currentUserId:T,usersById:A,lastSyncTime:L,contentToBeScheduled:R,shouldSuggestStickers:F,sendMessage:B,editMessage:D,saveDraft:U,clearDraft:H,showError:q,setStickerSearchQuery:G,setGifSearchQuery:_,forwardMessages:z,openPollModal:V,closePollModal:$,loadScheduledHistory:W,closePaymentModal:Q,openChat:K,clearReceipt:Y})=>{const X=Object(c.q)(null),[ee,ae]=Object(c.r)(""),se=Object(c.q)(),ce=Object(He.a)(e),[re,oe,ie]=Object(nt.a)(),[le,be]=Object(c.r)(),ue=Object(c.q)(ee);Object(c.n)(()=>{ue.current=ee},[ee]),Object(c.n)(()=>{se.current=void 0},[l]),Object(c.n)(()=>{l&&L&&d===i.MAIN_THREAD_ID&&W()},[l,W,L,d]),Object(c.n)(()=>{X.current&&(X.current.innerHTML='')},[]),Object(c.n)(()=>{R&&(be(R),oe())},[R,oe]);const[me,he]=Object(c.r)([]),[Oe,je,ge]=Object(nt.a)(),[fe,pe,Ie]=Object(nt.a)(),[ve,ye,we]=Object(nt.a)(),[Ce,Ee,Me]=Object(nt.a)(),[Se,ke]=Object(nt.a)(),[Ne,Pe,Te]=Object(nt.a)(),{startRecordingVoice:Ae,stopRecordingVoice:xe,pauseRecordingVoice:Le,activeVoiceRecording:Re,currentRecordTime:Be,recordButtonRef:De,startRecordTimeRef:Ue}=(()=>{const e=Object(c.q)(null),[t,a]=Object(c.r)(),s=Object(c.q)(),[n,r]=Object(c.r)();Object(c.n)(()=>{h.d&&Xa()},[]);const o=Object(c.m)(async()=>{try{const{stop:t,pause:n}=await es(t=>{e.current&&(s.current&&Date.now()%4==0&&(e.current.style.boxShadow=`0 0 0 ${50*(t||0)}px rgba(0,0,0,.15)`),r(Date.now()))});s.current=Date.now(),r(Date.now()),a({stop:t,pause:n})}catch(e){console.error(e)}},[]),i=Object(c.m)(()=>{if(t){e.current&&(e.current.style.boxShadow="none");try{return t.pause()}catch(e){return void console.error(e)}}},[t]),l=Object(c.m)(()=>{if(t){a(void 0),s.current=void 0,r(void 0),e.current&&(e.current.style.boxShadow="none");try{return t.stop()}catch(e){return void console.error(e)}}},[t]);return Object(c.n)(()=>t?Object(Z.a)(l):void 0,[t,l]),{startRecordingVoice:o,pauseRecordingVoice:i,stopRecordingVoice:l,activeVoiceRecording:t,currentRecordTime:n,recordButtonRef:e,startRecordTimeRef:s}})(),qe=o?Ns.Edit:!h.l||Re||ee&&!me.length||y?Ns.Send:Ns.Record,Ge=!t,{isMentionMenuOpen:_e,mentionFilter:ze,closeMentionMenu:Ve,insertMention:$e,mentionFilteredMembers:We}=Object(rs.a)(w&&!me.length,ee,ae,void 0,P,T,A),{isContextMenuOpen:Qe,handleContextMenu:Ke,handleContextMenuClose:Ye,handleContextMenuHide:Je}=Object(vt.a)(De,!(qe===Ns.Send&&Ge)),Xe=Object(c.p)(()=>Object(m.c)(O,f),[O,f]),et=O&&Object(m.gb)(O),tt=Object(m.k)(O),{isEmojiTooltipOpen:at,closeEmojiTooltip:st}=function(e,t,a){const{loadStickersForEmoji:n,clearStickersForEmoji:r}=Object(s.d)(),o=h.c&&1===Object(cs.a)(t)||!h.c&&Boolean(t.match(/^]*?>$/g)),i=Boolean(a)&&o;return Object(c.n)(()=>{e&&o?n({emoji:t}):!i&&o||r()},[t,o,r,n,e]),{isEmojiTooltipOpen:i,closeEmojiTooltip:r}}(Boolean(F&&Xe.canSendStickers&&!me.length),ee,N),ct=Object(c.m)(e=>{const t=window.getSelection(),a=document.getElementById(n.q),s=Object(Ze.a)(e,["escape_html","emoji_html","br_html"]).join("").replace(/\u200b+/g,"​");if(t.rangeCount){const n=t.getRangeAt(0);if(Object($a.a)(n))return void(h.c?document.execCommand("insertText",!1,e):(!function(e){const t=window.getSelection();if(t&&t.getRangeAt&&t.rangeCount){const a=t.getRangeAt(0);a.deleteContents();const s=a.createContextualFragment(e),n=s.lastChild;a.insertNode(s),n&&(a.setStartAfter(n),a.setEndAfter(n),t.removeAllRanges(),t.addRange(a))}}(s),a.dispatchEvent(new Event("input",{bubbles:!0}))));ae(`${ue.current}${s}`),h.f||requestAnimationFrame(()=>{Object(Ga.a)(a)})}else h.f&&ae(`${ue.current}${s}`)},[]),rt=Object(c.m)(()=>{const e=window.getSelection();if(e.rangeCount){const t=e.getRangeAt(0);if(Object($a.a)(t))return void document.execCommand("delete",!1)}ae(function(e){const t=document.createElement("div");t.contentEditable="true",t.style.position="absolute",t.style.left="-10000px",t.style.top="-10000px",t.innerHTML=e,document.body.appendChild(t);let a=t.lastChild;if(a.lastChild)for(;a.lastChild;)a=a.lastChild;const s=a.textContent.length,n=document.createRange(),c=window.getSelection();n.setStart(a,s),n.setEnd(a,s),c.removeAllRanges(),c.addRange(n),document.execCommand("delete",!1);const r=t.innerHTML;return document.body.removeChild(t),r}(ue.current))},[]),ot=Object(c.m)(()=>{ae(""),he([]),st(),ie(),be(void 0),Ve(),h.f?setTimeout(()=>we(),350):we()},[st,ie,Ve,we]),it=Object(He.a)(l);Object(c.n)(()=>{it&&l!==it&&(xe(),ot())},[l,it,ot,xe]);const lt=((e,t,a,s,r,o)=>{Object(c.n)(()=>{a?(t(as(a.content.text)),requestAnimationFrame(()=>{const e=document.getElementById(n.q);Object(Ga.a)(e,!0)})):t("")},[a,t]);return Object(c.m)(()=>{const{text:t,entities:n}=Object(_a.a)(e.current);a&&(t||Object(m.cb)(a)?(o({messageId:a.id,text:t,entities:n}),s()):r())},[o,a,e,r,s])})(ue,ae,o,ot,Ee,D);((e,t,a,s,r,o,i,l,d)=>{const b=Object(c.m)((e,t)=>{r.current.length&&!i?l({chatId:e,threadId:t,draft:Object(_a.a)(r.current)}):d({chatId:e,threadId:t})},[d,i,r,l]),u=Object(c.p)(()=>Object(g.a)(e=>e(),n.p,!1),[t]),m=Object(He.a)(t),h=Object(He.a)(a);Object(c.n)(()=>(ss=t,ns=a,()=>{ss=void 0,ns=void 0,b(t,a)}),[t,a,b]),Object(c.n)(()=>{t===m&&a===h||e&&(o(as(e)),requestAnimationFrame(()=>{const e=document.getElementById(n.q);Object(Ga.a)(e,!0)}))},[t,a,e,o,b,m,h]);const O=Object(He.a)(s);Object(c.n)(()=>{t&&a&&m===t&&h===a&&O!==s&&(s.length?u(()=>{ss===t&&ns===a&&b(t,a)}):b(t,a))},[t,s,m,O,h,u,a,b]),Object(c.n)(()=>{function e(){t&&a&&b(t,a)}return window.addEventListener("blur",e),()=>{window.removeEventListener("blur",e)}},[t,a,b])})(u,l,d,ee,ue,ae,o,U,H),((e,t,a)=>{Object(c.n)(()=>{async function s(s){if(!s.clipboardData)return;if(document.getElementById(n.q)!==document.activeElement)return;const{items:c}=s.clipboardData,r=Array.from(c).find(e=>ts.includes(e.type)),o=r&&r.getAsFile(),i=s.clipboardData.getData("text").substring(0,4096);if(o||i){if(s.preventDefault(),o&&!a){const e=await Va(o.name,o,!0);t(t=>[...t,e])}i&&e(i)}}return document.addEventListener("paste",s,!1),()=>{document.removeEventListener("paste",s,!1)}},[e,a,t])})(ct,he,o);const dt=Object(c.m)(async(e,t)=>{he(await Promise.all(e.map(e=>Va(e.name,e,t))))},[]),bt=Object(c.m)(()=>{he([])},[]),ut=Object(c.m)(async(e=!1,t)=>{if("connectionStateReady"!==j)return;let a=me;if(Re){const e=await xe();if(e){const{blob:t,duration:s,waveform:n}=e;a=[await Va("wonderful-voice-message.ogg",t,!1,{voice:{duration:s,waveform:n}})]}}const{text:s,entities:c}=Object(_a.a)(ue.current);if(a.length||s||y)if(a.length&&s&&s.length>1024){const e=s.length-1024;q({error:{message:"CAPTION_TOO_LONG_PLEASE_REMOVE_CHARACTERS",textParams:{"{EXTRA_CHARS_COUNT}":e,"{PLURAL_S}":e>1?"s":""}}})}else{if(a.length||s){if(tt&&!et){const e=Math.floor(Date.now()/1e3),t=se.current&&Math.floor(e-se.current),a=tt.nextSendDate&&tt.nextSendDate>e;if(t&&t{e={...e,isPreloadedGlobally:!0},t?(be({sticker:e}),oe()):(B({sticker:e}),requestAnimationFrame(ot))},[t,oe,B,ot]),ht=Object(c.m)(e=>{t?(be({gif:e}),oe()):(B({gif:e}),requestAnimationFrame(ot))},[t,oe,B,ot]),Ot=Object(c.m)(e=>{t?(be({poll:e}),$(),oe()):(B({poll:e}),$())},[$,oe,B,t]),jt=Object(c.m)(()=>{t?(be({isSilent:!0}),oe()):ut(!0)},[ut,oe,t]),gt=Object(c.m)(e=>{const{isSilent:t,...a}=le||{},s=Math.round(Math.max(e.getTime(),Date.now()+6e4)/1e3);le&&0!==Object.keys(a).length?(B({...le,scheduledAt:s}),requestAnimationFrame(ot)):ut(!!t,s),ie()},[ie,ut,ot,le,B]),ft=Object(c.m)(()=>{gt(new Date(1e3*n.Y))},[gt]),pt=Object(c.m)(()=>{ie(),be(void 0)},[ie]),It=Object(c.m)(e=>{"stickers"===e?(G({query:""}),_({query:void 0})):(_({query:""}),G({query:void 0}))},[G,_]),yt=Object(c.m)(()=>{const e=document.getElementById(n.q);h.f&&e===document.activeElement?(e.blur(),setTimeout(()=>{ye()},100)):ye()},[ye]),wt=Object(c.m)(()=>{K({id:l,threadId:d,type:"scheduled"})},[K,l,d]);Object(c.n)(()=>{I&&h.f&&we()},[I,we]),Object(c.n)(()=>{v?Pe():setTimeout(()=>{Te()},200)},[v,Te,Pe]);const Ct=Object(c.m)(()=>{switch(qe){case Ns.Send:t?(Re&&Le(),oe()):(ut(),requestAnimationFrame(ot));break;case Ns.Record:Ae();break;case Ns.Edit:lt()}},[qe,ot,t,Ae,lt,Re,oe,Le,ut]),Et=Object(te.a)(),Mt=qe===Ns.Record&&!Xe.canAttachMedia,St=Object(He.a)(o,!0),kt=o||St,Nt=new Date;Nt.setSeconds(0),Nt.setMilliseconds(0);const Pt=new Date;Pt.setFullYear(Pt.getFullYear()+1);let Tt="Send message";switch(qe){case Ns.Edit:Tt="Save edited message";break;case Ns.Record:Tt=Mt?"Posting media content is not allowed in this group.":"Record a voice message"}const At=Object(J.a)("Composer",!v&&"shown",Ne&&"hover-disabled"),xt=Object(J.a)("mobile-symbol-menu-button",Se?ve&&"menu-opened":ve&&"is-loading");return c.a.createElement("div",{className:At},Xe.canAttachMedia&&c.a.createElement(Ms.a,{containerId:"#middle-column-portals"},c.a.createElement(ws,{isOpen:e!==Fe.a.None,withQuick:[e,ce].includes(Fe.a.QuickFile),onHide:r,onFileSelect:dt})),c.a.createElement(vs,{attachments:me,caption:me.length?ee:"",canSuggestMembers:w,groupChatMembers:P,currentUserId:T,usersById:A,onCaptionUpdate:ae,onSend:t?oe:ut,onClear:bt}),c.a.createElement(ys,{isOpen:Boolean(C),onClear:$,onSend:Ot}),c.a.createElement(ks,{isOpen:Boolean(E),onClose:Q}),c.a.createElement(Ps,{isOpen:Boolean(M),onClose:Y}),kt&&c.a.createElement(os,{isOpen:Ce,isSchedule:"scheduled"===b,onClose:Me,message:kt}),c.a.createElement(hs,{isOpen:_e,filter:ze,onClose:Ve,onInsertUserName:$e,filteredChatMembers:We,usersById:A}),c.a.createElement("div",{id:"message-compose"},c.a.createElement("div",{className:"svg-appendix",ref:X}),c.a.createElement(Is,null),Xe.canAttachEmbedLinks&&c.a.createElement(Es,{chatId:l,messageText:me.length?"":ee}),c.a.createElement("div",{className:"message-input-wrapper"},h.f?c.a.createElement(ne.a,{className:xt,round:!0,color:"translucent",onClick:ve?we:yt,ariaLabel:"Choose emoji, sticker or GIF"},c.a.createElement("i",{className:"icon-smile"}),c.a.createElement("i",{className:"icon-keyboard"}),c.a.createElement(de.a,{color:"gray"})):c.a.createElement(bs,{className:""+(ve?"activated":""),round:!0,faded:!0,color:"translucent",onActivate:ye,ariaLabel:"Choose emoji, sticker or GIF"},c.a.createElement("i",{className:"icon-smile"})),c.a.createElement(fs.a,{id:"message-input-text",html:me.length?"":ee,placeholder:Re&&window.innerWidth<=600?"":Et("Message"),shouldSetFocus:ve,shouldSupressFocus:h.f&&ve,onUpdate:ae,onSend:qe===Ns.Edit?lt:t?oe:ut,onSupressedFocus:we}),k&&c.a.createElement(ne.a,{round:!0,faded:!0,className:"scheduled-button",color:"translucent",onClick:wt,ariaLabel:"Open scheduled messages"},c.a.createElement("i",{className:"icon-schedule"})),S&&!Re&&!o&&c.a.createElement(bs,{className:""+(Oe?"activated":""),round:!0,faded:!0,color:"translucent",onActivate:je,ariaLabel:"Open bot command keyboard"},c.a.createElement("i",{className:"icon-bot-command"})),!Re&&!o&&c.a.createElement(bs,{className:""+(fe?"activated":""),round:!0,faded:!0,color:"translucent",onActivate:pe,ariaLabel:"Add an attachment"},c.a.createElement("i",{className:"icon-attach"})),Re&&Be&&c.a.createElement("span",{className:"recording-state"},Object(x.i)(Be-Ue.current)),c.a.createElement(js,{isOpen:at,onStickerSelect:mt}),c.a.createElement(us,{isOpen:fe,allowedAttachmentOptions:Xe,onFileSelect:dt,onPollCreate:V,onClose:Ie}),S&&c.a.createElement(gs,{messageId:S,isOpen:Oe,onClose:ge}),c.a.createElement(ms,{isOpen:ve,allowedAttachmentOptions:Xe,onLoad:ke,onClose:we,onEmojiSelect:ct,onStickerSelect:mt,onGifSelect:ht,onRemoveSymbol:rt,onSearchOpen:It}))),Re&&c.a.createElement(ne.a,{round:!0,color:"danger",className:"cancel",onClick:xe,ariaLabel:"Cancel voice recording"},c.a.createElement("i",{className:"icon-delete"})),c.a.createElement(ne.a,{ref:De,round:!0,color:"secondary",className:`${qe} ${Re?"recording":""}`,disabled:Mt,ariaLabel:Tt,onClick:Ct,onContextMenu:qe===Ns.Send&&Ge?Ke:void 0},c.a.createElement("i",{className:"icon-send"}),c.a.createElement("i",{className:"icon-microphone-alt"}),c.a.createElement("i",{className:"icon-check"})),Ge&&c.a.createElement(Os,{isOpen:Qe,onSilentSend:p?void 0:jt,onScheduleSend:t?void 0:oe,onClose:Ye,onCloseAnimationEnd:Je}),c.a.createElement(Ss,{isOpen:re,withTimePicker:!0,selectedAt:Nt.getTime(),maxAt:Object(x.k)(Pt),isFutureMode:!0,secondButtonLabel:a?"Send When Online":void 0,onClose:pt,onSubmit:gt,onSecondButtonClick:a?ft:void 0}))}));var As=e=>{const{isActive:t}=e,a=Object(Ie.a)(pe.a.Extra,"MobileSearch",!t,!0);return a?c.a.createElement(a,e):void 0};var xs=e=>{const{isActive:t}=e,a=Object(Ie.a)(pe.a.Extra,"MessageSelectToolbar",!t);return a?c.a.createElement(a,e):void 0};var Ls=e=>{const{isOpen:t}=e,a=Object(Ie.a)(pe.a.Extra,"UnpinAllMessagesModal",!t);return a?c.a.createElement(a,e):void 0};a(229);const Rs=h.f?450+n.c:void 0;function Fs(e){return"file"===e.kind&&e.type&&n.j.includes(e.type)}var Bs=Object(c.h)(Object(s.h)(e=>{const{isBackgroundBlurred:t,customBackground:a}=e.settings.byKey,s=Boolean((a||"").match(/^#[a-f\d]{6,8}$/i)),n=Object(o.x)(e),{chats:{listIds:c}}=e;if(!n||!c.active)return{customBackground:a,isBackgroundBlurred:t,isCustomBackgroundColor:s};const{chatId:r,threadId:i,type:l}=n,d=Object(o.f)(e,r),b=Object(o.eb)(e,r),{chatId:u,messageId:O}=e.audioPlayer,j=d&&Object(m.e)(d,i),g=Object(o.J)(e,r),f="pinned"===l;return{chatId:r,threadId:i,messageListType:l,isPrivate:Object(m.lb)(r),canPost:!f&&(!d||j)&&(!g||h.f),isPinnedMessageList:f,messageSendingRestrictionReason:d&&Object(m.J)(d),hasPinnedOrAudioMessage:Boolean(b&&b.length)||Boolean(u&&O),customBackground:a,isCustomBackgroundColor:s,isRightColumnShown:Object(o.U)(e),isBackgroundBlurred:t,isMobileSearchActive:Boolean(h.f&&Object(o.z)(e)),isSelectModeActive:Object(o.Q)(e),animationLevel:e.settings.byKey.animationLevel}},(e,t)=>Object(d.l)(t,["openChat","unpinAllMessages","loadUser"]))(({chatId:e,threadId:t,messageListType:a,isPrivate:s,isPinnedMessageList:r,canPost:o,messageSendingRestrictionReason:l,hasPinnedOrAudioMessage:d,customBackground:b,isCustomBackgroundColor:u,isRightColumnShown:m,isBackgroundBlurred:O,isMobileSearchActive:j,isSelectModeActive:g,animationLevel:f,openChat:p,unpinAllMessages:I,loadUser:v})=>{const{width:y}=Ue(),[w,C]=Object(c.r)(Fe.a.None),[E,M]=Object(c.r)(!1),[S,k]=Object(c.r)(!1),N=qe(e,Rs),P=qe(t,Rs),T=qe(a,Rs),A=qe(o,Rs);Object(c.n)(()=>e?Object(Z.a)(()=>{p({id:void 0})}):void 0,[e,p]),Object(c.n)(()=>{C(Fe.a.None)},[e]),Object(c.n)(()=>{s&&v({userId:e})},[e,s,v]);const x=Object(c.m)(e=>{if(h.k)return;const{items:t}=e.dataTransfer||{},a=t&&Array.from(t).every(Fs);C(a?Fe.a.QuickFile:Fe.a.Document)},[]),L=Object(c.m)(()=>{C(Fe.a.None)},[]),R=Object(c.m)(()=>{k(!0)},[]),F=Object(c.m)(()=>{k(!1)},[]),B=Object(c.m)(()=>{I({chatId:e}),F(),p({id:e})},[I,p,F,e]),D=(e=>{const[t,a]=Object(c.r)(e);return Object(c.n)(()=>{e&&(e.startsWith("#")?a(e):Be.c(n.k,n.k,Be.a.Blob).then(e=>{a("url("+URL.createObjectURL(e))}))},[e]),t})(b),U=d&&(yn.Q&&y=n.P&&yGe(y,A),[A,y]),$=Object(te.a)();return c.a.createElement("div",{id:"MiddleColumn",className:H,style:`\n --composer-hidden-scale: ${G};\n --toolbar-hidden-scale: ${_};\n --composer-translate-x: ${z}px;\n --toolbar-translate-x: ${V}px;\n `},c.a.createElement("div",{id:"middle-column-bg",style:D?"--custom-background: "+D:void 0}),c.a.createElement("div",{id:"middle-column-portals"}),N&&P&&c.a.createElement(c.a.Fragment,null,c.a.createElement("div",{className:"messages-layout",onDragEnter:A?x:void 0},c.a.createElement(bt,{chatId:N,threadId:P,messageListType:T}),c.a.createElement(X.a,{name:f===n.e?"slide":"fade",activeKey:"thread"===T&&P===i.MAIN_THREAD_ID?1:2,shouldCleanup:!0},()=>c.a.createElement(c.a.Fragment,null,c.a.createElement(Ha,{key:`${N}-${P}-${T}`,chatId:N,threadId:P,type:T,hasTools:U,onFabToggle:M,bottomOffset:A?"none":r?"big":"small"}),c.a.createElement("div",{className:Object(J.a)("middle-column-footer",!A&&"no-composer")},A&&c.a.createElement(Ts,{chatId:N,threadId:P,messageListType:T,dropAreaState:w,onDropHide:L}),r&&c.a.createElement("div",{className:"unpin-button-container"},c.a.createElement(ne.a,{size:"tiny",fluid:!0,color:"secondary",className:"unpin-all-button",onClick:R},c.a.createElement("i",{className:"icon-unpin"}),c.a.createElement("span",null,$("Chat.PanelHidePinnedMessages")))),!A&&l&&c.a.createElement("div",{className:q},c.a.createElement("div",{className:"messaging-disabled-inner"},c.a.createElement("span",null,l))),c.a.createElement(xs,{messageListType:T,isActive:g,canPost:A})))),c.a.createElement(qa,{isShown:E})),h.f&&c.a.createElement(As,{isActive:Boolean(j)})),e&&c.a.createElement(Ls,{isOpen:S,chatId:e,onClose:F,onUnpin:B}))}));a(230);const Ds=Object(g.a)(e=>e(),200,!1);var Us;!function(e){e[e.Profile=0]="Profile",e[e.MemberList=1]="MemberList",e[e.SharedMedia=2]="SharedMedia",e[e.Search=3]="Search",e[e.Statistics=4]="Statistics",e[e.Management=5]="Management",e[e.ManageInitial=6]="ManageInitial",e[e.ManageChannelSubscribers=7]="ManageChannelSubscribers",e[e.ManageChatAdministrators=8]="ManageChatAdministrators",e[e.ManageChatPrivacyType=9]="ManageChatPrivacyType",e[e.ManageDiscussion=10]="ManageDiscussion",e[e.ManageGroupPermissions=11]="ManageGroupPermissions",e[e.ManageGroupRemovedUsers=12]="ManageGroupRemovedUsers",e[e.ManageGroupUserPermissionsCreate=13]="ManageGroupUserPermissionsCreate",e[e.ManageGroupUserPermissions=14]="ManageGroupUserPermissions",e[e.ManageGroupRecentActions=15]="ManageGroupRecentActions",e[e.ManageGroupAdminRights=16]="ManageGroupAdminRights",e[e.ManageGroupMembers=17]="ManageGroupMembers",e[e.StickerSearch=18]="StickerSearch",e[e.GifSearch=19]="GifSearch",e[e.PollResults=20]="PollResults"}(Us||(Us={}));var Hs=Object(c.h)(Object(s.h)((e,{chatId:t,isProfile:a,isManagement:s})=>{const{query:n}=Object(o.z)(e)||{},{query:c}=Object(o.y)(e)||{},{query:r}=Object(o.r)(e)||{},i=t?Object(o.f)(e,t):void 0,l=i&&Object(m.jb)(i);return{canManage:Boolean(!s&&a&&i&&!Object(o.N)(e,i.id)&&(Object(m.lb)(i.id)||(Object(m.gb)(i)||i.isCreator)&&!i.isNotJoined)),isChannel:l,messageSearchQuery:n,stickerSearchQuery:c,gifSearchQuery:r}},(e,t)=>Object(d.l)(t,["setLocalTextSearchQuery","setStickerSearchQuery","setGifSearchQuery","searchTextMessagesLocal","toggleManagement","searchMessagesByDate"]))(({isColumnOpen:e,isProfile:t,isSearch:a,isManagement:s,isStatistics:n,isStickerSearch:r,isGifSearch:o,isPollResults:i,profileState:d,managementScreen:b,canManage:u,isChannel:m,onClose:O,messageSearchQuery:j,stickerSearchQuery:g,gifSearchQuery:f,setLocalTextSearchQuery:p,setStickerSearchQuery:I,setGifSearchQuery:v,searchTextMessagesLocal:y,toggleManagement:w,searchMessagesByDate:C})=>{const E=Object(c.q)(null),[M,S,k]=Object(nt.a)(),N=Object(c.m)(e=>{p({query:e}),e.length&&Ds(y)},[y,p]),P=Object(c.m)(e=>{C({timestamp:e.valueOf()/1e3}),k()},[k,C]),T=Object(c.m)(e=>{I({query:e})},[I]),A=Object(c.m)(e=>{v({query:e})},[v]),[x,L]=Object(c.r)(!e);Object(c.n)(()=>{setTimeout(()=>{L(!e)},300)},[e]);const R=Object(te.a)(),F=t?d===l.k.Profile?Us.Profile:d===l.k.SharedMedia?Us.SharedMedia:d===l.k.MemberList?Us.MemberList:-1:a?Us.Search:i?Us.PollResults:r?Us.StickerSearch:o?Us.GifSearch:s?b===l.g.Initial?Us.ManageInitial:b===l.g.ChatPrivacyType?Us.ManageChatPrivacyType:b===l.g.Discussion?Us.ManageDiscussion:b===l.g.ChannelSubscribers?Us.ManageChannelSubscribers:b===l.g.GroupPermissions?Us.ManageGroupPermissions:b===l.g.ChatAdministrators?Us.ManageChatAdministrators:b===l.g.GroupRemovedUsers?Us.ManageGroupRemovedUsers:b===l.g.GroupUserPermissionsCreate?Us.ManageGroupUserPermissionsCreate:b===l.g.GroupUserPermissions?Us.ManageGroupUserPermissions:b===l.g.GroupRecentActions?Us.ManageGroupRecentActions:b===l.g.ChatAdminRights?Us.ManageGroupAdminRights:b===l.g.GroupMembers?Us.ManageGroupMembers:-1:n?Us.Statistics:-1;function B(){switch(F){case Us.PollResults:return c.a.createElement("h3",null,R("PollResults"));case Us.Search:return c.a.createElement(c.a.Fragment,null,c.a.createElement(ce.a,{value:j,onChange:N}),c.a.createElement(ne.a,{round:!0,size:"smaller",color:"translucent",onClick:S,ariaLabel:"Search messages by date"},c.a.createElement("i",{className:"icon-calendar"})));case Us.ManageInitial:return c.a.createElement("h3",null,R("Edit"));case Us.ManageChatPrivacyType:return c.a.createElement("h3",null,R(m?"ChannelTypeHeader":"GroupTypeHeader"));case Us.ManageDiscussion:return c.a.createElement("h3",null,R("Discussion"));case Us.ManageChatAdministrators:return c.a.createElement("h3",null,R("ChannelAdministrators"));case Us.ManageGroupRecentActions:return c.a.createElement("h3",null,R("Group.Info.AdminLog"));case Us.ManageGroupAdminRights:return c.a.createElement("h3",null,R("EditAdminRights"));case Us.ManageGroupPermissions:return c.a.createElement("h3",null,R("ChannelPermissions"));case Us.ManageGroupRemovedUsers:return c.a.createElement("h3",null,R("ChannelBlockedUsers"));case Us.ManageGroupUserPermissionsCreate:return c.a.createElement("h3",null,R("ChannelAddException"));case Us.ManageGroupUserPermissions:return c.a.createElement("h3",null,R("UserRestrictions"));case Us.StickerSearch:return c.a.createElement(ce.a,{value:g,placeholder:"Search Stickers",onChange:T});case Us.GifSearch:return c.a.createElement(ce.a,{value:f,placeholder:R("SearchGifsTitle"),onChange:A});case Us.Statistics:return c.a.createElement("h3",null,R("Statistics"));case Us.SharedMedia:return c.a.createElement("h3",null,R("SharedMedia"));case Us.ManageChannelSubscribers:return c.a.createElement("h3",null,R("ChannelSubscribers"));case Us.MemberList:case Us.ManageGroupMembers:return c.a.createElement("h3",null,R("GroupMembers"));default:return c.a.createElement(c.a.Fragment,null,c.a.createElement("h3",null,R("Info")),c.a.createElement("section",{className:"tools"},u&&c.a.createElement(ne.a,{round:!0,color:"translucent",size:"smaller",ariaLabel:R("Edit"),onClick:w},c.a.createElement("i",{className:"icon-edit"}))))}}const D=h.f||F===Us.SharedMedia||F===Us.MemberList||s,U=Object(J.a)("animated-close-icon",x&&"no-transition");return Object(c.n)(()=>{E.current.classList.toggle("state-back",D)},[D]),c.a.createElement("div",{className:"RightHeader"},c.a.createElement(ne.a,{className:"close-button",round:!0,color:"translucent",size:"smaller",onClick:O,ariaLabel:R(D?"Common.Back":"Common.Close")},c.a.createElement("div",{ref:E,className:U})),c.a.createElement(X.a,{name:x?"none":"slide-fade",activeKey:F},B),!h.f&&c.a.createElement(Ss,{isOpen:M,isPastMode:!0,submitButtonLabel:R("JumpToDate"),onClose:k,onSubmit:P}))})),qs=a(118);function Gs(e,t,a,s,r,o){const i=Object(c.q)();Object(me.a)(()=>{t===e&&r&&o&&(i.current=Object(m.w)(r,o,e).reverse())},[r,o,t,e]);const[l,d]=Object(qs.a)(s?a:void 0,i.current,void 0,"media"===e?n.ab:n.N);return[l,d,!(!l||!i.current||l[0]===i.current[0])]}var _s=a(51);const zs=Object(g.g)(e=>e(),250,!1);let Vs=!1;var $s=a(101),Ws=a(94);var Qs=Object(c.h)(Object(s.h)((e,{userId:t})=>{const{lastSyncTime:a}=e;return{lastSyncTime:a,user:Object(o.Bb)(e,t)}},(e,t)=>Object(d.l)(t,["loadFullUser"]))(({lastSyncTime:e,user:t,forceShowSelf:a,loadFullUser:s})=>{const{id:n,fullInfo:r,username:o,phoneNumber:i,isSelf:l}=t||{};Object(c.n)(()=>{e&&s({userId:n})},[s,n,e]);const d=Object(te.a)();if(!t||l&&!a)return;const b=r&&r.bio,u=i&&Object(da.c)(i);return c.a.createElement("div",{className:"ChatExtra"},b&&!!b.length&&c.a.createElement("div",{className:"item"},c.a.createElement("i",{className:"icon-info"}),c.a.createElement("div",null,c.a.createElement("p",{className:"title"},Object(Ze.a)(b,["br","links"])),c.a.createElement("p",{className:"subtitle"},d("UserBio")))),o&&!!o.length&&c.a.createElement("div",{className:"item"},c.a.createElement("i",{className:"icon-mention"}),c.a.createElement("div",null,c.a.createElement("p",{className:"title"},Object(Ze.a)(o)),c.a.createElement("p",{className:"subtitle"},d("Username")))),u&&!!u.length&&c.a.createElement("div",{className:"item"},c.a.createElement("i",{className:"icon-phone"}),c.a.createElement("div",null,c.a.createElement("p",{className:"title"},u),c.a.createElement("p",{className:"subtitle"},d("Phone")))))}));var Ks=Object(c.h)(Object(s.h)((e,{chatId:t})=>({chat:Object(o.f)(e,t)}))(({chat:e})=>{const t=Object(te.a)();if(!e||e.isRestricted)return;const a=Object(m.g)(e),s=Object(m.h)(e),n=0===s.indexOf("http")?s:"http://"+s;return c.a.createElement("div",{className:"ChatExtra"},a&&!!a.length&&c.a.createElement("div",{className:"item"},c.a.createElement("i",{className:"icon-info"}),c.a.createElement("div",null,c.a.createElement("p",{className:"title"},Object(Ze.a)(a,["br","links"])),c.a.createElement("p",{className:"subtitle"},t("Info")))),!!s.length&&c.a.createElement("div",{className:"item"},c.a.createElement("i",{className:"icon-mention"}),c.a.createElement("div",null,c.a.createElement(Ia.a,{url:n,className:"title",text:s}),c.a.createElement("p",{className:"subtitle"},t("SetUrlPlaceholder")))))})),Ys=a(153),Js=a(172),Zs=a(108);a(234);const Xs=[{type:"media",title:"SharedMediaTab2"},{type:"documents",title:"SharedFilesTab2"},{type:"links",title:"SharedLinksTab2"},{type:"audio",title:"SharedMusicTab2"}];function en(e){return[`.shared-media-transition > div:only-child > .${e}-list > .scroll-item`,`.shared-media-transition > div.active > .${e}-list > .scroll-item`].join(", ")}var tn=Object(c.h)(Object(s.h)((e,{chatId:t,userId:a})=>{const s=Object(o.f)(e,t),n=Object(o.m)(e,a||t),{currentType:c,resultsByType:r}=Object(o.u)(e)||{},{foundIds:i}=r&&c&&r[c]||{},{byId:l}=e.users,d=s&&Object(m.kb)(s),b=s&&Object(m.jb)(s),u=d||b&&Object(m.gb)(s),h=s&&s.fullInfo&&s.fullInfo.members,O=u&&s&&s.fullInfo&&!s.fullInfo.canViewMembers;let j;return a?j=a:Object(m.lb)(t)&&(j=t),{isChannel:b,resolvedUserId:j,chatMessages:n,foundIds:i,mediaSearchType:c,hasMembersTab:u,areMembersHidden:O,...u&&h&&{members:h,usersById:l},isRightColumnShown:Object(o.U)(e),isRestricted:s&&s.isRestricted,lastSyncTime:e.lastSyncTime}},(e,t)=>Object(d.l)(t,["setLocalMediaSearchType","searchMediaMessagesLocal","openMediaViewer","openAudioPlayer","openUserInfo","focusMessage"]))(({chatId:e,profileState:t,onProfileStateChange:a,isChannel:s,resolvedUserId:r,chatMessages:o,foundIds:d,mediaSearchType:b,hasMembersTab:u,areMembersHidden:O,members:j,usersById:g,isRightColumnShown:f,isRestricted:p,lastSyncTime:I,setLocalMediaSearchType:v,searchMediaMessagesLocal:y,openMediaViewer:w,openAudioPlayer:C,openUserInfo:E,focusMessage:M})=>{const S=Object(c.q)(null),k=Object(c.q)(null),[N,P]=Object(c.r)(0),T=Object(c.p)(()=>[...u?[{type:"members",title:s?"ChannelSubscribers":"GroupMembers"}]:[],...Xs],[u,s]),A=T[N].type,[x,L,R,F]=function(e,t,a,s,n,r,o,i,l,d){const b="members"!==a&&s?s:a,u=Object(c.p)(()=>{if(n&&r)return Object(m.W)(n.map(({userId:e})=>e),r)},[n,r]),[h,O,j]=Gs("media",b,t,d,o,i),[g,f,p]=Gs("documents",b,t,d,o,i),[I,v,y]=Gs("links",b,t,d,o,i),[w,C,E]=Gs("audio",b,t,d,o,i);let M,S,k=!1;switch(b){case"members":M=u,S=void 0;break;case"media":M=h,S=O,k=j;break;case"documents":M=g,S=f,k=p;break;case"links":M=I,S=v,k=y;break;case"audio":M=w,S=C,k=E}return[b,M,S,k]}(0,y,A,b,j,g,o,d,0,I),B=T.findIndex(({type:e})=>e===x),{handleScroll:D}=function(e,t,a,s){Object(_s.a)(([a])=>{if(a&&a!==t){const a=e.current,n=a.querySelector(".TabList");a.scrollTop{Vs=!1},350))}},[t,s]),Object(_s.a)(([t])=>{if(a!==l.k.Profile||a===t)return;const n=e.current;if(!n)return;const c=n.querySelector(".TabList");!c||c.offsetTop>n.scrollTop||(Vs=!0,Object(ft.a)(n,n.firstElementChild,"start",void 0,2*n.offsetHeight),setTimeout(()=>{Vs=!1},350),s(a))},[a]);const n=Object(c.m)(()=>{const a=e.current;if(!a)return;const n=a.querySelector(".TabList");if(!n)return;let c=l.k.Profile;a.scrollTop>=n.offsetTop&&(c="members"===t?l.k.MemberList:l.k.SharedMedia),s(c)},[e,s,t]);return Object(c.n)(()=>{Vs||n()},[n,t]),{handleScroll:Object(c.m)(()=>{Vs||zs(n)},[n])}}(S,A,t,a),{applyTransitionFix:U,releaseTransitionFix:H}=function(e){return Object(c.n)(()=>{function t(){const t=e.current,a=t.querySelector(".Transition"),s=t.querySelector(".TabList");a&&s&&(a.style.minHeight=t.offsetHeight-s.offsetHeight+"px")}return t(),window.addEventListener("resize",t,!1),()=>{window.removeEventListener("resize",t,!1)}},[e]),{applyTransitionFix:Object(c.m)(()=>{const t=e.current;if("hidden"!==t.style.overflowY){const e=t.offsetWidth-t.clientWidth;t.style.overflowY="hidden",t.style.marginRight=e+"px"}},[e]),releaseTransitionFix:Object(c.m)(()=>{const t=e.current;t.style.overflowY="scroll",t.style.marginRight="0"},[e])}}(S),[q,G]=(()=>{const[e,t]=Object(c.r)(!1);return[e,Object(c.m)(()=>{t(e=>!e)},[])]})(),_=Object(c.m)(()=>{H(),G()},[H,G]);Object(c.n)(()=>{v({mediaType:A})},[v,A]);const z=r||e,V=Object(c.m)(e=>{w({chatId:z,threadId:i.MAIN_THREAD_ID,messageId:e,origin:l.h.SharedMedia})},[z,w]),$=Object(c.m)(e=>{C({chatId:z,messageId:e})},[z,C]),W=Object(c.m)(e=>{E({id:e})},[E]),Q=Object(c.m)(e=>{M({chatId:z,messageId:e})},[z,M]);let K;Object(c.n)(()=>{if(k.current&&h.k)return Object(ue.b)(k.current,{onSwipe:(e,t)=>{t===ue.a.Left?P(Math.min(N+1,T.length-1)):t===ue.a.Right&&P(Math.max(0,N-1))}})},[N,T.length]);const Y="members"===x||!u&&"media"===x;Y?K=f?0:1e3:L||(K=n.bb);const J=Object(ps.a)([e,x],K);function Z(){if(!L||!J||!o){const e=Y&&L&&!J;return c.a.createElement("div",{className:"content empty-list"},!e&&c.a.createElement(de.a,null))}if(!L.length){let e;switch(x){case"members":e=O?"You have no access to group members list.":"No members found";break;case"documents":e="No documents found.";break;case"links":e="No links found.";break;case"audio":e="No audio found.";break;default:e="No media found."}return c.a.createElement("div",{className:"content empty-list"},c.a.createElement(Zs.a,{text:e}))}return c.a.createElement("div",{className:`content ${x}-list`,teactFastList:!0},"media"===x?L.map(e=>o[e]&&c.a.createElement(Ys.a,{key:e,message:o[e],onClick:V})):"documents"===x?L.map(e=>o[e]&&c.a.createElement(_t.a,{key:e,message:o[e],withDate:!0,smaller:!0,className:"scroll-item",onDateClick:Q})):"links"===x?L.map(e=>o[e]&&c.a.createElement(Js.a,{key:e,message:o[e],onMessageClick:Q})):"audio"===x?L.map(e=>o[e]&&c.a.createElement(zt.a,{key:e,renderingFor:"sharedMedia",message:o[e],date:o[e].date,lastSyncTime:I,className:"scroll-item",onPlay:$,onDateClick:Q})):"members"===x?L.map((e,t)=>c.a.createElement(Ws.a,{key:e,teactOrderKey:t,className:"chat-item-clickable scroll-item",onClick:()=>W(e)},c.a.createElement(We.a,{userId:e,forceShowSelf:!0}))):void 0)}return c.a.createElement($s.a,{ref:S,className:"Profile custom-scroll",itemSelector:en(x),items:L,cacheBuster:q,preloadBackwards:n.ab,isDisabled:"members"===A,noFastList:!0,onLoadMore:R,onScroll:D},!F&&function(e,t){return c.a.createElement("div",{className:"profile-info"},t?c.a.createElement(c.a.Fragment,null,c.a.createElement(We.a,{userId:t,avatarSize:"jumbo",forceShowSelf:t!==e,withMediaViewer:!0,withFullInfo:!0}),c.a.createElement(Qs,{userId:t,forceShowSelf:t!==e})):c.a.createElement(c.a.Fragment,null,c.a.createElement(Qe.a,{chatId:e,avatarSize:"jumbo",withMediaViewer:!0,withFullInfo:!0}),c.a.createElement(Ks,{chatId:e})))}(e,r),!p&&c.a.createElement("div",{className:"shared-media"},c.a.createElement(X.a,{ref:k,name:"slide",activeKey:B,renderCount:T.length,shouldRestoreHeight:!0,className:"shared-media-transition",onStart:U,onStop:_},Z),c.a.createElement(je.a,{activeTab:N,tabs:T,onSwitchTab:P})))}));var an=e=>{const t=Object(Ie.a)(pe.a.Extra,"RightSearch");return t?c.a.createElement(t,e):c.a.createElement(ve.a,null)};var sn=e=>{const t=Object(Ie.a)(pe.a.Extra,"Management");return t?c.a.createElement(t,e):c.a.createElement(ve.a,null)};var nn=()=>{const e=Object(Ie.a)(pe.a.Extra,"Statistics");return e?c.a.createElement(e,null):c.a.createElement(ve.a,null)};var cn=()=>{const e=Object(Ie.a)(pe.a.Extra,"StickerSearch");return e?c.a.createElement(e,null):c.a.createElement(ve.a,null)};var rn=()=>{const e=Object(Ie.a)(pe.a.Extra,"GifSearch");return e?c.a.createElement(e,null):c.a.createElement(ve.a,null)};var on=()=>{const e=Object(Ie.a)(pe.a.Extra,"PollResults");return e?c.a.createElement(e,null):c.a.createElement(ve.a,null)};a(235);const ln=Object.keys(l.l).length/2,dn=Object.keys(l.g).length/2;function bn(){const e=document.querySelector(".RightHeader .SearchInput input");e&&e.blur()}var un=Object(c.h)(Object(s.h)(e=>{const{chatId:t,threadId:a}=Object(o.x)(e)||{},s=Object(o.d)(e);return{contentKey:Object(o.ib)(e),chatId:t,threadId:a,currentProfileUserId:e.users.selectedId,isChatSelected:Boolean(t&&s)}},(e,t)=>Object(d.l)(t,["openUserInfo","toggleChatInfo","toggleManagement","toggleStatistics","closeLocalTextSearch","setStickerSearchQuery","setGifSearchQuery","closePollResults"]))(({contentKey:e,chatId:t,threadId:a,currentProfileUserId:s,isChatSelected:r,toggleChatInfo:o,toggleManagement:i,toggleStatistics:d,openUserInfo:b,closeLocalTextSearch:u,setStickerSearchQuery:m,setGifSearchQuery:h,closePollResults:O})=>{var j;const{width:g}=Ue(),[f,p]=Object(c.r)(l.k.Profile),[I,v]=Object(c.r)(l.g.Initial),[y,w]=Object(c.r)(),[C,E]=Object(c.r)(),M=f!==l.k.Profile,S=void 0!==e,k=e===l.l.ChatInfo||e===l.l.UserInfo,N=e===l.l.Search,P=e===l.l.Management,T=e===l.l.Statistics,A=e===l.l.StickerSearch,x=e===l.l.GifSearch,L=e===l.l.PollResults,R=g<=n.Q,[F,B]=Object(c.r)(!S),D=null!==(j=Ve(e,!0,!r))&&void 0!==j?j:-1,U=Object(c.m)(()=>{switch(e){case l.l.ChatInfo:if(M){p(l.k.Profile);break}o();break;case l.l.UserInfo:if(M){p(l.k.Profile);break}b({id:void 0});break;case l.l.Management:switch(I){case l.g.Initial:i();break;case l.g.ChatPrivacyType:case l.g.Discussion:case l.g.GroupPermissions:case l.g.GroupType:case l.g.ChatAdministrators:case l.g.ChannelSubscribers:case l.g.GroupMembers:v(l.g.Initial);break;case l.g.GroupUserPermissionsCreate:case l.g.GroupRemovedUsers:case l.g.GroupUserPermissions:v(l.g.GroupPermissions),w(void 0),E(void 0);break;case l.g.ChatAdminRights:case l.g.GroupRecentActions:v(l.g.ChatAdministrators)}break;case l.l.Statistics:d();break;case l.l.Search:bn(),u();break;case l.l.StickerSearch:case l.l.GifSearch:bn(),m({query:void 0}),h({query:void 0});break;case l.l.PollResults:O()}},[e,M,o,b,d,O,I,i,u,m,h]),H=Object(c.m)((e,t)=>{w(e),E(t)},[]);function q(){if(-1!==D)switch(D){case l.l.ChatInfo:case l.l.UserInfo:return c.a.createElement(tn,{key:s||t,chatId:t,userId:s,profileState:f,onProfileStateChange:p});case l.l.Search:return c.a.createElement(an,{chatId:t,threadId:a});case l.l.Management:return c.a.createElement(sn,{chatId:t,currentScreen:I,isPromotedByCurrentUser:C,selectedChatMemberId:y,onScreenSelect:v,onChatMemberSelect:H});case l.l.Statistics:return c.a.createElement(nn,null);case l.l.StickerSearch:return c.a.createElement(cn,null);case l.l.GifSearch:return c.a.createElement(rn,null);case l.l.PollResults:return c.a.createElement(on,null)}}return Object(c.n)(()=>S?Object(Z.a)(U):void 0,[S,U]),Object(c.n)(()=>{setTimeout(()=>{B(!S)},300)},[S]),Object(c.n)(()=>{S&&R&&U()},[R]),Object(ut.a)(([a,s])=>{(a===l.l.ChatInfo&&e===l.l.UserInfo||a===l.l.UserInfo&&e===l.l.ChatInfo||s!==t)&&(p(l.k.Profile),v(l.g.Initial))},[e,t]),c.a.createElement("div",{id:"RightColumn-wrapper",className:r?void 0:"is-hidden"},R&&c.a.createElement("div",{className:"overlay-backdrop",onClick:U}),c.a.createElement("div",{id:"RightColumn"},c.a.createElement(Hs,{chatId:t,isColumnOpen:S,isProfile:k,isSearch:N,isManagement:P,isStatistics:T,isStickerSearch:A,isGifSearch:x,isPollResults:L,profileState:f,managementScreen:I,onClose:U}),c.a.createElement(X.a,{name:F?"none":"zoom-fade",renderCount:ln+dn,activeKey:P?ln+I:D},q)))}));var mn=Object(c.h)(({isOpen:e})=>{const t=Object(Ie.a)(pe.a.Extra,"MediaViewer",!e);return t?c.a.createElement(t,null):void 0});var hn=e=>{const{isOpen:t}=e,a=Object(Ie.a)(pe.a.Extra,"ForwardPicker",!t);return a?c.a.createElement(a,e):void 0};var On=({isOpen:e})=>{const t=Object(Ie.a)(pe.a.Extra,"Notifications",!e);return t?c.a.createElement(t,null):void 0};var jn=({isOpen:e})=>{const t=Object(Ie.a)(pe.a.Extra,"Errors",!e);return t?c.a.createElement(t,null):void 0};a(236);let gn,fn=!1;var pn=Object(c.h)(Object(s.h)(e=>({animationLevel:e.settings.byKey.animationLevel,lastSyncTime:e.lastSyncTime,isLeftColumnShown:e.isLeftColumnShown,isRightColumnShown:Object(o.U)(e),isMediaViewerOpen:Object(o.R)(e),isForwardModalOpen:Object(o.P)(e),hasNotifications:Boolean(e.notifications.length),hasErrors:Boolean(e.errors.length)}),(e,t)=>Object(d.l)(t,["loadAnimatedEmojis"]))(({lastSyncTime:e,loadAnimatedEmojis:t,isLeftColumnShown:a,isRightColumnShown:s,isMediaViewerOpen:r,isForwardModalOpen:o,animationLevel:i,hasNotifications:l,hasErrors:d})=>{n.l&&!fn&&(fn=!0,console.log(">>> RENDER MAIN")),Object(c.n)(()=>{e&&t()},[e,t]);const{transitionClassNames:b}=Object(Y.a)(!a,void 0,!0),{transitionClassNames:u}=Object(Y.a)(s,void 0,!0),m=Object(J.a)(b.replace(/([\w-]+)/g,"middle-column-$1"),u.replace(/([\w-]+)/g,"right-column-$1"));function h(e){e.preventDefault(),e.stopPropagation()}return Object(c.n)(()=>{document.body.classList.toggle("is-middle-column-open",m.includes("middle-column-open")),document.body.classList.toggle("is-right-column-shown",m.includes("right-column-open"))},[m]),Object(c.n)(()=>{i>0&&(document.body.classList.add("animating-right-column"),Object(K.b)(350+n.c),gn&&(clearTimeout(gn),gn=void 0),gn=window.setTimeout(()=>{document.body.classList.remove("animating-right-column"),gn=void 0},350+n.c))},[i,s]),c.a.createElement("div",{id:"Main",className:m,onDrop:h,onDragOver:h},c.a.createElement(Re,null),c.a.createElement(Bs,null),c.a.createElement(un,null),c.a.createElement(mn,{isOpen:r}),c.a.createElement(hn,{isOpen:o}),c.a.createElement(On,{isOpen:l}),c.a.createElement(jn,{isOpen:d}))}));n.l&&console.log(">>> FINISH LOAD MAIN BUNDLE"),Object(s.d)().initApi()}}]); \ No newline at end of file diff --git a/dist/3.6470b420067a21e4cdac.css b/dist/3.6470b420067a21e4cdac.css new file mode 100644 index 00000000..71e012e0 --- /dev/null +++ b/dist/3.6470b420067a21e4cdac.css @@ -0,0 +1 @@ +.Switcher{display:inline-flex;align-items:center;position:relative;margin:0}.Switcher.disabled{pointer-events:none;opacity:.5}.Switcher input{height:0;width:0;visibility:hidden;position:absolute;z-index:var(--z-below);opacity:0}.Switcher .widget{cursor:pointer;text-indent:-999px;width:2.125rem;height:.875rem;background:var(--color-gray);display:inline-block;border-radius:.5rem;position:relative}.Switcher .widget:after{content:"";position:absolute;top:-.125rem;left:0;width:1.125rem;height:1.125rem;background:var(--color-background);border-radius:.75rem;border:.125rem solid var(--color-gray)}.Switcher input:checked+.widget{background:var(--color-primary)}.Switcher input:checked+.widget:after{left:calc(100% - 1.125rem);transform:translateX(calc(-100% + 1.125rem));border-color:var(--color-primary)}#LeftMainHeader{position:relative}#LeftMainHeader .animated-menu-icon{position:absolute}#LeftMainHeader .animated-menu-icon,#LeftMainHeader .animated-menu-icon:after,#LeftMainHeader .animated-menu-icon:before{width:1.125rem;height:.125rem;border-radius:.125rem;background-color:var(--color-text-secondary);transition:transform .25s;transform:rotate(0)}#LeftMainHeader .animated-menu-icon:after,#LeftMainHeader .animated-menu-icon:before{position:absolute;left:0;content:""}#LeftMainHeader .animated-menu-icon:before{top:-.3125rem}#LeftMainHeader .animated-menu-icon:after{top:.3125rem}#LeftMainHeader .animated-menu-icon.state-back{transform:rotate(180deg)}#LeftMainHeader .animated-menu-icon.state-back:before{transform:rotate(45deg) scaleX(.75) translate(.375rem,-.1875rem)}#LeftMainHeader .animated-menu-icon.state-back:after{transform:rotate(-45deg) scaleX(.75) translate(.375rem,.1875rem)}#LeftMainHeader .archived-badge{min-width:1.5rem;height:1.5rem;margin-left:auto;background:var(--color-gray);border-radius:.75rem;padding:0 .45rem;color:#fff;font-size:.875rem;line-height:1.5rem;font-weight:500;text-align:center;flex-shrink:0}#LeftMainHeader .Menu .bubble{min-width:17rem}.Transition>div:not(.active) #LeftMainHeader .Menu .bubble,body.animating-right-column #LeftMainHeader .Menu .bubble{transition:none!important}#ConnectionState{flex:0 0 auto;display:flex;align-items:center;margin:0 .5rem .5rem;padding:.75rem;background:var(--color-yellow);border-radius:var(--border-radius-default)}#ConnectionState>.Spinner{--spinner-size:1.75rem}#ConnectionState>.state-text{color:var(--color-text-lighter);font-weight:500;line-height:2rem;margin-left:1.9rem;white-space:nowrap}@media (max-width:950px){#ConnectionState>.state-text{margin-left:1.2rem}}.NewChatButton{position:absolute;right:1rem;bottom:1rem;transform:translateY(5rem);transition:transform .25s cubic-bezier(.34,1.56,.64,1)}body.animation-level-0 .NewChatButton{transform:none!important;opacity:0;transition:opacity .15s}body.animation-level-0 .NewChatButton.revealed{opacity:1}.NewChatButton.revealed{transform:translateY(0)}@media (max-width:600px){.NewChatButton.revealed{transform:translateZ(10px);transform-style:preserve-3d}}.NewChatButton.menu-is-open:before{content:"";display:block;position:absolute;top:-13rem;left:-11rem;right:-1rem;bottom:-1rem;z-index:-1}.is-touch-env .NewChatButton .Menu>.backdrop{position:absolute;left:-100vw;right:-100vw;top:-100vh;bottom:-100vh}.NewChatButton>.Button .icon-close,.NewChatButton>.Button .icon-new-chat-filled{position:absolute}.NewChatButton>.Button:not(.active) .icon-new-chat-filled{animation:grow-icon .4s ease-out}.NewChatButton>.Button:not(.active) .icon-close{animation:hide-icon .4s ease-out forwards}.NewChatButton>.Button.active .icon-close{animation:grow-icon .4s ease-out}.NewChatButton>.Button.active .icon-new-chat-filled{animation:hide-icon .4s ease-out forwards}#LeftColumn-main{height:100%;position:relative;display:flex;flex-direction:column;overflow:hidden;z-index:1}#LeftColumn-main>.Transition{flex:1;overflow:hidden}#LeftColumn-main .ChatFolders{height:100%;display:flex;flex-direction:column;overflow:hidden}#LeftColumn-main .ChatFolders .tabs-placeholder{height:2.625rem;transition:height .15s ease}#LeftColumn-main .ChatFolders .tabs-placeholder:not(.open){height:0}#LeftColumn-main .ChatFolders .TabList{justify-content:flex-start;padding-left:.5625rem;padding-bottom:1px;border-bottom:0;z-index:1}#LeftColumn-main .ChatFolders .Tab{flex:0 0 auto;padding-left:.625rem;padding-right:.625rem}#LeftColumn-main .ChatFolders .Tab>span{padding-left:.5rem;padding-right:.5rem}#LeftColumn-main .ChatFolders>.Transition{flex:1;overflow:hidden}#LeftColumn-main .chat-list,#LeftColumn-main .LeftSearch,#LeftColumn-main .RecentContacts,#LeftColumn-main .search-content{height:100%;overflow-y:auto}#LeftColumn{overflow:hidden}#NewChat{height:100%}.left-header{height:var(--header-height);padding:.375rem 1.25rem .5rem .8125rem;display:flex;align-items:center;flex-shrink:0;background-color:var(--color-background)}.left-header h3{margin-bottom:0;font-size:1.25rem;font-weight:500;margin-left:1.375rem}.left-header .SearchInput{margin-left:.875rem;max-width:calc(100% - 3.625rem)}@media (max-width:600px){.left-header .SearchInput{max-width:calc(100% - 3.375rem)}}@media (max-width:600px){.left-header{padding:.5rem}}.AudioPlayer{display:flex;margin-left:auto;margin-top:-.25rem;margin-bottom:-.25rem}body.animation-level-0 .AudioPlayer{transition:none!important}.AudioPlayer>.Button{flex-shrink:0;margin:.125rem}.AudioPlayer>.toggle-play{--color-text-secondary:var(--color-primary);--color-text-secondary-rgb:var(--color-primary-shade-rgb);--color-primary-shade:var(--color-green);--color-white:var(--color-background-own)}.MiddleHeader .AudioPlayer+.HeaderActions{margin-left:1.5rem}.AudioPlayer .toggle-play.smaller{width:3rem;height:3rem}.AudioPlayer .toggle-play.smaller i{font-size:1.625rem;margin-top:-.025rem}.AudioPlayer .toggle-play i{position:absolute;font-size:1.9375rem;margin-top:-.05rem}.AudioPlayer .toggle-play i.icon-play{margin-left:.1rem}.AudioPlayer .toggle-play .icon-pause,.AudioPlayer .toggle-play .icon-play{opacity:1;transform:scale(1);transition:opacity .4s,transform .6s cubic-bezier(.34,1.56,.64,1)}.AudioPlayer .toggle-play.loading .icon-pause,.AudioPlayer .toggle-play.loading .icon-play,.AudioPlayer .toggle-play.pause .icon-play,.AudioPlayer .toggle-play.play .icon-pause{opacity:0;transform:scale(.5)}.AudioPlayer-content{display:flex;justify-content:center;flex-direction:column;flex-shrink:1;padding:.25rem .5rem;position:relative;overflow:hidden;cursor:pointer;max-width:15rem;border-radius:var(--border-radius-messages-small)}.AudioPlayer-content:hover{background-color:rgba(var(--color-text-secondary-rgb),.08)}@media (min-width:1440px) and (max-width:1500px){.AudioPlayer-content{max-width:14rem}}.AudioPlayer .AudioPlayer-content .title{display:block;font-weight:500;font-size:.875rem!important;line-height:1rem;height:1rem;margin-bottom:.125rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.AudioPlayer-content .subtitle{font-size:.85rem!important;color:var(--color-text-secondary);line-height:1.125rem;height:1.125rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin:0}.MiddleHeader{display:flex;align-items:center;width:100%;box-shadow:0 2px 2px var(--color-light-shadow);background:var(--color-background);padding:.5rem .8125rem .5rem 1.5rem;position:relative;z-index:var(--z-middle-header)}@media (max-width:600px){.MiddleHeader{padding:.5rem;position:relative;transform:translateZ(10px);transform-style:preserve-3d}}.MiddleHeader .Transition{width:100%;min-width:0}.MiddleHeader .Transition>div{display:flex;align-items:center;width:100%}.MiddleHeader .back-button{margin-left:-.5rem;margin-right:.5rem;position:relative}@media (max-width:600px){.MiddleHeader .back-button{margin-left:0}}.MiddleHeader .back-button .unread-count{min-width:1.25rem;height:1.25rem;padding:0 .375rem;border-radius:.625rem;font-size:.75rem;line-height:1.25rem;font-weight:500;text-align:center;position:absolute;top:-.25rem;right:-.5rem;background:var(--color-gray);color:#fff;pointer-events:none}.MiddleHeader .back-button .unread-count.active{background:var(--color-primary)}.MiddleHeader .chat-info-wrapper{flex-grow:1;overflow:hidden}.MiddleHeader .header-tools{display:flex;align-items:center;justify-content:flex-end;margin-left:auto;flex-shrink:0}body.animation-level-0 .MiddleHeader .header-tools,body.animation-level-0 .MiddleHeader .header-tools .AudioPlayer,body.animation-level-0 .MiddleHeader .header-tools .HeaderActions,body.animation-level-0 .MiddleHeader .header-tools .HeaderPinnedMessage-wrapper{transition:none!important}@media (min-width:1276px) and (max-width:1439px){.MiddleHeader .header-tools .HeaderActions{transform:translateZ(0);transition:transform var(--layer-transition)}#Main.right-column-open .MiddleHeader .header-tools .HeaderActions{transform:translate3d(calc(var(--right-column-width)*-1),0,0)}}@media (min-width:1440px){.MiddleHeader .header-tools{transform:translateZ(0);transition:transform var(--layer-transition)}#Main.right-column-open .MiddleHeader .header-tools{transform:translate3d(calc(var(--right-column-width)*-1),0,0)}}.Transition>div:not(.active) .MiddleHeader .header-tools,body.animating-right-column .MiddleHeader .header-tools{pointer-events:none}@media (min-width:1276px) and (max-width:1439px){.MiddleHeader:not(.tools-stacked) .header-tools .AudioPlayer,.MiddleHeader:not(.tools-stacked) .header-tools .HeaderPinnedMessage-wrapper{opacity:1}#Main.right-column-open .MiddleHeader:not(.tools-stacked) .header-tools .AudioPlayer,#Main.right-column-open .MiddleHeader:not(.tools-stacked) .header-tools .HeaderPinnedMessage-wrapper{opacity:0}}.MiddleHeader.tools-stacked .header-tools .AudioPlayer,.MiddleHeader.tools-stacked .header-tools .HeaderPinnedMessage-wrapper{position:absolute;top:100%;left:0;right:0;height:2.875rem;overflow:hidden;box-shadow:0 2px 2px var(--color-light-shadow);display:flex;flex-direction:row-reverse;padding:.375rem .5rem .375rem .75rem;background:var(--color-background)}.MiddleHeader.tools-stacked .header-tools .AudioPlayer:before,.MiddleHeader.tools-stacked .header-tools .HeaderPinnedMessage-wrapper:before{content:"";display:block;position:absolute;top:-2px;left:0;right:0;height:2px;box-shadow:0 2px 2px var(--color-light-shadow)}.MiddleHeader.tools-stacked .header-tools .AudioPlayer .HeaderPinnedMessage,.MiddleHeader.tools-stacked .header-tools .HeaderPinnedMessage-wrapper .HeaderPinnedMessage{max-width:unset}.MiddleHeader.tools-stacked .header-tools .AudioPlayer{height:3.25rem;flex-direction:row;padding:.375rem .5rem}.MiddleHeader.tools-stacked .header-tools .AudioPlayer-content{padding:0 .5rem;flex-grow:1}.MiddleHeader.tools-stacked .header-tools .AudioPlayer>.Button{margin:0}.MiddleHeader.tools-stacked .header-tools .AudioPlayer>.player-close{margin-left:auto}.MiddleHeader.tools-stacked .header-tools .HeaderPinnedMessage{flex-grow:1;padding-top:0;padding-bottom:0}.MiddleHeader.tools-stacked .header-tools .HeaderPinnedMessage:before{top:.125rem;bottom:.125rem}.MiddleHeader.tools-stacked .header-tools .HeaderPinnedMessage .message-text{max-width:none}@media (min-width:1150px){#Main.right-column-open .MiddleHeader.tools-stacked .header-tools .AudioPlayer,#Main.right-column-open .MiddleHeader.tools-stacked .header-tools .HeaderPinnedMessage-wrapper{padding-right:calc(.5rem + var(--right-column-width))}}.MiddleHeader.tools-stacked.animated .header-tools .AudioPlayer,.MiddleHeader.tools-stacked.animated .header-tools .HeaderPinnedMessage-wrapper{animation:fade-in var(--layer-transition) forwards}body.animation-level-0 .MiddleHeader.tools-stacked.animated .header-tools .AudioPlayer,body.animation-level-0 .MiddleHeader.tools-stacked.animated .header-tools .HeaderPinnedMessage-wrapper{animation:none}.MiddleHeader h3{font-weight:500;font-size:1.125rem;line-height:1.375rem;white-space:pre;margin:0;overflow:hidden;text-overflow:ellipsis}@media (max-width:600px){.MiddleHeader h3{display:block;overflow:hidden;text-overflow:ellipsis}}@media (min-width:1275px){#Main.right-column-open .MiddleHeader h3{max-width:calc(100% - var(--right-column-width))}}.MiddleHeader .ChatInfo{cursor:pointer;display:flex;align-items:center}.MiddleHeader .ChatInfo .info{display:flex;flex-direction:column;justify-content:center;flex-grow:1;overflow:hidden}.MiddleHeader .ChatInfo .title{display:flex;align-items:center}.MiddleHeader .ChatInfo .title .VerifiedIcon{width:1.25rem;height:1.25rem;margin-left:.25rem;margin-top:.05rem}.MiddleHeader .Avatar{margin-right:.625rem;width:2.5rem;height:2.5rem;font-size:1.0625rem}.MiddleHeader .status,.MiddleHeader .typing-status{font-size:.875rem;line-height:1.125rem;margin:0;color:var(--color-text-secondary);overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.MiddleHeader .status.online,.MiddleHeader .typing-status.online{color:var(--color-primary)}.MiddleHeader .Button.smaller{width:2.5rem;height:2.5rem}.MiddleHeader .HeaderPinnedMessage-wrapper{display:flex;align-items:center;margin-left:auto;cursor:default;flex-direction:row-reverse}body.animation-level-1 .MiddleHeader .HeaderPinnedMessage-wrapper .ripple-container{display:none}.MiddleHeader .HeaderPinnedMessage-wrapper .HeaderPinnedMessage{min-width:16rem}.MiddleHeader .HeaderPinnedMessage-wrapper>.Button{flex-shrink:0}.MiddleHeader .HeaderPinnedMessage{display:flex;flex-shrink:1;margin-top:-.25rem;margin-bottom:-.25rem;padding:.25rem .25rem .25rem .375rem;border-radius:var(--border-radius-messages-small);position:relative;overflow:hidden;cursor:pointer}.MiddleHeader .HeaderPinnedMessage:hover{background-color:rgba(var(--color-text-secondary-rgb),.08)}.MiddleHeader .HeaderPinnedMessage .pinned-message-border{position:relative;height:2.25rem;margin:.125rem 0;width:.125rem;min-width:.125rem;overflow:hidden}.MiddleHeader .HeaderPinnedMessage .pinned-message-border .pinned-message-border-wrapper-1{height:2.25rem;width:.125rem;border-radius:.0625rem;background:var(--color-primary)}.MiddleHeader .HeaderPinnedMessage .pinned-message-border .pinned-message-border-wrapper{background-color:rgba(var(--color-primary-rgb),.5);position:relative;will-change:transform;transition:transform .25s ease-in-out}.MiddleHeader .HeaderPinnedMessage .pinned-message-border .pinned-message-border-mark{position:absolute;left:0;top:0;width:.125rem;background:var(--color-primary);border-radius:.0625rem;will-change:transform;transition:transform .25s ease-in-out}.MiddleHeader .HeaderPinnedMessage .message-text{overflow:hidden;margin-left:.4rem;margin-top:.125rem;max-width:15rem}@media (min-width:1440px) and (max-width:1500px){.MiddleHeader .HeaderPinnedMessage .message-text{max-width:14rem}}.MiddleHeader .HeaderPinnedMessage .message-text .title{font-weight:500;font-size:.875rem;line-height:1rem;height:1rem;color:var(--color-primary);margin-bottom:.125rem;white-space:pre}.MiddleHeader .HeaderPinnedMessage .message-text p{font-size:.875rem;line-height:1.125rem;height:1.125rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin:0}.MiddleHeader .HeaderPinnedMessage .emoji-small{width:1rem;height:1rem}.MiddleHeader .HeaderPinnedMessage>img{width:2.25rem;height:2.25rem;object-fit:cover;border-radius:.25rem;margin-left:.4rem;margin-top:.125rem;flex-shrink:0}.MiddleHeader .HeaderPinnedMessage>img+.message-text{max-width:12rem}.MiddleHeader .HeaderActions{flex-shrink:0;margin-left:auto;display:flex;align-items:center;justify-content:flex-end}.MiddleHeader .HeaderActions .toggle-right-pane-button.active{color:var(--color-primary);opacity:1}.MiddleHeader .HeaderActions .Button,.MiddleHeader .HeaderPinnedMessage-wrapper .Button{margin-left:.25rem}.MiddleHeader .HeaderActions .Button.tiny,.MiddleHeader .HeaderPinnedMessage-wrapper .Button.tiny{margin-right:.625rem}@media (max-width:600px){.MiddleHeader .AudioPlayer,.MiddleHeader .HeaderPinnedMessage-wrapper{position:absolute;top:100%;left:0;right:0;height:2.875rem;overflow:hidden;box-shadow:0 2px 2px var(--color-light-shadow);display:flex;flex-direction:row-reverse;padding:.375rem .5rem .375rem .75rem;background:var(--color-background)}.MiddleHeader .AudioPlayer:before,.MiddleHeader .HeaderPinnedMessage-wrapper:before{content:"";display:block;position:absolute;top:-2px;left:0;right:0;height:2px;box-shadow:0 2px 2px var(--color-light-shadow)}.MiddleHeader .AudioPlayer .HeaderPinnedMessage,.MiddleHeader .HeaderPinnedMessage-wrapper .HeaderPinnedMessage{max-width:unset}.MiddleHeader .AudioPlayer{height:3.25rem;flex-direction:row;padding:.375rem .5rem}.MiddleHeader .AudioPlayer-content{padding:0 .5rem;flex-grow:1}.MiddleHeader .AudioPlayer>.Button{margin:0}.MiddleHeader .AudioPlayer>.player-close{margin-left:auto}.MiddleHeader .HeaderPinnedMessage{flex-grow:1;padding-top:0;padding-bottom:0}.MiddleHeader .HeaderPinnedMessage:before{top:.125rem;bottom:.125rem}.MiddleHeader .HeaderPinnedMessage .message-text{max-width:none}.MiddleHeader .AudioPlayer,.MiddleHeader .HeaderPinnedMessage-wrapper{transform:translateZ(0)}}@media (min-width:925px) and (max-width:1149.9px){.MiddleHeader .AudioPlayer,.MiddleHeader .HeaderPinnedMessage-wrapper{position:absolute}}@keyframes fade-in{0%{opacity:0}to{opacity:1}}.EmbeddedMessage{display:flex;align-items:center;font-size:.875rem;line-height:1.125rem;margin:0 -.25rem .0625rem;padding:.1875rem .25rem .1875rem .4375rem;border-radius:var(--border-radius-messages-small);position:relative;overflow:hidden;cursor:pointer}body.animation-level-1 .EmbeddedMessage .ripple-container{display:none}.custom-shape .EmbeddedMessage{max-width:15rem;padding:.5rem;margin:0;background-color:var(--background-color);box-shadow:0 1px 2px var(--color-default-shadow)}.custom-shape .EmbeddedMessage:before{left:.625rem;top:.625rem;bottom:.625rem}.custom-shape .EmbeddedMessage img:not(.emoji){margin-left:.5rem}.EmbeddedMessage:before{content:"";display:block;position:absolute;top:.3125rem;bottom:.3125rem;left:.3125rem;width:2px;background:var(--accent-color);border-radius:2px}.EmbeddedMessage:hover{background-color:var(--hover-color)}.EmbeddedMessage:active{background-color:var(--active-color)}.EmbeddedMessage .message-text{overflow:hidden;margin-left:.5rem}.EmbeddedMessage .message-text .message-title{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-bottom:.125rem}.EmbeddedMessage .message-text p{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;height:1.125rem;margin-bottom:0}.EmbeddedMessage .message-text p:after{content:none;display:none}.EmbeddedMessage .message-text .emoji{width:1.125rem!important;height:1.125rem!important;vertical-align:-4px!important}.EmbeddedMessage .embedded-action-message{color:var(--accent-color);opacity:.75}.EmbeddedMessage img:not(.emoji){width:2rem;height:2rem;object-fit:cover;border-radius:.25rem;margin-left:.25rem;flex-shrink:0}.EmbeddedMessage.inside-input{padding-left:.5625rem;margin:0 0 -.125rem -.1875rem;display:grid;grid-template-columns:auto 1fr;grid-template-rows:1fr;width:100%;--accent-color:var(--color-primary);--hover-color:rgba(var(--color-text-secondary-rgb),0.08)}.EmbeddedMessage.inside-input:before{bottom:.3125rem}.EmbeddedMessage.inside-input img:not(.emoji){margin-left:.125rem}.EmbeddedMessage.inside-input .message-text{margin-left:.375rem}.EmbeddedMessage.inside-input .message-title{font-weight:500;color:var(--accent-color)}.MessageMeta{position:absolute;height:1.25rem;bottom:0;right:0;display:flex;align-items:center;background:hsla(0,0%,60%,.6);border-radius:.65rem;padding:0 .25rem;color:#fff;cursor:pointer;max-width:100%}.MessageMeta .message-signature,.MessageMeta .message-time,.MessageMeta .message-views{font-size:.75rem;white-space:nowrap}.MessageMeta .message-time{margin-right:.1875rem}.MessageMeta .message-views{margin-left:.1875rem}.MessageMeta .message-signature{overflow:hidden;text-overflow:ellipsis;margin-right:.375rem}.MessageMeta .icon-channelviews{margin-left:.125rem;margin-right:.375rem;font-size:1.125rem;position:relative;top:-.0625rem}.has-solid-background .MessageMeta{color:rgba(var(--color-text-meta-rgb),.75);background:none}.media:not(.text) .MessageMeta,.Message .custom-shape .MessageMeta{background:rgba(0,0,0,.2);--color-accent-own:#fff;--color-accent:#fff;color:#fff!important;opacity:1;bottom:.25rem;right:.25rem;left:auto;height:1.125rem;padding:0 .3125rem 0 .375rem}.media:not(.text) .MessageMeta .MessageOutgoingStatus i,.Message .custom-shape .MessageMeta .MessageOutgoingStatus i{background:transparent}.is-forwarded.media:not(.text) .MessageMeta{bottom:.9rem;right:.8rem}.emoji-only .MessageMeta{right:0}.Message.own .has-solid-background .MessageMeta{color:var(--color-message-meta-own)}.MessageMeta .MessageOutgoingStatus{margin-left:-.1875rem;font-size:1.1875rem}.Message.own .MessageMeta .MessageOutgoingStatus{color:var(--color-accent-own)}.message-content.has-replies:not(.custom-shape) .MessageMeta{bottom:3.375rem}.message-content.has-replies.text:not(.custom-shape) .MessageMeta{bottom:3.4375rem}.Message:not(.own) .custom-shape .reply-message+.MessageMeta{right:auto;left:13.2rem;bottom:.25rem}.Message:not(.own) .emoji-only-1 .reply-message+.MessageMeta{left:2.5rem}.Message:not(.own) .emoji-only-2 .reply-message+.MessageMeta{left:5.5rem}.Message:not(.own) .emoji-only-3 .reply-message+.MessageMeta{left:6.5rem}.Sticker:not(.inactive){cursor:pointer}.Sticker.inactive{pointer-events:none}.Contact{display:flex;align-items:center;padding:.25rem}.Contact.interactive{cursor:pointer}.Contact .Avatar{margin-right:.8rem}.Contact .contact-info{padding:.5rem .5rem .5rem 0;white-space:nowrap;overflow:hidden}.Contact .contact-info .contact-name{font-size:1rem;line-height:1rem;margin-bottom:.25rem;font-weight:500}.Contact .contact-info .contact-phone{line-height:1rem;color:var(--secondary-color)}.PollOption{display:flex;flex-flow:row nowrap;margin-bottom:.75rem}.PollOption:last-child{margin-bottom:0}.PollOption .poll-option-text{word-break:break-word}.PollOption .poll-option-share{position:relative;margin-top:.125rem;width:1.75rem;margin-right:.5rem;flex-shrink:0;font-weight:500;font-size:.875rem;text-align:right}.PollOption .poll-option-share.limit-width{display:inline-flex;justify-content:center;font-size:.75rem}.PollOption .poll-option-chosen{position:absolute;right:0;bottom:-5px;width:1rem;height:1rem;background:var(--accent-color);color:var(--background-color);border-radius:.5rem;font-size:.75rem;text-align:center}.PollOption .poll-option-chosen.wrong{background:var(--color-error)}.is-forwarded .PollOption .poll-option-chosen>i{margin-left:1px}.PollOption .poll-option-chosen.animate{opacity:0;animation-name:PollOptionIconAnimate;animation-delay:.09s;animation-duration:.3s;animation-fill-mode:forwards}.PollOption .poll-option-right{flex-grow:1}.PollOption .poll-option-answer{position:relative}.PollOption .poll-option-line{position:relative;width:0;height:.25rem;min-width:.5rem;border-radius:.125rem;margin-top:.5rem;background:var(--accent-color);transform-origin:0 0;transition:transform .3s;transition-delay:.09s}.PollOption .poll-line{width:30px;height:35px;position:absolute;left:-27px;bottom:-5px;transition:stroke-dashoffset .3s,stroke-dasharray .3s;stroke-dashoffset:0;stroke-dasharray:0,200%}.PollOption .poll-line path{stroke-width:4px;stroke-linecap:round;stroke:var(--accent-color);fill:none}.PollOption .wrong .poll-option-line{background:var(--color-error)}.PollOption .wrong .poll-line path{stroke:var(--color-error)}@keyframes PollOptionIconAnimate{0%{opacity:0}to{opacity:1}}.Poll{min-width:15rem}@media (max-width:600px){.Poll{min-width:50vw}}.Poll .poll-question{font-weight:500;line-height:1.25rem;margin:.125rem 0;word-break:break-word}.Poll .poll-type,.Poll .poll-voters-count{color:var(--secondary-color);font-size:.875rem}.Poll .poll-type{margin-bottom:.5rem;display:flex;align-items:center;min-height:1.375rem}.Poll .poll-voters-count{margin:.4375rem 0 .3125rem;text-align:center}.Poll .poll-answers{padding-top:.25rem;padding-bottom:1rem}.Poll .Checkbox,.Poll .Radio{padding-left:2.25rem}.Poll .Checkbox:last-child,.Poll .Radio:last-child{margin-bottom:.75rem}.Poll .Checkbox.disabled,.Poll .Radio.disabled{opacity:1!important;cursor:not-allowed}.Poll .Checkbox .Checkbox-main:before,.Poll .Checkbox .Radio-main:before,.Poll .Radio .Checkbox-main:before,.Poll .Radio .Radio-main:before{left:.125rem;background-color:var(--background-color)}.Message.own .Poll .Checkbox .Checkbox-main:before,.Message.own .Poll .Checkbox .Radio-main:before,.Message.own .Poll .Radio .Checkbox-main:before,.Message.own .Poll .Radio .Radio-main:before{border-color:var(--accent-color)}.Poll .Checkbox .Checkbox-main:after,.Poll .Checkbox .Radio-main:after,.Poll .Radio .Checkbox-main:after,.Poll .Radio .Radio-main:after{left:.4375rem;background-color:var(--accent-color)}.Poll .Checkbox input:checked~.Checkbox-main:before,.Poll .Checkbox input:checked~.Radio-main:before,.Poll .Radio input:checked~.Checkbox-main:before,.Poll .Radio input:checked~.Radio-main:before{border-color:var(--accent-color)}.Poll .Checkbox .Spinner,.Poll .Radio .Spinner{left:.125rem}.Poll .Checkbox .Checkbox-main:after{left:.125rem;background-color:var(--color-primary)}.Message.own .Poll .Checkbox .Checkbox-main:after{background-color:var(--accent-color)}.Poll .Spinner>div{background-image:var(--spinner-gray-data)}.Message.own .Poll .Spinner>div{background-image:var(--spinner-green-data)}.Poll .poll-recent-voters{display:inline-flex;align-items:center;vertical-align:text-bottom;margin-left:.875rem;margin-right:.5rem;margin-top:-2px}.Poll .poll-recent-voters .Avatar{border:1px solid var(--color-white);margin-right:0;box-sizing:initial}.Poll .poll-recent-voters .Avatar:not(:first-child){margin-left:-3px}.Poll .poll-countdown{margin-left:auto;font-size:.75rem;transition:color .2s}.Poll .poll-countdown.hurry-up{color:var(--color-error)}.Poll .poll-countdown.hurry-up .poll-countdown-progress{stroke:var(--color-error)}.Poll .poll-countdown svg{vertical-align:-3px}.Poll .poll-countdown-progress{stroke:var(--color-primary);fill:transparent;stroke-width:2;stroke-linecap:round;transition:stroke-dashoffset 2s,stroke .2s}.Poll .poll-quiz-help{margin:-.625rem 0 -.625rem auto}.Message:not(.own) .Poll .poll-quiz-help{color:var(--color-primary)}.Poll .poll-answers,.Poll .poll-results{padding-top:.25rem;padding-bottom:.5rem}.Poll .Button{text-transform:none;font-size:1rem}.Message.own .Poll .Button{color:var(--accent-color);--color-primary-shade-rgb:var(--color-text-green-rgb)}.Poll>.Button{margin-top:-.125rem;margin-bottom:-.0625rem}.WebPage{margin-top:.25rem;margin-bottom:.125rem;padding-left:.625rem;font-size:.875rem;line-height:1.125rem;max-width:29rem;position:relative}.WebPage:before{content:"";display:block;position:absolute;top:0;bottom:0;left:0;width:2px;background:var(--accent-color);border-radius:2px}.WebPage .media-inner{margin:0 0 .375rem!important}.WebPage .media-inner,.WebPage .media-inner.small-image img,.WebPage .media-inner img{border-radius:var(--border-radius-messages-small)!important}.WebPage .media-inner.square-image{width:5rem;height:5rem;min-height:0;margin-bottom:0!important}.WebPage .media-inner.square-image img{width:100%;height:100%}.WebPage.with-square-photo{display:flex;margin-bottom:1rem}.WebPage.with-square-photo .WebPage-text{order:1;padding-right:1rem}.WebPage.with-square-photo .media-inner{order:2;flex-shrink:0}.WebPage:not(.with-square-photo) .site-description:last-child:after,.WebPage:not(.with-square-photo) .site-name:last-child:after,.WebPage:not(.with-square-photo) .site-title:last-child:after{content:"";display:inline-block;width:var(--meta-safe-area-size);height:.5rem}.WebPage .site-description,.WebPage .site-name,.WebPage .site-title{word-break:break-word}.WebPage .site-name{color:var(--accent-color);font-weight:500}.WebPage .site-title{font-weight:500;margin-bottom:.125rem}.WebPage .site-description{line-height:1rem;margin-bottom:0}.Invoice .title{color:var(--accent-color);font-weight:500}.Invoice .description{position:relative}.Invoice .description.has-image .invoice-image{max-width:100%;height:20rem}@media (max-width:600px){.Invoice .description.has-image .invoice-image{height:10rem}}.Invoice .description.has-image .description-text{position:absolute;top:0;padding:.25rem .5rem;margin:.25rem;background-color:rgba(90,110,70,.6);border-radius:var(--border-radius-messages-small);color:var(--color-text);font-weight:500}.Album{position:relative;overflow:hidden}.message-content.media.text .Album{margin:-.3125rem -.5rem .3125rem}.forwarded-message .Album{margin-bottom:.125rem}.message-content.media.text .forwarded-message .Album{margin:0 0 .3125rem;--border-bottom-left-radius:inherit;--border-bottom-right-radius:inherit}.Album>.album-item-select-wrapper .media-inner,.message-content.media.text .Album>.album-item-select-wrapper .media-inner{margin:0!important}.Album>.album-item-select-wrapper .media-inner,.Album>.album-item-select-wrapper .media-inner img,.Album>.album-item-select-wrapper .media-inner video{border-radius:0!important;object-fit:cover}.RoundVideo{position:relative;width:200px;height:200px;cursor:pointer}.RoundVideo .thumbnail-wrapper{width:200px;height:200px;border-radius:50%;overflow:hidden}.RoundVideo .video-wrapper{position:absolute;left:0;top:0;border-radius:50%;overflow:hidden}.RoundVideo .progress{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none}.RoundVideo .progress-circle{stroke:#fff;fill:transparent;stroke-width:4;stroke-opacity:.35;stroke-linecap:round}.InlineButtons{display:flex;flex-direction:column}.InlineButtons .row{display:flex;flex-direction:row}.InlineButtons .Button{flex:1;width:auto;margin:.125rem;background:rgba(90,110,70,.6);border-radius:var(--border-radius-messages-small);font-weight:500;text-transform:none}.InlineButtons .Button:hover{background:rgba(90,110,70,.4)!important}.InlineButtons .Button:first-of-type{margin-left:0}.InlineButtons .Button:last-of-type{margin-right:0}.InlineButtons .row:first-of-type .Button{margin-top:.25rem!important}.InlineButtons .row:last-of-type .Button{margin-bottom:0}.InlineButtons .row:last-of-type .Button:first-of-type{border-bottom-left-radius:var(--border-radius-messages)}.InlineButtons .row:last-of-type .Button:last-of-type{border-bottom-right-radius:var(--border-radius-messages)}.CommentButton{--background-color:var(--color-background);--hover-color:var(--color-chat-hover);display:flex;width:100%;align-items:center;padding:.5625rem .25rem .5625rem .625rem;background:var(--background-color);border-bottom-right-radius:var(--border-bottom-right-radius);border-bottom-left-radius:var(--border-bottom-left-radius);font-size:.9375rem;font-weight:500;line-height:2rem;color:var(--accent-color);white-space:nowrap;cursor:pointer;transition:background-color .15s,color .15s}body.animation-level-0 .CommentButton{transition:none!important}.Message .has-appendix .CommentButton:before{content:"";display:block;position:absolute;bottom:-.1875rem;left:-.5625rem;width:.5625rem;height:1.25rem;background-position:0 100%;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='9' height='20' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cdefs%3E%3Cfilter x='-50%25' y='-14.7%25' width='200%25' height='141.2%25' filterUnits='objectBoundingBox' id='a'%3E%3CfeOffset dy='1' in='SourceAlpha' result='shadowOffsetOuter1'/%3E%3CfeGaussianBlur stdDeviation='1' in='shadowOffsetOuter1' result='shadowBlurOuter1'/%3E%3CfeColorMatrix values='0 0 0 0 0.0621962482 0 0 0 0 0.138574144 0 0 0 0 0.185037364 0 0 0 0.15 0' in='shadowBlurOuter1'/%3E%3C/filter%3E%3Cpath d='M3 17h6V0c-.193 2.84-.876 5.767-2.05 8.782-.904 2.325-2.446 4.485-4.625 6.48A1 1 0 003 17z' id='b'/%3E%3C/defs%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cuse fill='%23000' filter='url(%23a)' xlink:href='%23b'/%3E%3Cuse fill='%23FFF' xlink:href='%23b'/%3E%3C/g%3E%3C/svg%3E");opacity:0;transition:opacity .15s,filter .15s}.theme-dark #root .Message .has-appendix .CommentButton:before{filter:invert(.83)}body.animation-level-0 .Message .has-appendix .CommentButton:before{transition:none!important}.custom-shape .CommentButton{position:absolute;right:-3rem;width:2.25rem;bottom:3rem;height:3.375rem;border-radius:1.375rem;padding:.375rem .3125rem .25rem;align-items:flex-start;color:#fff;background-color:rgba(0,0,0,.2);opacity:0;transition:opacity .2s ease}@media (pointer:coarse){.custom-shape .CommentButton{opacity:1!important}}.custom-shape .CommentButton:hover{background-color:rgba(0,0,0,.28)}.Message:hover .custom-shape .CommentButton{opacity:1}.custom-shape .CommentButton:after{content:attr(data-cnt);position:absolute;bottom:-.0625rem;left:0;width:100%;text-align:center;font-size:12px;display:block}.custom-shape .CommentButton[data-cnt="0"]{height:2.25rem}.custom-shape .CommentButton[data-cnt="0"]:after{display:none}.custom-shape .CommentButton .icon-comments-sticker{display:block;font-size:1.5rem;margin:0 auto}.custom-shape .CommentButton .icon-comments,.custom-shape .CommentButton .icon-next,.custom-shape .CommentButton .label,.custom-shape .CommentButton .recent-repliers{display:none}.CommentButton:hover{background:var(--hover-color)}.Message .has-appendix .CommentButton:hover:before{opacity:1}.CommentButton:hover .Avatar{border-color:var(--hover-color)!important}.audio .CommentButton,.is-forwarded .CommentButton,.poll .CommentButton,.text .CommentButton,.voice .CommentButton{border-top:1px solid var(--color-borders)}.message-content.has-solid-background .CommentButton{margin:.375rem -.5rem -.375rem}.message-content.voice .CommentButton{margin-bottom:-.5rem}.message-content.audio .CommentButton{margin-bottom:-.8125rem}.message-content.audio .CommentButton,.message-content.has-solid-background.is-forwarded .CommentButton,.message-content.has-solid-background.text .CommentButton,.message-content.poll .CommentButton,.message-content.voice .CommentButton{margin-right:0;width:calc(100% + 1rem)}.CommentButton .icon-comments-sticker{display:none}.CommentButton .icon-comments{font-size:1.5625rem;line-height:2rem;margin-right:.875rem}.CommentButton .icon-next{margin-left:auto;font-size:1.5rem}.CommentButton .recent-repliers{display:inline-flex;align-items:center;margin-right:.5rem;margin-left:-.125rem}.CommentButton .recent-repliers .Avatar{transition:border .15s;border:2px solid var(--color-background);margin-right:0;z-index:3}.CommentButton .recent-repliers .Avatar+.Avatar{z-index:2}.CommentButton .recent-repliers .Avatar+.Avatar+.Avatar{z-index:1}.CommentButton .recent-repliers .Avatar:not(:first-child){margin-left:-.75rem}.CommentButton.has-unread .label{position:relative}.CommentButton.has-unread .label:after{content:"";display:inline-block;width:.5rem;height:.5rem;border-radius:50%;background:var(--accent-color);margin-left:.75rem}.CommentButton.disabled{cursor:default;pointer-events:none}.Message{display:flex;align-items:flex-end;margin-bottom:.375rem;position:relative;--background-color:var(--color-background);--hover-color:rgba(var(--color-text-secondary-rgb),0.08);--active-color:rgba(var(--color-text-secondary-rgb),0.16);--max-width:29rem;--accent-color:var(--color-primary);--accent-shade-color:var(--color-primary-shade);--secondary-color:var(--color-text-secondary);--meta-safe-area-base:2.25rem;--meta-safe-author-width:0px;--meta-safe-area-size:calc(var(--meta-safe-area-base) + var(--meta-safe-author-width));--deleting-translate-x:-50%;--select-message-scale:0.9;--select-background-color:#fff}.Message>.Avatar,.Message>.message-content-wrapper{opacity:1;transform:scale(1) translateX(0);transition:transform var(--select-transition)}body.animation-level-0 .Message>.Avatar,body.animation-level-0 .Message>.message-content-wrapper{transition:none!important}.Message>.Avatar{position:absolute;bottom:0;left:0}@media (max-width:600px){.Message>.Avatar{width:2.5rem;height:2.5rem}}.Message.last-in-group{margin-bottom:.625rem}.Message.last-in-list{margin-bottom:.375rem}.Message.is-in-selection-mode .Album{border:1px solid var(--select-background-color);background-color:var(--select-background-color)}.Message.has-inline-buttons .message-content{border-bottom-right-radius:var(--border-radius-messages-small)}.Message:not(.own){padding-left:2.5rem}.Message:not(.own).is-thread-top,.no-avatars .Message:not(.own){padding-left:0}@media (max-width:600px){.Message:not(.own){padding-left:2.875rem}.Message:not(.own).is-thread-top,.no-avatars .Message:not(.own){padding-left:.25rem}}.Message.own{flex-direction:row-reverse;--background-color:var(--color-background-own);--hover-color:var(--color-reply-own-hover);--active-color:var(--color-reply-own-active);--max-width:30rem;--accent-color:var(--color-accent-own);--accent-shade-color:var(--color-green);--secondary-color:var(--color-accent-own);--color-code:var(--color-code-own);--color-code-bg:var(--color-code-own-bg);--color-links:var(--color-own-links);--color-links-hover:var(--color-own-links);--meta-safe-area-base:3.5rem;--deleting-translate-x:50%;--color-text-green:var(--color-accent-own)}@media (max-width:600px){.Message.own{padding-right:.25rem}}.Message.is-deleting>.Avatar,.Message.is-deleting>.message-content-wrapper{transition:opacity .2s ease,transform .2s ease-in;opacity:0;transform:scale(.3) translateX(var(--deleting-translate-x));transform-origin:bottom}.Message.has-views{--meta-safe-area-size:calc(var(--meta-safe-area-base) + var(--meta-safe-author-width) + 4rem)}.Message.was-edited{--meta-safe-area-size:calc(var(--meta-safe-area-base) + var(--meta-safe-author-width) + 2.5rem)}.Message.was-edited.has-views{--meta-safe-area-size:calc(var(--meta-safe-area-base) + var(--meta-safe-author-width) + 7.5rem)}.select-mode-active .Message{cursor:pointer;-webkit-user-select:none;user-select:none}.select-mode-active .Message:not(.own)>.Avatar,.select-mode-active .Message:not(.own)>.message-content-wrapper{transform:translateX(2.5rem)}.select-mode-active .Message:not(.is-album):after{content:"";position:absolute;top:-.25rem;bottom:-.25rem;left:-4rem;right:-4rem;z-index:var(--z-message-select-area)}.select-mode-active .Message.is-album .message-select-control,.select-mode-active .Message.is-in-document-group .message-select-control{pointer-events:unset}.select-mode-active .Message .message-select-control{opacity:1}.Message.is-selected .message-select-control{background:var(--color-green)}.Message.is-selected .message-select-control.group-select{background:transparent}.Message .File.file-is-selected .message-select-control,.Message.is-selected .message-select-control.group-select.is-selected{background:var(--color-green)}.Message .Audio .message-select-control{left:1.063rem;bottom:.813rem}html.theme-dark .Message.own .Audio .ProgressSpinner{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUiIGhlaWdodD0iMTUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTguMjE4IDcuNWw1LjYzMy01LjYzM2EuNTA4LjUwOCAwIDEwLS43MTgtLjcxOEw3LjUgNi43ODIgMS44NjcgMS4xNDlhLjUwOC41MDggMCAxMC0uNzE4LjcxOEw2Ljc4MiA3LjVsLTUuNjMzIDUuNjMzYS41MDguNTA4IDAgMTAuNzE4LjcxOEw3LjUgOC4yMThsNS42MzMgNS42MzNhLjUwNi41MDYgMCAwMC43MTggMCAuNTA4LjUwOCAwIDAwMC0uNzE4TDguMjE4IDcuNXoiIGZpbGw9IiNGRkYiIHN0cm9rZT0iI0E0NUQzNyIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPjwvc3ZnPg==)}html.theme-dark .Message.own .Audio .ProgressSpinner circle{stroke:var(--background-color)}.Message .File{position:relative}.Message .File .message-select-control{position:absolute;top:2rem;left:2rem;z-index:2}.Message.own .Message .album-item-select-wrapper{background:var(--color-background-own)}.Message .album-item-select-wrapper .message-select-control{top:.438rem;right:.438rem;left:unset}.Message .album-item-select-wrapper .media-inner{border:0 solid var(--select-background-color);transition:border-width var(--select-transition)}.Message .album-item-select-wrapper img,.Message .album-item-select-wrapper video{transition:transform var(--select-transition)}.Message .album-item-select-wrapper.is-selected .message-select-control{background:var(--color-green)}.Message .album-item-select-wrapper.is-selected img,.Message .album-item-select-wrapper.is-selected video{transform:scale(var(--select-message-scale))}.Message.is-forwarding .message-select-control,.Message.is-selected .message-select-control{background:var(--color-green)}.Message.is-forwarding .Menu .bubble,.Message.is-selected .Menu .bubble{transition:none!important}.Message.is-in-document-group:not(.first-in-document-group):before{top:0!important}.Message.is-in-document-group:not(.first-in-document-group) .message-content{box-shadow:none;border-top-left-radius:0!important;border-top-right-radius:0!important}.Message.is-in-document-group:not(.first-in-document-group) .forwarded-message:before{top:-1.5rem}.Message.is-in-document-group:not(.last-in-document-group){margin-bottom:0}.Message.is-in-document-group:not(.last-in-document-group):before{bottom:0!important}.Message.is-in-document-group:not(.last-in-document-group) .message-content{border-bottom-left-radius:0!important;border-bottom-right-radius:0!important}.Message.is-in-document-group.is-in-selection-mode .Audio:not(.audio-is-selected) .message-select-control:not(.group-select),.Message.is-in-document-group.is-in-selection-mode .File:not(.file-is-selected) .message-select-control:not(.group-select){background:#fff}.Message.is-in-document-group.is-in-selection-mode .Audio:not(.audio-is-selected) .message-select-control:not(.group-select):after,.Message.is-in-document-group.is-in-selection-mode .File:not(.file-is-selected) .message-select-control:not(.group-select):after{content:"";width:1.25rem;height:1.25rem;border-radius:.688rem;background:#fff;border:.125rem solid rgba(0,0,0,.2);position:absolute}.Message.is-in-document-group.is-in-selection-mode.own .message-content .Audio:not(.audio-is-selected) .message-select-control:not(.group-select),.Message.is-in-document-group.is-in-selection-mode.own .message-content .File:not(.file-is-selected) .message-select-control:not(.group-select){background:var(--background-color);border-color:var(--background-color)}.Message.is-in-document-group.is-in-selection-mode.own .message-content .Audio:not(.audio-is-selected) .message-select-control:not(.group-select):after,.Message.is-in-document-group.is-in-selection-mode.own .message-content .File:not(.file-is-selected) .message-select-control:not(.group-select):after{background:var(--background-color);border-color:rgba(var(--color-text-green-rgb),.5)}.Message.is-in-document-group.focused .message-content,.Message.is-in-document-group.has-menu-open .message-content,.Message.is-in-document-group.is-forwarding .message-content,.Message.is-in-document-group.is-selected .message-content{background:var(--color-background-selected)}.Message.is-in-document-group.focused.own .message-content,.Message.is-in-document-group.has-menu-open.own .message-content,.Message.is-in-document-group.is-forwarding.own .message-content,.Message.is-in-document-group.is-selected.own .message-content{--background-color:var(--color-background-own-selected);background:var(--color-background-own-selected)}.Message.is-in-document-group .message-content-wrapper{width:17.1875rem}.Message.is-in-document-group .message-content{transition:background-color var(--select-transition)}.Message .album-item-select-wrapper{position:absolute}.Message .album-item-select-wrapper .message-select-control{position:absolute;z-index:2}.Message .message-select-control{position:absolute;left:0;bottom:.25rem;width:1.5rem;height:1.5rem;border:2px solid #fff;border-radius:50%;z-index:var(--z-message-select-control);display:flex;align-items:center;justify-content:center;color:#fff;font-size:1rem;opacity:0;pointer-events:none;transition:opacity var(--select-transition)}.Message .message-select-control .icon-select{position:absolute;left:-3px;top:-3px;font-size:1.625rem}.Message .Avatar{margin-right:.3rem}.Message.is-in-document-group .message-content.document{padding:.25rem .5rem!important}.Message.is-in-document-group.last-in-document-group .message-content.document{padding-bottom:.5rem!important}.Message.is-in-document-group.first-in-document-group .message-content.document{padding-top:.5rem!important}.Album,.media-inner,.message-content,.message-content.custom-shape .media-inner img,.message-content.media .media-inner img,.message-content.media .media-inner video{border-top-left-radius:var(--border-top-left-radius);border-top-right-radius:var(--border-top-right-radius);border-bottom-left-radius:var(--border-bottom-left-radius);border-bottom-right-radius:var(--border-bottom-right-radius)}.media-inner{overflow:hidden}.media-inner.small-image img{border-radius:0!important}.Message{--border-top-left-radius:var(--border-radius-messages);--border-top-right-radius:var(--border-radius-messages);--border-bottom-left-radius:var(--border-radius-messages);--border-bottom-right-radius:var(--border-radius-messages)}.Message:not(.own).first-in-group:not(.last-in-group),.Message:not(.own):not(.first-in-group):not(.last-in-group){--border-bottom-left-radius:var(--border-radius-messages-small)}.Message:not(.own).last-in-group:not(.first-in-group),.Message:not(.own):not(.first-in-group):not(.last-in-group){--border-top-left-radius:var(--border-radius-messages-small)}.Message:not(.own).last-in-group{--border-bottom-left-radius:var(--border-radius-messages-small)}.Message:not(.own).last-in-group .message-content.has-appendix{--border-bottom-left-radius:0}.Message.own.first-in-group:not(.last-in-group),.Message.own:not(.first-in-group):not(.last-in-group){--border-bottom-right-radius:var(--border-radius-messages-small)}.Message.own.last-in-group:not(.first-in-group),.Message.own:not(.first-in-group):not(.last-in-group){--border-top-right-radius:var(--border-radius-messages-small)}.Message.own.last-in-group{--border-bottom-right-radius:var(--border-radius-messages-small)}.Message.own.last-in-group .message-content.has-appendix{--border-bottom-right-radius:0}.Message .message-content.has-replies:not(.custom-shape) .Album,.Message .message-content.has-replies:not(.custom-shape) .media-inner,.Message .message-content.text .Album,.Message .message-content.text .media-inner{--border-bottom-left-radius:0;--border-bottom-right-radius:0}.Message .message-content.is-reply .EmbeddedMessage+.Album,.Message .message-content.is-reply .EmbeddedMessage+.Audio,.Message .message-content.is-reply .EmbeddedMessage+.File{margin-top:.375rem}.Message .message-content:not(.custom-shape).force-sender-name .Album,.Message .message-content:not(.custom-shape).is-reply .Album,.Message .message-content:not(.custom-shape).is-reply .media-inner,.Message .message-content:not(.is-forwarded) .message-title~.media-inner{--border-top-left-radius:0;--border-top-right-radius:0}.Message .message-content.is-forwarded .content-inner .message-title{margin-bottom:.25rem}.Message .message-action-button{position:absolute;bottom:0;color:#fff;background-color:rgba(0,0,0,.2);opacity:0;transition:opacity .2s ease}@media (pointer:coarse){.Message .message-action-button{opacity:1!important}}.Message .message-action-button:active,.Message .message-action-button:focus,.Message .message-action-button:hover{background-color:rgba(0,0,0,.28)!important}.Message:hover .message-action-button,.Message[data-is-document-group-hover] .message-action-button{opacity:1}.Message.own .message-action-button{left:-3rem}.Message:not(.own) .message-action-button{right:-3rem}.Message .bottom-marker{height:1px;width:1px;visibility:hidden}.Message .custom-shape .message-action-button{bottom:.25rem}.message-content{position:relative;max-width:var(--max-width)}@media (max-width:600px){.message-content{max-width:69vw}}.message-content .text-content{margin:0;word-break:break-word;line-height:1.3125}.message-content:not(.custom-shape){font-size:var(--message-text-size,1rem)}.message-content .matching-text-highlight{background:#cae3f7;border-radius:.25rem;padding:0 .125rem}.message-content .message-title{white-space:nowrap;font-size:.875rem;font-weight:500;line-height:1.25rem;color:var(--accent-color);display:flex}.message-content .message-title,.message-content .message-title>.interactive{overflow:hidden;text-overflow:ellipsis}.message-content .message-title.interactive,.message-content .message-title>.interactive{cursor:pointer}.message-content .message-title.interactive:hover,.message-content .message-title>.interactive:hover{opacity:.85}.message-content .message-title>.color-1{color:var(--color-user-1)}.message-content .message-title>.color-2{color:var(--color-user-2)}.message-content .message-title>.color-4{color:var(--color-user-4)}.message-content .message-title>.color-5{color:var(--color-user-5)}.message-content .message-title>.color-6{color:var(--color-user-6)}.message-content .message-title>.color-7{color:var(--color-user-7)}.message-content .message-title>.color-8{color:var(--color-user-8)}.message-content .message-title+.File{margin-top:.25rem}.message-content .message-title .via{padding:0 .2rem;font-weight:400}.message-content .message-title .admin-title{flex:1;margin-left:1rem;text-align:right;font-weight:400;font-size:.75rem;margin-top:-.1rem;color:rgba(var(--color-text-meta-rgb),.75)}.Message.own .message-content .message-title .admin-title{color:var(--accent-color)}.message-content.has-shadow{box-shadow:0 1px 2px var(--color-default-shadow)}.is-album .message-content,.message-content.has-solid-background{background:var(--background-color)}.message-content.has-solid-background{padding:.3125rem .5rem .375rem}.message-content.has-solid-background .text-content:last-child:after{content:"";display:inline-block;width:var(--meta-safe-area-size);height:1rem}.message-content:not(.has-appendix) .svg-appendix{display:none}.message-content .svg-appendix{position:absolute;bottom:-.1875rem;width:.5625rem;height:1.25rem}.message-content .svg-appendix .corner{fill:var(--background-color)}.Message.own .message-content .svg-appendix{right:-.5625rem}.Message:not(.own) .message-content .svg-appendix{left:-.5625rem}.message-content[data-has-custom-appendix] .svg-appendix .corner{fill:var(--appendix-bg)}.Message .message-content.has-appendix-thumb .svg-appendix{--background-color:#ccc;opacity:1;transition:opacity .5s ease}.message-content.document{padding:.5rem!important}.message-content.document .File+.text-content{margin-top:.313rem}.message-content.audio .Embedded,.message-content.audio .message-title,.message-content.voice .Embedded,.message-content.voice .message-title{margin-top:-.1875rem;margin-bottom:.1875rem}.message-content.voice{padding:.5rem!important}.message-content.voice .Voice+.text-content{margin-top:.5rem}.message-content.audio{min-width:17.1875rem;padding:.5rem .5rem .8125rem!important}.message-content.audio .Audio+.text-content{margin-top:.25rem;margin-bottom:-.4375rem}.message-content:not(.custom-shape) .emoji{display:inline-block;width:1.25rem;background-size:1.25rem;color:transparent;margin-right:1px;vertical-align:text-bottom}.message-content:not(.custom-shape) .emoji::selection{background-color:var(--color-selection-highlight-emoji);color:transparent}.message-content:not(.custom-shape) .text-content .emoji{width:calc(1.25*var(--message-text-size, 1rem));background-size:calc(1.25*var(--message-text-size, 1rem))}.message-content.media .media-inner{display:flex;justify-content:center;align-items:center}.message-content.media .media-inner.interactive{cursor:pointer}.message-content.media .media-inner.interactive.dark video{background-color:#232323}.message-content.media.round.is-reply{width:auto!important}.message-content.media.force-sender-name .Album,.message-content.media.force-sender-name .media-inner,.message-content.media.is-reply .Album,.message-content.media.is-reply .media-inner,.message-content.media.is-via-bot .media-inner,.message-content.media.text .media-inner{margin-left:-.5rem;margin-right:-.5rem}.message-content.media.text .media-inner{margin-top:-.3125rem}.message-content.media.force-sender-name .Album,.message-content.media.is-reply .Album,.message-content.media.is-reply .media-inner,.message-content.media .message-title~.media-inner{margin-top:.375rem;margin-bottom:-.375rem}.message-content.media.text .Album,.message-content.media.text .media-inner{margin-bottom:.375rem}.message-content.media .media-loading{display:flex;align-items:center;justify-content:center}.message-content.media .media-loading:not(.open){opacity:.5;transform:scale(0);transition:opacity .3s ease,transform .3s ease}.message-content.media .icon-download,.message-content.media .icon-large-play{position:absolute;display:flex;align-items:center;justify-content:center;color:#fff;opacity:.7;transition:opacity .15s}.message-content.media .icon-download:hover,.message-content.media .icon-large-play:hover{opacity:1}.message-content.media .icon-download:before,.message-content.media .icon-large-play:before{display:flex;align-items:center;justify-content:center;width:3.375rem;height:3.375rem;border-radius:50%;background:rgba(0,0,0,.25)}.message-content.media .icon-download{font-size:1.5rem}.message-content.media .icon-large-play{font-size:2.5rem}.message-content.media .message-media-duration,.message-content.media .message-upload-progress{background:rgba(0,0,0,.25);color:#fff;font-size:.75rem;position:absolute;left:.1875rem;top:.1875rem;z-index:1;padding:0 .375rem;border-radius:.75rem;line-height:1.125rem}.message-content.media .message-media-duration .icon-muted-chat{vertical-align:-.1875rem;margin-left:.375rem;font-size:1.0625rem}.message-content.custom-shape{line-height:1.2;font-size:10rem}.message-content.custom-shape.is-reply{max-width:100%}.message-content.custom-shape .reply-message{display:flex;align-items:flex-start;flex-direction:row-reverse}.message-content.custom-shape .reply-message>p{margin-bottom:0}.message-content.custom-shape .reply-message .EmbeddedMessage{margin-left:.5rem;border-radius:var(--border-radius-messages)}@media (max-width:600px){.message-content.custom-shape .reply-message .EmbeddedMessage{max-width:calc(90vw - 13rem)}}.message-content.custom-shape .text-content{margin-bottom:1rem}.message-content.custom-shape .media-inner{line-height:1;font-size:1rem;flex-shrink:0}.message-content.custom-shape .media-inner .full-media{top:0;left:0;bottom:0;right:0}.message-content.custom-shape .emoji{display:inline-block;color:transparent}.message-content.custom-shape .emoji::selection{background-color:var(--color-selection-highlight-emoji);color:transparent}.message-content.custom-shape.emoji-only .text-content{margin-bottom:0}.message-content.custom-shape.emoji-only-1{min-width:8rem;font-size:4.5rem}.message-content.custom-shape.emoji-only-1 .content-inner{height:7rem}.message-content.custom-shape.emoji-only-1 .text-content{line-height:1.5;text-align:center}.Message.was-edited .message-content.custom-shape.emoji-only-1{min-width:10rem}.message-content.custom-shape.emoji-only-1 .emoji{width:5rem;height:5rem}.message-content.custom-shape.emoji-only-2{font-size:4rem;margin-top:.5rem;min-width:10rem}.message-content.custom-shape.emoji-only-2.has-comments{margin-top:1.25rem}.Message.was-edited .message-content.custom-shape.emoji-only-2{min-width:12rem}.message-content.custom-shape.emoji-only-2 .emoji{width:4rem;height:4rem}.message-content.custom-shape.emoji-only-3{font-size:3rem;margin-top:1.75rem;min-width:12rem}.message-content.custom-shape.emoji-only-3.has-comments{margin-top:2.5rem}.Message.was-edited .message-content.custom-shape.emoji-only-3{min-width:14rem}.message-content.custom-shape.emoji-only-3 .emoji{width:3rem;height:3rem}.Message:not(.own) .message-content.custom-shape{--hover-color:var(--color-reply-hover);--active-color:var(--color-reply-active)}.Message.own .message-content.custom-shape{--hover-color:var(--color-reply-own-hover);--active-color:var(--color-reply-own-active)}.Message.own .message-content.custom-shape .reply-message{flex-direction:row}.Message.own .message-content.custom-shape .reply-message .EmbeddedMessage{margin-right:.5rem}.forwarded-message{--border-top-left-radius:var(--border-radius-messages-small);--border-top-right-radius:var(--border-radius-messages-small);--border-bottom-left-radius:var(--border-radius-messages-small);--border-bottom-right-radius:var(--border-radius-messages-small)}.message-content:not(.custom-shape) .forwarded-message{position:relative;margin-top:.25rem;padding-left:.625rem}.message-content:not(.custom-shape) .forwarded-message:before{content:"";display:block;position:absolute;top:0;bottom:0;left:.05rem;width:2px;background:var(--accent-color);border-radius:2px}.forwarded-message>.media-inner{margin:0 0 .25rem!important}.long-word-break-all{word-break:break-all}.text-entity-link{color:var(--color-links)!important;text-decoration:none;word-break:none;cursor:pointer}.text-entity-link:active,.text-entity-link:hover,.text-entity-link:visited{color:var(--color-links-hover)!important;text-decoration:underline}.text-entity-code,.text-entity-pre{color:var(--color-code);background:var(--color-code-bg);white-space:pre-wrap;margin:0;padding:1px 2px;border-radius:4px}.MessageList{flex:1;width:100%;overflow-anchor:none;overflow:scroll;overflow-x:hidden;overflow-y:overlay;padding-bottom:.3125rem}.mask-image-enabled .MessageList,body.hide-mask-shadow .mask-image-disabled .MessageList{-webkit-mask-image:linear-gradient(0deg,transparent 0,#000 1rem);mask-image:linear-gradient(0deg,transparent 0,#000 1rem)}.custom-bg-color.mask-image-disabled .MessageList,.custom-bg-image.mask-image-disabled .MessageList{margin-bottom:.3125rem;padding-bottom:0}@media (pointer:coarse){.MessageList{-webkit-user-select:none;-webkit-touch-callout:none;user-select:none;touch-callout:none}}.MessageList.no-avatars .Message>.Avatar{display:none}.MessageList .messages-container{width:100%;max-width:var(--messages-container-width);min-height:100%;margin:0 auto;display:flex;justify-content:flex-end;flex-direction:column;padding:1rem 1rem .5rem 1.125rem}.force-messages-scroll .MessageList .messages-container{margin-top:100vh!important}@media (max-width:600px){.MessageList .messages-container{width:100vw;padding:2.75rem .5rem .5rem;margin:0}}.MessageList.bottom-padding .messages-container{padding-bottom:1rem}.MessageList.bottom-padding-big .messages-container{padding-bottom:4.75rem}@media (max-width:600px){.MessageList.bottom-padding-big .messages-container{padding-bottom:3.5rem}}.MessageList.select-mode-active .messages-container{padding-bottom:5.25rem}.MessageList .ActionMessage,.MessageList .Message{position:relative}.MessageList .ActionMessage:before,.MessageList .Message:before{content:"";position:absolute;top:-.3125rem;bottom:-.3125rem;left:-50vw;right:-50vw;background:#000;z-index:-1;opacity:0;transition:opacity var(--select-transition)}body.animation-level-0 .MessageList .ActionMessage:before,body.animation-level-0 .MessageList .Message:before{transition:none!important}.MessageList .ActionMessage:not(.last-in-group):before,.MessageList .Message:not(.last-in-group):before{bottom:-.1875rem}.MessageList .ActionMessage:not(.first-in-group):before,.MessageList .Message:not(.first-in-group):before{top:-.1875rem}.MessageList .ActionMessage.focused:before,.MessageList .Message.focused:before{transition:none!important}.MessageList .ActionMessage.focused:before,.MessageList .ActionMessage.has-menu-open:before,.MessageList .ActionMessage.is-forwarding:before,.MessageList .ActionMessage.is-selected:before,.MessageList .Message.focused:before,.MessageList .Message.has-menu-open:before,.MessageList .Message.is-forwarding:before,.MessageList .Message.is-selected:before{opacity:.1}.MessageList>.empty{width:100%;height:100%;display:flex;align-items:center;justify-content:center}.MessageList .ActionMessage,.MessageList .empty,.MessageList .local-action-message,.MessageList .sticky-date{text-align:center}.MessageList .ActionMessage>span,.MessageList .empty>span,.MessageList .local-action-message>span,.MessageList .sticky-date>span{display:inline-block;background:rgba(var(--color-text-secondary-rgb),.45);color:#fff;font-size:.9375rem;font-weight:500;line-height:1.5rem;padding:0 .5rem;border-radius:.75rem;word-break:break-word}.MessageList .ActionMessage.rich>span,.MessageList .empty.rich>span,.MessageList .local-action-message.rich>span,.MessageList .sticky-date.rich>span{max-width:80%;text-align:left}.MessageList .ActionMessage.rich a,.MessageList .ActionMessage.rich a:visited,.MessageList .empty.rich a,.MessageList .empty.rich a:visited,.MessageList .local-action-message.rich a,.MessageList .local-action-message.rich a:visited,.MessageList .sticky-date.rich a,.MessageList .sticky-date.rich a:visited{color:var(--color-links-darker)!important}.MessageList .ActionMessage.rich a:active,.MessageList .ActionMessage.rich a:hover,.MessageList .empty.rich a:active,.MessageList .empty.rich a:hover,.MessageList .local-action-message.rich a:active,.MessageList .local-action-message.rich a:hover,.MessageList .sticky-date.rich a:active,.MessageList .sticky-date.rich a:hover{color:var(--color-links-darker-hover)!important}.MessageList .sticky-date{margin-top:1rem;margin-bottom:1rem;z-index:var(--z-sticky-date);pointer-events:none;opacity:1;transition:opacity .3s ease}body:not(.is-scrolling-messages) .MessageList .sticky-date.stuck{opacity:0}body.animation-level-0 .MessageList .sticky-date{transition:none}.MessageList.scrolled .sticky-date{position:sticky;top:.625rem}.has-header-tools .MessageList .sticky-date{top:3.75rem}.MessageList .ActionMessage,.MessageList .local-action-message{margin-top:.5rem;margin-bottom:.5rem}.MessageList .ActionMessage .action-link{cursor:pointer}.MessageList .ActionMessage .action-link:hover{text-decoration:underline}.MessageList .sticky-date+.ActionMessage{margin-top:-.5rem}@media (min-width:1276px){.MessageList{width:100%;transform:translateZ(0);transition:transform var(--layer-transition)}.MessageList .messages-container{width:calc(100% - var(--right-column-width))}body.animation-level-0 .MessageList{transition:none}#Main.right-column-open .MessageList{transform:translate3d(calc(var(--right-column-width)/-2),0,0)}#Main.right-column-open .MessageList:not(.select-mode-active),body.animating-right-column .MessageList:not(.select-mode-active),body:not(.animating-right-column) #Main.right-column-open .MessageList.select-mode-active{width:calc(100% - var(--right-column-width))}#Main.right-column-open .MessageList:not(.select-mode-active) .messages-container,body.animating-right-column .MessageList:not(.select-mode-active) .messages-container,body:not(.animating-right-column) #Main.right-column-open .MessageList.select-mode-active .messages-container{width:100%}}@media (max-width:600px){.MessageList{transition:transform var(--layer-transition)}body.enable-symbol-menu-transforms .MessageList{transform:translateZ(0)}body.is-symbol-menu-open .MessageList{transform:translate3d(0,calc(-1*(var(--symbol-menu-height) + var(--symbol-menu-footer-height))),0)}}.animating>div>.MessageList,.MessageList.has-focusing,.MessageList.select-mode-active,body.has-context-menu .MessageList{padding-right:0}.animating>div>.MessageList::-webkit-scrollbar,.MessageList.has-focusing::-webkit-scrollbar,.MessageList.select-mode-active::-webkit-scrollbar,body.has-context-menu .MessageList::-webkit-scrollbar{width:0}@supports (scrollbar-width:none){.animating>div>.MessageList,.MessageList.has-focusing,.MessageList.select-mode-active,body.has-context-menu .MessageList{padding-right:.6875rem;scrollbar-width:none}}.is-safari.has-context-menu .messages-layout>.MessageList,.is-safari .MessageList.has-focusing,.is-safari .MessageList.select-mode-active{padding-right:.375rem}.ScrollDownButton{--base-bottom-pos:6rem;position:absolute;bottom:var(--base-bottom-pos);right:1rem;opacity:0;transform:translateY(4.5rem);transition:transform .25s cubic-bezier(.34,1.56,.64,1),opacity .2s ease;z-index:10;pointer-events:none}body.animation-level-0 .ScrollDownButton{transform:none!important;transition:opacity .15s}@media (max-width:600px){.ScrollDownButton{right:.5rem;bottom:4.5rem}}.ScrollDownButton-inner{display:flex;flex-direction:column;align-items:center}.ScrollDownButton-inner>.Button{box-shadow:0 1px 2px var(--color-default-shadow)}.ScrollDownButton-inner>.Button i{font-size:1.75rem}@media (min-width:1276px){.ScrollDownButton-inner{transform:translateX(0);transition:transform var(--layer-transition)}body.animation-level-0 .ScrollDownButton-inner{transition:none!important}#Main.right-column-open .ScrollDownButton-inner{transform:translateX(calc(-1*var(--right-column-width)))}}@media (max-width:600px){.ScrollDownButton-inner>.Button{width:2.875rem;height:2.875rem}}.ScrollDownButton.revealed{transform:translateY(0);opacity:1;pointer-events:all}.ScrollDownButton.revealed.no-composer{transform:translateY(2.5rem)}.ScrollDownButton .unread-count{min-width:1.5rem;height:1.5rem;padding:0 .45rem;border-radius:.75rem;font-size:.875rem;line-height:1.5rem;font-weight:500;text-align:center;position:absolute;top:-.3rem;right:-.3rem;background:var(--color-green);color:#fff;pointer-events:none}@media (max-width:600px){.ScrollDownButton .unread-count{top:-.7rem;right:auto}}@media (max-width:600px){body.is-symbol-menu-open .ScrollDownButton{bottom:calc(var(--base-bottom-pos) + var(--symbol-menu-height) + var(--symbol-menu-footer-height))}}.ComposerEmbeddedMessage{height:2.625rem;transition:height .15s ease-out,opacity .15s ease-out}.ComposerEmbeddedMessage:not(.open){height:0!important}.ComposerEmbeddedMessage body.animation-level-0{transition:none!important}.ComposerEmbeddedMessage>div{display:flex;align-items:center;padding-right:.625rem;padding-top:.45rem}.ComposerEmbeddedMessage>div>.Button{flex-shrink:0;background:none!important;width:2.125rem;height:2.125rem;margin:0 .625rem;padding:0;align-self:center}.WebPagePreview{display:flex;align-items:center;margin-bottom:-.75rem;padding-right:.625rem;padding-top:.45rem;padding-left:3.375rem;--accent-color:var(--color-primary)}.ComposerEmbeddedMessage+.WebPagePreview{margin-top:.75rem}.WebPagePreview>.Button{flex-shrink:0;background:none!important;width:2.125rem;height:2.125rem;margin:0 .625rem;padding:0;align-self:center}.WebPagePreview .WebPage{flex-grow:1;margin:.1875rem 0 .1875rem .125rem}.WebPagePreview .WebPage:before{top:.125rem;bottom:.0625rem}.WebPagePreview .WebPage .site-title{margin-top:.125rem;margin-bottom:.1875rem}.Composer{align-items:flex-end}@media (min-width:601px){.select-mode-active+.middle-column-footer .Composer{position:absolute;padding-right:2rem;margin-top:-.5rem}}@media (max-width:600px){.select-mode-active+.middle-column-footer .Composer{padding-right:1rem}}.select-mode-active+.middle-column-footer .Composer:before{right:2.125rem}@media (max-width:600px){.select-mode-active+.middle-column-footer .Composer:before{right:1rem}}.hide-mask-shadow .Composer:before{opacity:0!important}.Composer>.Button{flex-shrink:0;margin-left:.5rem}@media (max-width:600px){.Composer>.Button{width:2.875rem;height:2.875rem}}.Composer>.Button .icon-check,.Composer>.Button .icon-microphone-alt,.Composer>.Button .icon-send{position:absolute}.Composer>.Button:not(:active):not(:focus):not(:hover) .icon-check,.Composer>.Button:not(:active):not(:focus):not(:hover) .icon-send{color:var(--color-primary)}.Composer>.Button.cancel{position:relative;z-index:1}.Composer>.Button.cancel.active,.Composer>.Button.cancel:hover{background:var(--color-chat-hover)}.Composer>.Button.recording{position:relative;z-index:0;transition:box-shadow .1s}.Composer>.Button.send .icon-send{animation:grow-icon .4s ease-out}.Composer>.Button.send .icon-check,.Composer>.Button.send .icon-microphone-alt{animation:hide-icon .4s ease-out forwards}.Composer>.Button.record .icon-microphone-alt{animation:grow-icon .4s ease-out}.Composer>.Button.edit .icon-microphone-alt,.Composer>.Button.edit .icon-send,.Composer>.Button.record .icon-check,.Composer>.Button.record .icon-send{animation:hide-icon .4s ease-out forwards}.Composer>.Button.edit .icon-check{animation:grow-icon .4s ease-out}body.animation-level-0 .Composer>.Button .icon-check,body.animation-level-0 .Composer>.Button .icon-microphone-alt,body.animation-level-0 .Composer>.Button .icon-send,body.animation-level-1 .Composer>.Button .icon-check,body.animation-level-1 .Composer>.Button .icon-microphone-alt,body.animation-level-1 .Composer>.Button .icon-send{animation-duration:0ms!important}.Composer .mobile-symbol-menu-button{width:2.875rem;height:2.875rem;position:relative}.Composer .mobile-symbol-menu-button .icon-keyboard,.Composer .mobile-symbol-menu-button .icon-smile,.Composer .mobile-symbol-menu-button .Spinner{position:absolute}.Composer .mobile-symbol-menu-button .Spinner{--spinner-size:1.5rem}.Composer .mobile-symbol-menu-button .icon-smile{animation:grow-icon .4s ease-out}.Composer .mobile-symbol-menu-button .icon-keyboard,.Composer .mobile-symbol-menu-button .Spinner{animation:hide-icon .4s ease-out forwards}.Composer .mobile-symbol-menu-button.is-loading .Spinner{animation:grow-icon .4s ease-out}.Composer .mobile-symbol-menu-button.is-loading .icon-keyboard,.Composer .mobile-symbol-menu-button.is-loading .icon-smile{animation:hide-icon .4s ease-out forwards}.Composer .mobile-symbol-menu-button.menu-opened .icon-keyboard{animation:grow-icon .4s ease-out}.Composer .mobile-symbol-menu-button.menu-opened .icon-smile,.Composer .mobile-symbol-menu-button.menu-opened .Spinner{animation:hide-icon .4s ease-out forwards}#message-compose{flex-grow:1;max-width:calc(100% - 4rem);background:var(--color-background);border-radius:var(--border-radius-messages);border-bottom-right-radius:0;box-shadow:0 1px 2px var(--color-default-shadow);position:relative;z-index:1}#message-compose .svg-appendix{position:absolute;bottom:-.1875rem;right:-.5625rem;width:.5625rem;height:1.25rem}#message-compose .svg-appendix .corner{fill:var(--color-background)}@media (max-width:600px){#message-compose{max-width:calc(100% - 3rem)}}.message-input-wrapper{display:flex}.message-input-wrapper>.Button{flex-shrink:0;background:none!important;width:3.375rem;height:3.375rem;margin:0;padding:.625rem;align-self:flex-end}@media (max-width:600px){.message-input-wrapper>.Button{width:2.875rem;height:2.875rem;margin:0 .25rem}}.message-input-wrapper>.Button+.Button{margin-left:-.25rem}.message-input-wrapper>.Button.scheduled-button i:after{content:"";position:absolute;top:.75rem;right:.75rem;border:.1875rem solid var(--color-background);box-sizing:initial;width:.5rem;height:.5rem;border-radius:50%;background:var(--color-green-darker);box-shadow:-.375rem -.25rem 0 -.1875rem var(--color-background)}@media (max-width:600px){.message-input-wrapper>.Button.scheduled-button i:after{top:.5rem;right:.5rem}}.message-input-wrapper>.input-group{flex-grow:1;margin-bottom:0}.message-input-wrapper .recording-state{display:inline-block;position:relative;line-height:3.5rem;height:3.5rem;padding:0 3.125rem 0 1rem}.message-input-wrapper .recording-state:after{content:"";width:10px;height:10px;background:var(--color-error);border-radius:5px;position:absolute;top:50%;margin-top:-5px;right:1.375rem}@media (max-width:600px){.message-input-wrapper .recording-state{height:2.875rem;line-height:2.875rem}}#caption-input-text,#message-input-text{position:relative}#caption-input-text .form-control,#message-input-text .form-control{padding-top:calc(1rem - var(--border-width));padding-bottom:calc(1rem - var(--border-width));overflow:hidden;line-height:1.5rem}#caption-input-text .form-control.overflown,#message-input-text .form-control.overflown{overflow-y:auto;overflow-x:hidden}#caption-input-text .form-control.touched+.placeholder-text,#caption-input-text .form-control:focus+.placeholder-text,#message-input-text .form-control.touched+.placeholder-text,#message-input-text .form-control:focus+.placeholder-text{display:none}#caption-input-text .form-control.focus-disabled,#message-input-text .form-control.focus-disabled{pointer-events:none}#caption-input-text .placeholder-text,#message-input-text .placeholder-text{position:absolute;bottom:1rem;color:var(--color-placeholders);pointer-events:none}@media (max-width:600px){#caption-input-text .placeholder-text,#message-input-text .placeholder-text{bottom:.6875rem}}#caption-input-text .text-entity-link,#message-input-text .text-entity-link{color:var(--color-links)!important;cursor:default;text-decoration:none}#caption-input-text .text-entity-link:active,#caption-input-text .text-entity-link:hover,#caption-input-text .text-entity-link:visited,#message-input-text .text-entity-link:active,#message-input-text .text-entity-link:hover,#message-input-text .text-entity-link:visited{color:var(--color-links-hover)!important}#caption-input-text .clone,#message-input-text .clone{position:absolute;top:0;left:0;opacity:0;pointer-events:none;z-index:-10}#message-input-text{flex-grow:1}#message-input-text .form-control{margin-bottom:0;background:transparent!important;border:none!important;border-radius:0!important;box-shadow:none!important;caret-color:var(--color-text);min-height:3.5rem;max-height:26rem;transition:height .1s ease}@media (max-width:600px){#message-input-text .form-control{height:2.875rem;min-height:2.875rem;max-height:16rem;padding-top:calc(.6875rem - var(--border-width));padding-bottom:calc(.6875rem - var(--border-width))}}body.animation-level-0 #message-input-text .form-control{transition:none!important}#message-input-text:not(:only-child) .form-control{padding-left:0;padding-right:0}.ComposerEmbeddedMessage+.message-input-wrapper #message-input-text .form-control.overflown,.WebPagePreview+.message-input-wrapper #message-input-text .form-control.overflown{margin-top:.75rem}#message-input-text .emoji{width:1.25rem;height:1.25rem;margin:0 1px -5px;vertical-align:0;pointer-events:none}#caption-input-text .form-control{min-height:3.25rem;max-height:15rem}#caption-input-text .placeholder-text{bottom:1rem;left:1rem}#middle-column-bg{position:absolute;top:0;left:0;bottom:0;right:0;overflow:hidden;z-index:-1}#middle-column-bg:after,#middle-column-bg:before{content:"";display:block;position:absolute;top:0;left:0;bottom:0;right:0;background-color:#a2af8e}#middle-column-bg:after{background-image:url(chat-bg.0e9c45048ff468c28042bcf15ff9e0d2.jpg);background-position:50%;background-repeat:no-repeat;background-size:cover}body:not(.animation-level-0) #root #middle-column-bg:after{transition:transform var(--layer-transition),opacity .2s!important}body.animation-level-0 #middle-column-bg:after{transition:none}@media (max-width:600px){#middle-column-bg:after{background-image:url(chat-bg-mobile.1f82c474ea90cf313c5ed320b4d04d23.jpg)}}.custom-bg-image>#middle-column-bg:after{background-image:var(--custom-background)!important;filter:blur(0);transform:scale(1.1)}.custom-bg-color>#middle-column-bg:before{background-color:var(--custom-background)!important;filter:blur(0);transform:scale(1.1)}.custom-bg-image.blurred>#middle-column-bg:after{filter:blur(12px)}.custom-bg-color>#middle-column-bg:after{opacity:0}@media screen and (min-width:1276px){body.animation-level-2 #middle-column-bg:after,body.animation-level-2 #middle-column-bg:before{margin:-16rem -5rem -20rem 0;overflow:hidden;transform:scale(1);transform-origin:left center;transition:transform var(--layer-transition)}body.animation-level-2 .custom-bg-image>#middle-column-bg:after{margin:-16rem -5rem -20rem -1rem;transition:transform var(--layer-transition)}body.animation-level-2 #Main.right-column-open :not(.custom-bg-image)>#middle-column-bg:after{transform:scale(.67)}}#MiddleColumn{display:flex;justify-content:center;height:100%;position:relative;z-index:1}@media (max-width:600px){#MiddleColumn{overflow:hidden}}#MiddleColumn .messages-layout{display:flex;flex-direction:column;align-items:center;position:relative}#MiddleColumn .messages-layout,#MiddleColumn .messages-layout>.Transition{width:100%;height:100%;overflow:hidden}#MiddleColumn .messages-layout>.Transition>div{display:flex;flex-direction:column;align-items:center}#MiddleColumn .messaging-disabled-inner{width:100%;padding:1rem;border-radius:var(--border-radius-messages);background:var(--color-background);color:var(--color-text-secondary);text-align:center;box-shadow:0 1px 2px var(--color-default-shadow)}#MiddleColumn .Composer #message-compose{transform:scaleX(1) translateX(0);transition:transform var(--select-transition),border-bottom-right-radius var(--select-transition)}#MiddleColumn .Composer #message-compose:before{transform:scaleX(-1) translateX(0);transition:transform var(--select-transition)}body.animation-level-0 #MiddleColumn .Composer #message-compose,body.animation-level-0 #MiddleColumn .Composer #message-compose:before{transition:none!important}#MiddleColumn .Composer .message-input-wrapper,#MiddleColumn .Composer:before{opacity:1;transition:opacity var(--select-transition)}body.animation-level-0 #MiddleColumn .Composer .message-input-wrapper,body.animation-level-0 #MiddleColumn .Composer:before{transition:none!important}#MiddleColumn .Composer>.Button{opacity:1;transform:scale(1);transition:opacity var(--select-transition),transform var(--select-transition)}body.animation-level-0 #MiddleColumn .Composer>.Button{transition:none!important}#MiddleColumn .Composer.hover-disabled,#MiddleColumn .Composer:not(.shown){pointer-events:none}#MiddleColumn .Composer:not(.shown) .ComposerEmbeddedMessage{height:0}#MiddleColumn .Composer:not(.shown) #message-compose{transform:scaleX(var(--composer-hidden-scale,1)) translateX(var(--composer-translate-x,0));border-bottom-right-radius:var(--border-radius-messages)}#MiddleColumn .Composer:not(.shown) #message-compose:before{transform:scaleX(-1) translateX(200%)}#MiddleColumn .Composer:not(.shown) #editable-message-text{height:3.5rem!important}@media (max-width:600px){#MiddleColumn .Composer:not(.shown) #editable-message-text{height:2.5rem!important}}#MiddleColumn .Composer:not(.shown) .message-input-wrapper,#MiddleColumn .Composer:not(.shown):before{opacity:0}#MiddleColumn .Composer:not(.shown)>.Button{opacity:0!important;transform:scale(.5)}#MiddleColumn .messaging-disabled{transform:scaleX(1);transition:transform var(--select-transition)}#MiddleColumn .messaging-disabled .messaging-disabled-inner span{opacity:1;transition:opacity var(--select-transition)}body.animation-level-0 #MiddleColumn .messaging-disabled,body.animation-level-0 #MiddleColumn .messaging-disabled .messaging-disabled-inner span{transition:none!important}#MiddleColumn .messaging-disabled:not(.shown){transform:scaleX(var(--composer-hidden-scale,1));pointer-events:none}#MiddleColumn .messaging-disabled:not(.shown) .messaging-disabled-inner span{opacity:0}#MiddleColumn .middle-column-footer{width:100%;max-width:var(--messages-container-width);padding:0 1rem;position:relative;display:flex;align-items:flex-end;z-index:var(--z-middle-footer);transform:translateZ(0);transition:transform var(--layer-transition)}body.animation-level-0 #MiddleColumn .middle-column-footer{transition:none!important}@media (min-width:1276px){#MiddleColumn .middle-column-footer{width:calc(100% - var(--right-column-width))}#Main.right-column-open #MiddleColumn .middle-column-footer{transform:translate3d(calc(var(--right-column-width)/-2),0,0)}}@media (max-width:600px){#MiddleColumn .middle-column-footer{padding:0 .5rem}body.is-symbol-menu-open #MiddleColumn .middle-column-footer{transform:translate3d(0,calc(-1*(var(--symbol-menu-height) + var(--symbol-menu-footer-height))),0)}}.Composer,.MessageSelectToolbar,.messaging-disabled{margin-bottom:1.25rem}@media (max-width:600px){.Composer,.MessageSelectToolbar,.messaging-disabled{margin-bottom:.5rem}}.Composer,.MessageSelectToolbar,.messaging-disabled,.unpin-all-button{width:100%;display:flex;justify-content:center;position:relative}.mask-image-disabled .Composer:before,.mask-image-disabled .MessageSelectToolbar:before,.mask-image-disabled .messaging-disabled:before,.mask-image-disabled .unpin-all-button:before{--shadow-color:#84a686;content:"";display:block;position:absolute;top:0;left:.125rem;right:.125rem;height:1.5rem;box-shadow:0 0 .5rem .5rem var(--shadow-color);background:var(--shadow-color);z-index:-1}@media (max-width:600px){.mask-image-disabled .Composer:before,.mask-image-disabled .MessageSelectToolbar:before,.mask-image-disabled .messaging-disabled:before,.mask-image-disabled .unpin-all-button:before{left:0;right:0;z-index:-1;--shadow-color:#678a64}body.is-symbol-menu-open .mask-image-disabled .Composer:before,body.is-symbol-menu-open .mask-image-disabled .MessageSelectToolbar:before,body.is-symbol-menu-open .mask-image-disabled .messaging-disabled:before,body.is-symbol-menu-open .mask-image-disabled .unpin-all-button:before{--shadow-color:#b4bf9e}}@media screen and (min-height:750px){.mask-image-disabled .Composer:before,.mask-image-disabled .MessageSelectToolbar:before,.mask-image-disabled .messaging-disabled:before,.mask-image-disabled .unpin-all-button:before{--shadow-color:#759b72}}@media screen and (min-width:1276px){body.animation-level-2 .mask-image-disabled .Composer:before,body.animation-level-2 .mask-image-disabled .MessageSelectToolbar:before,body.animation-level-2 .mask-image-disabled .messaging-disabled:before,body.animation-level-2 .mask-image-disabled .unpin-all-button:before{--shadow-color:#97af8e}body.animation-level-2 #Main.right-column-open .mask-image-disabled .Composer:before,body.animation-level-2 #Main.right-column-open .mask-image-disabled .MessageSelectToolbar:before,body.animation-level-2 #Main.right-column-open .mask-image-disabled .messaging-disabled:before,body.animation-level-2 #Main.right-column-open .mask-image-disabled .unpin-all-button:before{--shadow-color:#84a686}}@media screen and (min-width:1276px) and (min-height:750px){body.animation-level-2 .mask-image-disabled .Composer:before,body.animation-level-2 .mask-image-disabled .MessageSelectToolbar:before,body.animation-level-2 .mask-image-disabled .messaging-disabled:before,body.animation-level-2 .mask-image-disabled .unpin-all-button:before{--shadow-color:#91a67f}body.animation-level-2 #Main.right-column-open .mask-image-disabled .Composer:before,body.animation-level-2 #Main.right-column-open .mask-image-disabled .MessageSelectToolbar:before,body.animation-level-2 #Main.right-column-open .mask-image-disabled .messaging-disabled:before,body.animation-level-2 #Main.right-column-open .mask-image-disabled .unpin-all-button:before{--shadow-color:#759b72}}.custom-bg-color .Composer:before,.custom-bg-color .MessageSelectToolbar:before,.custom-bg-color .messaging-disabled:before,.custom-bg-color .unpin-all-button:before,.custom-bg-image .Composer:before,.custom-bg-image .MessageSelectToolbar:before,.custom-bg-image .messaging-disabled:before,.custom-bg-image .unpin-all-button:before{display:none}.unpin-button-container{width:100%;display:flex;justify-content:center;position:absolute;margin-top:.25rem;padding-bottom:1rem}.unpin-button-container .unpin-all-button{text-transform:capitalize;color:var(--color-black);height:3.125rem;overflow:visible;box-shadow:0 1px 2px var(--color-default-shadow)}.unpin-button-container .unpin-all-button:hover .icon-unpin{color:var(--color-white)}.select-mode-active+.middle-column-footer .unpin-button-container .unpin-all-button{display:none}.mask-image-disabled .unpin-button-container .unpin-all-button:before{height:3.125rem;border-radius:var(--border-radius-messages)}@media (max-width:600px){.unpin-button-container .unpin-all-button{height:2.5rem}}.unpin-button-container .unpin-all-button .icon-unpin{margin-right:.75rem;margin-left:-.438rem;color:var(--color-text-secondary);font-size:1.5rem}@media (max-width:600px){.unpin-button-container{padding-bottom:.75rem}}.mask-image-disabled .unpin-button-container:before{background:unset}.RightHeader{display:flex;align-items:center;height:var(--header-height);padding:.5rem .8125rem;pointer-events:auto}@media (max-width:600px){.RightHeader{padding:.5rem}}.RightHeader .close-button{flex-shrink:0}.RightHeader>.Transition{flex:1;height:100%}.RightHeader>.Transition>div{display:flex;align-items:center}.RightHeader h3{margin-bottom:0;font-size:1.25rem;font-weight:500;margin-left:1.375rem}.RightHeader .tools{display:flex;margin-left:auto}.RightHeader .SearchInput{margin-left:1rem}@media (min-width:600px){.RightHeader .SearchInput{margin-right:1rem}}.RightHeader .DropdownMenu{margin-left:auto}.Profile{height:100%;overflow-y:scroll;overflow-x:hidden}.Profile>.profile-info>.ChatInfo{grid-area:chat_info}.Profile>.profile-info>.ChatInfo .status.online{color:var(--color-primary)}.Profile>.profile-info>.ChatExtra{padding:0 1.5rem}.Profile>.profile-info>.ChatExtra .item{display:flex;padding:.75rem 0 1rem;text-align:left}.Profile>.profile-info>.ChatExtra .item i{font-size:1.5rem;color:var(--color-text-secondary);margin-right:2rem}.Profile>.profile-info>.ChatExtra .item .title{font-size:1rem;line-height:1.4375rem;margin-bottom:0;font-weight:400;word-break:break-word}.Profile>.profile-info>.ChatExtra .item a.title{color:var(--color-text)}.Profile>.profile-info>.ChatExtra .item .subtitle{margin-bottom:0;font-size:.875rem;color:var(--color-text-secondary)}.shared-media{display:flex;flex-direction:column-reverse}.shared-media .TabList{background:var(--color-background);top:-1px}.shared-media .TabList .Tab{padding:.6875rem .25rem}.shared-media .TabList .Tab i{padding-right:1.5rem;margin-left:-.75rem}.shared-media .Transition{flex:1}.shared-media .content.empty-list{height:100%;padding-top:5rem;display:flex;align-items:flex-start;justify-content:center}.shared-media .content.empty-list .Spinner{--spinner-size:2.75rem}.shared-media .content.media-list{display:grid;padding:.5rem;grid-template-columns:repeat(3,1fr);grid-auto-rows:1fr;grid-gap:.25rem}.shared-media .content.documents-list{padding:1.25rem}.shared-media .content.documents-list .File+.File{margin-top:1.25rem}.shared-media .content.links-list{padding:1.25rem}.shared-media .content.links-list .message-upload-progress,.shared-media .content.links-list .ProgressSpinner{display:none}.shared-media .content.audio-list{padding:1.25rem}.shared-media .content.audio-list .Audio .media-loading{top:0;left:0;display:flex;align-items:center;justify-content:center}.shared-media .content.audio-list .Audio+.Audio{margin-top:1.6875rem}.shared-media .content.members-list{padding:.5rem 1rem}@media (max-width:600px){.shared-media .content.members-list{padding:.5rem 0}}#RightColumn{position:absolute;top:0;right:0;width:var(--right-column-width);height:100%;transform:translate3d(var(--right-column-width),0,0);background:var(--color-background);border-left:1px solid var(--color-borders);z-index:var(--z-right-column);transition:transform var(--layer-transition)}body.animation-level-0 #RightColumn{transition:none}#RightColumn:not(:hover) .Picker .chat-item-clickable:nth-child(n+18){display:none!important}@media (max-width:1275px){#RightColumn{box-shadow:0 .25rem .5rem .1rem var(--color-default-shadow)}}@media (max-width:600px){#RightColumn{width:100vw;transform:translate3d(110vw,0,0)}}#RightColumn>.Transition{height:calc(100% - var(--header-height));overflow:hidden}#RightColumn .Management .section>.ChatInfo,#RightColumn .profile-info>.ChatInfo{padding:0 1.5rem;margin:1rem 0;text-align:center}#RightColumn .Management .section>.ChatInfo .Avatar,#RightColumn .profile-info>.ChatInfo .Avatar{margin:0 auto .5rem}#RightColumn .Management .section>.ChatInfo .Avatar.no-photo,#RightColumn .profile-info>.ChatInfo .Avatar.no-photo{cursor:default!important}#RightColumn .Management .section>.ChatInfo .title,#RightColumn .profile-info>.ChatInfo .title{display:flex;justify-content:center;align-items:center}#RightColumn .Management .section>.ChatInfo .title h3,#RightColumn .profile-info>.ChatInfo .title h3{font-weight:500;font-size:1.25rem;line-height:2rem;white-space:pre-wrap;word-break:break-word}#RightColumn .Management .section>.ChatInfo .title .VerifiedIcon,#RightColumn .profile-info>.ChatInfo .title .VerifiedIcon{margin-left:.25rem;margin-top:.1rem}#RightColumn .Management .section>.ChatInfo .title .emoji,#RightColumn .profile-info>.ChatInfo .title .emoji{width:1.5rem;height:1.5rem;background-size:1.5rem}#RightColumn .Management .section>.ChatInfo .status,#RightColumn .profile-info>.ChatInfo .status{font-size:.875rem;color:#868e96}#RightColumn-wrapper{position:absolute;top:0;left:0;right:0;bottom:0;z-index:var(--z-right-column);overflow:hidden;visibility:hidden;pointer-events:none}@media (max-width:1275px){#RightColumn-wrapper{position:fixed}}#RightColumn-wrapper.is-hidden{display:none}#RightColumn-wrapper .overlay-backdrop{position:absolute;top:0;right:0;bottom:0;left:0;z-index:-1;background:#000;opacity:0}@media (max-width:600px){#RightColumn-wrapper .overlay-backdrop{transition:opacity var(--layer-transition)}body.animation-level-0 #RightColumn-wrapper .overlay-backdrop{transition:none}}#Main.right-column-open #RightColumn-wrapper,body.animating-right-column #RightColumn-wrapper{visibility:visible}@media (max-width:600px){#Main.right-column-open #RightColumn-wrapper .overlay-backdrop{opacity:var(--layer-blackout-opacity)}}#Main.right-column-open #RightColumn-wrapper #RightColumn{pointer-events:auto;transform:translateZ(0)}#Main{display:flex;height:100%;text-align:left;overflow:hidden}@media (min-width:1276px){#Main{position:relative}}@media (max-width:600px){#Main{height:calc(var(--vh, 1vh)*100)}}#LeftColumn{flex:1;min-width:18rem;max-width:26.5rem;height:100%}@media (max-width:600px){#LeftColumn{height:calc(var(--vh, 1vh)*100)}}@media (min-width:1680px){#LeftColumn{border-left:1px solid var(--color-borders)}}@media (max-width:1275px){#LeftColumn{flex:2}}@media (max-width:925px){#LeftColumn{position:fixed;left:0;top:0;height:calc(var(--vh, 1vh)*100);width:26.5rem;transform:translate3d(-5rem,0,0);transition:transform var(--layer-transition)}body.animation-level-0 #LeftColumn{transition:none}#LeftColumn:after{content:"";display:block;position:absolute;left:0;top:0;right:0;bottom:0;background:#000;opacity:var(--layer-blackout-opacity);transition:opacity var(--layer-transition);z-index:1}body.animation-level-0 #LeftColumn:after{transition:none}body.is-android #LeftColumn:after{display:none}body.is-android .middle-column-shown #LeftColumn:after{display:block}#Main:not(.middle-column-open) #LeftColumn{transform:translateZ(0)}#Main:not(.middle-column-open) #LeftColumn:after{opacity:0;pointer-events:none}#Main.middle-column-open #LeftColumn .custom-scroll{overflow:hidden}}@media (max-width:600px){#LeftColumn{max-width:none;width:100vw;transform:translate3d(-20vw,0,0)}}@media (min-width:1680px){#RightColumn{border-right:1px solid var(--color-borders)}}@media (max-width:600px){#RightColumn{height:calc(var(--vh, 1vh)*100 + 1px)}}#MiddleColumn{flex:3;border-left:1px solid var(--color-borders);max-width:75vw}@media (max-width:1275px){#MiddleColumn{max-width:calc(100vw - 26.5rem)}}@media (max-width:66.25rem){#MiddleColumn{max-width:60vw}}@media (min-width:1680px){#MiddleColumn{border-right:1px solid var(--color-borders);max-width:calc(1680px - 26.5rem)}}@media (max-width:925px){#MiddleColumn{max-width:none;position:fixed;left:0;top:0;bottom:0;right:0;transform:translateZ(0);transition:transform var(--layer-transition)}body.animation-level-0 #MiddleColumn{transition:none}#Main:not(.middle-column-open) #MiddleColumn{transform:translate3d(26.5rem,0,0)}}@media (max-width:600px){#MiddleColumn{border-left:none}#Main:not(.middle-column-open) #MiddleColumn{transform:translate3d(100vw,0,0)}#Main.right-column-open #MiddleColumn{transform:translate3d(-20vw,0,0)}}@media (max-width:600px){.SymbolMenu{transition:transform var(--layer-transition)}body.animation-level-0 .SymbolMenu{transition:none}body:not(.is-middle-column-open) .SymbolMenu{transform:translate3d(100vw,0,0)!important}} \ No newline at end of file diff --git a/dist/3.6470b420067a21e4cdac.js b/dist/3.6470b420067a21e4cdac.js new file mode 100644 index 00000000..7db9c63b --- /dev/null +++ b/dist/3.6470b420067a21e4cdac.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[3],{104:function(e,t,a){"use strict";function s(e){const t=e.length;let a=e[0],s=e[0];for(let n=0;na?a=t:tvoid 0!==a[s]?a[s]:void 0!==t[s]?t[s]:e[s]})}function o(e,t,a=!0){let s,n,c=null;return(...r)=>{s=!0,n=r,c||(a&&(s=!1,e(...n)),c=window.setInterval(()=>{if(!s)return window.clearInterval(c),void(c=null);s=!1,e(...n)},t))}}function i(e){let t,a=!1;return function(...s){t=s,a||(a=!0,requestAnimationFrame(()=>{a=!1,e(...t)}))}}function l(e,t,a=!0,s=!0){let n=null;return function(){n?(clearTimeout(n),n=null):a&&e(),n=setTimeout(()=>{s&&e(),n=null},t)}}a.d(t,"b",(function(){return s})),a.d(t,"c",(function(){return n})),a.d(t,"e",(function(){return c})),a.d(t,"d",(function(){return r})),a.d(t,"f",(function(){return o})),a.d(t,"g",(function(){return i})),a.d(t,"a",(function(){return l}))},183:function(e,t,a){},184:function(e,t,a){},185:function(e,t,a){},197:function(e,t,a){},198:function(e,t,a){},199:function(e,t,a){},202:function(e,t,a){},203:function(e,t,a){},204:function(e,t,a){},208:function(e,t,a){},209:function(e,t,a){},211:function(e,t,a){},214:function(e,t,a){},215:function(e,t,a){},216:function(e,t,a){},217:function(e,t,a){},218:function(e,t,a){},219:function(e,t,a){},220:function(e,t,a){},221:function(e,t,a){},222:function(e,t,a){},223:function(e,t,a){},224:function(e,t,a){},226:function(e,t,a){},227:function(e,t,a){},228:function(e,t,a){},229:function(e,t,a){},230:function(e,t,a){},234:function(e,t,a){},235:function(e,t,a){},236:function(e,t,a){},91:function(e,t,a){"use strict";a.r(t),a.d(t,"Main",(function(){return pn}));var s=a(2),n=a(1),c=a(0),r=(a(74),a(37)),o=a(6);Object(s.b)("openChat",(e,t,a)=>{const{id:n,threadId:c,type:i}=a,l=Object(o.x)(e);return!l||l.chatId===n&&l.threadId===c&&l.type===i||(e=Object(r.m)(e),e={...e,messages:{...e.messages,contentToBeScheduled:void 0},...n!==e.forwardMessages.toChatId&&{forwardMessages:{}}},Object(s.g)(e)),Object(r.L)(e,n,c,i)}),Object(s.b)("openChatWithInfo",(e,t,a)=>{Object(s.g)({...e,isChatInfoShown:!0}),t.openChat(a)}),Object(s.b)("resetChatCreation",e=>({...e,chatCreation:void 0}));var i=a(5),l=a(18),d=a(3);let b;Object(s.b)("setScrollOffset",(e,t,a)=>{const{chatId:s,threadId:n,scrollOffset:c}=a;return Object(r.v)(e,s,n,"scrollOffset",c)}),Object(s.b)("setReplyingToId",(e,t,a)=>{const{messageId:s}=a,n=Object(o.x)(e);if(!n)return;const{chatId:c,threadId:i}=n;return Object(r.v)(e,c,i,"replyingToId",s)}),Object(s.b)("setEditingId",(e,t,a)=>{const{messageId:s}=a,n=Object(o.x)(e);if(!n)return;const{chatId:c,threadId:i,type:l}=n,d="scheduled"===l?"editingScheduledId":"editingId";return Object(r.v)(e,c,i,d,s)}),Object(s.b)("editLastMessage",e=>{const{chatId:t,threadId:a}=Object(o.x)(e)||{};if(!t||!a)return;const s=Object(o.m)(e,t),n=Object(o.Cb)(e,t,a);if(!s||!n)return;const c=Object(d.g)(n,t=>Boolean(s[t]&&Object(o.b)(e,s[t],a).canEdit));return c?Object(r.v)(e,t,a,"editingId",c):void 0}),Object(s.b)("openMediaViewer",(e,t,a)=>{const{chatId:s,threadId:n,messageId:c,avatarOwnerId:r,origin:o}=a;return{...e,mediaViewer:{chatId:s,threadId:n,messageId:c,avatarOwnerId:r,origin:o},forwardMessages:{}}}),Object(s.b)("closeMediaViewer",e=>({...e,mediaViewer:{}})),Object(s.b)("openAudioPlayer",(e,t,a)=>{const{chatId:s,threadId:n,messageId:c}=a;return{...e,audioPlayer:{chatId:s,threadId:n,messageId:c}}}),Object(s.b)("closeAudioPlayer",e=>({...e,audioPlayer:{}})),Object(s.b)("openPollResults",(e,t,a)=>{const{chatId:n,messageId:c}=a;Object(o.U)(e)?n===e.pollResults.chatId&&c===e.pollResults.messageId||Object(s.g)({...e,pollResults:{chatId:n,messageId:c,voters:{}}}):window.setTimeout(()=>{const e=Object(s.e)();Object(s.g)({...e,pollResults:{chatId:n,messageId:c,voters:{}}})},450)}),Object(s.b)("closePollResults",e=>{Object(s.g)({...e,pollResults:{}})}),Object(s.b)("focusLastMessage",(e,t)=>{const a=Object(o.x)(e);if(!a)return;const{chatId:s,threadId:n}=a;let c;if(n===i.MAIN_THREAD_ID){const t=Object(o.f)(e,s);c=t&&t.lastMessage?t.lastMessage.id:void 0}else{const t=Object(o.xb)(e,s,n);c=t?t.lastMessageId:void 0}c&&t.focusMessage({chatId:s,threadId:n,messageId:c,noHighlight:!0})}),Object(s.b)("focusMessage",(e,t,a)=>{const{chatId:n,threadId:c=i.MAIN_THREAD_ID,messageListType:d="thread",noHighlight:u,groupedId:m,groupedChatId:h}=a;let{messageId:O}=a;if(void 0!==m){const t=Object(o.H)(e,h,m);t&&t.length&&([O]=t)}const j=Object(o.x)(e),g=!j||n!==j.chatId||c!==j.threadId||d!==j.type;b&&(clearTimeout(b),b=void 0),b=window.setTimeout(()=>{let e=Object(s.e)();e=Object(r.N)(e),e=Object(r.M)(e),Object(s.g)(e)},2e3),e=Object(r.N)(e,n,O,u),e=Object(r.M)(e,void 0),g&&(e=Object(r.M)(e,l.b.Static));const f=Object(o.Cb)(e,n,c);if(f&&f.includes(O))return Object(s.g)(e),void t.openChat({id:n,threadId:c});if(g&&(e=Object(r.v)(e,n,c,"viewportIds",void 0)),e=Object(r.v)(e,n,c,"outlyingIds",void 0),f&&!g){const t=O>f[0]?l.b.Down:l.b.Up;e=Object(r.M)(e,t)}Object(s.g)(e),t.openChat({id:n,threadId:c}),t.loadViewportMessages()}),Object(s.b)("openForwardMenu",(e,t,a)=>{const{fromChatId:s,messageIds:n,groupedId:c}=a;let r;return c&&(r=Object(o.Y)(e,s,c)),{...e,forwardMessages:{fromChatId:s,messageIds:r||n,isModalShown:!0}}}),Object(s.b)("exitForwardMode",e=>{Object(s.g)({...e,forwardMessages:{}})}),Object(s.b)("setForwardChatId",(e,t,a)=>{const{id:n}=a;Object(s.g)({...e,forwardMessages:{...e.forwardMessages,toChatId:n,isModalShown:!1}}),t.openChat({id:n}),t.closeMediaViewer()}),Object(s.b)("openForwardMenuForSelectedMessages",(e,t)=>{if(!e.selectedMessages)return;const{chatId:a,messageIds:s}=e.selectedMessages;t.openForwardMenu({fromChatId:a,messageIds:s})}),Object(s.b)("enterMessageSelectMode",(e,t,a)=>{const{messageId:s}=a||{},n=Object(o.q)(e);return n?Object(r.l)(e,n.id,s):e}),Object(s.b)("toggleMessageSelection",(e,t,a)=>{const{messageId:s,groupedId:n,childMessageIds:c,withShift:i}=a,l=Object(o.x)(e);if(!l)return;const{chatId:d,threadId:b,type:u}=l;return Object(r.E)(e,d,b,u,s,n,c,i)}),Object(s.b)("exitMessageSelectMode",r.m),Object(s.b)("openPollModal",e=>({...e,isPollModalOpen:!0})),Object(s.b)("closePollModal",e=>({...e,isPollModalOpen:!1}));Object(s.b)("setGlobalSearchQuery",(e,t,a)=>{const{query:s}=a,{chatId:n}=e.globalSearch;return Object(r.P)(e,{globalResults:{},localResults:{},resultsByType:void 0,...s?{fetchingStatus:{chats:!n,messages:!0}}:{fetchingStatus:void 0},query:s})}),Object(s.b)("addRecentlyFoundChatId",(e,t,a)=>{const{id:s}=a,{recentlyFoundChatIds:n}=e.globalSearch;if(!n)return Object(r.P)(e,{recentlyFoundChatIds:[s]});const c=n.filter(e=>e!==s);return c.unshift(s),c.length>10&&c.pop(),Object(r.P)(e,{recentlyFoundChatIds:c})}),Object(s.b)("clearRecentlyFoundChats",e=>Object(r.P)(e,{recentlyFoundChatIds:void 0})),Object(s.b)("setGlobalSearchContent",(e,t,a)=>{const{content:s}=a;return Object(r.Q)(e,s)}),Object(s.b)("setGlobalSearchChatId",(e,t,a)=>{const{id:s}=a;return Object(r.P)(e,{chatId:s,query:void 0,resultsByType:void 0})});var u=a(44),m=a(4);Object(s.b)("openLocalTextSearch",e=>{const{chatId:t,threadId:a}=Object(o.x)(e)||{};if(t&&a)return Object(r.W)(e,t,a,!0)}),Object(s.b)("closeLocalTextSearch",e=>{const{chatId:t,threadId:a}=Object(o.x)(e)||{};if(t&&a)return e=Object(r.W)(e,t,a,!1),e=Object(r.s)(e,t,a,void 0)}),Object(s.b)("setLocalTextSearchQuery",(e,t,a)=>{const{chatId:s,threadId:n}=Object(o.x)(e)||{};if(!s||!n)return;const{query:c}=a,i=Object(m.a)(s,n),{query:l}=e.localTextSearch.byChatThreadKey[i]||{};return c!==l&&(e=Object(r.s)(e,s,n,u.a)),e=Object(r.W)(e,s,n,!0,c)}),Object(s.b)("setLocalMediaSearchType",(e,t,a)=>{const{chatId:s}=Object(o.x)(e)||{};if(!s)return;const{mediaType:n}=a;return Object(r.V)(e,s,n)}),Object(s.b)("setStickerSearchQuery",(e,t,a)=>{const{query:s}=a;return{...e,stickers:{...e.stickers,search:{query:s,resultIds:void 0}}}}),Object(s.b)("setGifSearchQuery",(e,t,a)=>{const{query:s}=a;return{...e,gifs:{...e.gifs,search:{query:s,offsetId:void 0,results:void 0}}}}),Object(s.b)("openUserInfo",(e,t,a)=>{const{id:s}=a;t.openChat({id:s})});Object(s.b)("openChat",e=>Object(r.db)(e,void 0)),Object(s.b)("setSettingOption",(e,t,a)=>Object(r.u)(e,a));var h=a(7),O=a(157);Object(s.b)("toggleChatInfo",e=>({...e,isChatInfoShown:!e.isChatInfoShown})),Object(s.b)("toggleManagement",e=>{const{chatId:t}=Object(o.x)(e)||{};if(t)return{...e,management:{byChatId:{...e.management.byChatId,[t]:{...e.management.byChatId[t],isActive:!(e.management.byChatId[t]||{}).isActive}}}}}),Object(s.b)("closeManagement",e=>{const{chatId:t}=Object(o.x)(e)||{};if(t)return{...e,management:{byChatId:{...e.management.byChatId,[t]:{...e.management.byChatId[t],isActive:!1}}}}}),Object(s.b)("toggleStatistics",e=>({...e,isStatisticsShown:!e.isStatisticsShown})),Object(s.b)("openChat",(e,t,a)=>{if(!h.f)return;const{id:s}=a;return{...e,isLeftColumnShown:void 0===s}}),Object(s.b)("toggleLeftColumn",e=>({...e,isLeftColumnShown:!e.isLeftColumnShown})),Object(s.b)("addRecentEmoji",(e,t,a)=>{const{emoji:s}=a,{recentEmojis:n}=e;if(!n)return{...e,recentEmojis:[s]};const c=n.filter(e=>e!==s);return c.unshift(s),c.length>18&&c.pop(),{...e,recentEmojis:c}}),Object(s.b)("addRecentSticker",(e,t,a)=>{const{sticker:s}=a,{recent:n}=e.stickers;if(!n)return{...e,stickers:{...e.stickers,recent:{hash:0,stickers:[s]}}};const c=n.stickers.filter(e=>e.id!==s.id);return c.unshift(s),{...e,stickers:{...e.stickers,recent:{...n,stickers:c}}}}),Object(s.b)("showNotification",(e,t,a)=>{const s=a,n=[...e.notifications],c=n.findIndex(e=>e.message===s.message);return-1!==c&&n.splice(c,1),n.push(s),{...e,notifications:n}}),Object(s.b)("dismissNotification",e=>{const t=[...e.notifications];return t.pop(),{...e,notifications:t}}),Object(s.b)("showError",(e,t,a)=>{const{error:s}=a;if(!Object(O.a)(s))return e;const n=[...e.errors],c=n.findIndex(e=>e.message===s.message);return-1!==c&&n.splice(c,1),n.push(s),{...e,errors:n}}),Object(s.b)("dismissError",e=>{const t=[...e.errors];return t.pop(),{...e,errors:t}}),Object(s.b)("openPaymentModal",(e,t,a)=>{const{messageId:s}=a;return{...e,payment:{...e.payment,messageId:s,isPaymentModalOpen:!0}}}),Object(s.b)("closePaymentModal",e=>{const t=Object(r.g)(e);return Object(r.h)(t)});a(75);var j=a(11),g=a(9);const f=Object(g.g)(e=>e(),1e3,!0),p=Object(g.g)(e=>e(),3e3,!0),I=Object(g.a)(e=>e(),500,!1,!0),v=Object(g.a)(e=>e(),500,!1,!0);async function y(e,t,a){const c=await Object(j.a)("fetchChats",{limit:n.i,offsetDate:a,archived:"archived"===e,withPinned:void 0===Object(s.e)().chats.orderedPinnedIds[e]});if(!c)return;const{chatIds:o}=c;o.length>0&&o[0]===t&&o.shift();let l=Object(s.e)();l=Object(r.e)(l,Object(d.c)(c.users,"id")),l=Object(r.K)(l,Object(d.c)(c.chats,"id")),l=Object(r.G)(l,e,o),l=Object(r.H)(l,e,c),Object.keys(c.draftsById).map(Number).forEach(e=>{l=Object(r.v)(l,e,i.MAIN_THREAD_ID,"draft",c.draftsById[e])}),Object.keys(c.replyingToById).map(Number).forEach(e=>{l=Object(r.v)(l,e,i.MAIN_THREAD_ID,"replyingToId",c.replyingToById[e])}),0!==o.length||l.chats.isFullyLoaded[e]||(l={...l,chats:{...l.chats,isFullyLoaded:{...l.chats.isFullyLoaded,[e]:!0}}}),Object(s.g)(l)}async function w(e){const t=await Object(j.a)("fetchFullChat",e);if(!t)return;const{users:a,fullInfo:n}=t;let c=Object(s.e)();a&&(c=Object(r.e)(c,Object(d.c)(a,"id"))),c=Object(r.F)(c,e.id,{fullInfo:n}),Object(s.g)(c)}async function C(e,t,a){const n=Object(s.e)(),c=Object(o.h)(n,t);if(c&&!c.isMin)return void(a?e.focusMessage({chatId:c.id,messageId:a}):e.openChat({id:c.id}));const i=Object(o.q)(n);e.openChat({id:-1});const l=await Object(j.a)("getChatByUsername",t);if(!l)return i&&e.openChat({id:i.id}),void e.showNotification({message:"User does not exist"});Object(s.g)(Object(r.F)(Object(s.e)(),l.id,l)),a?e.focusMessage({chatId:l.id,messageId:a}):e.openChat({id:l.id})}Object(s.b)("preloadTopChatMessages",(e,t)=>{(async()=>{const a=[];for(let c=0;ce!==l&&!a.includes(e));if(!u)return;a.push(u.id),t.loadViewportMessages({chatId:u.id,threadId:i.MAIN_THREAD_ID}),h.k&&t.loadPinnedMessages({chatId:u.id})}})()}),Object(s.b)("openChat",(e,t,a)=>{const{id:s,threadId:n}=a,{currentUserId:c}=e,r=Object(o.f)(e,s);if(r&&r.hasUnreadMark&&t.toggleChatUnread({id:s}),r)Object(m.mb)(r)&&!r.isMin&&t.requestChatUpdate({chatId:s});else if(s===c)Object(j.a)("fetchChat",{type:"self"});else{const t=Object(o.Bb)(e,s);t&&Object(j.a)("fetchChat",{type:"user",user:t})}if(n!==i.MAIN_THREAD_ID){Object(o.zb)(e,s,n)||t.requestThreadInfoUpdate({chatId:s,threadId:n})}}),Object(s.b)("openSupportChat",(e,t)=>{const a=Object(o.vb)(e);t.openChat({id:a?a.id:-1}),a||(async()=>{const e=await Object(j.a)("fetchChat",{type:"support"});e&&t.openChat({id:e.chatId})})()}),Object(s.b)("openTipsChat",(e,t)=>{t.openChatByUsername({username:n.qb})}),Object(s.b)("loadMoreChats",(e,t,a)=>{const{listType:s="active"}=a,n=e.chats.listIds[s];if(e.chats.isFullyLoaded[s])return;const c=n?n.map(t=>e.chats.byId[t]).filter(t=>Boolean(t&&t.lastMessage)&&!Object(o.L)(e,t.id)).sort((e,t)=>e.lastMessage.date-t.lastMessage.date)[0]:void 0;f(c?()=>y(s,c.id,c.lastMessage.date):()=>y(s))}),Object(s.b)("loadFullChat",(e,t,a)=>{const{chatId:s,force:n}=a,c=Object(o.f)(e,s);c&&(n?w(c):I(()=>w(c)))}),Object(s.b)("loadSuperGroupOnlines",(e,t,a)=>{const{chatId:s}=a,n=Object(o.f)(e,s);n&&v(()=>Object(j.a)("fetchSuperGroupOnlines",n))}),Object(s.b)("loadTopChats",()=>{p(()=>y("active"))}),Object(s.b)("requestChatUpdate",(e,t,a)=>{const{chatId:s}=a,n=Object(o.f)(e,s);n&&Object(j.a)("requestChatUpdate",n)}),Object(s.b)("updateChatMutedState",(e,t,a)=>{const{chatId:s,isMuted:n}=a,c=Object(o.f)(e,s);c&&Object(j.a)("updateChatMutedState",{chat:c,isMuted:n})}),Object(s.b)("createChannel",(e,t,a)=>{const{title:n,about:c,photo:i,memberIds:d}=a;!async function(e,t,a,n){Object(s.g)({...Object(s.e)(),chatCreation:{progress:l.a.InProgress}});const c=await Object(j.a)("createChannel",{title:e,about:a,users:t});if(!c)return;const{id:o,accessHash:i}=c;let d=Object(s.e)();d=Object(r.F)(d,o,c),d={...d,chatCreation:{...d.chatCreation,progress:c?l.a.Complete:l.a.Error}},Object(s.g)(d),Object(s.d)().openChat({id:o}),o&&i&&n&&await Object(j.a)("editChatPhoto",{chatId:o,accessHash:i,photo:n})}(n,d.map(t=>Object(o.Bb)(e,t)).filter(Boolean),c,i)}),Object(s.b)("joinChannel",(e,t,a)=>{const{chatId:s}=a,n=Object(o.f)(e,s);if(!n)return;const{id:c,accessHash:r}=n;c&&r&&Object(j.a)("joinChannel",{channelId:c,accessHash:r})}),Object(s.b)("leaveChannel",(e,t,a)=>{const{chatId:s}=a,n=Object(o.f)(e,s);if(!n)return;const{id:c,accessHash:r}=n;c&&r&&Object(j.a)("leaveChannel",{channelId:c,accessHash:r})}),Object(s.b)("deleteChannel",(e,t,a)=>{const{chatId:s}=a,n=Object(o.f)(e,s);if(!n)return;const{id:c,accessHash:r}=n;c&&r&&Object(j.a)("deleteChannel",{channelId:c,accessHash:r})}),Object(s.b)("createGroupChat",(e,t,a)=>{const{title:n,memberIds:c,photo:i}=a;!async function(e,t,a){Object(s.g)({...Object(s.e)(),chatCreation:{progress:l.a.InProgress}});const n=await Object(j.a)("createGroupChat",{title:e,users:t});if(!n)return;const{id:c}=n;let o=Object(s.e)();o=Object(r.F)(o,c,n),o={...o,chatCreation:{...o.chatCreation,progress:n?l.a.Complete:l.a.Error}},Object(s.g)(o),Object(s.d)().openChat({id:c}),c&&a&&await Object(j.a)("editChatPhoto",{chatId:c,photo:a})}(n,c.map(t=>Object(o.Bb)(e,t)).filter(Boolean),i)}),Object(s.b)("toggleChatPinned",(e,t,a)=>{const{id:s,folderId:c}=a,r=Object(o.f)(e,s);if(r)if(c){const t=Object(o.i)(e,c);if(t){const a=!Object(o.L)(e,s,c),{pinnedChatIds:n,includedChatIds:r}=t,i=a?[s,...n||[]]:(n||[]).filter(e=>e!==s),l=[s,...r];Object(j.a)("editChatFolder",{id:c,folderUpdate:{...t,pinnedChatIds:i,includedChatIds:l}})}}else{const t=Object(o.j)(e,s),a=Object(o.L)(e,s,"archived"===t?n.g:void 0);Object(j.a)("toggleChatPinned",{chat:r,shouldBePinned:!a})}}),Object(s.b)("toggleChatArchived",(e,t,a)=>{const{id:s}=a,c=Object(o.f)(e,s);c&&Object(j.a)("toggleChatArchived",{chat:c,folderId:Object(m.hb)(c)?0:n.g})}),Object(s.b)("loadChatFolders",()=>{!async function(){const e=await Object(j.a)("fetchChatFolders");if(e){const t=Object(s.e)();Object(s.g)({...t,chatFolders:{...t.chatFolders,...e}})}}()}),Object(s.b)("loadRecommendedChatFolders",()=>{!async function(){const e=await Object(j.a)("fetchRecommendedChatFolders");if(e){const t=Object(s.e)();Object(s.g)({...t,chatFolders:{...t.chatFolders,recommended:e}})}}()}),Object(s.b)("editChatFolder",(e,t,a)=>{const{id:s,folderUpdate:n}=a,c=Object(o.i)(e,s);c&&Object(j.a)("editChatFolder",{id:s,folderUpdate:{id:s,emoticon:c.emoticon,pinnedChatIds:c.pinnedChatIds,...n}})}),Object(s.b)("addChatFolder",(e,t,a)=>{const{folder:c}=a,{orderedIds:r}=e.chatFolders;!async function(e,t){const{id:a,description:n,...c}=e;if(await Object(j.a)("editChatFolder",{id:t+1,folderUpdate:{id:t+1,...c}}),!n)return;const r=Object(s.e)(),{recommended:o}=r.chatFolders;o&&Object(s.g)({...r,chatFolders:{...r.chatFolders,recommended:o.filter(({id:e})=>e!==a)}})}(c,r&&r.length?Math.max.apply(Math.max,r):n.g)}),Object(s.b)("deleteChatFolder",(e,t,a)=>{const{id:s}=a;Object(o.i)(e,s)&&async function(e){await Object(j.a)("deleteChatFolder",e)}(s)}),Object(s.b)("toggleChatUnread",(e,t,a)=>{const{id:s}=a,n=Object(o.f)(e,s);n&&(n.unreadCount?Object(j.a)("markMessageListRead",{chat:n,threadId:i.MAIN_THREAD_ID}):Object(j.a)("toggleDialogUnread",{chat:n,hasUnreadMark:!n.hasUnreadMark}))}),Object(s.b)("openTelegramLink",(e,t,a)=>{const{url:s}=a,c=n.X.exec(s);C(t,c[1],c[2]?Number(c[2]):void 0)}),Object(s.b)("openChatByUsername",(e,t,a)=>{const{username:s}=a;C(t,s)}),Object(s.b)("togglePreHistoryHidden",(e,t,a)=>{const{chatId:s,isEnabled:n}=a;let c=Object(o.f)(e,s);c&&(async()=>{if(Object(m.ib)(c)){if(c=await Object(j.a)("migrateChat",c),!c)return;t.openChat({id:c.id})}Object(j.a)("togglePreHistoryHidden",{chat:c,isEnabled:n})})()}),Object(s.b)("updateChatDefaultBannedRights",(e,t,a)=>{const{chatId:s,bannedRights:n}=a,c=Object(o.f)(e,s);c&&Object(j.a)("updateChatDefaultBannedRights",{chat:c,bannedRights:n})}),Object(s.b)("updateChatMemberBannedRights",(e,t,a)=>{const{chatId:n,userId:c,bannedRights:i}=a;let l=Object(o.f)(e,n);const d=Object(o.Bb)(e,c);l&&d&&(async()=>{if(Object(m.ib)(l)){if(l=await Object(j.a)("migrateChat",l),!l)return;t.openChat({id:l.id})}await Object(j.a)("updateChatMemberBannedRights",{chat:l,user:d,bannedRights:i});const e=Object(s.e)(),a=Object(o.f)(e,n);if(!a||!a.fullInfo)return;const{members:b,kickedMembers:u}=a.fullInfo,h=!!i.viewMessages,O=!Object.keys(i).length;Object(s.g)(Object(r.F)(e,n,{fullInfo:{...a.fullInfo,...b&&h&&{members:b.filter(e=>e.userId!==c)},...b&&!h&&{members:b.map(e=>e.userId===c?{...e,bannedRights:i}:e)},...O&&u&&{kickedMembers:u.filter(e=>e.userId!==c)}}}))})()}),Object(s.b)("updateChatAdmin",(e,t,a)=>{const{chatId:n,userId:c,adminRights:i,customTitle:l}=a;let d=Object(o.f)(e,n);const b=Object(o.Bb)(e,c);d&&b&&(async()=>{if(Object(m.ib)(d)){if(d=await Object(j.a)("migrateChat",d),!d)return;t.openChat({id:d.id})}await Object(j.a)("updateChatAdmin",{chat:d,user:b,adminRights:i,customTitle:l});const e=Object(s.e)(),a=Object(o.f)(e,n);if(!a||!a.fullInfo)return;const{adminMembers:u}=a.fullInfo,h=!Object.keys(i).length;Object(s.g)(Object(r.F)(e,n,{fullInfo:{...a.fullInfo,...u&&h&&{adminMembers:u.filter(e=>e.userId!==c)},...u&&!h&&{adminMembers:u.map(e=>e.userId===c?{...e,adminRights:i,customTitle:l}:e)}}}))})()}),Object(s.b)("updateChat",(e,t,a)=>{const{chatId:n,title:c,about:i,photo:d}=a,b=Object(o.f)(e,n);b&&(async()=>{Object(s.g)(Object(r.Z)(Object(s.e)(),l.f.InProgress)),await Promise.all([b.title!==c?Object(j.a)("updateChatTitle",b,c):void 0,b.fullInfo&&b.fullInfo.about!==i?Object(j.a)("updateChatAbout",b,i):void 0,d?Object(j.a)("editChatPhoto",{chatId:n,accessHash:b.accessHash,photo:d}):void 0]),Object(s.g)(Object(r.Z)(Object(s.e)(),l.f.Complete))})()}),Object(s.b)("toggleSignatures",(e,t,a)=>{const{chatId:s,isEnabled:n}=a,c=Object(o.f)(e,s);c&&Object(j.a)("toggleSignatures",{chat:c,isEnabled:n})}),Object(s.b)("loadGroupsForDiscussion",()=>{(async()=>{const e=await Object(j.a)("fetchGroupsForDiscussion");if(!e)return;const t=e.reduce((e,t)=>(t&&(e[t.id]=t),e),{}),a=Object(r.c)(Object(s.e)(),t);Object(s.g)({...a,chats:{...a.chats,forDiscussionIds:Object.keys(t).map(Number)}})})()}),Object(s.b)("linkDiscussionGroup",(e,t,a)=>{const{channelId:s,chatId:n}=a,c=Object(o.f)(e,s);let r=Object(o.f)(e,n);c&&r&&(async()=>{if(Object(m.ib)(r)){if(r=await Object(j.a)("migrateChat",r),!r)return;t.openChat({id:r.id})}let{fullInfo:e}=r;if(!e){const t=await Object(j.a)("fetchFullChat",r);if(!t)return;e=t.fullInfo}e.isPreHistoryHidden&&await Object(j.a)("togglePreHistoryHidden",{chat:r,isEnabled:!1}),Object(j.a)("setDiscussionGroup",{channel:c,chat:r})})()}),Object(s.b)("unlinkDiscussionGroup",(e,t,a)=>{const{channelId:s}=a,n=Object(o.f)(e,s);if(!n)return;let c;n.fullInfo&&n.fullInfo.linkedChatId&&(c=Object(o.f)(e,n.fullInfo.linkedChatId)),(async()=>{await Object(j.a)("setDiscussionGroup",{channel:n}),c&&w(c)})()});var E=a(158);const M=new Map;async function S(e,t,a,c,i=!1,b=!1){const u=e.id;let m;switch(c){case l.e.Backwards:m=void 0;break;case l.e.Around:m=-(Math.round(n.N/2)+1);break;case l.e.Forwards:m=-(n.N+1)}const h=await Object(j.a)("fetchMessages",{chat:Object(o.yb)(Object(s.e)(),u,t),offsetId:a,addOffset:m,limit:n.N,threadId:t});if(!h)return;const{messages:O,users:g,chats:f,threadInfos:p,firstMessageId:I}=h,v=Object(d.c)(O,"id"),y=Object.keys(v).map(Number);let w=Object(s.e)();w=Object(r.b)(w,u,v),w=i?Object(r.bb)(w,u,t,y):Object(r.T)(w,u,t,y),w=Object(r.e)(w,Object(d.c)(g,"id")),w=Object(r.c)(w,Object(d.c)(f,"id")),w=Object(r.jb)(w,u,p),I&&(w=Object(r.v)(w,u,t,"firstMessageId",I));let C=Object(o.W)(w,u,t);const E=Object(o.bb)(w,u,t);if(i&&C&&E&&Object(d.b)(C,E)&&(w=Object(r.T)(w,u,t,E),C=Object(o.W)(w,u,t),w=Object(r.v)(w,u,t,"outlyingIds",void 0),i=!1),!b){const e=i?E:C,{newViewportIds:s}=k(e,a,c);w=Object(r.x)(w,u,t,s)}Object(s.g)(w)}function k(e,t,a){const{length:s}=e,c=t?function(e,t){return te[e.length-1]?e.length-1:e.findIndex((a,s)=>a===t||at)}(e,t):-1,r=a===l.e.Backwards?c:c+1||s,o=r-n.N,i=r+n.N-1,d=e.slice(Math.max(0,o),i+1);let b,u;switch(a){case l.e.Backwards:b=r>0,u=o>=0;break;case l.e.Forwards:b=r0,u=d.length===n.N}return{newViewportIds:d,areSomeLocal:b,areAllLocal:u}}async function N(e){let t;const a=e.attachment?(e,n)=>{M.has(n)||(t=n,M.set(n,a));const c=Object(s.e)();Object(s.g)({...c,fileUploads:{byMessageLocalId:{...c.fileUploads.byMessageLocalId,[n]:{progress:e}}}})}:void 0;e.replyingTo&&await Object(g.f)();const n=Object(s.e)(),c=Object(o.x)(n);if(!c)return;const{threadId:r}=c;e.replyingTo||r===i.MAIN_THREAD_ID||(e.replyingTo=Object(o.zb)(n,e.chat.id,r)),await Object(j.a)("sendMessage",e,a),a&&t&&M.delete(t)}Object(s.b)("loadViewportMessages",(e,t,a)=>{const{direction:s=l.e.Around,isBudgetPreload:c=!1}=a||{};let{chatId:i,threadId:d}=a||{};if(!i){const t=Object(o.x)(e);if(!t)return;i=t.chatId,d=t.threadId}const b=Object(o.f)(e,i);if(!b||b.isRestricted)return;const u=Object(o.Cb)(e,i,d),m=Object(o.W)(e,i,d),h=Object(o.bb)(e,i,d);if(u&&u.length&&s!==l.e.Around){const a=s===l.e.Backwards?u[0]:u[u.length-1],n=Boolean(h),o=n?h:m,{newViewportIds:O,areSomeLocal:j,areAllLocal:g}=k(o,a,s);if(j&&(e=Object(r.x)(e,i,d,O)),async function(e,t,a,s,n,c,r,o){t||await S(n,c,o,r,a,s);s||(await Promise.resolve(),e.loadViewportMessages({chatId:n.id,threadId:c,direction:r,isBudgetPreload:!0}))}(t,g,n,c,b,d,s,a),c)return}else{const t=Object(o.G)(e,i)||Object(o.gb)(e,i,d),a=Boolean(t&&m&&!m.includes(t)),s=(a?h:m)||[],{newViewportIds:u,areSomeLocal:O,areAllLocal:j}=k(s,t,l.e.Around);O&&u.length>=n.N&&(e=Object(r.x)(e,i,d,u)),j||S(b,d,t,l.e.Around,a,c)}return e}),Object(s.b)("loadMessage",(e,t,a)=>{const{chatId:n,messageId:c,replyOriginForId:l}=a,b=Object(o.f)(e,n);b&&async function(e,t,a){const n=await Object(j.a)("fetchMessage",{chat:e,messageId:t});if(!n)return;if(n===i.MESSAGE_DELETED){if(a){let t=Object(s.e)();const n=Object(o.k)(t,e.id,a);t=Object(r.J)(t,e.id,a,{...n,replyToMessageId:void 0}),Object(s.g)(t)}return}let c=Object(s.e)();c=Object(r.J)(c,e.id,t,n.message),c=Object(r.e)(c,Object(d.c)(n.users,"id")),Object(s.g)(c)}(b,c,l)}),Object(s.b)("sendMessage",(e,t,a)=>{const s=Object(o.x)(e);if(!s)return;const{chatId:c,threadId:r,type:i}=s;if("scheduled"===i&&!a.scheduledAt)return{...e,messages:{...e.messages,contentToBeScheduled:a}};const l=Object(o.f)(e,c);t.setReplyingToId({messageId:void 0});const b={...a,chat:l,replyingTo:Object(o.hb)(e,c,r)},u=!a.attachments||a.attachments.length<=1,m=!u&&a.attachments&&a.attachments.length>1;if(u){const{attachments:e,...t}=b;N({...t,attachment:e?e[0]:void 0})}else if(m){const{text:e,entities:t,attachments:a,...s}=b,c=Object(d.n)(a,n.F);for(let a=0;a0?o:void 0}),r.forEach(e=>{N({...s,attachment:e,groupedId:o})})}}else{const{text:e,entities:t,attachments:a,replyingTo:s,...n}=b;e&&N({...n,text:e,entities:t,replyingTo:s}),a.forEach(e=>{N({...n,attachment:e})})}}),Object(s.b)("editMessage",(e,t,a)=>{const{text:s,entities:n}=a,c=Object(o.x)(e);if(!c)return;const{chatId:r,threadId:i,type:l}=c,d=Object(o.f)(e,r),b=Object(o.C)(e,r,i,l);d&&b&&(Object(j.a)("editMessage",{chat:d,message:b,text:s,entities:n}),t.setEditingId({messageId:void 0}))}),Object(s.b)("cancelSendingMessage",(e,t,a)=>{const{chatId:s,messageId:n}=a,c=Object(o.k)(e,s,n),r=c&&M.get(c.previousLocalId||c.id);r&&Object(j.b)(r),t.apiUpdate({"@type":"deleteMessages",ids:[n],chatId:s})}),Object(s.b)("saveDraft",(e,t,a)=>{const{chatId:s,threadId:n,draft:c}=a;if(!c)return;const{text:l,entities:d}=c,b=Object(o.f)(e,s);return n===i.MAIN_THREAD_ID&&Object(j.a)("saveDraft",{chat:b,text:l,entities:d,replyToMsgId:Object(o.hb)(e,s,n)}),Object(r.v)(e,s,n,"draft",c)}),Object(s.b)("clearDraft",(e,t,a)=>{const{chatId:s,threadId:n,localOnly:c}=a;if(!Object(o.A)(e,s,n))return;const l=Object(o.f)(e,s);return c||n!==i.MAIN_THREAD_ID||Object(j.a)("clearDraft",l),Object(r.v)(e,s,n,"draft",void 0)}),Object(s.b)("pinMessage",(e,t,a)=>{const s=Object(o.q)(e);if(!s)return;const{messageId:n,isUnpin:c,isOneSide:r,isSilent:i}=a;Object(j.a)("pinMessage",{chat:s,messageId:n,isUnpin:c,isOneSide:r,isSilent:i})}),Object(s.b)("unpinAllMessages",(e,t,a)=>{const n=Object(o.f)(e,a.chatId);n&&async function(e){await Object(j.a)("unpinAllMessages",{chat:e});let t=Object(s.e)();t=Object(r.v)(t,e.id,i.MAIN_THREAD_ID,"pinnedIds",[]),Object(s.g)(t)}(n)}),Object(s.b)("deleteMessages",(e,t,a)=>{const{messageIds:s,shouldDeleteForAll:n}=a,c=Object(o.x)(e);if(!c)return;const{chatId:r,threadId:i}=c,l=Object(o.f)(e,r);Object(j.a)("deleteMessages",{chat:l,messageIds:s,shouldDeleteForAll:n});const d=Object(o.B)(e,r,i);s.includes(d)&&t.setEditingId({messageId:void 0})}),Object(s.b)("deleteScheduledMessages",(e,t,a)=>{const{messageIds:s}=a,n=Object(o.x)(e);if(!n)return;const{chatId:c}=n,r=Object(o.f)(e,c);Object(j.a)("deleteScheduledMessages",{chat:r,messageIds:s});const i=Object(o.D)(e,c);s.includes(i)&&t.setEditingId({messageId:void 0})}),Object(s.b)("deleteHistory",(e,t,a)=>{const{chatId:s,maxId:n,shouldDeleteForAll:c}=a,r=Object(o.f)(e,s);r&&Object(j.a)("deleteHistory",{chat:r,shouldDeleteForAll:c,maxId:n})}),Object(s.b)("markMessageListRead",(e,t,a)=>{const s=Object(o.x)(e);if(!s)return;const{chatId:n,threadId:c}=s,r=Object(o.yb)(e,n,c);if(!r)return;const{maxId:i}=a;Object(j.a)("markMessageListRead",{chat:r,threadId:c,maxId:i})}),Object(s.b)("markMessagesRead",(e,t,a)=>{const s=Object(o.q)(e);if(!s)return;const{messageIds:n}=a;Object(j.a)("markMessagesRead",{chat:s,messageIds:n})}),Object(s.b)("loadWebPagePreview",(e,t,a)=>{const{text:n}=a;!async function(e){const t=await Object(j.a)("fetchWebPagePreview",{message:e});Object(s.g)({...Object(s.e)(),webPagePreview:t})}(n)}),Object(s.b)("clearWebPagePreview",e=>{if(e.webPagePreview)return{...e,webPagePreview:void 0}}),Object(s.b)("sendPollVote",(e,t,a)=>{const{chatId:s,messageId:n,options:c}=a,r=Object(o.f)(e,s);r&&Object(j.a)("sendPollVote",{chat:r,messageId:n,options:c})}),Object(s.b)("loadPollOptionResults",(e,t,a)=>{const{chat:n,messageId:c,option:o,offset:i,limit:l,shouldResetVoters:b}=a;!async function(e,t,a,n,c,o){const i=await Object(j.a)("loadPollOptionResults",{chat:e,messageId:t,option:a,offset:n,limit:c});if(!i)return;let l=Object(s.e)();l=Object(r.e)(l,Object(d.c)(i.users,"id"));const{voters:b}=l.pollResults;Object(s.g)({...l,pollResults:{...l.pollResults,voters:{...b,[a]:[...!o&&b&&b[a]?b[a]:[],...i&&i.users.map(e=>e.id)].filter((e,t,a)=>a.indexOf(e)===t)},offsets:{...l.pollResults.offsets?l.pollResults.offsets:{},[a]:i.nextOffset||""}}})}(n,c,o,i,l,b)}),Object(s.b)("forwardMessages",e=>{const{fromChatId:t,messageIds:a,toChatId:n}=e.forwardMessages,c=t?Object(o.f)(e,t):void 0,r=n?Object(o.f)(e,n):void 0,i=t&&a?a.sort((e,t)=>e-t).map(a=>Object(o.k)(e,t,a)).filter(Boolean):void 0;c&&r&&i&&i.length&&function(e,t,a){Object(j.a)("forwardMessages",{fromChat:e,toChat:t,messages:a}),Object(s.g)({...Object(s.e)(),forwardMessages:{}})}(c,r,i)}),Object(s.b)("loadScheduledHistory",e=>{const t=Object(o.q)(e);if(!t)return;const{hash:a}=e.scheduledMessages.byChatId[t.id]||{};!async function(e,t){const a=await Object(j.a)("fetchScheduledHistory",{chat:e,hash:t});if(!a)return;const{hash:n,messages:c}=a,o=Object(d.c)(c,"id"),l=Object.keys(o).map(Number).sort((e,t)=>t-e);let b=Object(s.e)();b=Object(r.t)(b,e.id,o,n),b=Object(r.v)(b,e.id,i.MAIN_THREAD_ID,"scheduledIds",l),Object(s.g)(b)}(t,a)}),Object(s.b)("sendScheduledMessages",(e,t,a)=>{const{chatId:s,id:n}=a,c=Object(o.f)(e,s);c&&Object(j.a)("sendScheduledMessages",{chat:c,ids:[n]})}),Object(s.b)("rescheduleMessage",(e,t,a)=>{const{chatId:s,messageId:n,scheduledAt:c}=a,r=Object(o.f)(e,s),i=r&&Object(o.kb)(e,r.id,n);r&&i&&Object(j.a)("rescheduleMessage",{chat:r,message:i,scheduledAt:c})}),Object(s.b)("requestThreadInfoUpdate",(e,t,a)=>{const{chatId:s,threadId:n}=a,c=Object(o.yb)(e,s,n);c&&Object(j.a)("requestThreadInfoUpdate",{chat:c,threadId:n})}),Object(s.b)("loadPinnedMessages",(e,t,a)=>{const{chatId:n}=a,c=Object(o.f)(e,n);c&&async function(e){const t=await Object(j.a)("fetchPinnedMessages",{chat:e});if(!t)return;const{messages:a,chats:n,users:c}=t,o=Object(d.c)(a,"id"),l=Object.keys(o).map(Number).sort((e,t)=>t-e);let b=Object(s.e)();b=Object(r.b)(b,e.id,o),b=Object(r.v)(b,e.id,i.MAIN_THREAD_ID,"pinnedIds",l),b=Object(r.e)(b,Object(d.c)(c,"id")),b=Object(r.c)(b,Object(d.c)(n,"id")),Object(s.g)(b)}(c)}),Object(s.b)("loadMessageLink",(e,t,a)=>{const{messageId:s,chatId:n}=a,c=Object(o.f)(e,n),r=Object(o.k)(e,n,s);c&&r&&(async()=>{const e=await Object(j.a)("fetchMessageLink",{chat:c,message:r});e&&Object(E.c)(e.link)})()});var P=a(46);const T=Object(g.g)(e=>e(),500,!1);async function A(e,t){const a=await Object(j.a)("searchGifs",{query:e,offset:t});a&&Object(s.g)(Object(r.O)(Object(s.e)(),!t,a.gifs,a.nextOffset))}Object(s.b)("loadStickerSets",e=>{const{hash:t}=e.stickers.added||{};!async function(e=0){const t=await Object(j.a)("fetchStickerSets",{hash:e});if(!t)return;Object(s.g)(Object(r.gb)(Object(s.e)(),"added",t.hash,t.sets))}(t)}),Object(s.b)("loadAddedStickers",(e,t)=>{const{setIds:a}=e.stickers.added;a&&a.length&&(async()=>{for(let e=0;e0&&await Object(g.e)(500)})()}),Object(s.b)("loadRecentStickers",e=>{const{hash:t}=e.stickers.recent||{};!async function(e=0){const t=await Object(j.a)("fetchRecentStickers",{hash:e});if(!t)return;const a=Object(s.e)();Object(s.g)({...a,stickers:{...a.stickers,recent:t}})}(t)}),Object(s.b)("loadFavoriteStickers",e=>{const{hash:t}=e.stickers.favorite||{};!async function(e=0){const t=await Object(j.a)("fetchFavoriteStickers",{hash:e});if(!t)return;const a=Object(s.e)();Object(s.g)({...a,stickers:{...a.stickers,favorite:t}})}(t)}),Object(s.b)("loadFeaturedStickers",e=>{const{hash:t}=e.stickers.featured||{};!async function(e=0){const t=await Object(j.a)("fetchFeaturedStickers",{hash:e});if(!t)return;Object(s.g)(Object(r.gb)(Object(s.e)(),"featured",t.hash,t.sets))}(t)}),Object(s.b)("loadStickers",(e,t,a)=>{const{stickerSetId:n}=a;let{stickerSetAccessHash:c}=a;if(!c){const t=Object(o.sb)(e,n);if(!t)return;c=t.accessHash}!async function(e,t){const a=await Object(j.a)("fetchStickers",{stickerSetId:e,accessHash:t});if(!a)return;const{set:n,stickers:c,packs:o}=a;let i=Object(s.e)();i=Object(r.fb)(i,n.id,{...n,stickers:c,packs:o});const l=i.stickers.forEmoji.emoji;l&&o[l]&&(i=Object(r.n)(i));Object(s.g)(i)}(n,c)}),Object(s.b)("loadAnimatedEmojis",()=>{!async function(){const e=await Object(j.a)("fetchAnimatedEmojis");if(!e)return;const{set:t,stickers:a}=e;Object(s.g)(Object(r.p)(Object(s.e)(),{...t,stickers:a}))}()}),Object(s.b)("loadSavedGifs",e=>{const{hash:t}=e.gifs.saved;!async function(e=0){const t=await Object(j.a)("fetchSavedGifs",{hash:e});if(!t)return;const a=Object(s.e)();Object(s.g)({...a,gifs:{...a.gifs,saved:t}})}(t)}),Object(s.b)("faveSticker",(e,t,a)=>{const{sticker:s}=a;s&&Object(j.a)("faveSticker",{sticker:s})}),Object(s.b)("unfaveSticker",(e,t,a)=>{const{sticker:n}=a;n&&function(e){const t=Object(s.e)();Object(s.g)({...t,stickers:{...t.stickers,favorite:{...t.stickers.favorite,stickers:t.stickers.favorite.stickers.filter(({id:t})=>t!==e.id)}}}),Object(j.a)("faveSticker",{sticker:e,unfave:!0})}(n)}),Object(s.b)("toggleStickerSet",(e,t,a)=>{const{stickerSetId:s}=a,n=Object(o.sb)(e,s);if(!n)return;const{accessHash:c,installedDate:r}=n;Object(j.a)(r?"uninstallStickerSet":"installStickerSet",{stickerSetId:s,accessHash:c})}),Object(s.b)("setStickerSearchQuery",(e,t,a)=>{const{query:n}=a;n&&T(()=>{!async function(e,t=0){const a=await Object(j.a)("searchStickers",{query:e,hash:t});if(!a)return;const n=Object(s.e)(),{setsById:c,added:o}=n.stickers,i=a.sets.map(({id:e})=>e);o.setIds&&o.setIds.forEach(t=>{if(!i.includes(t)){const{title:a}=c[t]||{};a&&Object(P.a)(a,e)&&i.unshift(t)}});Object(s.g)(Object(r.gb)(n,"search",a.hash,a.sets,i))}(n)})}),Object(s.b)("setGifSearchQuery",(e,t,a)=>{const{query:s}=a;"string"==typeof s&&T(()=>{A(s)})}),Object(s.b)("searchMoreGifs",e=>{const{query:t,offset:a}=e.gifs.search;"string"==typeof t&&T(()=>{A(t,a)})}),Object(s.b)("loadStickersForEmoji",(e,t,a)=>{const{emoji:n}=a,{hash:c}=e.stickers.forEmoji;T(()=>{!async function(e,t=0){let a=Object(s.e)();Object(s.g)({...a,stickers:{...a.stickers,forEmoji:{...a.stickers.forEmoji,emoji:e}}});const n=await Object(j.a)("fetchStickersForEmoji",{emoji:e,hash:t});if(a=Object(s.e)(),!n||a.stickers.forEmoji.emoji!==e)return;a=Object(r.hb)(a,e,n.stickers,n.hash),Object(s.g)(a)}(n,c)})}),Object(s.b)("clearStickersForEmoji",e=>({...e,stickers:{...e.stickers,forEmoji:{}}}));var x=a(28);const R=Object(g.g)(e=>e(),500,!1);async function L(e="",t,a,c,i,l){let b;if(c){const s=await Object(j.a)("searchMessagesLocal",{chatOrUser:c,query:e,type:t,limit:n.u,offsetId:a,minDate:l,maxDate:i});if(s){const{messages:e,users:t,totalCount:a,nextOffsetId:n}=s;b={messages:e,users:t,chats:[],totalCount:a,nextRate:n}}}else b=await Object(j.a)("searchMessagesGlobal",{query:e,offsetRate:a,limit:n.u,type:t,maxDate:i,minDate:l});let u=Object(s.e)();const m=Object(o.s)(u);if(!b||""!==e&&e!==m)return void Object(s.g)(Object(r.R)(u,{messages:!1}));const{messages:h,users:O,chats:g,totalCount:f,nextRate:p}=b;g.length&&(u=Object(r.c)(u,Object(d.c)(g,"id"))),O.length&&(u=Object(r.e)(u,Object(d.c)(O,"id"))),h.length&&(u=Object(r.d)(u,h)),u=Object(r.S)(u,h,f,t,p),Object(s.g)(u)}async function F(){const e=await Object(j.a)("fetchChats",{limit:n.i,archived:!0,withPinned:!0});if(!e)return;let t=Object(s.e)();t=Object(r.mb)(t,Object(d.c)(e.users,"id")),t=Object(r.K)(t,Object(d.c)(e.chats,"id")),t=Object(r.q)(t,"archived",e.chatIds),t=Object(r.H)(t,"archived",e),Object(s.g)(t)}async function B(){let e=Object(s.e)();const{recentlyFoundChatIds:t}=e.globalSearch,{userIds:a}=e.contactList||{};if(!(a&&a.length||t&&t.length))return;const n=[...t||[],...a||[]].map(t=>Object(o.Bb)(e,t)).filter(Boolean),c=await Object(j.a)("fetchUsers",{users:n});c&&(e=Object(s.e)(),e=Object(r.mb)(e,Object(d.c)(c,"id")),Object(s.g)(e))}Object(s.b)("setGlobalSearchQuery",(e,t,a)=>{const{chatId:c}=e.globalSearch,{query:i}=a;i&&!c&&R(()=>{!async function(e){const t=await Object(j.a)("searchChats",{query:e,limit:n.u});let a=Object(s.e)();const c=Object(o.s)(a);if(!t||!c||e!==c)return void Object(s.g)(Object(r.R)(a,{chats:!1}));const{localChats:i,localUsers:l,globalChats:b,globalUsers:u}=t;(i.length||b.length)&&(a=Object(r.c)(a,Object(d.c)([...i,...b],"id")));(l.length||u.length)&&(a=Object(r.e)(a,Object(d.c)([...l,...u],"id")));a=Object(r.R)(a,{chats:!1}),a=Object(r.P)(a,{localResults:{chats:i,users:l},globalResults:{...a.globalSearch.globalResults,chats:b,users:u}}),Object(s.g)(a)}(i)})}),Object(s.b)("setGlobalSearchDate",(e,t,a)=>{const{date:n}=a,c=n?Object(x.m)(n):n,i=Object(r.P)(e,{date:n,query:"",resultsByType:{...e.globalSearch.resultsByType,text:{totalCount:void 0,foundIds:[],nextOffsetId:0}}});Object(s.g)(i);const{chatId:l}=e.globalSearch;L("","text",void 0,l?Object(o.f)(e,l):void 0,c,n)}),Object(s.b)("searchMessagesGlobal",(e,t,a)=>{const{query:s,resultsByType:n,chatId:c,date:r}=e.globalSearch,i=r?Object(x.m)(r):r,{type:l}=a,{nextOffsetId:d}=n&&n[l]||{};L(s,l,d,c?Object(o.f)(e,c):void 0,i,r)}),Object(s.b)("searchTextMessagesLocal",e=>{const{chatId:t,threadId:a}=Object(o.x)(e)||{},c=t?Object(o.f)(e,t):void 0,l=Object(o.z)(e);if(!c||!l||!a)return;const{query:b,results:u}=l,m=u?u.nextOffsetId:void 0;let h;if(a!==i.MAIN_THREAD_ID){const s=Object(o.xb)(e,t,a);h=s?s.topMessageId:void 0}!async function(e,t,a,c,i){const l=await Object(j.a)("searchMessagesLocal",{chatOrUser:e,type:"text",query:c,topMessageId:a,limit:n.P,offsetId:i});if(!l)return;const{messages:b,users:u,totalCount:m,nextOffsetId:h}=l,O=Object(d.c)(b,"id"),g=Object.keys(O).map(Number);let f=Object(s.e)();const p=Object(o.z)(f);if(!p||c&&c!==p.query)return;f=Object(r.b)(f,e.id,O),f=Object(r.e)(f,Object(d.c)(u,"id")),f=Object(r.X)(f,e.id,t,g,m,h),Object(s.g)(f)}(c,a,h,b,m)}),Object(s.b)("searchMediaMessagesLocal",e=>{const t=Object(o.v)(e),a=t?e.users.byId[t]||e.chats.byId[t]:void 0,c=Object(o.u)(e);if(!a||!c)return;const{currentType:i,resultsByType:l}=c,b=i&&l&&l[i],u=b?b.nextOffsetId:void 0;i&&async function(e,t,a){const c=await Object(j.a)("searchMessagesLocal",{chatOrUser:e,type:t,limit:n.cb,offsetId:a});if(!c)return;const{messages:i,users:l,totalCount:b,nextOffsetId:u}=c,m=Object(d.c)(i,"id"),h=Object.keys(m).map(Number);let O=Object(s.e)();if(!Object(o.u)(O))return;O=Object(r.b)(O,e.id,m),O=Object(r.e)(O,Object(d.c)(l,"id")),O=Object(r.U)(O,e.id,t,h,b,u),Object(s.g)(O)}(a,i,u)}),Object(s.b)("searchMessagesByDate",(e,t,a)=>{const{timestamp:n}=a,{chatId:c}=Object(o.x)(e)||{};if(!c)return;const r=Object(o.f)(e,c);r&&async function(e,t){const a=await Object(j.a)("findFirstMessageIdAfterDate",{chat:e,timestamp:t});if(!a)return;Object(s.d)().focusMessage({chatId:e.id,messageId:a})}(r,n)}),Object(s.b)("checkPublicLink",(e,t,a)=>{const{chatId:n}=Object(o.x)(e)||{};if(!n)return;if(e.management.progress===l.f.InProgress)return;const{username:c}=a;(async()=>{e=Object(r.Z)(e,l.f.InProgress),e=Object(r.Y)(e,n,{isUsernameAvailable:void 0}),Object(s.g)(e);const t=await Object(j.a)("checkChatUsername",{username:c});e=Object(s.e)(),e=Object(r.Z)(e,t?l.f.Complete:l.f.Error),e=Object(r.Y)(e,n,{isUsernameAvailable:t}),Object(s.g)(e)})()}),Object(s.b)("updatePublicLink",(e,t,a)=>{const{chatId:n}=Object(o.x)(e)||{};let c=n&&Object(o.f)(e,n);if(!n||!c)return;const{username:i}=a;(async()=>{if(e=Object(r.Z)(e,l.f.InProgress),Object(s.g)(e),Object(m.ib)(c)){if(c=await Object(j.a)("migrateChat",c),!c)return;t.openChat({id:c.id})}const a=await Object(j.a)("setChatUsername",{chat:c,username:i});e=Object(s.e)(),e=Object(r.Z)(e,a?l.f.Complete:l.f.Error),e=Object(r.Y)(e,n,{isUsernameAvailable:void 0}),Object(s.g)(e)})()}),Object(s.b)("updatePrivateLink",e=>{const{chatId:t}=Object(o.x)(e)||{},a=t&&Object(o.f)(e,t);t&&a&&Object(j.a)("updatePrivateLink",{chat:a})}),Object(s.b)("sync",(e,t)=>{!async function(e){n.m&&console.log(">>> START SYNC");await Object(j.a)("fetchCurrentUser");const t=await async function(){const e=await Object(j.a)("fetchChats",{limit:n.i,withPinned:!0});if(!e)return;let t=Object(s.e)();const{recentlyFoundChatIds:a}=t.globalSearch,{userIds:c}=t.contactList||{},{currentUserId:l}=t,b=[...a||[],...c||[],...l?[l]:[]],u=b.map(e=>Object(o.Bb)(t,e)).filter(Boolean),h=b.map(e=>Object(o.f)(t,e)).filter(Boolean),{chatId:O}=Object(o.x)(t)||{};if(O){const e=Object(o.f)(t,O);if(e&&!b.includes(O)&&h.push(e),Object(m.lb)(O)){const e=Object(o.Bb)(t,O);e&&!b.includes(O)&&u.push(e)}}u.push(...e.users),h.push(...e.chats),t=Object(r.r)(t,Object(d.c)(h,"id")),t=Object(r.q)(t,"active",e.chatIds),t={...t,chats:{...t.chats}},t=Object(r.H)(t,"active",e),Object.keys(e.draftsById).map(Number).forEach(a=>{t=Object(r.v)(t,a,i.MAIN_THREAD_ID,"draft",e.draftsById[a])}),Object.keys(e.replyingToById).map(Number).forEach(a=>{t=Object(r.v)(t,a,i.MAIN_THREAD_ID,"replyingToId",e.replyingToById[a])}),Object(s.g)(t),O&&!t.chats.byId[O]&&Object(s.d)().openChat({id:void 0});return u}();await async function(e){let t=!1,a=e||[],c=Object(s.e)();const{chatId:l}=Object(o.x)(c)||{},b=Object.keys(c.messages.byChatId).map(Number).reduce((e,t)=>{const a=Object(o.A)(c,t,i.MAIN_THREAD_ID);return a?{...e,[t]:a}:e},{});if(l){const e=await(u=c.chats.byId[l],Object(j.a)("fetchMessages",{chat:u,threadId:i.MAIN_THREAD_ID,offsetId:u.lastReadInboxMessageId,addOffset:-(Math.round(n.N/2)+1),limit:n.N}));c=Object(s.e)();const{chatId:b}=Object(o.x)(c)||{};if(e&&b===l){const s=c.messages.byChatId[l],n=Object(d.c)(e.messages,"id"),o=Object.keys(n).map(Number);c={...c,messages:{...c.messages,byChatId:{[l]:{byId:n,threadsById:{[i.MAIN_THREAD_ID]:{...s&&s.threadsById[i.MAIN_THREAD_ID],listedIds:o,viewportIds:o,outlyingIds:void 0}}}}}},c=Object(r.K)(c,Object(d.c)(e.chats,"id")),c=Object(r.jb)(c,l,e.threadInfos),t=!0,a=Array.prototype.concat(a,e.users)}}var u;t||(c={...c,messages:{...c.messages,byChatId:{}}});Object.keys(b).map(Number).forEach(e=>{c=Object(r.v)(c,e,i.MAIN_THREAD_ID,"draft",b[e])}),e?c=Object(r.w)(c,Object(d.c)(a,"id")):a&&(c=Object(r.mb)(c,Object(d.c)(a,"id")));Object(s.g)(c)}(t),Object(s.g)({...Object(s.e)(),lastSyncTime:Date.now()}),n.m&&console.log(">>> FINISH SYNC");e()}(t.afterSync)}),Object(s.b)("afterSync",(e,t)=>{!async function(e){n.m&&console.log(">>> START AFTER-SYNC");e.loadFavoriteStickers(),await Promise.all([B(),F()]),await Object(j.a)("fetchCurrentUser"),n.m&&console.log(">>> FINISH AFTER-SYNC")}(t)});const D=Object(g.a)(e=>e(),500,!1,!0);function U(e,{visibility:t,allowedIds:a,deniedIds:s}){const{users:{byId:n},chats:{byId:c}}=e,r={visibility:t};let o,i;const l=e=>{if(!Object(m.lb)(e))return;const{id:t,accessHash:a}=n[e]||{};return t?{id:t,accessHash:a}:void 0},d=e=>{if(Object(m.lb)(e))return;const t=c[e];return t?{id:t.id}:void 0};return"contacts"!==t&&"nobody"!==t||(o=a.map(l).filter(Boolean),i=a.map(d).filter(Boolean),o.length>0&&(r.allowedUsers=o),i.length>0&&(r.allowedChats=i)),"everybody"!==t&&"contacts"!==t||(o=s.map(l).filter(Boolean),i=s.map(d).filter(Boolean),o.length>0&&(r.blockedUsers=o),i.length>0&&(r.blockedChats=i)),r}Object(s.b)("loadFullUser",(e,t,a)=>{const{userId:s}=a,n=Object(o.Bb)(e,s);if(!n)return;const{id:c,accessHash:r}=n;D(()=>Object(j.a)("fetchFullUser",{id:c,accessHash:r}))}),Object(s.b)("loadUser",(e,t,a)=>{const{userId:n}=a,c=Object(o.Bb)(e,n);c&&(async()=>{const t=await Object(j.a)("fetchUsers",{users:[c]});t&&(e=Object(s.e)(),e=Object(r.mb)(e,Object(d.c)(t,"id")),Object(s.g)(e))})()}),Object(s.b)("loadTopUsers",e=>{const{hash:t,lastRequestedAt:a}=e.topPeers;(!a||Date.now()-a>6e4)&&async function(e){const t=await Object(j.a)("fetchTopUsers",{hash:e});if(!t)return;const{hash:a,ids:n,users:c}=t;let o=Object(s.e)();o=Object(r.e)(o,Object(d.c)(c,"id")),o={...o,topPeers:{...o.topPeers,hash:a,userIds:n,lastRequestedAt:Date.now()}},Object(s.g)(o)}(t)}),Object(s.b)("loadContactList",e=>{const{hash:t}=e.contactList||{};!async function(e){const t=await Object(j.a)("fetchContactList",{hash:e});if(!t)return;let a=Object(r.e)(Object(s.e)(),Object(d.c)(t.users,"id"));a=Object(r.c)(a,Object(d.c)(t.chats,"id"));const n=e=>e.lastName||e.firstName||"",c=new Intl.Collator("en-US"),o=t.users.sort((e,t)=>c.compare(n(e),n(t))).filter(e=>!e.isSelf);Object(s.g)({...a,contactList:{hash:t.hash,userIds:o.map(e=>e.id)}})}(t)}),Object(s.b)("loadCurrentUser",()=>{Object(j.a)("fetchCurrentUser")}),Object(s.b)("updateContact",(e,t,a)=>{const{userId:n,isMuted:c,firstName:i,lastName:d}=a;!async function(e,t,a,n){const c=Object(s.e)(),i=Object(o.Bb)(c,e);if(!i)return;Object(s.d)().updateChatMutedState({chatId:e,isMuted:t}),Object(s.g)(Object(r.Z)(Object(s.e)(),l.f.InProgress));await Object(j.a)("updateContact",{phone:i.phoneNumber,firstName:a,lastName:n})&&Object(s.g)(Object(r.lb)(Object(s.e)(),i.id,{firstName:a,lastName:n}));Object(s.g)(Object(r.Z)(Object(s.e)(),l.f.Complete))}(n,c,i,d)}),Object(s.b)("deleteUser",(e,t,a)=>{const{userId:n}=a;!async function(e){const t=Object(s.e)(),a=Object(o.Bb)(t,e);if(!a)return;const{id:n,accessHash:c}=a;await Object(j.a)("deleteUser",{id:n,accessHash:c})}(n)}),Object(s.b)("clickInlineButton",(e,t,a)=>{const{button:c}=a;switch(c.type){case"command":t.sendBotCommand({command:c.value});break;case"url":c.value.match(n.X)?t.openTelegramLink({url:c.value}):window.open(c.value);break;case"callback":{const t=Object(o.q)(e);if(!t)return;!async function(e,t,a){const n=await Object(j.a)("answerCallbackButton",{chatId:e.id,accessHash:e.accessHash,messageId:t,data:a});if(!n||!n.message)return;const{message:c,alert:r}=n;r?Object(s.d)().showError({error:{message:c}}):Object(s.d)().showNotification({message:c})}(t,c.messageId,c.value);break}case"requestPoll":t.openPollModal();break;case"buy":{const a=Object(o.q)(e),{messageId:s,value:n}=c;if(!a)return;n?t.getReceipt({receiptMessageId:n,chatId:a.id,messageId:s}):(t.getPaymentForm({messageId:s}),t.setInvoiceMessageInfo(Object(o.k)(e,a.id,s)),t.openPaymentModal({messageId:s}));break}}}),Object(s.b)("sendBotCommand",(e,t,a)=>{const{command:s}=a,{currentUserId:n}=e,c=Object(o.q)(e);n&&c&&async function(e,t,a){await Object(j.a)("sendMessage",{chat:e,text:a})}(c,0,s)}),Object(s.b)("updateProfile",(e,t,a)=>{const{photo:n,firstName:c,lastName:i,bio:d,username:b}=a;(async()=>{const{currentUserId:t}=e;if(t){if(Object(s.g)({...Object(s.e)(),profileEdit:{progress:l.j.InProgress}}),n&&await Object(j.a)("updateProfilePhoto",n),c||i||d){if(await Object(j.a)("updateProfile",{firstName:c,lastName:i,about:d})){e=Object(s.e)();const a=t&&Object(o.Bb)(e,t);a&&Object(s.g)(Object(r.lb)(e,a.id,{firstName:c,lastName:i,fullInfo:{...a.fullInfo,bio:d}}))}}if(b){await Object(j.a)("updateUsername",b)&&t&&Object(s.g)(Object(r.lb)(Object(s.e)(),t,{username:b}))}Object(s.g)({...Object(s.e)(),profileEdit:{progress:l.j.Complete}})}})()}),Object(s.b)("checkUsername",(e,t,a)=>{const{username:n}=a;(async()=>{if(e.profileEdit&&e.profileEdit.progress===l.j.InProgress)return;Object(s.g)({...e,profileEdit:{progress:e.profileEdit?e.profileEdit.progress:l.j.Idle,isUsernameAvailable:void 0}});const t=await Object(j.a)("checkUsername",n);e=Object(s.e)(),Object(s.g)({...e,profileEdit:{...e.profileEdit,isUsernameAvailable:t}})})()}),Object(s.b)("loadWallpapers",()=>{(async()=>{const e=await Object(j.a)("fetchWallpapers",0);if(!e)return;const t=Object(s.e)();Object(s.g)({...t,settings:{...t.settings,loadedWallpapers:e.wallpapers}})})()}),Object(s.b)("uploadWallpaper",(e,t,a)=>{const n=a,c=URL.createObjectURL(n);Object(s.g)({...e,settings:{...e.settings,loadedWallpapers:[{slug:l.n,document:{fileName:"",size:n.size,mimeType:n.type,previewBlobUrl:c}},...e.settings.loadedWallpapers||[]]}}),(async()=>{const t=await Object(j.a)("uploadWallpaper",n);if(!t)return;const{wallpaper:a}=t;if(!(e=Object(s.e)()).settings.loadedWallpapers)return;const r=e.settings.loadedWallpapers[0];if(!r||r.slug!==l.n)return;const o={...a,document:{...a.document,previewBlobUrl:c}};Object(s.g)({...e,settings:{...e.settings,loadedWallpapers:[o,...e.settings.loadedWallpapers.slice(1)]}})})()}),Object(s.b)("loadBlockedContacts",()=>{(async()=>{const e=await Object(j.a)("fetchBlockedContacts");if(!e)return;let t=Object(s.e)();e.users&&e.users.length&&(t=Object(r.e)(t,Object(d.c)(e.users,"id"))),e.chats&&e.chats.length&&(t=Object(r.K)(t,Object(d.c)(e.chats,"id"))),t={...t,blocked:{...t.blocked,ids:[...t.blocked.ids||[],...e.blockedIds],totalCount:e.totalCount}},Object(s.g)(t)})()}),Object(s.b)("blockContact",(e,t,a)=>{const{contactId:n}=a;(async()=>{if(!await Object(j.a)("blockContact",n))return;const e=Object(s.e)();Object(s.g)(Object(r.a)(e,n))})()}),Object(s.b)("unblockContact",(e,t,a)=>{const{contactId:n}=a;let c;if(Object(m.lb)(n)){const t=Object(o.Bb)(e,n);if(!t)return;c=t.accessHash}(async()=>{if(!await Object(j.a)("unblockContact",n,c))return;const e=Object(s.e)();Object(s.g)(Object(r.o)(e,n))})()}),Object(s.b)("loadAuthorizations",()=>{(async()=>{const e=await Object(j.a)("fetchAuthorizations");e&&Object(s.g)({...Object(s.e)(),activeSessions:e})})()}),Object(s.b)("terminateAuthorization",(e,t,a)=>{const{hash:n}=a;(async()=>{if(!await Object(j.a)("terminateAuthorization",n))return;const e=Object(s.e)();Object(s.g)({...e,activeSessions:e.activeSessions.filter(e=>e.hash!==n)})})()}),Object(s.b)("terminateAllAuthorizations",()=>{(async()=>{if(!await Object(j.a)("terminateAllAuthorizations"))return;const e=Object(s.e)();Object(s.g)({...e,activeSessions:e.activeSessions.filter(e=>e.isCurrent)})})()}),Object(s.b)("loadNotificationsSettings",()=>{(async()=>{const e=await Object(j.a)("loadNotificationsSettings");e&&Object(s.g)(Object(r.u)(Object(s.e)(),e))})()}),Object(s.b)("updateNotificationSettings",(e,t,a)=>{const{peerType:n,isSilent:c,isShowPreviews:o}=a;(async()=>{await Object(j.a)("updateNotificationSettings",n,{isSilent:c,isShowPreviews:o})&&Object(s.g)(Object(r.ab)(Object(s.e)(),n,c,o))})()}),Object(s.b)("updateContactSignUpNotification",(e,t,a)=>{const{isSilent:n}=a;(async()=>{await Object(j.a)("updateContactSignUpNotification",n)&&Object(s.g)(Object(r.u)(Object(s.e)(),{hasContactJoinedNotifications:!n}))})()}),Object(s.b)("loadLanguages",()=>{(async()=>{const e=await Object(j.a)("fetchLanguages");e&&Object(s.g)(Object(r.u)(Object(s.e)(),{languages:e}))})()}),Object(s.b)("loadPrivacySettings",()=>{(async()=>{const[e,t,a,n,c]=await Promise.all([Object(j.a)("fetchPrivacySettings","phoneNumber"),Object(j.a)("fetchPrivacySettings","lastSeen"),Object(j.a)("fetchPrivacySettings","profilePhoto"),Object(j.a)("fetchPrivacySettings","forwards"),Object(j.a)("fetchPrivacySettings","chatInvite")]);if(!(e&&t&&a&&n&&c))return;const r=Object(s.e)();r.settings.privacy.phoneNumber=e,r.settings.privacy.lastSeen=t,r.settings.privacy.profilePhoto=a,r.settings.privacy.forwards=n,r.settings.privacy.chatInvite=c,Object(s.g)(r)})()}),Object(s.b)("setPrivacyVisibility",(e,t,a)=>{const{privacyKey:n,visibility:c}=a,{privacy:{[n]:r}}=e.settings;if(!r)return;const o=U(e,{visibility:c,allowedIds:[...r.allowUserIds,...r.allowChatIds],deniedIds:[...r.blockUserIds,...r.blockChatIds]});(async()=>{const e=await Object(j.a)("setPrivacySettings",n,o);if(e){const t=Object(s.e)();t.settings.privacy[n]=e,Object(s.g)(t)}})()}),Object(s.b)("setPrivacySettings",(e,t,a)=>{const{privacyKey:n,isAllowList:c,contactsIds:r}=a,{privacy:{[n]:o}}=e.settings;if(!o)return;const i=U(e,{visibility:o.visibility,allowedIds:c?r:[...o.allowUserIds,...o.allowChatIds],deniedIds:c?[...o.blockUserIds,...o.blockChatIds]:r});(async()=>{const e=await Object(j.a)("setPrivacySettings",n,i);if(e){const t=Object(s.e)();t.settings.privacy[n]=e,Object(s.g)(t)}})()}),Object(s.b)("loadPasswordInfo",()=>{(async()=>{const e=await Object(j.a)("getPasswordInfo");if(!e)return;let t=Object(s.e)();t=Object(r.u)(t,{hasPassword:e.hasPassword}),t=Object(r.kb)(t,{hint:e.hint}),Object(s.g)(t)})()}),Object(s.b)("checkPassword",(e,t,a)=>{const{currentPassword:n,onSuccess:c}=a;Object(s.g)(Object(r.kb)(e,{isLoading:!0,error:void 0})),(async()=>{const e=await Object(j.a)("checkPassword",n);Object(s.g)(Object(r.kb)(Object(s.e)(),{isLoading:!1})),e&&c()})()}),Object(s.b)("clearPassword",(e,t,a)=>{const{currentPassword:n,onSuccess:c}=a;Object(s.g)(Object(r.kb)(e,{isLoading:!0,error:void 0})),(async()=>{const e=await Object(j.a)("clearPassword",n);Object(s.g)(Object(r.kb)(Object(s.e)(),{isLoading:!1})),e&&c()})()}),Object(s.b)("updatePassword",(e,t,a)=>{const{currentPassword:n,password:c,hint:o,email:i,onSuccess:l}=a;Object(s.g)(Object(r.kb)(e,{isLoading:!0,error:void 0})),(async()=>{const e=await Object(j.a)("updatePassword",n,c,o,i);Object(s.g)(Object(r.kb)(Object(s.e)(),{isLoading:!1})),e&&l()})()}),Object(s.b)("updateRecoveryEmail",(e,t,a)=>{const{currentPassword:n,email:c,onSuccess:o}=a;Object(s.g)(Object(r.kb)(e,{isLoading:!0,error:void 0})),(async()=>{const e=await Object(j.a)("updateRecoveryEmail",n,c);Object(s.g)(Object(r.kb)(Object(s.e)(),{isLoading:!1,waitingEmailCodeLength:void 0})),e&&o()})()}),Object(s.b)("provideTwoFaEmailCode",(e,t,a)=>{const{code:s}=a;Object(j.a)("provideRecoveryEmailCode",s)}),Object(s.b)("clearTwoFaError",e=>Object(r.kb)(e,{error:void 0}));var H=a(54);Object(s.b)("validateRequestedInfo",(e,t,a)=>{const{requestInfo:n,saveInfo:c}=a,i=Object(o.cb)(e);i&&async function(e,t,a){const n=await Object(j.a)("validateRequestedInfo",{messageId:e,requestInfo:t,shouldSave:a});if(!n)return;const{id:c,shippingOptions:o}=n;if(!c)return;let i=Object(r.C)(Object(s.e)(),c);o?(i=Object(r.eb)(i,o),i=Object(r.A)(i,l.i.Shipping)):i=Object(r.A)(i,l.i.PaymentInfo);Object(s.g)(i)}(i,n,c)}),Object(s.b)("getPaymentForm",(e,t,a)=>{const{messageId:n}=a;n&&async function(e){const t=await Object(j.a)("getPaymentForm",{messageId:e});if(!t)return;let a=Object(r.z)(Object(s.e)(),t),n=l.i.PaymentInfo;a.payment.invoice&&(a.payment.invoice.shippingAddressRequested||a.payment.invoice.nameRequested||a.payment.invoice.phoneRequested||a.payment.invoice.emailRequested)&&(n=l.i.ShippingInfo);a=Object(r.A)(a,n),Object(s.g)(a)}(n)}),Object(s.b)("getReceipt",(e,t,a)=>{const{receiptMessageId:n,chatId:c,messageId:i}=a;i&&n&&c&&async function(e,t,a){const n=await Object(j.a)("getReceipt",t);if(!n)return;let c=Object(s.e)();const i=Object(o.k)(c,a,e);c=Object(r.B)(c,n,i),Object(s.g)(c)}(i,n,c)}),Object(s.b)("clearPaymentError",e=>{Object(s.g)({...e,payment:{...e.payment,error:void 0}})}),Object(s.b)("clearReceipt",e=>{Object(s.g)({...e,payment:{...e.payment,receipt:void 0}})}),Object(s.b)("sendCredentialsInfo",(e,t,a)=>{const n=Object(o.fb)(e);if(!n)return;const{credentials:c}=a,{data:i}=c;!async function(e,t){const a=function(e){const t=Object.keys(e).map(t=>`${t}=${e[t]}`).join("&");return t.length>0?"?"+t:""}({"card[number]":e.cardNumber,"card[exp_month]":e.expiryMonth,"card[exp_year]":e.expiryYear,"card[cvc]":e.cvv,"card[address_zip]":e.zip,"card[address_country]":e.country}),n=await fetch("https://api.stripe.com/v1/tokens"+a,{method:"POST",credentials:"same-origin",headers:{"Content-Type":"application/x-www-form-urlencoded",Authorization:"Bearer "+t}}),c=await n.json();if(c.error){const e=Object(H.b)(c.error),t=Object(s.e)();return void Object(s.g)({...t,payment:{...t.payment,error:{...e}}})}let o=Object(r.D)(Object(s.e)(),{type:c.type,id:c.id});o=Object(r.A)(o,l.i.Checkout),Object(s.g)(o)}(i,n)}),Object(s.b)("sendPaymentForm",(e,t,a)=>{const{shippingOptionId:n,saveCredentials:c}=a,i=Object(o.cb)(e),l=Object(o.db)(e),d=Object(o.fb)(e),b=Object(o.ub)(e);i&&d&&async function(e,t,a,n){if(await Object(j.a)("sendPaymentForm",{messageId:e,credentials:t,requestedInfoId:a,shippingOptionId:n})){const e=Object(r.g)(Object(s.e)());Object(s.g)(Object(r.h)(e))}}(i,{save:c,data:b},l,n)}),Object(s.b)("setPaymentStep",(e,t,a={})=>Object(r.A)(e,a.step||l.i.ShippingInfo)),Object(s.b)("setInvoiceMessageInfo",(e,t,a)=>Object(r.y)(e,a));a(76);Object(s.b)("apiUpdate",(e,t,a)=>{switch(a["@type"]){case"updateChat":Object(o.K)(e,a.id)||t.loadTopChats(),Object(s.g)(Object(r.F)(e,a.id,a.chat));break;case"updateChatJoin":{const n=Object(o.j)(e,a.id);if(!n)break;e=Object(r.G)(e,n,[a.id]),e=Object(r.F)(e,a.id,{isNotJoined:!1}),Object(s.g)(e);const c=Object(o.f)(e,a.id);c&&t.requestChatUpdate({chatId:c.id});break}case"updateChatLeave":{const t=Object(o.j)(e,a.id);if(!t)break;const{[t]:n}=e.chats.listIds;n&&(e=Object(r.q)(e,t,n.filter(e=>e!==a.id))),e=Object(r.F)(e,a.id,{isNotJoined:!0}),Object(s.g)(e);break}case"updateChatInbox":Object(s.g)(Object(r.F)(e,a.id,a.chat));break;case"updateChatTypingStatus":{const{id:t,typingStatus:n}=a;Object(s.g)(Object(r.F)(e,t,{typingStatus:n})),setTimeout(()=>{const e=Object(s.e)(),a=Object(o.f)(e,t);a&&n&&a.typingStatus&&a.typingStatus.timestamp===n.timestamp&&Object(s.g)(Object(r.F)(e,t,{typingStatus:void 0}))},6e3);break}case"newMessage":{if(a.message.senderId===e.currentUserId)return;const t=Object(o.f)(e,a.chatId);if(!t)return;Object(s.g)(Object(r.F)(e,a.chatId,{unreadCount:t.unreadCount?t.unreadCount+1:1,...a.message.hasUnreadMention&&{unreadMentionsCount:t.unreadMentionsCount?t.unreadMentionsCount+1:1}}));break}case"updateCommonBoxMessages":case"updateChannelMessages":{const{ids:t,messageUpdate:n}=a;if(!1!==n.hasUnreadMention)return;t.forEach(t=>{const s="channelId"in a?a.channelId:Object(o.p)(e,t),n=Object(o.f)(e,s);n&&n.unreadMentionsCount&&(e=Object(r.F)(e,s,{unreadMentionsCount:n.unreadMentionsCount-1}))}),Object(s.g)(e);break}case"updateChatFullInfo":{const{fullInfo:t}=a,n=e.chats.byId[a.id];if(!n)return;Object(s.g)(Object(r.F)(e,a.id,{fullInfo:{...n.fullInfo,...t}}));break}case"updatePinnedChatIds":{const{ids:t,folderId:c}=a,r=c===n.g?"archived":"active";e={...e,chats:{...e.chats,orderedPinnedIds:{...e.chats.orderedPinnedIds,[r]:t.length?t:void 0}}},Object(s.g)(e);break}case"updateChatPinned":{const{id:t,isPinned:c}=a,r=Object(o.j)(e,t);if(r){const{[r]:a}=e.chats.orderedPinnedIds;let s=a||[];if(c){if(!s.includes(t)){if("active"===r&&s.length>=n.E){const t=e.chats.listIds.active;s=s.filter(e=>t&&t.includes(e))}s=[t,...s]}}else s=s.filter(e=>e!==t);e={...e,chats:{...e.chats,orderedPinnedIds:{...e.chats.orderedPinnedIds,[r]:s.length?s:void 0}}}}Object(s.g)(e);break}case"updateChatListType":{const{id:t,folderId:n}=a;Object(s.g)(Object(r.I)(e,t,n));break}case"updateChatFolder":{const{id:t,folder:n}=a,{byId:c,orderedIds:r}=e.chatFolders,o=n?{...c,[t]:n}:Object(d.l)(c,Object.keys(c).map(Number).filter(e=>e!==t)),i=n?r&&r.includes(t)?r:[...r||[],t]:r?r.filter(e=>e!==t):void 0;Object(s.g)({...e,chatFolders:{...e.chatFolders,byId:o,orderedIds:i}});break}case"updateChatFoldersOrder":{const{orderedIds:t}=a;Object(s.g)({...e,chatFolders:{...e.chatFolders,orderedIds:t}});break}case"updateRecommendedChatFolders":{const{folders:t}=a;Object(s.g)({...e,chatFolders:{...e.chatFolders,recommended:t}});break}case"updateChatMembers":{const t=e.chats.byId[a.id],{replacedMembers:n,addedMember:c,deletedMemberId:o}=a;if(!t)return;let i=!1,l=t.fullInfo&&t.fullInfo.members?[...t.fullInfo.members]:[];if(n)l=n,i=!0;else if(c)l.length&&l.some(e=>e.userId===c.userId)||(l.push(c),i=!0);else if(l.length&&o){const e=l.findIndex(e=>e.userId===o);e>-1&&(l.slice(e,1),i=!0)}if(i){const n=l.filter(({isOwner:e,isAdmin:t})=>e||t);Object(s.g)(Object(r.F)(e,a.id,{membersCount:l.length,fullInfo:{...t.fullInfo,members:l,adminMembers:n}}))}break}}});function q(e,t,a,s,n=!1){const c=n?Object(o.kb)(e,t,a):Object(o.k)(e,t,a);if(c&&s.content){const{photo:e,video:t,sticker:a,document:n}=Object(m.v)(c);e&&s.content.photo?(s.content.photo.blobUrl=e.blobUrl,s.content.photo.thumbnail=e.thumbnail):t&&s.content.video?s.content.video.blobUrl=t.blobUrl:a&&s.content.sticker?s.content.sticker.isPreloadedGlobally=a.isPreloadedGlobally:n&&s.content.document&&(s.content.document.previewBlobUrl=n.previewBlobUrl)}return n?Object(r.cb)(e,t,a,s):Object(r.J)(e,t,a,s)}function G(e,t){const{id:a,chatId:s}=t;e=Object(r.T)(e,s,i.MAIN_THREAD_ID,[a]),Object(o.V)(e,s,i.MAIN_THREAD_ID)&&(e=Object(r.f)(e,s,i.MAIN_THREAD_ID,a));const{threadInfo:n,firstMessageId:c}=Object(o.wb)(e,s,t)||{};return!c&&Object(m.sb)(t)||n&&(e=Object(r.T)(e,s,n.threadId,[a]),Object(o.V)(e,s,n.threadId)&&(e=Object(r.f)(e,s,n.threadId,a),c||(e=Object(r.v)(e,s,n.threadId,"firstMessageId",t.id)),n.lastMessageId||(e=Object(r.v)(e,s,n.threadId,"threadInfo",{...n,lastMessageId:t.id})))),e}function _(e,t,a,s=!1){const{chats:n}=e,c=n.byId[t]&&n.byId[t].lastMessage;if(c&&!s){if(!(c.id===a.id||c.id===a.previousLocalId||a.id>c.id))return e}return Object(r.F)(e,t,{lastMessage:a})}function z(e,t){const a=Object(o.m)(e,t),s=Object(o.W)(e,t,i.MAIN_THREAD_ID);if(!a||!s)return;let n=s.length;for(;n--;){const e=a[s[n]];if(!e.isDeleting)return e}}function V(e,t,a,n){if(e){t.forEach(t=>{const a=z(n=Object(r.J)(n,e,t,{isDeleting:!0}),e);a&&(n=_(n,e,a,!0))}),Object(s.g)(n),a.requestChatUpdate({chatId:e});const c=[];return t.forEach(t=>{const a=Object(o.k)(n,e,t);if(!a)return;const{threadInfo:s}=Object(o.wb)(n,e,a)||{};s&&c.push(s.threadId)}),Object(d.o)(c).forEach(t=>{a.requestThreadInfoUpdate({chatId:e,threadId:t})}),void setTimeout(()=>{Object(s.g)(Object(r.i)(Object(s.e)(),e,t))},350)}const c=[];t.forEach(e=>{const t=Object(o.p)(n,e);if(t){c.push(t);const a=z(n=Object(r.J)(n,t,e,{isDeleting:!0}),t);a&&(n=_(n,t,a,!0)),setTimeout(()=>{Object(s.g)(Object(r.i)(Object(s.e)(),t,[e]))},350)}}),Object(s.g)(n),Object(d.o)(c).forEach(e=>{a.requestChatUpdate({chatId:e})})}Object(s.b)("apiUpdate",(e,t,a)=>{switch(a["@type"]){case"newMessage":{const{chatId:n,id:c,message:i}=a;e=G(e=q(e,n,c,i),i);if(Object(o.f)(e,n)){const t=Object(o.k)(e,n,c);e=_(e,n,t)}if(i.threadInfo&&(e=Object(r.ib)(e,i.threadInfo.chatId,i.threadInfo.threadId,i.threadInfo)),Object(s.g)(e),Object(o.a)(e,n,i)){!i.isOutgoing||i.content&&i.content.action||t.focusLastMessage();const{threadInfo:a}=Object(o.wb)(e,n,i)||{};a&&t.requestThreadInfoUpdate({chatId:n,threadId:a.threadId})}Object(o.K)(e,n)||t.loadTopChats();break}case"newScheduledMessage":{const{chatId:t,id:n,message:c}=a;e=q(e,t,n,c,!0);const l=Object(o.jb)(e,t)||[];e=Object(r.v)(e,t,i.MAIN_THREAD_ID,"scheduledIds",Object(d.o)([...l,n])),Object(s.g)(e);break}case"updateMessage":{const{chatId:t,id:n,message:c}=a;if(!Object(o.k)(e,t,n))return;e=q(e,t,n,c);const i=Object(o.k)(e,t,n);c.threadInfo&&(e=Object(r.ib)(e,c.threadInfo.chatId,c.threadInfo.threadId,c.threadInfo)),e=_(e,t,i),Object(s.g)(e);break}case"updateScheduledMessage":{const{chatId:t,id:n,message:c}=a;if(!Object(o.kb)(e,t,n))return;e=q(e,t,n,c,!0);const l=Object.keys(Object(o.lb)(e,t)||{}).map(Number).sort((e,t)=>t-e);e=Object(r.v)(e,t,i.MAIN_THREAD_ID,"scheduledIds",l),Object(s.g)(e);break}case"updateMessageSendSucceeded":{const{chatId:t,localId:n,message:c}=a;e=G(e,c);const i=Object(o.k)(e,t,n);e=Object(r.i)(e,t,[n]),c.isScheduled&&(e=Object(r.j)(e,t,[n])),e=Object(r.J)(e,t,c.id,{...i,...c,previousLocalId:n});const l=Object(o.k)(e,t,c.id);e=_(e,t,l),Object(s.g)(e);break}case"updateScheduledMessageSendSucceeded":{const{chatId:t,localId:n,message:c}=a,l=Object(o.jb)(e,t)||[];e=Object(r.v)(e,t,i.MAIN_THREAD_ID,"scheduledIds",[...l,c.id]);const d=Object(o.kb)(e,t,n);e=Object(r.j)(e,t,[n]),e=Object(r.cb)(e,t,c.id,{...d,...c,previousLocalId:n}),Object(s.g)(e);break}case"updatePinnedIds":{const{chatId:t,isPinned:n,messageIds:c}=a,l=Object(o.eb)(e,t)||[],d=n?[...l,...c]:l.filter(e=>!c.includes(e));Object(s.g)(Object(r.v)(e,t,i.MAIN_THREAD_ID,"pinnedIds",d));break}case"updateThreadInfo":{const{chatId:t,threadId:n,threadInfo:c}=a,i={...Object(o.xb)(e,t,n),...c};if(!i.threadId)return;e=Object(r.ib)(e,t,n,i),Object(s.g)(e);break}case"resetMessages":{const{id:n}=a,c=Object(o.m)(e,n);c&&!Object(m.lb)(n)&&(e=Object(r.i)(e,n,Object.keys(c).map(Number)),Object(s.g)(e),t.loadFullChat({chatId:n,force:!0}));break}case"deleteMessages":{const{ids:s,chatId:n}=a;V(n,s,t,e);break}case"deleteScheduledMessages":{const{ids:t,chatId:n}=a;!function(e,t,a,n){if(!e)return;t.forEach(t=>{n=Object(r.cb)(n,e,t,{isDeleting:!0})}),Object(s.g)(n),setTimeout(()=>{n=Object(r.j)(Object(s.e)(),e,t);const a=Object(o.lb)(n,e);n=Object(r.v)(n,e,i.MAIN_THREAD_ID,"scheduledIds",Object.keys(a||{}).map(Number)),Object(s.g)(n)},350)}(n,t,0,e);break}case"deleteHistory":{const{chatId:s}=a;V(s,Object.keys(e.messages.byChatId[s].byId).map(Number),t,e);break}case"updateCommonBoxMessages":{const{ids:t,messageUpdate:n}=a;t.forEach(t=>{const a=Object(o.p)(e,t);a&&(e=Object(r.J)(e,a,t,n))}),Object(s.g)(e);break}case"updateChannelMessages":{const{channelId:t,ids:n,messageUpdate:c}=a;n.forEach(a=>{e=Object(r.J)(e,t,a,c)}),Object(s.g)(e);break}case"updateMessagePoll":{const{pollId:t,pollUpdate:n}=a,c=Object(o.l)(e,t);if(c&&c.content.poll){const t={...c.content.poll,...n},{results:a}=t.results||{};if(a&&!a.some(e=>e.isChosen)){const{results:e}=c.content.poll.results,s=e&&e.filter(e=>e.isChosen);s&&s.forEach(e=>{const s=a.findIndex(t=>t.option===e.option);s>=0&&(t.results.results[s].isChosen=!0)})}Object(s.g)(Object(r.J)(e,c.chatId,c.id,{content:{...c.content,poll:t}}))}break}case"updateMessagePollVote":{const{pollId:t,userId:n,options:c}=a,i=Object(o.l)(e,t);if(!i||!i.content.poll||!i.content.poll.results)break;const{poll:l}=i.content,{recentVoterIds:d,totalVoters:b,results:u}=l.results,m=d?[...d]:[],h=b?b+1:1,O=u?[...u]:[];m.push(n),c.forEach(t=>{const a=O.find(e=>e.option===t),s=O.findIndex(e=>e.option===t),c=a?{...a}:{option:t,votersCount:0};c.votersCount+=1,n===e.currentUserId&&(c.isChosen=!0),s?O[s]=c:O.push(c)}),Object(s.g)(Object(r.J)(e,i.chatId,i.id,{content:{...i.content,poll:{...l,results:{...l.results,recentVoterIds:m,totalVoters:h,results:O}}}}));break}}});var $=a(104);const W=Object($.f)((function(){let e=Object(s.e)();Q.forEach(([t,a])=>{e=Object(r.lb)(e,t,{status:a})}),Object(s.g)(e),Q=[]}),3e3,!0);let Q=[];Object(s.b)("apiUpdate",(e,t,a)=>{switch(a["@type"]){case"deleteUser":return Object(r.k)(e,a.id);case"updateUser":return Object(r.lb)(e,a.id,a.user);case"updateUserStatus":return s=a.userId,n=a.status,Q.push([s,n]),void W();case"updateUserFullInfo":{const{id:t,fullInfo:s}=a,n=e.users.byId[t];if(!n)return;return Object(r.lb)(e,t,{fullInfo:{...n.fullInfo,...s}})}}var s,n}),Object(s.b)("apiUpdate",(e,t,a)=>{switch(a["@type"]){case"updateStickerSet":return Object(r.fb)(e,a.id,a.stickerSet)}}),Object(s.b)("apiUpdate",(e,t,a)=>{switch(a["@type"]){case"updatePeerBlocked":return a.isBlocked?Object(r.a)(Object(s.e)(),a.id):Object(r.o)(Object(s.e)(),a.id);case"updateResetContactList":Object(s.g)({...Object(s.e)(),contactList:{hash:0,userIds:[]}});break;case"updateFavoriteStickers":t.loadFavoriteStickers();break;case"updatePrivacy":e.settings.privacy[a.key]=a.rules}}),Object(s.b)("apiUpdate",(e,t,a)=>{switch(a["@type"]){case"updateNotifySettings":return Object(r.ab)(e,a.peerType,a.isSilent,a.isShowPreviews)}}),Object(s.b)("apiUpdate",(e,t,a)=>{switch(a["@type"]){case"updateTwoFaStateWaitCode":return{...e,twoFaSettings:{...e.twoFaSettings,isLoading:!1,waitingEmailCodeLength:a.length}};case"updateTwoFaError":return{...e,twoFaSettings:{...e.twoFaSettings,error:a.message}}}});var K=a(43),Y=a(27),J=a(8),Z=a(42),X=a(100),ee=a(66),te=a(93),ae=a(56),se=a(32),ne=a(31),ce=a(142),re=a(126);a(183);var oe=Object(c.h)(({id:e,name:t,value:a,label:s,checked:n=!1,disabled:r,onChange:o,onCheck:i})=>{const l=Object(c.m)(e=>{o&&o(e),i&&i(e.currentTarget.checked)},[o,i]),d=Object(J.a)("Switcher",r&&"disabled");return c.a.createElement("label",{className:d,title:s},c.a.createElement("input",{type:"checkbox",id:e,name:t,value:a,checked:n,disabled:r,onChange:l}),c.a.createElement("span",{className:"widget"}))});a(184);const ie=[0,1,2];var le=Object(c.h)(Object(s.h)(e=>{const{query:t,fetchingStatus:a,chatId:s,date:n}=e.globalSearch,{currentUserId:c}=e,{byId:r}=e.chats,{theme:o,animationLevel:i}=e.settings.byKey;return{searchQuery:t,isLoading:!!a&&Boolean(a.chats||a.messages),currentUserId:c,chatsById:r,globalSearchChatId:s,searchDate:n,theme:o,animationLevel:i}},(e,t)=>Object(d.l)(t,["openChat","openTipsChat","setGlobalSearchDate","setGlobalSearchChatId","setSettingOption"]))(({content:e,contactsFilter:t,onSearchQuery:a,onSelectSettings:s,onSelectContacts:r,onSelectArchived:o,setGlobalSearchChatId:i,onReset:d,searchQuery:b,isLoading:u,currentUserId:O,globalSearchChatId:j,searchDate:g,theme:f,animationLevel:p,chatsById:I,openChat:v,openTipsChat:y,setGlobalSearchDate:w,setSettingOption:C})=>{const E=e===l.d.ChatList,M={date:void 0},S={id:void 0},k=Object(c.p)(()=>g?Object(x.a)(new Date(1e3*g)):void 0,[g]),N=Object(c.p)(()=>E&&I?Object.values(I).reduce((e,t)=>Object(m.hb)(t)&&t.unreadCount?e+1:e,0):0,[E,I]),P=Object(c.p)(()=>({onTrigger:e,isOpen:t})=>c.a.createElement(ne.a,{round:!0,ripple:E&&!h.f,size:"smaller",color:"translucent",className:t?"active":"",onClick:E?e:()=>d(),ariaLabel:E?"Open menu":"Return to chat list"},c.a.createElement("div",{className:Object(J.a)("animated-menu-icon",!E&&"state-back")})),[E,d]),T=Object(c.m)(()=>{b||a("")},[b,a]),A=Object(c.m)(()=>{v({id:O})},[O,v]),R=Object(c.m)(e=>{e.stopPropagation();const t="light"===f?"dark":"light";C({theme:t,customBackground:"dark"===t?"#0F0F0F":void 0}),Object(ee.a)(t,p>0)},[p,C,f]),L=Object(c.m)(e=>{e.stopPropagation();const t=0===p?2:0;ie.forEach((e,a)=>{document.body.classList.toggle("animation-level-"+a,t===a)}),C({animationLevel:t})},[p,C]),F=Object(te.a)(),B=Boolean(j)||e===l.d.GlobalSearch||e===l.d.Contacts,D=e===l.d.Contacts?F("SearchFriends"):F("Search");return c.a.createElement("div",{className:"LeftMainHeader"},c.a.createElement("div",{id:"LeftMainHeader",className:"left-header"},c.a.createElement(ae.a,{trigger:P,footer:n.f},c.a.createElement(se.a,{icon:"saved-messages",onClick:A},F("SavedMessages")),c.a.createElement(se.a,{icon:"archive",onClick:o},c.a.createElement("span",{className:"menu-item-name"},F("ArchivedChats")),N>0&&c.a.createElement("div",{className:"archived-badge"},N)),c.a.createElement(se.a,{icon:"user",onClick:r},F("Contacts")),c.a.createElement(se.a,{icon:"settings",onClick:s},F("Settings")),c.a.createElement(se.a,{icon:"darkmode",onClick:R},c.a.createElement("span",{className:"menu-item-name"},"Dark Mode"),c.a.createElement(oe,{id:"darkmode",label:"Toggle Dark Mode",checked:"dark"===f})),c.a.createElement(se.a,{icon:"animations",onClick:L},c.a.createElement("span",{className:"menu-item-name"},F("SettingsSearch.Synonyms.Appearance.Animations")),c.a.createElement(oe,{id:"animations",label:"Toggle Animations",checked:p>0})),c.a.createElement(se.a,{icon:"help",onClick:y},"Telegram Features"),c.a.createElement(se.a,{icon:"bug",href:n.t},"Report Bug")),c.a.createElement(ce.a,{inputId:"telegram-search-input",className:j||g?"with-picker-item":"",value:t||b,focused:B,isLoading:u,placeholder:D,canClose:Boolean(j||g),onChange:a,onReset:d,onFocus:T},k&&c.a.createElement(re.a,{icon:"calendar",title:k,canClose:!0,isMinimized:Boolean(j),className:"search-date",onClick:w,clickArg:M}),j&&c.a.createElement(re.a,{chatOrUserId:j,onClick:i,canClose:!0,clickArg:S}))))})),de=a(20);a(185);var be=Object(s.h)(e=>Object(d.l)(e,["connectionState"]))(({connectionState:e})=>{const t=Object(te.a)();return"connectionStateConnecting"===e&&c.a.createElement("div",{id:"ConnectionState"},c.a.createElement(de.a,{color:"black"}),c.a.createElement("div",{className:"state-text"},t("WaitingForNetwork")))}),ue=a(127),me=a(106),he=a(29),Oe=(e,t,a)=>{const s=Object(c.q)(),n=(e=>Object(c.p)(()=>Object(g.g)(e=>e(),e),[e]))(t),r=Object(he.a)();return Object(me.a)(()=>{let t=!0;n(()=>{s.current=e(),t||r()}),t=!1},a),s.current},je=a(156),ge=a(176);var fe=Object(c.h)(Object(s.h)(e=>{const{chats:{byId:t},users:{byId:a},chatFolders:{byId:s,orderedIds:n},lastSyncTime:c}=e;return{chatsById:t,usersById:a,chatFoldersById:s,orderedFolderIds:n,lastSyncTime:c}},(e,t)=>Object(d.l)(t,["loadChatFolders"]))(({chatsById:e,usersById:t,chatFoldersById:a,orderedFolderIds:s,lastSyncTime:n,loadChatFolders:r})=>{const o=Object(c.q)(null),[i,l]=Object(c.r)(0);Object(c.n)(()=>{n&&r()},[n,r]);const b=Object(c.p)(()=>s?s.map(e=>a[e]||{}).filter(Boolean):void 0,[a,s]),u=Oe(()=>{if(!b||!b.length)return;const a=Object.keys(e).map(Number),s=b.map(s=>{const{unreadDialogsCount:n,hasActiveDialogs:c}=Object(m.p)(e,t,s,a)||{};return{id:s.id,badgeCount:n,isBadgeActive:c}});return Object(d.c)(s,"id")},3e3,[b,e,t]),O=Object(c.p)(()=>{if(b&&b.length)return[{title:"All"},...b.map(e=>({title:e.title,...u&&u[e.id]}))]},[b,u]),j=Object(c.m)(e=>{l(e)},[]);Object(c.n)(()=>{O&&O.length&&i>=O.length&&l(0)},[i,O]),Object(c.n)(()=>{if(o.current&&h.k&&O&&O.length)return Object(ue.b)(o.current,{onSwipe:(e,t)=>{t===ue.a.Left?l(Math.min(i+1,O.length-1)):t===ue.a.Right&&l(Math.max(0,i-1))}})},[i,O]);const{shouldRender:g,transitionClassNames:f}=Object(Y.a)(!s,void 0,!0),p=Object(te.a)();function I(){const e=Object.values(a).find(({title:e})=>e===O[i].title);return e&&0!==i?c.a.createElement(ge.a,{folderType:"folder",folderId:e.id,noChatsText:p("FilterNoChatsToDisplay")}):c.a.createElement(ge.a,{folderType:"all"})}return c.a.createElement("div",{className:"ChatFolders"},O&&O.length?c.a.createElement(je.a,{tabs:O,activeTab:i,onSwitchTab:j}):g?c.a.createElement("div",{className:Object(J.a)("tabs-placeholder",f)}):void 0,c.a.createElement(X.a,{ref:o,name:"slide",activeKey:i,renderCount:O?O.length:void 0},I))})),pe=a(12),Ie=a(17),ve=a(16);var ye=e=>{const t=Object(Ie.a)(pe.a.Extra,"LeftSearch");return t?c.a.createElement(t,e):c.a.createElement(ve.a,null)};var we=e=>{const t=Object(Ie.a)(pe.a.Extra,"ContactList");return t?c.a.createElement(t,e):c.a.createElement(ve.a,null)},Ce=a(47);a(197);let Ee;var Me=Object(c.h)(({isShown:e,onNewPrivateChat:t,onNewChannel:a,onNewGroup:s})=>{const[n,r]=Object(c.r)(!1);Object(c.n)(()=>{e||r(!1)},[e]);const o=Object(te.a)(),i=Object(J.a)("NewChatButton",e&&"revealed",n&&"menu-is-open"),l=Object(c.m)(()=>{Ee&&(clearTimeout(Ee),Ee=void 0)},[]),d=Object(c.m)(()=>{Ee&&(clearTimeout(Ee),Ee=void 0),Ee=window.setTimeout(()=>{r(!1)},750)},[]);return c.a.createElement("div",{className:i,onMouseEnter:l,onMouseLeave:d},c.a.createElement(ne.a,{round:!0,color:"primary",className:n?"active":"",onClick:()=>{r(!n)},ariaLabel:n?"Close":"Create new chat",tabIndex:-1},c.a.createElement("i",{className:"icon-new-chat-filled"}),c.a.createElement("i",{className:"icon-close"})),c.a.createElement(Ce.a,{isOpen:n,positionX:"right",positionY:"bottom",autoClose:!0,onClose:()=>{r(!1)}},c.a.createElement(se.a,{icon:"channel",onClick:a},o("NewChannel")),c.a.createElement(se.a,{icon:"group",onClick:s},o("NewGroup")),c.a.createElement(se.a,{icon:"user",onClick:t},"New Private Chat")))});a(198);const Se=Object.keys(l.d).length/2;let ke;var Ne=Object(c.h)(({content:e,searchQuery:t,searchDate:a,contactsFilter:s,onSearchQuery:n,onContentChange:r,onReset:o})=>{const[i,d]=Object(c.r)(h.k),b=Object(c.q)(!1),u=Object(c.m)(()=>{r(l.d.Settings)},[r]),m=Object(c.m)(()=>{r(l.d.Contacts)},[r]),O=Object(c.m)(()=>{r(l.d.NewChannelStep1)},[r]),j=Object(c.m)(()=>{r(l.d.NewGroupStep1)},[r]),g=Object(c.m)(()=>{r(l.d.Archived)},[r]),f=Object(c.m)(()=>{e===l.d.ChatList&&(b.current=!0,d(!0))},[e]),p=Object(c.m)(()=>{b.current=!1,ke&&(clearTimeout(ke),ke=void 0),ke=window.setTimeout(()=>{b.current||d(!1)},250)},[]);return Object(c.n)(()=>{let t;return e!==l.d.ChatList?t=window.setTimeout(()=>{d(!1)},250):(b.current||h.k)&&d(!0),()=>{t&&(clearTimeout(t),t=void 0)}},[e]),c.a.createElement("div",{id:"LeftColumn-main",onMouseEnter:h.k?void 0:f,onMouseLeave:h.k?void 0:p},c.a.createElement(le,{content:e,contactsFilter:s,onSearchQuery:n,onSelectSettings:u,onSelectContacts:m,onSelectArchived:g,onReset:o}),c.a.createElement(be,null),c.a.createElement(X.a,{name:"zoom-fade",renderCount:Se,activeKey:e},()=>{switch(e){case l.d.ChatList:return c.a.createElement(fe,null);case l.d.GlobalSearch:return c.a.createElement(ye,{searchQuery:t,searchDate:a,onReset:o});case l.d.Contacts:return c.a.createElement(we,{filter:s});default:return}}),c.a.createElement(Me,{isShown:i,onNewPrivateChat:m,onNewChannel:O,onNewGroup:j}))});var Pe=e=>{const t=Object(Ie.a)(pe.a.Extra,"Settings");return t?c.a.createElement(t,e):c.a.createElement(ve.a,null)};var Te=e=>{const t=Object(Ie.a)(pe.a.Extra,"NewChat");return t?c.a.createElement(t,e):c.a.createElement(ve.a,null)};var Ae,xe=e=>{const t=Object(Ie.a)(pe.a.Extra,"ArchivedChats");return t?c.a.createElement(t,e):c.a.createElement(ve.a,null)};a(199);!function(e){e[e.Main=0]="Main",e[e.Settings=1]="Settings",e[e.Archived=2]="Archived",e[e.NewGroup=3]="NewGroup",e[e.NewChannel=4]="NewChannel"}(Ae||(Ae={}));const Re=Object.keys(Ae).length/2;var Le=Object(c.h)(Object(s.h)(e=>{const{query:t,date:a}=e.globalSearch;return{searchQuery:t,searchDate:a}},(e,t)=>Object(d.l)(t,["setGlobalSearchQuery","setGlobalSearchChatId","resetChatCreation","setGlobalSearchDate","loadPasswordInfo","clearTwoFaError"]))(({searchQuery:e,searchDate:t,setGlobalSearchQuery:a,setGlobalSearchChatId:s,resetChatCreation:n,setGlobalSearchDate:r,loadPasswordInfo:o,clearTwoFaError:i})=>{const[d,b]=Object(c.r)(l.d.ChatList),[u,m]=Object(c.r)(l.m.Main),[O,j]=Object(c.r)(""),[g,f]=Object(c.r)(0);let p=Ae.Main;switch(d){case l.d.Archived:p=Ae.Archived;break;case l.d.Settings:p=Ae.Settings;break;case l.d.NewChannelStep1:case l.d.NewChannelStep2:p=Ae.NewChannel;break;case l.d.NewGroupStep1:case l.d.NewGroupStep2:p=Ae.NewGroup}const I=Object(c.m)(e=>{if(d!==l.d.NewGroupStep2||e){if(d===l.d.NewGroupStep1){const e=document.getElementById("new-group-picker-search");e&&e.blur()}if(d===l.d.Settings)switch(u){case l.m.EditProfile:case l.m.Folders:case l.m.General:case l.m.Notifications:case l.m.Privacy:case l.m.Language:return void m(l.m.Main);case l.m.GeneralChatBackground:return void m(l.m.General);case l.m.GeneralChatBackgroundColor:return void m(l.m.GeneralChatBackground);case l.m.PrivacyPhoneNumber:case l.m.PrivacyLastSeen:case l.m.PrivacyProfilePhoto:case l.m.PrivacyForwarding:case l.m.PrivacyGroupChats:case l.m.PrivacyActiveSessions:case l.m.PrivacyBlockedUsers:case l.m.TwoFaDisabled:case l.m.TwoFaEnabled:case l.m.TwoFaCongratulations:return void m(l.m.Privacy);case l.m.PrivacyPhoneNumberAllowedContacts:case l.m.PrivacyPhoneNumberDeniedContacts:return void m(l.m.PrivacyPhoneNumber);case l.m.PrivacyLastSeenAllowedContacts:case l.m.PrivacyLastSeenDeniedContacts:return void m(l.m.PrivacyLastSeen);case l.m.PrivacyProfilePhotoAllowedContacts:case l.m.PrivacyProfilePhotoDeniedContacts:return void m(l.m.PrivacyProfilePhoto);case l.m.PrivacyForwardingAllowedContacts:case l.m.PrivacyForwardingDeniedContacts:return void m(l.m.PrivacyForwarding);case l.m.PrivacyGroupChatsAllowedContacts:case l.m.PrivacyGroupChatsDeniedContacts:return void m(l.m.PrivacyGroupChats);case l.m.TwoFaNewPassword:return void m(l.m.TwoFaDisabled);case l.m.TwoFaNewPasswordConfirm:return void m(l.m.TwoFaNewPassword);case l.m.TwoFaNewPasswordHint:return void m(l.m.TwoFaNewPasswordConfirm);case l.m.TwoFaNewPasswordEmail:return void m(l.m.TwoFaNewPasswordHint);case l.m.TwoFaNewPasswordEmailCode:return void m(l.m.TwoFaNewPasswordEmail);case l.m.TwoFaChangePasswordCurrent:case l.m.TwoFaTurnOff:case l.m.TwoFaRecoveryEmailCurrentPassword:return void m(l.m.TwoFaEnabled);case l.m.TwoFaChangePasswordNew:return void m(l.m.TwoFaChangePasswordCurrent);case l.m.TwoFaChangePasswordConfirm:return void m(l.m.TwoFaChangePasswordNew);case l.m.TwoFaChangePasswordHint:return void m(l.m.TwoFaChangePasswordConfirm);case l.m.TwoFaRecoveryEmail:return void m(l.m.TwoFaRecoveryEmailCurrentPassword);case l.m.TwoFaRecoveryEmailCode:return void m(l.m.TwoFaRecoveryEmail);case l.m.FoldersCreateFolder:case l.m.FoldersEditFolder:return void m(l.m.Folders)}b(l.d.ChatList),j(""),a({query:""}),r({date:void 0}),s({id:void 0}),n(),setTimeout(()=>{f(Date.now())},250)}else b(l.d.NewGroupStep1)},[d,a,s,r,n,u]),v=Object(c.m)(t=>{d!==l.d.Contacts?(b(l.d.GlobalSearch),t!==e&&a({query:t})):j(t)},[d,a,e]);return Object(c.n)(()=>d!==l.d.ChatList?Object(Z.a)(()=>I()):void 0,[d,I]),Object(c.n)(()=>{i(),u===l.m.Privacy&&o()},[i,o,u]),c.a.createElement(X.a,{id:"LeftColumn",name:h.f?"slide-layers":"push-slide",renderCount:Re,activeKey:p},()=>{switch(p){case Ae.Archived:return c.a.createElement(xe,{onReset:I});case Ae.Settings:return c.a.createElement(Pe,{currentScreen:u,onScreenSelect:m,onReset:I});case Ae.NewChannel:return c.a.createElement(Te,{key:g,isChannel:!0,content:d,onContentChange:b,onReset:I});case Ae.NewGroup:return c.a.createElement(Te,{key:g,content:d,onContentChange:b,onReset:I});default:return c.a.createElement(Ne,{content:d,searchQuery:e,searchDate:t,contactsFilter:O,onContentChange:b,onSearchQuery:v,onReset:I})}})})),Fe=a(124),Be=a(13),De=a(49);var Ue=()=>{const[e,t]=Object(c.r)(De.a.get());return Object(c.n)(()=>{const e=Object(g.g)(()=>{t(De.a.get())},250,!1);return window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}}),e},He=a(38);function qe(e,t){const a=Object(He.a)(e,!0),s=Object(c.q)(),n=Object(he.a)(),r=null!=e;return r&&s.current&&(clearTimeout(s.current),s.current=void 0),Object(me.a)(()=>{t&&!r&&a&&!s.current&&(s.current=window.setTimeout(()=>{s.current=void 0,n()},t))},[e]),s.current&&t&&!r?a:e}function Ge(e,t){const a=e<=n.V?16:32,s=function(e){if(e>n.S){const t=Math.min(Math.max(.25*e,288),424),a=Math.min(.25*e,424);return Math.min(e-t-a,728)}if(e>n.R){const t=Math.min(Math.max(.4*e,288),424);return Math.min(e-t,728)}if(e>728)return 728;return e}(e),c=e<=n.V?54:64,r=t?s-a-c:s-a,o=e>n.V?Math.min(s-a,512):s-a,i=o/r,l=r/o;return{composerHiddenScale:i,toolbarHiddenScale:l,composerTranslateX:t?c/2*l:0,toolbarTranslateX:t?c/2*-1*i:0}}var _e=a(132),ze=a(129);function Ve(e,t=!1,a=!1){const s=Object(He.a)(e,t);return a||null!=e?e:s}var $e=a(45),We=a(96),Qe=a(111);var Ke=e=>{const{isOpen:t}=e,a=Object(Ie.a)(pe.a.Extra,"HeaderMenuContainer",!t);return a?c.a.createElement(a,e):void 0};var Ye=Object(c.h)(Object(s.h)((e,{chatId:t,threadId:a,messageListType:s})=>{const n=Object(o.f)(e,t),c=Boolean(n&&Object(m.jb)(n));if(n&&n.isRestricted)return{noMenu:!0};const r=Object(o.N)(e,t),l="thread"===s&&a===i.MAIN_THREAD_ID,d="thread"===s&&a!==i.MAIN_THREAD_ID,b=Object(o.U)(e),u=Boolean(Object(o.J)(e,t)),O=Boolean(l&&n&&(c||Object(m.nb)(n))&&n.isNotJoined),j=l||d,g=l&&!r&&!O,f=!Object(o.Q)(e),p=l&&!O;return{noMenu:!(h.f&&O||h.f&&j||g||f||p),isChannel:c,isRightColumnShown:b,canStartBot:u,canSubscribe:O,canSearch:j,canMute:g,canSelect:f,canLeave:p}},(e,t)=>Object(d.l)(t,["joinChannel","sendBotCommand","openLocalTextSearch"]))(({chatId:e,threadId:t,noMenu:a,isChannel:s,canStartBot:n,canSubscribe:r,canSearch:o,canMute:i,canSelect:l,canLeave:d,isRightColumnShown:b,joinChannel:u,sendBotCommand:m,openLocalTextSearch:O})=>{const j=Object(c.q)(null),[g,f]=Object(c.r)(!1),[p,I]=Object(c.r)(void 0),v=Object(c.m)(()=>{f(!0);const e=j.current.getBoundingClientRect();I({x:e.right,y:e.bottom})},[]),y=Object(c.m)(()=>{f(!1)},[]),w=Object(c.m)(()=>{I(void 0)},[]),C=Object(c.m)(()=>{u({chatId:e})},[u,e]),E=Object(c.m)(()=>{m({command:"/start"})},[m]),M=Object(c.m)(()=>{if(O(),h.f){document.querySelector("#MobileSearch input").focus()}else setTimeout(()=>{const e=document.querySelector(".RightHeader .SearchInput input");e&&e.focus()},400)},[O]),S=Object(te.a)();return c.a.createElement("div",{className:"HeaderActions"},!h.f&&r&&c.a.createElement(ne.a,{size:"tiny",ripple:!0,fluid:!0,onClick:C},S(s?"Subscribe":"Join Group")),!h.f&&n&&c.a.createElement(ne.a,{size:"tiny",ripple:!0,fluid:!0,onClick:E},S("Start")),!h.f&&o&&c.a.createElement(ne.a,{round:!0,ripple:b,color:"translucent",size:"smaller",onClick:M,ariaLabel:"Search in this chat"},c.a.createElement("i",{className:"icon-search"})),(h.f||!r)&&c.a.createElement(ne.a,{ref:j,className:g?"active":"",round:!0,ripple:!h.f,size:"smaller",color:"translucent",disabled:a,ariaLabel:"More actions",onClick:v},c.a.createElement("i",{className:"icon-more"})),p&&c.a.createElement(Ke,{chatId:e,threadId:t,isOpen:g,anchor:p,isChannel:s,canSubscribe:r,canSearch:o,canMute:i,canSelect:l,canLeave:d,onSubscribeChannel:C,onSearchClick:M,onClose:y,onCloseAnimationEnd:w}))})),Je=a(103),Ze=a(35),Xe=a(97),et=a(34);function tt(e){const t=e&&Object(m.E)(e),{sticker:a}=e&&e.content||{},s=t&&a&&!Object(h.o)()&&t.includes("image/webp"),[r,o]=Object(c.r)(et.a),i=e&&e.id;return Object(c.o)(()=>{s&&Object(et.c)("b64-"+i,t).then(o).catch(e=>{n.m&&console.error(e)})},[i,s,t]),s?r:t}var at=a(107),st=a(33),nt=a(36);function ct(e,t,a,s,n){return`M${e},${t+n}a${n},${n},0,0,1,\n ${a},0v${s-2*n}a${n},${n},0,0,1,${-a},0Z`}var rt=Object(c.h)(({count:e,index:t})=>{const a=Object(c.q)(null),s=Object(c.p)(()=>function(e,t){const a=e-t-1,s=function(e){let t=8;1===e?t=36:2===e?t=17:3===e?t=11:(4===e||e>3)&&(t=7.5);return t}(e),n=function(e,t){let a=36;1===e?a=36:2===e?a=17:3===e?a=1===t?12:11:(4===e||e>3)&&(a=7.5);return a}(e,a),c=function(e,t){return e<=3?36:t*e+2*(e-1)}(e,s),r="clipPath"+e,o=function(e,t,a){let s="";if(3===a)s=ct(0,0,2,t,1)+ct(0,12,2,t+1,1)+ct(0,25,2,t,1);else for(let e=0;e\n \n `}(r,s,e),i=function(e,t,a){if(1===a)return 0;if(2===a)return 0===e?0:t+2;return 3===a?0===e?0:1===e?12:25:(t+2)*e}(a,s,e),l=function(e,t,a,s){if(t<=4)return 0;if(e<=1)return 0;if(e>=t-2)return s-36;return(a+4)/2+(e-2)*(a+2)}(a,e,s,c);return{markHeight:n,clipPath:o,markTranslateY:i,trackTranslateY:l,trackHeight:c,clipPathId:r}}(e,t),[e,t]);if(Object(c.n)(()=>{if(!a.current)return;const{trackHeight:e,trackTranslateY:t,markHeight:n,markTranslateY:c,clipPathId:r,clipPath:o}=s,i=a.current.firstElementChild;if(a&&a.current){const s=a.current,{style:l}=s;l.height=e+"px",l.transform=`translateY(-${t}px)`,l.clipPath=`url("#${r}")`;const d=s.querySelector("svg"),b=s.querySelector("div"),u=s.querySelector("defs");d||i&&(i.innerHTML=` ${o} `),u&&(u.innerHTML=o),b&&(b.style.height=n+"px",b.style.transform=`translateY(${c}px)`)}},[s]),1===e)return c.a.createElement("div",{className:"pinned-message-border"},c.a.createElement("div",{className:"pinned-message-border-wrapper-1",ref:a}));const{trackHeight:n,trackTranslateY:r,markHeight:o,markTranslateY:i,clipPathId:l}=s;return c.a.createElement("div",{className:Object(J.a)("pinned-message-border",e>4&&"pinned-message-border-mask")},c.a.createElement("div",{className:"pinned-message-border-wrapper",ref:a,style:`clip-path: url("#${l}"); width: 2px;\n height: ${n}px; transform: translateY(-${r}px);`},c.a.createElement("span",null),c.a.createElement("div",{className:"pinned-message-border-mark",style:`height: ${o}px; transform: translateY(${i}px);`})))});var ot=Object(c.h)(({message:e,count:t,index:a,customTitle:s,className:n,onUnpinMessage:r,onClick:o,onAllPinnedClick:i})=>{const l=tt(e),d=Object(Xe.a)(Object(m.D)(e,"pictogram")),b=Object(m.M)(e,Boolean(l)),[u,h,O]=Object(nt.a)(),j=Object(c.m)(()=>{O(),r&&r(e.id)},[O,r,e.id]),g=Object(te.a)();return c.a.createElement("div",{className:Object(J.a)("HeaderPinnedMessage-wrapper",n)},t>1&&c.a.createElement(ne.a,{round:!0,size:"smaller",color:"translucent",className:"pin-list-button",ariaLabel:g("EventLogFilterPinnedMessages"),onClick:i},c.a.createElement("i",{className:"icon-pin-list"})),r&&c.a.createElement(ne.a,{round:!0,size:"smaller",color:"translucent",ariaLabel:g("UnpinMessageAlertTitle"),className:"unpin-button",onClick:h},c.a.createElement("i",{className:"icon-close"})),c.a.createElement(at.a,{isOpen:u,onClose:O,text:"Would you like to unpin this message?",confirmLabel:"Unpin",confirmHandler:j}),c.a.createElement("div",{className:"HeaderPinnedMessage",onClick:o},c.a.createElement(rt,{count:t,index:a}),l&&function(e,t){const{width:a,height:s}=Object(Je.k)();return c.a.createElement("img",{src:t||e,width:a,height:s,alt:""})}(l,d),c.a.createElement("div",{className:"message-text"},c.a.createElement("div",{className:"title"},s||`${g("PinnedMessage")} ${a>0?"#"+(t-a):""}`),c.a.createElement("p",null,Object(Ze.a)(b))),c.a.createElement(st.a,null)))}),it=a(48),lt=a(164);a(202);var dt=Object(s.h)((e,{message:t})=>{const a=Object(o.ob)(e,t);return{senderName:a?Object(m.U)(a):void 0}},(e,t)=>Object(d.l)(t,["focusMessage","closeAudioPlayer"]))(({message:e,className:t,senderName:a,focusMessage:s,closeAudioPlayer:n})=>{const r=it.c(Object(m.D)(e,"inline")),{playPause:o,isPlaying:i}=Object(lt.a)(Object(m.A)(e),Object(m.r)(e),r,void 0,void 0,!0),l=Object(c.m)(()=>{s({chatId:e.chatId,messageId:e.id})},[s,e.chatId,e.id]),d=Object(c.m)(()=>{i&&o(),n()},[n,i,o]),b=Object(te.a)(),u=Object(m.u)(e);return c.a.createElement("div",{className:Object(J.a)("AudioPlayer",t)},c.a.createElement(ne.a,{round:!0,ripple:!h.f,color:"translucent",size:"smaller",className:Object(J.a)("toggle-play",i?"pause":"play"),onClick:o,ariaLabel:i?"Pause audio":"Play audio"},c.a.createElement("i",{className:"icon-play"}),c.a.createElement("i",{className:"icon-pause"})),c.a.createElement("div",{className:"AudioPlayer-content",onClick:l},u?function(e){const{title:t,performer:a,fileName:s}=e;return c.a.createElement(c.a.Fragment,null,c.a.createElement("div",{className:"title"},Object(Ze.a)(t||s)),a&&c.a.createElement("div",{className:"subtitle"},Object(Ze.a)(a)))}(u):function(e,t){return c.a.createElement(c.a.Fragment,null,c.a.createElement("div",{className:"title"},t&&Object(Ze.a)(t)),c.a.createElement("div",{className:"subtitle"},e))}(b("AttachAudio"),a),c.a.createElement(st.a,null)),c.a.createElement(ne.a,{round:!0,className:"player-close",color:"translucent",size:"smaller",onClick:d,ariaLabel:"Close player"},c.a.createElement("i",{className:"icon-close"})))});a(203);var bt=Object(c.h)(Object(s.h)((e,{chatId:t,threadId:a,messageListType:s})=>{const{isLeftColumnShown:n,lastSyncTime:c}=e,{byId:r}=e.chats,l=Object(o.f)(e,t),{typingStatus:d}=l||{},{chatId:b,messageId:u}=e.audioPlayer,h=b&&u?Object(o.k)(e,b,u):void 0,O=Object(o.yb)(e,t,a);let j;if("pinned"===s){const a=Object(o.eb)(e,t);j=a&&a.length}else if("scheduled"===s){const a=Object(o.jb)(e,t);j=a&&a.length}else if("thread"===s&&a!==i.MAIN_THREAD_ID){const s=Object(o.xb)(e,t,a);s&&(j=s.messagesCount)}let g={typingStatus:d,isLeftColumnShown:n,isRightColumnShown:Object(o.U)(e),isSelectModeActive:Object(o.Q)(e),audioMessage:h,chatTitleLength:l&&Object(m.l)(l).length,chatsById:r,originChatId:O?O.id:t,messagesCount:j,isChatWithSelf:Object(o.N)(e,t),isChatWithBot:l&&Object(o.M)(e,l),lastSyncTime:c};const f=Object(o.m)(e,t);if("thread"===s&&f)if(a===i.MAIN_THREAD_ID){const s=Object(o.eb)(e,t);if(s&&s.length){const t=f[s[0]],{canUnpin:n}=t&&Object(o.b)(e,t,a)||{};g={...g,pinnedMessageIds:s,messagesById:f,canUnpin:n}}}else{const s=Object(o.zb)(e,t,a),n=s?Object(o.k)(e,t,s):void 0,c=n?Object(o.I)(e,n):void 0,r=c?Object(m.U)(c):void 0;g={...g,pinnedMessageIds:s,messagesById:f,canUnpin:!1,topMessageTitle:r}}return g},(e,t)=>Object(d.l)(t,["openChatWithInfo","pinMessage","focusMessage","openChat","loadPinnedMessages","toggleLeftColumn","exitMessageSelectMode"]))(({chatId:e,threadId:t,messageListType:a,pinnedMessageIds:s,messagesById:r,canUnpin:o,topMessageTitle:l,typingStatus:d,isSelectModeActive:b,isLeftColumnShown:u,isRightColumnShown:O,audioMessage:j,chatTitleLength:g,chatsById:f,originChatId:p,messagesCount:I,isChatWithSelf:v,isChatWithBot:y,lastSyncTime:w,openChatWithInfo:C,pinMessage:E,focusMessage:M,openChat:S,loadPinnedMessages:k,toggleLeftColumn:N,exitMessageSelectMode:P})=>{const[T,A]=Object(c.r)(0),x=Array.isArray(s)?s[T]:s,R=r&&x?r[x]:void 0,L=Array.isArray(s)?s.length:s?1:0;Object(c.n)(()=>{t===i.MAIN_THREAD_ID&&w&&k({chatId:e})},[e,k,w,t]),Object(c.n)(()=>{A(0)},[e]),Object(c.n)(()=>{A(L?Object(_e.a)(L,T):-1)},[L,T]),Object(ze.a)(e,x,R);const{width:F}=Ue(),B=F<=n.R,D=F>=n.V&&u,U=Object(c.q)(null),H=Object(c.q)(!0),q=Object(c.m)(()=>{C({id:e})},[C,e]),G=Object(c.m)(t=>{E({chatId:e,messageId:t,isUnpin:!0})},[E,e]),_=Object(c.m)(()=>{if(R){M({chatId:R.chatId,threadId:t,messageId:R.id});const e=Object(_e.a)(L,T+1);A(e)}},[R,M,t,L,T]),z=Object(c.m)(()=>{S({id:e,threadId:i.MAIN_THREAD_ID,type:"pinned"})},[S,e]),V=Object(c.m)(()=>{if(h.f){const e=document.getElementById(n.r);e&&e.blur()}t!==i.MAIN_THREAD_ID||"thread"!==a?("scheduled"===a&&b&&P(),S({id:p,threadId:i.MAIN_THREAD_ID})):h.f?S({id:void 0}):N()},[S,p,t,a,N,b,P]),$=Object(c.p)(()=>{if(!B||!f)return;let e=!1;const t=Object.values(f).reduce((t,a)=>{if(Object(m.hb)(a))return t;const s=a.unreadCount||0;return!s||a.isMuted&&!a.unreadMentionsCount||(e=!0),t+s},0);return t?{isActive:e,totalCount:t}:void 0},[B,f]),W=F>=n.R&&Fn.V&&F30),Q=W||F>n.S&&F{const e=U.current;if(e)return Q&&oe?void(O||W?(H.current&&(e.classList.add("tools-stacked","animated"),H.current=!1),setTimeout(()=>{e.classList.remove("animated")},350)):(e.classList.remove("tools-stacked"),H.current=!0)):(e.classList.remove("tools-stacked","animated"),void(H.current=!0))},[Q,oe,W,O]);const ie=Object(te.a)();function le(){return"thread"===a&&t===i.MAIN_THREAD_ID?c.a.createElement(c.a.Fragment,null,B&&de(D,$),c.a.createElement("div",{className:"chat-info-wrapper",onClick:q},Object(m.lb)(e)?c.a.createElement(We.a,{userId:e,typingStatus:d,withFullInfo:y,withMediaViewer:!0,withUpdatingStatus:!0}):c.a.createElement(Qe.a,{chatId:e,typingStatus:d,withMediaViewer:!0,withFullInfo:!0,withUpdatingStatus:!0}))):"thread"===a?c.a.createElement(c.a.Fragment,null,de(),c.a.createElement("h3",null,ie("CommentsCount",I))):"pinned"===a?c.a.createElement(c.a.Fragment,null,de(),c.a.createElement("h3",null,ie("PinnedMessagesCount",I))):"scheduled"===a?c.a.createElement(c.a.Fragment,null,de(),c.a.createElement("h3",null,v?ie("Reminders"):ie("messages",I))):void 0}function de(e=!1,t){return c.a.createElement("div",{className:"back-button"},c.a.createElement(ne.a,{round:!0,size:"smaller",color:"translucent",onClick:V,ariaLabel:e?"Close":"Back"},c.a.createElement("div",{className:Object(J.a)("animated-close-icon",!e&&"state-back")})),t&&c.a.createElement("div",{className:"unread-count "+(t.isActive?"active":"")},Object($e.b)(t.totalCount)))}return c.a.createElement("div",{className:"MiddleHeader",ref:U},c.a.createElement(X.a,{name:"slide-fade",activeKey:"thread"===a?t:1},le),c.a.createElement("div",{className:"header-tools"},ae&&ce&&!K&&c.a.createElement(ot,{key:e,message:ce,count:L,index:T,customTitle:re,className:se,onUnpinMessage:o?G:void 0,onClick:_,onAllPinnedClick:z}),K&&ee&&c.a.createElement(dt,{key:Object(m.A)(ee),message:ee,className:Z}),c.a.createElement(Ye,{chatId:e,threadId:t,messageListType:a})))})),ut=a(149);function mt(e){return"albumId"in e}function ht(e,t){let a,s=[],n={originalDate:e[0].date,datetime:Number(Object(x.j)(1e3*e[0].date)),senderGroups:[s]};const c=[n];return e.forEach((r,o)=>{r.isInAlbum?a?(a.messages.push(r),r.content.text&&(a.mainMessage=r)):a={albumId:r.groupedId,messages:[r],mainMessage:r}:s.push(r);const i=e[o+1];if(!a||i&&i.groupedId&&i.groupedId===a.albumId||(s.push(a),a=void 0),i){const e=Number(Object(x.j)(1e3*i.date));n.datetime!==e?(n={originalDate:i.date,datetime:e,senderGroups:[]},c.push(n),s=[],n.senderGroups.push(s)):(i.id===t||r.senderId!==i.senderId||r.isOutgoing!==i.isOutgoing||Object(m.db)(r)||Object(m.db)(i)||r.forwardInfo&&i.forwardInfo&&(r.forwardInfo.senderUserId!==i.forwardInfo.senderUserId||r.forwardInfo.fromChatId!==i.forwardInfo.fromChatId||r.forwardInfo.hiddenUserName!==i.forwardInfo.hiddenUserName)||r.inlineButtons||i.inlineButtons)&&(s=[],n.senderGroups.push(s))}}),c}var Ot=a(95);function jt(){const[e,t]=Object(nt.a)(!1),a=(s=1e3,n=!1,Object(c.p)(()=>Object(g.a)(e=>e(),s,n,r),[s,n,r]));var s,n,r;return{isScrolled:e,updateStickyDates:Object(c.m)((e,s)=>{t(),document.body.classList.contains("is-scrolling-messages")||Object(g.b)(()=>{document.body.classList.add("is-scrolling-messages")}),a(()=>{Object(g.b)(()=>{const t=document.querySelector(".stuck");t&&t.classList.remove("stuck");const a=function(e,t){const a=e.querySelectorAll(".sticky-date"),s=e.scrollTop;return Array.from(a).find(e=>{const{offsetTop:a,offsetHeight:n}=e,c=a-s;return-n<=c&&c<=(t?60:10)})}(e,s);a&&a.classList.add("stuck"),document.body.classList.remove("is-scrolling-messages")})})},[t,a])}}var gt=a(144),ft=a(115);let pt=!1;var It=({containerRef:e,className:t,messageIds:a,containerHeight:s,listItemElementsRef:r,focusingId:o,anchorIdRef:i,anchorTopRef:l,loadMoreForwards:d,loadMoreBackwards:b,isViewportNewest:u,firstUnreadId:m,onFabToggle:h,children:O})=>{const j=Object(c.q)(null),g=Object(c.q)(null),f=Object(c.q)(null),p=Object(c.m)(()=>{if(pt)return;if(!a||!a.length)return void h(!1);if(!u)return void h(!0);const{offsetHeight:t,scrollHeight:s,scrollTop:n}=e.current,c=s-n-t;h(m?!(0===c):!(c<=50))},[a,u,e,h,m]),{observe:I,freeze:v,unfreeze:y}=Object(Ot.a)({rootRef:e,margin:n.M},t=>{if(!d||!b)return;const a=t.find(({isIntersecting:e})=>e);if(!a)return;const{target:s}=a;"backwards-trigger"===s.className?(Object(gt.a)(e.current),b()):"forwards-trigger"===s.className&&s.dataset.isActive&&(Object(gt.a)(e.current),d())});Object(Ot.c)(j,I),Object(Ot.c)(g,I);const{observe:w,freeze:C,unfreeze:E}=Object(Ot.a)({rootRef:e,margin:50},([{target:e}])=>{e.dataset.isActive&&p()});return Object(Ot.c)(f,w),Object(me.a)(()=>{o?(v(),C()):(E(),y())},[o]),Object(me.a)(()=>{if(!r.current)return;const e=r.current.filter(e=>a.includes(Number(e.dataset.messageId))),t=e[1]||e[0];t&&(i.current=t.id,l.current=t.getBoundingClientRect().top)},[a,s]),Object(me.a)(()=>{pt=!0,setTimeout(()=>{pt=!1},100)},[a]),Object(c.n)(p,[m]),c.a.createElement("div",{className:t,teactFastList:!0},c.a.createElement("div",{ref:j,key:"backwards-trigger",className:"backwards-trigger"}),O,c.a.createElement("div",{ref:g,key:"forwards-trigger",className:"forwards-trigger","data-is-active":!u}),c.a.createElement("div",{ref:f,key:"fab-trigger",className:"fab-trigger","data-is-active":u}))},vt=a(131),yt=a(134);function wt(e){return"number"==typeof e}function Ct(e){return e?175:100}function Et(e){const t=Object(m.tb)(e),a=Object(m.qb)(e),s=Object(m.G)(e)||Object(m.Q)(e),n=Object(m.O)(e),c=Boolean(Object(m.Q)(e)),{width:r,height:o}=s?Object(Je.f)(s,t,a,c):Object(Je.h)(n,t,a),i=Ct(Boolean(Object(m.N)(e)));let l=1;re+t,t)}function At(e,t,a){return ea?a:e}function xt(e){const t={width:0,height:0};return e.forEach(({dimensions:e,sides:a})=>{a&kt&&(t.width=e.width+e.x),a&Nt&&(t.height=e.height+e.y)}),t}function Rt(e,t,a,s){const c=a.messages.map(e=>{const t=Et(e);return t.width/t.height});const r=function(e){return e.map(e=>e>1.2?"w":e<.8?"n":"q").join("")}(c),o=function(e){return e.reduce((e,t)=>t+e,1)/e.length}(c),i=c.length,l=c.some(e=>e>2),d=function(e,t,a){return a<=n.V?a/100*69-(t?1.625:0)*Je.c:((e?30:29)-(t?1.625:0))*Je.c}(e,t,s);let b;const u={ratios:c,proportions:r,averageRatio:o,maxWidth:d,minWidth:100,maxHeight:d,spacing:2};return b=i>=5||l?function({ratios:e,averageRatio:t,maxWidth:a,minWidth:s,spacing:n,maxHeight:c=4*a/3}){const r=function(e,t){return e.map(e=>t>1.1?At(e,1,2.75):At(e,.6667,1))}(e,t),o=e.length,i=new Array(o),l=[],d=e=>{const t=[];let s=0;e.forEach(e=>{t.push(((e,t)=>{const s=Tt(r.slice(e,e+t),0);return(a-(t-1)*n)/s})(s,e)),s+=e}),l.push({lineCounts:e,heights:t})};for(let e=1;e!==o;++e){const t=o-e;e<=3&&t<=3&&d([e,t])}for(let e=1;e!==o-1;++e)for(let a=1;a!==o-e;++a){const s=o-e-a;e<=3&&a<=(t<.85?4:3)&&s<=3&&d([e,a,s])}for(let e=1;e!==o-1;++e)for(let t=1;t!==o-e;++t)for(let a=1;a!==o-e-t;++a){const s=o-e-t-a;e<=3&&t<=3&&a<=3&&s<=4&&d([e,t,a,s])}let b,u=0;for(let e=0;e{for(let e=1;e!==r;++e)if(a[e-1]>a[e])return 1.5;return 1})(),m=Math.abs(o-c)*i*d;(!b||m1.4&&t[1]-t[0]<.2?function(e){const{ratios:t,maxWidth:a,spacing:s,maxHeight:n}=e,c=Math.round(Math.min(a/t[0],Math.min(a/t[1],(n-s)/2)));return[{dimensions:{x:0,y:0,width:a,height:c},sides:Pt|St|kt},{dimensions:{x:0,y:c+s,width:a,height:c},sides:Pt|Nt|kt}]}(e):"ww"===a||"qq"===a?function(e){const{ratios:t,maxWidth:a,spacing:s,maxHeight:n}=e,c=(a-s)/2,r=Math.round(Math.min(c/t[0],Math.min(c/t[1],n)));return[{dimensions:{x:0,y:0,width:c,height:r},sides:St|Pt|Nt},{dimensions:{x:c+s,y:0,width:c,height:r},sides:St|kt|Nt}]}(e):function(e){const{ratios:t,minWidth:a,maxWidth:s,spacing:n,maxHeight:c}=e,r=Math.round(1.5*a),o=Math.min(Math.round(Math.max(.4*(s-n),(s-n)/t[0]/(1/t[0]+1/t[1]))),s-n-r),i=s-o-n,l=Math.min(c,Math.round(Math.min(i/t[0],o/t[1])));return[{dimensions:{x:0,y:0,width:i,height:l},sides:St|Pt|Nt},{dimensions:{x:i+n,y:0,width:o,height:l},sides:St|kt|Nt}]}(e)}(u):3===i?function(e){const{proportions:t}=e;return"n"===t[0]?function(e){const{maxHeight:t,spacing:a,ratios:s,maxWidth:n,minWidth:c}=e,r=t,o=Math.round(Math.min((t-a)/2,s[1]*(n-a)/(s[2]+s[1]))),i=r-o-a,l=Math.max(c,Math.round(Math.min((n-a)/2,Math.min(o*s[2],i*s[1])))),d=Math.min(Math.round(r*s[0]),n-a-l);return[{dimensions:{x:0,y:0,width:d,height:r},sides:St|Pt|Nt},{dimensions:{x:d+a,y:0,width:l,height:i},sides:St|kt},{dimensions:{x:d+a,y:i+a,width:l,height:o},sides:Nt|kt}]}(e):function(e){const{maxWidth:t,ratios:a,maxHeight:s,spacing:n}=e,c=t,r=Math.round(Math.min(c/a[0],.66*(s-n))),o=(t-n)/2,i=Math.min(s-r-n,Math.round(Math.min(o/a[1],o/a[2])));return[{dimensions:{x:0,y:0,width:c,height:r},sides:Pt|St|kt},{dimensions:{x:0,y:r+n,width:o,height:i},sides:Nt|Pt},{dimensions:{x:o+n,y:r+n,width:c-o-n,height:i},sides:Nt|kt}]}(e)}(u):function(e){const{proportions:t}=e;return"w"===t[0]?function({maxWidth:e,ratios:t,spacing:a,maxHeight:s,minWidth:n}){const c=e,r=Math.round(Math.min(c/t[0],.66*(s-a))),o=Math.round((e-2*a)/(t[1]+t[2]+t[3])),i=Math.max(n,Math.round(Math.min(.4*(e-2*a),o*t[1]))),l=Math.round(Math.max(Math.max(n,.33*(e-2*a)),o*t[3])),d=c-i-l-2*a,b=Math.min(s-r-a,o);return[{dimensions:{x:0,y:0,width:c,height:r},sides:Pt|St|kt},{dimensions:{x:0,y:r+a,width:i,height:b},sides:Nt|Pt},{dimensions:{x:i+a,y:r+a,width:d,height:b},sides:Nt},{dimensions:{x:i+a+d+a,y:r+a,width:l,height:b},sides:kt|Nt}]}(e):function({maxHeight:e,ratios:t,maxWidth:a,spacing:s,minWidth:n}){const c=e,r=Math.round(Math.min(c*t[0],.6*(a-s))),o=Math.round((e-2*s)/(1/t[1]+1/t[2]+1/t[3])),i=Math.round(o/t[1]),l=Math.round(o/t[2]),d=c-i-l-2*s,b=Math.max(n,Math.min(a-r-s,o));return[{dimensions:{x:0,y:0,width:r,height:c},sides:St|Pt|Nt},{dimensions:{x:r+s,y:0,width:b,height:i},sides:St|kt},{dimensions:{x:r+s,y:i+s,width:b,height:l},sides:kt},{dimensions:{x:r+s,y:i+l+2*s,width:b,height:d},sides:Nt|kt}]}(e)}(u),{layout:b,containerStyle:xt(b)}}let Lt;function Ft(e){return Lt||(Lt=document.createElement("span"),Lt.style.font='400 12px Roboto, "Helvetica Neue", "Apple Color Emoji", sans-serif',Lt.style.whiteSpace="nowrap",Lt.style.position="absolute",Lt.style.left="-999px",Lt.style.opacity=".01",document.body.appendChild(Lt)),Lt.innerHTML=e,Lt.offsetWidth}function Bt(e,t,a,s,n){Object(c.o)(()=>{if(a&&e.current){const t=e.current.closest(".MessageList");Object(ft.a)(t,e.current,n?"end":"center",20,void 0===s?1500:1e3,s)}},[e,t,a,s,n])}var Dt=a(99),Ut=a(177);var Ht=e=>{const{isOpen:t}=e,a=Object(Ie.a)(pe.a.Extra,"ContextMenuContainer",!t);return a?c.a.createElement(a,e):void 0};var qt=Object(c.h)(Object(s.h)((e,{message:t})=>{const a=t.senderId,{targetUserId:s,targetChatId:n}=t.content.action||{},c=t.replyToMessageId,r=c?Object(o.k)(e,t.chatId,c):void 0,i=Object(o.S)(e,t),{direction:l,noHighlight:d}=i&&e.focusedMessage||{},b=Object(o.f)(e,t.chatId);return{sender:b&&(Object(m.jb)(b)||a===t.chatId)?b:a?Object(o.Bb)(e,a):void 0,...s&&{targetUser:Object(o.Bb)(e,s)},targetChatId:n,targetMessage:r,isFocused:i,...i&&{focusDirection:l,noFocusHighlight:d}}})(({message:e,observeIntersection:t,isEmbedded:a,sender:s,targetUser:n,targetMessage:r,targetChatId:o,isFocused:i,focusDirection:l,noFocusHighlight:d})=>{const b=Object(c.q)(null);Object(Ot.c)(b,t),Object(ze.a)(e.chatId,e.replyToMessageId,r),Bt(b,e.chatId,i,l,d),Object(te.a)();const u=Object(Ut.a)(e,s,n,r,o,a?{isEmbedded:!0,asPlain:!0}:void 0),{isContextMenuOpen:m,contextMenuPosition:h,handleBeforeContextMenu:O,handleContextMenu:j,handleContextMenuClose:g,handleContextMenuHide:f}=Object(vt.a)(b),p=void 0!==h;return a?c.a.createElement("span",{className:"embedded-action-message"},Object(Ze.a)(u)):c.a.createElement("div",{ref:b,id:"message"+e.id,className:Object(J.a)("ActionMessage message-list-item",i&&!d&&"focused",p&&"has-menu-open"),"data-message-id":e.id,onMouseDown:O,onContextMenu:j},c.a.createElement("span",null,u),h&&c.a.createElement(Ht,{isOpen:m,anchor:h,message:e,messageListType:"thread",onClose:g,onCloseAnimationEnd:f}))}));a(204);var Gt=({className:e,message:t,sender:a,title:s,customText:n,observeIntersection:r,onClick:o})=>{const i=Object(c.q)(null),l=Object(Ot.b)(i,r),d=Object(Xe.a)(t&&Object(m.D)(t,"pictogram"),!l),b=t&&"sticker-reply-thumb"+t.id,u=tt(t);Object(te.a)();const h=a&&Object(m.U)(a);return c.a.createElement("div",{ref:i,className:Object(J.a)("EmbeddedMessage",e),onClick:t?o:void 0},u&&function(e,t,a){const{width:s,height:n}=Object(Je.k)();return c.a.createElement("img",{id:e,src:a||t,width:s,height:n,alt:""})}(b,u,d),c.a.createElement("div",{className:"message-text"},c.a.createElement("div",{className:"message-title"},Object(Ze.a)(h||s||" ")),c.a.createElement("p",null,t?Object(m.db)(t)?c.a.createElement(qt,{message:t,isEmbedded:!0}):Object(Ze.a)(Object(m.M)(t,Boolean(u))):n||" ")))},_t=a(150),zt=a(155),Vt=a(161);a(208);var $t=({message:e,outgoingStatus:t,signature:a,onClick:s})=>{const n=Object(te.a)();return c.a.createElement("span",{className:"MessageMeta",onClick:s},Boolean(e.views)&&c.a.createElement(c.a.Fragment,null,c.a.createElement("span",{className:"message-views"},Object($e.b)(e.views)),c.a.createElement("i",{className:"icon-channelviews"})),a&&c.a.createElement("span",{className:"message-signature"},Object(Ze.a)(a)),c.a.createElement("span",{className:"message-time"},e.isEdited&&n("EditedMessage")+" ",Object(x.h)(1e3*e.date)),t&&c.a.createElement(Vt.a,{status:t}))},Wt=a(102),Qt=a(105),Kt=a(151);a(209);var Yt=({message:e,observeIntersection:t,observeIntersectionForPlaying:a,shouldLoop:s,lastSyncTime:r})=>{const o=Object(c.q)(null),[i,l,d]=Object(nt.a)(),b=e.content.sticker,{isAnimated:u,stickerSetId:h}=b,O=h===n.K,j=Object(Ot.b)(o,t),g=Object(Ot.b)(o,a),f=b.isPreloadedGlobally?"sticker"+b.id:Object(m.D)(e,"inline"),p=tt(e),I=Object(Xe.a)(f,!j,Object(m.C)(e,"inline",!0),r),v=Boolean(I),[y,w]=Object(nt.a)(v),C=u?y:v,{shouldRenderFullMedia:E,transitionClassNames:M}=Object(Wt.a)(C,"slow"),{width:S,height:k}=Object(Je.l)(b),N=Object(J.a)("thumbnail",!p&&"empty"),P=Object(J.a)("Sticker media-inner",O&&"inactive");return c.a.createElement("div",{ref:o,className:P,onClick:O?void 0:l},!C&&c.a.createElement("img",{id:"sticker-thumb-"+e.id,src:p,width:S,height:k,alt:"",className:N}),!u&&E&&c.a.createElement("img",{id:"sticker-"+e.id,src:I,width:S,height:k,alt:"",className:Object(J.a)("full-media",M)}),u&&v&&c.a.createElement(Qt.a,{key:f,className:Object(J.a)("full-media",M),id:f,animationData:I,size:S,play:g,noLoop:!s,onLoad:w}),c.a.createElement(Kt.a,{isOpen:i,fromSticker:b,onClose:d}))},Jt=a(119),Zt=a(112),Xt=a(135);function ea(e,t){return Object(Xt.a)(Object(m.E)(e),Boolean(t),h.f?n.C:void 0)}var ta=async(e,t,a,s)=>s?"rgba(255,255,255,1)":async function(e,t){const a=new Image;a.src=e,a.width||await new Promise(e=>{a.onload=e});const s=document.createElement("canvas"),n=s.getContext("2d");s.width=a.width,s.height=a.height,n.drawImage(a,0,0,a.width,a.height);const c=t?a.width-1:0,r=a.height-1;return`rgba(${Array.from(n.getImageData(c,r,1,1).data).join(",")})`}(e,t);var aa=a(113);var sa=({id:e,message:t,observeIntersection:a,shouldAutoLoad:s,isInSelectMode:n,isSelected:r,uploadProgress:o,size:i="inline",dimensions:l,shouldAffectAppendix:d,onClick:b,onCancelUpload:u})=>{const h=Object(c.q)(null),O=(Object(m.G)(t)||Object(m.Q)(t)).blobUrl,j=Object(Ot.b)(h,a),[g,f]=Object(c.r)(s),p=g&&j,{mediaData:I,downloadProgress:v}=Object(Zt.a)(Object(m.D)(t,i),!p),y=O||I,w=ea(t,y),{isUploading:C,isTransferring:E,transferProgress:M}=Object(m.s)(t,o||v,p&&!y),S=!1===Object(He.a)(g),{shouldRender:k,transitionClassNames:N}=Object(Y.a)(E,void 0,S,"slow"),{shouldRenderThumb:P,shouldRenderFullMedia:T,transitionClassNames:A}=Object(Wt.a)(y,"slow"),x=Object(c.m)(()=>{C?u&&u(t):y?b&&b(t.id):f(e=>!e)},[y,C,t,u,b]),R=Object(m.tb)(t);Object(c.o)(()=>{if(!d)return;const e=h.current.closest(".message-content");y?ta(y,R,0,r).then(t=>{e.style.setProperty("--appendix-bg",t),e.setAttribute("data-has-custom-appendix","")}):e.classList.add("has-appendix-thumb")},[y,R,d,n,r]);const{width:L,height:F,isSmall:B}=l||Et(t),D=Object(J.a)("media-inner",!C&&"interactive",B&&"small-image",L===F&&"square-image"),U=Object(J.a)("thumbnail",!w&&"empty"),H=l?`width: ${L}px; height: ${F}px; left: ${l.x}px; top: ${l.y}px;`:"";return c.a.createElement("div",{id:e,ref:h,className:D,style:H,onClick:C?void 0:x},P&&c.a.createElement("img",{src:w,className:U,width:L,height:F,alt:""}),T&&c.a.createElement("img",{src:y,className:"full-media "+A,width:L,height:F,alt:""}),k&&c.a.createElement("div",{className:"media-loading "+N},c.a.createElement(aa.a,{progress:M,onClick:C?x:void 0})),!y&&!g&&c.a.createElement("i",{className:"icon-download"}),E&&c.a.createElement("span",{className:"message-upload-progress"},Math.round(100*M),"%"))},na=a(121),ca=a(133);function ra(e,t){const a=Object(c.q)();a.current=t;const s=Object(c.m)(()=>{e.current&&e.current.pause()},[e]),n=Object(c.m)(()=>{e.current&&a.current&&Object(ca.a)(e.current)},[e]);Object(K.a)(s,n)}var oa=a(136);function ia(){return(ia=Object.assign||function(e){for(var t=1;t{const b=Object(c.q)(null),u=Object(c.q)(null),h=t.content.video,O=h.blobUrl,j=Boolean(O)||Object(m.b)(h),g=Object(Ot.b)(b,a),[f,p]=Object(c.r)(s),I=Boolean(f&&g&&o),[v,y]=Object(c.r)(n),w=Object(Xe.a)(Object(m.D)(t,"pictogram"),!(g&&o),Object(m.C)(t,"pictogram"),o),C=ea(t,w),{mediaData:E,downloadProgress:M}=Object(Zt.a)(Object(m.D)(t,"inline"),!I,Object(m.C)(t,"inline"),o),S=w||C,k=O||E,N=Boolean(j&&g&&k),{isBuffered:P,bufferingHandlers:T}=Object(na.a)(!s),{isUploading:A,isTransferring:R,transferProgress:L}=Object(m.s)(t,r||M,I&&j&&!P),F=!1===Object(He.a)(f),{shouldRender:B,transitionClassNames:D}=Object(Y.a)(R,void 0,F),{shouldRenderThumb:U,transitionClassNames:H}=Object(Wt.a)(k,"slow"),[q,G]=Object(c.r)(0),_=Object(c.m)(e=>{G(Math.max(0,e.currentTarget.currentTime-1))},[]),z=Object(m.tb)(t),V=Object(m.qb)(t),{width:$,height:W}=i||Object(Je.h)(h,z,V);ra(u,N),Object(oa.a)(u,[N]);const Q=Object(c.m)(()=>{A?d&&d(t):j&&!k?p(e=>!e):j&&k&&!v?(y(!0),u.current.play()):l&&l(t.id)},[A,j,k,v,l,d,t]),K=Object(J.a)("media-inner dark",!A&&"interactive"),Z=Object(J.a)("thumbnail",!S&&"empty"),X=Object(J.a)("full-media",H),ee=S?`background-image: url(${S}); background-size: cover`:"",te=i?`width: ${$}px; height: ${W}px; left: ${i.x}px; top: ${i.y}px;`:"",ae=N,se=!j&&E,ne=!j||f&&!v&&!B,ce=j&&!f;return c.a.createElement("div",{ref:b,id:e,className:K,style:te,onClick:A?void 0:Q},(U||!N)&&c.a.createElement("img",{src:S,className:Z,width:$,height:W,alt:""}),ae&&c.a.createElement("video",ia({ref:u,className:X,width:$,height:W,autoPlay:v,muted:!0,loop:!0,playsInline:!0,style:ee},T,{onTimeUpdate:_}),c.a.createElement("source",{src:k})),se&&c.a.createElement("img",{src:E,className:"full-media "+H,width:$,height:W,alt:""}),ne&&c.a.createElement("i",{className:"icon-large-play"}),B&&c.a.createElement("div",{className:"media-loading "+D},c.a.createElement(aa.a,{progress:L,onClick:A?Q:void 0})),ce&&c.a.createElement("i",{className:"icon-download"}),R&&!j?c.a.createElement("span",{className:"message-upload-progress"},Math.round(100*L),"%"):R&&j?c.a.createElement("span",{className:"message-upload-progress"},"..."):c.a.createElement("div",{className:"message-media-duration"},h.isGif?"GIF":Object(x.e)(h.duration-q)))},da=a(19);a(211);var ba=Object(s.h)((e,{contact:t})=>({user:Object(o.Bb)(e,t.userId)}),(e,t)=>Object(d.l)(t,["openUserInfo"]))(({contact:e,user:t,openUserInfo:a})=>{const{firstName:s,lastName:n,phoneNumber:r,userId:o}=e,i=Object(c.m)(()=>{a({id:o})},[a,o]);return c.a.createElement("div",{className:Object(J.a)("Contact",Boolean(o)&&"interactive"),onClick:o?i:void 0},c.a.createElement(Dt.a,{size:"large",user:t,text:s||n}),c.a.createElement("div",{className:"contact-info"},c.a.createElement("div",{className:"contact-name"},s," ",n),c.a.createElement("div",{className:"contact-phone"},Object(da.c)(r))))}),ua=a(40);var ma=Object(c.h)(({id:e,options:t,selected:a=[],disabled:s,round:n,loadingOptions:r,onChange:o})=>{const[i,l]=Object(c.r)([]),d=Object(c.m)(e=>{const{value:t,checked:a}=e.currentTarget;let s;s=a?[...i,t]:i.filter(e=>e!==t),l(s),o(s)},[o,i]);return c.a.createElement("div",{id:e,className:"radio-group"},t.map(e=>c.a.createElement(ua.a,{label:e.label,subLabel:e.subLabel,value:e.value,checked:-1!==a.indexOf(e.value),disabled:s,round:n,isLoading:r?-1!==r.indexOf(e.value):void 0,onChange:d})))}),ha=a(117),Oa=a(169);a(214);function ja(e,t){return t>0?(e/t*100).toFixed():0}var ga=({answer:e,voteResults:t,totalVoters:a,maxVotersCount:s,correctResults:n,shouldAnimate:r})=>{const o=t&&t.find(t=>t.option===e.option),i=0===n.length||-1!==n.indexOf(e.option),l=n.length>0&&i||o&&o.isChosen,d=o?ja(o.votersCount,a||0):0,[b,u]=Object(c.r)(r?0:d),m=Object(c.q)(null),h=o?ja(o.votersCount,s||0):0,O=b{r&&u(d)},[r,d]),Object(c.n)(()=>{const e=m.current;if(e&&r){const t=e.firstElementChild,a=O?"":"stroke-dasharray: 100% 200%; stroke-dashoffset: -44";t?t.setAttribute("style",a):e.innerHTML=`\n \n \n `}},[O,r]),!t||!o)return;const j=`width: ${h}%; transform:scaleX(${O?0:1})`;return c.a.createElement("div",{className:"PollOption"},c.a.createElement("div",{className:"poll-option-share "+("100"===d?"limit-width":"")},d,"%",l&&c.a.createElement("span",{className:Object(J.a)("poll-option-chosen",!i&&"wrong",r&&"animate")},c.a.createElement("i",{className:i?"icon-check":"icon-close"}))),c.a.createElement("div",{className:"poll-option-right"},c.a.createElement("div",{className:"poll-option-text"},Object(Ze.a)(e.text)),c.a.createElement("div",{className:Object(J.a)("poll-option-answer",l&&!i&&"wrong")},c.a.createElement("div",{className:"poll-option-corner",ref:m}),c.a.createElement("div",{className:"poll-option-line",style:j}))))};a(215);var fa=Object(c.h)(Object(s.h)((e,{poll:t})=>{const{recentVoterIds:a}=t.results,{byId:s}=e.users;return a&&0!==a.length?{recentVoterIds:a,usersById:s}:{}},(e,t)=>Object(d.l)(t,["loadMessage","openPollResults"]))(({message:e,poll:t,recentVoterIds:a,usersById:s,loadMessage:n,onSendVote:r,openPollResults:o})=>{const{id:i,chatId:l}=e,{summary:d,results:b}=t,[u,m]=Object(c.r)(!1),[h,O]=Object(c.r)([]),[j,g]=Object(c.r)(!1),[f,p]=Object(c.r)(!1),[I,v]=Object(c.r)(!d.closed&&d.closeDate&&d.closeDate>0?Math.min(d.closeDate-Math.floor(Date.now()/1e3),d.closePeriod):0),y=Object(c.q)(null),{results:w,totalVoters:C}=b,E=w&&w.some(e=>e.isChosen),M=!d.closed&&!E,S=!M&&d.isPublic&&Number(b.totalVoters)>0,k=M&&d.multipleChoice,N=w?Math.max(...w.map(e=>e.votersCount)):C,P=w?w.reduce((e,t)=>(t.isCorrect&&e.push(t.option),e),[]):[],T=d.answers.map(e=>({label:e.text,value:e.option,hidden:Boolean(d.quiz&&d.closePeriod&&I<=0)}));Object(c.n)(()=>{u&&t.results.results&&t.results.results.some(e=>e.isChosen)&&m(!1)},[u,t.results.results]),Object(c.n)(()=>{I>0&&setTimeout(()=>v(I-1),1e3);const e=y.current;if(e){const t=12*Math.PI,a=e.lastElementChild,s=e.firstElementChild;if(I<=5&&e.classList.add("hurry-up"),a&&s){const e=(d.closePeriod-I)/d.closePeriod*t;s.textContent=Object(x.e)(I),a.firstElementChild.setAttribute("stroke-dashoffset","-"+e)}else e.innerHTML=`\n ${Object(x.e)(I)}\n \n \n `}},[I,d.closePeriod]),Object(c.n)(()=>{d.quiz&&(I<=0||E&&!d.closed)&&n({chatId:l,messageId:i})},[l,I,E,n,i,d.closed,d.quiz]),Object(c.n)(()=>{let e;return d.quiz&&!d.closed&&d.closePeriod&&d.closePeriod>0&&(e=window.setTimeout(()=>{n({chatId:l,messageId:i})},1e3*d.closePeriod)),()=>{e&&window.clearTimeout(e)}},[M,l,n,i,d.closePeriod,d.closed,d.quiz]);const A=Object(c.p)(()=>a?a.reduce((e,t)=>{const a=s[t];return a&&e.push(a),e},[]):[],[s,a]),R=Object(c.m)(e=>{O([e]),m(!0),p(!0),r([e])},[r]),L=Object(c.m)(e=>{O(e)},[]),F=Object(c.m)(()=>{m(!0),p(!0),r(h)},[r,h]),B=Object(c.m)(()=>{o({chatId:l,messageId:i})},[l,i,o]),D=Object(c.m)(()=>{g(!0)},[]),U=Object(c.m)(()=>{g(!1),p(!1)},[]);Object(c.n)(()=>{if(f&&E&&d.quiz&&b.results&&t.results.solution){b.results.find(e=>e.isChosen&&e.isCorrect)||g(!0)}},[E,f,b.results,d.quiz,t.results.solution]);const H=Object(te.a)();return c.a.createElement("div",{className:"Poll"},j&&t.results.solution&&c.a.createElement(Oa.a,{message:Object(yt.b)(t.results.solution,t.results.solutionEntities),duration:5e3,onDismiss:U}),c.a.createElement("div",{className:"poll-question"},Object(Ze.a)(d.question)),c.a.createElement("div",{className:"poll-type"},function(e){if(void 0===e.isPublic)return" ";if(e.quiz)return e.isPublic?"Quiz":"Anonymous Quiz";if(e.closed)return"Final results";return e.isPublic?"Poll":"Anonymous Poll"}(d),A.length>0&&c.a.createElement("div",{className:"poll-recent-voters"},A.map(e=>c.a.createElement(Dt.a,{size:"micro",user:e}))),I>0&&M&&c.a.createElement("div",{ref:y,className:"poll-countdown"}),d.quiz&&t.results.solution&&!M&&c.a.createElement(ne.a,{round:!0,size:"tiny",color:"translucent",className:"poll-quiz-help",disabled:j,onClick:D,ariaLabel:"Show Solution"},c.a.createElement("i",{className:"icon-lamp"}))),M&&c.a.createElement("div",{className:"poll-answers"},k?c.a.createElement(ma,{options:T,onChange:L,disabled:e.isScheduled||u,loadingOptions:u?h:void 0,round:!0}):c.a.createElement(ha.a,{name:"poll-"+i,options:T,onChange:R,disabled:e.isScheduled||u,loadingOption:u?h[0]:void 0})),!M&&c.a.createElement("div",{className:"poll-results"},d.answers.map((function(e){return c.a.createElement(ga,{key:e.option,shouldAnimate:f,answer:e,voteResults:w,totalVoters:C,maxVotersCount:N,correctResults:P})}))),!S&&!k&&c.a.createElement("div",{className:"poll-voters-count"},function(e,t){if(!t)return e?"No answers yet":"No voters yet";return e?t+" answered":t+" voted"}(d.quiz,b.totalVoters)),k&&c.a.createElement(ne.a,{isText:!0,disabled:0===h.length,size:"tiny",onClick:F},H("PollSubmitVotes")),S&&c.a.createElement(ne.a,{isText:!0,size:"tiny",onClick:B},H("PollViewResults")))})),pa=a(145),Ia=a(52);a(216);var va=Object(c.h)(({message:e,observeIntersection:t,shouldAutoLoad:a,inPreview:s,onMediaClick:n,onCancelMediaTransfer:r})=>{const o=Object(m.P)(e);let i=!1;if(o&&o.photo){const{width:t,height:a}=Et(e);i=t===a}const l=Object(c.m)(()=>{o&&(i||o.hasDocument)?window.open(o.url):n&&n()},[o,i,n]);if(!o)return;const{siteName:d,url:b,displayUrl:u,title:h,description:O,photo:j}=o,g=Object(pa.a)(O,170),f=["WebPage",j?i&&"with-square-photo":!s&&"without-photo"].filter(Boolean).join(" ");return c.a.createElement("div",{className:f,"data-initial":(d||u)[0]},j&&c.a.createElement(sa,{message:e,observeIntersection:t,shouldAutoLoad:a,size:i?"pictogram":"inline",onClick:l,onCancelUpload:r}),c.a.createElement("div",{className:"WebPage-text"},c.a.createElement(Ia.a,{className:"site-name",url:b,text:d||u}),h&&c.a.createElement("p",{className:"site-title"},Object(Ze.a)(h)),g&&c.a.createElement("p",{className:"site-description"},Object(Ze.a)(g,["emoji","br"]))))});a(217);var ya=Object(c.h)(({message:e})=>{const t=Object(m.z)(e),{title:a,text:s,description:n,photoUrl:r}=t;return c.a.createElement("div",{className:"Invoice"},a&&c.a.createElement("p",{className:"title"},Object(Ze.a)(a)),s&&c.a.createElement("p",null,Object(Ze.a)(s,["emoji","br"])),c.a.createElement("div",{className:"description "+(r?"has-image":"")},r&&c.a.createElement("img",{className:"invoice-image",src:r,alt:""}),n&&c.a.createElement("p",{className:"description-text"},Object(Ze.a)(n,["emoji","br"]))))});function wa(e){return Object(c.h)(Object(s.h)((e,t)=>{const{message:a}=t;return{isInSelectMode:Object(o.Q)(e),isSelected:Object(o.T)(e,a.id)}},(e,t)=>Object(d.l)(t,["toggleMessageSelection"]))(t=>{const{isInSelectMode:a,isSelected:s,message:n,toggleMessageSelection:r,dimensions:o}=t,i=Object(c.m)(e=>{e.stopPropagation(),r({messageId:n.id,withShift:e&&e.shiftKey})},[r,n]),l=Object(c.p)(()=>({...t,isInSelectMode:a,isSelected:s,dimensions:{...t.dimensions,x:0,y:0},onClick:a?void 0:t.onClick}),[t,a,s]);return c.a.createElement("div",{className:Object(J.a)("album-item-select-wrapper",s&&"is-selected"),style:o?`left: ${o.x}px; top: ${o.y}px;`:"",onClick:a?i:void 0},a&&c.a.createElement("div",{className:"message-select-control"},s&&c.a.createElement("i",{className:"icon-select"})),c.a.createElement(e,l))}))}a(218);const Ca=wa(sa),Ea=wa(la);var Ma=Object(s.h)(e=>({uploadsById:e.fileUploads.byMessageLocalId}),(e,t)=>Object(d.l)(t,["cancelSendingMessage"]))(({album:e,observeIntersection:t,shouldAutoLoad:a,shouldAutoPlay:s,hasCustomAppendix:n,lastSyncTime:r,isOwn:o,albumLayout:i,onMediaClick:l,uploadsById:d,cancelSendingMessage:b})=>{const u=e.messages.length,h=Object(c.m)(e=>{b({chatId:e.chatId,messageId:e.id})},[b]);const{width:O,height:j}=i.containerStyle;return c.a.createElement("div",{className:"Album",style:`width: ${O}px; height: ${j}px;`},e.messages.map((function(e,b){const{photo:O,video:j}=Object(m.v)(e),g=d[e.previousLocalId||e.id],f=g?g.progress:void 0,{dimensions:p,sides:I}=i.layout[b];if(O){const s=n&&(o?b===u-1:Boolean(I&Pt&&I&Nt));return c.a.createElement(Ca,{id:"album-media-"+e.id,message:e,observeIntersection:t,shouldAutoLoad:a,shouldAffectAppendix:s,uploadProgress:f,dimensions:p,onClick:l,onCancelUpload:h})}if(j)return c.a.createElement(Ea,{id:"album-media-"+e.id,message:e,observeIntersection:t,shouldAutoLoad:a,shouldAutoPlay:s,uploadProgress:f,lastSyncTime:r,dimensions:p,onClick:l,onCancelUpload:h})})))});a(219);function Sa(){return(Sa=Object.assign||function(e){for(var t=1;t{const r=Object(c.q)(null),o=Object(c.q)(null),i=Object(c.q)(null),l=e.content.video,d=Object(Ot.b)(r,t),[b,u]=Object(c.r)(a&&s),h=Boolean(b&&d&&n),{mediaData:O,downloadProgress:j}=Object(Zt.a)(Object(m.D)(e,"inline"),!h,Object(m.C)(e,"inline"),n),g=ea(e,O),{isBuffered:f,bufferingHandlers:p}=Object(na.a)(),I=b&&!f,v=!1===Object(He.a)(b),{shouldRender:y,transitionClassNames:w}=Object(Y.a)(I||!f,void 0,v),{shouldRenderThumb:C,transitionClassNames:E}=Object(Wt.a)(O,"slow"),[M,S]=Object(c.r)(!1),[k,N]=Object(c.r)(0);Object(c.n)(()=>{if(!M)return;const e=188*Math.PI,t=e-k*e,a=i.current,s=o.current,n=s.firstElementChild;n?n.firstElementChild.setAttribute("stroke-dashoffset",t.toString()):s.innerHTML=`\n \n `,N(a.currentTime/a.duration)},[M,k]);const P=Boolean(O&&d);Object(c.n)(()=>{i.current&&(P?Object(ca.a)(i.current):i.current.pause())},[P]),ra(i,P),Object(oa.a)(i,[O]);const T=Object(c.m)(()=>{if(!O)return void u(e=>!e);const e=i.current;M?e.paused?Object(ca.a)(e):e.pause():(e.currentTime=0,S(!0))},[M,O]),A=Object(c.m)(e=>{const t=e.currentTarget;N(t.currentTime/t.duration)},[]),R=Object(c.m)(()=>{S(!1),N(0),Object(ca.a)(i.current),requestAnimationFrame(()=>{o.current.innerHTML=""})},[]),L=Object(J.a)("full-media",E);return c.a.createElement("div",{ref:r,className:"RoundVideo media-inner",onClick:T},C&&c.a.createElement("div",{className:"thumbnail-wrapper"},c.a.createElement("img",{src:g,className:"thumbnail",width:Je.d,height:Je.d,alt:""})),O&&c.a.createElement("div",{className:"video-wrapper"},c.a.createElement("video",Sa({ref:i,className:L,width:Je.d,height:Je.d,autoPlay:!0,muted:!M,loop:!M,playsInline:!0,poster:g,onEnded:M?R:void 0},p,{onTimeUpdate:M?A:void 0}),c.a.createElement("source",{src:O}))),c.a.createElement("div",{className:"progress",ref:o}),y&&c.a.createElement("div",{className:"media-loading "+w},c.a.createElement(aa.a,{progress:j})),!O&&!b&&c.a.createElement("i",{className:"icon-large-play"}),c.a.createElement("div",{className:"message-media-duration"},M?Object(x.e)(i.current.currentTime):Object(x.e)(l.duration),(!M||i.current.paused)&&c.a.createElement("i",{className:"icon-muted-chat"})))};a(220);var Na=({message:e,onClick:t})=>c.a.createElement("div",{className:"InlineButtons"},e.inlineButtons.map(e=>c.a.createElement("div",{className:"row"},e.map(e=>c.a.createElement(ne.a,{size:"tiny",ripple:!0,disabled:"NOT_SUPPORTED"===e.type,onClick:()=>t({button:e})},e.text)))));a(221);var Pa=Object(c.h)(Object(s.h)((e,{message:t})=>{const{threadId:a,chatId:s}=t.threadInfo,n=Object(o.xb)(e,s,a)||t.threadInfo,{byId:c}=e.users,{byId:r}=e.chats;return{threadInfo:n,usersById:c,chatsById:r}},(e,t)=>Object(d.l)(t,["openChat"]))(({disabled:e,threadInfo:t,usersById:a,chatsById:s,openChat:n})=>{const{threadId:r,chatId:o,messagesCount:i,lastMessageId:l,lastReadInboxMessageId:d,recentReplierIds:b}=t,u=Object(c.m)(()=>{n({id:o,threadId:r})},[n,o,r]);if(void 0===i)return;const h=b&&b.map(e=>Object(m.lb)(e)?a[e]:s[e]).filter(Boolean);const O=Boolean(d&&l&&d0&&c.a.createElement("div",{className:"recent-repliers"},h.map(e=>c.a.createElement(Dt.a,{key:e.id,size:"small",user:Object(m.lb)(e.id)?e:void 0,chat:Object(m.lb)(e.id)?void 0:e}))),c.a.createElement("div",{className:"label"},function(e){if(0===e)return"Leave a Comment";if(1===e)return"1 Comment";return Object($e.a)(e)+" Comments"}(i)),c.a.createElement("i",{className:"icon-next"}))}));a(222);function Ta(e){const t=xa(e.currentTarget);t&&t.setAttribute("data-is-document-group-hover","")}function Aa(e){const t=xa(e.currentTarget);t&&t.removeAttribute("data-is-document-group-hover")}function xa(e){let t=e;do{t=t.nextElementSibling}while(t&&!t.classList.contains("last-in-document-group"));return t}var Ra=Object(c.h)(Object(s.h)((e,t)=>{const{focusedMessage:a,forwardMessages:s,lastSyncTime:n}=e,{message:c,album:r,withSenderName:i,withAvatar:l,threadId:d,messageListType:b}=t,{id:u,chatId:h,viaBotId:O,replyToMessageId:j,isOutgoing:g}=c,f=Object(o.f)(e,h),p=Object(o.N)(e,h),I=f&&Object(m.jb)(f),v=!p&&Object(m.eb)(c),y=i||l||v?Object(o.ob)(e,c):void 0,w=Object(o.I)(e,c),C=O?Object(o.Bb)(e,O):void 0,E=d?Object(o.zb)(e,h,d):void 0,M=c.id===E,S=j===E,k=j&&!S?Object(o.k)(e,h,j):void 0,N=k&&Object(o.ob)(e,k),P=Object(o.Ab)(e,c),T="thread"===b&&(r?r.messages.some(t=>Object(o.S)(e,t)):Object(o.S)(e,c)),{direction:A,noHighlight:x}=T&&a||{},R=s.messageIds&&s.messageIds.includes(u),{query:L}=Object(o.z)(e)||{},F=Object(m.K)(c);let B;return B=r&&r.messages?r.messages.every(({id:t})=>Object(o.T)(e,t)):Object(o.T)(e,u),{forceSenderName:v,sender:y,originSender:w,botSender:C,shouldHideReply:S,isThreadTop:M,replyMessage:k,replyMessageSender:N,...g&&{outgoingStatus:Object(o.ab)(e,c,"scheduled"===b)},..."number"==typeof P&&{uploadProgress:P},isFocused:T,...T&&{focusDirection:A,noFocusHighlight:x},isForwarding:R,isChatWithSelf:p,isChannel:I,lastSyncTime:n,highlight:L,isSingleEmoji:Boolean(F),animatedEmoji:F?Object(o.c)(e,F):void 0,isInSelectMode:Object(o.Q)(e),isSelected:B,isGroupSelected:!!c.groupedId&&!c.isInAlbum&&Object(o.O)(e,h,c.groupedId),threadId:d,isPinnedList:"pinned"===b,shouldAutoLoadMedia:f?Object(o.pb)(e,c,f,y):void 0,shouldAutoPlayMedia:Object(o.qb)(e,c),shouldLoopStickers:Object(o.rb)(e)}},(e,t)=>Object(d.l)(t,["focusMessage","openMediaViewer","openAudioPlayer","cancelSendingMessage","openUserInfo","openChat","markMessagesRead","sendPollVote","toggleMessageSelection","setReplyingToId","openForwardMenu","clickInlineButton"]))(({message:e,observeIntersectionForBottom:t,observeIntersectionForMedia:a,observeIntersectionForAnimatedStickers:s,album:n,withAvatar:r,withSenderName:o,noComments:d,isFirstInGroup:b,isLastInGroup:u,isFirstInDocumentGroup:h,isLastInDocumentGroup:O,isLastInList:j,forceSenderName:g,sender:f,originSender:p,botSender:I,isThreadTop:v,shouldHideReply:y,replyMessage:w,replyMessageSender:C,outgoingStatus:E,uploadProgress:M,isFocused:S,focusDirection:k,noFocusHighlight:N,isForwarding:P,isChatWithSelf:T,isChannel:A,lastSyncTime:x,highlight:R,animatedEmoji:L,isInSelectMode:F,isSelected:B,isGroupSelected:D,threadId:U,messageListType:H,isPinnedList:q,shouldAutoLoadMedia:G,shouldAutoPlayMedia:_,shouldLoopStickers:z,focusMessage:V,openMediaViewer:$,openAudioPlayer:W,openUserInfo:Q,openChat:K,cancelSendingMessage:Y,markMessagesRead:Z,sendPollVote:X,toggleMessageSelection:ee,setReplyingToId:ae,openForwardMenu:se,clickInlineButton:ce})=>{const re=Object(c.q)(null),oe=Object(c.q)(null),ie=Object(c.q)(null);Object(Ot.c)(oe,t);const{width:le}=Ue(),{isContextMenuOpen:de,contextMenuPosition:be,handleBeforeContextMenu:ue,handleContextMenu:me,handleContextMenuClose:he,handleContextMenuHide:Oe}=Object(vt.a)(re),{chatId:je,id:ge,threadInfo:fe}=e,pe=Object(m.tb)(e),Ie="scheduled"===H||e.isScheduled,ve=Object(m.ub)(e)&&!y,ye=Boolean(fe)&&"thread"===H,{forwardInfo:we,viaBotId:Ce}=e,Ee=we&&!T&&!we.isLinkedChannelPost,Me=!!e.groupedId&&!e.isInAlbum,Se=Boolean(n)&&n.messages.length>1,{text:ke,photo:Ne,video:Pe,audio:Te,voice:Ae,document:xe,sticker:Re,contact:Le,poll:Fe,webPage:Be,invoice:De}=Object(m.v)(e),He=Object(m.x)(e),qe=Object(yt.a)(e,R,wt(He)),Ge=void 0!==be,_e=Object(J.a)("Message message-list-item",b&&"first-in-group",u&&"last-in-group",h&&"first-in-document-group",O&&"last-in-document-group",j&&"last-in-list",pe&&"own",Boolean(e.views)&&"has-views",e.isEdited&&"was-edited",ve&&"has-reply",Ge&&"has-menu-open",S&&!N&&"focused",P&&"is-forwarding",e.isDeleting&&"is-deleting",Me&&"is-in-document-group",Se&&"is-album",e.hasUnreadMention&&"has-unread-mention",B&&"is-selected",F&&"is-in-selection-mode",v&&"is-thread-top",Boolean(e.inlineButtons)&&"has-inline-buttons"),Ve=function(e,{hasReply:t,customShape:a,isLastInGroup:s,asForwarded:n,hasThread:c,forceSenderName:r,hasComments:o}={}){const{text:i,photo:l,video:d,audio:b,voice:u,document:h,poll:O,webPage:j,contact:g}=Object(m.v)(e),f=["message-content"],p=(l||d)&&!i,I=Boolean(e.viaBotId);return wt(a)?f.push("emoji-only emoji-only-"+a):i&&f.push("text"),a&&(f.push("custom-shape"),d&&d.isRound&&f.push("round"),o&&f.push("has-comments")),l||d?f.push("media"):b?f.push("audio"):u?f.push("voice"):h?f.push("document"):g?f.push("contact"):O?f.push("poll"):j&&(f.push("web-page"),j.photo&&f.push("media")),n&&!a&&f.push("is-forwarded"),t&&f.push("is-reply"),c&&f.push("has-replies"),I&&f.push("is-via-bot"),r&&f.push("force-sender-name"),a||(f.push("has-shadow"),(t||n||!p||I||r)&&f.push("has-solid-background"),!s||!l&&p||f.push("has-appendix")),f.join(" ")}(e,{hasReply:ve,customShape:He,isLastInGroup:u,asForwarded:Ee,hasThread:ye,forceSenderName:g,hasComments:e.threadInfo&&e.threadInfo.messagesCount>0}),$e=!we||!T&&f?f:p,We=we?p:f,Qe=A&&e.adminTitle||we&&!Ee&&we.adminTitle||void 0;Object(ze.a)(je,ve?e.replyToMessageId:void 0,w,e.id),Bt(re,je,S,k,N),Object(c.n)(()=>{ie.current&&(ie.current.innerHTML=pe?'':'')},[pe]);const Ke=Object(c.m)(t=>{t.stopPropagation(),ee({messageId:ge,groupedId:e.groupedId})},[ge,e.groupedId,ee]),Ye=Object(c.m)(e=>{const t=Se&&n&&n.messages?{messageId:ge,childMessageIds:n.messages.map(({id:e})=>e),withShift:e&&e.shiftKey}:{messageId:ge,withShift:e&&e.shiftKey};ee(t)},[ee,ge,Se,n]),Xe=Object(c.m)(()=>{ae({messageId:ge})},[ae,ge]),et=Object(c.m)(e=>{e.stopPropagation()},[]),tt=Object(c.m)(()=>{$e&&(Object(m.lb)($e.id)?Q({id:$e.id}):K({id:$e.id}))},[$e,Q,K]),at=Object(c.m)(()=>{We&&(Object(m.lb)(We.id)?Q({id:We.id}):K({id:We.id}))},[We,Q,K]),st=Object(c.m)(()=>{I&&Q({id:I.id})},[I,Q]),nt=Object(c.m)(()=>{V({chatId:je,threadId:U,messageId:e.replyToMessageId})},[V,je,U,e.replyToMessageId]),ct=Object(c.m)(()=>{$({chatId:je,threadId:U,messageId:ge,origin:Ie?l.h.ScheduledInline:l.h.Inline})},[je,U,ge,$,Ie]),rt=Object(c.m)(()=>{W({chatId:je,messageId:ge})},[je,ge,W]),ot=Object(c.m)(e=>{$({chatId:je,threadId:U,messageId:e,origin:Ie?l.h.ScheduledAlbum:l.h.Album})},[je,U,$,Ie]),it=Object(c.m)(()=>{Z({messageIds:[ge]})},[ge,Z]),lt=Object(c.m)(()=>{Y({chatId:je,messageId:ge})},[Y,je,ge]),dt=Object(c.m)(e=>{X({chatId:je,messageId:ge,options:e})},[je,ge,X]),bt=Object(c.m)(()=>{se({fromChatId:je,groupedId:e.groupedId})},[se,je,e.groupedId]),ut=Object(c.m)(()=>{if(n&&n.messages){const e=n.messages.map(({id:e})=>e);se({fromChatId:je,messageIds:e})}else se({fromChatId:je,messageIds:[ge]})},[n,se,je,ge]),mt=Object(c.m)(()=>{V({chatId:je,threadId:i.MAIN_THREAD_ID,messageId:ge})},[V,je,ge]),ht=Object(c.m)(()=>{V(Me?{chatId:we.fromChatId,groupedId:e.groupedId,groupedChatId:je}:{chatId:we.fromChatId,messageId:we.fromMessageId})},[V,we,e,je,Me]),jt=Object(te.a)();let gt,ft="";const pt=Object(c.p)(()=>Se?Rt(pe,Boolean(Ee),n,le):void 0,[Se,le,pe,Ee,n]),It=Ee?28:0;if(Se||!Ne&&!Pe)pt&&(gt=Math.max(Ct(Boolean(ke)),pt.containerStyle.width));else{let t;Ne?t=Et(e).width:Pe&&(t=Pe.isRound?Je.d:Et(e).width),t&&(gt=Math.max(Ct(Boolean(ke)),t))}gt&&(ft=`width: ${gt+It}px`);const Mt=Object(c.p)(()=>Qe?Ft(Qe):void 0,[Qe]),St=!(Ge||F||P)&&(!Me||O),kt=St&&A&&!Ie,Nt=St&&(we&&(we.isChannelPost||T&&!pe)&&we.fromMessageId||q),Pt=e.threadInfo&&(!Me||O)&&"thread"===H&&!d;return c.a.createElement("div",{ref:re,id:"message"+ge,className:_e,style:Mt?`--meta-safe-author-width: ${Mt}px`:void 0,"data-message-id":ge,"data-last-message-id":n?n.messages[n.messages.length-1].id:void 0,onClick:F?Ye:void 0,onDoubleClick:F?void 0:Xe,onMouseDown:F?void 0:ue,onContextMenu:F?void 0:me,onMouseEnter:Me&&!O?Ta:void 0,onMouseLeave:Me&&!O?Aa:void 0},c.a.createElement("div",{ref:oe,className:"bottom-marker","data-message-id":ge,"data-has-unread-mention":e.hasUnreadMention}),!Me&&c.a.createElement("div",{className:"message-select-control"},B&&c.a.createElement("i",{className:"icon-select"})),O&&c.a.createElement("div",{className:Object(J.a)("message-select-control group-select",D&&"is-selected"),onClick:Ke},D&&c.a.createElement("i",{className:"icon-select"})),r&&function(){const e=$e&&Object(m.lb)($e.id),t=$e&&e?$e:void 0,a=$e&&!e?$e:void 0,s=!$e&&we?we.hiddenUserName:void 0;return c.a.createElement(Dt.a,{size:"small",user:t,chat:a,text:s,lastSyncTime:x,onClick:t||a?tt:void 0})}(),c.a.createElement("div",{className:"message-content-wrapper",onClick:F&&Me?Ye:void 0},c.a.createElement("div",{className:Ve,style:ft},Ve.includes("has-appendix")&&c.a.createElement("div",{className:"svg-appendix",ref:ie}),Ee&&!He&&(!Me||h)&&c.a.createElement("div",{className:"message-title"},jt("ForwardedMessage")),function(){const t=Object(J.a)("content-inner",Ee&&!He&&"forwarded-message",ve&&"reply-message"),r=u&&!qe&&!Ee&&!ye;return c.a.createElement("div",{className:t,onDoubleClick:et},function(){if(He||!(o&&!Ne&&!Pe||Ee||Ce||g)||Me&&!h)return;let t,a;We?(t=Object(m.U)(We),Ee||(a="color-"+Object(m.X)(We))):we&&we.hiddenUserName&&(t=we.hiddenUserName);return c.a.createElement("div",{className:"message-title"},t?c.a.createElement("span",{className:Object(J.a)(We&&"interactive",a),onClick:We?at:void 0},Object(Ze.a)(t)):I?void 0:" ",I&&c.a.createElement(c.a.Fragment,null,c.a.createElement("span",{className:"via"},jt("ViaBot")),c.a.createElement("span",{className:"interactive",onClick:st},Object(Ze.a)("@"+I.username))),we&&we.isLinkedChannelPost?c.a.createElement("span",{className:"admin-title"},jt("DiscussChannel")):e.adminTitle&&!A?c.a.createElement("span",{className:"admin-title"},e.adminTitle):void 0)}(),ve&&c.a.createElement(Gt,{message:w,sender:C,observeIntersection:a,onClick:nt}),Re&&c.a.createElement(Yt,{message:e,observeIntersection:a,observeIntersectionForPlaying:s,shouldLoop:z,lastSyncTime:x}),L&&c.a.createElement(Jt.a,{isInline:!0,sticker:L,observeIntersection:a,lastSyncTime:x}),Se&&c.a.createElement(Ma,{album:n,albumLayout:pt,observeIntersection:a,shouldAutoLoad:G,shouldAutoPlay:_,isOwn:pe,hasCustomAppendix:r,lastSyncTime:x,onMediaClick:ot}),!Se&&Ne&&c.a.createElement(sa,{message:e,observeIntersection:a,shouldAutoLoad:G,uploadProgress:M,shouldAffectAppendix:r,onClick:ct,onCancelUpload:lt}),!Se&&Pe&&Pe.isRound&&c.a.createElement(ka,{message:e,observeIntersection:a,shouldAutoLoad:G,shouldAutoPlay:_,lastSyncTime:x}),!Se&&Pe&&!Pe.isRound&&c.a.createElement(la,{message:e,observeIntersection:a,shouldAutoLoad:G,shouldAutoPlay:_,uploadProgress:M,lastSyncTime:x,onClick:ct,onCancelUpload:lt}),(Te||Ae)&&c.a.createElement(zt.a,{message:e,uploadProgress:M,lastSyncTime:x,isSelectable:Me,isSelected:B,onPlay:rt,onReadMedia:!Ae||pe&&!T?void 0:it,onCancelUpload:lt}),xe&&c.a.createElement(_t.a,{message:e,observeIntersection:a,uploadProgress:M,isSelectable:Me,isSelected:B,onCancelUpload:lt}),Le&&c.a.createElement(ba,{contact:Le}),Fe&&c.a.createElement(fa,{message:e,poll:Fe,onSendVote:dt}),!L&&qe&&c.a.createElement("p",{className:"text-content"},qe),Be&&c.a.createElement(va,{message:e,observeIntersection:a,shouldAutoLoad:G,onMediaClick:ct,onCancelMediaTransfer:lt}),De&&c.a.createElement(ya,{message:e}))}(),(!Me||O)&&c.a.createElement($t,{message:e,outgoingStatus:E,signature:Qe,onClick:Ye}),kt?c.a.createElement(ne.a,{className:"message-action-button",color:"translucent-white",round:!0,size:"tiny",ariaLabel:"Forward message",onClick:O?bt:ut},c.a.createElement("i",{className:"icon-share-filled"})):Nt?c.a.createElement(ne.a,{className:"message-action-button",color:"translucent-white",round:!0,size:"tiny",ariaLabel:"Focus message",onClick:q?mt:ht},c.a.createElement("i",{className:"icon-arrow-right"})):void 0,Pt&&c.a.createElement(Pa,{message:e,disabled:d})),e.inlineButtons&&c.a.createElement(Na,{message:e,onClick:ce})),be&&c.a.createElement(Ht,{isOpen:de,anchor:be,message:e,album:n,messageListType:H,onClose:he,onCloseAnimationEnd:Oe}))}));a(223);const La=h.b?1e3:350,Fa=h.f?300:500,Ba=Object(g.a)(e=>e(),200,!1),Da=Object(g.j)(e=>e());function Ua(e,t,a,s,r,o,i,l,b,u,h,O,j,g=!1){const f=c.a.createElement("div",{className:Object(J.a)("unread-divider","local-action-message"),key:"unread-messages"},c.a.createElement("span",null,e("UnreadMessages"))),p=t.map((t,p,I)=>{const v=t.senderGroups.map((t,n,g)=>{if(1===t.length&&!mt(t[0])&&Object(m.db)(t[0])){const e=t[0];return Object(d.e)([e.id===l.current&&f,c.a.createElement(qt,{key:e.id,message:e,observeIntersection:a})])}let v;return Object(d.h)(t.map((y,w)=>{const C=mt(y)?y.mainMessage:y,E=mt(y)?y:void 0,M=Object(m.tb)(C),S=mt(y),k=t[w+1];C.previousLocalId&&i.current==="message"+C.previousLocalId&&(i.current="message"+C.id);const N=!S&&C.groupedId?C.groupedId:void 0,P=k&&!mt(k)?k.groupedId:void 0,T={isFirstInGroup:0===w,isLastInGroup:w===t.length-1,isFirstInDocumentGroup:Boolean(N&&N!==v),isLastInDocumentGroup:Boolean(N&&N!==P),isLastInList:w===t.length-1&&n===g.length-1&&p===I.length-1};v=N;const A=C.id===l.current&&l.current!==O||C.id===h&&l.current===O,x=Object(m.F)(C),R="scheduled"!==u?x:`${C.date}_${x}`;return Object(d.e)([A&&f,c.a.createElement(Ra,{key:R,message:C,observeIntersectionForBottom:a,observeIntersectionForMedia:s,observeIntersectionForAnimatedStickers:r,album:E,withAvatar:T.isLastInGroup&&o&&!M&&!(C.id===h),withSenderName:T.isFirstInGroup&&o&&!M,threadId:b,messageListType:u,noComments:!1===j,isFirstInGroup:T.isFirstInGroup,isLastInGroup:T.isLastInGroup,isFirstInDocumentGroup:T.isFirstInDocumentGroup,isLastInDocumentGroup:T.isLastInDocumentGroup,isLastInList:T.isLastInList}),C.id===h&&c.a.createElement("div",{className:"local-action-message",key:"discussion-started"},c.a.createElement("span",null,e("DiscussionStarted")))])}))});return c.a.createElement("div",{className:"message-date-group",key:t.datetime,teactFastList:!0},c.a.createElement("div",{className:"sticky-date",key:"date-header"},c.a.createElement("span",null,g&&t.originalDate===n.ab&&e("MessageScheduledUntilOnline"),g&&t.originalDate!==n.ab&&e("MessageScheduledOn",Object(x.c)(t.datetime,void 0,!0)),!g&&Object(x.c)(t.datetime))),Object(d.h)(v))});return Object(d.h)(p)}var Ha=Object(c.h)(Object(s.h)((e,{chatId:t,threadId:a,type:s})=>{const n=Object(o.f)(e,t);if(!n)return{};const c=Object(o.w)(e,t,a,s),r="scheduled"===s?Object(o.lb)(e,t):Object(o.m)(e,t),l=Object(o.zb)(e,t,a);if(a!==i.MAIN_THREAD_ID&&!(r&&l&&r[l]))return{};const{isRestricted:d,restrictionReason:b,lastMessage:u}=n,h=Object(o.G)(e,t),O=a===i.MAIN_THREAD_ID&&!c&&!n.unreadCount&&!h&&u&&!u.groupedId;let j;if(Object(o.J)(e,t)){const a=Object(o.g)(e,t);j=a.fullInfo?a.fullInfo.botDescription||"NoMessages":"Updating bot info..."}return{isChatLoaded:!0,isRestricted:d,restrictionReason:b,isChannelChat:Object(m.jb)(n),canPost:Object(m.e)(n,a),isChatWithSelf:Object(o.N)(e,t),messageIds:c,messagesById:r,firstUnreadId:Object(o.F)(e,t,a),isViewportNewest:"thread"!==s||Object(o.V)(e,t,a),threadFirstMessageId:Object(o.E)(e,t,a),focusingId:h,isSelectModeActive:Object(o.Q)(e),animationLevel:e.settings.byKey.animationLevel,...O&&{lastMessage:u},botDescription:j,threadTopMessageId:l,hasLinkedChat:n.fullInfo&&"linkedChatId"in n.fullInfo?Boolean(n.fullInfo.linkedChatId):void 0}},(e,t)=>Object(d.l)(t,["loadViewportMessages","markMessageListRead","markMessagesRead","setScrollOffset"]))(({chatId:e,threadId:t,type:a,hasTools:r,onFabToggle:i,isChatLoaded:b,isChannelChat:u,canPost:O,bottomOffset:j,isChatWithSelf:f,messageIds:p,messagesById:I,firstUnreadId:v,isViewportNewest:y,threadFirstMessageId:w,isRestricted:C,restrictionReason:E,focusingId:M,isSelectModeActive:S,animationLevel:k,loadViewportMessages:N,markMessageListRead:P,markMessagesRead:T,setScrollOffset:A,lastMessage:x,botDescription:R,threadTopMessageId:L,hasLinkedChat:F})=>{const B=Object(c.q)(null),D=Object(c.q)(),U=Object(c.q)(),H=Object(c.q)(),q=Object(c.q)(),G=Object(c.q)(),_=Object(c.q)(),z=Object(c.q)(),V=Object(c.q)(!1),[$,W]=Object(c.r)(),[Q,Y]=Object(c.r)(Boolean(M));Object(me.a)(()=>{U.current=void 0,G.current=v,D.current="thread"===a&&Object(o.mb)(Object(s.e)(),e,t)||0},[Boolean(p)]),Object(me.a)(()=>{_.current=v},[v]);const{observe:Z,freeze:X,unfreeze:ee}=Object(Ot.a)({rootRef:B,throttleMs:La,margin:Fa}),{observe:ae,freeze:se,unfreeze:ne}=Object(Ot.a)({rootRef:B},e=>{if("thread"!==a)return;let t=0;const s=[];e.forEach(e=>{const{isIntersecting:a,target:n}=e;if(!a)return;const{dataset:c}=n,r=Number(c.lastMessageId||c.messageId);r>t&&(t=r),c.hasUnreadMention&&s.push(r)}),_.current&&t>=_.current&&P({maxId:t}),s.length&&T({messageIds:s})});Object(me.a)(()=>{z.current=M,M?(X(),se()):(ne(),ee())},[M]);const{observe:ce}=Object(Ot.a)({rootRef:B,throttleMs:La});Object(c.n)(()=>{M?Y(!0):setTimeout(()=>{Y(!1)},200)},[M]);const re=Object(c.p)(()=>{if(!p||!I)return;const e=!L||p[0]&&w!==p[0]?p:[L,...p];if(!e.length)return;const t=e.map(e=>I[e]);return ht(Object(d.k)(t,["date","id"]),G.current)},[p,I,w,L]),[oe,ie,le]=Object(c.p)(()=>"thread"===a?[Object(g.a)(()=>N({direction:l.e.Backwards}),1e3,!0,!1),Object(g.a)(()=>N({direction:l.e.Forwards}),1e3,!0,!1),Object(g.a)(()=>N({direction:l.e.Around}),1e3,!0,!1)]:[],[N,p]),{isScrolled:de,updateStickyDates:be}=jt(),ue=Object(c.m)(()=>{if(V.current)return void(V.current=!1);const s=B.current;be(s,r),Ba(()=>{Object(g.b)(()=>{s.parentElement&&(D.current=s.scrollHeight-s.scrollTop,"thread"===a&&A({chatId:e,threadId:t,scrollOffset:D.current}))})})},[be,r,a,A,e,t]);Object(c.n)(()=>{if(!("ResizeObserver"in window))return;const e=new ResizeObserver(([e])=>{e.target.offsetParent&&W(e.contentRect.height)});return e.observe(B.current),()=>{e.disconnect()}},[]),Object(c.o)(()=>{h.d&&Da(()=>{if(!B.current.querySelector(".AnimatedSticker.is-playing"))return;const e=B.current.style;e.webkitOverflowScrolling="auto"===e.webkitOverflowScrolling?"":"auto"})}),Object(c.n)(()=>{if(!le||!b||C||M)return;const e=B.current;(!p||p.length{const s=B.current;if(q.current=Array.from(s.querySelectorAll(".message-list-item")),!s.offsetParent)return;const c=y&&p&&p.length{s.parentElement&&s.parentElement.classList.remove("force-messages-scroll")},1e3));const{scrollTop:o,scrollHeight:i,offsetHeight:l}=s,d=D.current,b=q.current[q.current.length-1],u=b?b.offsetHeight:0,m=y&&t&&d-(a||l)-u<=100;let h;const O=p&&e&&p[0]!==e[0],j=p&&e&&p[p.length-1]!==e[e.length-1];if(m&&j&&!O&&(b&&Object(g.b)(()=>{Object(ft.a)(s,b,"end",20)}),h=i-l,D.current=Math.max(i-h,l),!c))return;const f=void 0!==a&&a!==$,I=U.current&&s.querySelector("#"+U.current),v=!I&&G.current&&s.querySelector(".unread-divider");if(m&&f)h=i-l;else if(I){h=o+(I.getBoundingClientRect().top-(H.current||0))}else h=v?v.offsetTop-(r?60:10):i-d;Object(gt.a)(s,h),z.current||(V.current=!0,Object(g.b)(()=>{V.current=!1})),D.current=Math.max(i-h,l)},[p,y,$,r]),Object(c.n)(()=>{(!k||k>0)&&Object(K.b)(200+n.c)},[k,S]);const he=Object(te.a)(),Oe=Boolean(e&&Object(m.lb)(e)),je=Boolean(!Oe&&!u||f),ge=Object(J.a)("MessageList custom-scroll",!je&&"no-avatars",u&&"no-avatars",(!O||"none"!==j)&&"bottom-padding","none"!==j&&"bottom-padding-"+j,S&&"select-mode-active",Q&&"has-focusing",de&&"scrolled");return c.a.createElement("div",{ref:B,className:ge,onScroll:ue},C?c.a.createElement("div",{className:"empty"},c.a.createElement("span",null,E?E.text:"This is a private "+(u?"channel":"chat"))):R?c.a.createElement("div",{className:"empty rich"},c.a.createElement("span",null,Object(Ze.a)(he(R),["br","emoji","links"]))):p&&re?c.a.createElement(It,{containerRef:B,className:"messages-container",messageIds:p,containerHeight:$,listItemElementsRef:q,focusingId:M,anchorIdRef:U,anchorTopRef:H,loadMoreForwards:ie,loadMoreBackwards:oe,isViewportNewest:y,firstUnreadId:v,onFabToggle:i},re&&Ua(he,re,ae,Z,ce,je,U,G,t,a,L,w,F,"scheduled"===a)):p?c.a.createElement("div",{className:"empty"},c.a.createElement("span",null,he("NoMessages"))):x?c.a.createElement("div",{className:"messages-container"},Ua(he,ht([x]),ae,Z,ce,je,U,G,t,a,L,w,F,!1)):c.a.createElement(ve.a,{color:"white"}))}));a(224);var qa=Object(c.h)(Object(s.h)(e=>{const t=Object(o.x)(e);if(!t)return{};const{chatId:a,threadId:s,type:n}=t,c=Object(o.f)(e,a);return{messageListType:n,canPost:c&&Object(m.e)(c,s),unreadCount:c&&s===i.MAIN_THREAD_ID&&"thread"===n?c.unreadCount:void 0}},(e,t)=>Object(d.l)(t,["focusLastMessage"]))(({isShown:e,messageListType:t,canPost:a,unreadCount:s,focusLastMessage:n})=>{const r=Object(c.q)(null),o=Object(c.m)(()=>{if(e)if("thread"===t)n();else{const e=r.current.parentElement.querySelector(".MessageList"),t=e.querySelectorAll(".message-list-item"),a=t[t.length-1];if(!a)return;Object(ft.a)(e,a,"end",20)}},[e,t,n]),i=Object(J.a)("ScrollDownButton",e&&"revealed",!a&&"no-composer");return c.a.createElement("div",{ref:r,className:i},c.a.createElement("div",{className:"ScrollDownButton-inner"},c.a.createElement(ne.a,{color:"secondary",round:!0,onClick:o,ariaLabel:"Scroll to bottom"},c.a.createElement("i",{className:"icon-arrow-down"})),Boolean(s)&&c.a.createElement("div",{className:"unread-count"},Object($e.b)(s))))})),Ga=a(122),_a=a(123),za=a(14);async function Va(e,t,a,s){const n=URL.createObjectURL(t),{type:c,size:r}=t;let o,i;if(c.startsWith("image/"))if(a){const a=await Object(za.g)(n),{width:r,height:i}=a;if(r>1280||i>1280||"image/jpeg"!==c){const c=await function(e){return new Promise(t=>{const a=document.createElement("canvas"),s=a.getContext("2d");let{width:n,height:c}=e;(n>1280||c>1280)&&(n>=c?(c*=1280/n,n=1280):(n*=1280/c,c=1280)),a.width=n,a.height=c,s.drawImage(e,0,0,e.width,e.height,0,0,n,c),a.toBlob(t,"image/jpeg",100)})}(a);return c?(URL.revokeObjectURL(n),Va(e,c,!0,s)):Va(e,t,!1,s)}o={width:r,height:i}}else i=n;else if(c.startsWith("video/")){if(r<10485760){const{videoWidth:e,videoHeight:t,duration:a}=await Object(za.h)(n);o={width:e,height:t,duration:a}}i=await Object(za.c)(n)}return{blobUrl:n,filename:e,mimeType:c,size:r,quick:o,previewBlobUrl:i,...s}}var $a=a(170),Wa=a.p+"8ccc0b555efcec3616377aea078dda16.js";const Qa={encoderPath:Wa,reuseWorker:!0},Ka={type:"audio/ogg"};let Ya,Ja,Za;async function Xa(){return Ya||(Ya=a.e(10).then(a.t.bind(null,302,7)),Ja=(await Ya).default,Za=new Ja(Qa)),Ya}async function es(e){await async function(){await Xa(),await Za.start()}();const t=Date.now();let a;const s=[],n=[];Za.ondataavailable=e=>{s.push(e)};const c=function(e,t){const a=e.sourceNode,s=a.context.createAnalyser();s.fftSize=64,a.connect(s);const n=s.frequencyBinCount,c=new Uint8Array(n);let r=!1;return function e(){if(r)return;s.getByteFrequencyData(c);const a=c.reduce((e,t)=>e+t,0),o=a/n/255;t(o<.1?0:o),requestAnimationFrame(e)}(),()=>{r=!0}}(Za,t=>{n.push(255*t),e(t)});return{stop:()=>new Promise((e,r)=>{Za.onstop=()=>{e({blob:new Blob(s,Ka),duration:Math.round(((a||Date.now())-t)/1e3),waveform:n})},Za.onerror=r;const o=Math.max(0,t+1e3-Date.now());setTimeout(()=>{Za.stop(),c()},o)}),pause:()=>{const e=Math.max(0,t+1e3-Date.now());setTimeout(()=>{Za.pause(),a=Date.now(),c()},e)}}}const ts=["image/png","image/jpeg","image/gif"];function as(e){const{text:t,entities:a}=e||{};if(!t)return"";const s=Object(yt.b)(t,a,void 0,void 0,!0);return Array.isArray(s)?s.join(""):s}let ss,ns;var cs=a(58);var rs=a(178);var os=e=>{const{isOpen:t}=e,a=Object(Ie.a)(pe.a.Extra,"DeleteMessageModal",!t);return a?c.a.createElement(a,e):void 0};function is(){return(is=Object.assign||function(e){for(var t=1;t{const a=Object(c.q)(!1),s=Object(c.m)(()=>{if(a.current=!0,ds)return ds=!1,void e();ls&&(clearTimeout(ls),ls=void 0),ls=window.setTimeout(()=>{a.current&&e()},200)},[e]),n=Object(c.m)(()=>{a.current=!1},[]);return c.a.createElement(ne.a,is({},t,{onMouseEnter:h.k?void 0:s,onMouseLeave:h.k?void 0:n,onClick:h.k?e:void 0}))});var us=e=>{const{isOpen:t}=e,a=Object(Ie.a)(pe.a.Extra,"AttachMenu",!t);return a?c.a.createElement(a,e):void 0};var ms=e=>{const{isOpen:t}=e,a=Object(Ie.a)(pe.a.Extra,"SymbolMenu",!t);return a?c.a.createElement(a,e):void 0};var hs=e=>{const{isOpen:t}=e,a=Object(Ie.a)(pe.a.Extra,"MentionMenu",!t);return a?c.a.createElement(a,e):void 0};var Os=e=>{const{isOpen:t}=e,a=Object(Ie.a)(pe.a.Extra,"CustomSendMenu",!t);return a?c.a.createElement(a,e):void 0};var js=e=>{const{isOpen:t}=e,a=Object(Ie.a)(pe.a.Extra,"EmojiTooltip",!t);return a?c.a.createElement(a,e):void 0};var gs=e=>{const{isOpen:t}=e,a=Object(Ie.a)(pe.a.Extra,"BotKeyboardMenu",!t);return a?c.a.createElement(a,e):void 0},fs=a(171),ps=a(109);a(226);var Is=Object(c.h)(Object(s.h)(e=>{const{chatId:t,threadId:a,type:s}=Object(o.x)(e)||{};if(!t||!a||!s)return{};const{currentUserId:n,forwardMessages:{fromChatId:c,toChatId:r,messageIds:i}}=e,l=Object(o.hb)(e,t,a),d="scheduled"===s?Object(o.D)(e,t):Object(o.B)(e,t,a),b=e.settings.byKey.animationLevel>=1,u=r===t;let h,O;if(l?h=Object(o.k)(e,t,l):d?h=Object(o.C)(e,t,a,s):u&&1===i.length&&(h=Object(o.k)(e,c,i[0])),l&&h){const{forwardInfo:a}=h,s=t===n;a&&(a.isChannelPost||s)&&(O=Object(o.I)(e,h)),O||(O=Object(o.ob)(e,h))}else u&&(O=Object(m.lb)(c)?Object(o.Bb)(e,c):Object(o.f)(e,c));return{replyingToId:l,editingId:d,message:h,sender:O,shouldAnimate:b,forwardedMessagesCount:u?i.length:void 0}},(e,t)=>Object(d.l)(t,["setReplyingToId","setEditingId","focusMessage","exitForwardMode"]))(({replyingToId:e,editingId:t,message:a,sender:s,shouldAnimate:n,forwardedMessagesCount:r,setReplyingToId:o,setEditingId:i,focusMessage:l,exitForwardMode:d})=>{const b=Boolean((e||t)&&a||s&&r),u=Object(ps.a)([r],r?300:void 0),{shouldRender:m,transitionClassNames:h}=Object(Y.a)(u&&b,void 0,!n,void 0,!n),O=Object(c.m)(()=>{e?o({messageId:void 0}):t?i({messageId:void 0}):r&&d()},[e,t,r,o,i,d]);Object(c.n)(()=>b?Object(Z.a)(O):void 0,[b,O]);const j=Object(c.m)(()=>{l({chatId:a.chatId,messageId:a.id})},[l,a]),g=Object(J.a)("ComposerEmbeddedMessage",h),f=r&&r>1?r+" forwarded messages":void 0;if(m)return c.a.createElement("div",{className:g},c.a.createElement("div",null,c.a.createElement(ne.a,{round:!0,color:"translucent",ariaLabel:"Cancel replying",onClick:O},c.a.createElement("i",{className:"icon-close"})),c.a.createElement(Gt,{className:"inside-input",message:a,sender:s,customText:f,title:t?"Edit Message":void 0,onClick:j})))}));var vs=e=>{const{attachments:t}=e,a=Object(Ie.a)(pe.a.Extra,"AttachmentModal",!t.length);return a?c.a.createElement(a,e):void 0};var ys=e=>{const{isOpen:t}=e,a=Object(Ie.a)(pe.a.Extra,"PollModal",!t);return a?c.a.createElement(a,e):void 0};var ws=e=>{const{isOpen:t}=e,a=Object(Ie.a)(pe.a.Extra,"DropArea",!t);return a?c.a.createElement(a,e):void 0};a(227);const Cs=/https?:\/\/(www.)?([a-zA-Z0-9.-]{2,256})([a-zA-Z/.-]{1,256})([?|#][=&#a-zA-Z0-9]{2,128})?/;var Es=Object(c.h)(Object(s.h)(e=>Object(d.l)(e,["webPagePreview"]),(e,t)=>Object(d.l)(t,["loadWebPagePreview","clearWebPagePreview"]))(({chatId:e,messageText:t,webPagePreview:a,loadWebPagePreview:s,clearWebPagePreview:n})=>{const r=Object(c.p)(()=>{const{text:e,entities:a}=Object(_a.a)(t),s=a&&a.find(({type:e})=>e===i.ApiMessageEntityTypes.TextUrl);if(s)return s.url;const n=e.match(Cs);return n?n[0]:void 0},[t]);if(Object(c.n)(()=>{r?s({text:r}):n()},[n,r,s]),Object(me.a)(()=>{n()},[e]),!a||!t.length)return;const{photo:o,...l}=a,d={content:{webPage:l}};return c.a.createElement("div",{className:"WebPagePreview"},c.a.createElement(va,{message:d,inPreview:!0}))})),Ms=a(114);var Ss=e=>{const{isOpen:t}=e,a=Object(Ie.a)(pe.a.Extra,"CalendarModal",!t);return a?c.a.createElement(a,e):void 0};var ks=e=>{const{isOpen:t}=e,a=Object(Ie.a)(pe.a.Extra,"PaymentModal",!t);return a?c.a.createElement(a,e):void 0};var Ns,Ps=e=>{const{isOpen:t}=e,a=Object(Ie.a)(pe.a.Extra,"ReceiptModal",!t);return a?c.a.createElement(a,e):void 0};a(228);!function(e){e.Send="send",e.Record="record",e.Edit="edit"}(Ns||(Ns={}));var Ts=Object(c.h)(Object(s.h)((e,{chatId:t,threadId:a,messageListType:s})=>{const n=Object(o.f)(e,t),c=n&&Object(o.o)(e,n),r=n?Object(o.M)(e,n):void 0,l=Object(o.N)(e,t),d=r&&Object(o.Z)(e,t),b=Object(o.jb)(e,t);return{editingMessage:Object(o.C)(e,t,a,s),connectionState:e.connectionState,draft:Object(o.A)(e,t,a),chat:n,isChatWithBot:r,isChatWithSelf:l,canScheduleUntilOnline:!l&&!r&&n&&c&&Object(m.lb)(t)&&c.status&&Boolean(c.status.wasOnline),isRightColumnShown:Object(o.U)(e),isSelectModeActive:Object(o.Q)(e),withScheduledButton:a===i.MAIN_THREAD_ID&&"thread"===s&&Boolean(b&&b.length),shouldSchedule:"scheduled"===s,botKeyboardMessageId:d?d.id:void 0,isForwarding:t===e.forwardMessages.toChatId,canSuggestMembers:n&&Object(m.kb)(n),isPollModalOpen:e.isPollModalOpen,stickersForEmoji:e.stickers.forEmoji.stickers,groupChatMembers:n&&n.fullInfo&&n.fullInfo.members,currentUserId:e.currentUserId,usersById:e.users.byId,lastSyncTime:e.lastSyncTime,contentToBeScheduled:e.messages.contentToBeScheduled,isPaymentModalOpen:e.payment.isPaymentModalOpen,isReceiptModalOpen:Boolean(e.payment.receipt),shouldSuggestStickers:e.settings.byKey.shouldSuggestStickers}},(e,t)=>Object(d.l)(t,["sendMessage","editMessage","saveDraft","clearDraft","showError","setStickerSearchQuery","setGifSearchQuery","forwardMessages","openPollModal","closePollModal","closePaymentModal","clearReceipt","loadScheduledHistory","openChat"]))(({dropAreaState:e,shouldSchedule:t,canScheduleUntilOnline:a,onDropHide:r,editingMessage:o,chatId:l,threadId:d,messageListType:b,draft:u,chat:O,connectionState:j,isChatWithBot:f,isChatWithSelf:p,isRightColumnShown:I,isSelectModeActive:v,isForwarding:y,canSuggestMembers:w,isPollModalOpen:C,isPaymentModalOpen:E,isReceiptModalOpen:M,botKeyboardMessageId:S,withScheduledButton:k,stickersForEmoji:N,groupChatMembers:P,currentUserId:T,usersById:A,lastSyncTime:R,contentToBeScheduled:L,shouldSuggestStickers:F,sendMessage:B,editMessage:D,saveDraft:U,clearDraft:H,showError:q,setStickerSearchQuery:G,setGifSearchQuery:_,forwardMessages:z,openPollModal:V,closePollModal:$,loadScheduledHistory:W,closePaymentModal:Q,openChat:K,clearReceipt:Y})=>{const X=Object(c.q)(null),[ee,ae]=Object(c.r)(""),se=Object(c.q)(),ce=Object(He.a)(e),[re,oe,ie]=Object(nt.a)(),[le,be]=Object(c.r)(),ue=Object(c.q)(ee);Object(c.n)(()=>{ue.current=ee},[ee]),Object(c.n)(()=>{se.current=void 0},[l]),Object(c.n)(()=>{l&&R&&d===i.MAIN_THREAD_ID&&W()},[l,W,R,d]),Object(c.n)(()=>{X.current&&(X.current.innerHTML='')},[]),Object(c.n)(()=>{L&&(be(L),oe())},[L,oe]);const[me,he]=Object(c.r)([]),[Oe,je,ge]=Object(nt.a)(),[fe,pe,Ie]=Object(nt.a)(),[ve,ye,we]=Object(nt.a)(),[Ce,Ee,Me]=Object(nt.a)(),[Se,ke]=Object(nt.a)(),[Ne,Pe,Te]=Object(nt.a)(),{startRecordingVoice:Ae,stopRecordingVoice:xe,pauseRecordingVoice:Re,activeVoiceRecording:Le,currentRecordTime:Be,recordButtonRef:De,startRecordTimeRef:Ue}=(()=>{const e=Object(c.q)(null),[t,a]=Object(c.r)(),s=Object(c.q)(),[n,r]=Object(c.r)();Object(c.n)(()=>{h.d&&Xa()},[]);const o=Object(c.m)(async()=>{try{const{stop:t,pause:n}=await es(t=>{e.current&&(s.current&&Date.now()%4==0&&(e.current.style.boxShadow=`0 0 0 ${50*(t||0)}px rgba(0,0,0,.15)`),r(Date.now()))});s.current=Date.now(),r(Date.now()),a({stop:t,pause:n})}catch(e){console.error(e)}},[]),i=Object(c.m)(()=>{if(t){e.current&&(e.current.style.boxShadow="none");try{return t.pause()}catch(e){return void console.error(e)}}},[t]),l=Object(c.m)(()=>{if(t){a(void 0),s.current=void 0,r(void 0),e.current&&(e.current.style.boxShadow="none");try{return t.stop()}catch(e){return void console.error(e)}}},[t]);return Object(c.n)(()=>t?Object(Z.a)(l):void 0,[t,l]),{startRecordingVoice:o,pauseRecordingVoice:i,stopRecordingVoice:l,activeVoiceRecording:t,currentRecordTime:n,recordButtonRef:e,startRecordTimeRef:s}})(),qe=o?Ns.Edit:!h.l||Le||ee&&!me.length||y?Ns.Send:Ns.Record,Ge=!t,{isMentionMenuOpen:_e,mentionFilter:ze,closeMentionMenu:Ve,insertMention:$e,mentionFilteredMembers:We}=Object(rs.a)(w&&!me.length,ee,ae,void 0,P,T,A),{isContextMenuOpen:Qe,handleContextMenu:Ke,handleContextMenuClose:Ye,handleContextMenuHide:Je}=Object(vt.a)(De,!(qe===Ns.Send&&Ge)),Xe=Object(c.p)(()=>Object(m.c)(O,f),[O,f]),et=O&&Object(m.gb)(O),tt=Object(m.k)(O),{isEmojiTooltipOpen:at,closeEmojiTooltip:st}=function(e,t,a){const{loadStickersForEmoji:n,clearStickersForEmoji:r}=Object(s.d)(),o=h.c&&1===Object(cs.a)(t)||!h.c&&Boolean(t.match(/^]*?>$/g)),i=Boolean(a)&&o;return Object(c.n)(()=>{e&&o?n({emoji:t}):!i&&o||r()},[t,o,r,n,e]),{isEmojiTooltipOpen:i,closeEmojiTooltip:r}}(Boolean(F&&Xe.canSendStickers&&!me.length),ee,N),ct=Object(c.m)(e=>{const t=window.getSelection(),a=document.getElementById(n.r),s=Object(Ze.a)(e,["escape_html","emoji_html","br_html"]).join("").replace(/\u200b+/g,"​");if(t.rangeCount){const n=t.getRangeAt(0);if(Object($a.a)(n))return void(h.c?document.execCommand("insertText",!1,e):(!function(e){const t=window.getSelection();if(t&&t.getRangeAt&&t.rangeCount){const a=t.getRangeAt(0);a.deleteContents();const s=a.createContextualFragment(e),n=s.lastChild;a.insertNode(s),n&&(a.setStartAfter(n),a.setEndAfter(n),t.removeAllRanges(),t.addRange(a))}}(s),a.dispatchEvent(new Event("input",{bubbles:!0}))));ae(`${ue.current}${s}`),h.f||requestAnimationFrame(()=>{Object(Ga.a)(a)})}else h.f&&ae(`${ue.current}${s}`)},[]),rt=Object(c.m)(()=>{const e=window.getSelection();if(e.rangeCount){const t=e.getRangeAt(0);if(Object($a.a)(t))return void document.execCommand("delete",!1)}ae(function(e){const t=document.createElement("div");t.contentEditable="true",t.style.position="absolute",t.style.left="-10000px",t.style.top="-10000px",t.innerHTML=e,document.body.appendChild(t);let a=t.lastChild;if(a.lastChild)for(;a.lastChild;)a=a.lastChild;const s=a.textContent.length,n=document.createRange(),c=window.getSelection();n.setStart(a,s),n.setEnd(a,s),c.removeAllRanges(),c.addRange(n),document.execCommand("delete",!1);const r=t.innerHTML;return document.body.removeChild(t),r}(ue.current))},[]),ot=Object(c.m)(()=>{ae(""),he([]),st(),ie(),be(void 0),Ve(),h.f?setTimeout(()=>we(),350):we()},[st,ie,Ve,we]),it=Object(He.a)(l);Object(c.n)(()=>{it&&l!==it&&(xe(),ot())},[l,it,ot,xe]);const lt=((e,t,a,s,r,o)=>{Object(c.n)(()=>{a?(t(as(a.content.text)),requestAnimationFrame(()=>{const e=document.getElementById(n.r);Object(Ga.a)(e,!0)})):t("")},[a,t]);return Object(c.m)(()=>{const{text:t,entities:n}=Object(_a.a)(e.current);a&&(t||Object(m.cb)(a)?(o({messageId:a.id,text:t,entities:n}),s()):r())},[o,a,e,r,s])})(ue,ae,o,ot,Ee,D);((e,t,a,s,r,o,i,l,d)=>{const b=Object(c.m)((e,t)=>{r.current.length&&!i?l({chatId:e,threadId:t,draft:Object(_a.a)(r.current)}):d({chatId:e,threadId:t})},[d,i,r,l]),u=Object(c.p)(()=>Object(g.a)(e=>e(),n.q,!1),[t]),m=Object(He.a)(t),h=Object(He.a)(a);Object(c.n)(()=>(ss=t,ns=a,()=>{ss=void 0,ns=void 0,b(t,a)}),[t,a,b]),Object(c.n)(()=>{t===m&&a===h||e&&(o(as(e)),requestAnimationFrame(()=>{const e=document.getElementById(n.r);Object(Ga.a)(e,!0)}))},[t,a,e,o,b,m,h]);const O=Object(He.a)(s);Object(c.n)(()=>{t&&a&&m===t&&h===a&&O!==s&&(s.length?u(()=>{ss===t&&ns===a&&b(t,a)}):b(t,a))},[t,s,m,O,h,u,a,b]),Object(c.n)(()=>{function e(){t&&a&&b(t,a)}return window.addEventListener("blur",e),()=>{window.removeEventListener("blur",e)}},[t,a,b])})(u,l,d,ee,ue,ae,o,U,H),((e,t,a)=>{Object(c.n)(()=>{async function s(s){if(!s.clipboardData)return;if(document.getElementById(n.r)!==document.activeElement)return;const{items:c}=s.clipboardData,r=Array.from(c).find(e=>ts.includes(e.type)),o=r&&r.getAsFile(),i=s.clipboardData.getData("text").substring(0,4096);if(o||i){if(s.preventDefault(),o&&!a){const e=await Va(o.name,o,!0);t(t=>[...t,e])}i&&e(i)}}return document.addEventListener("paste",s,!1),()=>{document.removeEventListener("paste",s,!1)}},[e,a,t])})(ct,he,o);const dt=Object(c.m)(async(e,t)=>{he(await Promise.all(e.map(e=>Va(e.name,e,t))))},[]),bt=Object(c.m)(()=>{he([])},[]),ut=Object(c.m)(async(e=!1,t)=>{if("connectionStateReady"!==j)return;let a=me;if(Le){const e=await xe();if(e){const{blob:t,duration:s,waveform:n}=e;a=[await Va("wonderful-voice-message.ogg",t,!1,{voice:{duration:s,waveform:n}})]}}const{text:s,entities:c}=Object(_a.a)(ue.current);if(a.length||s||y)if(a.length&&s&&s.length>1024){const e=s.length-1024;q({error:{message:"CAPTION_TOO_LONG_PLEASE_REMOVE_CHARACTERS",textParams:{"{EXTRA_CHARS_COUNT}":e,"{PLURAL_S}":e>1?"s":""}}})}else{if(a.length||s){if(tt&&!et){const e=Math.floor(Date.now()/1e3),t=se.current&&Math.floor(e-se.current),a=tt.nextSendDate&&tt.nextSendDate>e;if(t&&t{e={...e,isPreloadedGlobally:!0},t?(be({sticker:e}),oe()):(B({sticker:e}),requestAnimationFrame(ot))},[t,oe,B,ot]),ht=Object(c.m)(e=>{t?(be({gif:e}),oe()):(B({gif:e}),requestAnimationFrame(ot))},[t,oe,B,ot]),Ot=Object(c.m)(e=>{t?(be({poll:e}),$(),oe()):(B({poll:e}),$())},[$,oe,B,t]),jt=Object(c.m)(()=>{t?(be({isSilent:!0}),oe()):ut(!0)},[ut,oe,t]),gt=Object(c.m)(e=>{const{isSilent:t,...a}=le||{},s=Math.round(Math.max(e.getTime(),Date.now()+6e4)/1e3);le&&0!==Object.keys(a).length?(B({...le,scheduledAt:s}),requestAnimationFrame(ot)):ut(!!t,s),ie()},[ie,ut,ot,le,B]),ft=Object(c.m)(()=>{gt(new Date(1e3*n.ab))},[gt]),pt=Object(c.m)(()=>{ie(),be(void 0)},[ie]),It=Object(c.m)(e=>{"stickers"===e?(G({query:""}),_({query:void 0})):(_({query:""}),G({query:void 0}))},[G,_]),yt=Object(c.m)(()=>{const e=document.getElementById(n.r);h.f&&e===document.activeElement?(e.blur(),setTimeout(()=>{ye()},100)):ye()},[ye]),wt=Object(c.m)(()=>{K({id:l,threadId:d,type:"scheduled"})},[K,l,d]);Object(c.n)(()=>{I&&h.f&&we()},[I,we]),Object(c.n)(()=>{v?Pe():setTimeout(()=>{Te()},200)},[v,Te,Pe]);const Ct=Object(c.m)(()=>{switch(qe){case Ns.Send:t?(Le&&Re(),oe()):(ut(),requestAnimationFrame(ot));break;case Ns.Record:Ae();break;case Ns.Edit:lt()}},[qe,ot,t,Ae,lt,Le,oe,Re,ut]),Et=Object(te.a)(),Mt=qe===Ns.Record&&!Xe.canAttachMedia,St=Object(He.a)(o,!0),kt=o||St,Nt=new Date;Nt.setSeconds(0),Nt.setMilliseconds(0);const Pt=new Date;Pt.setFullYear(Pt.getFullYear()+1);let Tt="Send message";switch(qe){case Ns.Edit:Tt="Save edited message";break;case Ns.Record:Tt=Mt?"Posting media content is not allowed in this group.":"Record a voice message"}const At=Object(J.a)("Composer",!v&&"shown",Ne&&"hover-disabled"),xt=Object(J.a)("mobile-symbol-menu-button",Se?ve&&"menu-opened":ve&&"is-loading");return c.a.createElement("div",{className:At},Xe.canAttachMedia&&c.a.createElement(Ms.a,{containerId:"#middle-column-portals"},c.a.createElement(ws,{isOpen:e!==Fe.a.None,withQuick:[e,ce].includes(Fe.a.QuickFile),onHide:r,onFileSelect:dt})),c.a.createElement(vs,{attachments:me,caption:me.length?ee:"",canSuggestMembers:w,groupChatMembers:P,currentUserId:T,usersById:A,onCaptionUpdate:ae,onSend:t?oe:ut,onClear:bt}),c.a.createElement(ys,{isOpen:Boolean(C),onClear:$,onSend:Ot}),c.a.createElement(ks,{isOpen:Boolean(E),onClose:Q}),c.a.createElement(Ps,{isOpen:Boolean(M),onClose:Y}),kt&&c.a.createElement(os,{isOpen:Ce,isSchedule:"scheduled"===b,onClose:Me,message:kt}),c.a.createElement(hs,{isOpen:_e,filter:ze,onClose:Ve,onInsertUserName:$e,filteredChatMembers:We,usersById:A}),c.a.createElement("div",{id:"message-compose"},c.a.createElement("div",{className:"svg-appendix",ref:X}),c.a.createElement(Is,null),Xe.canAttachEmbedLinks&&c.a.createElement(Es,{chatId:l,messageText:me.length?"":ee}),c.a.createElement("div",{className:"message-input-wrapper"},h.f?c.a.createElement(ne.a,{className:xt,round:!0,color:"translucent",onClick:ve?we:yt,ariaLabel:"Choose emoji, sticker or GIF"},c.a.createElement("i",{className:"icon-smile"}),c.a.createElement("i",{className:"icon-keyboard"}),c.a.createElement(de.a,{color:"gray"})):c.a.createElement(bs,{className:""+(ve?"activated":""),round:!0,faded:!0,color:"translucent",onActivate:ye,ariaLabel:"Choose emoji, sticker or GIF"},c.a.createElement("i",{className:"icon-smile"})),c.a.createElement(fs.a,{id:"message-input-text",html:me.length?"":ee,placeholder:Le&&window.innerWidth<=600?"":Et("Message"),shouldSetFocus:ve,shouldSupressFocus:h.f&&ve,onUpdate:ae,onSend:qe===Ns.Edit?lt:t?oe:ut,onSupressedFocus:we}),k&&c.a.createElement(ne.a,{round:!0,faded:!0,className:"scheduled-button",color:"translucent",onClick:wt,ariaLabel:"Open scheduled messages"},c.a.createElement("i",{className:"icon-schedule"})),S&&!Le&&!o&&c.a.createElement(bs,{className:""+(Oe?"activated":""),round:!0,faded:!0,color:"translucent",onActivate:je,ariaLabel:"Open bot command keyboard"},c.a.createElement("i",{className:"icon-bot-command"})),!Le&&!o&&c.a.createElement(bs,{className:""+(fe?"activated":""),round:!0,faded:!0,color:"translucent",onActivate:pe,ariaLabel:"Add an attachment"},c.a.createElement("i",{className:"icon-attach"})),Le&&Be&&c.a.createElement("span",{className:"recording-state"},Object(x.i)(Be-Ue.current)),c.a.createElement(js,{isOpen:at,onStickerSelect:mt}),c.a.createElement(us,{isOpen:fe,allowedAttachmentOptions:Xe,onFileSelect:dt,onPollCreate:V,onClose:Ie}),S&&c.a.createElement(gs,{messageId:S,isOpen:Oe,onClose:ge}),c.a.createElement(ms,{isOpen:ve,allowedAttachmentOptions:Xe,onLoad:ke,onClose:we,onEmojiSelect:ct,onStickerSelect:mt,onGifSelect:ht,onRemoveSymbol:rt,onSearchOpen:It}))),Le&&c.a.createElement(ne.a,{round:!0,color:"danger",className:"cancel",onClick:xe,ariaLabel:"Cancel voice recording"},c.a.createElement("i",{className:"icon-delete"})),c.a.createElement(ne.a,{ref:De,round:!0,color:"secondary",className:`${qe} ${Le?"recording":""}`,disabled:Mt,ariaLabel:Tt,onClick:Ct,onContextMenu:qe===Ns.Send&&Ge?Ke:void 0},c.a.createElement("i",{className:"icon-send"}),c.a.createElement("i",{className:"icon-microphone-alt"}),c.a.createElement("i",{className:"icon-check"})),Ge&&c.a.createElement(Os,{isOpen:Qe,onSilentSend:p?void 0:jt,onScheduleSend:t?void 0:oe,onClose:Ye,onCloseAnimationEnd:Je}),c.a.createElement(Ss,{isOpen:re,withTimePicker:!0,selectedAt:Nt.getTime(),maxAt:Object(x.k)(Pt),isFutureMode:!0,secondButtonLabel:a?"Send When Online":void 0,onClose:pt,onSubmit:gt,onSecondButtonClick:a?ft:void 0}))}));var As=e=>{const{isActive:t}=e,a=Object(Ie.a)(pe.a.Extra,"MobileSearch",!t,!0);return a?c.a.createElement(a,e):void 0};var xs=e=>{const{isActive:t}=e,a=Object(Ie.a)(pe.a.Extra,"MessageSelectToolbar",!t);return a?c.a.createElement(a,e):void 0};var Rs=e=>{const{isOpen:t}=e,a=Object(Ie.a)(pe.a.Extra,"UnpinAllMessagesModal",!t);return a?c.a.createElement(a,e):void 0};a(229);const Ls=h.f?450+n.c:void 0;function Fs(e){return"file"===e.kind&&e.type&&n.k.includes(e.type)}var Bs=Object(c.h)(Object(s.h)(e=>{const{isBackgroundBlurred:t,customBackground:a}=e.settings.byKey,s=Boolean((a||"").match(/^#[a-f\d]{6,8}$/i)),n=Object(o.x)(e),{chats:{listIds:c}}=e;if(!n||!c.active)return{customBackground:a,isBackgroundBlurred:t,isCustomBackgroundColor:s};const{chatId:r,threadId:i,type:l}=n,d=Object(o.f)(e,r),b=Object(o.eb)(e,r),{chatId:u,messageId:O}=e.audioPlayer,j=d&&Object(m.e)(d,i),g=Object(o.J)(e,r),f="pinned"===l;return{chatId:r,threadId:i,messageListType:l,isPrivate:Object(m.lb)(r),canPost:!f&&(!d||j)&&(!g||h.f),isPinnedMessageList:f,messageSendingRestrictionReason:d&&Object(m.J)(d),hasPinnedOrAudioMessage:Boolean(b&&b.length)||Boolean(u&&O),customBackground:a,isCustomBackgroundColor:s,isRightColumnShown:Object(o.U)(e),isBackgroundBlurred:t,isMobileSearchActive:Boolean(h.f&&Object(o.z)(e)),isSelectModeActive:Object(o.Q)(e),animationLevel:e.settings.byKey.animationLevel}},(e,t)=>Object(d.l)(t,["openChat","unpinAllMessages","loadUser"]))(({chatId:e,threadId:t,messageListType:a,isPrivate:s,isPinnedMessageList:r,canPost:o,messageSendingRestrictionReason:l,hasPinnedOrAudioMessage:d,customBackground:b,isCustomBackgroundColor:u,isRightColumnShown:m,isBackgroundBlurred:O,isMobileSearchActive:j,isSelectModeActive:g,animationLevel:f,openChat:p,unpinAllMessages:I,loadUser:v})=>{const{width:y}=Ue(),[w,C]=Object(c.r)(Fe.a.None),[E,M]=Object(c.r)(!1),[S,k]=Object(c.r)(!1),N=qe(e,Ls),P=qe(t,Ls),T=qe(a,Ls),A=qe(o,Ls);Object(c.n)(()=>e?Object(Z.a)(()=>{p({id:void 0})}):void 0,[e,p]),Object(c.n)(()=>{C(Fe.a.None)},[e]),Object(c.n)(()=>{s&&v({userId:e})},[e,s,v]);const x=Object(c.m)(e=>{if(h.k)return;const{items:t}=e.dataTransfer||{},a=t&&Array.from(t).every(Fs);C(a?Fe.a.QuickFile:Fe.a.Document)},[]),R=Object(c.m)(()=>{C(Fe.a.None)},[]),L=Object(c.m)(()=>{k(!0)},[]),F=Object(c.m)(()=>{k(!1)},[]),B=Object(c.m)(()=>{I({chatId:e}),F(),p({id:e})},[I,p,F,e]),D=(e=>{const[t,a]=Object(c.r)(e);return Object(c.n)(()=>{e&&(e.startsWith("#")?a(e):Be.c(n.l,n.l,Be.a.Blob).then(e=>{a("url("+URL.createObjectURL(e))}))},[e]),t})(b),U=d&&(yn.S&&y=n.R&&yGe(y,A),[A,y]),$=Object(te.a)();return c.a.createElement("div",{id:"MiddleColumn",className:H,style:`\n --composer-hidden-scale: ${G};\n --toolbar-hidden-scale: ${_};\n --composer-translate-x: ${z}px;\n --toolbar-translate-x: ${V}px;\n `},c.a.createElement("div",{id:"middle-column-bg",style:D?"--custom-background: "+D:void 0}),c.a.createElement("div",{id:"middle-column-portals"}),N&&P&&c.a.createElement(c.a.Fragment,null,c.a.createElement("div",{className:"messages-layout",onDragEnter:A?x:void 0},c.a.createElement(bt,{chatId:N,threadId:P,messageListType:T}),c.a.createElement(X.a,{name:f===n.e?"slide":"fade",activeKey:"thread"===T&&P===i.MAIN_THREAD_ID?1:2,shouldCleanup:!0},()=>c.a.createElement(c.a.Fragment,null,c.a.createElement(Ha,{key:`${N}-${P}-${T}`,chatId:N,threadId:P,type:T,hasTools:U,onFabToggle:M,bottomOffset:A?"none":r?"big":"small"}),c.a.createElement("div",{className:Object(J.a)("middle-column-footer",!A&&"no-composer")},A&&c.a.createElement(Ts,{chatId:N,threadId:P,messageListType:T,dropAreaState:w,onDropHide:R}),r&&c.a.createElement("div",{className:"unpin-button-container"},c.a.createElement(ne.a,{size:"tiny",fluid:!0,color:"secondary",className:"unpin-all-button",onClick:L},c.a.createElement("i",{className:"icon-unpin"}),c.a.createElement("span",null,$("Chat.PanelHidePinnedMessages")))),!A&&l&&c.a.createElement("div",{className:q},c.a.createElement("div",{className:"messaging-disabled-inner"},c.a.createElement("span",null,l))),c.a.createElement(xs,{messageListType:T,isActive:g,canPost:A})))),c.a.createElement(qa,{isShown:E})),h.f&&c.a.createElement(As,{isActive:Boolean(j)})),e&&c.a.createElement(Rs,{isOpen:S,chatId:e,onClose:F,onUnpin:B}))}));a(230);const Ds=Object(g.a)(e=>e(),200,!1);var Us;!function(e){e[e.Profile=0]="Profile",e[e.MemberList=1]="MemberList",e[e.SharedMedia=2]="SharedMedia",e[e.Search=3]="Search",e[e.Statistics=4]="Statistics",e[e.Management=5]="Management",e[e.ManageInitial=6]="ManageInitial",e[e.ManageChannelSubscribers=7]="ManageChannelSubscribers",e[e.ManageChatAdministrators=8]="ManageChatAdministrators",e[e.ManageChatPrivacyType=9]="ManageChatPrivacyType",e[e.ManageDiscussion=10]="ManageDiscussion",e[e.ManageGroupPermissions=11]="ManageGroupPermissions",e[e.ManageGroupRemovedUsers=12]="ManageGroupRemovedUsers",e[e.ManageGroupUserPermissionsCreate=13]="ManageGroupUserPermissionsCreate",e[e.ManageGroupUserPermissions=14]="ManageGroupUserPermissions",e[e.ManageGroupRecentActions=15]="ManageGroupRecentActions",e[e.ManageGroupAdminRights=16]="ManageGroupAdminRights",e[e.ManageGroupMembers=17]="ManageGroupMembers",e[e.StickerSearch=18]="StickerSearch",e[e.GifSearch=19]="GifSearch",e[e.PollResults=20]="PollResults"}(Us||(Us={}));var Hs=Object(c.h)(Object(s.h)((e,{chatId:t,isProfile:a,isManagement:s})=>{const{query:n}=Object(o.z)(e)||{},{query:c}=Object(o.y)(e)||{},{query:r}=Object(o.r)(e)||{},i=t?Object(o.f)(e,t):void 0,l=i&&Object(m.jb)(i);return{canManage:Boolean(!s&&a&&i&&!Object(o.N)(e,i.id)&&(Object(m.lb)(i.id)||(Object(m.gb)(i)||i.isCreator)&&!i.isNotJoined)),isChannel:l,messageSearchQuery:n,stickerSearchQuery:c,gifSearchQuery:r}},(e,t)=>Object(d.l)(t,["setLocalTextSearchQuery","setStickerSearchQuery","setGifSearchQuery","searchTextMessagesLocal","toggleManagement","searchMessagesByDate"]))(({isColumnOpen:e,isProfile:t,isSearch:a,isManagement:s,isStatistics:n,isStickerSearch:r,isGifSearch:o,isPollResults:i,profileState:d,managementScreen:b,canManage:u,isChannel:m,onClose:O,messageSearchQuery:j,stickerSearchQuery:g,gifSearchQuery:f,setLocalTextSearchQuery:p,setStickerSearchQuery:I,setGifSearchQuery:v,searchTextMessagesLocal:y,toggleManagement:w,searchMessagesByDate:C})=>{const E=Object(c.q)(null),[M,S,k]=Object(nt.a)(),N=Object(c.m)(e=>{p({query:e}),e.length&&Ds(y)},[y,p]),P=Object(c.m)(e=>{C({timestamp:e.valueOf()/1e3}),k()},[k,C]),T=Object(c.m)(e=>{I({query:e})},[I]),A=Object(c.m)(e=>{v({query:e})},[v]),[x,R]=Object(c.r)(!e);Object(c.n)(()=>{setTimeout(()=>{R(!e)},300)},[e]);const L=Object(te.a)(),F=t?d===l.k.Profile?Us.Profile:d===l.k.SharedMedia?Us.SharedMedia:d===l.k.MemberList?Us.MemberList:-1:a?Us.Search:i?Us.PollResults:r?Us.StickerSearch:o?Us.GifSearch:s?b===l.g.Initial?Us.ManageInitial:b===l.g.ChatPrivacyType?Us.ManageChatPrivacyType:b===l.g.Discussion?Us.ManageDiscussion:b===l.g.ChannelSubscribers?Us.ManageChannelSubscribers:b===l.g.GroupPermissions?Us.ManageGroupPermissions:b===l.g.ChatAdministrators?Us.ManageChatAdministrators:b===l.g.GroupRemovedUsers?Us.ManageGroupRemovedUsers:b===l.g.GroupUserPermissionsCreate?Us.ManageGroupUserPermissionsCreate:b===l.g.GroupUserPermissions?Us.ManageGroupUserPermissions:b===l.g.GroupRecentActions?Us.ManageGroupRecentActions:b===l.g.ChatAdminRights?Us.ManageGroupAdminRights:b===l.g.GroupMembers?Us.ManageGroupMembers:-1:n?Us.Statistics:-1;function B(){switch(F){case Us.PollResults:return c.a.createElement("h3",null,L("PollResults"));case Us.Search:return c.a.createElement(c.a.Fragment,null,c.a.createElement(ce.a,{value:j,onChange:N}),c.a.createElement(ne.a,{round:!0,size:"smaller",color:"translucent",onClick:S,ariaLabel:"Search messages by date"},c.a.createElement("i",{className:"icon-calendar"})));case Us.ManageInitial:return c.a.createElement("h3",null,L("Edit"));case Us.ManageChatPrivacyType:return c.a.createElement("h3",null,L(m?"ChannelTypeHeader":"GroupTypeHeader"));case Us.ManageDiscussion:return c.a.createElement("h3",null,L("Discussion"));case Us.ManageChatAdministrators:return c.a.createElement("h3",null,L("ChannelAdministrators"));case Us.ManageGroupRecentActions:return c.a.createElement("h3",null,L("Group.Info.AdminLog"));case Us.ManageGroupAdminRights:return c.a.createElement("h3",null,L("EditAdminRights"));case Us.ManageGroupPermissions:return c.a.createElement("h3",null,L("ChannelPermissions"));case Us.ManageGroupRemovedUsers:return c.a.createElement("h3",null,L("ChannelBlockedUsers"));case Us.ManageGroupUserPermissionsCreate:return c.a.createElement("h3",null,L("ChannelAddException"));case Us.ManageGroupUserPermissions:return c.a.createElement("h3",null,L("UserRestrictions"));case Us.StickerSearch:return c.a.createElement(ce.a,{value:g,placeholder:"Search Stickers",onChange:T});case Us.GifSearch:return c.a.createElement(ce.a,{value:f,placeholder:L("SearchGifsTitle"),onChange:A});case Us.Statistics:return c.a.createElement("h3",null,L("Statistics"));case Us.SharedMedia:return c.a.createElement("h3",null,L("SharedMedia"));case Us.ManageChannelSubscribers:return c.a.createElement("h3",null,L("ChannelSubscribers"));case Us.MemberList:case Us.ManageGroupMembers:return c.a.createElement("h3",null,L("GroupMembers"));default:return c.a.createElement(c.a.Fragment,null,c.a.createElement("h3",null,L("Info")),c.a.createElement("section",{className:"tools"},u&&c.a.createElement(ne.a,{round:!0,color:"translucent",size:"smaller",ariaLabel:L("Edit"),onClick:w},c.a.createElement("i",{className:"icon-edit"}))))}}const D=h.f||F===Us.SharedMedia||F===Us.MemberList||s,U=Object(J.a)("animated-close-icon",x&&"no-transition");return Object(c.n)(()=>{E.current.classList.toggle("state-back",D)},[D]),c.a.createElement("div",{className:"RightHeader"},c.a.createElement(ne.a,{className:"close-button",round:!0,color:"translucent",size:"smaller",onClick:O,ariaLabel:L(D?"Common.Back":"Common.Close")},c.a.createElement("div",{ref:E,className:U})),c.a.createElement(X.a,{name:x?"none":"slide-fade",activeKey:F},B),!h.f&&c.a.createElement(Ss,{isOpen:M,isPastMode:!0,submitButtonLabel:L("JumpToDate"),onClose:k,onSubmit:P}))})),qs=a(118);function Gs(e,t,a,s,r,o){const i=Object(c.q)();Object(me.a)(()=>{t===e&&r&&o&&(i.current=Object(m.w)(r,o,e).reverse())},[r,o,t,e]);const[l,d]=Object(qs.a)(s?a:void 0,i.current,void 0,"media"===e?n.cb:n.P);return[l,d,!(!l||!i.current||l[0]===i.current[0])]}var _s=a(51);const zs=Object(g.g)(e=>e(),250,!1);let Vs=!1;var $s=a(101),Ws=a(94);var Qs=Object(c.h)(Object(s.h)((e,{userId:t})=>{const{lastSyncTime:a}=e;return{lastSyncTime:a,user:Object(o.Bb)(e,t)}},(e,t)=>Object(d.l)(t,["loadFullUser"]))(({lastSyncTime:e,user:t,forceShowSelf:a,loadFullUser:s})=>{const{id:n,fullInfo:r,username:o,phoneNumber:i,isSelf:l}=t||{};Object(c.n)(()=>{e&&s({userId:n})},[s,n,e]);const d=Object(te.a)();if(!t||l&&!a)return;const b=r&&r.bio,u=i&&Object(da.c)(i);return c.a.createElement("div",{className:"ChatExtra"},b&&!!b.length&&c.a.createElement("div",{className:"item"},c.a.createElement("i",{className:"icon-info"}),c.a.createElement("div",null,c.a.createElement("p",{className:"title"},Object(Ze.a)(b,["br","links"])),c.a.createElement("p",{className:"subtitle"},d("UserBio")))),o&&!!o.length&&c.a.createElement("div",{className:"item"},c.a.createElement("i",{className:"icon-mention"}),c.a.createElement("div",null,c.a.createElement("p",{className:"title"},Object(Ze.a)(o)),c.a.createElement("p",{className:"subtitle"},d("Username")))),u&&!!u.length&&c.a.createElement("div",{className:"item"},c.a.createElement("i",{className:"icon-phone"}),c.a.createElement("div",null,c.a.createElement("p",{className:"title"},u),c.a.createElement("p",{className:"subtitle"},d("Phone")))))}));var Ks=Object(c.h)(Object(s.h)((e,{chatId:t})=>({chat:Object(o.f)(e,t)}))(({chat:e})=>{const t=Object(te.a)();if(!e||e.isRestricted)return;const a=Object(m.g)(e),s=Object(m.h)(e),n=0===s.indexOf("http")?s:"http://"+s;return c.a.createElement("div",{className:"ChatExtra"},a&&!!a.length&&c.a.createElement("div",{className:"item"},c.a.createElement("i",{className:"icon-info"}),c.a.createElement("div",null,c.a.createElement("p",{className:"title"},Object(Ze.a)(a,["br","links"])),c.a.createElement("p",{className:"subtitle"},t("Info")))),!!s.length&&c.a.createElement("div",{className:"item"},c.a.createElement("i",{className:"icon-mention"}),c.a.createElement("div",null,c.a.createElement(Ia.a,{url:n,className:"title",text:s}),c.a.createElement("p",{className:"subtitle"},t("SetUrlPlaceholder")))))})),Ys=a(153),Js=a(172),Zs=a(108);a(234);const Xs=[{type:"media",title:"SharedMediaTab2"},{type:"documents",title:"SharedFilesTab2"},{type:"links",title:"SharedLinksTab2"},{type:"audio",title:"SharedMusicTab2"}];function en(e){return[`.shared-media-transition > div:only-child > .${e}-list > .scroll-item`,`.shared-media-transition > div.active > .${e}-list > .scroll-item`].join(", ")}var tn=Object(c.h)(Object(s.h)((e,{chatId:t,userId:a})=>{const s=Object(o.f)(e,t),n=Object(o.m)(e,a||t),{currentType:c,resultsByType:r}=Object(o.u)(e)||{},{foundIds:i}=r&&c&&r[c]||{},{byId:l}=e.users,d=s&&Object(m.kb)(s),b=s&&Object(m.jb)(s),u=d||b&&Object(m.gb)(s),h=s&&s.fullInfo&&s.fullInfo.members,O=u&&s&&s.fullInfo&&!s.fullInfo.canViewMembers;let j;return a?j=a:Object(m.lb)(t)&&(j=t),{isChannel:b,resolvedUserId:j,chatMessages:n,foundIds:i,mediaSearchType:c,hasMembersTab:u,areMembersHidden:O,...u&&h&&{members:h,usersById:l},isRightColumnShown:Object(o.U)(e),isRestricted:s&&s.isRestricted,lastSyncTime:e.lastSyncTime}},(e,t)=>Object(d.l)(t,["setLocalMediaSearchType","searchMediaMessagesLocal","openMediaViewer","openAudioPlayer","openUserInfo","focusMessage"]))(({chatId:e,profileState:t,onProfileStateChange:a,isChannel:s,resolvedUserId:r,chatMessages:o,foundIds:d,mediaSearchType:b,hasMembersTab:u,areMembersHidden:O,members:j,usersById:g,isRightColumnShown:f,isRestricted:p,lastSyncTime:I,setLocalMediaSearchType:v,searchMediaMessagesLocal:y,openMediaViewer:w,openAudioPlayer:C,openUserInfo:E,focusMessage:M})=>{const S=Object(c.q)(null),k=Object(c.q)(null),[N,P]=Object(c.r)(0),T=Object(c.p)(()=>[...u?[{type:"members",title:s?"ChannelSubscribers":"GroupMembers"}]:[],...Xs],[u,s]),A=T[N].type,[x,R,L,F]=function(e,t,a,s,n,r,o,i,l,d){const b="members"!==a&&s?s:a,u=Object(c.p)(()=>{if(n&&r)return Object(m.W)(n.map(({userId:e})=>e),r)},[n,r]),[h,O,j]=Gs("media",b,t,d,o,i),[g,f,p]=Gs("documents",b,t,d,o,i),[I,v,y]=Gs("links",b,t,d,o,i),[w,C,E]=Gs("audio",b,t,d,o,i);let M,S,k=!1;switch(b){case"members":M=u,S=void 0;break;case"media":M=h,S=O,k=j;break;case"documents":M=g,S=f,k=p;break;case"links":M=I,S=v,k=y;break;case"audio":M=w,S=C,k=E}return[b,M,S,k]}(0,y,A,b,j,g,o,d,0,I),B=T.findIndex(({type:e})=>e===x),{handleScroll:D}=function(e,t,a,s){Object(_s.a)(([a])=>{if(a&&a!==t){const a=e.current,n=a.querySelector(".TabList");a.scrollTop{Vs=!1},350))}},[t,s]),Object(_s.a)(([t])=>{if(a!==l.k.Profile||a===t)return;const n=e.current;if(!n)return;const c=n.querySelector(".TabList");!c||c.offsetTop>n.scrollTop||(Vs=!0,Object(ft.a)(n,n.firstElementChild,"start",void 0,2*n.offsetHeight),setTimeout(()=>{Vs=!1},350),s(a))},[a]);const n=Object(c.m)(()=>{const a=e.current;if(!a)return;const n=a.querySelector(".TabList");if(!n)return;let c=l.k.Profile;a.scrollTop>=n.offsetTop&&(c="members"===t?l.k.MemberList:l.k.SharedMedia),s(c)},[e,s,t]);return Object(c.n)(()=>{Vs||n()},[n,t]),{handleScroll:Object(c.m)(()=>{Vs||zs(n)},[n])}}(S,A,t,a),{applyTransitionFix:U,releaseTransitionFix:H}=function(e){return Object(c.n)(()=>{function t(){const t=e.current,a=t.querySelector(".Transition"),s=t.querySelector(".TabList");a&&s&&(a.style.minHeight=t.offsetHeight-s.offsetHeight+"px")}return t(),window.addEventListener("resize",t,!1),()=>{window.removeEventListener("resize",t,!1)}},[e]),{applyTransitionFix:Object(c.m)(()=>{const t=e.current;if("hidden"!==t.style.overflowY){const e=t.offsetWidth-t.clientWidth;t.style.overflowY="hidden",t.style.marginRight=e+"px"}},[e]),releaseTransitionFix:Object(c.m)(()=>{const t=e.current;t.style.overflowY="scroll",t.style.marginRight="0"},[e])}}(S),[q,G]=(()=>{const[e,t]=Object(c.r)(!1);return[e,Object(c.m)(()=>{t(e=>!e)},[])]})(),_=Object(c.m)(()=>{H(),G()},[H,G]);Object(c.n)(()=>{v({mediaType:A})},[v,A]);const z=r||e,V=Object(c.m)(e=>{w({chatId:z,threadId:i.MAIN_THREAD_ID,messageId:e,origin:l.h.SharedMedia})},[z,w]),$=Object(c.m)(e=>{C({chatId:z,messageId:e})},[z,C]),W=Object(c.m)(e=>{E({id:e})},[E]),Q=Object(c.m)(e=>{M({chatId:z,messageId:e})},[z,M]);let K;Object(c.n)(()=>{if(k.current&&h.k)return Object(ue.b)(k.current,{onSwipe:(e,t)=>{t===ue.a.Left?P(Math.min(N+1,T.length-1)):t===ue.a.Right&&P(Math.max(0,N-1))}})},[N,T.length]);const Y="members"===x||!u&&"media"===x;Y?K=f?0:1e3:R||(K=n.db);const J=Object(ps.a)([e,x],K);function Z(){if(!R||!J||!o){const e=Y&&R&&!J;return c.a.createElement("div",{className:"content empty-list"},!e&&c.a.createElement(de.a,null))}if(!R.length){let e;switch(x){case"members":e=O?"You have no access to group members list.":"No members found";break;case"documents":e="No documents found.";break;case"links":e="No links found.";break;case"audio":e="No audio found.";break;default:e="No media found."}return c.a.createElement("div",{className:"content empty-list"},c.a.createElement(Zs.a,{text:e}))}return c.a.createElement("div",{className:`content ${x}-list`,teactFastList:!0},"media"===x?R.map(e=>o[e]&&c.a.createElement(Ys.a,{key:e,message:o[e],onClick:V})):"documents"===x?R.map(e=>o[e]&&c.a.createElement(_t.a,{key:e,message:o[e],withDate:!0,smaller:!0,className:"scroll-item",onDateClick:Q})):"links"===x?R.map(e=>o[e]&&c.a.createElement(Js.a,{key:e,message:o[e],onMessageClick:Q})):"audio"===x?R.map(e=>o[e]&&c.a.createElement(zt.a,{key:e,renderingFor:"sharedMedia",message:o[e],date:o[e].date,lastSyncTime:I,className:"scroll-item",onPlay:$,onDateClick:Q})):"members"===x?R.map((e,t)=>c.a.createElement(Ws.a,{key:e,teactOrderKey:t,className:"chat-item-clickable scroll-item",onClick:()=>W(e)},c.a.createElement(We.a,{userId:e,forceShowSelf:!0}))):void 0)}return c.a.createElement($s.a,{ref:S,className:"Profile custom-scroll",itemSelector:en(x),items:R,cacheBuster:q,preloadBackwards:n.cb,isDisabled:"members"===A,noFastList:!0,onLoadMore:L,onScroll:D},!F&&function(e,t){return c.a.createElement("div",{className:"profile-info"},t?c.a.createElement(c.a.Fragment,null,c.a.createElement(We.a,{userId:t,avatarSize:"jumbo",forceShowSelf:t!==e,withMediaViewer:!0,withFullInfo:!0}),c.a.createElement(Qs,{userId:t,forceShowSelf:t!==e})):c.a.createElement(c.a.Fragment,null,c.a.createElement(Qe.a,{chatId:e,avatarSize:"jumbo",withMediaViewer:!0,withFullInfo:!0}),c.a.createElement(Ks,{chatId:e})))}(e,r),!p&&c.a.createElement("div",{className:"shared-media"},c.a.createElement(X.a,{ref:k,name:"slide",activeKey:B,renderCount:T.length,shouldRestoreHeight:!0,className:"shared-media-transition",onStart:U,onStop:_},Z),c.a.createElement(je.a,{activeTab:N,tabs:T,onSwitchTab:P})))}));var an=e=>{const t=Object(Ie.a)(pe.a.Extra,"RightSearch");return t?c.a.createElement(t,e):c.a.createElement(ve.a,null)};var sn=e=>{const t=Object(Ie.a)(pe.a.Extra,"Management");return t?c.a.createElement(t,e):c.a.createElement(ve.a,null)};var nn=()=>{const e=Object(Ie.a)(pe.a.Extra,"Statistics");return e?c.a.createElement(e,null):c.a.createElement(ve.a,null)};var cn=()=>{const e=Object(Ie.a)(pe.a.Extra,"StickerSearch");return e?c.a.createElement(e,null):c.a.createElement(ve.a,null)};var rn=()=>{const e=Object(Ie.a)(pe.a.Extra,"GifSearch");return e?c.a.createElement(e,null):c.a.createElement(ve.a,null)};var on=()=>{const e=Object(Ie.a)(pe.a.Extra,"PollResults");return e?c.a.createElement(e,null):c.a.createElement(ve.a,null)};a(235);const ln=Object.keys(l.l).length/2,dn=Object.keys(l.g).length/2;function bn(){const e=document.querySelector(".RightHeader .SearchInput input");e&&e.blur()}var un=Object(c.h)(Object(s.h)(e=>{const{chatId:t,threadId:a}=Object(o.x)(e)||{},s=Object(o.d)(e);return{contentKey:Object(o.ib)(e),chatId:t,threadId:a,currentProfileUserId:e.users.selectedId,isChatSelected:Boolean(t&&s)}},(e,t)=>Object(d.l)(t,["openUserInfo","toggleChatInfo","toggleManagement","toggleStatistics","closeLocalTextSearch","setStickerSearchQuery","setGifSearchQuery","closePollResults"]))(({contentKey:e,chatId:t,threadId:a,currentProfileUserId:s,isChatSelected:r,toggleChatInfo:o,toggleManagement:i,toggleStatistics:d,openUserInfo:b,closeLocalTextSearch:u,setStickerSearchQuery:m,setGifSearchQuery:h,closePollResults:O})=>{var j;const{width:g}=Ue(),[f,p]=Object(c.r)(l.k.Profile),[I,v]=Object(c.r)(l.g.Initial),[y,w]=Object(c.r)(),[C,E]=Object(c.r)(),M=f!==l.k.Profile,S=void 0!==e,k=e===l.l.ChatInfo||e===l.l.UserInfo,N=e===l.l.Search,P=e===l.l.Management,T=e===l.l.Statistics,A=e===l.l.StickerSearch,x=e===l.l.GifSearch,R=e===l.l.PollResults,L=g<=n.S,[F,B]=Object(c.r)(!S),D=null!==(j=Ve(e,!0,!r))&&void 0!==j?j:-1,U=Object(c.m)(()=>{switch(e){case l.l.ChatInfo:if(M){p(l.k.Profile);break}o();break;case l.l.UserInfo:if(M){p(l.k.Profile);break}b({id:void 0});break;case l.l.Management:switch(I){case l.g.Initial:i();break;case l.g.ChatPrivacyType:case l.g.Discussion:case l.g.GroupPermissions:case l.g.GroupType:case l.g.ChatAdministrators:case l.g.ChannelSubscribers:case l.g.GroupMembers:v(l.g.Initial);break;case l.g.GroupUserPermissionsCreate:case l.g.GroupRemovedUsers:case l.g.GroupUserPermissions:v(l.g.GroupPermissions),w(void 0),E(void 0);break;case l.g.ChatAdminRights:case l.g.GroupRecentActions:v(l.g.ChatAdministrators)}break;case l.l.Statistics:d();break;case l.l.Search:bn(),u();break;case l.l.StickerSearch:case l.l.GifSearch:bn(),m({query:void 0}),h({query:void 0});break;case l.l.PollResults:O()}},[e,M,o,b,d,O,I,i,u,m,h]),H=Object(c.m)((e,t)=>{w(e),E(t)},[]);function q(){if(-1!==D)switch(D){case l.l.ChatInfo:case l.l.UserInfo:return c.a.createElement(tn,{key:s||t,chatId:t,userId:s,profileState:f,onProfileStateChange:p});case l.l.Search:return c.a.createElement(an,{chatId:t,threadId:a});case l.l.Management:return c.a.createElement(sn,{chatId:t,currentScreen:I,isPromotedByCurrentUser:C,selectedChatMemberId:y,onScreenSelect:v,onChatMemberSelect:H});case l.l.Statistics:return c.a.createElement(nn,null);case l.l.StickerSearch:return c.a.createElement(cn,null);case l.l.GifSearch:return c.a.createElement(rn,null);case l.l.PollResults:return c.a.createElement(on,null)}}return Object(c.n)(()=>S?Object(Z.a)(U):void 0,[S,U]),Object(c.n)(()=>{setTimeout(()=>{B(!S)},300)},[S]),Object(c.n)(()=>{S&&L&&U()},[L]),Object(ut.a)(([a,s])=>{(a===l.l.ChatInfo&&e===l.l.UserInfo||a===l.l.UserInfo&&e===l.l.ChatInfo||s!==t)&&(p(l.k.Profile),v(l.g.Initial))},[e,t]),c.a.createElement("div",{id:"RightColumn-wrapper",className:r?void 0:"is-hidden"},L&&c.a.createElement("div",{className:"overlay-backdrop",onClick:U}),c.a.createElement("div",{id:"RightColumn"},c.a.createElement(Hs,{chatId:t,isColumnOpen:S,isProfile:k,isSearch:N,isManagement:P,isStatistics:T,isStickerSearch:A,isGifSearch:x,isPollResults:R,profileState:f,managementScreen:I,onClose:U}),c.a.createElement(X.a,{name:F?"none":"zoom-fade",renderCount:ln+dn,activeKey:P?ln+I:D},q)))}));var mn=Object(c.h)(({isOpen:e})=>{const t=Object(Ie.a)(pe.a.Extra,"MediaViewer",!e);return t?c.a.createElement(t,null):void 0});var hn=e=>{const{isOpen:t}=e,a=Object(Ie.a)(pe.a.Extra,"ForwardPicker",!t);return a?c.a.createElement(a,e):void 0};var On=({isOpen:e})=>{const t=Object(Ie.a)(pe.a.Extra,"Notifications",!e);return t?c.a.createElement(t,null):void 0};var jn=({isOpen:e})=>{const t=Object(Ie.a)(pe.a.Extra,"Errors",!e);return t?c.a.createElement(t,null):void 0};a(236);let gn,fn=!1;var pn=Object(c.h)(Object(s.h)(e=>({animationLevel:e.settings.byKey.animationLevel,lastSyncTime:e.lastSyncTime,isLeftColumnShown:e.isLeftColumnShown,isRightColumnShown:Object(o.U)(e),isMediaViewerOpen:Object(o.R)(e),isForwardModalOpen:Object(o.P)(e),hasNotifications:Boolean(e.notifications.length),hasErrors:Boolean(e.errors.length)}),(e,t)=>Object(d.l)(t,["loadAnimatedEmojis"]))(({lastSyncTime:e,loadAnimatedEmojis:t,isLeftColumnShown:a,isRightColumnShown:s,isMediaViewerOpen:r,isForwardModalOpen:o,animationLevel:i,hasNotifications:l,hasErrors:d})=>{n.m&&!fn&&(fn=!0,console.log(">>> RENDER MAIN")),Object(c.n)(()=>{e&&t()},[e,t]);const{transitionClassNames:b}=Object(Y.a)(!a,void 0,!0),{transitionClassNames:u}=Object(Y.a)(s,void 0,!0),m=Object(J.a)(b.replace(/([\w-]+)/g,"middle-column-$1"),u.replace(/([\w-]+)/g,"right-column-$1"));function h(e){e.preventDefault(),e.stopPropagation()}return Object(c.n)(()=>{document.body.classList.toggle("is-middle-column-open",m.includes("middle-column-open")),document.body.classList.toggle("is-right-column-shown",m.includes("right-column-open"))},[m]),Object(c.n)(()=>{i>0&&(document.body.classList.add("animating-right-column"),Object(K.b)(350+n.c),gn&&(clearTimeout(gn),gn=void 0),gn=window.setTimeout(()=>{document.body.classList.remove("animating-right-column"),gn=void 0},350+n.c))},[i,s]),c.a.createElement("div",{id:"Main",className:m,onDrop:h,onDragOver:h},c.a.createElement(Le,null),c.a.createElement(Bs,null),c.a.createElement(un,null),c.a.createElement(mn,{isOpen:r}),c.a.createElement(hn,{isOpen:o}),c.a.createElement(On,{isOpen:l}),c.a.createElement(jn,{isOpen:d}))}));n.m&&console.log(">>> FINISH LOAD MAIN BUNDLE"),Object(s.d)().initApi()}}]); \ No newline at end of file diff --git a/dist/4.5c61fe3afeb2ca160ac4.css b/dist/4.7c35e30ab2d63d3cc0ee.css similarity index 100% rename from dist/4.5c61fe3afeb2ca160ac4.css rename to dist/4.7c35e30ab2d63d3cc0ee.css diff --git a/dist/4.5c61fe3afeb2ca160ac4.js b/dist/4.7c35e30ab2d63d3cc0ee.js similarity index 75% rename from dist/4.5c61fe3afeb2ca160ac4.js rename to dist/4.7c35e30ab2d63d3cc0ee.js index e81d45ec..254743d4 100644 --- a/dist/4.5c61fe3afeb2ca160ac4.js +++ b/dist/4.7c35e30ab2d63d3cc0ee.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[4],{105:function(e,t,n){"use strict";var r=n(0),a=n(7),o=n(9),c=n(8),l=n(43);let i,u;async function s(){return i||(i=n.e(7).then(n.bind(null,305)),u=(await i).default),i}setTimeout(s,5e3);t.a=Object(r.h)(({className:e,id:t,animationData:n,play:i,playSegment:d,speed:f,noLoop:m,size:h,quality:b,isLowPriority:v,onLoad:p})=>{const[g,E]=Object(r.r)(),j=Object(r.q)(null),O=Object(r.q)(!1),y=Object(r.q)(!1),w=Object(r.q)();w.current=i;const k=Object(r.q)();k.current=d,Object(r.n)(()=>{if(g||!n)return;const e=()=>{if(!j.current)return;const e=new u(t,j.current,n,{noLoop:m,size:h,quality:b,isLowPriority:v},p);f&&e.setSpeed(f),E(e)};u?e():s().then(()=>{Object(o.b)(()=>{j.current&&e()})})},[g,n,t,v,m,p,b,h,f]),Object(r.n)(()=>()=>{g&&g.destroy()},[g]);const N=Object(r.m)((e=!1)=>{g&&(w.current||k.current)&&(k.current?g.playSegment(k.current):e?g.goToAndPlay(0):g.play())},[g]),C=Object(r.m)(()=>{g&&g.pause()},[g]),L=Object(r.m)(()=>{y.current=!0,g&&(O.current||(O.current=g.isPlaying()),C())},[g,C]),A=Object(r.m)(()=>{O.current&&N(),O.current=!1,y.current=!1},[N]),M=Object(r.m)(()=>{Object(o.b)(A)},[A]);var P,T;Object(r.n)(()=>{g&&(i||d?y.current?O.current=!0:N(m):y.current?O.current=!1:C())},[g,i,d,m,N,C]),Object(l.a)(L,A),P=L,T=M,Object(r.n)(()=>(document.hasFocus()||P(),window.addEventListener("blur",P),window.addEventListener("focus",T),()=>{window.removeEventListener("focus",T),window.removeEventListener("blur",P)}),[P,T]);const S=Object(c.a)("AnimatedSticker",e,a.d&&i&&"is-playing"),x=h?`width: ${h}px; height: ${h}px;`:void 0;return r.a.createElement("div",{ref:j,className:S,style:x})})},114:function(e,t,n){"use strict";var r=n(0),a=n(57);t.a=({containerId:e,className:t,children:n})=>{const o=Object(r.q)(document.createElement("div"));return Object(r.o)(()=>{const n=document.querySelector(e||"#portals");if(!n)return;const r=o.current;return t&&r.classList.add(t),n.appendChild(r),()=>{a.a.render(void 0,r),n.removeChild(r)}},[t,e]),a.a.render(n,o.current)}},116:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(5),a=n(48);const o={MonkeyIdle:n.p+"TwoFactorSetupMonkeyIdle.dea4a492c144df84ddab778dc8a3f0cd.tgs",MonkeyTracking:n.p+"TwoFactorSetupMonkeyTracking.eb5a7a6f166fb7589c12e6248561fb58.tgs",MonkeyClose:n.p+"TwoFactorSetupMonkeyClose.604c4c833d322b7e6c3ea19bef058241.tgs",MonkeyPeek:n.p+"TwoFactorSetupMonkeyPeek.1905436b042520363d7e59f5d7f903ab.tgs",FoldersAll:n.p+"FoldersAll.3f9f9e243d19f0fbf9aaaff11cbd4572.tgs",FoldersNew:n.p+"FoldersNew.9a40d71c0c8be70f5bd14ff2d7bc1593.tgs",DiscussionGroups:n.p+"DiscussionGroupsDucks.9ea453d1be9d1b0ee77a992f8e587485.tgs"};function c(e){const t=o[e].replace(window.location.origin,"");return a.b("file"+t,r.ApiMediaFormat.Lottie)}},120:function(e,t,n){"use strict";var r=n(0),a=n(8),o=n(1),c=n(14),l=n(93),i=n(31),u=n(98),s=n(16);n(140);const d={type:"blob",quality:.8,format:"jpeg",circle:!1};let f,m,h;var b=Object(r.h)(({file:e,onChange:t,onClose:a})=>{const[b,v]=Object(r.r)(!1);Object(r.n)(()=>{e&&(b?async function(e){try{const t=document.getElementById("avatar-crop");if(!t)return;const{offsetWidth:n,offsetHeight:r}=t;h=new f(t,{enableZoom:!0,boundary:{width:n,height:r},viewport:{width:n-16,height:r-16,type:"circle"}});const a=await Object(c.a)(e);await h.bind({url:a})}catch(e){o.l&&console.error(e)}}(e):async function(){return m||(m=Promise.all([n.e(5),n.e(8)]).then(n.bind(null,301)),f=(await m).default),m}().then(()=>v(!0)))},[e,b]);const p=Object(l.a)();return r.a.createElement(u.a,{isOpen:Boolean(e),onClose:a,title:"Drag to reposition",className:"CropModal",hasCloseButton:!0},b?r.a.createElement("div",{id:"avatar-crop"}):r.a.createElement(s.a,null),r.a.createElement(i.a,{className:"confirm-button",round:!0,color:"primary",onClick:async function(){if(!h)return;const e=await h.result(d),n="string"==typeof e?e:Object(c.b)(e,"avatar.jpg");t(n)},ariaLabel:p("CropImage")},r.a.createElement("i",{className:"icon-check"})))});n(141);t.a=Object(r.h)(({title:e="Change your profile picture",disabled:t,currentAvatarBlobUrl:n,onChange:o})=>{const[c,l]=Object(r.r)(),[i,u]=Object(r.r)(n);Object(r.n)(()=>{u(n)},[n]);const s=Object(a.a)(i&&"filled",t&&"disabled");return r.a.createElement("div",{className:"AvatarEditable"},r.a.createElement("label",{className:s,role:"button",tabIndex:0,title:e},r.a.createElement("input",{type:"file",onChange:function(e){const t=e.target;t&&t.files&&t.files[0]&&(l(t.files[0]),t.value="")},accept:"image/png, image/jpeg"}),r.a.createElement("i",{className:"icon-camera-add"}),i&&r.a.createElement("img",{src:i,alt:"Avatar"})),r.a.createElement(b,{file:c,onClose:function(){l(void 0)},onChange:function(e){l(void 0),o(e),i&&URL.revokeObjectURL(i),u(URL.createObjectURL(e))}}))})},125:function(e,t,n){},137:function(e,t,n){"use strict";var r=n(0),a=n(1),o=n(7),c=n(116),l=n(105);n(125);const i=[0,50],u=[0,20],s=[20,0],d=o.f?a.db:a.cb;t.a=Object(r.h)(({isPasswordVisible:e,isBig:t})=>{const[n,o]=Object(r.r)(),[f,m]=Object(r.r)(),[h,b]=Object(r.r)(!1),[v,p]=Object(r.r)(!1);Object(r.n)(()=>{n?setTimeout(()=>p(!0),2e3):Object(c.a)("MonkeyClose").then(o)},[n]),Object(r.n)(()=>{f||Object(c.a)("MonkeyPeek").then(m)},[f]);const g=Object(r.m)(()=>b(!0),[]);return r.a.createElement("div",{id:"monkey",className:t?"big":""},!h&&r.a.createElement("div",{className:"monkey-preview"}),n&&r.a.createElement(l.a,{id:"closeMonkey",size:t?a.nb:d,className:v?"hidden":"shown",animationData:n,playSegment:i,noLoop:!0,onLoad:g}),f&&r.a.createElement(l.a,{id:"peekMonkey",size:t?a.nb:d,className:v?"shown":"hidden",animationData:f,playSegment:e?u:s,noLoop:!0}))})},138:function(e,t,n){"use strict";var r=n(0),a=n(1),o=n(7),c=n(8),l=n(31);const i=o.f?550:400;t.a=Object(r.h)(({isLoading:e=!1,isPasswordVisible:t,error:n,hint:u,placeholder:s="Password",submitLabel:d="Next",clearError:f,onChangePasswordVisibility:m,onInputChange:h,onSubmit:b})=>{const v=Object(r.q)(null),[p,g]=Object(r.r)(""),[E,j]=Object(r.r)(!1);return Object(r.n)(()=>{o.k||setTimeout(()=>{v.current.focus()},i)},[]),r.a.createElement("form",{action:"",onSubmit:function(t){t.preventDefault(),e||E&&b(p)},autoComplete:"off"},r.a.createElement("div",{className:Object(c.a)("input-group password-input",p&&"touched",n&&"error")},r.a.createElement("input",{ref:v,className:"form-control",type:t?"text":"password",id:"sign-in-password",value:p||"",autoComplete:"current-password",onChange:function(e){n&&f();const{target:t}=e;g(t.value),j(t.value.length>=a.O),h&&h(t.value)}}),r.a.createElement("label",null,n||u||s),r.a.createElement("div",{className:"toggle-password",onClick:function(){m(!t)},role:"button",tabIndex:0,title:"Toggle password visibility"},r.a.createElement("i",{className:t?"icon-eye":"icon-eye-closed"}))),E&&r.a.createElement(l.a,{type:"submit",ripple:!0,isLoading:e},d))})},139:function(e,t,n){},140:function(e,t,n){},141:function(e,t,n){},92:function(e,t,n){"use strict";n.r(t),n.d(t,"AuthCode",(function(){return h})),n.d(t,"AuthPassword",(function(){return p})),n.d(t,"AuthRegister",(function(){return j})),n.d(t,"AuthQrCode",(function(){return N}));var r=n(0),a=n(2),o=n(7),c=n(3),l=n(39),i=n(16),u=n(1),s=n(116),d=n(105);n(125);const f=o.f?u.db:u.cb;var m=Object(r.h)(({code:e,codeLength:t,trackingDirection:n,isTracking:a,isBig:o})=>{const[c,l]=Object(r.r)(),[i,m]=Object(r.r)(),[h,b]=Object(r.r)(!1),v=165/t;Object(r.n)(()=>{c||Object(s.a)("MonkeyIdle").then(l)},[c]),Object(r.n)(()=>{i||Object(s.a)("MonkeyTracking").then(m)},[i]);const p=Object(r.m)(()=>b(!0),[]);return r.a.createElement("div",{id:"monkey",className:o?"big":""},!h&&r.a.createElement("div",{className:"monkey-preview"}),c&&r.a.createElement(d.a,{id:"idleMonkey",size:o?u.nb:f,className:a?"hidden":void 0,animationData:c,play:!a,onLoad:p}),i&&r.a.createElement(d.a,{id:"trackingMonkey",size:o?u.nb:f,className:a?"shown":"hidden",animationData:i,playSegment:a?function(){const r=e&&e.length>1||n<0?15+v*(e.length-1):0,a=e.length===t?180:15+v*e.length;return n<1?[a,r]:[r,a]}():void 0,speed:2,noLoop:!0}))});var h=Object(r.h)(Object(a.h)(e=>Object(c.l)(e,["authPhoneNumber","authIsCodeViaApp","authIsLoading","authError"]),(e,t)=>Object(c.l)(t,["setAuthCode","returnToAuthPhoneNumber","clearAuthError"]))(({authPhoneNumber:e,authIsCodeViaApp:t,authIsLoading:n,authError:a,setAuthCode:c,returnToAuthPhoneNumber:u,clearAuthError:s})=>{const d=Object(r.q)(null),[f,h]=Object(r.r)(""),[b,v]=Object(r.r)(!1),[p,g]=Object(r.r)(1);Object(r.n)(()=>{o.k||d.current.focus()},[]);const E=Object(r.m)(e=>{a&&s();const{currentTarget:t}=e;t.value=t.value.replace(/[^\d]+/,"").substr(0,5),t.value!==f&&(h(t.value),b?t.value.length||v(!1):v(!0),f&&f.length>t.value.length?g(-1):g(1),5===t.value.length&&c({code:t.value}))},[a,s,f,b,c]);return r.a.createElement("div",{id:"auth-code-form",className:"custom-scroll"},r.a.createElement("div",{className:"auth-form"},r.a.createElement(m,{code:f,codeLength:5,isTracking:b,trackingDirection:p}),r.a.createElement("h2",null,e,r.a.createElement("div",{className:"auth-number-edit",onClick:()=>u(),role:"button",tabIndex:0,title:"Sign In with another phone number"},r.a.createElement("i",{className:"icon-edit"}))),r.a.createElement("p",{className:"note"},t?r.a.createElement(r.a.Fragment,null,"We have sent the code to the Telegram app",r.a.createElement("br",null),"on your other device."):r.a.createElement(r.a.Fragment,null,"We have sent you an SMS",r.a.createElement("br",null),"with the code.")),r.a.createElement(l.a,{ref:d,id:"sign-in-code",label:"Code",onInput:E,value:f,error:a,autoComplete:"one-time-code",inputMode:"decimal"}),n&&r.a.createElement(i.a,null)))})),b=n(137),v=n(138);var p=Object(r.h)(Object(a.h)(e=>Object(c.l)(e,["authIsLoading","authError","authHint"]),(e,t)=>Object(c.l)(t,["setAuthPassword","clearAuthError"]))(({authIsLoading:e,authError:t,authHint:n,setAuthPassword:a,clearAuthError:o})=>{const[c,l]=Object(r.r)(!1),i=Object(r.m)(e=>{l(e)},[]),u=Object(r.m)(e=>{a({password:e})},[a]);return r.a.createElement("div",{id:"auth-password-form",className:"custom-scroll"},r.a.createElement("div",{className:"auth-form"},r.a.createElement(b.a,{isPasswordVisible:c}),r.a.createElement("h2",null,"Enter Your Password"),r.a.createElement("p",{className:"note"},"Your account is protected with",r.a.createElement("br",null),"an additional password."),r.a.createElement(v.a,{clearError:o,error:t,hint:n,isLoading:e,isPasswordVisible:c,onChangePasswordVisibility:i,onSubmit:u})))})),g=n(31),E=n(120);var j=Object(r.h)(Object(a.h)(e=>Object(c.l)(e,["authIsLoading","authError"]),(e,t)=>Object(c.l)(t,["signUp","clearAuthError","uploadProfilePhoto"]))(({authIsLoading:e,authError:t,signUp:n,clearAuthError:a,uploadProfilePhoto:o})=>{const[c,i]=Object(r.r)(!1),[u,s]=Object(r.r)(),[d,f]=Object(r.r)(""),[m,h]=Object(r.r)("");return r.a.createElement("div",{id:"auth-registration-form",className:"custom-scroll"},r.a.createElement("div",{className:"auth-form"},r.a.createElement("form",{action:"",method:"post",onSubmit:function(e){e.preventDefault(),n({firstName:d,lastName:m}),u&&o({file:u})}},r.a.createElement(E.a,{onChange:s}),r.a.createElement("h2",null,"Your Name"),r.a.createElement("p",{className:"note"},"Enter your name and add",r.a.createElement("br",null),"a profile picture."),r.a.createElement(l.a,{id:"registration-first-name",label:"Name",onChange:function(e){t&&a();const{target:n}=e;f(n.value),i(n.value.length>0)},value:d,error:t,autoComplete:"given-name"}),r.a.createElement(l.a,{id:"registration-last-name",label:"Last Name (optional)",onChange:function(e){const{target:t}=e;h(t.value)},value:m,autoComplete:"family-name"}),c&&r.a.createElement(g.a,{type:"submit",ripple:!0,isLoading:e},"Start Messaging"))))}));let O=null;class y{}y.render=function(e,t){O(e,t)},self.QrCreator=y,function(e){function t(t,n,r,a){var o={},c=e(r,n);c.u(t),c.J(),a=a||0;var l=c.h(),i=c.h()+2*a;return o.text=t,o.level=n,o.version=r,o.O=i,o.a=function(e,t){return t-=a,!(0>(e-=a)||e>=l||0>t||t>=l)&&c.a(e,t)},o}function n(e,t,n,r,a,o,c,l,i,u){function s(t,n,r,a,c,l,i){t?(e.lineTo(n+l,r+i),e.arcTo(n,r,a,c,o)):e.lineTo(n,r)}c?e.moveTo(t+o,n):e.moveTo(t,n),s(l,r,n,r,a,-o,0),s(i,r,a,t,a,0,-o),s(u,t,a,t,n,o,0),s(c,t,n,r,n,0,o)}function r(e,t,n,r,a,o,c,l,i,u){function s(t,n,r,a){e.moveTo(t+r,n),e.lineTo(t,n),e.lineTo(t,n+a),e.arcTo(t,n,t+r,n,o)}c&&s(t,n,o,o),l&&s(r,n,-o,o),i&&s(r,a,-o,-o),u&&s(t,a,o,-o)}function a(e,a){e:{var o=a.text,c=a.v,l=a.N,i=a.K,u=a.P;for(l=Math.max(1,l||1),i=Math.min(40,i||40);l<=i;l+=1)try{var s=t(o,c,l,u);break e}catch(e){}s=void 0}if(!s)return null;for(o=e.getContext("2d"),a.background&&(o.fillStyle=a.background,o.fillRect(a.left,a.top,a.size,a.size)),c=s.O,i=a.size/c,o.beginPath(),u=0;uMath.round(e*t.size)),"linear-gradient"===r)var o=e.createLinearGradient.apply(e,n);else{if("radial-gradient"!==r)throw Error("Unsupported fill");o=e.createRadialGradient.apply(e,n)}a.forEach(([e,t])=>{o.addColorStop(e,t)}),e.fillStyle=o}}(o,a),o.fill(),e}var o={minVersion:1,maxVersion:40,ecLevel:"L",left:0,top:0,size:200,fill:"#000",background:null,text:"no text",radius:.5,quiet:0};O=function(e,t){var n={};Object.assign(n,o,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),a(t,n)):((e=document.createElement("canvas")).width=n.size,e.height=n.size,n=a(e,n),t.appendChild(n))}}(function(){function e(a,c){function l(e,t){for(var n=-1;7>=n;n+=1)if(!(-1>=e+n||d<=e+n))for(var r=-1;7>=r;r+=1)-1>=t+r||d<=t+r||(s[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 i(e,n){for(var c=d=4*a+17,i=Array(c),h=0;h=p;p+=1)for(var g=-2;2>=g;g+=1)s[b+p][v+g]=-2==p||2==p||-2==g||2==g||0==p&&0==g}for(c=8;ci;i+=1)h=!e&&1==(c>>i&1),s[6>i?i:8>i?i+1:d-15+i][8]=h,s[8][8>i?d-i-1:9>i?15-i:14-i]=h;if(s[d-8][8]=!e,7<=a){for(c=r.A(a),i=0;18>i;i+=1)h=!e&&1==(c>>i&1),s[Math.floor(i/3)][i%3+d-8-3]=h;for(i=0;18>i;i+=1)h=!e&&1==(c>>i&1),s[i%3+d-8-3][Math.floor(i/3)]=h}if(null==f){for(e=o.I(a,u),c=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}(),i=0;i8*h)throw Error("code length overflow. ("+c.f()+">"+8*h+")");for(c.f()+4<=8*h&&c.put(0,4);0!=c.f()%8;)c.m(!1);for(;!(c.f()>=8*h)&&(c.put(236,8),!(c.f()>=8*h));)c.put(17,8);var E=0;for(h=i=0,b=Array(e.length),v=Array(e.length),p=0;pp;p+=1)null==s[i][v-p]&&(g=!1,b>>h&1)),n(i,v-p)&&(g=!g),s[i][v-p]=g,-1==--h&&(b+=1,h=7));if(0>(i+=c)||d<=i){i-=c,c=-c;break}}}var u=n[c],s=null,d=0,f=null,m=[],h={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||d<=e||0>t||d<=t)throw Error(e+","+t);return s[e][t]},h:function(){return d},J:function(){for(var e=0,t=0,n=0;8>n;n+=1){i(!0,n);var a=r.D(h);(0==n||e>a)&&(e=a,t=n)}i(!1,t)}};return h}function t(e,n){if(void 0===e.length)throw Error(e.length+"/"+n);var r=function(){for(var t=0;to.b()-e.b())return o;for(var n=a.g(o.c(0))-a.g(e.c(0)),r=Array(o.b()),c=0;cr?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=l;l+=1)if(!(0>r+l||t<=r+l))for(var i=-1;1>=i;i+=1)0>a+i||t<=a+i||(0!=l||0!=i)&&c==e.a(r+l,a+i)&&(o+=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]}}}(),o=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 a=0;aObject(c.l)(e,["connectionState","authQrCode"]),(e,t)=>Object(c.l)(t,["returnToAuthPhoneNumber"]))(({connectionState:e,authQrCode:t,returnToAuthPhoneNumber:n})=>{const a=Object(r.q)(null);return Object(r.n)(()=>{if(!t||"connectionStateReady"!==e)return;const n=a.current;n.innerHTML="",n.classList.remove("pre-animate"),w.render({text:"tg://login?token="+t.token,radius:.5,ecLevel:"M",fill:"#4E96D4",size:280},n)},[e,t]),r.a.createElement("div",{id:"auth-qr-form",className:"custom-scroll"},r.a.createElement("div",{className:"auth-form"},r.a.createElement("div",{className:Object(k.a)("qr-container",t&&"pre-animate"),ref:a},!t&&r.a.createElement(i.a,null)),r.a.createElement("h3",null," Log in to Telegram by QR Code"),r.a.createElement("ol",null,r.a.createElement("li",null,r.a.createElement("span",null,"Open Telegram on your phone")),r.a.createElement("li",null,r.a.createElement("span",null,"Go to ",r.a.createElement("b",null,"Settings")," > ",r.a.createElement("b",null,"Devices")," > ",r.a.createElement("b",null,"Scan QR"))),r.a.createElement("li",null,r.a.createElement("span",null,"Point your phone at this screen to confirm login"))),r.a.createElement(g.a,{isText:!0,onClick:n},"Log in by phone number")))}))},93:function(e,t,n){"use strict";var r=n(0),a=n(10),o=n(29);t.a=()=>{const e=Object(o.a)();return Object(r.n)(()=>a.a(e),[e]),a.b}},98:function(e,t,n){"use strict";var r=n(0),a=n(50);var o=n(8),c=n(43),l=n(27),i=n(51),u=n(93),s=n(31),d=n(114);n(139);t.a=e=>{const{title:t,className:n,isOpen:f,header:m,hasCloseButton:h,noBackdrop:b,children:v,onClose:p,onCloseAnimationEnd:g,onEnter:E}=e,{shouldRender:j,transitionClassNames:O}=Object(l.a)(f,g),y=Object(r.q)(null);Object(r.n)(()=>f?Object(a.a)({onEsc:p,onEnter:E}):void 0,[f,p,E]),Object(r.n)(()=>f&&y.current?function(e){function t(t){if("Tab"!==t.key)return;t.preventDefault(),t.stopPropagation();const n=Array.from(e.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'));if(!n.length)return;const r=n.findIndex(e=>e.isSameNode(document.activeElement));let a=0;r>=0&&(a=t.shiftKey?r>0?r-1:n.length-1:r{document.removeEventListener("keydown",t,!1)}}(y.current):void 0,[f]),Object(i.a)(([e])=>(document.body.classList.toggle("has-open-dialog",f),(f||!f&&void 0!==e)&&Object(c.b)(200),()=>{document.body.classList.remove("has-open-dialog")}),[f]);const w=Object(u.a)();if(!j)return;const k=Object(o.a)("Modal",n,O,b&&"transparent-backdrop");return r.a.createElement(d.a,null,r.a.createElement("div",{ref:y,className:k,tabIndex:-1,role:"dialog"},r.a.createElement("div",{className:"modal-container"},r.a.createElement("div",{className:"modal-backdrop",onClick:p}),r.a.createElement("div",{className:"modal-dialog"},m||(t?r.a.createElement("div",{className:"modal-header"},h&&r.a.createElement(s.a,{round:!0,color:"translucent",size:"smaller",ariaLabel:w("Close"),onClick:p},r.a.createElement("i",{className:"icon-close"})),r.a.createElement("div",{className:"modal-title"},t)):void 0),r.a.createElement("div",{className:"modal-content custom-scroll"},v)))))}}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[4],{105:function(e,t,n){"use strict";var r=n(0),a=n(7),o=n(9),c=n(8),l=n(43);let i,u;async function s(){return i||(i=n.e(7).then(n.bind(null,305)),u=(await i).default),i}setTimeout(s,5e3);t.a=Object(r.h)(({className:e,id:t,animationData:n,play:i,playSegment:f,speed:d,noLoop:m,size:h,quality:b,isLowPriority:p,onLoad:v})=>{const[g,E]=Object(r.r)(),j=Object(r.q)(null),O=Object(r.q)(!1),y=Object(r.q)(!1),w=Object(r.q)();w.current=i;const k=Object(r.q)();k.current=f,Object(r.n)(()=>{if(g||!n)return;const e=()=>{if(!j.current)return;const e=new u(t,j.current,n,{noLoop:m,size:h,quality:b,isLowPriority:p},v);d&&e.setSpeed(d),E(e)};u?e():s().then(()=>{Object(o.b)(()=>{j.current&&e()})})},[g,n,t,p,m,v,b,h,d]),Object(r.n)(()=>()=>{g&&g.destroy()},[g]);const N=Object(r.m)((e=!1)=>{g&&(w.current||k.current)&&(k.current?g.playSegment(k.current):e?g.goToAndPlay(0):g.play())},[g]),C=Object(r.m)(()=>{g&&g.pause()},[g]),L=Object(r.m)(()=>{y.current=!0,g&&(O.current||(O.current=g.isPlaying()),C())},[g,C]),A=Object(r.m)(()=>{O.current&&N(),O.current=!1,y.current=!1},[N]),M=Object(r.m)(()=>{Object(o.b)(A)},[A]);var P,T;Object(r.n)(()=>{g&&(i||f?y.current?O.current=!0:N(m):y.current?O.current=!1:C())},[g,i,f,m,N,C]),Object(l.a)(L,A),P=L,T=M,Object(r.n)(()=>(document.hasFocus()||P(),window.addEventListener("blur",P),window.addEventListener("focus",T),()=>{window.removeEventListener("focus",T),window.removeEventListener("blur",P)}),[P,T]);const S=Object(c.a)("AnimatedSticker",e,a.d&&i&&"is-playing"),x=h?`width: ${h}px; height: ${h}px;`:void 0;return r.a.createElement("div",{ref:j,className:S,style:x})})},114:function(e,t,n){"use strict";var r=n(0),a=n(57);t.a=({containerId:e,className:t,children:n})=>{const o=Object(r.q)(document.createElement("div"));return Object(r.o)(()=>{const n=document.querySelector(e||"#portals");if(!n)return;const r=o.current;return t&&r.classList.add(t),n.appendChild(r),()=>{a.a.render(void 0,r),n.removeChild(r)}},[t,e]),a.a.render(n,o.current)}},116:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(5),a=n(48);const o={MonkeyIdle:n.p+"TwoFactorSetupMonkeyIdle.dea4a492c144df84ddab778dc8a3f0cd.tgs",MonkeyTracking:n.p+"TwoFactorSetupMonkeyTracking.eb5a7a6f166fb7589c12e6248561fb58.tgs",MonkeyClose:n.p+"TwoFactorSetupMonkeyClose.604c4c833d322b7e6c3ea19bef058241.tgs",MonkeyPeek:n.p+"TwoFactorSetupMonkeyPeek.1905436b042520363d7e59f5d7f903ab.tgs",FoldersAll:n.p+"FoldersAll.3f9f9e243d19f0fbf9aaaff11cbd4572.tgs",FoldersNew:n.p+"FoldersNew.9a40d71c0c8be70f5bd14ff2d7bc1593.tgs",DiscussionGroups:n.p+"DiscussionGroupsDucks.9ea453d1be9d1b0ee77a992f8e587485.tgs"};function c(e){const t=o[e].replace(window.location.origin,"");return a.b("file"+t,r.ApiMediaFormat.Lottie)}},120:function(e,t,n){"use strict";var r=n(0),a=n(8),o=n(1),c=n(14),l=n(93),i=n(31),u=n(98),s=n(16);n(140);const f={type:"blob",quality:.8,format:"jpeg",circle:!1};let d,m,h;var b=Object(r.h)(({file:e,onChange:t,onClose:a})=>{const[b,p]=Object(r.r)(!1);Object(r.n)(()=>{e&&(b?async function(e){try{const t=document.getElementById("avatar-crop");if(!t)return;const{offsetWidth:n,offsetHeight:r}=t;h=new d(t,{enableZoom:!0,boundary:{width:n,height:r},viewport:{width:n-16,height:r-16,type:"circle"}});const a=await Object(c.a)(e);await h.bind({url:a})}catch(e){o.m&&console.error(e)}}(e):async function(){return m||(m=Promise.all([n.e(5),n.e(8)]).then(n.bind(null,301)),d=(await m).default),m}().then(()=>p(!0)))},[e,b]);const v=Object(l.a)();return r.a.createElement(u.a,{isOpen:Boolean(e),onClose:a,title:"Drag to reposition",className:"CropModal",hasCloseButton:!0},b?r.a.createElement("div",{id:"avatar-crop"}):r.a.createElement(s.a,null),r.a.createElement(i.a,{className:"confirm-button",round:!0,color:"primary",onClick:async function(){if(!h)return;const e=await h.result(f),n="string"==typeof e?e:Object(c.b)(e,"avatar.jpg");t(n)},ariaLabel:v("CropImage")},r.a.createElement("i",{className:"icon-check"})))});n(141);t.a=Object(r.h)(({title:e="Change your profile picture",disabled:t,currentAvatarBlobUrl:n,onChange:o})=>{const[c,l]=Object(r.r)(),[i,u]=Object(r.r)(n);Object(r.n)(()=>{u(n)},[n]);const s=Object(a.a)(i&&"filled",t&&"disabled");return r.a.createElement("div",{className:"AvatarEditable"},r.a.createElement("label",{className:s,role:"button",tabIndex:0,title:e},r.a.createElement("input",{type:"file",onChange:function(e){const t=e.target;t&&t.files&&t.files[0]&&(l(t.files[0]),t.value="")},accept:"image/png, image/jpeg"}),r.a.createElement("i",{className:"icon-camera-add"}),i&&r.a.createElement("img",{src:i,alt:"Avatar"})),r.a.createElement(b,{file:c,onClose:function(){l(void 0)},onChange:function(e){l(void 0),o(e),i&&URL.revokeObjectURL(i),u(URL.createObjectURL(e))}}))})},125:function(e,t,n){},137:function(e,t,n){"use strict";var r=n(0),a=n(1),o=n(7),c=n(116),l=n(105);n(125);const i=[0,50],u=[0,20],s=[20,0],f=o.f?a.fb:a.eb;t.a=Object(r.h)(({isPasswordVisible:e,isBig:t})=>{const[n,o]=Object(r.r)(),[d,m]=Object(r.r)(),[h,b]=Object(r.r)(!1),[p,v]=Object(r.r)(!1);Object(r.n)(()=>{n?setTimeout(()=>v(!0),2e3):Object(c.a)("MonkeyClose").then(o)},[n]),Object(r.n)(()=>{d||Object(c.a)("MonkeyPeek").then(m)},[d]);const g=Object(r.m)(()=>b(!0),[]);return r.a.createElement("div",{id:"monkey",className:t?"big":""},!h&&r.a.createElement("div",{className:"monkey-preview"}),n&&r.a.createElement(l.a,{id:"closeMonkey",size:t?a.pb:f,className:p?"hidden":"shown",animationData:n,playSegment:i,noLoop:!0,onLoad:g}),d&&r.a.createElement(l.a,{id:"peekMonkey",size:t?a.pb:f,className:p?"shown":"hidden",animationData:d,playSegment:e?u:s,noLoop:!0}))})},138:function(e,t,n){"use strict";var r=n(0),a=n(1),o=n(7),c=n(8),l=n(31);const i=o.f?550:400;t.a=Object(r.h)(({isLoading:e=!1,isPasswordVisible:t,error:n,hint:u,placeholder:s="Password",submitLabel:f="Next",clearError:d,onChangePasswordVisibility:m,onInputChange:h,onSubmit:b})=>{const p=Object(r.q)(null),[v,g]=Object(r.r)(""),[E,j]=Object(r.r)(!1);return Object(r.n)(()=>{o.k||setTimeout(()=>{p.current.focus()},i)},[]),r.a.createElement("form",{action:"",onSubmit:function(t){t.preventDefault(),e||E&&b(v)},autoComplete:"off"},r.a.createElement("div",{className:Object(c.a)("input-group password-input",v&&"touched",n&&"error")},r.a.createElement("input",{ref:p,className:"form-control",type:t?"text":"password",id:"sign-in-password",value:v||"",autoComplete:"current-password",onChange:function(e){n&&d();const{target:t}=e;g(t.value),j(t.value.length>=a.Q),h&&h(t.value)}}),r.a.createElement("label",null,n||u||s),r.a.createElement("div",{className:"toggle-password",onClick:function(){m(!t)},role:"button",tabIndex:0,title:"Toggle password visibility"},r.a.createElement("i",{className:t?"icon-eye":"icon-eye-closed"}))),E&&r.a.createElement(l.a,{type:"submit",ripple:!0,isLoading:e},f))})},139:function(e,t,n){},140:function(e,t,n){},141:function(e,t,n){},92:function(e,t,n){"use strict";n.r(t),n.d(t,"AuthCode",(function(){return h})),n.d(t,"AuthPassword",(function(){return v})),n.d(t,"AuthRegister",(function(){return j})),n.d(t,"AuthQrCode",(function(){return N}));var r=n(0),a=n(2),o=n(7),c=n(3),l=n(39),i=n(16),u=n(1),s=n(116),f=n(105);n(125);const d=o.f?u.fb:u.eb;var m=Object(r.h)(({code:e,codeLength:t,trackingDirection:n,isTracking:a,isBig:o})=>{const[c,l]=Object(r.r)(),[i,m]=Object(r.r)(),[h,b]=Object(r.r)(!1),p=165/t;Object(r.n)(()=>{c||Object(s.a)("MonkeyIdle").then(l)},[c]),Object(r.n)(()=>{i||Object(s.a)("MonkeyTracking").then(m)},[i]);const v=Object(r.m)(()=>b(!0),[]);return r.a.createElement("div",{id:"monkey",className:o?"big":""},!h&&r.a.createElement("div",{className:"monkey-preview"}),c&&r.a.createElement(f.a,{id:"idleMonkey",size:o?u.pb:d,className:a?"hidden":void 0,animationData:c,play:!a,onLoad:v}),i&&r.a.createElement(f.a,{id:"trackingMonkey",size:o?u.pb:d,className:a?"shown":"hidden",animationData:i,playSegment:a?function(){const r=e&&e.length>1||n<0?15+p*(e.length-1):0,a=e.length===t?180:15+p*e.length;return n<1?[a,r]:[r,a]}():void 0,speed:2,noLoop:!0}))});var h=Object(r.h)(Object(a.h)(e=>Object(c.l)(e,["authPhoneNumber","authIsCodeViaApp","authIsLoading","authError"]),(e,t)=>Object(c.l)(t,["setAuthCode","returnToAuthPhoneNumber","clearAuthError"]))(({authPhoneNumber:e,authIsCodeViaApp:t,authIsLoading:n,authError:a,setAuthCode:c,returnToAuthPhoneNumber:u,clearAuthError:s})=>{const f=Object(r.q)(null),[d,h]=Object(r.r)(""),[b,p]=Object(r.r)(!1),[v,g]=Object(r.r)(1);Object(r.n)(()=>{o.k||f.current.focus()},[]);const E=Object(r.m)(e=>{a&&s();const{currentTarget:t}=e;t.value=t.value.replace(/[^\d]+/,"").substr(0,5),t.value!==d&&(h(t.value),b?t.value.length||p(!1):p(!0),d&&d.length>t.value.length?g(-1):g(1),5===t.value.length&&c({code:t.value}))},[a,s,d,b,c]);return r.a.createElement("div",{id:"auth-code-form",className:"custom-scroll"},r.a.createElement("div",{className:"auth-form"},r.a.createElement(m,{code:d,codeLength:5,isTracking:b,trackingDirection:v}),r.a.createElement("h2",null,e,r.a.createElement("div",{className:"auth-number-edit",onClick:()=>u(),role:"button",tabIndex:0,title:"Sign In with another phone number"},r.a.createElement("i",{className:"icon-edit"}))),r.a.createElement("p",{className:"note"},t?r.a.createElement(r.a.Fragment,null,"We have sent the code to the Telegram app",r.a.createElement("br",null),"on your other device."):r.a.createElement(r.a.Fragment,null,"We have sent you an SMS",r.a.createElement("br",null),"with the code.")),r.a.createElement(l.a,{ref:f,id:"sign-in-code",label:"Code",onInput:E,value:d,error:a,autoComplete:"one-time-code",inputMode:"decimal"}),n&&r.a.createElement(i.a,null)))})),b=n(137),p=n(138);var v=Object(r.h)(Object(a.h)(e=>Object(c.l)(e,["authIsLoading","authError","authHint"]),(e,t)=>Object(c.l)(t,["setAuthPassword","clearAuthError"]))(({authIsLoading:e,authError:t,authHint:n,setAuthPassword:a,clearAuthError:o})=>{const[c,l]=Object(r.r)(!1),i=Object(r.m)(e=>{l(e)},[]),u=Object(r.m)(e=>{a({password:e})},[a]);return r.a.createElement("div",{id:"auth-password-form",className:"custom-scroll"},r.a.createElement("div",{className:"auth-form"},r.a.createElement(b.a,{isPasswordVisible:c}),r.a.createElement("h2",null,"Enter Your Password"),r.a.createElement("p",{className:"note"},"Your account is protected with",r.a.createElement("br",null),"an additional password."),r.a.createElement(p.a,{clearError:o,error:t,hint:n,isLoading:e,isPasswordVisible:c,onChangePasswordVisibility:i,onSubmit:u})))})),g=n(31),E=n(120);var j=Object(r.h)(Object(a.h)(e=>Object(c.l)(e,["authIsLoading","authError"]),(e,t)=>Object(c.l)(t,["signUp","clearAuthError","uploadProfilePhoto"]))(({authIsLoading:e,authError:t,signUp:n,clearAuthError:a,uploadProfilePhoto:o})=>{const[c,i]=Object(r.r)(!1),[u,s]=Object(r.r)(),[f,d]=Object(r.r)(""),[m,h]=Object(r.r)("");return r.a.createElement("div",{id:"auth-registration-form",className:"custom-scroll"},r.a.createElement("div",{className:"auth-form"},r.a.createElement("form",{action:"",method:"post",onSubmit:function(e){e.preventDefault(),n({firstName:f,lastName:m}),u&&o({file:u})}},r.a.createElement(E.a,{onChange:s}),r.a.createElement("h2",null,"Your Name"),r.a.createElement("p",{className:"note"},"Enter your name and add",r.a.createElement("br",null),"a profile picture."),r.a.createElement(l.a,{id:"registration-first-name",label:"Name",onChange:function(e){t&&a();const{target:n}=e;d(n.value),i(n.value.length>0)},value:f,error:t,autoComplete:"given-name"}),r.a.createElement(l.a,{id:"registration-last-name",label:"Last Name (optional)",onChange:function(e){const{target:t}=e;h(t.value)},value:m,autoComplete:"family-name"}),c&&r.a.createElement(g.a,{type:"submit",ripple:!0,isLoading:e},"Start Messaging"))))}));let O=null;class y{}y.render=function(e,t){O(e,t)},self.QrCreator=y,function(e){function t(t,n,r,a){var o={},c=e(r,n);c.u(t),c.J(),a=a||0;var l=c.h(),i=c.h()+2*a;return o.text=t,o.level=n,o.version=r,o.O=i,o.a=function(e,t){return t-=a,!(0>(e-=a)||e>=l||0>t||t>=l)&&c.a(e,t)},o}function n(e,t,n,r,a,o,c,l,i,u){function s(t,n,r,a,c,l,i){t?(e.lineTo(n+l,r+i),e.arcTo(n,r,a,c,o)):e.lineTo(n,r)}c?e.moveTo(t+o,n):e.moveTo(t,n),s(l,r,n,r,a,-o,0),s(i,r,a,t,a,0,-o),s(u,t,a,t,n,o,0),s(c,t,n,r,n,0,o)}function r(e,t,n,r,a,o,c,l,i,u){function s(t,n,r,a){e.moveTo(t+r,n),e.lineTo(t,n),e.lineTo(t,n+a),e.arcTo(t,n,t+r,n,o)}c&&s(t,n,o,o),l&&s(r,n,-o,o),i&&s(r,a,-o,-o),u&&s(t,a,o,-o)}function a(e,a){e:{var o=a.text,c=a.v,l=a.N,i=a.K,u=a.P;for(l=Math.max(1,l||1),i=Math.min(40,i||40);l<=i;l+=1)try{var s=t(o,c,l,u);break e}catch(e){}s=void 0}if(!s)return null;for(o=e.getContext("2d"),a.background&&(o.fillStyle=a.background,o.fillRect(a.left,a.top,a.size,a.size)),c=s.O,i=a.size/c,o.beginPath(),u=0;uMath.round(e*t.size)),"linear-gradient"===r)var o=e.createLinearGradient.apply(e,n);else{if("radial-gradient"!==r)throw Error("Unsupported fill");o=e.createRadialGradient.apply(e,n)}a.forEach(([e,t])=>{o.addColorStop(e,t)}),e.fillStyle=o}}(o,a),o.fill(),e}var o={minVersion:1,maxVersion:40,ecLevel:"L",left:0,top:0,size:200,fill:"#000",background:null,text:"no text",radius:.5,quiet:0};O=function(e,t){var n={};Object.assign(n,o,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),a(t,n)):((e=document.createElement("canvas")).width=n.size,e.height=n.size,n=a(e,n),t.appendChild(n))}}(function(){function e(a,c){function l(e,t){for(var n=-1;7>=n;n+=1)if(!(-1>=e+n||f<=e+n))for(var r=-1;7>=r;r+=1)-1>=t+r||f<=t+r||(s[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 i(e,n){for(var c=f=4*a+17,i=Array(c),h=0;h=v;v+=1)for(var g=-2;2>=g;g+=1)s[b+v][p+g]=-2==v||2==v||-2==g||2==g||0==v&&0==g}for(c=8;ci;i+=1)h=!e&&1==(c>>i&1),s[6>i?i:8>i?i+1:f-15+i][8]=h,s[8][8>i?f-i-1:9>i?15-i:14-i]=h;if(s[f-8][8]=!e,7<=a){for(c=r.A(a),i=0;18>i;i+=1)h=!e&&1==(c>>i&1),s[Math.floor(i/3)][i%3+f-8-3]=h;for(i=0;18>i;i+=1)h=!e&&1==(c>>i&1),s[i%3+f-8-3][Math.floor(i/3)]=h}if(null==d){for(e=o.I(a,u),c=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}(),i=0;i8*h)throw Error("code length overflow. ("+c.f()+">"+8*h+")");for(c.f()+4<=8*h&&c.put(0,4);0!=c.f()%8;)c.m(!1);for(;!(c.f()>=8*h)&&(c.put(236,8),!(c.f()>=8*h));)c.put(17,8);var E=0;for(h=i=0,b=Array(e.length),p=Array(e.length),v=0;vv;v+=1)null==s[i][p-v]&&(g=!1,b>>h&1)),n(i,p-v)&&(g=!g),s[i][p-v]=g,-1==--h&&(b+=1,h=7));if(0>(i+=c)||f<=i){i-=c,c=-c;break}}}var u=n[c],s=null,f=0,d=null,m=[],h={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||f<=e||0>t||f<=t)throw Error(e+","+t);return s[e][t]},h:function(){return f},J:function(){for(var e=0,t=0,n=0;8>n;n+=1){i(!0,n);var a=r.D(h);(0==n||e>a)&&(e=a,t=n)}i(!1,t)}};return h}function t(e,n){if(void 0===e.length)throw Error(e.length+"/"+n);var r=function(){for(var t=0;to.b()-e.b())return o;for(var n=a.g(o.c(0))-a.g(e.c(0)),r=Array(o.b()),c=0;cr?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=l;l+=1)if(!(0>r+l||t<=r+l))for(var i=-1;1>=i;i+=1)0>a+i||t<=a+i||(0!=l||0!=i)&&c==e.a(r+l,a+i)&&(o+=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]}}}(),o=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 a=0;aObject(c.l)(e,["connectionState","authQrCode"]),(e,t)=>Object(c.l)(t,["returnToAuthPhoneNumber"]))(({connectionState:e,authQrCode:t,returnToAuthPhoneNumber:n})=>{const a=Object(r.q)(null);return Object(r.n)(()=>{if(!t||"connectionStateReady"!==e)return;const n=a.current;n.innerHTML="",n.classList.remove("pre-animate"),w.render({text:"tg://login?token="+t.token,radius:.5,ecLevel:"M",fill:"#4E96D4",size:280},n)},[e,t]),r.a.createElement("div",{id:"auth-qr-form",className:"custom-scroll"},r.a.createElement("div",{className:"auth-form"},r.a.createElement("div",{className:Object(k.a)("qr-container",t&&"pre-animate"),ref:a},!t&&r.a.createElement(i.a,null)),r.a.createElement("h3",null," Log in to Telegram by QR Code"),r.a.createElement("ol",null,r.a.createElement("li",null,r.a.createElement("span",null,"Open Telegram on your phone")),r.a.createElement("li",null,r.a.createElement("span",null,"Go to ",r.a.createElement("b",null,"Settings")," > ",r.a.createElement("b",null,"Devices")," > ",r.a.createElement("b",null,"Scan QR"))),r.a.createElement("li",null,r.a.createElement("span",null,"Point your phone at this screen to confirm login"))),r.a.createElement(g.a,{isText:!0,onClick:n},"Log in by phone number")))}))},93:function(e,t,n){"use strict";var r=n(0),a=n(10),o=n(29);t.a=()=>{const e=Object(o.a)();return Object(r.n)(()=>a.a(e),[e]),a.b}},98:function(e,t,n){"use strict";var r=n(0),a=n(50);var o=n(8),c=n(43),l=n(27),i=n(51),u=n(93),s=n(31),f=n(114);n(139);t.a=e=>{const{title:t,className:n,isOpen:d,header:m,hasCloseButton:h,noBackdrop:b,children:p,onClose:v,onCloseAnimationEnd:g,onEnter:E}=e,{shouldRender:j,transitionClassNames:O}=Object(l.a)(d,g),y=Object(r.q)(null);Object(r.n)(()=>d?Object(a.a)({onEsc:v,onEnter:E}):void 0,[d,v,E]),Object(r.n)(()=>d&&y.current?function(e){function t(t){if("Tab"!==t.key)return;t.preventDefault(),t.stopPropagation();const n=Array.from(e.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'));if(!n.length)return;const r=n.findIndex(e=>e.isSameNode(document.activeElement));let a=0;r>=0&&(a=t.shiftKey?r>0?r-1:n.length-1:r{document.removeEventListener("keydown",t,!1)}}(y.current):void 0,[d]),Object(i.a)(([e])=>(document.body.classList.toggle("has-open-dialog",d),(d||!d&&void 0!==e)&&Object(c.b)(200),()=>{document.body.classList.remove("has-open-dialog")}),[d]);const w=Object(u.a)();if(!j)return;const k=Object(o.a)("Modal",n,O,b&&"transparent-backdrop");return r.a.createElement(f.a,null,r.a.createElement("div",{ref:y,className:k,tabIndex:-1,role:"dialog"},r.a.createElement("div",{className:"modal-container"},r.a.createElement("div",{className:"modal-backdrop",onClick:v}),r.a.createElement("div",{className:"modal-dialog"},m||(t?r.a.createElement("div",{className:"modal-header"},h&&r.a.createElement(s.a,{round:!0,color:"translucent",size:"smaller",ariaLabel:w("Close"),onClick:v},r.a.createElement("i",{className:"icon-close"})),r.a.createElement("div",{className:"modal-title"},t)):void 0),r.a.createElement("div",{className:"modal-content custom-scroll"},p)))))}}}]); \ No newline at end of file diff --git a/dist/7.02701e2e4ddbcf18f1bb.js b/dist/7.8069a7d5c590c6dcd74f.js similarity index 99% rename from dist/7.02701e2e4ddbcf18f1bb.js rename to dist/7.8069a7d5c590c6dcd74f.js index 6e4dd6f9..749873f9 100644 --- a/dist/7.02701e2e4ddbcf18f1bb.js +++ b/dist/7.8069a7d5c590c6dcd74f.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[7],{132:function(t,e,i){"use strict";function s(t,e){return e-Math.floor(e/t)*t}i.d(e,"a",(function(){return s}))},294:function(t,e,i){t.exports=function(){return new Worker(i.p+"ed8b07679ddce89ad685.worker.js")}},305:function(t,e,i){"use strict";i.r(e);var s=i(294),n=i.n(s),r=i(7),a=i(22);function h(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}class o{constructor(t){this.worker=t,h(this,"requestStates",new Map),h(this,"requestStatesByCallback",new Map),this.subscribe()}request(t){const{worker:e,requestStates:i,requestStatesByCallback:s}=this,n=Object(a.a)(i),r={type:"callMethod",messageId:n,...t},h={messageId:n},o=new Promise((t,e)=>{Object.assign(h,{resolve:t,reject:e})});if("function"==typeof r.args[r.args.length-1]){const t=r.args.pop();h.callback=t,s.set(t,h)}return i.set(n,h),o.catch(()=>{}).finally(()=>{i.delete(n),h.callback&&s.delete(h.callback)}),e.postMessage(r),o}cancelCallback(t){t.isCanceled=!0;const{messageId:e}=this.requestStatesByCallback.get(t)||{};e&&this.worker.postMessage({type:"cancelProgress",messageId:e})}subscribe(){const{worker:t,requestStates:e}=this;t.addEventListener("message",({data:t})=>{if("methodResponse"===t.type){const i=e.get(t.messageId);i&&(t.error?i.reject(t.error):i.resolve(t.response))}else if("methodCallback"===t.type){const i=e.get(t.messageId);i&&i.callback&&i.callback(...t.callbackArgs)}else if("unhandledError"===t.type)throw t.error})}}var d=i(55),c=i(132);function u(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}const m=r.f?.75:1,l=.75,p=r.i?2:4,g=new Array(4).fill(void 0).map(()=>new o(new n.a));let k=-1;e.default=class{constructor(t,e,i,s={},n){this.id=t,this.container=e,this.animationData=i,this.params=s,this.onLoad=n,u(this,"imgSize",void 0),u(this,"key",void 0),u(this,"msPerFrame",void 0),u(this,"reduceFactor",void 0),u(this,"cacheModulo",void 0),u(this,"chunkSize",void 0),u(this,"workerIndex",void 0),u(this,"chunks",[]),u(this,"framesCount",void 0),u(this,"chunksCount",void 0),u(this,"canvas",document.createElement("canvas")),u(this,"ctx",this.canvas.getContext("2d")),u(this,"isAnimating",!1),u(this,"isWaiting",!0),u(this,"isOnLoadFired",!1),u(this,"isDestroyed",!1),u(this,"approxFrameIndex",0),u(this,"prevFrameIndex",-1),u(this,"stopFrameIndex",0),u(this,"speed",1),u(this,"direction",1),u(this,"lastRenderAt",void 0),this.initContainer(),this.initConfig(),this.initRenderer()}isPlaying(){return this.isAnimating||this.isWaiting}play(){this.stopFrameIndex=void 0,this.direction=1,this.doPlay()}pause(){this.isWaiting?this.stopFrameIndex=this.approxFrameIndex:this.isAnimating=!1;const t=this.getChunkIndex(this.approxFrameIndex);this.chunks=this.chunks.map((e,i)=>i===t?e:void 0)}goToAndPlay(t){this.approxFrameIndex=Math.floor(t/this.reduceFactor),this.stopFrameIndex=void 0,this.direction=1,this.doPlay()}goToAndStop(t){this.approxFrameIndex=Math.floor(t/this.reduceFactor),this.stopFrameIndex=Math.floor(t/this.reduceFactor),this.direction=1,this.doPlay()}playSegment([t,e]){this.approxFrameIndex=Math.floor(t/this.reduceFactor),this.stopFrameIndex=Math.floor(e/this.reduceFactor),this.direction=t{if(this.isDestroyed)return!1;if(!this.isAnimating&&this.isOnLoadFired)return!1;const t=Math.round(this.approxFrameIndex),e=this.getChunkIndex(t);if(!this.chunks[e])return this.requestChunk(e),this.isAnimating=!1,this.isWaiting=!0,!1;if(this.cacheModulo&&e%this.cacheModulo==0&&this.cleanupPrevChunk(e),this.requestNextChunk(e),t!==this.prevFrameIndex){const e=this.getFrame(t);if(!e)return this.isAnimating=!1,this.isWaiting=!0,!1;const i=new ImageData(new Uint8ClampedArray(e),this.imgSize,this.imgSize);this.ctx.putImageData(i,0,0),this.onLoad&&!this.isOnLoadFired&&(this.isOnLoadFired=!0,this.onLoad()),this.prevFrameIndex=t}const i=Date.now(),s=this.lastRenderAt?this.msPerFrame/(i-this.lastRenderAt):1,n=Math.min(1,this.direction*this.speed/s),r=Math.round(this.approxFrameIndex+n);if(this.lastRenderAt=i,n>0&&(t===this.framesCount-1||r>this.framesCount-1)){if(this.params.noLoop)return this.isAnimating=!1,!1;this.approxFrameIndex=0}else if(n<0&&(0===t||r<0)){if(this.params.noLoop)return this.isAnimating=!1,!1;this.approxFrameIndex=this.framesCount-1}else{if(void 0!==this.stopFrameIndex&&(t===this.stopFrameIndex||n>0&&r>this.stopFrameIndex||n<0&&r{Object.assign(h,{resolve:t,reject:e})});if("function"==typeof r.args[r.args.length-1]){const t=r.args.pop();h.callback=t,s.set(t,h)}return i.set(n,h),o.catch(()=>{}).finally(()=>{i.delete(n),h.callback&&s.delete(h.callback)}),e.postMessage(r),o}cancelCallback(t){t.isCanceled=!0;const{messageId:e}=this.requestStatesByCallback.get(t)||{};e&&this.worker.postMessage({type:"cancelProgress",messageId:e})}subscribe(){const{worker:t,requestStates:e}=this;t.addEventListener("message",({data:t})=>{if("methodResponse"===t.type){const i=e.get(t.messageId);i&&(t.error?i.reject(t.error):i.resolve(t.response))}else if("methodCallback"===t.type){const i=e.get(t.messageId);i&&i.callback&&i.callback(...t.callbackArgs)}else if("unhandledError"===t.type)throw t.error})}}var d=i(55),c=i(132);function u(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}const m=r.f?.75:1,l=.75,p=r.i?2:4,g=new Array(4).fill(void 0).map(()=>new o(new n.a));let k=-1;e.default=class{constructor(t,e,i,s={},n){this.id=t,this.container=e,this.animationData=i,this.params=s,this.onLoad=n,u(this,"imgSize",void 0),u(this,"key",void 0),u(this,"msPerFrame",void 0),u(this,"reduceFactor",void 0),u(this,"cacheModulo",void 0),u(this,"chunkSize",void 0),u(this,"workerIndex",void 0),u(this,"chunks",[]),u(this,"framesCount",void 0),u(this,"chunksCount",void 0),u(this,"canvas",document.createElement("canvas")),u(this,"ctx",this.canvas.getContext("2d")),u(this,"isAnimating",!1),u(this,"isWaiting",!0),u(this,"isOnLoadFired",!1),u(this,"isDestroyed",!1),u(this,"approxFrameIndex",0),u(this,"prevFrameIndex",-1),u(this,"stopFrameIndex",0),u(this,"speed",1),u(this,"direction",1),u(this,"lastRenderAt",void 0),this.initContainer(),this.initConfig(),this.initRenderer()}isPlaying(){return this.isAnimating||this.isWaiting}play(){this.stopFrameIndex=void 0,this.direction=1,this.doPlay()}pause(){this.isWaiting?this.stopFrameIndex=this.approxFrameIndex:this.isAnimating=!1;const t=this.getChunkIndex(this.approxFrameIndex);this.chunks=this.chunks.map((e,i)=>i===t?e:void 0)}goToAndPlay(t){this.approxFrameIndex=Math.floor(t/this.reduceFactor),this.stopFrameIndex=void 0,this.direction=1,this.doPlay()}goToAndStop(t){this.approxFrameIndex=Math.floor(t/this.reduceFactor),this.stopFrameIndex=Math.floor(t/this.reduceFactor),this.direction=1,this.doPlay()}playSegment([t,e]){this.approxFrameIndex=Math.floor(t/this.reduceFactor),this.stopFrameIndex=Math.floor(e/this.reduceFactor),this.direction=t{if(this.isDestroyed)return!1;if(!this.isAnimating&&this.isOnLoadFired)return!1;const t=Math.round(this.approxFrameIndex),e=this.getChunkIndex(t);if(!this.chunks[e])return this.requestChunk(e),this.isAnimating=!1,this.isWaiting=!0,!1;if(this.cacheModulo&&e%this.cacheModulo==0&&this.cleanupPrevChunk(e),this.requestNextChunk(e),t!==this.prevFrameIndex){const e=this.getFrame(t);if(!e)return this.isAnimating=!1,this.isWaiting=!0,!1;const i=new ImageData(new Uint8ClampedArray(e),this.imgSize,this.imgSize);this.ctx.putImageData(i,0,0),this.onLoad&&!this.isOnLoadFired&&(this.isOnLoadFired=!0,this.onLoad()),this.prevFrameIndex=t}const i=Date.now(),s=this.lastRenderAt?this.msPerFrame/(i-this.lastRenderAt):1,n=Math.min(1,this.direction*this.speed/s),r=Math.round(this.approxFrameIndex+n);if(this.lastRenderAt=i,n>0&&(t===this.framesCount-1||r>this.framesCount-1)){if(this.params.noLoop)return this.isAnimating=!1,!1;this.approxFrameIndex=0}else if(n<0&&(0===t||r<0)){if(this.params.noLoop)return this.isAnimating=!1,!1;this.approxFrameIndex=this.framesCount-1}else{if(void 0!==this.stopFrameIndex&&(t===this.stopFrameIndex||n>0&&r>this.stopFrameIndex||n<0&&re instanceof i.Api.DocumentAttributeSticker)?"image/webp":"image/jpeg":e.media.document.mimeType;return}(m,g),m.media instanceof i.Api.MessageMediaDocument&&m.media.document instanceof i.Api.Document&&(u=m.media.document.size)):"sticker"===l&&g?n="image/webp":(n=m.mimeType,u=m.size),{mimeType:n,data:e,fullSize:u}}if("stickerSet"===l){const e=await t.downloadStickerSetThumb(m);return{mimeType:c===d.ApiMediaFormat.Lottie?"application/json":"image/jpeg",data:e}}{const e=await t.downloadProfilePhoto(m,"profile"===u[1]);return{mimeType:"image/jpeg",data:e}}}(e,o,c,u,n,a,t)||{};if(!g)return;const _=await async function(e,t,n){switch(t){case d.ApiMediaFormat.DataUri:return Object(h.a)(new Blob([e],{type:n}));case d.ApiMediaFormat.BlobUrl:return new Blob([e],{type:n});case d.ApiMediaFormat.Lottie:{const t=Object(l.inflate)(e,{to:"string"});return JSON.parse(t)}case d.ApiMediaFormat.Progressive:return e.buffer}return}(g,t,m);if(!_)return;const w=t!==d.ApiMediaFormat.Progressive&&(t!==d.ApiMediaFormat.BlobUrl||_.size<=r.o);if(!r.n&&s&&w){b(e.startsWith("avatar")?r.q:r.p,e,_)}return{prepared:t===d.ApiMediaFormat.Progressive?"":function(e){if(e instanceof Blob)return URL.createObjectURL(e);return e}(_),arrayBuffer:t===d.ApiMediaFormat.Progressive?_:void 0,mimeType:m,fullSize:y}}!function(e){e[e.Text=0]="Text",e[e.Blob=1]="Blob",e[e.Json=2]="Json"}(m||(m={}));var v=n(13);a.Logger.setLevel(r.h?"debug":"warn");const A={build:e=>e};let I,P,S=!1;async function C(e,t){I=t,r.g&&console.log(">>> START INIT API");const n=r.l?new i.sessions.LocalStorageSession(e):new i.sessions.CacheApiSession(e);P=new i.TelegramClient(n,"739222","60d1e1063c72d4bc4cfdda99e8906f94",{useWSS:!0,additionalDcsDisabled:r.l}),P.addEventHandler(k,A),P.addEventHandler(c.b,A);try{r.g&&console.log("[GramJs/client] CONNECTING"),await P.start({phoneNumber:o.g,phoneCode:o.e,password:o.f,firstAndLastNames:o.i,qrCode:o.h,onError:o.b});const e=await n.save();r.g&&(console.log(">>> FINISH INIT API"),console.log("[GramJs/client] CONNECTED as ",e)),Object(o.c)(e),I({"@type":"updateApiReady"}),T()}catch(e){throw r.g&&console.log("[GramJs/client] CONNECTING ERROR",e),e}}async function M(){await P.destroy()}function k(e){e instanceof i.connection.UpdateConnectionState?S=e.state===i.connection.UpdateConnectionState.connected:e instanceof i.Api.UpdatesTooLong&&async function(){try{await E(new i.Api.users.GetFullUser({id:new i.Api.InputUserSelf}),void 0,!0)}catch(e){"AUTH_KEY_UNREGISTERED"===e.message&&I({"@type":"updateConnectionState",connectionState:"connectionStateBroken"})}}()}async function E(e,t=!1,n=!1){if(S)try{r.g&&console.log("[GramJs/client] INVOKE "+e.className);const n=await P.invoke(e);if(r.g&&console.log("[GramJs/client] INVOKE RESPONSE "+e.className,n),t){let t;n instanceof i.Api.Updates||n instanceof i.Api.UpdatesCombined?t=n:"updates"in n&&(n.updates instanceof i.Api.Updates||n.updates instanceof i.Api.UpdatesCombined)&&(t=n.updates),t?(!function(e){const t=[...e.users,...e.chats];e.updates.forEach(e=>{t&&(e._entities=t)})}(t),t.updates.forEach(t=>{Object(c.b)(t,e)})):n instanceof i.Api.UpdatesTooLong||Object(c.b)(n,e)}return n}catch(t){if(r.g&&(console.log("[GramJs/client] INVOKE ERROR "+e.className),console.error(t)),function(e,t){const n=e.message.startsWith("A wait of")&&(t instanceof i.Api.messages.SendMessage||t instanceof i.Api.messages.SendMedia||t instanceof i.Api.messages.SendMultiMedia),{message:s}=e;I({"@type":"error",error:{message:s,isSlowMode:n}})}(t,e),n)throw t;return}else r.g&&console.warn(`[GramJs/client] INVOKE ${e.className} ERROR: Client is not connected`)}function R(e,t){return w(e,P,S,t)}function U(e,t){return P.uploadFile({file:e,onProgress:t,workers:r.u})}function O(e){return P.updateTwoFaSettings(e)}async function T(){const e=await E(new i.Api.users.GetFullUser({id:new i.Api.InputUserSelf}));if(!(e&&e.user instanceof i.Api.User))return;f.a.users[e.user.id]=e.user;const t=Object(v.b)(e);Object(u.p)(t.id),Object(o.d)(t)}},function(e,t,n){"use strict";(function(e){n.d(t,"s",(function(){return l})),n.d(t,"o",(function(){return d})),n.d(t,"i",(function(){return f})),n.d(t,"g",(function(){return h})),n.d(t,"l",(function(){return g})),n.d(t,"f",(function(){return m})),n.d(t,"h",(function(){return y})),n.d(t,"j",(function(){return b})),n.d(t,"d",(function(){return _})),n.d(t,"r",(function(){return w})),n.d(t,"m",(function(){return v})),n.d(t,"n",(function(){return A})),n.d(t,"q",(function(){return I})),n.d(t,"t",(function(){return P})),n.d(t,"c",(function(){return S})),n.d(t,"e",(function(){return C})),n.d(t,"b",(function(){return M})),n.d(t,"a",(function(){return k})),n.d(t,"p",(function(){return E})),n.d(t,"k",(function(){return R}));var s=n(15),i=n.n(s),a=n(0),r=n(8),o=n(10),c=n(5),u=n(14);function l(e){return e>0?"user":e<=-1e9?"channel":"chat"}function d(e){return e>0?new a.Api.PeerUser({userId:e}):e<=-1e9?new a.Api.PeerChannel({channelId:-e}):new a.Api.PeerChat({chatId:-e})}function f(e,t){return e>0||e<=-1e9?e>0?new a.Api.InputPeerUser({userId:e,accessHash:i()(t)}):new a.Api.InputPeerChannel({channelId:-e,accessHash:i()(t)}):new a.Api.InputPeerChat({chatId:-e})}function p(e){if(e>0){const{accessHash:t}=c.a.users[e]||{};return t?new a.Api.InputPeerUser({userId:e,accessHash:t}):void 0}if(e<=-1e9){const{accessHash:t}=c.a.chats[-e]||{};return t?new a.Api.InputPeerChannel({channelId:-e,accessHash:t}):void 0}return new a.Api.InputPeerChat({chatId:-e})}function h(e,t){return e>0?new a.Api.InputUser({userId:e,accessHash:i()(t)}):e<=-1e9?new a.Api.InputChannel({channelId:-e,accessHash:i()(t)}):-e}function g(e,t){return new a.Api.InputStickerSetID({id:i()(e),accessHash:i()(t)})}function m(e){const t=c.a.documents[e.id];if(t)return new a.Api.InputDocument(Object(u.b)(t,["id","accessHash","fileReference"]))}function y(e){const t=m(e);if(t)return new a.Api.InputMediaDocument({id:t})}function b(t,n){const{summary:s,quiz:i}=t,r=new a.Api.Poll({id:n,publicVoters:s.isPublic,question:s.question,answers:s.answers.map(({text:t,option:n})=>new a.Api.PollAnswer({text:t,option:e.from(n)})),quiz:s.quiz,multipleChoice:s.multipleChoice});if(!i)return new a.Api.InputMediaPoll({poll:r});const o=i.correctAnswers.map(t=>e.from(t)),{solution:c}=i,u=i.solutionEntities?i.solutionEntities.map(A):[];return new a.Api.InputMediaPoll({poll:r,correctAnswers:o,...c&&{solution:c,solutionEntities:u}})}function _(e){const{emoticon:t,contacts:n,nonContacts:s,groups:i,channels:r,bots:o,excludeArchived:c,excludeMuted:u,excludeRead:l,pinnedChatIds:d,includedChatIds:f,excludedChatIds:h}=e,g=d?d.map(p).filter(Boolean):[],m=f?f.map(p).filter(Boolean):[],y=h?h.map(p).filter(Boolean):[];return new a.Api.DialogFilter({id:e.id,title:e.title,emoticon:t||void 0,contacts:n||void 0,nonContacts:s||void 0,groups:i||void 0,bots:o||void 0,excludeArchived:c||void 0,excludeMuted:u||void 0,excludeRead:l||void 0,broadcasts:r||void 0,pinnedPeers:g,includePeers:m,excludePeers:y})}function w(){return Object(r.readBigIntFromBuffer)(Object(r.generateRandomBytes)(8),!0,!0)}function v(e,t,n){return new a.Api.Message({id:e,peerId:d(t),fromId:d(t),media:n.media})}function A(e){const{type:t,offset:n,length:s,url:i,userId:r}=e,u=r?c.a.users[r]:void 0;switch(t){case o.ApiMessageEntityTypes.Bold:return new a.Api.MessageEntityBold({offset:n,length:s});case o.ApiMessageEntityTypes.Italic:return new a.Api.MessageEntityItalic({offset:n,length:s});case o.ApiMessageEntityTypes.Underline:return new a.Api.MessageEntityUnderline({offset:n,length:s});case o.ApiMessageEntityTypes.Strike:return new a.Api.MessageEntityStrike({offset:n,length:s});case o.ApiMessageEntityTypes.Code:return new a.Api.MessageEntityCode({offset:n,length:s});case o.ApiMessageEntityTypes.Pre:return new a.Api.MessageEntityPre({offset:n,length:s,language:""});case o.ApiMessageEntityTypes.Blockquote:return new a.Api.MessageEntityBlockquote({offset:n,length:s});case o.ApiMessageEntityTypes.TextUrl:return new a.Api.MessageEntityTextUrl({offset:n,length:s,url:i});case o.ApiMessageEntityTypes.Url:return new a.Api.MessageEntityUrl({offset:n,length:s});case o.ApiMessageEntityTypes.Hashtag:return new a.Api.MessageEntityHashtag({offset:n,length:s});case o.ApiMessageEntityTypes.MentionName:return new a.Api.InputMessageEntityMentionName({offset:n,length:s,userId:new a.Api.InputUser({userId:r,accessHash:u.accessHash})});default:return new a.Api.MessageEntityUnknown({offset:n,length:s})}}function I(e){let t=0;return e.forEach(e=>{t=(20261*t&2147483647)+e&2147483647}),t}function P(e){const{media:t}=e;return!!t&&(t instanceof a.Api.MessageMediaPhoto||t instanceof a.Api.MessageMediaDocument||t instanceof a.Api.MessageMediaWebPage&&t.webpage instanceof a.Api.WebPage&&t.webpage.photo instanceof a.Api.Photo)}function S(e){if(e instanceof a.Api.PhotoEmpty)return new a.Api.ChatPhotoEmpty;const{dcId:t}=e,n=e.sizes.filter(e=>e instanceof a.Api.PhotoSize||e instanceof a.Api.PhotoCachedSize);if(!n.length)return new a.Api.ChatPhotoEmpty;const s=n.find(e=>"a"===e.type),i=n.find(e=>"c"===e.type)||n.find(e=>"b"===e.type);return s&&i?new a.Api.ChatPhoto({dcId:t,photoSmall:s&&s.location,photoBig:i&&i.location}):new a.Api.ChatPhotoEmpty}function C({phone:e,firstName:t,lastName:n}){return new a.Api.InputPhoneContact({clientId:i()(1),phone:e,firstName:t,lastName:n})}function M(e,t=0){return new a.Api.ChatBannedRights({...e,untilDate:t})}function k(e){return new a.Api.ChatAdminRights(e)}function E(e){const{shippingAddress:t}=e;return new a.Api.PaymentRequestedInfo({...e,shippingAddress:t?new a.Api.PostAddress(t):void 0})}function R(e){switch(e){case"phoneNumber":return new a.Api.InputPrivacyKeyPhoneNumber;case"lastSeen":return new a.Api.InputPrivacyKeyStatusTimestamp;case"profilePhoto":return new a.Api.InputPrivacyKeyProfilePhoto;case"forwards":return new a.Api.InputPrivacyKeyForwards;case"chatInvite":return new a.Api.InputPrivacyKeyChatInvite}}}).call(this,n(11).Buffer)},function(e,t,n){"use strict";n.d(t,"c",(function(){return u})),n.d(t,"d",(function(){return h})),n.d(t,"k",(function(){return g})),n.d(t,"j",(function(){return m})),n.d(t,"l",(function(){return b})),n.d(t,"e",(function(){return v})),n.d(t,"g",(function(){return A})),n.d(t,"h",(function(){return I})),n.d(t,"f",(function(){return P})),n.d(t,"i",(function(){return S})),n.d(t,"a",(function(){return C})),n.d(t,"b",(function(){return M}));var s=n(0),i=n(14);function a(e){return e.hasOwnProperty("userId")}function r(e){return e.hasOwnProperty("chatId")}var o=n(17);function c(e,t=!1){const n=Boolean("min"in e&&e.min),i="accessHash"in e&&String(e.accessHash),a="photo"in e&&v(e.photo),r=Boolean("signatures"in e&&e.signatures);return{isMin:n,hasPrivateLink:Boolean("hasLink"in e&&e.hasLink),isSignaturesShown:r,...i&&{accessHash:i},...a&&{avatarHash:a},...(e instanceof s.Api.Channel||e instanceof s.Api.User)&&{username:e.username},..."verified"in e&&{isVerified:e.verified},...(e instanceof s.Api.Chat||e instanceof s.Api.Channel)&&{...e.participantsCount&&{membersCount:e.participantsCount},joinDate:e.date},...t&&{isSupport:!0},...l(e),..."creator"in e&&{isCreator:e.creator},...d(e),...f(e)}}function u(e,t){const{peer:n,folderId:s,unreadMark:i,unreadCount:a,unreadMentionsCount:r,notifySettings:{silent:o,muteUntil:u},readOutboxMaxId:l,readInboxMaxId:d}=e,f=o||"number"==typeof u&&Date.now()<1e3*u;return{id:g(n),...s&&{folderId:s},type:y(t),title:_(n,t),lastReadOutboxMessageId:l,lastReadInboxMessageId:d,unreadCount:a,unreadMentionsCount:r,isMuted:f,...i&&{hasUnreadMark:!0},...c(t)}}function l(e){return e instanceof s.Api.Chat||e instanceof s.Api.Channel?{adminRights:Object(o.b)(e.adminRights),currentUserBannedRights:e instanceof s.Api.Channel?Object(o.b)(e.bannedRights):void 0,defaultBannedRights:Object(o.b)(e.defaultBannedRights)}:{}}function d(e){return e instanceof s.Api.ChatForbidden||e instanceof s.Api.ChannelForbidden?{isRestricted:!0}:e instanceof s.Api.User?{isRestricted:e.restricted,restrictionReason:p(e.restrictionReason)}:e instanceof s.Api.Chat?{isNotJoined:e.left,isRestricted:e.kicked}:e instanceof s.Api.Channel?{isNotJoined:e.left,isRestricted:e.restricted,restrictionReason:p(e.restrictionReason)}:{}}function f(e){return e instanceof s.Api.Chat&&e.migratedTo&&!(e.migratedTo instanceof s.Api.InputChannelEmpty)?{migratedTo:{chatId:g(e.migratedTo),...e.migratedTo instanceof s.Api.InputChannel&&{accessHash:e.migratedTo.accessHash.toString()}}}:{}}function p(e){if(!e)return;const t=e.find(({platform:e})=>"all"===e);return t?Object(i.b)(t,["reason","text"]):void 0}function h(e,t=!1,n=!1){if(e instanceof s.Api.Chat||e instanceof s.Api.Channel||e instanceof s.Api.User||n&&(e instanceof s.Api.ChatForbidden||e instanceof s.Api.ChannelForbidden))return{id:e instanceof s.Api.User?e.id:-e.id,type:y(e),title:e instanceof s.Api.User?w(e):e.title,...c(e,t)}}function g(e){return a(e)?e.userId:r(e)?-e.chatId:-e.channelId}function m(e){return function(e){return e.hasOwnProperty("userId")}(e)?e.userId:function(e){return e.hasOwnProperty("chatId")}(e)?-e.chatId:function(e){return e.hasOwnProperty("channelId")}(e)?-e.channelId:void 0}function y(e){return e instanceof s.Api.User||e instanceof s.Api.UserEmpty?"chatTypePrivate":e instanceof s.Api.Chat||e instanceof s.Api.ChatForbidden||e instanceof s.Api.ChatEmpty?"chatTypeBasicGroup":e.megagroup?"chatTypeSuperGroup":"chatTypeChannel"}function b(e){return a(e)?"user"+e.userId:r(e)?"chat"+e.chatId:"chat"+e.channelId}function _(e,t){return a(e)?w(t):t.title}function w(e){return e.firstName?`${e.firstName}${e.lastName?" "+e.lastName:""}`:void 0}function v(e){if(e instanceof s.Api.UserProfilePhoto)return e.photoId.toString();if(e instanceof s.Api.ChatPhoto){const{dcId:t,photoSmall:{volumeId:n,localId:s}}=e;return`${t}-${n}-${s}`}}function A(e){return{userId:e.userId,inviterId:"inviterId"in e?e.inviterId:void 0,joinedDate:"date"in e?e.date:void 0,kickedByUserId:"kickedBy"in e?e.kickedBy:void 0,promotedByUserId:"promotedBy"in e?e.promotedBy:void 0,bannedRights:"bannedRights"in e?Object(o.b)(e.bannedRights):void 0,adminRights:"adminRights"in e?Object(o.b)(e.adminRights):void 0,customTitle:"rank"in e?e.rank:void 0,...(e instanceof s.Api.ChannelParticipantAdmin||e instanceof s.Api.ChatParticipantAdmin)&&{isAdmin:!0},...(e instanceof s.Api.ChannelParticipantCreator||e instanceof s.Api.ChatParticipantCreator)&&{isOwner:!0}}}function I(e){return e instanceof s.Api.ChatParticipants||e instanceof s.Api.channels.ChannelParticipants?e.participants.map(A):void 0}function P(e){return e instanceof s.Api.ChatInviteExported?e.link:void 0}function S(e){let t="";if(!(e.action instanceof s.Api.SendMessageCancelAction))return e.action instanceof s.Api.SendMessageTypingAction?t="typing":e.action instanceof s.Api.SendMessageRecordVideoAction?t="recording a video":e.action instanceof s.Api.SendMessageUploadVideoAction?t="uploading a video":e.action instanceof s.Api.SendMessageRecordAudioAction?t="recording a voice message":e.action instanceof s.Api.SendMessageUploadAudioAction?t="uploading a voice message":e.action instanceof s.Api.SendMessageUploadPhotoAction?t="uploading a photo":e.action instanceof s.Api.SendMessageUploadDocumentAction?t="uploading a file":e.action instanceof s.Api.SendMessageGeoLocationAction?t="selecting a location to share":e.action instanceof s.Api.SendMessageChooseContactAction?t="selecting a contact to share":e.action instanceof s.Api.SendMessageGamePlayAction?t="playing a game":e.action instanceof s.Api.SendMessageRecordRoundAction?t="recording a round video":e.action instanceof s.Api.SendMessageUploadRoundAction&&(t="uploading a round video"),{action:t,...e instanceof s.Api.UpdateChatUserTyping&&{userId:e.userId},...e instanceof s.Api.UpdateChannelUserTyping&&{userId:e.userId},timestamp:Date.now()}}function C(e){return{...Object(i.c)(e,["id","title","emoticon","contacts","nonContacts","groups","bots","excludeMuted","excludeRead","excludeArchived"]),channels:e.broadcasts,pinnedChatIds:e.pinnedPeers.map(m).filter(Boolean),includedChatIds:e.includePeers.map(m).filter(Boolean),excludedChatIds:e.excludePeers.map(m).filter(Boolean)}}function M({filter:e,description:t}){return{...C(e),description:t}}},function(e,t,n){"use strict";n.d(t,"g",(function(){return s})),n.d(t,"l",(function(){return i})),n.d(t,"h",(function(){return a})),n.d(t,"n",(function(){return r})),n.d(t,"p",(function(){return o})),n.d(t,"q",(function(){return c})),n.d(t,"o",(function(){return u})),n.d(t,"c",(function(){return l})),n.d(t,"b",(function(){return d})),n.d(t,"k",(function(){return f})),n.d(t,"u",(function(){return p})),n.d(t,"f",(function(){return h})),n.d(t,"s",(function(){return g})),n.d(t,"e",(function(){return m})),n.d(t,"m",(function(){return y})),n.d(t,"r",(function(){return b})),n.d(t,"t",(function(){return _})),n.d(t,"a",(function(){return w})),n.d(t,"d",(function(){return v})),n.d(t,"j",(function(){return A})),n.d(t,"i",(function(){return I}));const s=!1,i=!1,a=!1,r=!1,o="tt-media",c="tt-media-avatars",u=524288,l=300,d=new Set(["newMessage","newScheduledMessage","deleteMessages","deleteScheduledMessages","deleteHistory"]),f=16,p=16,h=("undefined"!=typeof window&&window.innerHeight,30),g=50,m=100,y=1e9,b="MEMOJI_STICKER",_=777e3,w=0,v=1,A=777,I="android"},function(e,t,n){"use strict";t.a={localMessages:{},chats:{},users:{},messages:{},documents:{},stickerSets:{}}},function(e,t,n){(function(t){function s(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const{parseTl:i,serializeBytes:a,serializeDate:r}=n(44),{readBufferFromBigInt:o,toSignedLittleBuffer:c}=n(8),u=n(79),l=n(80),d="undefined"!=typeof self&&void 0!==self.localStorage;function f(e){const t=i(e,109),n=[],s=[];for(const e of t)e.isFunction?s.push(e):n.push(e);return[n,s]}function p(e,n){switch(n){case"int":const n=t.alloc(4);return n.writeInt32LE(e,0),n;case"long":return c(e,8);case"int128":return c(e,16);case"int256":return c(e,32);case"double":const s=t.alloc(8);return s.writeDoubleLE(e,0),s;case"string":return a(e);case"Bool":return e?t.from("b5757299","hex"):t.from("379779bc","hex");case"true":return t.alloc(0);case"bytes":return a(e);case"date":return r(e);default:return e.getBytes()}}function h(e,t){if(t.isVector){t.useVectorId&&e.readInt();const n=[],s=e.readInt();t.isVector=!1;for(let i=0;i{this[e]=t[e]})}static fromReader(e){const t={};for(const n in c)if(c.hasOwnProperty(n)){const s=c[n];if(s.isFlag){if("true"===s.type){t[n]=Boolean(t.flags&1<p(t,c[e].type))))}else if(c[e].flagIndicator)if(Object.values(c).some(e=>e.isFlag)){let e=0;for(const t in c)c[t].isFlag&&(!1===this[t]&&"true"===c[t].type||void 0===this[t]||null===this[t]?e|=0:e|=1</);if(n){t.readInt();let e=[],s=t.readInt();if("int"===n[1])for(let n=0;n{"function"!=typeof t[e]&&n[e]?Object.assign(n[e],t[e]):n[e]=t[e]}),n}(g("constructor",e.constructors),g("request",e.requests))}()}).call(this,n(11).Buffer)},function(e,t,n){"use strict";n.d(t,"p",(function(){return h})),n.d(t,"j",(function(){return g})),n.d(t,"k",(function(){return m})),n.d(t,"n",(function(){return y})),n.d(t,"v",(function(){return b})),n.d(t,"h",(function(){return _})),n.d(t,"t",(function(){return w})),n.d(t,"u",(function(){return v})),n.d(t,"a",(function(){return A})),n.d(t,"G",(function(){return I})),n.d(t,"b",(function(){return P})),n.d(t,"q",(function(){return S})),n.d(t,"r",(function(){return C})),n.d(t,"d",(function(){return M})),n.d(t,"c",(function(){return k})),n.d(t,"g",(function(){return E})),n.d(t,"y",(function(){return R})),n.d(t,"x",(function(){return U})),n.d(t,"i",(function(){return O})),n.d(t,"m",(function(){return T})),n.d(t,"f",(function(){return B})),n.d(t,"e",(function(){return D})),n.d(t,"z",(function(){return x})),n.d(t,"o",(function(){return j})),n.d(t,"A",(function(){return N})),n.d(t,"E",(function(){return F})),n.d(t,"F",(function(){return V})),n.d(t,"D",(function(){return L})),n.d(t,"H",(function(){return q})),n.d(t,"C",(function(){return H})),n.d(t,"B",(function(){return z})),n.d(t,"l",(function(){return G})),n.d(t,"w",(function(){return W})),n.d(t,"s",(function(){return J}));var s=n(0),i=n(4),a=n(1),r=n(3),o=n(9),c=n(13),u=n(14),l=n(5),d=n(2),f=n(20);let p;function h(e){p=e}async function g({limit:e,offsetDate:t,archived:n,withPinned:l}){const d=await Object(a.e)(new s.Api.messages.GetDialogs({offsetPeer:new s.Api.InputPeerEmpty,limit:e,offsetDate:t,folderId:n?i.d:void 0,...l&&{excludePinned:!0}})),f=l?await Object(a.e)(new s.Api.messages.GetPinnedDialogs({folderId:n?i.d:void 0})):void 0;if(!d||d instanceof s.Api.messages.DialogsNotModified)return;Z(d),f&&Z(f);const p=Object(u.a)([...d.messages,...f?f.messages:[]].map(o.b).filter(Boolean),"chatId"),h={...$(d),...f&&$(f)},g=[],m={},y={},b=[...f?f.dialogs:[],...d.dialogs],_=[];b.forEach(e=>{if(!(e instanceof s.Api.Dialog)||!n&&e.folderId===i.d||n&&e.folderId!==i.d)return;const t=h[Object(r.l)(e.peer)],a=Object(r.c)(e,t);if(a.lastMessage=p[a.id],g.push(a),l&&e.pinned&&_.push(a.id),e.draft){const{formattedText:t,replyingToId:n}=Object(o.h)(e.draft)||{};t&&(m[a.id]=t),n&&(y[a.id]=n)}});const w=[...d.users,...f?f.users:[]].map(c.a).filter(Boolean),v=g.map(e=>e.id);let A;return A=d instanceof s.Api.messages.DialogsSlice?d.count:v.length,{chatIds:v,chats:g,users:w,draftsById:m,replyingToById:y,orderedPinnedIds:l?_:void 0,totalChatCount:A}}function m(e){const{id:t,accessHash:n,adminRights:i}=e,o=Object(d.g)(t,n);return o instanceof s.Api.InputChannel?async function(e,t){const n=await Object(a.e)(new s.Api.channels.GetFullChannel({channel:e}));if(!(n&&n.fullChat instanceof s.Api.ChannelFull))return;const{about:i,exportedInvite:o,slowmodeSeconds:c,slowmodeNextSendDate:u,migratedFromChatId:l,migratedFromMaxId:d,canViewParticipants:f,linkedChatId:p,hiddenPrehistory:h}=n.fullChat,g=o instanceof s.Api.ChatInviteExported?o.link:void 0,{members:m,users:y}=f&&await K(e)||{},{members:b,users:_}=f&&t&&await K(e,"kicked")||{},{members:w,users:v}=f&&t&&await K(e,"admin")||{};return{fullInfo:{about:i,inviteLink:g,slowMode:c?{seconds:c,nextSendDate:u}:void 0,migratedFrom:l?{chatId:Object(r.k)({chatId:l}),maxMessageId:d}:void 0,canViewMembers:f,isPreHistoryHidden:h,members:m,kickedMembers:b,adminMembers:w,linkedChatId:p?Object(r.k)({chatId:p}):void 0},users:[...y||[],..._||[],...v||[]]}}(o,i):async function(e){const t=await Object(a.e)(new s.Api.messages.GetFullChat({chatId:e}));if(!(t&&t.fullChat instanceof s.Api.ChatFull))return;Z(t);const{about:n,participants:i,exportedInvite:o}=t.fullChat,u=Object(r.h)(i),l=u?u.filter(({isAdmin:e,isOwner:t})=>e||t):void 0;return{fullInfo:{about:n,members:u,adminMembers:l,inviteLink:Object(r.f)(o),canViewMembers:!0},users:t.users.map(c.a).filter(Boolean)}}(o)}async function y(e){const{id:t,accessHash:n}=e,i=Object(d.i)(t,n),r=await Object(a.e)(new s.Api.messages.GetOnlines({peer:i}));if(!r)return;const{onlines:o}=r;p({"@type":"updateChat",id:t,chat:{onlineCount:o}})}async function b({query:e,limit:t}){const n=await Object(a.e)(new s.Api.contacts.Search({q:e,limit:t}));if(!n)return;Z(n);const i=n.myResults.map(r.k),o=[...n.chats,...n.users].map(e=>Object(r.d)(e)).filter(Boolean),u=n.users.map(c.a).filter(e=>!!e&&!e.isSelf);return{localChats:o.filter(e=>i.includes(e.id)),localUsers:u.filter(e=>i.includes(e.id)),globalChats:o.filter(e=>!i.includes(e.id)),globalUsers:u.filter(e=>!i.includes(e.id))}}async function _({type:e,user:t}){let n;if("self"===e||"user"===e){const i=await Object(a.e)(new s.Api.users.GetUsers({id:["user"===e&&t?Object(d.g)(t.id,t.accessHash):new s.Api.InputUserSelf]}));if(!i||!i.length)return;[n]=i}else if("support"===e){const e=await Object(a.e)(new s.Api.help.GetSupport);if(!e||!e.user)return;n=e.user}const i=Object(r.d)(n,"support"===e);if(i)return p({"@type":"updateChat",id:i.id,chat:i}),{chatId:i.id}}async function w(e){const{id:t,accessHash:n}=e,i=await Object(a.e)(new s.Api.messages.GetPeerDialogs({peers:[new s.Api.InputDialogPeer({peer:Object(d.i)(t,n)})]}));if(!i)return;const c=i.dialogs[0];if(!(c&&c instanceof s.Api.Dialog))return;const u=$(i)[Object(r.l)(c.peer)];if(!u)return;Z(i);const l=Object(o.b)(i.messages[0]);p({"@type":"updateChat",id:t,chat:{...Object(r.c)(c,u),lastMessage:l}})}function v({chat:e,text:t,entities:n,replyToMsgId:i}){return Object(a.e)(new s.Api.messages.SaveDraft({peer:Object(d.i)(e.id,e.accessHash),message:t,...n&&{entities:n.map(d.n)},replyToMsgId:i}))}function A(e){return Object(a.e)(new s.Api.messages.SaveDraft({peer:Object(d.i)(e.id,e.accessHash),message:""}))}async function I({chat:e,isMuted:t}){await Object(a.e)(new s.Api.account.UpdateNotifySettings({peer:new s.Api.InputNotifyPeer({peer:Object(d.i)(e.id,e.accessHash)}),settings:new s.Api.InputPeerNotifySettings({muteUntil:t?2**31-1:void 0})})),w(e)}async function P({title:e,about:t,users:n}){const o=await Object(a.e)(new s.Api.channels.CreateChannel({broadcast:!0,title:e,about:t}),!0);if(!(o instanceof s.Api.Updates))return void(i.g&&console.error("Unexpected channel creation update",o));const c=o.chats[0];if(!(c&&c instanceof s.Api.Channel))return void(i.g&&console.error("Created channel not found",o));const u=Object(r.d)(c);return await Object(a.e)(new s.Api.channels.InviteToChannel({channel:Object(d.g)(u.id,u.accessHash),users:n.map(({id:e,accessHash:t})=>Object(d.g)(e,t))})),u}function S({channelId:e,accessHash:t}){return Object(a.e)(new s.Api.channels.JoinChannel({channel:Object(d.g)(e,t)}),!0)}function C({channelId:e,accessHash:t}){return Object(a.e)(new s.Api.channels.LeaveChannel({channel:Object(d.g)(e,t)}),!0)}function M({channelId:e,accessHash:t}){return Object(a.e)(new s.Api.channels.DeleteChannel({channel:Object(d.g)(e,t)}),!0)}async function k({title:e,users:t}){const n=await Object(a.e)(new s.Api.messages.CreateChat({title:e,users:t.map(({id:e,accessHash:t})=>Object(d.g)(e,t))}),!0);if(!(n instanceof s.Api.Updates))return void(i.g&&console.error("Unexpected chat creation update",n));const o=n.chats[0];if(o&&o instanceof s.Api.Chat)return Object(r.d)(o);i.g&&console.error("Created chat not found",n)}async function E({chatId:e,accessHash:t,photo:n}){const i=await Object(a.g)(n),r=Object(d.g)(e,t);return Object(a.e)(r instanceof s.Api.InputChannel?new s.Api.channels.EditPhoto({channel:r,photo:new s.Api.InputChatUploadedPhoto({file:i})}):new s.Api.messages.EditChatPhoto({chatId:r,photo:new s.Api.InputChatUploadedPhoto({file:i})}),!0)}async function R({chat:e,shouldBePinned:t}){const{id:n,accessHash:i}=e;await Object(a.e)(new s.Api.messages.ToggleDialogPin({peer:new s.Api.InputDialogPeer({peer:Object(d.i)(n,i)}),pinned:t||void 0}))&&p({"@type":"updateChatPinned",id:e.id,isPinned:t})}function U({chat:e,folderId:t}){const{id:n,accessHash:i}=e;return Object(a.e)(new s.Api.folders.EditPeerFolders({folderPeers:[new s.Api.InputFolderPeer({peer:Object(d.i)(n,i),folderId:t})]}),!0)}async function O(){const e=await Object(a.e)(new s.Api.messages.GetDialogFilters);if(e)return{byId:Object(u.a)(e.map(r.a),"id"),orderedIds:e.map(({id:e})=>e)}}async function T(){const e=await Object(a.e)(new s.Api.messages.GetSuggestedDialogFilters);if(e)return e.map(r.b)}async function B({id:e,folderUpdate:t}){const n=Object(d.d)(t);await Object(a.e)(new s.Api.messages.UpdateDialogFilter({id:e,filter:n}))&&p({"@type":"updateChatFolder",id:e,folder:t})}async function D(e){const t=await Object(a.e)(new s.Api.messages.UpdateDialogFilter({id:e,filter:void 0})),n=await T();t&&p({"@type":"updateChatFolder",id:e,folder:void 0}),n&&p({"@type":"updateRecommendedChatFolders",folders:n})}async function x({chat:e,hasUnreadMark:t}){const{id:n,accessHash:i}=e;await Object(a.e)(new s.Api.messages.MarkDialogUnread({peer:new s.Api.InputDialogPeer({peer:Object(d.i)(n,i)}),unread:t||void 0}))&&p({"@type":"updateChat",id:e.id,chat:{hasUnreadMark:t}})}async function j(e){const t=await Object(a.e)(new s.Api.contacts.ResolveUsername({username:e}));if(!t)return;const{users:n,chats:i}=t,o=i.length?Object(r.d)(i[0]):Object(r.d)(n[0]);return o?(Z(t),o):void 0}function N({chat:e,isEnabled:t}){const{id:n,accessHash:i}=e,r=Object(d.g)(n,i);return Object(a.e)(new s.Api.channels.TogglePreHistoryHidden({channel:r,enabled:t}),!0)}function F({chat:e,bannedRights:t}){const{id:n,accessHash:i}=e,r=Object(d.i)(n,i);return Object(a.e)(new s.Api.messages.EditChatDefaultBannedRights({peer:r,bannedRights:Object(d.b)(t)}),!0)}function V({chat:e,user:t,bannedRights:n}){const i=Object(d.g)(e.id,e.accessHash),r=Object(d.g)(t.id,t.accessHash);return Object(a.e)(new s.Api.channels.EditBanned({channel:i,userId:r,bannedRights:Object(d.b)(n)}),!0)}function L({chat:e,user:t,adminRights:n,customTitle:i=""}){const r=Object(d.g)(e.id,e.accessHash),o=Object(d.g)(t.id,t.accessHash);return Object(a.e)(new s.Api.channels.EditAdmin({channel:r,userId:o,adminRights:Object(d.a)(n),rank:i}),!0)}async function q(e,t){const n=Object(d.g)(e.id,e.accessHash);await Object(a.e)(n instanceof s.Api.InputChannel?new s.Api.channels.EditTitle({channel:n,title:t}):new s.Api.messages.EditChatTitle({chatId:n,title:t}),!0)}async function H(e,t){await Object(a.e)(new s.Api.messages.EditChatAbout({peer:Object(d.i)(e.id,e.accessHash),about:t}))&&p({"@type":"updateChatFullInfo",id:e.id,fullInfo:{about:t}})}function z({chat:e,isEnabled:t}){const{id:n,accessHash:i}=e,r=Object(d.g)(n,i);return Object(a.e)(new s.Api.channels.ToggleSignatures({channel:r,enabled:t}),!0)}async function K(e,t="recent"){let n;switch(t){case"kicked":n=new s.Api.ChannelParticipantsKicked({q:""});break;case"admin":n=new s.Api.ChannelParticipantsAdmins;break;default:n=new s.Api.ChannelParticipantsRecent}const o=await Object(a.e)(new s.Api.channels.GetParticipants({channel:e,filter:n,limit:i.f}));if(o&&!(o instanceof s.Api.channels.ChannelParticipantsNotModified))return Z(o),{members:Object(r.h)(o),users:o.users.map(c.a).filter(Boolean)}}async function G(){const e=await Object(a.e)(new s.Api.channels.GetGroupsForDiscussion);if(e)return Z(e),e.chats.map(e=>Object(r.d)(e))}function W({channel:e,chat:t}){return Object(a.e)(new s.Api.channels.SetDiscussionGroup({broadcast:Object(d.i)(e.id,e.accessHash),group:t?Object(d.i)(t.id,t.accessHash):new s.Api.InputChannelEmpty}))}async function J(e){const t=await Object(a.e)(new s.Api.messages.MigrateChat({chatId:Object(d.g)(e.id)}),!0);if(t&&t instanceof s.Api.Updates)return Z(t),Object(r.d)(t.chats[1]);i.g&&console.error("Unexpected channel creation update",t)}function $(e){const t={};return e.chats.forEach(e=>{t["chat"+e.id]=e}),e.users.forEach(e=>{t["user"+e.id]=e}),t}function Z(e){"users"in e&&e.users.forEach(e=>{e instanceof s.Api.User&&(l.a.users[e.id]=e)}),"chats"in e&&e.chats.forEach(e=>{(e instanceof s.Api.Chat||e instanceof s.Api.Channel)&&(l.a.chats[e.id]=e)}),"messages"in e&&e.messages.forEach(e=>{e instanceof s.Api.Message&&Object(d.t)(e)&&Object(f.a)(e)})}},function(e,t,n){(function(t){const s=n(36),i=n(15);function a(e,n=!0,s=!1){let a=t.from(e);const r=a.length;n&&(a=a.reverse());let o=i(a.toString("hex"),16);return s&&Math.floor(o.toString("2").length/8)>=r&&(o=o.subtract(i(2).pow(i(8*r)))),o}function r(e,n=8){const s=i(e),a=[];for(let e=0;e>>1:e>>>1;t[n]=e}return t}()),t.isBuffer(e)||(e=t.from(e));let n=-1;for(let t=0;t>>8}return(-1^n)>>>0},generateRandomBytes:c,generateKeyDataFromNonce:async function(e,n){e=r(e,16),n=r(n,32);const[s,i,a]=await Promise.all([u(t.concat([n,e])),u(t.concat([e,n])),u(t.concat([n,n]))]);return{key:t.concat([s,i.slice(0,12)]),iv:t.concat([i.slice(12,20),a,n.slice(0,4)])}},sha1:u,sha256:function(e){const t=s.createHash("sha256");return t.update(e),t.digest()},bigIntMod:function(e,t){return e.remainder(t).add(t).remainder(t)},modExp:function(e,t,n){e=e.remainder(n);let s=i.one,a=e;for(;t.greater(i.zero);){const e=t.remainder(i(2));t=t.divide(i(2)),e.eq(i.one)&&(s=s.multiply(a),s=s.remainder(n)),a=a.multiply(a),a=a.remainder(n)}return s},getRandomInt:function(e,t){return e=Math.ceil(e),t=Math.floor(t),Math.floor(Math.random()*(t-e+1))+e},sleep:e=>new Promise(t=>setTimeout(t,e)),getByteArray:function(e,t=!1){const n=e.toString(2).length,s=Math.floor((n+8-1)/8);return o(i(e),s,!1,t)},toSignedLittleBuffer:r,convertToLittle:function(e){const n=t.alloc(4*e.length);for(let t=0;t1?"s":""})`}}else if(e instanceof s.Api.MessageActionContactSignUp)a="%action_origin% joined Telegram";else if(e instanceof s.Api.MessageActionPaymentSent){const t=d(e.currency),n=(Number(e.totalAmount)/100).toFixed(2);a=`You successfully transferred ${t}${n} to shop for %product%`}else a="%ACTION_NOT_IMPLEMENTED%";return{text:a,type:o,targetUserId:c,targetChatId:u}}(t.action,n,Boolean(t.post),a);c&&(o.action=c);const{replyToMsgId:u,replyToTopId:l}=t.replyTo||{},f=t.editDate&&!t.editHide,{inlineButtons:h,keyboardButtons:g}=function(e){const{id:t,replyMarkup:n,media:i}=e;if(!n)return i instanceof s.Api.MessageMediaWebPage&&i.webpage instanceof s.Api.WebPage&&"telegram_message"===i.webpage.type?{inlineButtons:[[{type:"url",text:"Show Message",messageId:t,value:i.webpage.url}]]}:void 0;if(!(n instanceof s.Api.ReplyKeyboardMarkup||n instanceof s.Api.ReplyInlineMarkup))return;const a=n.rows.map(({buttons:e})=>e.map(e=>{let n,a,{text:r}=e;return e instanceof s.Api.KeyboardButton?(n="command",a=r):e instanceof s.Api.KeyboardButtonUrl?(n="url",a=e.url):e instanceof s.Api.KeyboardButtonCallback?(n="callback",a=String(e.data)):e instanceof s.Api.KeyboardButtonRequestPoll?n="requestPoll":e instanceof s.Api.KeyboardButtonBuy?(i instanceof s.Api.MessageMediaInvoice&&i.receiptMsgId&&(r="Receipt",a=i.receiptMsgId),n="buy"):n="NOT_SUPPORTED",{type:n,text:r,messageId:t,value:a}}));return{[n instanceof s.Api.ReplyKeyboardMarkup?"keyboardButtons":"inlineButtons"]:a}}(t)||{},m=t.fwdFrom&&function(e,t=!1){const n=e.savedFromPeer&&Object(r.k)(e.savedFromPeer),s=e.fromId&&Object(r.k)(e.fromId);return{isChannelPost:Boolean(e.channelPost),isLinkedChannelPost:Boolean(e.channelPost&&n&&!t),fromChatId:n||s,fromMessageId:e.channelPost||e.savedFromMsgId,senderUserId:s,hiddenUserName:e.fromName,adminTitle:e.postAuthor}}(t.fwdFrom,i),{replies:y,mediaUnread:b,postAuthor:_}=t,w=t.groupedId&&t.groupedId.toString(),v=Boolean(w)&&!(o.document||o.audio),I=t.replyMarkup instanceof s.Api.ReplyKeyboardHide;return{id:t.id,chatId:e,isOutgoing:a,content:o,date:t.date,senderId:n||t.out&&t.post&&p||e,views:t.views,...u&&{replyToMessageId:u},...l&&{replyToTopMessageId:l},...m&&{forwardInfo:m},...f&&{isEdited:f},...b&&{isMediaUnread:b},...t.mentioned&&b&&{hasUnreadMention:!0},...w&&{groupedId:w,isInAlbum:v},inlineButtons:h,...g&&{keyboardButtons:g},...I&&{shouldHideKeyboardButtons:I},...t.viaBotId&&{viaBotId:t.viaBotId},...y&&y.comments&&{threadInfo:x(y,t.id,e)},..._&&{adminTitle:_}}}function A(e,t){return{text:e,...t&&{entities:t.map(D)}}}function I(e){if(!(e instanceof s.Api.DraftMessageEmpty)&&e.message)return{formattedText:A(e.message,e.entities),replyingToId:e.replyToMsgId}}function P(e){const t=function(e){if(!(e instanceof s.Api.MessageMediaDocument&&e.document&&e.document instanceof s.Api.Document))return;return Object(o.a)(e.document)}(e);if(t)return{sticker:t};const n=function(e){if(!(e instanceof s.Api.MessageMediaPhoto&&e.photo&&e.photo instanceof s.Api.Photo))return;const t=e.photo.sizes.filter(e=>e instanceof s.Api.PhotoSize).map(S);return{thumbnail:Object(c.c)(e.photo.sizes),sizes:t}}(e);if(n)return{photo:n};const i=function(e){if(!(e instanceof s.Api.MessageMediaDocument&&e.document instanceof s.Api.Document&&e.document.mimeType.startsWith("video")))return;return C(e.document)}(e);if(i)return{video:i};const r=function(e){if(!(e instanceof s.Api.MessageMediaDocument&&e.document&&e.document instanceof s.Api.Document))return;const t=e.document.attributes.find(e=>e instanceof s.Api.DocumentAttributeAudio);if(!t||t.voice)return;return{fileName:U(e.document,"audio"),...Object(a.b)(e.document,["size","mimeType"]),...Object(a.b)(t,["duration","performer","title"])}}(e);if(r)return{audio:r};const u=function(e){if(!(e instanceof s.Api.MessageMediaDocument&&e.document&&e.document instanceof s.Api.Document))return;const t=e.document.attributes.find(e=>e instanceof s.Api.DocumentAttributeAudio);if(!t||!t.voice)return;const{duration:n,waveform:i}=t;return{duration:n,waveform:i?Array.from(i):void 0}}(e);if(u)return{voice:u};const l=function(e){if(!(e instanceof s.Api.MessageMediaDocument&&e.document))return;return M(e.document)}(e);if(l)return{document:l};const f=function(e){if(!(e instanceof s.Api.MessageMediaContact))return;return Object(a.b)(e,["firstName","lastName","phoneNumber","userId"])}(e);if(f)return{contact:f};const p=function(e){if(!(e instanceof s.Api.MessageMediaPoll))return;return k(e.poll,e.results)}(e);if(p)return{poll:p};const h=R(e);if(h)return{webPage:h};const g=function(e){if(!(e instanceof s.Api.MessageMediaInvoice))return;return function(e){const{description:t,title:n,photo:s,test:i,totalAmount:a,currency:r,receiptMsgId:o}=e,c=d(r);return{text:t,title:n,photoUrl:s&&s.url,receiptMsgId:o,description:`${c}${(Number(a)/100).toFixed(2)} ${i?"TEST INVOICE":""}`}}(e)}(e);return g?{invoice:g}:void 0}function S(e){const{w:t,h:n,type:s}=e;return{width:t,height:n,type:s}}function C(e){if(e instanceof s.Api.DocumentEmpty)return;const{id:t,mimeType:n,thumbs:i,size:a,attributes:r}=e,o=r.find(e=>e instanceof s.Api.DocumentAttributeVideo);if(!o)return;const u=r.find(e=>e instanceof s.Api.DocumentAttributeAnimated),{duration:l,w:d,h:f,supportsStreaming:p=!1,roundMessage:h=!1}=o;return{id:String(t),mimeType:n,duration:l,fileName:U(e,"video"),width:d,height:f,supportsStreaming:p,isRound:h,isGif:Boolean(u),thumbnail:Object(c.c)(i),size:a}}function M(e){if(!(e instanceof s.Api.Document))return;const{id:t,size:n,mimeType:i,date:a,thumbs:r}=e,o=r&&Object(c.c)(r);return{id:String(t),size:n,mimeType:i,timestamp:a,fileName:U(e),thumbnail:o}}function k(e,t){const{id:n,answers:s}=e,i=s.map(e=>({text:e.text,option:String.fromCharCode(...e.option)}));return{id:n.toString(),summary:{isPublic:e.publicVoters,...Object(a.b)(e,["closed","multipleChoice","quiz","question","closePeriod","closeDate"]),answers:i},results:E(t)}}function E(e){const{results:t,totalVoters:n,recentVoters:s,solution:i,solutionEntities:a}=e;return{totalVoters:n,recentVoterIds:s,results:t&&t.map(({option:e,chosen:t,correct:n,voters:s})=>({isChosen:t,isCorrect:n,option:String.fromCharCode(...e),votersCount:s})),solution:i,...a&&{solutionEntities:a.map(D)}}}function R(e){if(!(e instanceof s.Api.MessageMediaWebPage&&e.webpage instanceof s.Api.WebPage))return;const{id:t,photo:n,document:i}=e.webpage;return{id:Number(t),...Object(a.b)(e.webpage,["url","displayUrl","siteName","title","description"]),photo:n&&n instanceof s.Api.Photo?{thumbnail:Object(c.c)(n.sizes),sizes:n.sizes.filter(e=>e instanceof s.Api.PhotoSize).map(S)}:void 0,...i&&{hasDocument:!0}}}function U(e,t="file"){const{mimeType:n,attributes:i}=e,a=i.find(e=>e instanceof s.Api.DocumentAttributeFilename);if(a)return a.fileName;const r=n.split("/")[1];return`${t}${String(e.id)}.${r}`}function O(e,t,n,s,i,a,r,o,c,l){const d=h++,f=i&&function(e){const{filename:t,blobUrl:n,previewBlobUrl:s,mimeType:i,size:a}=e;if(e.quick){const{width:r,height:o,duration:c}=e.quick;return i.startsWith("image/")?{photo:{sizes:[],thumbnail:{width:r,height:o,dataUri:""},blobUrl:n}}:{video:{id:"temp",mimeType:i,duration:c||0,fileName:t,width:r,height:o,blobUrl:n,...s&&{thumbnail:{width:r,height:o,dataUri:s}},size:a}}}if(e.voice){const{duration:t,waveform:n}=e.voice,{data:s}=Object(u.a)(n,63);return{voice:{duration:t,waveform:s}}}return i.startsWith("audio/")?{audio:{mimeType:i,fileName:t,size:a,duration:200}}:{document:{mimeType:i,fileName:t,size:a,...s&&{previewBlobUrl:s}}}}(i),g="chatTypeChannel"===e.type;return{id:d,chatId:e.id,content:{...t&&{text:{text:t,entities:n}},...f,...a&&{sticker:a},...r&&{video:r},...o&&B(o,d)},date:l||Math.round(Date.now()/1e3),isOutgoing:!g,senderId:p,...s&&{replyToMessageId:s},...c&&{groupedId:c,...f&&(f.photo||f.video)&&{isInAlbum:!0}},...l&&{isScheduled:!0}}}function T(e,t){const n=h++,{content:s,chatId:i,id:a,senderId:r,groupedId:o,isInAlbum:c}=t,u=s.audio,l=e.id===p&&(i!==e.id||t.forwardInfo)&&!u;return{id:n,chatId:e.id,content:s,date:Math.round(Date.now()/1e3),isOutgoing:!l&&"chatTypeChannel"!==e.type,senderId:p,sendingState:"messageSendingStatePending",...r!==p&&!u&&{forwardInfo:{isChannelPost:!1,fromChatId:i,fromMessageId:a,senderUserId:r}},groupedId:o,isInAlbum:c}}function B(e,t){return{poll:{id:t.toString(),summary:Object(a.b)(e.summary,["question","answers"]),results:{}}}}function D(e){const{className:t,offset:n,length:s}=e;return{type:t,offset:n,length:s,..."userId"in e&&"number"==typeof e.userId&&{userId:e.userId},..."url"in e&&{url:e.url}}}function x(e,t,n){const{channelId:s,replies:a,maxId:o,readMaxId:c,recentRepliers:u}=e;if(s===i.j)return;return{threadId:t,...n!==s?{chatId:Object(r.k)({channelId:s}),originChannelId:n}:{chatId:n},messagesCount:a,lastMessageId:o,lastReadInboxMessageId:c,...u&&{recentReplierIds:u.map(r.k)}}}},function(e,t,n){"use strict";var s=n(65);n.o(s,"ApiMediaFormat")&&n.d(t,"ApiMediaFormat",(function(){return s.ApiMediaFormat})),n.o(s,"ApiMessageEntityTypes")&&n.d(t,"ApiMessageEntityTypes",(function(){return s.ApiMessageEntityTypes})),n.o(s,"MAIN_THREAD_ID")&&n.d(t,"MAIN_THREAD_ID",(function(){return s.MAIN_THREAD_ID})),n.o(s,"MESSAGE_DELETED")&&n.d(t,"MESSAGE_DELETED",(function(){return s.MESSAGE_DELETED}));var i=n(66);n.o(i,"ApiMediaFormat")&&n.d(t,"ApiMediaFormat",(function(){return i.ApiMediaFormat})),n.o(i,"ApiMessageEntityTypes")&&n.d(t,"ApiMessageEntityTypes",(function(){return i.ApiMessageEntityTypes})),n.o(i,"MAIN_THREAD_ID")&&n.d(t,"MAIN_THREAD_ID",(function(){return i.MAIN_THREAD_ID})),n.o(i,"MESSAGE_DELETED")&&n.d(t,"MESSAGE_DELETED",(function(){return i.MESSAGE_DELETED}));var a=n(67);n.d(t,"ApiMessageEntityTypes",(function(){return a.a})),n.d(t,"MAIN_THREAD_ID",(function(){return a.b})),n.d(t,"MESSAGE_DELETED",(function(){return a.c}));var r=n(68);n.o(r,"ApiMediaFormat")&&n.d(t,"ApiMediaFormat",(function(){return r.ApiMediaFormat}));var o=n(69);n.d(t,"ApiMediaFormat",(function(){return o.a}));n(70),n(71)},function(e,t,n){"use strict";(function(e){var s=n(73),i=n(74),a=n(75);function r(){return c.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function o(e,t){if(r()=r())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+r().toString(16)+" bytes");return 0|e}function h(e,t){if(c.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var s=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return V(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return L(e).length;default:if(s)return V(e).length;t=(""+t).toLowerCase(),s=!0}}function g(e,t,n){var s=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return E(this,t,n);case"utf8":case"utf-8":return C(this,t,n);case"ascii":return M(this,t,n);case"latin1":case"binary":return k(this,t,n);case"base64":return S(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return R(this,t,n);default:if(s)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),s=!0}}function m(e,t,n){var s=e[t];e[t]=e[n],e[n]=s}function y(e,t,n,s,i){if(0===e.length)return-1;if("string"==typeof n?(s=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof t&&(t=c.from(t,s)),c.isBuffer(t))return 0===t.length?-1:b(e,t,n,s,i);if("number"==typeof t)return t&=255,c.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):b(e,[t],n,s,i);throw new TypeError("val must be string, number or Buffer")}function b(e,t,n,s,i){var a,r=1,o=e.length,c=t.length;if(void 0!==s&&("ucs2"===(s=String(s).toLowerCase())||"ucs-2"===s||"utf16le"===s||"utf-16le"===s)){if(e.length<2||t.length<2)return-1;r=2,o/=2,c/=2,n/=2}function u(e,t){return 1===r?e[t]:e.readUInt16BE(t*r)}if(i){var l=-1;for(a=n;ao&&(n=o-c),a=n;a>=0;a--){for(var d=!0,f=0;fi&&(s=i):s=i;var a=t.length;if(a%2!=0)throw new TypeError("Invalid hex string");s>a/2&&(s=a/2);for(var r=0;r>8,i=n%256,a.push(i),a.push(s);return a}(t,e.length-n),e,n,s)}function S(e,t,n){return 0===t&&n===e.length?s.fromByteArray(e):s.fromByteArray(e.slice(t,n))}function C(e,t,n){n=Math.min(e.length,n);for(var s=[],i=t;i239?4:u>223?3:u>191?2:1;if(i+d<=n)switch(d){case 1:u<128&&(l=u);break;case 2:128==(192&(a=e[i+1]))&&(c=(31&u)<<6|63&a)>127&&(l=c);break;case 3:a=e[i+1],r=e[i+2],128==(192&a)&&128==(192&r)&&(c=(15&u)<<12|(63&a)<<6|63&r)>2047&&(c<55296||c>57343)&&(l=c);break;case 4:a=e[i+1],r=e[i+2],o=e[i+3],128==(192&a)&&128==(192&r)&&128==(192&o)&&(c=(15&u)<<18|(63&a)<<12|(63&r)<<6|63&o)>65535&&c<1114112&&(l=c)}null===l?(l=65533,d=1):l>65535&&(l-=65536,s.push(l>>>10&1023|55296),l=56320|1023&l),s.push(l),i+=d}return function(e){var t=e.length;if(t<=4096)return String.fromCharCode.apply(String,e);var n="",s=0;for(;s0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),""},c.prototype.compare=function(e,t,n,s,i){if(!c.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===s&&(s=0),void 0===i&&(i=this.length),t<0||n>e.length||s<0||i>this.length)throw new RangeError("out of range index");if(s>=i&&t>=n)return 0;if(s>=i)return-1;if(t>=n)return 1;if(this===e)return 0;for(var a=(i>>>=0)-(s>>>=0),r=(n>>>=0)-(t>>>=0),o=Math.min(a,r),u=this.slice(s,i),l=e.slice(t,n),d=0;di)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");s||(s="utf8");for(var a=!1;;)switch(s){case"hex":return _(this,e,t,n);case"utf8":case"utf-8":return w(this,e,t,n);case"ascii":return v(this,e,t,n);case"latin1":case"binary":return A(this,e,t,n);case"base64":return I(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,e,t,n);default:if(a)throw new TypeError("Unknown encoding: "+s);s=(""+s).toLowerCase(),a=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function M(e,t,n){var s="";n=Math.min(e.length,n);for(var i=t;is)&&(n=s);for(var i="",a=t;an)throw new RangeError("Trying to access beyond buffer length")}function O(e,t,n,s,i,a){if(!c.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}function T(e,t,n,s){t<0&&(t=65535+t+1);for(var i=0,a=Math.min(e.length-n,2);i>>8*(s?i:1-i)}function B(e,t,n,s){t<0&&(t=4294967295+t+1);for(var i=0,a=Math.min(e.length-n,4);i>>8*(s?i:3-i)&255}function D(e,t,n,s,i,a){if(n+s>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function x(e,t,n,s,a){return a||D(e,0,n,4),i.write(e,t,n,s,23,4),n+4}function j(e,t,n,s,a){return a||D(e,0,n,8),i.write(e,t,n,s,52,8),n+8}c.prototype.slice=function(e,t){var n,s=this.length;if((e=~~e)<0?(e+=s)<0&&(e=0):e>s&&(e=s),(t=void 0===t?s:~~t)<0?(t+=s)<0&&(t=0):t>s&&(t=s),t0&&(i*=256);)s+=this[e+--t]*i;return s},c.prototype.readUInt8=function(e,t){return t||U(e,1,this.length),this[e]},c.prototype.readUInt16LE=function(e,t){return t||U(e,2,this.length),this[e]|this[e+1]<<8},c.prototype.readUInt16BE=function(e,t){return t||U(e,2,this.length),this[e]<<8|this[e+1]},c.prototype.readUInt32LE=function(e,t){return t||U(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},c.prototype.readUInt32BE=function(e,t){return t||U(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},c.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||U(e,t,this.length);for(var s=this[e],i=1,a=0;++a=(i*=128)&&(s-=Math.pow(2,8*t)),s},c.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||U(e,t,this.length);for(var s=t,i=1,a=this[e+--s];s>0&&(i*=256);)a+=this[e+--s]*i;return a>=(i*=128)&&(a-=Math.pow(2,8*t)),a},c.prototype.readInt8=function(e,t){return t||U(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},c.prototype.readInt16LE=function(e,t){t||U(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},c.prototype.readInt16BE=function(e,t){t||U(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},c.prototype.readInt32LE=function(e,t){return t||U(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},c.prototype.readInt32BE=function(e,t){return t||U(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},c.prototype.readFloatLE=function(e,t){return t||U(e,4,this.length),i.read(this,e,!0,23,4)},c.prototype.readFloatBE=function(e,t){return t||U(e,4,this.length),i.read(this,e,!1,23,4)},c.prototype.readDoubleLE=function(e,t){return t||U(e,8,this.length),i.read(this,e,!0,52,8)},c.prototype.readDoubleBE=function(e,t){return t||U(e,8,this.length),i.read(this,e,!1,52,8)},c.prototype.writeUIntLE=function(e,t,n,s){(e=+e,t|=0,n|=0,s)||O(this,e,t,n,Math.pow(2,8*n)-1,0);var i=1,a=0;for(this[t]=255&e;++a=0&&(a*=256);)this[t+i]=e/a&255;return t+n},c.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||O(this,e,t,1,255,0),c.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},c.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||O(this,e,t,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):T(this,e,t,!0),t+2},c.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||O(this,e,t,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):T(this,e,t,!1),t+2},c.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||O(this,e,t,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):B(this,e,t,!0),t+4},c.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||O(this,e,t,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):B(this,e,t,!1),t+4},c.prototype.writeIntLE=function(e,t,n,s){if(e=+e,t|=0,!s){var i=Math.pow(2,8*n-1);O(this,e,t,n,i-1,-i)}var a=0,r=1,o=0;for(this[t]=255&e;++a>0)-o&255;return t+n},c.prototype.writeIntBE=function(e,t,n,s){if(e=+e,t|=0,!s){var i=Math.pow(2,8*n-1);O(this,e,t,n,i-1,-i)}var a=n-1,r=1,o=0;for(this[t+a]=255&e;--a>=0&&(r*=256);)e<0&&0===o&&0!==this[t+a+1]&&(o=1),this[t+a]=(e/r>>0)-o&255;return t+n},c.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||O(this,e,t,1,127,-128),c.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},c.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||O(this,e,t,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):T(this,e,t,!0),t+2},c.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||O(this,e,t,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):T(this,e,t,!1),t+2},c.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||O(this,e,t,4,2147483647,-2147483648),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):B(this,e,t,!0),t+4},c.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||O(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):B(this,e,t,!1),t+4},c.prototype.writeFloatLE=function(e,t,n){return x(this,e,t,!0,n)},c.prototype.writeFloatBE=function(e,t,n){return x(this,e,t,!1,n)},c.prototype.writeDoubleLE=function(e,t,n){return j(this,e,t,!0,n)},c.prototype.writeDoubleBE=function(e,t,n){return j(this,e,t,!1,n)},c.prototype.copy=function(e,t,n,s){if(n||(n=0),s||0===s||(s=this.length),t>=e.length&&(t=e.length),t||(t=0),s>0&&s=this.length)throw new RangeError("sourceStart out of bounds");if(s<0)throw new RangeError("sourceEnd out of bounds");s>this.length&&(s=this.length),e.length-t=0;--i)e[i+t]=this[i+n];else if(a<1e3||!c.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(a=t;a55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&a.push(239,191,189);continue}if(r+1===s){(t-=3)>-1&&a.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&a.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&a.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;a.push(n)}else if(n<2048){if((t-=2)<0)break;a.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;a.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;a.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return a}function L(e){return s.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(N,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function q(e,t,n,s){for(var i=0;i=t.length||i>=e.length);++i)t[i+n]=e[i];return i}}).call(this,n(43))},function(e,t,n){"use strict";(function(e){n.d(t,"m",(function(){return y})),n.d(t,"g",(function(){return b})),n.d(t,"e",(function(){return _})),n.d(t,"v",(function(){return v})),n.d(t,"d",(function(){return I})),n.d(t,"s",(function(){return P})),n.d(t,"q",(function(){return C})),n.d(t,"y",(function(){return M})),n.d(t,"b",(function(){return k})),n.d(t,"c",(function(){return E})),n.d(t,"a",(function(){return R})),n.d(t,"o",(function(){return U})),n.d(t,"p",(function(){return O})),n.d(t,"r",(function(){return T})),n.d(t,"u",(function(){return B})),n.d(t,"t",(function(){return D})),n.d(t,"j",(function(){return x})),n.d(t,"w",(function(){return j})),n.d(t,"n",(function(){return N})),n.d(t,"l",(function(){return F})),n.d(t,"k",(function(){return V})),n.d(t,"i",(function(){return L})),n.d(t,"x",(function(){return q})),n.d(t,"f",(function(){return H})),n.d(t,"h",(function(){return K}));var s=n(0),i=n(10),a=n(4),r=n(1),o=n(9),c=n(13),u=n(2),l=n(5),d=n(3),f=n(35),p=n(20),h=n(34),g=n(7);let m;function y(e){m=e}async function b({chat:e,threadId:t,...n}){const a=t===i.MAIN_THREAD_ID?s.Api.messages.GetHistory:s.Api.messages.GetReplies;let l;try{l=await Object(r.e)(new a({peer:Object(u.i)(e.id,e.accessHash),...t!==i.MAIN_THREAD_ID&&{msgId:t},...n}),void 0,!0)}catch(t){"CHANNEL_PRIVATE"===t.message&&m({"@type":"updateChat",id:e.id,chat:{isRestricted:!0}})}if(!l||l instanceof s.Api.messages.MessagesNotModified||!l.messages)return;z(l);const f=l.messages.map(o.b).filter(Boolean),p=l.users.map(c.a).filter(Boolean),h=l.chats.map(e=>Object(d.d)(e)).filter(Boolean),g=f.map(({threadInfo:e})=>e).filter(Boolean);let y;if(l.messages.length)if(l instanceof s.Api.messages.Messages)y=l.messages[l.messages.length-1].id;else if(n.offsetId&&l.offsetIdOffset){const e=l.messages.findIndex(e=>e.id===n.offsetId);l.messages.length-e+l.offsetIdOffset>=l.count&&(y=l.messages[l.messages.length-1].id)}return{messages:f,users:p,chats:h,threadInfos:g,firstMessageId:y}}async function _({chat:e,messageId:t}){const n="channel"===Object(u.s)(e.id),a=await Object(r.e)(n?new s.Api.channels.GetMessages({channel:Object(u.g)(e.id,e.accessHash),id:[new s.Api.InputMessageID({id:t})]}):new s.Api.messages.GetMessages({id:[new s.Api.InputMessageID({id:t})]}));if(!a||a instanceof s.Api.messages.MessagesNotModified)return;const l=a.messages[0];if(!l)return;if(l instanceof s.Api.MessageEmpty)return i.MESSAGE_DELETED;const d=l&&Object(o.b)(l);if(!d)return;l instanceof s.Api.Message&&Object(p.a)(l);return{message:d,users:a.users.map(c.a).filter(Boolean)}}let w=Promise.resolve();function v({chat:e,text:t,entities:n,replyingTo:i,attachment:c,sticker:d,gif:f,poll:p,isSilent:h,scheduledAt:g,groupedId:y},b){const _=Object(o.g)(e,t,n,i,c,d,f,p,y,g);m({"@type":_.isScheduled?"newScheduledMessage":"newMessage",id:_.id,chatId:e.id,message:_}),setTimeout(()=>{m({"@type":_.isScheduled?"updateScheduledMessage":"updateMessage",id:_.id,chatId:e.id,message:{sendingState:"messageSendingStatePending"}})},250);const v=Object(u.r)();if(l.a.localMessages[v.toString()]=_,y)return function({chat:e,text:t,entities:n,replyingTo:i,attachment:o,groupedId:c,isSilent:l,scheduledAt:d},f,p,h){let g=-1;A[c]||(A[c]={counter:0,singleMediaByIndex:{}});g=A[c].counter++;const m=w;return w=(async()=>{let y;try{y=await S(p,o,h)}catch(e){return a.g&&console.warn(e),A[c].counter--,void await m}const b=await async function(e,t){const n=await Object(r.e)(new s.Api.messages.UploadMedia({peer:e,media:t}));if(n instanceof s.Api.MessageMediaPhoto&&n.photo&&n.photo instanceof s.Api.Photo){const{photo:{id:e,accessHash:t,fileReference:i}}=n;return new s.Api.InputMediaPhoto({id:new s.Api.InputPhoto({id:e,accessHash:t,fileReference:i})})}if(n instanceof s.Api.MessageMediaDocument&&n.document&&n.document instanceof s.Api.Document){const{document:{id:e,accessHash:t,fileReference:i}}=n;return new s.Api.InputMediaDocument({id:new s.Api.InputDocument({id:e,accessHash:t,fileReference:i})})}return}(Object(u.i)(e.id,e.accessHash),y);if(await m,!b)return A[c].counter--,void(a.g&&console.warn("Failed to upload grouped media"));if(A[c].singleMediaByIndex[g]=new s.Api.InputSingleMedia({media:b,randomId:f,message:t||"",entities:n?n.map(u.n):void 0}),Object.keys(A[c].singleMediaByIndex).length{let o;if(c)try{o=await S(_,c,b)}catch(e){return a.g&&console.warn(e),void await I}else d?o=Object(u.h)(d):f?o=Object(u.h)(f):p&&(o=Object(u.j)(p,v));await I;const l=o?s.Api.messages.SendMedia:s.Api.messages.SendMessage;await Object(r.e)(new l({clearDraft:!0,message:t||"",entities:n?n.map(u.n):void 0,peer:Object(u.i)(e.id,e.accessHash),randomId:v,...h&&{silent:h},...g&&{scheduleDate:g},...i&&{replyToMsgId:i},...o&&{media:o}}),!0)})(),w}const A={};async function I({chat:e,message:t,text:n,entities:i}){const a=1e3*t.date>Date.now(),o={content:{...t.content,...n&&{text:{text:n,entities:i}}}};m({"@type":a?"updateScheduledMessage":"updateMessage",id:t.id,chatId:e.id,message:o}),l.a.localMessages[t.id]={...t,...o};const c=i&&i.map(u.n);await Object(r.e)(new s.Api.messages.EditMessage({message:n||"",entities:c,peer:Object(u.i)(e.id,e.accessHash),id:t.id,...a&&{scheduleDate:t.date}}),!0)}async function P({chat:e,message:t,scheduledAt:n}){await Object(r.e)(new s.Api.messages.EditMessage({peer:Object(u.i)(e.id,e.accessHash),id:t.id,scheduleDate:n}),!0)}async function S(t,n,i){const{filename:a,blobUrl:o,mimeType:c,quick:u,voice:l}=n,d=await Object(f.b)(o,a),p=e=>{i.isCanceled?p.isCanceled=!0:i(e,t.id)},g=await Object(r.g)(d,p),m=[new s.Api.DocumentAttributeFilename({fileName:a})];if(u){if(c.startsWith("image/"))return new s.Api.InputMediaUploadedPhoto({file:g});{const{width:e,height:t,duration:n}=u;void 0!==n&&m.push(new s.Api.DocumentAttributeVideo({duration:n,w:e,h:t}))}}if(l){const{duration:t,waveform:n}=l,{data:i}=Object(h.a)(n,63);m.push(new s.Api.DocumentAttributeAudio({voice:!0,duration:t,waveform:e.from(i)}))}return new s.Api.InputMediaUploadedDocument({file:g,mimeType:c,attributes:m})}async function C({chat:e,messageId:t,isUnpin:n,isOneSide:i,isSilent:a}){await Object(r.e)(new s.Api.messages.UpdatePinnedMessage({peer:Object(u.i)(e.id,e.accessHash),id:t,...n&&{unpin:!0},...i&&{pmOneside:!0},...a&&{silent:!0}}),!0)}async function M({chat:e}){await Object(r.e)(new s.Api.messages.UnpinAllMessages({peer:Object(u.i)(e.id,e.accessHash)}),!0)}async function k({chat:e,messageIds:t,shouldDeleteForAll:n}){const i="channel"===Object(u.s)(e.id);await Object(r.e)(i?new s.Api.channels.DeleteMessages({channel:Object(u.g)(e.id,e.accessHash),id:t}):new s.Api.messages.DeleteMessages({id:t,...n&&{revoke:!0}}))&&m({"@type":"deleteMessages",ids:t,...i&&{chatId:e.id}})}async function E({chat:e,messageIds:t}){await Object(r.e)(new s.Api.messages.DeleteScheduledMessages({peer:Object(u.i)(e.id,e.accessHash),id:t}))&&m({"@type":"deleteScheduledMessages",ids:t,chatId:e.id})}async function R({chat:e,shouldDeleteForAll:t,maxId:n}){const i="channel"===Object(u.s)(e.id);await Object(r.e)(i?new s.Api.channels.DeleteHistory({channel:Object(u.g)(e.id,e.accessHash),maxId:n}):new s.Api.messages.DeleteHistory({peer:Object(u.i)(e.id,e.accessHash),...t&&{revoke:!0},...!t&&{just_clear:!0},maxId:n}))&&m({"@type":"deleteHistory",chatId:e.id})}async function U({chat:e,threadId:t,maxId:n}){const a="channel"===Object(u.s)(e.id);a&&t===i.MAIN_THREAD_ID?await Object(r.e)(new s.Api.channels.ReadHistory({channel:Object(u.g)(e.id,e.accessHash),maxId:n})):a?await Object(r.e)(new s.Api.messages.ReadDiscussion({peer:Object(u.i)(e.id,e.accessHash),msgId:t,readMaxId:n})):await Object(r.e)(new s.Api.messages.ReadHistory({peer:Object(u.i)(e.id,e.accessHash),maxId:n})),t===i.MAIN_THREAD_ID?Object(g.t)(e):T({chat:e,threadId:t})}async function O({chat:e,messageIds:t}){const n="channel"===Object(u.s)(e.id);await Object(r.e)(n?new s.Api.channels.ReadMessageContents({channel:Object(u.g)(e.id,e.accessHash),id:t}):new s.Api.messages.ReadMessageContents({id:t})),m({...n?{"@type":"updateChannelMessages",channelId:e.id}:{"@type":"updateCommonBoxMessages"},ids:t,messageUpdate:{hasUnreadMention:!1,isMediaUnread:!1}})}async function T({chat:e,threadId:t}){const[n,i]=await Promise.all([Object(r.e)(new s.Api.messages.GetDiscussionMessage({peer:Object(u.i)(e.id,e.accessHash),msgId:t})),Object(r.e)(new s.Api.messages.GetReplies({peer:Object(u.i)(e.id,e.accessHash),msgId:t,limit:1}))]);if(!n||!n.messages.length)return;const a=Object(o.o)(n.messages[0]);if(!a)return;m({"@type":"updateThreadInfo",chatId:a,threadId:t,threadInfo:{topMessageId:n.messages[n.messages.length-1].id,lastReadInboxMessageId:n.readInboxMaxId,messagesCount:i instanceof s.Api.messages.ChannelMessages?i.count:void 0}});n.chats.map(e=>Object(d.d)(e)).filter(Boolean).forEach(e=>{m({"@type":"updateChat",id:e.id,chat:e})})}async function B({chatOrUser:e,type:t,query:n,topMessageId:i,minDate:a,maxDate:l,...d}){let f;switch(t){case"media":f=new s.Api.InputMessagesFilterPhotoVideo;break;case"documents":f=new s.Api.InputMessagesFilterDocument;break;case"links":f=new s.Api.InputMessagesFilterUrl;break;case"audio":f=new s.Api.InputMessagesFilterMusic;break;case"voice":f=new s.Api.InputMessagesFilterVoice;break;case"text":default:f=new s.Api.InputMessagesFilterEmpty}const p=await Object(r.e)(new s.Api.messages.Search({peer:Object(u.i)(e.id,e.accessHash),filter:f,q:n||"",topMsgId:i,minDate:a,maxDate:l,...d}));if(!p||p instanceof s.Api.messages.MessagesNotModified||!p.messages)return;z(p);const h=p.messages.map(o.b).filter(Boolean),g=p.users.map(c.a).filter(Boolean);let m,y=h.length;return(p instanceof s.Api.messages.MessagesSlice||p instanceof s.Api.messages.ChannelMessages)&&(y=p.count,h.length&&(m=h[h.length-1].id)),{messages:h,users:g,totalCount:y,nextOffsetId:m}}async function D({query:e,offsetRate:t=0,limit:n,type:i="text",minDate:u,maxDate:l}){let f;switch(i){case"media":f=new s.Api.InputMessagesFilterPhotoVideo;break;case"documents":f=new s.Api.InputMessagesFilterDocument;break;case"links":f=new s.Api.InputMessagesFilterUrl;break;case"audio":f=new s.Api.InputMessagesFilterMusic;break;case"voice":f=new s.Api.InputMessagesFilterVoice;break;case"text":default:if(!(e||l&&u))return;f=new s.Api.InputMessagesFilterEmpty}const p=await Object(r.e)(new s.Api.messages.SearchGlobal({q:e,offsetRate:t,offsetPeer:new s.Api.InputPeerEmpty,limit:n,filter:f,folderId:a.a,minDate:u,maxDate:l}));if(!p||p instanceof s.Api.messages.MessagesNotModified||!p.messages)return;z({chats:p.chats,users:p.users,messages:p.messages});const h=p.chats.map(e=>Object(d.d)(e)).filter(Boolean),g=p.users.map(c.a).filter(Boolean),m=p.messages.map(o.b).filter(Boolean);let y,b=m.length;return(p instanceof s.Api.messages.MessagesSlice||p instanceof s.Api.messages.ChannelMessages)&&(b=p.count,m.length&&(y=m[m.length-1].id)),{messages:m,users:g,chats:h,totalCount:b,nextRate:"nextRate"in p&&p.nextRate?p.nextRate:y}}async function x({message:e}){const t=await Object(r.e)(new s.Api.messages.GetWebPagePreview({message:e}));return t&&Object(o.n)(t)}async function j({chat:t,messageId:n,options:i}){const{id:a,accessHash:o}=t;await Object(r.e)(new s.Api.messages.SendVote({peer:Object(u.i)(a,o),msgId:n,options:i.map(t=>e.from(t))}),!0)}async function N({chat:t,messageId:n,option:i,offset:a,limit:o,shouldResetVoters:l}){const{id:d,accessHash:f}=t,p=await Object(r.e)(new s.Api.messages.GetPollVotes({peer:Object(u.i)(d,f),id:n,...i&&{option:e.from(i)},...a&&{offset:a},...o&&{limit:o}}));if(!p)return;z({chats:[],users:p.users,messages:[]});const h=p.users.map(c.a).filter(Boolean),g=p.votes.map(e=>({userId:e.userId,date:e.date}));return{count:p.count,votes:g,users:h,nextOffset:p.nextOffset,shouldResetVoters:l}}async function F({fromChat:e,toChat:t,messages:n}){const i=n.map(({id:e})=>e),a=n.map(u.r);n.forEach((e,n)=>{const s=Object(o.f)(t,e);l.a.localMessages[String(a[n])]=s,m({"@type":"newMessage",id:s.id,chatId:t.id,message:s})}),await Object(r.e)(new s.Api.messages.ForwardMessages({fromPeer:Object(u.i)(e.id,e.accessHash),toPeer:Object(u.i)(t.id,t.accessHash),randomId:a,id:i}),!0)}async function V({chat:e,timestamp:t}){const n=await Object(r.e)(new s.Api.messages.GetHistory({peer:Object(u.i)(e.id,e.accessHash),offsetDate:t,addOffset:-1,limit:1}));if(n&&!(n instanceof s.Api.messages.MessagesNotModified)&&n.messages&&n.messages.length)return n.messages[0].id}async function L({chat:e,hash:t=0}){const{id:n,accessHash:i}=e,a=await Object(r.e)(new s.Api.messages.GetScheduledHistory({peer:Object(u.i)(n,i),hash:t}));if(!a||a instanceof s.Api.messages.MessagesNotModified||!a.messages)return;z(a);const c=a.messages.map(o.b).filter(Boolean);return{messages:c,hash:Object(u.q)(c.map(e=>e.id))}}async function q({chat:e,ids:t}){const{id:n,accessHash:i}=e;await Object(r.e)(new s.Api.messages.SendScheduledMessages({peer:Object(u.i)(n,i),id:t}),!0)}function H({chat:e,message:t}){return Object(r.e)(new s.Api.channels.ExportMessageLink({id:t.id,channel:Object(u.g)(e.id,e.accessHash),...t.isInAlbum&&{grouped:!0},...t.threadInfo&&t.threadInfo.topMessageId!==t.id&&{thread:!0}}))}function z(e){e.users.forEach(e=>{e instanceof s.Api.User&&(l.a.users[e.id]=e)}),e.chats.forEach(e=>{(e instanceof s.Api.Chat||e instanceof s.Api.Channel)&&(l.a.chats[e.id]=e)}),e.messages.forEach(e=>{e instanceof s.Api.Message&&Object(u.t)(e)&&Object(p.a)(e)})}async function K({chat:e}){const t=await Object(r.e)(new s.Api.messages.Search({peer:Object(u.i)(e.id,e.accessHash),filter:new s.Api.InputMessagesFilterPinned,q:"",limit:a.s}));if(!t||t instanceof s.Api.messages.MessagesNotModified||!t.messages)return;z(t);return{messages:t.messages.map(o.b).filter(Boolean),users:t.users.map(c.a).filter(Boolean),chats:t.chats.map(e=>Object(d.d)(e)).filter(Boolean)}}}).call(this,n(11).Buffer)},function(e,t,n){"use strict";n.d(t,"b",(function(){return i})),n.d(t,"a",(function(){return a})),n.d(t,"c",(function(){return o}));var s=n(0);function i(e){const{about:t,commonChatsCount:n,pinnedMsgId:s,botInfo:i,notifySettings:{silent:r,muteUntil:o}}=e,c=r||"number"==typeof o&&Date.now()<1e3*o;return{...a(e.user),fullInfo:{bio:t,commonChatsCount:n,pinnedMessageId:s,isMuted:c,...i&&{botDescription:i.description}}}}function a(e){if(!(e instanceof s.Api.User))return;const{id:t,firstName:n,lastName:i}=e,a=e.photo instanceof s.Api.UserProfilePhoto?String(e.photo.photoId):void 0;return{id:t,isMin:Boolean(e.min),...e.self&&{isSelf:!0},...e.verified&&{isVerified:!0},...(e.contact||e.mutualContact)&&{isContact:!0},type:r(e),...n&&{firstName:n},...i&&{lastName:i},username:e.username||"",phoneNumber:e.phone||"",status:o(e.status),...e.accessHash&&{accessHash:String(e.accessHash)},...a&&{avatarHash:a}}}function r(e){return e.bot?"userTypeBot":e.deleted?"userTypeDeleted":"userTypeRegular"}function o(e){return!e||e instanceof s.Api.UserStatusEmpty?{type:"userStatusEmpty"}:e instanceof s.Api.UserStatusOnline?{type:"userStatusOnline",expires:e.expires}:e instanceof s.Api.UserStatusOffline?{type:"userStatusOffline",wasOnline:e.wasOnline}:e instanceof s.Api.UserStatusRecently?{type:"userStatusRecently"}:e instanceof s.Api.UserStatusLastWeek?{type:"userStatusLastWeek"}:{type:"userStatusLastMonth"}}},function(e,t,n){"use strict";function s(e,t){return e.reduce((e,n)=>(e[n[t]]=n,e),{})}function i(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),{})}n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return i})),n.d(t,"c",(function(){return a}))},function(e,t,n){(function(e){var s,i=function(e){"use strict";var t=1e7,n=9007199254740992,s=d(n),a="function"==typeof BigInt;function r(e,t,n,s){return void 0===e?r[0]:void 0!==t&&(10!=+t||n)?V(e,t,n,s):K(e)}function o(e,t){this.value=e,this.sign=t,this.isSmall=!1}function c(e){this.value=e,this.sign=e<0,this.isSmall=!0}function u(e){this.value=e}function l(e){return-n0?Math.floor(e):Math.ceil(e)}function m(e,n){var s,i,a=e.length,r=n.length,o=new Array(a),c=0,u=t;for(i=0;i=u?1:0,o[i]=s-c*u;for(;i0&&o.push(c),o}function y(e,t){return e.length>=t.length?m(e,t):m(t,e)}function b(e,n){var s,i,a=e.length,r=new Array(a),o=t;for(i=0;i0;)r[i++]=n%o,n=Math.floor(n/o);return r}function _(e,t){var n,s,i=e.length,a=t.length,r=new Array(i),o=0;for(n=0;n0;)r[i++]=c%o,c=Math.floor(c/o);return r}function I(e,t){for(var n=[];t-- >0;)n.push(0);return n.concat(e)}function P(e,n,s){return new o(e=0;--n)i=(a=1e7*i+e[n])-(s=g(a/t))*t,o[n]=0|s;return[o,0|i]}function M(e,n){var s,i=K(n);if(a)return[new u(e.value/i.value),new u(e.value%i.value)];var l,m=e.value,y=i.value;if(0===y)throw new Error("Cannot divide by zero");if(e.isSmall)return i.isSmall?[new c(g(m/y)),new c(m%y)]:[r[0],e];if(i.isSmall){if(1===y)return[e,r[0]];if(-1==y)return[e.negate(),r[0]];var b=Math.abs(y);if(b=0;i--){for(s=p-1,b[i+d]!==m&&(s=Math.floor((b[i+d]*p+b[i+d-1])/m)),a=0,r=0,c=_.length,o=0;oc&&(i=1e7*(i+1)),n=Math.ceil(i/a);do{if(k(r=A(t,n),l)<=0)break;n--}while(n);u.push(n),l=_(l,r)}return u.reverse(),[f(u),f(l)]}(m,y))[0];var I=e.sign!==i.sign,P=s[1],S=e.sign;return"number"==typeof l?(I&&(l=-l),l=new c(l)):l=new o(l,I),"number"==typeof P?(S&&(P=-P),P=new c(P)):P=new o(P,S),[l,P]}function k(e,t){if(e.length!==t.length)return e.length>t.length?1:-1;for(var n=e.length-1;n>=0;n--)if(e[n]!==t[n])return e[n]>t[n]?1:-1;return 0}function E(e){var t=e.abs();return!t.isUnit()&&(!!(t.equals(2)||t.equals(3)||t.equals(5))||!(t.isEven()||t.isDivisibleBy(3)||t.isDivisibleBy(5))&&(!!t.lesser(49)||void 0))}function R(e,t){for(var n,s,a,r=e.prev(),o=r,c=0;o.isEven();)o=o.divide(2),c++;e:for(s=0;s=0?s=_(e,t):(s=_(t,e),n=!n),"number"==typeof(s=f(s))?(n&&(s=-s),new c(s)):new o(s,n)}(n,s,this.sign)},o.prototype.minus=o.prototype.subtract,c.prototype.subtract=function(e){var t=K(e),n=this.value;if(n<0!==t.sign)return this.add(t.negate());var s=t.value;return t.isSmall?new c(n-s):w(s,Math.abs(n),n>=0)},c.prototype.minus=c.prototype.subtract,u.prototype.subtract=function(e){return new u(this.value-K(e).value)},u.prototype.minus=u.prototype.subtract,o.prototype.negate=function(){return new o(this.value,!this.sign)},c.prototype.negate=function(){var e=this.sign,t=new c(-this.value);return t.sign=!e,t},u.prototype.negate=function(){return new u(-this.value)},o.prototype.abs=function(){return new o(this.value,!1)},c.prototype.abs=function(){return new c(Math.abs(this.value))},u.prototype.abs=function(){return new u(this.value>=0?this.value:-this.value)},o.prototype.multiply=function(e){var n,s,i,a=K(e),c=this.value,u=a.value,l=this.sign!==a.sign;if(a.isSmall){if(0===u)return r[0];if(1===u)return this;if(-1===u)return this.negate();if((n=Math.abs(u))0?function e(t,n){var s=Math.max(t.length,n.length);if(s<=30)return v(t,n);s=Math.ceil(s/2);var i=t.slice(s),a=t.slice(0,s),r=n.slice(s),o=n.slice(0,s),c=e(a,o),u=e(i,r),l=e(y(a,i),y(o,r)),d=y(y(c,I(_(_(l,c),u),s)),I(u,2*s));return p(d),d}(c,u):v(c,u),l)},o.prototype.times=o.prototype.multiply,c.prototype._multiplyBySmall=function(e){return l(e.value*this.value)?new c(e.value*this.value):P(Math.abs(e.value),d(Math.abs(this.value)),this.sign!==e.sign)},o.prototype._multiplyBySmall=function(e){return 0===e.value?r[0]:1===e.value?this:-1===e.value?this.negate():P(Math.abs(e.value),this.value,this.sign!==e.sign)},c.prototype.multiply=function(e){return K(e)._multiplyBySmall(this)},c.prototype.times=c.prototype.multiply,u.prototype.multiply=function(e){return new u(this.value*K(e).value)},u.prototype.times=u.prototype.multiply,o.prototype.square=function(){return new o(S(this.value),!1)},c.prototype.square=function(){var e=this.value*this.value;return l(e)?new c(e):new o(S(d(Math.abs(this.value))),!1)},u.prototype.square=function(e){return new u(this.value*this.value)},o.prototype.divmod=function(e){var t=M(this,e);return{quotient:t[0],remainder:t[1]}},u.prototype.divmod=c.prototype.divmod=o.prototype.divmod,o.prototype.divide=function(e){return M(this,e)[0]},u.prototype.over=u.prototype.divide=function(e){return new u(this.value/K(e).value)},c.prototype.over=c.prototype.divide=o.prototype.over=o.prototype.divide,o.prototype.mod=function(e){return M(this,e)[1]},u.prototype.mod=u.prototype.remainder=function(e){return new u(this.value%K(e).value)},c.prototype.remainder=c.prototype.mod=o.prototype.remainder=o.prototype.mod,o.prototype.pow=function(e){var t,n,s,i=K(e),a=this.value,o=i.value;if(0===o)return r[1];if(0===a)return r[0];if(1===a)return r[1];if(-1===a)return i.isEven()?r[1]:r[-1];if(i.sign)return r[0];if(!i.isSmall)throw new Error("The exponent "+i.toString()+" is too large.");if(this.isSmall&&l(t=Math.pow(a,o)))return new c(g(t));for(n=this,s=r[1];!0&o&&(s=s.times(n),--o),0!==o;)o/=2,n=n.square();return s},c.prototype.pow=o.prototype.pow,u.prototype.pow=function(e){var t=K(e),n=this.value,s=t.value,i=BigInt(0),a=BigInt(1),o=BigInt(2);if(s===i)return r[1];if(n===i)return r[0];if(n===a)return r[1];if(n===BigInt(-1))return t.isEven()?r[1]:r[-1];if(t.isNegative())return new u(i);for(var c=this,l=r[1];(s&a)===a&&(l=l.times(c),--s),s!==i;)s/=o,c=c.square();return l},o.prototype.modPow=function(e,t){if(e=K(e),(t=K(t)).isZero())throw new Error("Cannot take modPow with modulus 0");var n=r[1],s=this.mod(t);for(e.isNegative()&&(e=e.multiply(r[-1]),s=s.modInv(t));e.isPositive();){if(s.isZero())return r[0];e.isOdd()&&(n=n.multiply(s).mod(t)),e=e.divide(2),s=s.square().mod(t)}return n},u.prototype.modPow=c.prototype.modPow=o.prototype.modPow,o.prototype.compareAbs=function(e){var t=K(e),n=this.value,s=t.value;return t.isSmall?1:k(n,s)},c.prototype.compareAbs=function(e){var t=K(e),n=Math.abs(this.value),s=t.value;return t.isSmall?n===(s=Math.abs(s))?0:n>s?1:-1:-1},u.prototype.compareAbs=function(e){var t=this.value,n=K(e).value;return(t=t>=0?t:-t)===(n=n>=0?n:-n)?0:t>n?1:-1},o.prototype.compare=function(e){if(e===1/0)return-1;if(e===-1/0)return 1;var t=K(e),n=this.value,s=t.value;return this.sign!==t.sign?t.sign?1:-1:t.isSmall?this.sign?-1:1:k(n,s)*(this.sign?-1:1)},o.prototype.compareTo=o.prototype.compare,c.prototype.compare=function(e){if(e===1/0)return-1;if(e===-1/0)return 1;var t=K(e),n=this.value,s=t.value;return t.isSmall?n==s?0:n>s?1:-1:n<0!==t.sign?n<0?-1:1:n<0?1:-1},c.prototype.compareTo=c.prototype.compare,u.prototype.compare=function(e){if(e===1/0)return-1;if(e===-1/0)return 1;var t=this.value,n=K(e).value;return t===n?0:t>n?1:-1},u.prototype.compareTo=u.prototype.compare,o.prototype.equals=function(e){return 0===this.compare(e)},u.prototype.eq=u.prototype.equals=c.prototype.eq=c.prototype.equals=o.prototype.eq=o.prototype.equals,o.prototype.notEquals=function(e){return 0!==this.compare(e)},u.prototype.neq=u.prototype.notEquals=c.prototype.neq=c.prototype.notEquals=o.prototype.neq=o.prototype.notEquals,o.prototype.greater=function(e){return this.compare(e)>0},u.prototype.gt=u.prototype.greater=c.prototype.gt=c.prototype.greater=o.prototype.gt=o.prototype.greater,o.prototype.lesser=function(e){return this.compare(e)<0},u.prototype.lt=u.prototype.lesser=c.prototype.lt=c.prototype.lesser=o.prototype.lt=o.prototype.lesser,o.prototype.greaterOrEquals=function(e){return this.compare(e)>=0},u.prototype.geq=u.prototype.greaterOrEquals=c.prototype.geq=c.prototype.greaterOrEquals=o.prototype.geq=o.prototype.greaterOrEquals,o.prototype.lesserOrEquals=function(e){return this.compare(e)<=0},u.prototype.leq=u.prototype.lesserOrEquals=c.prototype.leq=c.prototype.lesserOrEquals=o.prototype.leq=o.prototype.lesserOrEquals,o.prototype.isEven=function(){return 0==(1&this.value[0])},c.prototype.isEven=function(){return 0==(1&this.value)},u.prototype.isEven=function(){return(this.value&BigInt(1))===BigInt(0)},o.prototype.isOdd=function(){return 1==(1&this.value[0])},c.prototype.isOdd=function(){return 1==(1&this.value)},u.prototype.isOdd=function(){return(this.value&BigInt(1))===BigInt(1)},o.prototype.isPositive=function(){return!this.sign},c.prototype.isPositive=function(){return this.value>0},u.prototype.isPositive=c.prototype.isPositive,o.prototype.isNegative=function(){return this.sign},c.prototype.isNegative=function(){return this.value<0},u.prototype.isNegative=c.prototype.isNegative,o.prototype.isUnit=function(){return!1},c.prototype.isUnit=function(){return 1===Math.abs(this.value)},u.prototype.isUnit=function(){return this.abs().value===BigInt(1)},o.prototype.isZero=function(){return!1},c.prototype.isZero=function(){return 0===this.value},u.prototype.isZero=function(){return this.value===BigInt(0)},o.prototype.isDivisibleBy=function(e){var t=K(e);return!t.isZero()&&(!!t.isUnit()||(0===t.compareAbs(2)?this.isEven():this.mod(t).isZero()))},u.prototype.isDivisibleBy=c.prototype.isDivisibleBy=o.prototype.isDivisibleBy,o.prototype.isPrime=function(e){var t=E(this);if(void 0!==t)return t;var n=this.abs(),s=n.bitLength();if(s<=64)return R(n,[2,3,5,7,11,13,17,19,23,29,31,37]);for(var a=Math.log(2)*s.toJSNumber(),r=Math.ceil(!0===e?2*Math.pow(a,2):a),o=[],c=0;c-n?new c(e-1):new o(s,!0)},u.prototype.prev=function(){return new u(this.value-BigInt(1))};for(var U=[1];2*U[U.length-1]<=t;)U.push(2*U[U.length-1]);var O=U.length,T=U[O-1];function B(e){return Math.abs(e)<=t}function D(e,t,n){t=K(t);for(var s=e.isNegative(),a=t.isNegative(),r=s?e.not():e,o=a?t.not():t,c=0,u=0,l=null,d=null,f=[];!r.isZero()||!o.isZero();)c=(l=M(r,T))[1].toJSNumber(),s&&(c=T-1-c),u=(d=M(o,T))[1].toJSNumber(),a&&(u=T-1-u),r=l[0],o=d[0],f.push(n(c,u));for(var p=0!==n(s?1:0,a?1:0)?i(-1):i(0),h=f.length-1;h>=0;h-=1)p=p.multiply(T).add(i(f[h]));return p}o.prototype.shiftLeft=function(e){var t=K(e).toJSNumber();if(!B(t))throw new Error(String(t)+" is too large for shifting.");if(t<0)return this.shiftRight(-t);var n=this;if(n.isZero())return n;for(;t>=O;)n=n.multiply(T),t-=O-1;return n.multiply(U[t])},u.prototype.shiftLeft=function(e){return e=K(e),new u(this.value<=O;){if(s.isZero()||s.isNegative()&&s.isUnit())return s;s=(t=M(s,T))[1].isNegative()?t[0].prev():t[0],n-=O-1}return(t=M(s,U[n]))[1].isNegative()?t[0].prev():t[0]},u.prototype.shiftRight=function(e){return e=K(e),new u(this.value>>e.value)},c.prototype.shiftRight=o.prototype.shiftRight,o.prototype.not=function(){return this.negate().prev()},u.prototype.not=c.prototype.not=o.prototype.not,o.prototype.and=function(e){return D(this,e,(function(e,t){return e&t}))},u.prototype.and=c.prototype.and=o.prototype.and,o.prototype.or=function(e){return D(this,e,(function(e,t){return e|t}))},u.prototype.or=c.prototype.or=o.prototype.or,o.prototype.xor=function(e){return D(this,e,(function(e,t){return e^t}))},u.prototype.xor=c.prototype.xor=o.prototype.xor;function x(e){var n=e.value,s="number"==typeof n?n|1<<30:"bigint"==typeof n?n|BigInt(1<<30):n[0]+n[1]*t|1073758208;return s&-s}function j(e,t){return e=K(e),t=K(t),e.greater(t)?e:t}function N(e,t){return e=K(e),t=K(t),e.lesser(t)?e:t}function F(e,t){if(e=K(e).abs(),t=K(t).abs(),e.equals(t))return e;if(e.isZero())return t;if(t.isZero())return e;for(var n,s,i=r[1];e.isEven()&&t.isEven();)n=N(x(e),x(t)),e=e.divide(n),t=t.divide(n),i=i.multiply(n);for(;e.isEven();)e=e.divide(x(e));do{for(;t.isEven();)t=t.divide(x(t));e.greater(t)&&(s=t,t=e,e=s),t=t.subtract(e)}while(!t.isZero());return i.isUnit()?e:e.multiply(i)}o.prototype.bitLength=function(){var e=this;return e.compareTo(i(0))<0&&(e=e.negate().subtract(i(1))),0===e.compareTo(i(0))?i(0):i(function e(t,n){if(n.compareTo(t)<=0){var s=e(t,n.square(n)),a=s.p,r=s.e,o=a.multiply(n);return o.compareTo(t)<=0?{p:o,e:2*r+1}:{p:a,e:2*r}}return{p:i(1),e:0}}(e,i(2)).e).add(i(1))},u.prototype.bitLength=c.prototype.bitLength=o.prototype.bitLength;var V=function(e,t,n,s){n=n||"0123456789abcdefghijklmnopqrstuvwxyz",e=String(e),s||(e=e.toLowerCase(),n=n.toLowerCase());var i,a=e.length,r=Math.abs(t),o={};for(i=0;i=r)){if("1"===l&&1===r)continue;throw new Error(l+" is not a valid digit in base "+t+".")}}t=K(t);var c=[],u="-"===e[0];for(i=u?1:0;i"!==e[i]&&i=0;s--)i=i.add(e[s].times(a)),a=a.times(t);return n?i.negate():i}function q(e,t){if((t=i(t)).isZero()){if(e.isZero())return{value:[0],isNegative:!1};throw new Error("Cannot convert nonzero numbers to base 0.")}if(t.equals(-1)){if(e.isZero())return{value:[0],isNegative:!1};if(e.isNegative())return{value:[].concat.apply([],Array.apply(null,Array(-e.toJSNumber())).map(Array.prototype.valueOf,[1,0])),isNegative:!1};var n=Array.apply(null,Array(e.toJSNumber()-1)).map(Array.prototype.valueOf,[0,1]);return n.unshift([1]),{value:[].concat.apply([],n),isNegative:!1}}var s=!1;if(e.isNegative()&&t.isPositive()&&(s=!0,e=e.abs()),t.isUnit())return e.isZero()?{value:[0],isNegative:!1}:{value:Array.apply(null,Array(e.toJSNumber())).map(Number.prototype.valueOf,1),isNegative:s};for(var a,r=[],o=e;o.isNegative()||o.compareAbs(t)>=0;){a=o.divmod(t),o=a.quotient;var c=a.remainder;c.isNegative()&&(c=t.minus(c).abs(),o=o.next()),r.push(c.toJSNumber())}return r.push(o.toJSNumber()),{value:r.reverse(),isNegative:s}}function H(e,t,n){var s=q(e,t);return(s.isNegative?"-":"")+s.value.map((function(e){return function(e,t){return e<(t=t||"0123456789abcdefghijklmnopqrstuvwxyz").length?t[e]:"<"+e+">"}(e,n)})).join("")}function z(e){if(l(+e)){var t=+e;if(t===g(t))return a?new u(BigInt(t)):new c(t);throw new Error("Invalid integer: "+e)}var n="-"===e[0];n&&(e=e.slice(1));var s=e.split(/e/i);if(s.length>2)throw new Error("Invalid integer: "+s.join("e"));if(2===s.length){var i=s[1];if("+"===i[0]&&(i=i.slice(1)),(i=+i)!==g(i)||!l(i))throw new Error("Invalid integer: "+i+" is not a valid exponent.");var r=s[0],d=r.indexOf(".");if(d>=0&&(i-=r.length-d-1,r=r.slice(0,d)+r.slice(d+1)),i<0)throw new Error("Cannot include negative exponent part for integers");e=r+=new Array(i+1).join("0")}if(!/^([0-9][0-9]*)$/.test(e))throw new Error("Invalid integer: "+e);if(a)return new u(BigInt(n?"-"+e:e));for(var f=[],h=e.length,m=h-7;h>0;)f.push(+e.slice(m,h)),(m-=7)<0&&(m=0),h-=7;return p(f),new o(f,n)}function K(e){return"number"==typeof e?function(e){if(a)return new u(BigInt(e));if(l(e)){if(e!==g(e))throw new Error(e+" is not an integer.");return new c(e)}return z(e.toString())}(e):"string"==typeof e?z(e):"bigint"==typeof e?new u(e):e}o.prototype.toArray=function(e){return q(this,e)},c.prototype.toArray=function(e){return q(this,e)},u.prototype.toArray=function(e){return q(this,e)},o.prototype.toString=function(e,t){if(void 0===e&&(e=10),10!==e)return H(this,e,t);for(var n,s=this.value,i=s.length,a=String(s[--i]);--i>=0;)n=String(s[i]),a+="0000000".slice(n.length)+n;return(this.sign?"-":"")+a},c.prototype.toString=function(e,t){return void 0===e&&(e=10),10!=e?H(this,e,t):String(this.value)},u.prototype.toString=c.prototype.toString,u.prototype.toJSON=o.prototype.toJSON=c.prototype.toJSON=function(){return this.toString()},o.prototype.valueOf=function(){return parseInt(this.toString(),10)},o.prototype.toJSNumber=o.prototype.valueOf,c.prototype.valueOf=function(){return this.value},c.prototype.toJSNumber=c.prototype.valueOf,u.prototype.valueOf=u.prototype.toJSNumber=function(){return parseInt(this.toString(),10)};for(var G=0;G<1e3;G++)r[G]=K(G),G>0&&(r[-G]=K(-G));return r.one=r[1],r.zero=r[0],r.minusOne=r[-1],r.max=j,r.min=N,r.gcd=F,r.lcm=function(e,t){return e=K(e).abs(),t=K(t).abs(),e.divide(F(e,t)).multiply(t)},r.isInstance=function(e){return e instanceof o||e instanceof c||e instanceof u},r.randBetween=function(e,n,s){e=K(e),n=K(n);var i=s||Math.random,a=N(e,n),o=j(e,n).subtract(a).add(1);if(o.isSmall)return a.add(Math.floor(i()*o));for(var c=q(o,t).value,u=[],l=!0,d=0;d{r.resolve=e,r.reject=t})}function l(e=!1){return o({...y("authorizationStateWaitCode"),isCodeViaApp:e}),new Promise((e,t)=>{r.resolve=e,r.reject=t})}function d(e){return o({...y("authorizationStateWaitPassword"),hint:e}),new Promise(e=>{r.resolve=e})}function f(){return o(y("authorizationStateWaitRegistration")),new Promise(e=>{r.resolve=e})}function p(e){return o({...y("authorizationStateWaitQrCode"),qrCode:{token:btoa(String.fromCharCode(...e.token)).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,""),expires:e.expires}}),new Promise((e,t)=>{r.reject=t})}function h(e){let t;if(e instanceof s.errors.FloodWaitError){const n=Math.ceil(Number(e.seconds)/60/60);t="Too many attempts. Try again in "+(n>1?n+" hours":"an hour")}else t=a[e.message];t||(t="Unexpected Error",i.g&&console.error(e)),o({"@type":"updateAuthorizationError",message:t})}function g(e){o({...y("authorizationStateReady"),sessionId:e})}function m(e){o({"@type":"updateCurrentUser",currentUser:e})}function y(e){return{"@type":"updateAuthorizationState",authorizationState:e}}function b(e){r.resolve&&r.resolve(e)}function _(e){r.resolve&&r.resolve(e)}function w(e){r.resolve&&r.resolve(e)}function v(e){const{firstName:t,lastName:n}=e;r.resolve&&r.resolve([t,n])}function A(){r.reject&&r.reject(new Error("RESTART_AUTH"))}function I(){r.reject&&r.reject(new Error("RESTART_AUTH_WITH_QR"))}},function(e,t,n){"use strict";function s(e,t=!1,n="image/jpeg"){return`${t?"":`data:${n};base64,`}${btoa(String.fromCharCode(...e))}`}function i(e){if(!e)return;const{flags:t,CONSTRUCTOR_ID:n,SUBCLASS_OF_ID:s,className:i,classType:a,...r}=e;return r}n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return i}))},function(e,t,n){const s=n(6),{serializeBytes:i,serializeDate:a}=n(44);e.exports={constructors:s,requests:s,patched:null,serializeBytes:i,serializeDate:a}},function(e,t,n){(function(t){const{constructors:s}=n(18),i=(new RegExp("@|(?:https?:\\/\\/)?(?:www\\.)?(?:telegram\\.(?:me|dog)|t\\.me)\\/(@|joinchat\\/)?"),t.from("ffd8ffe000104a46494600010100000100010000ffdb004300281c1e231e19282321232d2b28303c64413c37373c7b585d4964918099968f808c8aa0b4e6c3a0aadaad8a8cc8ffcbdaeef5ffffff9bc1fffffffaffe6fdfff8ffdb0043012b2d2d3c353c76414176f8a58ca5f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8ffc00011080000000003012200021101031101ffc4001f0000010501010101010100000000000000000102030405060708090a0bffc400b5100002010303020403050504040000017d01020300041105122131410613516107227114328191a1082342b1c11552d1f02433627282090a161718191a25262728292a3435363738393a434445464748494a535455565758595a636465666768696a737475767778797a838485868788898a92939495969798999aa2a3a4a5a6a7a8a9aab2b3b4b5b6b7b8b9bac2c3c4c5c6c7c8c9cad2d3d4d5d6d7d8d9dae1e2e3e4e5e6e7e8e9eaf1f2f3f4f5f6f7f8f9faffc4001f0100030101010101010101010000000000000102030405060708090a0bffc400b51100020102040403040705040400010277000102031104052131061241510761711322328108144291a1b1c109233352f0156272d10a162434e125f11718191a262728292a35363738393a434445464748494a535455565758595a636465666768696a737475767778797a82838485868788898a92939495969798999aa2a3a4a5a6a7a8a9aab2b3b4b5b6b7b8b9bac2c3c4c5c6c7c8c9cad2d3d4d5d6d7d8d9dae2e3e4e5e6e7e8e9eaf2f3f4f5f6f7f8f9faffda000c03010002110311003f00","hex")),a=t.from("ffd9","hex");new RegExp("tg:\\/\\/(join)\\?invite="),new RegExp("^([a-z]((?!__)[\\w\\d]){3,30}[a-z\\d]|gif|vid|pic|bing|wiki|imdb|bold|vote|like|coub)$");function r(e,t){throw new Error(`Cannot cast ${e.className} to any kind of ${t}`)}e.exports={getMessageId:function(e){if(null==e)return null;if("number"==typeof e)return e;if(2030045667===e.SUBCLASS_OF_ID)return e.id;throw new Error("Invalid message type: "+e.constructor.name)},getInputPeer:function e(t,n=!0,i=!0){if(void 0===t.SUBCLASS_OF_ID){if(n&&"inputEntity"in t)return t.inputEntity;if("entity"in t)return e(t.entity);r(t,"InputPeer")}if(3374092470===t.SUBCLASS_OF_ID)return t;if(t instanceof s.User){if(t.isSelf&&n)return new s.InputPeerSelf;if(void 0===t.accessHash&&i)throw new Error("User without accessHash or min info cannot be input");return new s.InputPeerUser({userId:t.id,accessHash:t.accessHash})}if(t instanceof s.Chat||t instanceof s.ChatEmpty||t instanceof s.ChatForbidden)return new s.InputPeerChat({chatId:t.id});if(t instanceof s.Channel){if(void 0===t.accessHash&&i)throw new TypeError("Channel without accessHash or min info cannot be input");return new s.InputPeerChannel({channelId:t.id,accessHash:t.accessHash})}return t instanceof s.ChannelForbidden?new s.InputPeerChannel({channelId:t.id,accessHash:t.accessHash}):t instanceof s.InputUser?new s.InputPeerUser({userId:t.userId,accessHash:t.accessHash}):t instanceof s.InputChannel?new s.InputPeerChannel({channelId:t.channelId,accessHash:t.accessHash}):t instanceof s.UserEmpty?new s.InputPeerEmpty:t instanceof s.UserFull?e(t.user):t instanceof s.ChatFull?new s.InputPeerChat({chatId:t.id}):t instanceof s.PeerChat?new s.InputPeerChat(t.chatId):void r(t,"InputPeer")},getDisplayName:function(e){return e instanceof s.User?e.lastName&&e.firstName?`${e.firstName} ${e.lastName}`:e.firstName?e.firstName:e.lastName?e.lastName:"":e instanceof s.Chat||e instanceof s.Channel?e.title:""},getAppropriatedPartSize:function(e){if(e<=104857600)return 128;if(e<=786432e3)return 256;if(e<=1572864e3)return 512;throw new Error("File size too large")},strippedPhotoToJpg:function(e){if(e.length<3||1!==e[0])return e;const n=t.from(i);return n[164]=e[1],n[166]=e[2],t.concat([n,e.slice(3),a])},getDC:function(e,t=!1){switch(e){case 1:return{id:1,ipAddress:"pluto.web.telegram.org",port:443};case 2:return{id:2,ipAddress:"venus.web.telegram.org",port:443};case 3:return{id:3,ipAddress:"aurora.web.telegram.org",port:443};case 4:return{id:4,ipAddress:"vesta.web.telegram.org",port:443};case 5:return{id:5,ipAddress:"flora.web.telegram.org",port:443};default:throw new Error("Cannot find the DC with the ID of "+e)}}}}).call(this,n(11).Buffer)},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var s=n(0),i=n(5),a=n(9);function r(e){const t=`${Object(a.o)(e)}-${e.id}`;i.a.messages[t]=e,e.media instanceof s.Api.MessageMediaDocument&&e.media.document instanceof s.Api.Document&&(i.a.documents[String(e.media.document.id)]=e.media.document)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return c})),n.d(t,"c",(function(){return u}));var s=n(0),i=n(4),a=n(24),r=n(5);function o(e){if(e instanceof s.Api.DocumentEmpty)return;const t=e.attributes.find(e=>e instanceof s.Api.DocumentAttributeSticker);if(!t)return;const n=e.attributes.find(e=>e instanceof s.Api.DocumentAttributeImageSize),r=t.stickerset,o=t.alt,c="application/x-tgsticker"===e.mimeType,u=e.thumbs&&e.thumbs.find(e=>e instanceof s.Api.PhotoCachedSize),l=e.thumbs&&e.thumbs.find(e=>e instanceof s.Api.PhotoPathSize),d=u?Object(a.a)(u):l&&n?Object(a.b)(l,n):void 0,{w:f,h:p}=u||n||{};return{id:String(e.id),stickerSetId:r.id?String(r.id):i.r,stickerSetAccessHash:String(r.accessHash),emoji:o,isAnimated:c,width:f,height:p,thumbnail:d}}function c(e){const{archived:t,animated:n,installedDate:s,id:i,accessHash:a,title:r,thumb:o,count:c,hash:u}=e;return{archived:t,isAnimated:n,installedDate:s,id:String(i),accessHash:String(a),title:r,hasThumbnail:Boolean(o),count:c,hash:u}}function u(e){const t=c(e.set),n=e instanceof s.Api.StickerSetMultiCovered?e.covers:[e.cover];return t.covers=[],n.forEach(e=>{if(e instanceof s.Api.Document){const n=o(e);n&&(t.covers.push(n),r.a.documents[String(e.id)]=e)}}),t}},function(e,t){class n extends Error{constructor(){super("The read operation was cancelled.")}}class s extends Error{constructor(e,t){super(`Could not find a matching Constructor ID for the TLObject that was supposed to be\n read with ID ${e}. Most likely, a TLObject was trying to be read when\n it should not be read. Remaining bytes: ${t.length}`),"undefined"!=typeof alert&&alert("Missing MTProto Entity: Please, make sure to add TL definition for ID "+e),this.invalidConstructorId=e,this.remaining=t}}class i extends Error{constructor(e,t){super(`Invalid checksum (${e} when ${t} was expected). This packet should be skipped.`),this.checksum=e,this.validChecksum=t}}class a extends Error{constructor(e){let t=null;4===e.length?(t=-e.readInt32LE(0),super(`Invalid response buffer (HTTP code ${t})`)):super(`Invalid response buffer (too short ${e})`),this.code=t,this.payload=e}}class r extends Error{constructor(...e){e.length||(e=["A security check failed."]),super(...e)}}class o extends Error{constructor(e,t){let n=o.ErrorMessages[t]||`Unknown error code (this should not happen): ${t}.`;n+=" Caused by "+e.className,super(n),this.message=n,this.code=t}}var c,u,l;l={16:"msg_id too low (most likely, client time is wrong it would be worthwhile to synchronize it using msg_id notifications and re-send the original message with the “correct” msg_id or wrap it in a container with a new msg_id if the original message had waited too long on the client to be transmitted).",17:"msg_id too high (similar to the previous case, the client time has to be synchronized, and the message re-sent with the correct msg_id).",18:"Incorrect two lower order msg_id bits (the server expects client message msg_id to be divisible by 4).",19:"Container msg_id is the same as msg_id of a previously received message (this must never happen).",20:"Message too old, and it cannot be verified whether the server has received a message with this msg_id or not.",32:"msg_seqno too low (the server has already received a message with a lower msg_id but with either a higher or an equal and odd seqno).",33:"msg_seqno too high (similarly, there is a message with a higher msg_id but with either a lower or an equal and odd seqno).",34:"An even msg_seqno expected (irrelevant message), but odd received.",35:"Odd msg_seqno expected (relevant message), but even received.",48:"Incorrect server salt (in this case, the bad_server_salt response is received with the correct salt, and the message is to be re-sent with it).",64:"Invalid container."},(u="ErrorMessages")in(c=o)?Object.defineProperty(c,u,{value:l,enumerable:!0,configurable:!0,writable:!0}):c[u]=l,e.exports={ReadCancelledError:n,TypeNotFoundError:s,InvalidChecksumError:i,InvalidBufferError:a,SecurityError:r,CdnFileTamperedError:class extends r{constructor(){super("The CDN file has been altered and its download cancelled.")}},BadMessageError:o}},function(e,t,n){"use strict";n.d(t,"b",(function(){return r})),n.d(t,"a",(function(){return o})),n.d(t,"c",(function(){return c})),n.d(t,"d",(function(){return u}));var s=n(0),i=n(9),a=n(14);function r(e){if(e instanceof s.Api.WallPaperNoFile)return;const{slug:t}=e,n=Object(i.a)(e.document);return n?{slug:t,document:n}:void 0}function o(e){return{isCurrent:Boolean(e.current),isOfficialApp:Boolean(e.officialApp),isPasswordPending:Boolean(e.passwordPending),hash:String(e.hash),...Object(a.b)(e,["deviceModel","platform","systemVersion","appName","appVersion","dateCreated","dateActive","ip","country","region"])}}function c(e){switch(e.className){case"PrivacyKeyPhoneNumber":return"phoneNumber";case"PrivacyKeyStatusTimestamp":return"lastSeen";case"PrivacyKeyProfilePhoto":return"profilePhoto";case"PrivacyKeyForwards":return"forwards";case"PrivacyKeyChatInvite":return"chatInvite"}}function u(e){let t,n,i,a,r;return e.forEach(e=>{e instanceof s.Api.PrivacyValueAllowAll?t=t||"everybody":e instanceof s.Api.PrivacyValueAllowContacts?t=t||"contacts":e instanceof s.Api.PrivacyValueDisallowContacts?t=t||"nonContacts":e instanceof s.Api.PrivacyValueDisallowAll?t=t||"nobody":e instanceof s.Api.PrivacyValueAllowUsers?n=e.users:e instanceof s.Api.PrivacyValueDisallowUsers?a=e.users:e instanceof s.Api.PrivacyValueAllowChatParticipants?i=e.chats.map(e=>-e):e instanceof s.Api.PrivacyValueDisallowChatParticipants&&(r=e.chats.map(e=>-e))}),t||(t="nobody"),{visibility:t,allowUserIds:n||[],allowChatIds:i||[],blockUserIds:a||[],blockChatIds:r||[]}}},function(e,t,n){"use strict";n.d(t,"c",(function(){return c})),n.d(t,"a",(function(){return u})),n.d(t,"b",(function(){return l}));var s=n(0),i=n(19),a=n(17);function r(e,t,n){return''.replace("{{path}}",function(e){let t="M";const n=e.length;for(let s=0;s=192?t+="AACAAAAHAAALMAAAQASTAVAAAZaacaaaahaaalmaaaqastava.az0123456789-,"[n-128-64]:(n>=128?t+=",":n>=64&&(t+="-"),t+=String(63&n))}return t+="z",t}(e)).replace("{{width}}",String(t)).replace("{{height}}",String(n))}const o={w:100,h:100};function c(e,t){if(!e||!e.length)return;const n=e.find(e=>e instanceof s.Api.PhotoStrippedSize);if(!n)return;const r=e.filter(e=>e instanceof s.Api.PhotoSize),{w:c,h:u}=r&&r.length?r[r.length-1]:o,{bytes:l}=n;return{dataUri:Object(a.a)(t&&"image/jpeg"!==t?l:Object(i.strippedPhotoToJpg)(l),void 0,t),width:c,height:u}}function u(e){const{w:t,h:n,bytes:s}=e;return{dataUri:Object(a.a)(s,void 0,"image/webp"),width:t,height:n}}function l(e,t){const{w:n,h:s}=t;return{dataUri:"data:image/svg+xml;utf8,"+r(e.bytes,n,s),width:n,height:s}}},function(e,t,n){const{TypeNotFoundError:s}=n(22),{coreObjects:i}=n(50),{tlobjects:a}=n(52),{readBigIntFromBuffer:r}=n(8);e.exports=class{constructor(e){this.stream=e,this._last=null,this.offset=0}readByte(){return this.read(1)[0]}readInt(e=!0){let t;return t=e?this.stream.readInt32LE(this.offset):this.stream.readUInt32LE(this.offset),this.offset+=4,t}readLong(e=!0){return this.readLargeInt(64,e)}readFloat(){return this.read(4).readFloatLE(0)}readDouble(){return this.read(8).readDoubleLE(0)}readLargeInt(e,t=!0){const n=this.read(Math.floor(e/8));return r(n,!0,t)}read(e=-1){-1===e&&(e=this.stream.length-this.offset);const t=this.stream.slice(this.offset,this.offset+e);if(this.offset+=e,t.length!==e)throw Error(`No more data left to read (need ${e}, got ${t.length}: ${t}); last read ${this._last}`);return this._last=t,t}getBuffer(){return this.stream}tgReadBytes(){const e=this.readByte();let t,n;254===e?(n=this.readByte()|this.readByte()<<8|this.readByte()<<16,t=n%4):(n=e,t=(n+1)%4);const s=this.read(n);return t>0&&(t=4-t,this.read(t)),s}tgReadString(){return this.tgReadBytes().toString("utf-8")}tgReadBool(){const e=this.readInt(!1);if(2574415285===e)return!0;if(3162085175===e)return!1;throw new Error("Invalid boolean code "+e.toString("16"))}tgReadDate(){const e=this.readInt();return new Date(1e3*e)}tgReadObject(){const e=this.readInt(!1);let t=a[e];if(void 0===t){if(2574415285===e)return!0;if(3162085175===e)return!1;if(481674261===e){const e=[],t=this.readInt();for(let n=0;ne instanceof s.Api.User).map(o.a).forEach(e=>{e&&h({"@type":"updateUser",id:e.id,user:e})}),n.filter(e=>e instanceof s.Api.Chat||e instanceof s.Api.Channel).map(e=>Object(r.d)(e)).forEach(e=>{e&&h({"@type":"updateChat",id:e.id,chat:e})})),e instanceof s.Api.UpdateNewScheduledMessage?h({"@type":m.has(t.id)?"updateScheduledMessage":"newScheduledMessage",id:t.id,chatId:t.chatId,message:t}):h({"@type":m.has(t.id)?"updateMessage":"newMessage",id:t.id,chatId:t.chatId,message:t}),e.message instanceof s.Api.MessageService){const{action:n}=e.message;if(n instanceof s.Api.MessageActionChatEditTitle)h({"@type":"updateChat",id:t.chatId,chat:{title:n.title}});else if(n instanceof s.Api.MessageActionChatEditPhoto){const s=Object(c.c)(n.photo),i=Object(r.e)(s),o=Math.abs(Object(a.o)(e.message));u.a.chats[o]&&(u.a.chats[o].photo=s),i&&h({"@type":"updateChat",id:t.chatId,chat:{avatarHash:i}})}else if(n instanceof s.Api.MessageActionChatDeletePhoto){const n=Math.abs(Object(a.o)(e.message));u.a.chats[n]&&(u.a.chats[n].photo=new s.Api.ChatPhotoEmpty),h({"@type":"updateChat",id:t.chatId,chat:{avatarHash:void 0}})}else n instanceof s.Api.MessageActionChatDeleteUser?e._entities&&e._entities.some(e=>e instanceof s.Api.User&&!!e.self&&e.id===n.userId)&&h({"@type":"updateChatLeave",id:t.chatId}):n instanceof s.Api.MessageActionChatAddUser&&e._entities&&e._entities.some(e=>e instanceof s.Api.User&&!!e.self&&n.users.includes(e.id))&&h({"@type":"updateChatJoin",id:t.chatId})}}else if(e instanceof s.Api.UpdateEditMessage||e instanceof s.Api.UpdateEditChannelMessage){if(e.message instanceof s.Api.MessageEmpty)return void(d.g&&console.error("Unexpected update:",e.className,e));e.message instanceof s.Api.Message&&Object(c.t)(e.message)&&Object(f.a)(e.message);const t=Object(a.b)(e.message);h({"@type":"updateMessage",id:t.id,chatId:t.chatId,message:t})}else if(e instanceof s.Api.UpdateDeleteMessages)h({"@type":"deleteMessages",ids:e.messages});else if(e instanceof s.Api.UpdateDeleteScheduledMessages)h({"@type":"deleteScheduledMessages",ids:e.messages,chatId:Object(r.j)(e.peer)});else if(e instanceof s.Api.UpdateDeleteChannelMessages){const t=Object(r.k)({channelId:e.channelId}),n=e.messages,s=n.filter(e=>u.a.messages[`${t}-${e}`]),i=n.filter(e=>!u.a.messages[`${t}-${e}`]);s.length&&h({"@type":"deleteMessages",ids:s,chatId:t}),i.length&&setTimeout(()=>{h({"@type":"deleteMessages",ids:i,chatId:t})},1e3)}else if((t instanceof s.Api.messages.SendMessage||t instanceof s.Api.messages.SendMedia||t instanceof s.Api.messages.SendMultiMedia||t instanceof s.Api.messages.ForwardMessages)&&(e instanceof s.Api.UpdateMessageID||e instanceof s.Api.UpdateShortSentMessage)){let n;"randomId"in e?n=e.randomId:"randomId"in t&&(n=t.randomId);const i=n&&u.a.localMessages[n.toString()];if(!i)throw new Error("Local message not found");let r;if(e instanceof s.Api.UpdateShortSentMessage){i.content.text&&e.entities&&(r={text:Object(a.j)(i.content.text.text,e.entities)}),e.media&&(r={...r,...Object(a.i)(e.media)});const t=Object(c.m)(e.id,i.chatId,e);Object(c.t)(t)&&Object(f.a)(t)}m.add(e.id);const o="date"in e&&1e3*e.dateString.fromCharCode(...e))});else if(e instanceof s.Api.UpdateChannelMessageViews)h({"@type":"updateMessage",chatId:Object(r.k)({channelId:e.channelId}),id:e.id,message:{views:e.views}});else if(e instanceof s.Api.UpdateReadHistoryInbox)h({"@type":"updateChatInbox",id:Object(r.k)(e.peer),chat:{lastReadInboxMessageId:e.maxId,unreadCount:e.stillUnreadCount}});else if(e instanceof s.Api.UpdateReadHistoryOutbox)h({"@type":"updateChat",id:Object(r.k)(e.peer),chat:{lastReadOutboxMessageId:e.maxId}});else if(e instanceof s.Api.UpdateReadChannelInbox)h({"@type":"updateChat",id:Object(r.k)({channelId:e.channelId}),chat:{lastReadInboxMessageId:e.maxId,unreadCount:e.stillUnreadCount}});else if(e instanceof s.Api.UpdateReadChannelOutbox)h({"@type":"updateChat",id:Object(r.k)({channelId:e.channelId}),chat:{lastReadOutboxMessageId:e.maxId}});else if(e instanceof s.Api.UpdateDialogPinned&&e.peer instanceof s.Api.DialogPeer)h({"@type":"updateChatPinned",id:Object(r.k)(e.peer.peer),isPinned:e.pinned||!1});else if(e instanceof s.Api.UpdatePinnedDialogs){const t=e.order?e.order.filter(e=>e instanceof s.Api.DialogPeer).map(e=>Object(r.k)(e.peer)):[];h({"@type":"updatePinnedChatIds",ids:t,folderId:e.folderId||void 0})}else if(e instanceof s.Api.UpdateFolderPeers)e.folderPeers.forEach(e=>{const{folderId:t,peer:n}=e;h({"@type":"updateChatListType",id:Object(r.k)(n),folderId:t})});else if(e instanceof s.Api.UpdateDialogFilter){const{id:t,filter:n}=e,s=n?Object(r.a)(n):void 0;h({"@type":"updateChatFolder",id:t,folder:s})}else if(e instanceof s.Api.UpdateDialogFilterOrder)h({"@type":"updateChatFoldersOrder",orderedIds:e.order});else if(e instanceof s.Api.UpdateChatParticipants){const t=Object(r.h)(e.participants);h({"@type":"updateChatMembers",id:Object(r.k)({chatId:e.participants.chatId}),replacedMembers:t})}else if(e instanceof s.Api.UpdateChatParticipantAdd){const t=Object(r.g)(Object(i.b)(e,["userId","inviterId","date"]));h({"@type":"updateChatMembers",id:Object(r.k)({chatId:e.chatId}),addedMember:t})}else if(e instanceof s.Api.UpdateChatParticipantDelete){const{userId:t}=e;h({"@type":"updateChatMembers",id:Object(r.k)({chatId:e.chatId}),deletedMemberId:t})}else if(e instanceof s.Api.UpdatePinnedMessages||e instanceof s.Api.UpdatePinnedChannelMessages){const t=e instanceof s.Api.UpdatePinnedMessages?e.peer:{channelId:e.channelId},n=Object(r.k)(t);h({"@type":"updatePinnedIds",chatId:n,messageIds:e.messages,isPinned:e.pinned})}else if(e instanceof s.Api.UpdateNotifySettings&&e.peer instanceof s.Api.NotifyPeer){const{silent:t,muteUntil:n}=e.notifySettings;h({"@type":"updateChat",id:Object(r.k)(e.peer.peer),chat:{isMuted:t||"number"==typeof n&&Date.now()<1e3*n}})}else if(e instanceof s.Api.UpdateUserTyping||e instanceof s.Api.UpdateChatUserTyping){const t=e instanceof s.Api.UpdateUserTyping?e.userId:Object(r.k)({chatId:e.chatId});h({"@type":"updateChatTypingStatus",id:t,typingStatus:Object(r.i)(e)})}else if(e instanceof s.Api.UpdateChannelUserTyping){const t=Object(r.k)({channelId:e.channelId});h({"@type":"updateChatTypingStatus",id:t,typingStatus:Object(r.i)(e)})}else if(e instanceof s.Api.UpdateChannel){const{_entities:t}=e;if(!t)return;const n=t.find(e=>e instanceof s.Api.Channel||e instanceof s.Api.ChannelForbidden);if(n instanceof s.Api.Channel){const t=Object(r.d)(n);t&&(h({"@type":"updateChat",id:t.id,chat:t}),h({"@type":t.isNotJoined?"updateChatLeave":"updateChatJoin",id:Object(r.k)({channelId:e.channelId})}))}else if(n instanceof s.Api.ChannelForbidden){const t=Object(r.k)({channelId:e.channelId});h({"@type":"updateChat",id:t,chat:{isRestricted:!0}}),h({"@type":"updateChatLeave",id:t})}else 0===t.length&&h({"@type":"resetMessages",id:Object(r.k)({chatId:e.channelId})})}else if(e instanceof s.Api.UpdateDialogUnreadMark&&e.peer instanceof s.Api.DialogPeer)h({"@type":"updateChat",id:Object(r.k)(e.peer.peer),chat:{hasUnreadMark:e.unread}});else if(e instanceof s.Api.UpdateChatDefaultBannedRights)h({"@type":"updateChat",id:Object(r.k)(e.peer),chat:{defaultBannedRights:Object(l.b)(e.defaultBannedRights)}});else if(e instanceof s.Api.UpdateUserStatus){const{userId:t,status:n}=e;h({"@type":"updateUserStatus",userId:t,status:Object(o.c)(n)})}else if(e instanceof s.Api.UpdateUserName){const t=u.a.users[e.userId],n=t&&t.mutualContact&&!t.self?Object(i.b)(e,["username"]):Object(i.b)(e,["firstName","lastName","username"]);h({"@type":"updateUser",id:e.userId,user:n})}else if(e instanceof s.Api.UpdateUserPhoto){const{userId:t,photo:n}=e,s=Object(r.e)(n);u.a.users[t]&&(u.a.users[t].photo=n),h({"@type":"updateUser",id:t,user:{avatarHash:s}})}else if(e instanceof s.Api.UpdateUserPhone){const{userId:t,phone:n}=e;h({"@type":"updateUser",id:t,user:{phoneNumber:n}})}else if(e instanceof s.Api.UpdatePeerSettings){const{_entities:t}=e;if(!t)return;t&&t.length&&(t.filter(e=>e instanceof s.Api.User&&!e.contact).forEach(e=>{h({"@type":"deleteUser",id:e.id})}),t.filter(e=>e instanceof s.Api.User&&e.contact).map(o.a).forEach(e=>{e&&h({"@type":"updateUser",id:e.id,user:e})}))}else if(e instanceof s.Api.UpdateNotifySettings){const{notifySettings:{showPreviews:t,silent:n,muteUntil:s},peer:{className:i}}=e,a="NotifyUsers"===i?"contact":"NotifyChats"===i?"group":"NotifyBroadcasts"===i?"broadcast":void 0;if(!a)return;h({"@type":"updateNotifySettings",peerType:a,isSilent:Boolean(n||"number"==typeof s&&Date.now()<1e3*s),isShowPreviews:Boolean(t)})}else if(e instanceof s.Api.UpdatePeerBlocked)h({"@type":"updatePeerBlocked",id:Object(r.k)(e.peerId),isBlocked:e.blocked});else if(e instanceof s.Api.UpdatePrivacy){const t=Object(p.c)(e.key);t&&h({"@type":"updatePrivacy",key:t,rules:Object(p.d)(e.rules)})}else if(e instanceof s.Api.UpdateContactsReset)h({"@type":"updateResetContactList"});else if(e instanceof s.Api.UpdateFavedStickers)h({"@type":"updateFavoriteStickers"});else if(d.g){const t="object"==typeof e&&"className"in e?e.className:e;console.warn("[GramJs/updater] Unexpected update:",t)}}},function(e,t,n){const{RPCError:s}=n(37),{rpcErrorRe:i}=n(47);e.exports={RPCMessageToError:function(e,t){for(const[n,s]of i){const i=e.errorMessage.match(n);if(i){return new s({request:t,capture:2===i.length?parseInt(i[1]):null})}}return new s(e.errorMessage,t)},...n(22),...n(37),...n(47)}},function(e,t,n){"use strict";function s(e,t,n=!0){let s,i,a;return(...r)=>{i=!0,a=r,s||(n&&(i=!1,e(...a)),s=self.setInterval(()=>{if(!i)return self.clearInterval(s),void(s=void 0);i=!1,e(...a)},t))}}function i(e){return a(r,e)}function a(e,t){let n,s=!1;return(...i)=>{n=i,s||(s=!0,e(()=>{s=!1,t(...n)}))}}function r(e){Promise.resolve().then(e)}n.d(t,"b",(function(){return s})),n.d(t,"c",(function(){return i})),n.d(t,"a",(function(){return o}));const o=e=>new Promise(t=>{setTimeout(()=>t(),e)})},function(e,t,n){(function(t){const s=n(15),{constructors:i}=(n(61),n(18)),{readBigIntFromBuffer:a,readBufferFromBigInt:r,sha256:o,bigIntMod:c,modExp:u,generateRandomBytes:l}=n(8),d=n(36);function f(e,n){if(!t.from([199,28,174,185,198,177,201,4,142,108,82,47,112,241,63,115,152,13,64,35,142,62,33,193,73,52,208,55,86,61,147,15,72,25,138,10,167,193,64,88,34,148,147,210,37,48,244,219,250,51,111,110,10,201,37,19,149,67,174,212,76,206,124,55,32,253,81,246,148,88,112,90,198,140,212,254,107,107,19,171,220,151,70,81,41,105,50,132,84,241,143,175,140,89,95,100,36,119,254,150,187,42,148,29,91,205,29,74,200,204,73,136,7,8,250,155,55,142,60,79,58,144,96,190,230,124,249,164,164,166,149,129,16,81,144,126,22,39,83,181,107,15,107,65,13,186,116,216,168,75,42,20,179,20,78,14,241,40,71,84,253,23,237,149,13,89,101,180,185,221,70,88,45,177,23,141,22,156,107,196,101,176,214,255,156,163,146,143,239,91,154,228,228,24,252,21,232,62,190,160,248,127,169,255,94,237,112,5,13,237,40,73,244,123,249,89,217,86,133,12,233,41,133,31,13,129,21,246,53,177,5,238,46,78,21,208,75,36,84,191,111,79,173,240,52,177,4,3,17,156,216,227,185,47,204,91]).equals(e)||![3,4,5,7].includes(n))throw new Error("Changing passwords unsupported")}function p(e){return t.concat([t.alloc(256-e.length),e])}function h(e){return r(e,256,!1)}function g(e,t){const n=t.subtract(e);return!(n.lesser(s(0))||n.bitLength()<1984||e.bitLength()<1984||Math.floor((e.bitLength()+7)/8)>256)}function m(e,t){const n=Math.min(e.length,t.length);for(let s=0;s{for(;;){const e=l(256),n=a(e,!1),i=u(s(_),n,b);if(g(i,b)){const e=h(i),r=a(await o(t.concat([e,P])),!1);if(r.greater(s(0)))return[n,e,r]}}})(),U=c(w.subtract(M),b);if(!g(U,b))throw new Error("bad gB");const O=R.multiply(v),T=k.add(O),B=u(U,T,b),[D,x,j,N,F]=await Promise.all([o(h(B)),o(A),o(I),o(r.salt1),o(r.salt2)]),V=await o(t.concat([m(x,j),N,F,E,P,D]));return new i.InputCheckPasswordSRP({srpId:e.srpId,A:t.from(E),M1:V})},computeDigest:async function(e,t){try{f(e.p,e.g)}catch(e){throw new Error("bad p/g in password")}return h(u(s(e.g),a(await y(e,t),!1),a(e.p,!1)))}}}).call(this,n(11).Buffer)},function(e,t,n){n(19),n(18).constructors;const s=n(48);e.exports=class extends s{constructor(){super(),this._serverAddress=null,this._dcId=0,this._port=null,this._takeoutId=null,this._entities=new Set,this._updateStates={}}setDC(e,t,n){this._dcId=0|e,this._serverAddress=t,this._port=n}get dcId(){return this._dcId}get serverAddress(){return this._serverAddress}get port(){return this._port}get authKey(){return this._authKey}set authKey(e){this._authKey=e}}},function(e,t,n){(function(t){function s(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const{serializeBytes:i}=n(18),{inflate:a}=n(42);class r{constructor(e){this.data=e,this.CONSTRUCTOR_ID=812830625,this.classType="constructor"}static async gzipIfSmaller(e,t){if(e&&t.length>512){const e=await new r(t).toBytes();if(e.length{const s=new FileReader;s.onload=e=>{const{result:s}=e.target||{};"string"==typeof s&&t(s),n(new Error("Failed to read blob"))},s.onerror=n,s.readAsDataURL(e)})}async function a(e,t){return function(e,t){return new File([e],t,{lastModified:Date.now(),type:e.type})}(await async function(e){return(await fetch(e)).blob()}(e),t)}},function(e,t,n){(function(t){const s=n(45).default,{i2ab:i,ab2i:a}=n(76),{getWords:r}=n(77);class o{constructor(e){this.setBytes(e)}setBytes(e){e=t.from(e),this._counter=e}increment(){for(let e=15;e>=0;e--){if(255!==this._counter[e]){this._counter[e]++;break}this._counter[e]=0}}}class c{constructor(e,t){t instanceof o||(t=new o(t)),this._counter=t,this._remainingCounter=null,this._remainingCounterIndex=16,this._aes=new s(r(e))}update(e){return this.encrypt(e)}encrypt(e){const n=t.from(e);for(let e=0;e=252?6:o>=248?5:o>=240?4:o>=224?3:o>=192?2:1;function c(e,t){if(t<65534&&(e.subarray&&a||!e.subarray&&i))return String.fromCharCode.apply(null,s.shrinkBuf(e,t));for(var n="",r=0;r>>6,t[r++]=128|63&n):n<65536?(t[r++]=224|n>>>12,t[r++]=128|n>>>6&63,t[r++]=128|63&n):(t[r++]=240|n>>>18,t[r++]=128|n>>>12&63,t[r++]=128|n>>>6&63,t[r++]=128|63&n);return t},n.buf2binstring=function(e){return c(e,e.length)},n.binstring2buf=function(e){for(var t=new s.Buf8(e.length),n=0,i=t.length;n4)u[s++]=65533,n+=a-1;else{for(i&=2===a?31:3===a?15:7;a>1&&n1?u[s++]=65533:i<65536?u[s++]=i:(i-=65536,u[s++]=55296|i>>10&1023,u[s++]=56320|1023&i)}return c(u,s)},n.utf8border=function(e,t){var n;for((t=t||e.length)>e.length&&(t=e.length),n=t-1;n>=0&&128==(192&e[n]);)n--;return n<0||0===n?t:n+r[e[n]]>t?n:t}},{"./common":1}],3:[function(e,t,n){"use strict";t.exports=function(e,t,n,s){for(var i=65535&e|0,a=e>>>16&65535|0,r=0;0!==n;){n-=r=n>2e3?2e3:n;do{a=a+(i=i+t[s++]|0)|0}while(--r);i%=65521,a%=65521}return i|a<<16|0}},{}],4:[function(e,t,n){"use strict";t.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],5:[function(e,t,n){"use strict";var s=function(){for(var e,t=[],n=0;n<256;n++){e=n;for(var s=0;s<8;s++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t}();t.exports=function(e,t,n,i){var a=s,r=i+n;e^=-1;for(var o=i;o>>8^a[255&(e^t[o])];return-1^e}},{}],6:[function(e,t,n){"use strict";t.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},{}],7:[function(e,t,n){"use strict";t.exports=function(e,t){var n,s,i,a,r,o,c,u,l,d,f,p,h,g,m,y,b,_,w,v,A,I,P,S,C;n=e.state,s=e.next_in,S=e.input,i=s+(e.avail_in-5),a=e.next_out,C=e.output,r=a-(t-e.avail_out),o=a+(e.avail_out-257),c=n.dmax,u=n.wsize,l=n.whave,d=n.wnext,f=n.window,p=n.hold,h=n.bits,g=n.lencode,m=n.distcode,y=(1<>>=w=_>>>24,h-=w,0==(w=_>>>16&255))C[a++]=65535&_;else{if(!(16&w)){if(0==(64&w)){_=g[(65535&_)+(p&(1<>>=w,h-=w),h<15&&(p+=S[s++]<>>=w=_>>>24,h-=w,!(16&(w=_>>>16&255))){if(0==(64&w)){_=m[(65535&_)+(p&(1<c){e.msg="invalid distance too far back",n.mode=30;break e}if(p>>>=w,h-=w,A>(w=a-r)){if((w=A-w)>l&&n.sane){e.msg="invalid distance too far back",n.mode=30;break e}if(I=0,P=f,0===d){if(I+=u-w,w2;)C[a++]=P[I++],C[a++]=P[I++],C[a++]=P[I++],v-=3;v&&(C[a++]=P[I++],v>1&&(C[a++]=P[I++]))}else{I=a-A;do{C[a++]=C[I++],C[a++]=C[I++],C[a++]=C[I++],v-=3}while(v>2);v&&(C[a++]=C[I++],v>1&&(C[a++]=C[I++]))}break}}break}}while(s>3,p&=(1<<(h-=v<<3))-1,e.next_in=s,e.next_out=a,e.avail_in=s>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function u(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new s.Buf16(320),this.work=new s.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function l(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=1,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new s.Buf32(852),t.distcode=t.distdyn=new s.Buf32(592),t.sane=1,t.back=-1,0):-2}function d(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,l(e)):-2}function f(e,t){var n,s;return e&&e.state?(s=e.state,t<0?(n=0,t=-t):(n=1+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?-2:(null!==s.window&&s.wbits!==t&&(s.window=null),s.wrap=n,s.wbits=t,d(e))):-2}function p(e,t){var n,s;return e?(s=new u,e.state=s,s.window=null,0!==(n=f(e,t))&&(e.state=null),n):-2}var h,g,m=!0;function y(e){if(m){var t;for(h=new s.Buf32(512),g=new s.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(o(1,e.lens,0,288,h,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;o(2,e.lens,0,32,g,0,e.work,{bits:5}),m=!1}e.lencode=h,e.lenbits=9,e.distcode=g,e.distbits=5}function b(e,t,n,i){var a,r=e.state;return null===r.window&&(r.wsize=1<=r.wsize?(s.arraySet(r.window,t,n-r.wsize,r.wsize,0),r.wnext=0,r.whave=r.wsize):((a=r.wsize-r.wnext)>i&&(a=i),s.arraySet(r.window,t,n-i,a,r.wnext),(i-=a)?(s.arraySet(r.window,t,n-i,i,0),r.wnext=i,r.whave=r.wsize):(r.wnext+=a,r.wnext===r.wsize&&(r.wnext=0),r.whave>>8&255,n.check=a(n.check,D,2,0),g=0,m=0,n.mode=2;break}if(n.flags=0,n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&g)<<8)+(g>>8))%31){e.msg="incorrect header check",n.mode=30;break}if(8!=(15&g)){e.msg="unknown compression method",n.mode=30;break}if(m-=4,R=8+(15&(g>>>=4)),0===n.wbits)n.wbits=R;else if(R>n.wbits){e.msg="invalid window size",n.mode=30;break}n.dmax=1<>8&1),512&n.flags&&(D[0]=255&g,D[1]=g>>>8&255,n.check=a(n.check,D,2,0)),g=0,m=0,n.mode=3;case 3:for(;m<32;){if(0===p)break e;p--,g+=u[d++]<>>8&255,D[2]=g>>>16&255,D[3]=g>>>24&255,n.check=a(n.check,D,4,0)),g=0,m=0,n.mode=4;case 4:for(;m<16;){if(0===p)break e;p--,g+=u[d++]<>8),512&n.flags&&(D[0]=255&g,D[1]=g>>>8&255,n.check=a(n.check,D,2,0)),g=0,m=0,n.mode=5;case 5:if(1024&n.flags){for(;m<16;){if(0===p)break e;p--,g+=u[d++]<>>8&255,n.check=a(n.check,D,2,0)),g=0,m=0}else n.head&&(n.head.extra=null);n.mode=6;case 6:if(1024&n.flags&&((v=n.length)>p&&(v=p),v&&(n.head&&(R=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Array(n.head.extra_len)),s.arraySet(n.head.extra,u,d,v,R)),512&n.flags&&(n.check=a(n.check,u,v,d)),p-=v,d+=v,n.length-=v),n.length))break e;n.length=0,n.mode=7;case 7:if(2048&n.flags){if(0===p)break e;v=0;do{R=u[d+v++],n.head&&R&&n.length<65536&&(n.head.name+=String.fromCharCode(R))}while(R&&v>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=12;break;case 10:for(;m<32;){if(0===p)break e;p--,g+=u[d++]<>>=7&m,m-=7&m,n.mode=27;break}for(;m<3;){if(0===p)break e;p--,g+=u[d++]<>>=1)){case 0:n.mode=14;break;case 1:if(y(n),n.mode=20,6===t){g>>>=2,m-=2;break e}break;case 2:n.mode=17;break;case 3:e.msg="invalid block type",n.mode=30}g>>>=2,m-=2;break;case 14:for(g>>>=7&m,m-=7&m;m<32;){if(0===p)break e;p--,g+=u[d++]<>>16^65535)){e.msg="invalid stored block lengths",n.mode=30;break}if(n.length=65535&g,g=0,m=0,n.mode=15,6===t)break e;case 15:n.mode=16;case 16:if(v=n.length){if(v>p&&(v=p),v>h&&(v=h),0===v)break e;s.arraySet(l,u,d,v,f),p-=v,d+=v,h-=v,f+=v,n.length-=v;break}n.mode=12;break;case 17:for(;m<14;){if(0===p)break e;p--,g+=u[d++]<>>=5,m-=5,n.ndist=1+(31&g),g>>>=5,m-=5,n.ncode=4+(15&g),g>>>=4,m-=4,n.nlen>286||n.ndist>30){e.msg="too many length or distance symbols",n.mode=30;break}n.have=0,n.mode=18;case 18:for(;n.have>>=3,m-=3}for(;n.have<19;)n.lens[x[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,O={bits:n.lenbits},U=o(0,n.lens,0,19,n.lencode,0,n.work,O),n.lenbits=O.bits,U){e.msg="invalid code lengths set",n.mode=30;break}n.have=0,n.mode=19;case 19:for(;n.have>>16&255,C=65535&B,!((P=B>>>24)<=m);){if(0===p)break e;p--,g+=u[d++]<>>=P,m-=P,n.lens[n.have++]=C;else{if(16===C){for(T=P+2;m>>=P,m-=P,0===n.have){e.msg="invalid bit length repeat",n.mode=30;break}R=n.lens[n.have-1],v=3+(3&g),g>>>=2,m-=2}else if(17===C){for(T=P+3;m>>=P)),g>>>=3,m-=3}else{for(T=P+7;m>>=P)),g>>>=7,m-=7}if(n.have+v>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=30;break}for(;v--;)n.lens[n.have++]=R}}if(30===n.mode)break;if(0===n.lens[256]){e.msg="invalid code -- missing end-of-block",n.mode=30;break}if(n.lenbits=9,O={bits:n.lenbits},U=o(1,n.lens,0,n.nlen,n.lencode,0,n.work,O),n.lenbits=O.bits,U){e.msg="invalid literal/lengths set",n.mode=30;break}if(n.distbits=6,n.distcode=n.distdyn,O={bits:n.distbits},U=o(2,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,O),n.distbits=O.bits,U){e.msg="invalid distances set",n.mode=30;break}if(n.mode=20,6===t)break e;case 20:n.mode=21;case 21:if(p>=6&&h>=258){e.next_out=f,e.avail_out=h,e.next_in=d,e.avail_in=p,n.hold=g,n.bits=m,r(e,w),f=e.next_out,l=e.output,h=e.avail_out,d=e.next_in,u=e.input,p=e.avail_in,g=n.hold,m=n.bits,12===n.mode&&(n.back=-1);break}for(n.back=0;S=(B=n.lencode[g&(1<>>16&255,C=65535&B,!((P=B>>>24)<=m);){if(0===p)break e;p--,g+=u[d++]<>M)])>>>16&255,C=65535&B,!(M+(P=B>>>24)<=m);){if(0===p)break e;p--,g+=u[d++]<>>=M,m-=M,n.back+=M}if(g>>>=P,m-=P,n.back+=P,n.length=C,0===S){n.mode=26;break}if(32&S){n.back=-1,n.mode=12;break}if(64&S){e.msg="invalid literal/length code",n.mode=30;break}n.extra=15&S,n.mode=22;case 22:if(n.extra){for(T=n.extra;m>>=n.extra,m-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=23;case 23:for(;S=(B=n.distcode[g&(1<>>16&255,C=65535&B,!((P=B>>>24)<=m);){if(0===p)break e;p--,g+=u[d++]<>M)])>>>16&255,C=65535&B,!(M+(P=B>>>24)<=m);){if(0===p)break e;p--,g+=u[d++]<>>=M,m-=M,n.back+=M}if(g>>>=P,m-=P,n.back+=P,64&S){e.msg="invalid distance code",n.mode=30;break}n.offset=C,n.extra=15&S,n.mode=24;case 24:if(n.extra){for(T=n.extra;m>>=n.extra,m-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg="invalid distance too far back",n.mode=30;break}n.mode=25;case 25:if(0===h)break e;if(v=w-h,n.offset>v){if((v=n.offset-v)>n.whave&&n.sane){e.msg="invalid distance too far back",n.mode=30;break}v>n.wnext?(v-=n.wnext,A=n.wsize-v):A=n.wnext-v,v>n.length&&(v=n.length),I=n.window}else I=l,A=f-n.offset,v=n.length;v>h&&(v=h),h-=v,n.length-=v;do{l[f++]=I[A++]}while(--v);0===n.length&&(n.mode=21);break;case 26:if(0===h)break e;l[f++]=n.length,h--,n.mode=21;break;case 27:if(n.wrap){for(;m<32;){if(0===p)break e;p--,g|=u[d++]<=1&&0===D[C];C--);if(M>C&&(M=C),0===C)return u[l++]=20971520,u[l++]=20971520,f.bits=1,0;for(S=1;S0&&(0===e||1!==C))return-1;for(x[1]=0,I=1;I<15;I++)x[I+1]=x[I]+D[I];for(P=0;P852||2===e&&U>592)return 1;for(;;){_=I-E,d[P]b?(w=j[N+d[P]],v=T[B+d[P]]):(w=96,v=0),p=1<>E)+(h-=p)]=_<<24|w<<16|v|0}while(0!==h);for(p=1<>=1;if(0!==p?(O&=p-1,O+=p):O=0,P++,0==--D[I]){if(I===C)break;I=t[n+d[P]]}if(I>M&&(O&m)!==g){for(0===E&&(E=M),y+=S,R=1<<(k=I-E);k+E852||2===e&&U>592)return 1;u[g=O&m]=M<<24|k<<16|y-l|0}}return 0!==O&&(u[y+O]=I-E<<24|64<<16|0),f.bits=M,0}},{"../utils/common":1}],10:[function(e,t,n){"use strict";t.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],11:[function(e,t,n){"use strict";t.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],"/lib/inflate.js":[function(e,t,n){"use strict";var s=e("./zlib/inflate"),i=e("./utils/common"),a=e("./utils/strings"),r=e("./zlib/constants"),o=e("./zlib/messages"),c=e("./zlib/zstream"),u=e("./zlib/gzheader"),l=Object.prototype.toString;function d(e){if(!(this instanceof d))return new d(e);this.options=i.assign({chunkSize:16384,windowBits:0,to:""},e||{});var t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(t.windowBits>=0&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&0==(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new c,this.strm.avail_out=0;var n=s.inflateInit2(this.strm,t.windowBits);if(n!==r.Z_OK)throw new Error(o[n]);if(this.header=new u,s.inflateGetHeader(this.strm,this.header),t.dictionary&&("string"==typeof t.dictionary?t.dictionary=a.string2buf(t.dictionary):"[object ArrayBuffer]"===l.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(n=s.inflateSetDictionary(this.strm,t.dictionary))!==r.Z_OK))throw new Error(o[n])}function f(e,t){var n=new d(t);if(n.push(e,!0),n.err)throw n.msg||o[n.err];return n.result}d.prototype.push=function(e,t){var n,o,c,u,d,f=this.strm,p=this.options.chunkSize,h=this.options.dictionary,g=!1;if(this.ended)return!1;o=t===~~t?t:!0===t?r.Z_FINISH:r.Z_NO_FLUSH,"string"==typeof e?f.input=a.binstring2buf(e):"[object ArrayBuffer]"===l.call(e)?f.input=new Uint8Array(e):f.input=e,f.next_in=0,f.avail_in=f.input.length;do{if(0===f.avail_out&&(f.output=new i.Buf8(p),f.next_out=0,f.avail_out=p),(n=s.inflate(f,r.Z_NO_FLUSH))===r.Z_NEED_DICT&&h&&(n=s.inflateSetDictionary(this.strm,h)),n===r.Z_BUF_ERROR&&!0===g&&(n=r.Z_OK,g=!1),n!==r.Z_STREAM_END&&n!==r.Z_OK)return this.onEnd(n),this.ended=!0,!1;f.next_out&&(0!==f.avail_out&&n!==r.Z_STREAM_END&&(0!==f.avail_in||o!==r.Z_FINISH&&o!==r.Z_SYNC_FLUSH)||("string"===this.options.to?(c=a.utf8border(f.output,f.next_out),u=f.next_out-c,d=a.buf2string(f.output,c),f.next_out=u,f.avail_out=p-u,u&&i.arraySet(f.output,f.output,c,u,0),this.onData(d)):this.onData(i.shrinkBuf(f.output,f.next_out)))),0===f.avail_in&&0===f.avail_out&&(g=!0)}while((f.avail_in>0||0===f.avail_out)&&n!==r.Z_STREAM_END);return n===r.Z_STREAM_END&&(o=r.Z_FINISH),o===r.Z_FINISH?(n=s.inflateEnd(this.strm),this.onEnd(n),this.ended=!0,n===r.Z_OK):o!==r.Z_SYNC_FLUSH||(this.onEnd(r.Z_OK),f.avail_out=0,!0)},d.prototype.onData=function(e){this.chunks.push(e)},d.prototype.onEnd=function(e){e===r.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},n.Inflate=d,n.inflate=f,n.inflateRaw=function(e,t){return(t=t||{}).raw=!0,f(e,t)},n.ungzip=f},{"./utils/common":1,"./utils/strings":2,"./zlib/constants":4,"./zlib/gzheader":6,"./zlib/inflate":8,"./zlib/messages":10,"./zlib/zstream":11}]},{},[])("/lib/inflate.js")},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){(function(t){const n=e=>e.replace(/(?:^|_)([a-z])/g,(e,t)=>t.toUpperCase()).replace(/_/g,""),s=e=>e.replace(/([-_][a-z])/g,e=>e.toUpperCase().replace("-","").replace("_","")),i=new Set([3162085175,2574415285,1072550713,3300522427,1450380236]),a=new Set([85337187,2211011308,2851430293,1013613780,1459478408,3504867164,3045658042,1715713620,3608339646,4110704415,812830625]);let r=null;function o(e){r||(r=function(){let e;const t=[];for(let n=0;n<256;n++){e=n;for(let t=0;t<8;t++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t}()),t.isBuffer(e)||(e=t.from(e));let n=-1;for(let t=0;t>>8}return(-1^n)>>>0}const c=(e,i)=>{const a=e.match(/([\w.]+)(?:#([0-9a-fA-F]+))?(?:\s{?\w+:[\w\d<>#.?!]+}?)*\s=\s([\w\d<>#.?]+);$/);if(!a)throw new Error("Cannot parse TLObject "+e);const r=l(/({)?(\w+):([\w\d<>#.?!]+)}?/,e),c={name:a[1],constructorId:parseInt(a[2],16),argsConfig:{},subclassOfId:o(a[3]),result:a[3],isFunction:i,namespace:null};if(!c.constructorId){let e,n="";e=Object.values(c.argsConfig).length?" "+Object.keys(c.argsConfig).map(e=>e.toString()).join(" "):"";const s=`${c.name}${n}${e} = ${c.result}`.replace(/(:|\?)bytes /g,"$1string ").replace(/|{|}/g,"").replace(/ \w+:flags\.\d+\?true/g,"");"inputMediaInvoice"===c.name&&c.name,c.constructorId=o(t.from(s,"utf8"))}for(const[e,t,n]of r)void 0===e&&(c.argsConfig[s(t)]=u(t,n));return c.name.includes(".")&&([c.namespace,c.name]=c.name.split(/\.(.+)/)),c.name=n(c.name),c};function u(e,t){const n={isVector:!1,isFlag:!1,skipConstructorId:!1,flagIndex:-1,flagIndicator:!0,type:null,useVectorId:null};e="self"===e?"is_self":e;if("#"!==t){n.flagIndicator=!1,n.type=t.replace(/^!+/,"");const e=n.type.match(/flags.(\d+)\?([\w<>.]+)/);e&&(n.isFlag=!0,n.flagIndex=Number(e[1]),[,,n.type]=e);const s=n.type.match(/[Vv]ector<([\w\d.]+)>/);s&&(n.isVector=!0,n.useVectorId="V"===n.type.charAt(0),[,n.type]=s),/^[a-z]$/.test(n.type.split(".").pop().charAt(0))&&(n.skipConstructorId=!0)}return n}const l=(e,t,n=[])=>{e.flags.includes("g")||(e=new RegExp(e.source,"g"));const s=e.exec(t);return s&&(n.push(s.slice(1)),l(e,t,n)),n};e.exports={findAll:l,parseTl:function*(e,t,n=[],s=i){(n||[]).reduce((e,t)=>({...e,[t.name]:t}),{});const r=[],o={},u={},l=e;let d=!1;for(let e of l.split("\n")){const t=e.indexOf("//");if(-1!==t&&(e=e.slice(0,t)),e=e.trim(),!e)continue;const n=e.match(/---(\w+)---/);if(n){const[,e]=n;d="functions"===e}else try{const t=c(e,d);if(s.has(t.constructorId))continue;r.push(t),t.isFunction||(u[t.result]||(u[t.result]=[]),o[t.name]=t,u[t.result].push(t))}catch(e){if(!e.toString().includes("vector#1cb5c415"))throw e}}for(const e of r)if(a.has(e.constructorId))for(const t in e.argsConfig)"string"===e.argsConfig[t].type&&(e.argsConfig[t].type="bytes");for(const e of r)yield e},buildArgConfig:u,fromLine:c,CORE_TYPES:i,serializeDate:function(e){if(!e)return t.alloc(4).fill(0);if(e instanceof Date&&(e=Math.floor((Date.now()-e.getTime())/1e3)),"number"==typeof e){const n=t.alloc(4);return n.writeInt32LE(e,0),n}throw Error(`Cannot interpret "${e}" as a date`)},serializeBytes:function(e){if(!(e instanceof t)){if("string"!=typeof e)throw Error("Bytes or str expected, not "+e.constructor.name);e=t.from(e)}const n=[];let s;return e.length<254?(s=(e.length+1)%4,0!==s&&(s=4-s),n.push(t.from([e.length])),n.push(e)):(s=e.length%4,0!==s&&(s=4-s),n.push(t.from([254,e.length%256,(e.length>>8)%256,(e.length>>16)%256])),n.push(e)),n.push(t.alloc(s).fill(0)),t.concat(n)},snakeToCamelCase:n,variableSnakeToCamelCase:s}}).call(this,n(11).Buffer)},function(e,t,n){"use strict";n.r(t),n.d(t,"CTR",(function(){return y})),n.d(t,"IGE",(function(){return m}));var s=new Uint8Array(256),i=new Uint8Array(256),a=new Uint32Array(256),r=new Uint32Array(256),o=new Uint32Array(256),c=new Uint32Array(256),u=new Uint32Array(256),l=new Uint32Array(256),d=new Uint32Array(256),f=new Uint32Array(256);function p(e){if(e instanceof Uint32Array)return e;if("string"==typeof e){if(e.length%4!=0)for(var t=e.length%4;t<=4;t++)e+="\0x00";var n=new Uint32Array(e.length/4);for(t=0;t>7),m[g[_]^_]=_;for(;!s[y];y^=e||1)n=(n=b^b<<1^b<<2^b<<3^b<<4)>>8^255&n^99,s[y]=n,i[n]=y,h=16843009*g[t=g[e=g[y]]]^65537*t^257*e^16843008*y,p=257*g[n]^16843008*n,a[y]=p=p<<24^p>>>8,r[y]=p=p<<24^p>>>8,o[y]=p=p<<24^p>>>8,c[y]=p=p<<24^p>>>8,u[n]=h=h<<24^h>>>8,l[n]=h=h<<24^h>>>8,d[n]=h=h<<24^h>>>8,f[n]=h=h<<24^h>>>8,b=m[b]||1}();var g=function(){function e(e){var t=p(e);if(4!==t.length&&6!==t.length&&8!==t.length)throw new Error("Invalid key size");this.encKey=new Uint32Array(4*t.length+28),this.decKey=new Uint32Array(4*t.length+28),this.encKey.set(t);for(var n,i=1,a=t.length;a<4*t.length+28;a++)n=this.encKey[a-1],(a%t.length==0||8===t.length&&a%t.length==4)&&(n=s[n>>>24]<<24^s[n>>16&255]<<16^s[n>>8&255]<<8^s[255&n],a%t.length==0&&(n=n<<8^n>>>24^i<<24,i=i<<1^283*(i>>7))),this.encKey[a]=this.encKey[a-t.length]^n;for(var r=0;a;r++,a--)n=this.encKey[3&r?a:a-4],this.decKey[r]=a<=4||r<4?n:u[s[n>>>24]]^l[s[n>>16&255]]^d[s[n>>8&255]]^f[s[255&n]]}return e.prototype.encrypt=function(e){for(var t,n,i,u=p(e),l=new Uint32Array(4),d=u[0]^this.encKey[0],f=u[1]^this.encKey[1],h=u[2]^this.encKey[2],g=u[3]^this.encKey[3],m=this.encKey.length/4-2,y=4,b=0;b>>24]^r[f>>16&255]^o[h>>8&255]^c[255&g]^this.encKey[y],n=a[f>>>24]^r[h>>16&255]^o[g>>8&255]^c[255&d]^this.encKey[y+1],i=a[h>>>24]^r[g>>16&255]^o[d>>8&255]^c[255&f]^this.encKey[y+2],g=a[g>>>24]^r[d>>16&255]^o[f>>8&255]^c[255&h]^this.encKey[y+3],d=t,f=n,h=i,y+=4;for(b=0;b<4;b++)l[b]=s[d>>>24]<<24^s[f>>16&255]<<16^s[h>>8&255]<<8^s[255&g]^this.encKey[y++],t=d,d=f,f=h,h=g,g=t;return l},e.prototype.decrypt=function(e){for(var t,n,s,a=p(e),r=new Uint32Array(4),o=a[0]^this.decKey[0],c=a[3]^this.decKey[1],h=a[2]^this.decKey[2],g=a[1]^this.decKey[3],m=this.decKey.length/4-2,y=4,b=0;b>>24]^l[c>>16&255]^d[h>>8&255]^f[255&g]^this.decKey[y],n=u[c>>>24]^l[h>>16&255]^d[g>>8&255]^f[255&o]^this.decKey[y+1],s=u[h>>>24]^l[g>>16&255]^d[o>>8&255]^f[255&c]^this.decKey[y+2],g=u[g>>>24]^l[o>>16&255]^d[c>>8&255]^f[255&h]^this.decKey[y+3],o=t,c=n,h=s,y+=4;for(b=0;b<4;b++)r[3&-b]=i[o>>>24]<<24^i[c>>16&255]<<16^i[h>>8&255]<<8^i[255&g]^this.decKey[y++],t=o,o=c,c=h,h=g,g=t;return r},e}(),m=function(){function e(e,t,n){void 0===n&&(n=16),this.key=p(e),this.iv=p(t),this.cipher=new g(e),this.blockSize=n/4}return e.prototype.encrypt=function(e,t){for(var n=p(e),s=t||new Uint32Array(n.length),i=this.iv.subarray(this.blockSize,this.iv.length),a=this.iv.subarray(0,this.blockSize),r=new Uint32Array(this.blockSize),o=0;o=this.blockSize&&this.incrementCounter(),i&&(a-=i,i=0)}return this.offset=(this.offset+n.length%4)%4,s},e.prototype.decrypt=function(e,t){return this.encrypt(e,t)},e.prototype.incrementCounter=function(){for(var e=this.counter.length-1;e>=0&&!(++this.counter[e]<4294967295);e--);},e}();t.default=g},function(e,t,n){(function(t){let n=null;class s{constructor(e){n||(n=e||"debug"),this.isBrowser=void 0===t||"renderer"===t.type||!0===t.browser||t.__nwjs,this.isBrowser?this.colors={start:"%c",warn:"color : #ff00ff",info:"color : #ffff00",debug:"color : #00ffff",error:"color : #ff0000",end:""}:this.colors={start:"",warn:"",info:"",debug:"",error:"",end:""},this.messageFormat="[%t] [%l] - [%m]"}canSend(e){return s.levels.indexOf(n)>=s.levels.indexOf(e)}warn(e){this._log("warn",e,this.colors.warn)}info(e){this._log("info",e,this.colors.info)}debug(e){this._log("debug",e,this.colors.debug)}error(e){this._log("error",e,this.colors.error)}format(e,t){return this.messageFormat.replace("%t",(new Date).toISOString()).replace("%l",t.toUpperCase()).replace("%m",e)}static setLevel(e){n=e}_log(e,t,s){n&&this.canSend(e)&&(this.isBrowser?console.log(this.colors.start+this.format(t,e),s):console.log(s+this.format(t,e)+this.colors.end))}}var i,a,r;r=["error","warn","info","debug"],(a="levels")in(i=s)?Object.defineProperty(i,a,{value:r,enumerable:!0,configurable:!0,writable:!0}):i[a]=r,e.exports=s}).call(this,n(82))},function(e,t,n){const{RPCError:s,InvalidDCError:i,FloodError:a,BadRequestError:r}=n(37);class o extends i{constructor(e){const t=Number(e.capture||0);super("The user whose identity is being used to execute queries is associated with DC "+t+s._fmtRequest(e.request)),this.message="The user whose identity is being used to execute queries is associated with DC "+t+s._fmtRequest(e.request),this.newDc=t}}class c extends i{constructor(e){const t=Number(e.capture||0);super("The phone number a user is trying to use for authorization is associated with DC "+t+s._fmtRequest(e.request)),this.message="The phone number a user is trying to use for authorization is associated with DC "+t+s._fmtRequest(e.request),this.newDc=t}}class u extends a{constructor(e){const t=Number(e.capture||0);super(`A wait of ${t} seconds is required before sending another message in this chat`+s._fmtRequest(e.request)),this.message=`A wait of ${t} seconds is required before sending another message in this chat`+s._fmtRequest(e.request),this.seconds=t}}class l extends a{constructor(e){const t=Number(e.capture||0);super(`A wait of ${t} seconds is required`+s._fmtRequest(e.request)),this.message=`A wait of ${t} seconds is required`+s._fmtRequest(e.request),this.seconds=t}}class d extends a{constructor(e){const t=Number(e.capture||0);super(`A wait of ${t} seconds is required in the test servers`+s._fmtRequest(e.request)),this.message=`A wait of ${t} seconds is required in the test servers`+s._fmtRequest(e.request),this.seconds=t}}class f extends i{constructor(e){const t=Number(e.capture||0);super("The file to be accessed is currently stored in DC "+t+s._fmtRequest(e.request)),this.message="The file to be accessed is currently stored in DC "+t+s._fmtRequest(e.request),this.newDc=t}}class p extends i{constructor(e){const t=Number(e.capture||0);super("The source IP address is associated with DC "+t+s._fmtRequest(e.request)),this.message="The source IP address is associated with DC "+t+s._fmtRequest(e.request),this.newDc=t}}class h extends r{constructor(e){const t=Number(e.capture||0);super("Email unconfirmed, the length of the code must be "+t+s._fmtRequest(e.request)),this.message="Email unconfirmed, the length of the code must be "+t+s._fmtRequest(e.request),this.codeLength=t}}const g=[[/FILE_MIGRATE_(\d+)/,f],[/FLOOD_TEST_PHONE_WAIT_(\d+)/,d],[/FLOOD_WAIT_(\d+)/,l],[/PHONE_MIGRATE_(\d+)/,c],[/SLOWMODE_WAIT_(\d+)/,u],[/USER_MIGRATE_(\d+)/,o],[/NETWORK_MIGRATE_(\d+)/,p],[/EMAIL_UNCONFIRMED_(\d+)/,h]];e.exports={rpcErrorRe:g,FileMigrateError:f,FloodTestPhoneWaitError:d,FloodWaitError:l,PhoneMigrateError:c,SlowModeWaitError:u,UserMigrateError:o,NetworkMigrateError:p,EmailUnconfirmedError:h}},function(e,t){e.exports=class{constructor(){}setDC(e,t,n){throw new Error("Not implemented")}get dcId(){throw new Error("Not Implemented")}get serverAddress(){throw new Error("Not Implemented")}get port(){throw new Error("Not Implemented")}get authKey(){throw new Error("Not Implemented")}set authKey(e){throw new Error("Not Implemented")}save(){throw new Error("Not Implemented")}delete(){throw new Error("Not Implemented")}}},function(e,t,n){(function(t){e.exports=class{constructor(e){this._stream=e}write(e){this._stream=t.concat([this._stream,e])}getValue(){return this._stream}}}).call(this,n(11).Buffer)},function(e,t,n){const s=n(38),i=n(51),a=n(39),r=n(31),o={[i.CONSTRUCTOR_ID]:i,[r.CONSTRUCTOR_ID]:r,[a.CONSTRUCTOR_ID]:a};e.exports={TLMessage:s,RPCResult:i,MessageContainer:a,GZIPPacked:r,coreObjects:o}},function(e,t,n){function s(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const{RpcError:i}=n(18).constructors,a=n(31);class r{constructor(e,t,n){this.CONSTRUCTOR_ID=4082920705,this.reqMsgId=e,this.body=t,this.error=n,this.classType="constructor"}static async fromReader(e){const t=e.readLong(),n=e.readInt(!1);return n===i.CONSTRUCTOR_ID?new r(t,null,i.fromReader(e)):n===a.CONSTRUCTOR_ID?new r(t,(await a.fromReader(e)).data):(e.seek(-4),new r(t,e.read(),null))}}s(r,"CONSTRUCTOR_ID",4082920705),s(r,"classType","constructor"),e.exports=r},function(e,t,n){const s=n(6),i={};for(const e of Object.values(s))if(e.CONSTRUCTOR_ID)i[e.CONSTRUCTOR_ID]=e;else for(const t of Object.values(e))i[t.CONSTRUCTOR_ID]=t;e.exports={LAYER:121,tlobjects:i}},function(e,t,n){(function(t){const s=new(0,n(83).Mutex),i=n(85).w3cwebsocket,a=new Error("WebSocket was closed");e.exports=class{constructor(){this.client=null,this.closed=!0}async readExactly(e){let n=t.alloc(0);for(;;){const s=await this.read(e);if(n=t.concat([n,s]),!(e-=s.length))return n}}async read(e){if(this.closed)throw a;if(await this.canRead,this.closed)throw a;const t=this.stream.slice(0,e);return this.stream=this.stream.slice(e),0===this.stream.length&&(this.canRead=new Promise(e=>{this.resolveRead=e})),t}async readAll(){if(this.closed||!await this.canRead)throw a;const e=this.stream;return this.stream=t.alloc(0),this.canRead=new Promise(e=>{this.resolveRead=e}),e}getWebSocketLink(e,t){return 443===t?`wss://${e}:${t}/apiws`:`ws://${e}:${t}/apiws`}async connect(e,n){return this.stream=t.alloc(0),this.canRead=new Promise(e=>{this.resolveRead=e}),this.closed=!1,this.website=this.getWebSocketLink(n,e),this.client=new i(this.website,"binary"),new Promise((e,t)=>{this.client.onopen=()=>{this.receive(),e(this)},this.client.onerror=e=>{t(e)},this.client.onclose=()=>{this.resolveRead(!1),this.closed=!0},self.addEventListener("offline",async()=>{await this.close(),this.resolveRead(!1)})})}write(e){if(this.closed)throw a;this.client.send(e)}async close(){await this.client.close(),this.closed=!0}async receive(){this.client.onmessage=async e=>{const n=await s.acquire();try{const s=e.data instanceof ArrayBuffer?t.from(e.data):t.from(await new Response(e.data).arrayBuffer());this.stream=t.concat([this.stream,s]),this.resolveRead(!0)}finally{n()}}}}}).call(this,n(11).Buffer)},function(e,t,n){(function(t){const s=n(39),i=n(38),a=n(49);e.exports=class{constructor(e,t){this._state=e,this._queue=[],this._pendingStates=[],this._ready=new Promise(e=>{this.setReady=e}),this._log=t}values(){return this._queue}append(e){this._queue.push(e),this.setReady(!0),e&&(this._pendingStates.push(e),e.promise.catch(()=>{}).finally(()=>{this._pendingStates=this._pendingStates.filter(t=>t!==e)}))}extend(e){for(const t of e)this._queue.push(t);this.setReady(!0)}async get(){if(this._queue.length||(this._ready=new Promise(e=>{this.setReady=e}),await this._ready),!this._queue[this._queue.length-1])return void(this._queue=[]);let e,n=new a(t.alloc(0));const r=[];let o=0;for(;this._queue.length&&r.length<=s.MAXIMUM_LENGTH;){const e=this._queue.shift();if(o+=e.data.length+i.SIZE_OVERHEAD,o<=s.MAXIMUM_SIZE){let t;e.after&&(t=e.after.msgId),e.msgId=await this._state.writeDataAsMessage(n,e.data,"request"===e.request.classType,t),this._log.debug(`Assigned msgId = ${e.msgId} to ${e.request.className||e.request.constructor.name}`),r.push(e)}else{if(r.length){this._queue.unshift(e);break}this._log.warn(`Message payload for ${e.request.className||e.request.constructor.name} is too long ${e.data.length} and cannot be sent`),e.reject("Request Payload is too big"),o=0}}if(!r.length)return null;if(r.length>1){const i=t.alloc(8);i.writeUInt32LE(s.CONSTRUCTOR_ID,0),i.writeInt32LE(r.length,4),e=t.concat([i,n.getValue()]),n=new a(t.alloc(0));const o=await this._state.writeDataAsMessage(n,e,!1);for(const e of r)e.containerId=o}return e=n.getValue(),{batch:r,data:e}}rejectAll(){this._pendingStates.forEach(e=>{e.reject(new Error("Disconnect"))})}}}).call(this,n(11).Buffer)},function(e,t){e.exports=class{constructor(){this._queue=[],this.canGet=new Promise(e=>{this.resolveGet=e}),this.canPush=!0}async push(e){await this.canPush,this._queue.push(e),this.resolveGet(!0),this.canPush=new Promise(e=>{this.resolvePush=e})}async pop(){await this.canGet;const e=this._queue.pop();return this.resolvePush(!0),this.canGet=new Promise(e=>{this.resolveGet=e}),e}}},function(e,t,n){const s=n(57),i=n(58),a=n(8),r=n(32),o=n(60),c=n(51),u=n(39),l=n(31),d=n(90),{MsgsAck:f,upload:p,MsgsStateInfo:h,Pong:g}=n(18).constructors,m=n(54),y=n(25),{UpdateConnectionState:b}=n(40),{BadMessageError:_}=n(22),{BadServerSalt:w,BadMsgNotification:v,MsgDetailedInfo:A,MsgNewDetailedInfo:I,NewSessionCreated:P,FutureSalts:S,MsgsStateReq:C,MsgResendReq:M,MsgsAllInfo:k}=n(18).constructors,{SecurityError:E}=n(22),{InvalidBufferError:R}=n(22),{LogOut:U}=n(18).requests.auth,{RPCMessageToError:O}=n(27),{TypeNotFoundError:T}=n(22);class B{constructor(e,t){const n={...B.DEFAULT_OPTIONS,...t};this._connection=null,this._log=n.logger,this._dcId=n.dcId,this._retries=n.retries,this._delay=n.delay,this._autoReconnect=n.autoReconnect,this._connectTimeout=n.connectTimeout,this._authKeyCallback=n.authKeyCallback,this._updateCallback=n.updateCallback,this._autoReconnectCallback=n.autoReconnectCallback,this._isMainSender=n.isMainSender,this._onConnectionBreak=n.onConnectionBreak,this._user_connected=!1,this._reconnecting=!1,this._disconnected=!0,this._send_loop_handle=null,this._recv_loop_handle=null,this.authKey=e||new r,this._state=new i(this.authKey,this._log),this._send_queue=new m(this._state,this._log),this._pending_state={},this._pending_ack=new Set,this._last_acks=[],this._handlers={[c.CONSTRUCTOR_ID]:this._handleRPCResult.bind(this),[u.CONSTRUCTOR_ID]:this._handleContainer.bind(this),[l.CONSTRUCTOR_ID]:this._handleGzipPacked.bind(this),[g.CONSTRUCTOR_ID]:this._handlePong.bind(this),[w.CONSTRUCTOR_ID]:this._handleBadServerSalt.bind(this),[v.CONSTRUCTOR_ID]:this._handleBadNotification.bind(this),[A.CONSTRUCTOR_ID]:this._handleDetailedInfo.bind(this),[I.CONSTRUCTOR_ID]:this._handleNewDetailedInfo.bind(this),[P.CONSTRUCTOR_ID]:this._handleNewSessionCreated.bind(this),[f.CONSTRUCTOR_ID]:this._handleAck.bind(this),[S.CONSTRUCTOR_ID]:this._handleFutureSalts.bind(this),[C.CONSTRUCTOR_ID]:this._handleStateForgotten.bind(this),[M.CONSTRUCTOR_ID]:this._handleStateForgotten.bind(this),[k.CONSTRUCTOR_ID]:this._handleMsgAll.bind(this)}}async connect(e,t){if(this._user_connected&&!t)return this._log.info("User is already connected!"),!1;this._connection=e;for(let e=0;e>2;if(n<127){const e=t.alloc(1);e.writeUInt8(n,0),n=e}else n=t.concat([t.from("7f","hex"),i(o(n),3)]);return t.concat([n,e])}async readPacket(e){let n=(await e.read(1))[0];return n>=127&&(n=t.concat([await e.read(3),t.alloc(1)]).readInt32LE(0)),await e.read(n<<2)}}s(c,"tag",t.from("ef","hex")),s(c,"obfuscateTag",t.from("efefefef","hex"));e.exports={ConnectionTCPAbridged:class extends a{constructor(...e){super(...e),s(this,"PacketCodecClass",c)}},AbridgedPacketCodec:c}}).call(this,n(11).Buffer)},function(e,t,n){(function(t){function s(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const{generateRandomBytes:i}=n(8),{ObfuscatedConnection:a}=n(41),{AbridgedPacketCodec:r}=n(62),o=n(93);class c{constructor(e){s(this,"header",null),this.connection=e.socket;const t=this.initHeader(e.PacketCodecClass);this.header=t.random,this._encrypt=t.encryptor,this._decrypt=t.decryptor}initHeader(e){const n=[t.from("50567247","hex"),t.from("474554","hex"),t.from("504f5354","hex"),t.from("eeeeeeee","hex")];let s;for(;;)if(s=i(64),239!==s[0]&&!s.slice(4,8).equals(t.alloc(4))){let e=!0;for(const t of n)if(t.equals(s.slice(0,4))){e=!1;break}if(e)break}s=s.toJSON().data;const a=t.from(s.slice(8,56)).reverse(),r=t.from(s.slice(8,40)),c=t.from(s.slice(40,56)),u=t.from(a.slice(0,32)),l=t.from(a.slice(32,48)),d=new o(r,c),f=new o(u,l);return s=t.concat([t.from(s.slice(0,56)),e.obfuscateTag,t.from(s.slice(60))]),s=t.concat([t.from(s.slice(0,56)),t.from(d.encrypt(s).slice(56,64)),t.from(s.slice(64))]),{random:s,encryptor:d,decryptor:f}}async read(e){const t=await this.connection.readExactly(e);return this._decrypt.encrypt(t)}write(e){this.connection.write(this._encrypt.encrypt(e))}}e.exports={ConnectionTCPObfuscated:class extends a{constructor(...e){super(...e),s(this,"ObfuscatedIO",c),s(this,"PacketCodecClass",r)}}}}).call(this,n(11).Buffer)},function(e,t,n){(function(t){const s=n(30),i=n(32),a=n(19);e.exports=class extends s{constructor(e){super(),this._storageKey=e,this._authKeys={}}async load(){if(this._storageKey)try{const e=await this._fetchFromCache(this._storageKey),{mainDcId:n,keys:s,hashes:r}=JSON.parse(e),{ipAddress:o,port:c}=a.getDC(n);this.setDC(n,o,c,!0),Object.keys(s).forEach(e=>{s[e]&&r[e]&&(this._authKeys[e]=new i(t.from(s[e].data),t.from(r[e].data)))})}catch(e){throw new Error("Failed to retrieve or parse JSON from Cache for key "+this._storageKey)}}setDC(e,t,n,s=!1){this._dcId=e,this._serverAddress=t,this._port=n,delete this._authKeys[e],s||this._updateStorage()}async save(){return this._storageKey||(this._storageKey="GramJs-session-"+Date.now()),await this._updateStorage(),this._storageKey}get authKey(){throw new Error("Not supported")}set authKey(e){throw new Error("Not supported")}getAuthKey(e=this._dcId){return this._authKeys[e]}setAuthKey(e,t=this._dcId){this._authKeys[t]=e,this._updateStorage()}async _updateStorage(){if(!this._storageKey)return;const e={mainDcId:this._dcId,keys:{},hashes:{}};Object.keys(this._authKeys).map(t=>{const n=this._authKeys[t];e.keys[t]=n._key,e.hashes[t]=n._hash}),await this._saveToCache(this._storageKey,JSON.stringify(e))}async delete(){const e=new Request(this._storageKey),t=await self.caches.open("GramJs");await t.delete(e)}async _fetchFromCache(e){throw new Error("Not Implemented")}async _saveToCache(e,t){throw new Error("Not Implemented")}}}).call(this,n(11).Buffer)},function(e,t){},function(e,t){},function(e,t,n){"use strict";let s;n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return i})),n.d(t,"c",(function(){return a})),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"}(s||(s={}));const i=-1,a="MESSAGE_DELETED"},function(e,t){},function(e,t,n){"use strict";let s;n.d(t,"a",(function(){return s})),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"}(s||(s={}))},function(e,t){},function(e,t){},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return r}));var s=n(1),i=n(0),a=n(2);async function r({chatId:t,accessHash:n,messageId:r,data:o}){const c=await Object(s.e)(new i.Api.messages.GetBotCallbackAnswer({peer:Object(a.i)(t,n),msgId:r,data:e.from(o)}));if(c)return c}}).call(this,n(11).Buffer)},function(e,t,n){"use strict";t.byteLength=function(e){var t=u(e),n=t[0],s=t[1];return 3*(n+s)/4-s},t.toByteArray=function(e){var t,n,s=u(e),r=s[0],o=s[1],c=new a(function(e,t,n){return 3*(t+n)/4-n}(0,r,o)),l=0,d=o>0?r-4:r;for(n=0;n>16&255,c[l++]=t>>8&255,c[l++]=255&t;2===o&&(t=i[e.charCodeAt(n)]<<2|i[e.charCodeAt(n+1)]>>4,c[l++]=255&t);1===o&&(t=i[e.charCodeAt(n)]<<10|i[e.charCodeAt(n+1)]<<4|i[e.charCodeAt(n+2)]>>2,c[l++]=t>>8&255,c[l++]=255&t);return c},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,a=[],r=0,o=n-i;ro?o:r+16383));1===i?(t=e[n-1],a.push(s[t>>2]+s[t<<4&63]+"==")):2===i&&(t=(e[n-2]<<8)+e[n-1],a.push(s[t>>10]+s[t>>4&63]+s[t<<2&63]+"="));return a.join("")};for(var s=[],i=[],a="undefined"!=typeof Uint8Array?Uint8Array:Array,r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0,c=r.length;o0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function l(e,t,n){for(var i,a,r=[],o=t;o>18&63]+s[a>>12&63]+s[a>>6&63]+s[63&a]);return r.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},function(e,t){t.read=function(e,t,n,s,i){var a,r,o=8*i-s-1,c=(1<>1,l=-7,d=n?i-1:0,f=n?-1:1,p=e[t+d];for(d+=f,a=p&(1<<-l)-1,p>>=-l,l+=o;l>0;a=256*a+e[t+d],d+=f,l-=8);for(r=a&(1<<-l)-1,a>>=-l,l+=s;l>0;r=256*r+e[t+d],d+=f,l-=8);if(0===a)a=1-u;else{if(a===c)return r?NaN:1/0*(p?-1:1);r+=Math.pow(2,s),a-=u}return(p?-1:1)*r*Math.pow(2,a-s)},t.write=function(e,t,n,s,i,a){var r,o,c,u=8*a-i-1,l=(1<>1,f=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=s?0:a-1,h=s?1:-1,g=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(o=isNaN(t)?1:0,r=l):(r=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-r))<1&&(r--,c*=2),(t+=r+d>=1?f/c:f*Math.pow(2,1-d))*c>=2&&(r++,c/=2),r+d>=l?(o=0,r=l):r+d>=1?(o=(t*c-1)*Math.pow(2,i),r+=d):(o=t*Math.pow(2,d-1)*Math.pow(2,i),r=0));i>=8;e[n+p]=255&o,p+=h,o/=256,i-=8);for(r=r<0;e[n+p]=255&r,p+=h,r/=256,u-=8);e[n+p-h]|=128*g}},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t,n){"use strict";function s(e){const t=new Uint8Array(4*e.length);let n=0;for(let s=0;s>>24,t[n++]=i>>16&255,t[n++]=i>>8&255,t[n++]=255&i}return t.buffer}function i(e){return e.buffer}function a(e){const t=new Uint8Array(e),n=new Uint32Array(t.length/4);for(let e=0;e ttl_seconds:flags.1?int = InputMedia;\ninputMediaPhoto#b3ba0635 flags:# id:InputPhoto ttl_seconds:flags.0?int = InputMedia;\ninputMediaGeoPoint#f9c44144 geo_point:InputGeoPoint = InputMedia;\ninputMediaContact#f8ab7dfb phone_number:string first_name:string last_name:string vcard:string = InputMedia;\ninputMediaUploadedDocument#5b38c6c1 flags:# nosound_video:flags.3?true force_file:flags.4?true file:InputFile thumb:flags.2?InputFile mime_type:string attributes:Vector stickers:flags.0?Vector ttl_seconds:flags.1?int = InputMedia;\ninputMediaDocument#23ab23d2 flags:# id:InputDocument ttl_seconds:flags.0?int = InputMedia;\ninputMediaVenue#c13d1c11 geo_point:InputGeoPoint title:string address:string provider:string venue_id:string venue_type:string = InputMedia;\ninputMediaPhotoExternal#e5bbfe1a flags:# url:string ttl_seconds:flags.0?int = InputMedia;\ninputMediaDocumentExternal#fb52dc99 flags:# url:string ttl_seconds:flags.0?int = InputMedia;\ninputMediaGame#d33f43f3 id:InputGame = InputMedia;\ninputMediaInvoice#f4e096c3 flags:# title:string description:string photo:flags.0?InputWebDocument invoice:Invoice payload:bytes provider:string provider_data:DataJSON start_param:string = InputMedia;\ninputMediaGeoLive#971fa843 flags:# stopped:flags.0?true geo_point:InputGeoPoint heading:flags.2?int period:flags.1?int proximity_notification_radius:flags.3?int = InputMedia;\ninputMediaPoll#f94e5f1 flags:# poll:Poll correct_answers:flags.0?Vector solution:flags.1?string solution_entities:flags.1?Vector = InputMedia;\ninputMediaDice#e66fbf7b emoticon:string = InputMedia;\ninputChatPhotoEmpty#1ca48f57 = InputChatPhoto;\ninputChatUploadedPhoto#c642724e flags:# file:flags.0?InputFile video:flags.1?InputFile video_start_ts:flags.2?double = InputChatPhoto;\ninputChatPhoto#8953ad37 id:InputPhoto = InputChatPhoto;\ninputGeoPointEmpty#e4c123d6 = InputGeoPoint;\ninputGeoPoint#48222faf flags:# lat:double long:double accuracy_radius:flags.0?int = InputGeoPoint;\ninputPhotoEmpty#1cd7bf0d = InputPhoto;\ninputPhoto#3bb3b94a id:long access_hash:long file_reference:bytes = InputPhoto;\ninputFileLocation#dfdaabe1 volume_id:long local_id:int secret:long file_reference:bytes = InputFileLocation;\ninputEncryptedFileLocation#f5235d55 id:long access_hash:long = InputFileLocation;\ninputDocumentFileLocation#bad07584 id:long access_hash:long file_reference:bytes thumb_size:string = InputFileLocation;\ninputSecureFileLocation#cbc7ee28 id:long access_hash:long = InputFileLocation;\ninputTakeoutFileLocation#29be5899 = InputFileLocation;\ninputPhotoFileLocation#40181ffe id:long access_hash:long file_reference:bytes thumb_size:string = InputFileLocation;\ninputPhotoLegacyFileLocation#d83466f3 id:long access_hash:long file_reference:bytes volume_id:long local_id:int secret:long = InputFileLocation;\ninputPeerPhotoFileLocation#27d69997 flags:# big:flags.0?true peer:InputPeer volume_id:long local_id:int = InputFileLocation;\ninputStickerSetThumb#dbaeae9 stickerset:InputStickerSet volume_id:long local_id:int = InputFileLocation;\npeerUser#9db1bc6d user_id:int = Peer;\npeerChat#bad0e5bb chat_id:int = Peer;\npeerChannel#bddde532 channel_id:int = Peer;\nstorage.fileUnknown#aa963b05 = storage.FileType;\nstorage.filePartial#40bc6f52 = storage.FileType;\nstorage.fileJpeg#7efe0e = storage.FileType;\nstorage.fileGif#cae1aadf = storage.FileType;\nstorage.filePng#a4f63c0 = storage.FileType;\nstorage.filePdf#ae1e508d = storage.FileType;\nstorage.fileMp3#528a0677 = storage.FileType;\nstorage.fileMov#4b09ebbc = storage.FileType;\nstorage.fileMp4#b3cea0e4 = storage.FileType;\nstorage.fileWebp#1081464c = storage.FileType;\nuserEmpty#200250ba id:int = User;\nuser#938458c1 flags:# self:flags.10?true contact:flags.11?true mutual_contact:flags.12?true deleted:flags.13?true bot:flags.14?true bot_chat_history:flags.15?true bot_nochats:flags.16?true verified:flags.17?true restricted:flags.18?true min:flags.20?true bot_inline_geo:flags.21?true support:flags.23?true scam:flags.24?true apply_min_photo:flags.25?true id:int access_hash:flags.0?long first_name:flags.1?string last_name:flags.2?string username:flags.3?string phone:flags.4?string photo:flags.5?UserProfilePhoto status:flags.6?UserStatus bot_info_version:flags.14?int restriction_reason:flags.18?Vector bot_inline_placeholder:flags.19?string lang_code:flags.22?string = User;\nuserProfilePhotoEmpty#4f11bae1 = UserProfilePhoto;\nuserProfilePhoto#69d3ab26 flags:# has_video:flags.0?true photo_id:long photo_small:FileLocation photo_big:FileLocation dc_id:int = UserProfilePhoto;\nuserStatusEmpty#9d05049 = UserStatus;\nuserStatusOnline#edb93949 expires:int = UserStatus;\nuserStatusOffline#8c703f was_online:int = UserStatus;\nuserStatusRecently#e26f42f1 = UserStatus;\nuserStatusLastWeek#7bf09fc = UserStatus;\nuserStatusLastMonth#77ebc742 = UserStatus;\nchatEmpty#9ba2d800 id:int = Chat;\nchat#3bda1bde flags:# creator:flags.0?true kicked:flags.1?true left:flags.2?true deactivated:flags.5?true id:int title:string photo:ChatPhoto participants_count:int date:int version:int migrated_to:flags.6?InputChannel admin_rights:flags.14?ChatAdminRights default_banned_rights:flags.18?ChatBannedRights = Chat;\nchatForbidden#7328bdb id:int title:string = Chat;\nchannel#d31a961e flags:# creator:flags.0?true left:flags.2?true broadcast:flags.5?true verified:flags.7?true megagroup:flags.8?true restricted:flags.9?true signatures:flags.11?true min:flags.12?true scam:flags.19?true has_link:flags.20?true has_geo:flags.21?true slowmode_enabled:flags.22?true call_active:flags.23?true id:int access_hash:flags.13?long title:string username:flags.6?string photo:ChatPhoto date:int version:int restriction_reason:flags.9?Vector admin_rights:flags.14?ChatAdminRights banned_rights:flags.15?ChatBannedRights default_banned_rights:flags.18?ChatBannedRights participants_count:flags.17?int = Chat;\nchannelForbidden#289da732 flags:# broadcast:flags.5?true megagroup:flags.8?true id:int access_hash:long title:string until_date:flags.16?int = Chat;\nchatFull#1b7c9db3 flags:# can_set_username:flags.7?true has_scheduled:flags.8?true id:int about:string participants:ChatParticipants chat_photo:flags.2?Photo notify_settings:PeerNotifySettings exported_invite:ExportedChatInvite bot_info:flags.3?Vector pinned_msg_id:flags.6?int folder_id:flags.11?int = ChatFull;\nchannelFull#f0e6672a flags:# can_view_participants:flags.3?true can_set_username:flags.6?true can_set_stickers:flags.7?true hidden_prehistory:flags.10?true can_set_location:flags.16?true has_scheduled:flags.19?true can_view_stats:flags.20?true blocked:flags.22?true id:int about:string participants_count:flags.0?int admins_count:flags.1?int kicked_count:flags.2?int banned_count:flags.2?int online_count:flags.13?int read_inbox_max_id:int read_outbox_max_id:int unread_count:int chat_photo:Photo notify_settings:PeerNotifySettings exported_invite:ExportedChatInvite bot_info:Vector migrated_from_chat_id:flags.4?int migrated_from_max_id:flags.4?int pinned_msg_id:flags.5?int stickerset:flags.8?StickerSet available_min_id:flags.9?int folder_id:flags.11?int linked_chat_id:flags.14?int location:flags.15?ChannelLocation slowmode_seconds:flags.17?int slowmode_next_send_date:flags.18?int stats_dc:flags.12?int pts:int = ChatFull;\nchatParticipant#c8d7493e user_id:int inviter_id:int date:int = ChatParticipant;\nchatParticipantCreator#da13538a user_id:int = ChatParticipant;\nchatParticipantAdmin#e2d6e436 user_id:int inviter_id:int date:int = ChatParticipant;\nchatParticipantsForbidden#fc900c2b flags:# chat_id:int self_participant:flags.0?ChatParticipant = ChatParticipants;\nchatParticipants#3f460fed chat_id:int participants:Vector version:int = ChatParticipants;\nchatPhotoEmpty#37c1011c = ChatPhoto;\nchatPhoto#d20b9f3c flags:# has_video:flags.0?true photo_small:FileLocation photo_big:FileLocation dc_id:int = ChatPhoto;\nmessageEmpty#83e5de54 id:int = Message;\nmessage#58ae39c9 flags:# out:flags.1?true mentioned:flags.4?true media_unread:flags.5?true silent:flags.13?true post:flags.14?true from_scheduled:flags.18?true legacy:flags.19?true edit_hide:flags.21?true pinned:flags.24?true id:int from_id:flags.8?Peer peer_id:Peer fwd_from:flags.2?MessageFwdHeader via_bot_id:flags.11?int reply_to:flags.3?MessageReplyHeader date:int message:string media:flags.9?MessageMedia reply_markup:flags.6?ReplyMarkup entities:flags.7?Vector views:flags.10?int forwards:flags.10?int replies:flags.23?MessageReplies edit_date:flags.15?int post_author:flags.16?string grouped_id:flags.17?long restriction_reason:flags.22?Vector = Message;\nmessageService#286fa604 flags:# out:flags.1?true mentioned:flags.4?true media_unread:flags.5?true silent:flags.13?true post:flags.14?true legacy:flags.19?true id:int from_id:flags.8?Peer peer_id:Peer reply_to:flags.3?MessageReplyHeader date:int action:MessageAction = Message;\nmessageMediaEmpty#3ded6320 = MessageMedia;\nmessageMediaPhoto#695150d7 flags:# photo:flags.0?Photo ttl_seconds:flags.2?int = MessageMedia;\nmessageMediaGeo#56e0d474 geo:GeoPoint = MessageMedia;\nmessageMediaContact#cbf24940 phone_number:string first_name:string last_name:string vcard:string user_id:int = MessageMedia;\nmessageMediaUnsupported#9f84f49e = MessageMedia;\nmessageMediaDocument#9cb070d7 flags:# document:flags.0?Document ttl_seconds:flags.2?int = MessageMedia;\nmessageMediaWebPage#a32dd600 webpage:WebPage = MessageMedia;\nmessageMediaVenue#2ec0533f geo:GeoPoint title:string address:string provider:string venue_id:string venue_type:string = MessageMedia;\nmessageMediaGame#fdb19008 game:Game = MessageMedia;\nmessageMediaInvoice#84551347 flags:# shipping_address_requested:flags.1?true test:flags.3?true title:string description:string photo:flags.0?WebDocument receipt_msg_id:flags.2?int currency:string total_amount:long start_param:string = MessageMedia;\nmessageMediaGeoLive#b940c666 flags:# geo:GeoPoint heading:flags.0?int period:int proximity_notification_radius:flags.1?int = MessageMedia;\nmessageMediaPoll#4bd6e798 poll:Poll results:PollResults = MessageMedia;\nmessageMediaDice#3f7ee58b value:int emoticon:string = MessageMedia;\nmessageActionEmpty#b6aef7b0 = MessageAction;\nmessageActionChatCreate#a6638b9a title:string users:Vector = MessageAction;\nmessageActionChatEditTitle#b5a1ce5a title:string = MessageAction;\nmessageActionChatEditPhoto#7fcb13a8 photo:Photo = MessageAction;\nmessageActionChatDeletePhoto#95e3fbef = MessageAction;\nmessageActionChatAddUser#488a7337 users:Vector = MessageAction;\nmessageActionChatDeleteUser#b2ae9b0c user_id:int = MessageAction;\nmessageActionChatJoinedByLink#f89cf5e8 inviter_id:int = MessageAction;\nmessageActionChannelCreate#95d2ac92 title:string = MessageAction;\nmessageActionChatMigrateTo#51bdb021 channel_id:int = MessageAction;\nmessageActionChannelMigrateFrom#b055eaee title:string chat_id:int = MessageAction;\nmessageActionPinMessage#94bd38ed = MessageAction;\nmessageActionHistoryClear#9fbab604 = MessageAction;\nmessageActionGameScore#92a72876 game_id:long score:int = MessageAction;\nmessageActionPaymentSentMe#8f31b327 flags:# currency:string total_amount:long payload:bytes info:flags.0?PaymentRequestedInfo shipping_option_id:flags.1?string charge:PaymentCharge = MessageAction;\nmessageActionPaymentSent#40699cd0 currency:string total_amount:long = MessageAction;\nmessageActionPhoneCall#80e11a7f flags:# video:flags.2?true call_id:long reason:flags.0?PhoneCallDiscardReason duration:flags.1?int = MessageAction;\nmessageActionScreenshotTaken#4792929b = MessageAction;\nmessageActionCustomAction#fae69f56 message:string = MessageAction;\nmessageActionBotAllowed#abe9affe domain:string = MessageAction;\nmessageActionSecureValuesSentMe#1b287353 values:Vector credentials:SecureCredentialsEncrypted = MessageAction;\nmessageActionSecureValuesSent#d95c6154 types:Vector = MessageAction;\nmessageActionContactSignUp#f3f25f76 = MessageAction;\nmessageActionGeoProximityReached#98e0d697 from_id:Peer to_id:Peer distance:int = MessageAction;\ndialog#2c171f72 flags:# pinned:flags.2?true unread_mark:flags.3?true peer:Peer top_message:int read_inbox_max_id:int read_outbox_max_id:int unread_count:int unread_mentions_count:int notify_settings:PeerNotifySettings pts:flags.0?int draft:flags.1?DraftMessage folder_id:flags.4?int = Dialog;\ndialogFolder#71bd134c flags:# pinned:flags.2?true folder:Folder peer:Peer top_message:int unread_muted_peers_count:int unread_unmuted_peers_count:int unread_muted_messages_count:int unread_unmuted_messages_count:int = Dialog;\nphotoEmpty#2331b22d id:long = Photo;\nphoto#fb197a65 flags:# has_stickers:flags.0?true id:long access_hash:long file_reference:bytes date:int sizes:Vector video_sizes:flags.1?Vector dc_id:int = Photo;\nphotoSizeEmpty#e17e23c type:string = PhotoSize;\nphotoSize#77bfb61b type:string location:FileLocation w:int h:int size:int = PhotoSize;\nphotoCachedSize#e9a734fa type:string location:FileLocation w:int h:int bytes:bytes = PhotoSize;\nphotoStrippedSize#e0b0bc2e type:string bytes:bytes = PhotoSize;\nphotoSizeProgressive#5aa86a51 type:string location:FileLocation w:int h:int sizes:Vector = PhotoSize;\nphotoPathSize#d8214d41 type:string bytes:bytes = PhotoSize;\ngeoPointEmpty#1117dd5f = GeoPoint;\ngeoPoint#b2a2f663 flags:# long:double lat:double access_hash:long accuracy_radius:flags.0?int = GeoPoint;\nauth.sentCode#5e002502 flags:# type:auth.SentCodeType phone_code_hash:string next_type:flags.1?auth.CodeType timeout:flags.2?int = auth.SentCode;\nauth.authorization#cd050916 flags:# tmp_sessions:flags.0?int user:User = auth.Authorization;\nauth.authorizationSignUpRequired#44747e9a flags:# terms_of_service:flags.0?help.TermsOfService = auth.Authorization;\nauth.exportedAuthorization#df969c2d id:int bytes:bytes = auth.ExportedAuthorization;\ninputNotifyPeer#b8bc5b0c peer:InputPeer = InputNotifyPeer;\ninputNotifyUsers#193b4417 = InputNotifyPeer;\ninputNotifyChats#4a95e84e = InputNotifyPeer;\ninputNotifyBroadcasts#b1db7c7e = InputNotifyPeer;\ninputPeerNotifySettings#9c3d198e flags:# show_previews:flags.0?Bool silent:flags.1?Bool mute_until:flags.2?int sound:flags.3?string = InputPeerNotifySettings;\npeerNotifySettings#af509d20 flags:# show_previews:flags.0?Bool silent:flags.1?Bool mute_until:flags.2?int sound:flags.3?string = PeerNotifySettings;\npeerSettings#733f2961 flags:# report_spam:flags.0?true add_contact:flags.1?true block_contact:flags.2?true share_contact:flags.3?true need_contacts_exception:flags.4?true report_geo:flags.5?true autoarchived:flags.7?true geo_distance:flags.6?int = PeerSettings;\nwallPaper#a437c3ed id:long flags:# creator:flags.0?true default:flags.1?true pattern:flags.3?true dark:flags.4?true access_hash:long slug:string document:Document settings:flags.2?WallPaperSettings = WallPaper;\nwallPaperNoFile#8af40b25 flags:# default:flags.1?true dark:flags.4?true settings:flags.2?WallPaperSettings = WallPaper;\ninputReportReasonSpam#58dbcab8 = ReportReason;\ninputReportReasonViolence#1e22c78d = ReportReason;\ninputReportReasonPornography#2e59d922 = ReportReason;\ninputReportReasonChildAbuse#adf44ee3 = ReportReason;\ninputReportReasonOther#e1746d0a text:string = ReportReason;\ninputReportReasonCopyright#9b89f93a = ReportReason;\ninputReportReasonGeoIrrelevant#dbd4feed = ReportReason;\nuserFull#edf17c12 flags:# blocked:flags.0?true phone_calls_available:flags.4?true phone_calls_private:flags.5?true can_pin_message:flags.7?true has_scheduled:flags.12?true video_calls_available:flags.13?true user:User about:flags.1?string settings:PeerSettings profile_photo:flags.2?Photo notify_settings:PeerNotifySettings bot_info:flags.3?BotInfo pinned_msg_id:flags.6?int common_chats_count:int folder_id:flags.11?int = UserFull;\ncontact#f911c994 user_id:int mutual:Bool = Contact;\nimportedContact#d0028438 user_id:int client_id:long = ImportedContact;\ncontactStatus#d3680c61 user_id:int status:UserStatus = ContactStatus;\ncontacts.contactsNotModified#b74ba9d2 = contacts.Contacts;\ncontacts.contacts#eae87e42 contacts:Vector saved_count:int users:Vector = contacts.Contacts;\ncontacts.importedContacts#77d01c3b imported:Vector popular_invites:Vector retry_contacts:Vector users:Vector = contacts.ImportedContacts;\ncontacts.blocked#ade1591 blocked:Vector chats:Vector users:Vector = contacts.Blocked;\ncontacts.blockedSlice#e1664194 count:int blocked:Vector chats:Vector users:Vector = contacts.Blocked;\nmessages.dialogs#15ba6c40 dialogs:Vector messages:Vector chats:Vector users:Vector = messages.Dialogs;\nmessages.dialogsSlice#71e094f3 count:int dialogs:Vector messages:Vector chats:Vector users:Vector = messages.Dialogs;\nmessages.dialogsNotModified#f0e3e596 count:int = messages.Dialogs;\nmessages.messages#8c718e87 messages:Vector chats:Vector users:Vector = messages.Messages;\nmessages.messagesSlice#3a54685e flags:# inexact:flags.1?true count:int next_rate:flags.0?int offset_id_offset:flags.2?int messages:Vector chats:Vector users:Vector = messages.Messages;\nmessages.channelMessages#64479808 flags:# inexact:flags.1?true pts:int count:int offset_id_offset:flags.2?int messages:Vector chats:Vector users:Vector = messages.Messages;\nmessages.messagesNotModified#74535f21 count:int = messages.Messages;\nmessages.chats#64ff9fd5 chats:Vector = messages.Chats;\nmessages.chatsSlice#9cd81144 count:int chats:Vector = messages.Chats;\nmessages.chatFull#e5d7d19c full_chat:ChatFull chats:Vector users:Vector = messages.ChatFull;\nmessages.affectedHistory#b45c69d1 pts:int pts_count:int offset:int = messages.AffectedHistory;\ninputMessagesFilterEmpty#57e2f66c = MessagesFilter;\ninputMessagesFilterPhotos#9609a51c = MessagesFilter;\ninputMessagesFilterVideo#9fc00e65 = MessagesFilter;\ninputMessagesFilterPhotoVideo#56e9f0e4 = MessagesFilter;\ninputMessagesFilterDocument#9eddf188 = MessagesFilter;\ninputMessagesFilterUrl#7ef0dd87 = MessagesFilter;\ninputMessagesFilterGif#ffc86587 = MessagesFilter;\ninputMessagesFilterVoice#50f5c392 = MessagesFilter;\ninputMessagesFilterMusic#3751b49e = MessagesFilter;\ninputMessagesFilterChatPhotos#3a20ecb8 = MessagesFilter;\ninputMessagesFilterPhoneCalls#80c99768 flags:# missed:flags.0?true = MessagesFilter;\ninputMessagesFilterRoundVoice#7a7c17a4 = MessagesFilter;\ninputMessagesFilterRoundVideo#b549da53 = MessagesFilter;\ninputMessagesFilterMyMentions#c1f8e69a = MessagesFilter;\ninputMessagesFilterGeo#e7026d0d = MessagesFilter;\ninputMessagesFilterContacts#e062db83 = MessagesFilter;\ninputMessagesFilterPinned#1bb00451 = MessagesFilter;\nupdateNewMessage#1f2b0afd message:Message pts:int pts_count:int = Update;\nupdateMessageID#4e90bfd6 id:int random_id:long = Update;\nupdateDeleteMessages#a20db0e5 messages:Vector pts:int pts_count:int = Update;\nupdateUserTyping#5c486927 user_id:int action:SendMessageAction = Update;\nupdateChatUserTyping#9a65ea1f chat_id:int user_id:int action:SendMessageAction = Update;\nupdateChatParticipants#7761198 participants:ChatParticipants = Update;\nupdateUserStatus#1bfbd823 user_id:int status:UserStatus = Update;\nupdateUserName#a7332b73 user_id:int first_name:string last_name:string username:string = Update;\nupdateUserPhoto#95313b0c user_id:int date:int photo:UserProfilePhoto previous:Bool = Update;\nupdateNewEncryptedMessage#12bcbd9a message:EncryptedMessage qts:int = Update;\nupdateEncryptedChatTyping#1710f156 chat_id:int = Update;\nupdateEncryption#b4a2e88d chat:EncryptedChat date:int = Update;\nupdateEncryptedMessagesRead#38fe25b7 chat_id:int max_date:int date:int = Update;\nupdateChatParticipantAdd#ea4b0e5c chat_id:int user_id:int inviter_id:int date:int version:int = Update;\nupdateChatParticipantDelete#6e5f8c22 chat_id:int user_id:int version:int = Update;\nupdateDcOptions#8e5e9873 dc_options:Vector = Update;\nupdateNotifySettings#bec268ef peer:NotifyPeer notify_settings:PeerNotifySettings = Update;\nupdateServiceNotification#ebe46819 flags:# popup:flags.0?true inbox_date:flags.1?int type:string message:string media:MessageMedia entities:Vector = Update;\nupdatePrivacy#ee3b272a key:PrivacyKey rules:Vector = Update;\nupdateUserPhone#12b9417b user_id:int phone:string = Update;\nupdateReadHistoryInbox#9c974fdf flags:# folder_id:flags.0?int peer:Peer max_id:int still_unread_count:int pts:int pts_count:int = Update;\nupdateReadHistoryOutbox#2f2f21bf peer:Peer max_id:int pts:int pts_count:int = Update;\nupdateWebPage#7f891213 webpage:WebPage pts:int pts_count:int = Update;\nupdateReadMessagesContents#68c13933 messages:Vector pts:int pts_count:int = Update;\nupdateChannelTooLong#eb0467fb flags:# channel_id:int pts:flags.0?int = Update;\nupdateChannel#b6d45656 channel_id:int = Update;\nupdateNewChannelMessage#62ba04d9 message:Message pts:int pts_count:int = Update;\nupdateReadChannelInbox#330b5424 flags:# folder_id:flags.0?int channel_id:int max_id:int still_unread_count:int pts:int = Update;\nupdateDeleteChannelMessages#c37521c9 channel_id:int messages:Vector pts:int pts_count:int = Update;\nupdateChannelMessageViews#98a12b4b channel_id:int id:int views:int = Update;\nupdateChatParticipantAdmin#b6901959 chat_id:int user_id:int is_admin:Bool version:int = Update;\nupdateNewStickerSet#688a30aa stickerset:messages.StickerSet = Update;\nupdateStickerSetsOrder#bb2d201 flags:# masks:flags.0?true order:Vector = Update;\nupdateStickerSets#43ae3dec = Update;\nupdateSavedGifs#9375341e = Update;\nupdateBotInlineQuery#54826690 flags:# query_id:long user_id:int query:string geo:flags.0?GeoPoint offset:string = Update;\nupdateBotInlineSend#e48f964 flags:# user_id:int query:string geo:flags.0?GeoPoint id:string msg_id:flags.1?InputBotInlineMessageID = Update;\nupdateEditChannelMessage#1b3f4df7 message:Message pts:int pts_count:int = Update;\nupdateBotCallbackQuery#e73547e1 flags:# query_id:long user_id:int peer:Peer msg_id:int chat_instance:long data:flags.0?bytes game_short_name:flags.1?string = Update;\nupdateEditMessage#e40370a3 message:Message pts:int pts_count:int = Update;\nupdateInlineBotCallbackQuery#f9d27a5a flags:# query_id:long user_id:int msg_id:InputBotInlineMessageID chat_instance:long data:flags.0?bytes game_short_name:flags.1?string = Update;\nupdateReadChannelOutbox#25d6c9c7 channel_id:int max_id:int = Update;\nupdateDraftMessage#ee2bb969 peer:Peer draft:DraftMessage = Update;\nupdateReadFeaturedStickers#571d2742 = Update;\nupdateRecentStickers#9a422c20 = Update;\nupdateConfig#a229dd06 = Update;\nupdatePtsChanged#3354678f = Update;\nupdateChannelWebPage#40771900 channel_id:int webpage:WebPage pts:int pts_count:int = Update;\nupdateDialogPinned#6e6fe51c flags:# pinned:flags.0?true folder_id:flags.1?int peer:DialogPeer = Update;\nupdatePinnedDialogs#fa0f3ca2 flags:# folder_id:flags.1?int order:flags.0?Vector = Update;\nupdateBotWebhookJSON#8317c0c3 data:DataJSON = Update;\nupdateBotWebhookJSONQuery#9b9240a6 query_id:long data:DataJSON timeout:int = Update;\nupdateBotShippingQuery#e0cdc940 query_id:long user_id:int payload:bytes shipping_address:PostAddress = Update;\nupdateBotPrecheckoutQuery#5d2f3aa9 flags:# query_id:long user_id:int payload:bytes info:flags.0?PaymentRequestedInfo shipping_option_id:flags.1?string currency:string total_amount:long = Update;\nupdatePhoneCall#ab0f6b1e phone_call:PhoneCall = Update;\nupdateLangPackTooLong#46560264 lang_code:string = Update;\nupdateLangPack#56022f4d difference:LangPackDifference = Update;\nupdateFavedStickers#e511996d = Update;\nupdateChannelReadMessagesContents#89893b45 channel_id:int messages:Vector = Update;\nupdateContactsReset#7084a7be = Update;\nupdateChannelAvailableMessages#70db6837 channel_id:int available_min_id:int = Update;\nupdateDialogUnreadMark#e16459c3 flags:# unread:flags.0?true peer:DialogPeer = Update;\nupdateMessagePoll#aca1657b flags:# poll_id:long poll:flags.0?Poll results:PollResults = Update;\nupdateChatDefaultBannedRights#54c01850 peer:Peer default_banned_rights:ChatBannedRights version:int = Update;\nupdateFolderPeers#19360dc0 folder_peers:Vector pts:int pts_count:int = Update;\nupdatePeerSettings#6a7e7366 peer:Peer settings:PeerSettings = Update;\nupdatePeerLocated#b4afcfb0 peers:Vector = Update;\nupdateNewScheduledMessage#39a51dfb message:Message = Update;\nupdateDeleteScheduledMessages#90866cee peer:Peer messages:Vector = Update;\nupdateTheme#8216fba3 theme:Theme = Update;\nupdateGeoLiveViewed#871fb939 peer:Peer msg_id:int = Update;\nupdateLoginToken#564fe691 = Update;\nupdateMessagePollVote#42f88f2c poll_id:long user_id:int options:Vector = Update;\nupdateDialogFilter#26ffde7d flags:# id:int filter:flags.0?DialogFilter = Update;\nupdateDialogFilterOrder#a5d72105 order:Vector = Update;\nupdateDialogFilters#3504914f = Update;\nupdatePhoneCallSignalingData#2661bf09 phone_call_id:long data:bytes = Update;\nupdateChannelParticipant#65d2b464 flags:# channel_id:int date:int user_id:int prev_participant:flags.0?ChannelParticipant new_participant:flags.1?ChannelParticipant qts:int = Update;\nupdateChannelMessageForwards#6e8a84df channel_id:int id:int forwards:int = Update;\nupdateReadChannelDiscussionInbox#1cc7de54 flags:# channel_id:int top_msg_id:int read_max_id:int broadcast_id:flags.0?int broadcast_post:flags.0?int = Update;\nupdateReadChannelDiscussionOutbox#4638a26c channel_id:int top_msg_id:int read_max_id:int = Update;\nupdatePeerBlocked#246a4b22 peer_id:Peer blocked:Bool = Update;\nupdateChannelUserTyping#ff2abe9f flags:# channel_id:int top_msg_id:flags.0?int user_id:int action:SendMessageAction = Update;\nupdatePinnedMessages#ed85eab5 flags:# pinned:flags.0?true peer:Peer messages:Vector pts:int pts_count:int = Update;\nupdatePinnedChannelMessages#8588878b flags:# pinned:flags.0?true channel_id:int messages:Vector pts:int pts_count:int = Update;\nupdates.state#a56c2a3e pts:int qts:int date:int seq:int unread_count:int = updates.State;\nupdates.differenceEmpty#5d75a138 date:int seq:int = updates.Difference;\nupdates.difference#f49ca0 new_messages:Vector new_encrypted_messages:Vector other_updates:Vector chats:Vector users:Vector state:updates.State = updates.Difference;\nupdates.differenceSlice#a8fb1981 new_messages:Vector new_encrypted_messages:Vector other_updates:Vector chats:Vector users:Vector intermediate_state:updates.State = updates.Difference;\nupdates.differenceTooLong#4afe8f6d pts:int = updates.Difference;\nupdatesTooLong#e317af7e = Updates;\nupdateShortMessage#2296d2c8 flags:# out:flags.1?true mentioned:flags.4?true media_unread:flags.5?true silent:flags.13?true id:int user_id:int message:string pts:int pts_count:int date:int fwd_from:flags.2?MessageFwdHeader via_bot_id:flags.11?int reply_to:flags.3?MessageReplyHeader entities:flags.7?Vector = Updates;\nupdateShortChatMessage#402d5dbb flags:# out:flags.1?true mentioned:flags.4?true media_unread:flags.5?true silent:flags.13?true id:int from_id:int chat_id:int message:string pts:int pts_count:int date:int fwd_from:flags.2?MessageFwdHeader via_bot_id:flags.11?int reply_to:flags.3?MessageReplyHeader entities:flags.7?Vector = Updates;\nupdateShort#78d4dec1 update:Update date:int = Updates;\nupdatesCombined#725b04c3 updates:Vector users:Vector chats:Vector date:int seq_start:int seq:int = Updates;\nupdates#74ae4240 updates:Vector users:Vector chats:Vector date:int seq:int = Updates;\nupdateShortSentMessage#11f1331c flags:# out:flags.1?true id:int pts:int pts_count:int date:int media:flags.9?MessageMedia entities:flags.7?Vector = Updates;\nphotos.photos#8dca6aa5 photos:Vector users:Vector = photos.Photos;\nphotos.photosSlice#15051f54 count:int photos:Vector users:Vector = photos.Photos;\nphotos.photo#20212ca8 photo:Photo users:Vector = photos.Photo;\nupload.file#96a18d5 type:storage.FileType mtime:int bytes:bytes = upload.File;\nupload.fileCdnRedirect#f18cda44 dc_id:int file_token:bytes encryption_key:bytes encryption_iv:bytes file_hashes:Vector = upload.File;\ndcOption#18b7a10d flags:# ipv6:flags.0?true media_only:flags.1?true tcpo_only:flags.2?true cdn:flags.3?true static:flags.4?true id:int ip_address:string port:int secret:flags.10?bytes = DcOption;\nconfig#330b4067 flags:# phonecalls_enabled:flags.1?true default_p2p_contacts:flags.3?true preload_featured_stickers:flags.4?true ignore_phone_entities:flags.5?true revoke_pm_inbox:flags.6?true blocked_mode:flags.8?true pfs_enabled:flags.13?true date:int expires:int test_mode:Bool this_dc:int dc_options:Vector dc_txt_domain_name:string chat_size_max:int megagroup_size_max:int forwarded_count_max:int online_update_period_ms:int offline_blur_timeout_ms:int offline_idle_timeout_ms:int online_cloud_timeout_ms:int notify_cloud_delay_ms:int notify_default_delay_ms:int push_chat_period_ms:int push_chat_limit:int saved_gifs_limit:int edit_time_limit:int revoke_time_limit:int revoke_pm_time_limit:int rating_e_decay:int stickers_recent_limit:int stickers_faved_limit:int channels_read_media_period:int tmp_sessions:flags.0?int pinned_dialogs_count_max:int pinned_infolder_count_max:int call_receive_timeout_ms:int call_ring_timeout_ms:int call_connect_timeout_ms:int call_packet_timeout_ms:int me_url_prefix:string autoupdate_url_prefix:flags.7?string gif_search_username:flags.9?string venue_search_username:flags.10?string img_search_username:flags.11?string static_maps_provider:flags.12?string caption_length_max:int message_length_max:int webfile_dc_id:int suggested_lang_code:flags.2?string lang_pack_version:flags.2?int base_lang_pack_version:flags.2?int = Config;\nnearestDc#8e1a1775 country:string this_dc:int nearest_dc:int = NearestDc;\nhelp.appUpdate#1da7158f flags:# can_not_skip:flags.0?true id:int version:string text:string entities:Vector document:flags.1?Document url:flags.2?string = help.AppUpdate;\nhelp.noAppUpdate#c45a6536 = help.AppUpdate;\nhelp.inviteText#18cb9f78 message:string = help.InviteText;\nencryptedChatEmpty#ab7ec0a0 id:int = EncryptedChat;\nencryptedChatWaiting#3bf703dc id:int access_hash:long date:int admin_id:int participant_id:int = EncryptedChat;\nencryptedChatRequested#62718a82 flags:# folder_id:flags.0?int id:int access_hash:long date:int admin_id:int participant_id:int g_a:bytes = EncryptedChat;\nencryptedChat#fa56ce36 id:int access_hash:long date:int admin_id:int participant_id:int g_a_or_b:bytes key_fingerprint:long = EncryptedChat;\nencryptedChatDiscarded#13d6dd27 id:int = EncryptedChat;\ninputEncryptedChat#f141b5e1 chat_id:int access_hash:long = InputEncryptedChat;\nencryptedFileEmpty#c21f497e = EncryptedFile;\nencryptedFile#4a70994c id:long access_hash:long size:int dc_id:int key_fingerprint:int = EncryptedFile;\ninputEncryptedFileEmpty#1837c364 = InputEncryptedFile;\ninputEncryptedFileUploaded#64bd0306 id:long parts:int md5_checksum:string key_fingerprint:int = InputEncryptedFile;\ninputEncryptedFile#5a17b5e5 id:long access_hash:long = InputEncryptedFile;\ninputEncryptedFileBigUploaded#2dc173c8 id:long parts:int key_fingerprint:int = InputEncryptedFile;\nencryptedMessage#ed18c118 random_id:long chat_id:int date:int bytes:bytes file:EncryptedFile = EncryptedMessage;\nencryptedMessageService#23734b06 random_id:long chat_id:int date:int bytes:bytes = EncryptedMessage;\nmessages.dhConfigNotModified#c0e24635 random:bytes = messages.DhConfig;\nmessages.dhConfig#2c221edd g:int p:bytes version:int random:bytes = messages.DhConfig;\nmessages.sentEncryptedMessage#560f8935 date:int = messages.SentEncryptedMessage;\nmessages.sentEncryptedFile#9493ff32 date:int file:EncryptedFile = messages.SentEncryptedMessage;\ninputDocumentEmpty#72f0eaae = InputDocument;\ninputDocument#1abfb575 id:long access_hash:long file_reference:bytes = InputDocument;\ndocumentEmpty#36f8c871 id:long = Document;\ndocument#1e87342b flags:# id:long access_hash:long file_reference:bytes date:int mime_type:string size:int thumbs:flags.0?Vector video_thumbs:flags.1?Vector dc_id:int attributes:Vector = Document;\nhelp.support#17c6b5f6 phone_number:string user:User = help.Support;\nnotifyPeer#9fd40bd8 peer:Peer = NotifyPeer;\nnotifyUsers#b4c83b4c = NotifyPeer;\nnotifyChats#c007cec3 = NotifyPeer;\nnotifyBroadcasts#d612e8ef = NotifyPeer;\nsendMessageTypingAction#16bf744e = SendMessageAction;\nsendMessageCancelAction#fd5ec8f5 = SendMessageAction;\nsendMessageRecordVideoAction#a187d66f = SendMessageAction;\nsendMessageUploadVideoAction#e9763aec progress:int = SendMessageAction;\nsendMessageRecordAudioAction#d52f73f7 = SendMessageAction;\nsendMessageUploadAudioAction#f351d7ab progress:int = SendMessageAction;\nsendMessageUploadPhotoAction#d1d34a26 progress:int = SendMessageAction;\nsendMessageUploadDocumentAction#aa0cd9e4 progress:int = SendMessageAction;\nsendMessageGeoLocationAction#176f8ba1 = SendMessageAction;\nsendMessageChooseContactAction#628cbc6f = SendMessageAction;\nsendMessageGamePlayAction#dd6a8f48 = SendMessageAction;\nsendMessageRecordRoundAction#88f27fbc = SendMessageAction;\nsendMessageUploadRoundAction#243e1c66 progress:int = SendMessageAction;\ncontacts.found#b3134d9d my_results:Vector results:Vector chats:Vector users:Vector = contacts.Found;\ninputPrivacyKeyStatusTimestamp#4f96cb18 = InputPrivacyKey;\ninputPrivacyKeyChatInvite#bdfb0426 = InputPrivacyKey;\ninputPrivacyKeyPhoneCall#fabadc5f = InputPrivacyKey;\ninputPrivacyKeyPhoneP2P#db9e70d2 = InputPrivacyKey;\ninputPrivacyKeyForwards#a4dd4c08 = InputPrivacyKey;\ninputPrivacyKeyProfilePhoto#5719bacc = InputPrivacyKey;\ninputPrivacyKeyPhoneNumber#352dafa = InputPrivacyKey;\ninputPrivacyKeyAddedByPhone#d1219bdd = InputPrivacyKey;\nprivacyKeyStatusTimestamp#bc2eab30 = PrivacyKey;\nprivacyKeyChatInvite#500e6dfa = PrivacyKey;\nprivacyKeyPhoneCall#3d662b7b = PrivacyKey;\nprivacyKeyPhoneP2P#39491cc8 = PrivacyKey;\nprivacyKeyForwards#69ec56a3 = PrivacyKey;\nprivacyKeyProfilePhoto#96151fed = PrivacyKey;\nprivacyKeyPhoneNumber#d19ae46d = PrivacyKey;\nprivacyKeyAddedByPhone#42ffd42b = PrivacyKey;\ninputPrivacyValueAllowContacts#d09e07b = InputPrivacyRule;\ninputPrivacyValueAllowAll#184b35ce = InputPrivacyRule;\ninputPrivacyValueAllowUsers#131cc67f users:Vector = InputPrivacyRule;\ninputPrivacyValueDisallowContacts#ba52007 = InputPrivacyRule;\ninputPrivacyValueDisallowAll#d66b66c9 = InputPrivacyRule;\ninputPrivacyValueDisallowUsers#90110467 users:Vector = InputPrivacyRule;\ninputPrivacyValueAllowChatParticipants#4c81c1ba chats:Vector = InputPrivacyRule;\ninputPrivacyValueDisallowChatParticipants#d82363af chats:Vector = InputPrivacyRule;\nprivacyValueAllowContacts#fffe1bac = PrivacyRule;\nprivacyValueAllowAll#65427b82 = PrivacyRule;\nprivacyValueAllowUsers#4d5bbe0c users:Vector = PrivacyRule;\nprivacyValueDisallowContacts#f888fa1a = PrivacyRule;\nprivacyValueDisallowAll#8b73e763 = PrivacyRule;\nprivacyValueDisallowUsers#c7f49b7 users:Vector = PrivacyRule;\nprivacyValueAllowChatParticipants#18be796b chats:Vector = PrivacyRule;\nprivacyValueDisallowChatParticipants#acae0690 chats:Vector = PrivacyRule;\naccount.privacyRules#50a04e45 rules:Vector chats:Vector users:Vector = account.PrivacyRules;\naccountDaysTTL#b8d0afdf days:int = AccountDaysTTL;\ndocumentAttributeImageSize#6c37c15c w:int h:int = DocumentAttribute;\ndocumentAttributeAnimated#11b58939 = DocumentAttribute;\ndocumentAttributeSticker#6319d612 flags:# mask:flags.1?true alt:string stickerset:InputStickerSet mask_coords:flags.0?MaskCoords = DocumentAttribute;\ndocumentAttributeVideo#ef02ce6 flags:# round_message:flags.0?true supports_streaming:flags.1?true duration:int w:int h:int = DocumentAttribute;\ndocumentAttributeAudio#9852f9c6 flags:# voice:flags.10?true duration:int title:flags.0?string performer:flags.1?string waveform:flags.2?bytes = DocumentAttribute;\ndocumentAttributeFilename#15590068 file_name:string = DocumentAttribute;\ndocumentAttributeHasStickers#9801d2f7 = DocumentAttribute;\nmessages.stickersNotModified#f1749a22 = messages.Stickers;\nmessages.stickers#e4599bbd hash:int stickers:Vector = messages.Stickers;\nstickerPack#12b299d4 emoticon:string documents:Vector = StickerPack;\nmessages.allStickersNotModified#e86602c3 = messages.AllStickers;\nmessages.allStickers#edfd405f hash:int sets:Vector = messages.AllStickers;\nmessages.affectedMessages#84d19185 pts:int pts_count:int = messages.AffectedMessages;\nwebPageEmpty#eb1477e8 id:long = WebPage;\nwebPagePending#c586da1c id:long date:int = WebPage;\nwebPage#e89c45b2 flags:# id:long url:string display_url:string hash:int type:flags.0?string site_name:flags.1?string title:flags.2?string description:flags.3?string photo:flags.4?Photo embed_url:flags.5?string embed_type:flags.5?string embed_width:flags.6?int embed_height:flags.6?int duration:flags.7?int author:flags.8?string document:flags.9?Document cached_page:flags.10?Page attributes:flags.12?Vector = WebPage;\nwebPageNotModified#7311ca11 flags:# cached_page_views:flags.0?int = WebPage;\nauthorization#ad01d61d flags:# current:flags.0?true official_app:flags.1?true password_pending:flags.2?true hash:long device_model:string platform:string system_version:string api_id:int app_name:string app_version:string date_created:int date_active:int ip:string country:string region:string = Authorization;\naccount.authorizations#1250abde authorizations:Vector = account.Authorizations;\naccount.password#ad2641f8 flags:# has_recovery:flags.0?true has_secure_values:flags.1?true has_password:flags.2?true current_algo:flags.2?PasswordKdfAlgo srp_B:flags.2?bytes srp_id:flags.2?long hint:flags.3?string email_unconfirmed_pattern:flags.4?string new_algo:PasswordKdfAlgo new_secure_algo:SecurePasswordKdfAlgo secure_random:bytes = account.Password;\naccount.passwordSettings#9a5c33e5 flags:# email:flags.0?string secure_settings:flags.1?SecureSecretSettings = account.PasswordSettings;\naccount.passwordInputSettings#c23727c9 flags:# new_algo:flags.0?PasswordKdfAlgo new_password_hash:flags.0?bytes hint:flags.0?string email:flags.1?string new_secure_settings:flags.2?SecureSecretSettings = account.PasswordInputSettings;\nauth.passwordRecovery#137948a5 email_pattern:string = auth.PasswordRecovery;\nreceivedNotifyMessage#a384b779 id:int flags:int = ReceivedNotifyMessage;\nchatInviteEmpty#69df3769 = ExportedChatInvite;\nchatInviteExported#fc2e05bc link:string = ExportedChatInvite;\nchatInviteAlready#5a686d7c chat:Chat = ChatInvite;\nchatInvite#dfc2f58e flags:# channel:flags.0?true broadcast:flags.1?true public:flags.2?true megagroup:flags.3?true title:string photo:Photo participants_count:int participants:flags.4?Vector = ChatInvite;\nchatInvitePeek#61695cb0 chat:Chat expires:int = ChatInvite;\ninputStickerSetEmpty#ffb62b95 = InputStickerSet;\ninputStickerSetID#9de7a269 id:long access_hash:long = InputStickerSet;\ninputStickerSetShortName#861cc8a0 short_name:string = InputStickerSet;\ninputStickerSetAnimatedEmoji#28703c8 = InputStickerSet;\ninputStickerSetDice#e67f520e emoticon:string = InputStickerSet;\nstickerSet#eeb46f27 flags:# archived:flags.1?true official:flags.2?true masks:flags.3?true animated:flags.5?true installed_date:flags.0?int id:long access_hash:long title:string short_name:string thumb:flags.4?PhotoSize thumb_dc_id:flags.4?int count:int hash:int = StickerSet;\nmessages.stickerSet#b60a24a6 set:StickerSet packs:Vector documents:Vector = messages.StickerSet;\nbotCommand#c27ac8c7 command:string description:string = BotCommand;\nbotInfo#98e81d3a user_id:int description:string commands:Vector = BotInfo;\nkeyboardButton#a2fa4880 text:string = KeyboardButton;\nkeyboardButtonUrl#258aff05 text:string url:string = KeyboardButton;\nkeyboardButtonCallback#35bbdb6b flags:# requires_password:flags.0?true text:string data:bytes = KeyboardButton;\nkeyboardButtonRequestPhone#b16a6c29 text:string = KeyboardButton;\nkeyboardButtonRequestGeoLocation#fc796b3f text:string = KeyboardButton;\nkeyboardButtonSwitchInline#568a748 flags:# same_peer:flags.0?true text:string query:string = KeyboardButton;\nkeyboardButtonGame#50f41ccf text:string = KeyboardButton;\nkeyboardButtonBuy#afd93fbb text:string = KeyboardButton;\nkeyboardButtonUrlAuth#10b78d29 flags:# text:string fwd_text:flags.0?string url:string button_id:int = KeyboardButton;\ninputKeyboardButtonUrlAuth#d02e7fd4 flags:# request_write_access:flags.0?true text:string fwd_text:flags.1?string url:string bot:InputUser = KeyboardButton;\nkeyboardButtonRequestPoll#bbc7515d flags:# quiz:flags.0?Bool text:string = KeyboardButton;\nkeyboardButtonRow#77608b83 buttons:Vector = KeyboardButtonRow;\nreplyKeyboardHide#a03e5b85 flags:# selective:flags.2?true = ReplyMarkup;\nreplyKeyboardForceReply#f4108aa0 flags:# single_use:flags.1?true selective:flags.2?true = ReplyMarkup;\nreplyKeyboardMarkup#3502758c flags:# resize:flags.0?true single_use:flags.1?true selective:flags.2?true rows:Vector = ReplyMarkup;\nreplyInlineMarkup#48a30254 rows:Vector = ReplyMarkup;\nmessageEntityUnknown#bb92ba95 offset:int length:int = MessageEntity;\nmessageEntityMention#fa04579d offset:int length:int = MessageEntity;\nmessageEntityHashtag#6f635b0d offset:int length:int = MessageEntity;\nmessageEntityBotCommand#6cef8ac7 offset:int length:int = MessageEntity;\nmessageEntityUrl#6ed02538 offset:int length:int = MessageEntity;\nmessageEntityEmail#64e475c2 offset:int length:int = MessageEntity;\nmessageEntityBold#bd610bc9 offset:int length:int = MessageEntity;\nmessageEntityItalic#826f8b60 offset:int length:int = MessageEntity;\nmessageEntityCode#28a20571 offset:int length:int = MessageEntity;\nmessageEntityPre#73924be0 offset:int length:int language:string = MessageEntity;\nmessageEntityTextUrl#76a6d327 offset:int length:int url:string = MessageEntity;\nmessageEntityMentionName#352dca58 offset:int length:int user_id:int = MessageEntity;\ninputMessageEntityMentionName#208e68c9 offset:int length:int user_id:InputUser = MessageEntity;\nmessageEntityPhone#9b69e34b offset:int length:int = MessageEntity;\nmessageEntityCashtag#4c4e743f offset:int length:int = MessageEntity;\nmessageEntityUnderline#9c4e7e8b offset:int length:int = MessageEntity;\nmessageEntityStrike#bf0693d4 offset:int length:int = MessageEntity;\nmessageEntityBlockquote#20df5d0 offset:int length:int = MessageEntity;\nmessageEntityBankCard#761e6af4 offset:int length:int = MessageEntity;\ninputChannelEmpty#ee8c1e86 = InputChannel;\ninputChannel#afeb712e channel_id:int access_hash:long = InputChannel;\ninputChannelFromMessage#2a286531 peer:InputPeer msg_id:int channel_id:int = InputChannel;\ncontacts.resolvedPeer#7f077ad9 peer:Peer chats:Vector users:Vector = contacts.ResolvedPeer;\nmessageRange#ae30253 min_id:int max_id:int = MessageRange;\nupdates.channelDifferenceEmpty#3e11affb flags:# final:flags.0?true pts:int timeout:flags.1?int = updates.ChannelDifference;\nupdates.channelDifferenceTooLong#a4bcc6fe flags:# final:flags.0?true timeout:flags.1?int dialog:Dialog messages:Vector chats:Vector users:Vector = updates.ChannelDifference;\nupdates.channelDifference#2064674e flags:# final:flags.0?true pts:int timeout:flags.1?int new_messages:Vector other_updates:Vector chats:Vector users:Vector = updates.ChannelDifference;\nchannelMessagesFilterEmpty#94d42ee7 = ChannelMessagesFilter;\nchannelMessagesFilter#cd77d957 flags:# exclude_new_messages:flags.1?true ranges:Vector = ChannelMessagesFilter;\nchannelParticipant#15ebac1d user_id:int date:int = ChannelParticipant;\nchannelParticipantSelf#a3289a6d user_id:int inviter_id:int date:int = ChannelParticipant;\nchannelParticipantCreator#447dca4b flags:# user_id:int admin_rights:ChatAdminRights rank:flags.0?string = ChannelParticipant;\nchannelParticipantAdmin#ccbebbaf flags:# can_edit:flags.0?true self:flags.1?true user_id:int inviter_id:flags.1?int promoted_by:int date:int admin_rights:ChatAdminRights rank:flags.2?string = ChannelParticipant;\nchannelParticipantBanned#1c0facaf flags:# left:flags.0?true user_id:int kicked_by:int date:int banned_rights:ChatBannedRights = ChannelParticipant;\nchannelParticipantLeft#c3c6796b user_id:int = ChannelParticipant;\nchannelParticipantsRecent#de3f3c79 = ChannelParticipantsFilter;\nchannelParticipantsAdmins#b4608969 = ChannelParticipantsFilter;\nchannelParticipantsKicked#a3b54985 q:string = ChannelParticipantsFilter;\nchannelParticipantsBots#b0d1865b = ChannelParticipantsFilter;\nchannelParticipantsBanned#1427a5e1 q:string = ChannelParticipantsFilter;\nchannelParticipantsSearch#656ac4b q:string = ChannelParticipantsFilter;\nchannelParticipantsContacts#bb6ae88d q:string = ChannelParticipantsFilter;\nchannelParticipantsMentions#e04b5ceb flags:# q:flags.0?string top_msg_id:flags.1?int = ChannelParticipantsFilter;\nchannels.channelParticipants#f56ee2a8 count:int participants:Vector users:Vector = channels.ChannelParticipants;\nchannels.channelParticipantsNotModified#f0173fe9 = channels.ChannelParticipants;\nchannels.channelParticipant#d0d9b163 participant:ChannelParticipant users:Vector = channels.ChannelParticipant;\nhelp.termsOfService#780a0310 flags:# popup:flags.0?true id:DataJSON text:string entities:Vector min_age_confirm:flags.1?int = help.TermsOfService;\nmessages.savedGifsNotModified#e8025ca2 = messages.SavedGifs;\nmessages.savedGifs#2e0709a5 hash:int gifs:Vector = messages.SavedGifs;\ninputBotInlineMessageMediaAuto#3380c786 flags:# message:string entities:flags.1?Vector reply_markup:flags.2?ReplyMarkup = InputBotInlineMessage;\ninputBotInlineMessageText#3dcd7a87 flags:# no_webpage:flags.0?true message:string entities:flags.1?Vector reply_markup:flags.2?ReplyMarkup = InputBotInlineMessage;\ninputBotInlineMessageMediaGeo#96929a85 flags:# geo_point:InputGeoPoint heading:flags.0?int period:flags.1?int proximity_notification_radius:flags.3?int reply_markup:flags.2?ReplyMarkup = InputBotInlineMessage;\ninputBotInlineMessageMediaVenue#417bbf11 flags:# geo_point:InputGeoPoint title:string address:string provider:string venue_id:string venue_type:string reply_markup:flags.2?ReplyMarkup = InputBotInlineMessage;\ninputBotInlineMessageMediaContact#a6edbffd flags:# phone_number:string first_name:string last_name:string vcard:string reply_markup:flags.2?ReplyMarkup = InputBotInlineMessage;\ninputBotInlineMessageGame#4b425864 flags:# reply_markup:flags.2?ReplyMarkup = InputBotInlineMessage;\ninputBotInlineResult#88bf9319 flags:# id:string type:string title:flags.1?string description:flags.2?string url:flags.3?string thumb:flags.4?InputWebDocument content:flags.5?InputWebDocument send_message:InputBotInlineMessage = InputBotInlineResult;\ninputBotInlineResultPhoto#a8d864a7 id:string type:string photo:InputPhoto send_message:InputBotInlineMessage = InputBotInlineResult;\ninputBotInlineResultDocument#fff8fdc4 flags:# id:string type:string title:flags.1?string description:flags.2?string document:InputDocument send_message:InputBotInlineMessage = InputBotInlineResult;\ninputBotInlineResultGame#4fa417f2 id:string short_name:string send_message:InputBotInlineMessage = InputBotInlineResult;\nbotInlineMessageMediaAuto#764cf810 flags:# message:string entities:flags.1?Vector reply_markup:flags.2?ReplyMarkup = BotInlineMessage;\nbotInlineMessageText#8c7f65e2 flags:# no_webpage:flags.0?true message:string entities:flags.1?Vector reply_markup:flags.2?ReplyMarkup = BotInlineMessage;\nbotInlineMessageMediaGeo#51846fd flags:# geo:GeoPoint heading:flags.0?int period:flags.1?int proximity_notification_radius:flags.3?int reply_markup:flags.2?ReplyMarkup = BotInlineMessage;\nbotInlineMessageMediaVenue#8a86659c flags:# geo:GeoPoint title:string address:string provider:string venue_id:string venue_type:string reply_markup:flags.2?ReplyMarkup = BotInlineMessage;\nbotInlineMessageMediaContact#18d1cdc2 flags:# phone_number:string first_name:string last_name:string vcard:string reply_markup:flags.2?ReplyMarkup = BotInlineMessage;\nbotInlineResult#11965f3a flags:# id:string type:string title:flags.1?string description:flags.2?string url:flags.3?string thumb:flags.4?WebDocument content:flags.5?WebDocument send_message:BotInlineMessage = BotInlineResult;\nbotInlineMediaResult#17db940b flags:# id:string type:string photo:flags.0?Photo document:flags.1?Document title:flags.2?string description:flags.3?string send_message:BotInlineMessage = BotInlineResult;\nmessages.botResults#947ca848 flags:# gallery:flags.0?true query_id:long next_offset:flags.1?string switch_pm:flags.2?InlineBotSwitchPM results:Vector cache_time:int users:Vector = messages.BotResults;\nexportedMessageLink#5dab1af4 link:string html:string = ExportedMessageLink;\nmessageFwdHeader#5f777dce flags:# from_id:flags.0?Peer from_name:flags.5?string date:int channel_post:flags.2?int post_author:flags.3?string saved_from_peer:flags.4?Peer saved_from_msg_id:flags.4?int psa_type:flags.6?string = MessageFwdHeader;\nauth.codeTypeSms#72a3158c = auth.CodeType;\nauth.codeTypeCall#741cd3e3 = auth.CodeType;\nauth.codeTypeFlashCall#226ccefb = auth.CodeType;\nauth.sentCodeTypeApp#3dbb5986 length:int = auth.SentCodeType;\nauth.sentCodeTypeSms#c000bba2 length:int = auth.SentCodeType;\nauth.sentCodeTypeCall#5353e5a7 length:int = auth.SentCodeType;\nauth.sentCodeTypeFlashCall#ab03c6d9 pattern:string = auth.SentCodeType;\nmessages.botCallbackAnswer#36585ea4 flags:# alert:flags.1?true has_url:flags.3?true native_ui:flags.4?true message:flags.0?string url:flags.2?string cache_time:int = messages.BotCallbackAnswer;\nmessages.messageEditData#26b5dde6 flags:# caption:flags.0?true = messages.MessageEditData;\ninputBotInlineMessageID#890c3d89 dc_id:int id:long access_hash:long = InputBotInlineMessageID;\ninlineBotSwitchPM#3c20629f text:string start_param:string = InlineBotSwitchPM;\nmessages.peerDialogs#3371c354 dialogs:Vector messages:Vector chats:Vector users:Vector state:updates.State = messages.PeerDialogs;\ntopPeer#edcdc05b peer:Peer rating:double = TopPeer;\ntopPeerCategoryBotsPM#ab661b5b = TopPeerCategory;\ntopPeerCategoryBotsInline#148677e2 = TopPeerCategory;\ntopPeerCategoryCorrespondents#637b7ed = TopPeerCategory;\ntopPeerCategoryGroups#bd17a14a = TopPeerCategory;\ntopPeerCategoryChannels#161d9628 = TopPeerCategory;\ntopPeerCategoryPhoneCalls#1e76a78c = TopPeerCategory;\ntopPeerCategoryForwardUsers#a8406ca9 = TopPeerCategory;\ntopPeerCategoryForwardChats#fbeec0f0 = TopPeerCategory;\ntopPeerCategoryPeers#fb834291 category:TopPeerCategory count:int peers:Vector = TopPeerCategoryPeers;\ncontacts.topPeersNotModified#de266ef5 = contacts.TopPeers;\ncontacts.topPeers#70b772a8 categories:Vector chats:Vector users:Vector = contacts.TopPeers;\ncontacts.topPeersDisabled#b52c939d = contacts.TopPeers;\ndraftMessageEmpty#1b0c841a flags:# date:flags.0?int = DraftMessage;\ndraftMessage#fd8e711f flags:# no_webpage:flags.1?true reply_to_msg_id:flags.0?int message:string entities:flags.3?Vector date:int = DraftMessage;\nmessages.featuredStickersNotModified#c6dc0c66 count:int = messages.FeaturedStickers;\nmessages.featuredStickers#b6abc341 hash:int count:int sets:Vector unread:Vector = messages.FeaturedStickers;\nmessages.recentStickersNotModified#b17f890 = messages.RecentStickers;\nmessages.recentStickers#22f3afb3 hash:int packs:Vector stickers:Vector dates:Vector = messages.RecentStickers;\nmessages.archivedStickers#4fcba9c8 count:int sets:Vector = messages.ArchivedStickers;\nmessages.stickerSetInstallResultSuccess#38641628 = messages.StickerSetInstallResult;\nmessages.stickerSetInstallResultArchive#35e410a8 sets:Vector = messages.StickerSetInstallResult;\nstickerSetCovered#6410a5d2 set:StickerSet cover:Document = StickerSetCovered;\nstickerSetMultiCovered#3407e51b set:StickerSet covers:Vector = StickerSetCovered;\nmaskCoords#aed6dbb2 n:int x:double y:double zoom:double = MaskCoords;\ninputStickeredMediaPhoto#4a992157 id:InputPhoto = InputStickeredMedia;\ninputStickeredMediaDocument#438865b id:InputDocument = InputStickeredMedia;\ngame#bdf9653b flags:# id:long access_hash:long short_name:string title:string description:string photo:Photo document:flags.0?Document = Game;\ninputGameID#32c3e77 id:long access_hash:long = InputGame;\ninputGameShortName#c331e80a bot_id:InputUser short_name:string = InputGame;\nhighScore#58fffcd0 pos:int user_id:int score:int = HighScore;\nmessages.highScores#9a3bfd99 scores:Vector users:Vector = messages.HighScores;\ntextEmpty#dc3d824f = RichText;\ntextPlain#744694e0 text:string = RichText;\ntextBold#6724abc4 text:RichText = RichText;\ntextItalic#d912a59c text:RichText = RichText;\ntextUnderline#c12622c4 text:RichText = RichText;\ntextStrike#9bf8bb95 text:RichText = RichText;\ntextFixed#6c3f19b9 text:RichText = RichText;\ntextUrl#3c2884c1 text:RichText url:string webpage_id:long = RichText;\ntextEmail#de5a0dd6 text:RichText email:string = RichText;\ntextConcat#7e6260d7 texts:Vector = RichText;\ntextSubscript#ed6a8504 text:RichText = RichText;\ntextSuperscript#c7fb5e01 text:RichText = RichText;\ntextMarked#34b8621 text:RichText = RichText;\ntextPhone#1ccb966a text:RichText phone:string = RichText;\ntextImage#81ccf4f document_id:long w:int h:int = RichText;\ntextAnchor#35553762 text:RichText name:string = RichText;\npageBlockUnsupported#13567e8a = PageBlock;\npageBlockTitle#70abc3fd text:RichText = PageBlock;\npageBlockSubtitle#8ffa9a1f text:RichText = PageBlock;\npageBlockAuthorDate#baafe5e0 author:RichText published_date:int = PageBlock;\npageBlockHeader#bfd064ec text:RichText = PageBlock;\npageBlockSubheader#f12bb6e1 text:RichText = PageBlock;\npageBlockParagraph#467a0766 text:RichText = PageBlock;\npageBlockPreformatted#c070d93e text:RichText language:string = PageBlock;\npageBlockFooter#48870999 text:RichText = PageBlock;\npageBlockDivider#db20b188 = PageBlock;\npageBlockAnchor#ce0d37b0 name:string = PageBlock;\npageBlockList#e4e88011 items:Vector = PageBlock;\npageBlockBlockquote#263d7c26 text:RichText caption:RichText = PageBlock;\npageBlockPullquote#4f4456d3 text:RichText caption:RichText = PageBlock;\npageBlockPhoto#1759c560 flags:# photo_id:long caption:PageCaption url:flags.0?string webpage_id:flags.0?long = PageBlock;\npageBlockVideo#7c8fe7b6 flags:# autoplay:flags.0?true loop:flags.1?true video_id:long caption:PageCaption = PageBlock;\npageBlockCover#39f23300 cover:PageBlock = PageBlock;\npageBlockEmbed#a8718dc5 flags:# full_width:flags.0?true allow_scrolling:flags.3?true url:flags.1?string html:flags.2?string poster_photo_id:flags.4?long w:flags.5?int h:flags.5?int caption:PageCaption = PageBlock;\npageBlockEmbedPost#f259a80b url:string webpage_id:long author_photo_id:long author:string date:int blocks:Vector caption:PageCaption = PageBlock;\npageBlockCollage#65a0fa4d items:Vector caption:PageCaption = PageBlock;\npageBlockSlideshow#31f9590 items:Vector caption:PageCaption = PageBlock;\npageBlockChannel#ef1751b5 channel:Chat = PageBlock;\npageBlockAudio#804361ea audio_id:long caption:PageCaption = PageBlock;\npageBlockKicker#1e148390 text:RichText = PageBlock;\npageBlockTable#bf4dea82 flags:# bordered:flags.0?true striped:flags.1?true title:RichText rows:Vector = PageBlock;\npageBlockOrderedList#9a8ae1e1 items:Vector = PageBlock;\npageBlockDetails#76768bed flags:# open:flags.0?true blocks:Vector title:RichText = PageBlock;\npageBlockRelatedArticles#16115a96 title:RichText articles:Vector = PageBlock;\npageBlockMap#a44f3ef6 geo:GeoPoint zoom:int w:int h:int caption:PageCaption = PageBlock;\nphoneCallDiscardReasonMissed#85e42301 = PhoneCallDiscardReason;\nphoneCallDiscardReasonDisconnect#e095c1a0 = PhoneCallDiscardReason;\nphoneCallDiscardReasonHangup#57adc690 = PhoneCallDiscardReason;\nphoneCallDiscardReasonBusy#faf7e8c9 = PhoneCallDiscardReason;\ndataJSON#7d748d04 data:string = DataJSON;\nlabeledPrice#cb296bf8 label:string amount:long = LabeledPrice;\ninvoice#c30aa358 flags:# test:flags.0?true name_requested:flags.1?true phone_requested:flags.2?true email_requested:flags.3?true shipping_address_requested:flags.4?true flexible:flags.5?true phone_to_provider:flags.6?true email_to_provider:flags.7?true currency:string prices:Vector = Invoice;\npaymentCharge#ea02c27e id:string provider_charge_id:string = PaymentCharge;\npostAddress#1e8caaeb street_line1:string street_line2:string city:string state:string country_iso2:string post_code:string = PostAddress;\npaymentRequestedInfo#909c3f94 flags:# name:flags.0?string phone:flags.1?string email:flags.2?string shipping_address:flags.3?PostAddress = PaymentRequestedInfo;\npaymentSavedCredentialsCard#cdc27a1f id:string title:string = PaymentSavedCredentials;\nwebDocument#1c570ed1 url:string access_hash:long size:int mime_type:string attributes:Vector = WebDocument;\nwebDocumentNoProxy#f9c8bcc6 url:string size:int mime_type:string attributes:Vector = WebDocument;\ninputWebDocument#9bed434d url:string size:int mime_type:string attributes:Vector = InputWebDocument;\ninputWebFileLocation#c239d686 url:string access_hash:long = InputWebFileLocation;\ninputWebFileGeoPointLocation#9f2221c9 geo_point:InputGeoPoint access_hash:long w:int h:int zoom:int scale:int = InputWebFileLocation;\nupload.webFile#21e753bc size:int mime_type:string file_type:storage.FileType mtime:int bytes:bytes = upload.WebFile;\npayments.paymentForm#3f56aea3 flags:# can_save_credentials:flags.2?true password_missing:flags.3?true bot_id:int invoice:Invoice provider_id:int url:string native_provider:flags.4?string native_params:flags.4?DataJSON saved_info:flags.0?PaymentRequestedInfo saved_credentials:flags.1?PaymentSavedCredentials users:Vector = payments.PaymentForm;\npayments.validatedRequestedInfo#d1451883 flags:# id:flags.0?string shipping_options:flags.1?Vector = payments.ValidatedRequestedInfo;\npayments.paymentResult#4e5f810d updates:Updates = payments.PaymentResult;\npayments.paymentVerificationNeeded#d8411139 url:string = payments.PaymentResult;\npayments.paymentReceipt#500911e1 flags:# date:int bot_id:int invoice:Invoice provider_id:int info:flags.0?PaymentRequestedInfo shipping:flags.1?ShippingOption currency:string total_amount:long credentials_title:string users:Vector = payments.PaymentReceipt;\npayments.savedInfo#fb8fe43c flags:# has_saved_credentials:flags.1?true saved_info:flags.0?PaymentRequestedInfo = payments.SavedInfo;\ninputPaymentCredentialsSaved#c10eb2cf id:string tmp_password:bytes = InputPaymentCredentials;\ninputPaymentCredentials#3417d728 flags:# save:flags.0?true data:DataJSON = InputPaymentCredentials;\ninputPaymentCredentialsApplePay#aa1c39f payment_data:DataJSON = InputPaymentCredentials;\ninputPaymentCredentialsAndroidPay#ca05d50e payment_token:DataJSON google_transaction_id:string = InputPaymentCredentials;\naccount.tmpPassword#db64fd34 tmp_password:bytes valid_until:int = account.TmpPassword;\nshippingOption#b6213cdf id:string title:string prices:Vector = ShippingOption;\ninputStickerSetItem#ffa0a496 flags:# document:InputDocument emoji:string mask_coords:flags.0?MaskCoords = InputStickerSetItem;\ninputPhoneCall#1e36fded id:long access_hash:long = InputPhoneCall;\nphoneCallEmpty#5366c915 id:long = PhoneCall;\nphoneCallWaiting#1b8f4ad1 flags:# video:flags.6?true id:long access_hash:long date:int admin_id:int participant_id:int protocol:PhoneCallProtocol receive_date:flags.0?int = PhoneCall;\nphoneCallRequested#87eabb53 flags:# video:flags.6?true id:long access_hash:long date:int admin_id:int participant_id:int g_a_hash:bytes protocol:PhoneCallProtocol = PhoneCall;\nphoneCallAccepted#997c454a flags:# video:flags.6?true id:long access_hash:long date:int admin_id:int participant_id:int g_b:bytes protocol:PhoneCallProtocol = PhoneCall;\nphoneCall#8742ae7f flags:# p2p_allowed:flags.5?true video:flags.6?true id:long access_hash:long date:int admin_id:int participant_id:int g_a_or_b:bytes key_fingerprint:long protocol:PhoneCallProtocol connections:Vector start_date:int = PhoneCall;\nphoneCallDiscarded#50ca4de1 flags:# need_rating:flags.2?true need_debug:flags.3?true video:flags.6?true id:long reason:flags.0?PhoneCallDiscardReason duration:flags.1?int = PhoneCall;\nphoneConnection#9d4c17c0 id:long ip:string ipv6:string port:int peer_tag:bytes = PhoneConnection;\nphoneConnectionWebrtc#635fe375 flags:# turn:flags.0?true stun:flags.1?true id:long ip:string ipv6:string port:int username:string password:string = PhoneConnection;\nphoneCallProtocol#fc878fc8 flags:# udp_p2p:flags.0?true udp_reflector:flags.1?true min_layer:int max_layer:int library_versions:Vector = PhoneCallProtocol;\nphone.phoneCall#ec82e140 phone_call:PhoneCall users:Vector = phone.PhoneCall;\nupload.cdnFileReuploadNeeded#eea8e46e request_token:bytes = upload.CdnFile;\nupload.cdnFile#a99fca4f bytes:bytes = upload.CdnFile;\ncdnPublicKey#c982eaba dc_id:int public_key:string = CdnPublicKey;\ncdnConfig#5725e40a public_keys:Vector = CdnConfig;\nlangPackString#cad181f6 key:string value:string = LangPackString;\nlangPackStringPluralized#6c47ac9f flags:# key:string zero_value:flags.0?string one_value:flags.1?string two_value:flags.2?string few_value:flags.3?string many_value:flags.4?string other_value:string = LangPackString;\nlangPackStringDeleted#2979eeb2 key:string = LangPackString;\nlangPackDifference#f385c1f6 lang_code:string from_version:int version:int strings:Vector = LangPackDifference;\nlangPackLanguage#eeca5ce3 flags:# official:flags.0?true rtl:flags.2?true beta:flags.3?true name:string native_name:string lang_code:string base_lang_code:flags.1?string plural_code:string strings_count:int translated_count:int translations_url:string = LangPackLanguage;\nchannelAdminLogEventActionChangeTitle#e6dfb825 prev_value:string new_value:string = ChannelAdminLogEventAction;\nchannelAdminLogEventActionChangeAbout#55188a2e prev_value:string new_value:string = ChannelAdminLogEventAction;\nchannelAdminLogEventActionChangeUsername#6a4afc38 prev_value:string new_value:string = ChannelAdminLogEventAction;\nchannelAdminLogEventActionChangePhoto#434bd2af prev_photo:Photo new_photo:Photo = ChannelAdminLogEventAction;\nchannelAdminLogEventActionToggleInvites#1b7907ae new_value:Bool = ChannelAdminLogEventAction;\nchannelAdminLogEventActionToggleSignatures#26ae0971 new_value:Bool = ChannelAdminLogEventAction;\nchannelAdminLogEventActionUpdatePinned#e9e82c18 message:Message = ChannelAdminLogEventAction;\nchannelAdminLogEventActionEditMessage#709b2405 prev_message:Message new_message:Message = ChannelAdminLogEventAction;\nchannelAdminLogEventActionDeleteMessage#42e047bb message:Message = ChannelAdminLogEventAction;\nchannelAdminLogEventActionParticipantJoin#183040d3 = ChannelAdminLogEventAction;\nchannelAdminLogEventActionParticipantLeave#f89777f2 = ChannelAdminLogEventAction;\nchannelAdminLogEventActionParticipantInvite#e31c34d8 participant:ChannelParticipant = ChannelAdminLogEventAction;\nchannelAdminLogEventActionParticipantToggleBan#e6d83d7e prev_participant:ChannelParticipant new_participant:ChannelParticipant = ChannelAdminLogEventAction;\nchannelAdminLogEventActionParticipantToggleAdmin#d5676710 prev_participant:ChannelParticipant new_participant:ChannelParticipant = ChannelAdminLogEventAction;\nchannelAdminLogEventActionChangeStickerSet#b1c3caa7 prev_stickerset:InputStickerSet new_stickerset:InputStickerSet = ChannelAdminLogEventAction;\nchannelAdminLogEventActionTogglePreHistoryHidden#5f5c95f1 new_value:Bool = ChannelAdminLogEventAction;\nchannelAdminLogEventActionDefaultBannedRights#2df5fc0a prev_banned_rights:ChatBannedRights new_banned_rights:ChatBannedRights = ChannelAdminLogEventAction;\nchannelAdminLogEventActionStopPoll#8f079643 message:Message = ChannelAdminLogEventAction;\nchannelAdminLogEventActionChangeLinkedChat#a26f881b prev_value:int new_value:int = ChannelAdminLogEventAction;\nchannelAdminLogEventActionChangeLocation#e6b76ae prev_value:ChannelLocation new_value:ChannelLocation = ChannelAdminLogEventAction;\nchannelAdminLogEventActionToggleSlowMode#53909779 prev_value:int new_value:int = ChannelAdminLogEventAction;\nchannelAdminLogEvent#3b5a3e40 id:long date:int user_id:int action:ChannelAdminLogEventAction = ChannelAdminLogEvent;\nchannels.adminLogResults#ed8af74d events:Vector chats:Vector users:Vector = channels.AdminLogResults;\nchannelAdminLogEventsFilter#ea107ae4 flags:# join:flags.0?true leave:flags.1?true invite:flags.2?true ban:flags.3?true unban:flags.4?true kick:flags.5?true unkick:flags.6?true promote:flags.7?true demote:flags.8?true info:flags.9?true settings:flags.10?true pinned:flags.11?true edit:flags.12?true delete:flags.13?true = ChannelAdminLogEventsFilter;\npopularContact#5ce14175 client_id:long importers:int = PopularContact;\nmessages.favedStickersNotModified#9e8fa6d3 = messages.FavedStickers;\nmessages.favedStickers#f37f2f16 hash:int packs:Vector stickers:Vector = messages.FavedStickers;\nrecentMeUrlUnknown#46e1d13d url:string = RecentMeUrl;\nrecentMeUrlUser#8dbc3336 url:string user_id:int = RecentMeUrl;\nrecentMeUrlChat#a01b22f9 url:string chat_id:int = RecentMeUrl;\nrecentMeUrlChatInvite#eb49081d url:string chat_invite:ChatInvite = RecentMeUrl;\nrecentMeUrlStickerSet#bc0a57dc url:string set:StickerSetCovered = RecentMeUrl;\nhelp.recentMeUrls#e0310d7 urls:Vector chats:Vector users:Vector = help.RecentMeUrls;\ninputSingleMedia#1cc6e91f flags:# media:InputMedia random_id:long message:string entities:flags.0?Vector = InputSingleMedia;\nwebAuthorization#cac943f2 hash:long bot_id:int domain:string browser:string platform:string date_created:int date_active:int ip:string region:string = WebAuthorization;\naccount.webAuthorizations#ed56c9fc authorizations:Vector users:Vector = account.WebAuthorizations;\ninputMessageID#a676a322 id:int = InputMessage;\ninputMessageReplyTo#bad88395 id:int = InputMessage;\ninputMessagePinned#86872538 = InputMessage;\ninputMessageCallbackQuery#acfa1a7e id:int query_id:long = InputMessage;\ninputDialogPeer#fcaafeb7 peer:InputPeer = InputDialogPeer;\ninputDialogPeerFolder#64600527 folder_id:int = InputDialogPeer;\ndialogPeer#e56dbf05 peer:Peer = DialogPeer;\ndialogPeerFolder#514519e2 folder_id:int = DialogPeer;\nmessages.foundStickerSetsNotModified#d54b65d = messages.FoundStickerSets;\nmessages.foundStickerSets#5108d648 hash:int sets:Vector = messages.FoundStickerSets;\nfileHash#6242c773 offset:int limit:int hash:bytes = FileHash;\ninputClientProxy#75588b3f address:string port:int = InputClientProxy;\nhelp.termsOfServiceUpdateEmpty#e3309f7f expires:int = help.TermsOfServiceUpdate;\nhelp.termsOfServiceUpdate#28ecf961 expires:int terms_of_service:help.TermsOfService = help.TermsOfServiceUpdate;\ninputSecureFileUploaded#3334b0f0 id:long parts:int md5_checksum:string file_hash:bytes secret:bytes = InputSecureFile;\ninputSecureFile#5367e5be id:long access_hash:long = InputSecureFile;\nsecureFileEmpty#64199744 = SecureFile;\nsecureFile#e0277a62 id:long access_hash:long size:int dc_id:int date:int file_hash:bytes secret:bytes = SecureFile;\nsecureData#8aeabec3 data:bytes data_hash:bytes secret:bytes = SecureData;\nsecurePlainPhone#7d6099dd phone:string = SecurePlainData;\nsecurePlainEmail#21ec5a5f email:string = SecurePlainData;\nsecureValueTypePersonalDetails#9d2a81e3 = SecureValueType;\nsecureValueTypePassport#3dac6a00 = SecureValueType;\nsecureValueTypeDriverLicense#6e425c4 = SecureValueType;\nsecureValueTypeIdentityCard#a0d0744b = SecureValueType;\nsecureValueTypeInternalPassport#99a48f23 = SecureValueType;\nsecureValueTypeAddress#cbe31e26 = SecureValueType;\nsecureValueTypeUtilityBill#fc36954e = SecureValueType;\nsecureValueTypeBankStatement#89137c0d = SecureValueType;\nsecureValueTypeRentalAgreement#8b883488 = SecureValueType;\nsecureValueTypePassportRegistration#99e3806a = SecureValueType;\nsecureValueTypeTemporaryRegistration#ea02ec33 = SecureValueType;\nsecureValueTypePhone#b320aadb = SecureValueType;\nsecureValueTypeEmail#8e3ca7ee = SecureValueType;\nsecureValue#187fa0ca flags:# type:SecureValueType data:flags.0?SecureData front_side:flags.1?SecureFile reverse_side:flags.2?SecureFile selfie:flags.3?SecureFile translation:flags.6?Vector files:flags.4?Vector plain_data:flags.5?SecurePlainData hash:bytes = SecureValue;\ninputSecureValue#db21d0a7 flags:# type:SecureValueType data:flags.0?SecureData front_side:flags.1?InputSecureFile reverse_side:flags.2?InputSecureFile selfie:flags.3?InputSecureFile translation:flags.6?Vector files:flags.4?Vector plain_data:flags.5?SecurePlainData = InputSecureValue;\nsecureValueHash#ed1ecdb0 type:SecureValueType hash:bytes = SecureValueHash;\nsecureValueErrorData#e8a40bd9 type:SecureValueType data_hash:bytes field:string text:string = SecureValueError;\nsecureValueErrorFrontSide#be3dfa type:SecureValueType file_hash:bytes text:string = SecureValueError;\nsecureValueErrorReverseSide#868a2aa5 type:SecureValueType file_hash:bytes text:string = SecureValueError;\nsecureValueErrorSelfie#e537ced6 type:SecureValueType file_hash:bytes text:string = SecureValueError;\nsecureValueErrorFile#7a700873 type:SecureValueType file_hash:bytes text:string = SecureValueError;\nsecureValueErrorFiles#666220e9 type:SecureValueType file_hash:Vector text:string = SecureValueError;\nsecureValueError#869d758f type:SecureValueType hash:bytes text:string = SecureValueError;\nsecureValueErrorTranslationFile#a1144770 type:SecureValueType file_hash:bytes text:string = SecureValueError;\nsecureValueErrorTranslationFiles#34636dd8 type:SecureValueType file_hash:Vector text:string = SecureValueError;\nsecureCredentialsEncrypted#33f0ea47 data:bytes hash:bytes secret:bytes = SecureCredentialsEncrypted;\naccount.authorizationForm#ad2e1cd8 flags:# required_types:Vector values:Vector errors:Vector users:Vector privacy_policy_url:flags.0?string = account.AuthorizationForm;\naccount.sentEmailCode#811f854f email_pattern:string length:int = account.SentEmailCode;\nhelp.deepLinkInfoEmpty#66afa166 = help.DeepLinkInfo;\nhelp.deepLinkInfo#6a4ee832 flags:# update_app:flags.0?true message:string entities:flags.1?Vector = help.DeepLinkInfo;\nsavedPhoneContact#1142bd56 phone:string first_name:string last_name:string date:int = SavedContact;\naccount.takeout#4dba4501 id:long = account.Takeout;\npasswordKdfAlgoUnknown#d45ab096 = PasswordKdfAlgo;\npasswordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow#3a912d4a salt1:bytes salt2:bytes g:int p:bytes = PasswordKdfAlgo;\nsecurePasswordKdfAlgoUnknown#4a8537 = SecurePasswordKdfAlgo;\nsecurePasswordKdfAlgoPBKDF2HMACSHA512iter100000#bbf2dda0 salt:bytes = SecurePasswordKdfAlgo;\nsecurePasswordKdfAlgoSHA512#86471d92 salt:bytes = SecurePasswordKdfAlgo;\nsecureSecretSettings#1527bcac secure_algo:SecurePasswordKdfAlgo secure_secret:bytes secure_secret_id:long = SecureSecretSettings;\ninputCheckPasswordEmpty#9880f658 = InputCheckPasswordSRP;\ninputCheckPasswordSRP#d27ff082 srp_id:long A:bytes M1:bytes = InputCheckPasswordSRP;\nsecureRequiredType#829d99da flags:# native_names:flags.0?true selfie_required:flags.1?true translation_required:flags.2?true type:SecureValueType = SecureRequiredType;\nsecureRequiredTypeOneOf#27477b4 types:Vector = SecureRequiredType;\nhelp.passportConfigNotModified#bfb9f457 = help.PassportConfig;\nhelp.passportConfig#a098d6af hash:int countries_langs:DataJSON = help.PassportConfig;\ninputAppEvent#1d1b1245 time:double type:string peer:long data:JSONValue = InputAppEvent;\njsonObjectValue#c0de1bd9 key:string value:JSONValue = JSONObjectValue;\njsonNull#3f6d7b68 = JSONValue;\njsonBool#c7345e6a value:Bool = JSONValue;\njsonNumber#2be0dfa4 value:double = JSONValue;\njsonString#b71e767a value:string = JSONValue;\njsonArray#f7444763 value:Vector = JSONValue;\njsonObject#99c1d49d value:Vector = JSONValue;\npageTableCell#34566b6a flags:# header:flags.0?true align_center:flags.3?true align_right:flags.4?true valign_middle:flags.5?true valign_bottom:flags.6?true text:flags.7?RichText colspan:flags.1?int rowspan:flags.2?int = PageTableCell;\npageTableRow#e0c0c5e5 cells:Vector = PageTableRow;\npageCaption#6f747657 text:RichText credit:RichText = PageCaption;\npageListItemText#b92fb6cd text:RichText = PageListItem;\npageListItemBlocks#25e073fc blocks:Vector = PageListItem;\npageListOrderedItemText#5e068047 num:string text:RichText = PageListOrderedItem;\npageListOrderedItemBlocks#98dd8936 num:string blocks:Vector = PageListOrderedItem;\npageRelatedArticle#b390dc08 flags:# url:string webpage_id:long title:flags.0?string description:flags.1?string photo_id:flags.2?long author:flags.3?string published_date:flags.4?int = PageRelatedArticle;\npage#98657f0d flags:# part:flags.0?true rtl:flags.1?true v2:flags.2?true url:string blocks:Vector photos:Vector documents:Vector views:flags.3?int = Page;\nhelp.supportName#8c05f1c9 name:string = help.SupportName;\nhelp.userInfoEmpty#f3ae2eed = help.UserInfo;\nhelp.userInfo#1eb3758 message:string entities:Vector author:string date:int = help.UserInfo;\npollAnswer#6ca9c2e9 text:string option:bytes = PollAnswer;\npoll#86e18161 id:long flags:# closed:flags.0?true public_voters:flags.1?true multiple_choice:flags.2?true quiz:flags.3?true question:string answers:Vector close_period:flags.4?int close_date:flags.5?int = Poll;\npollAnswerVoters#3b6ddad2 flags:# chosen:flags.0?true correct:flags.1?true option:bytes voters:int = PollAnswerVoters;\npollResults#badcc1a3 flags:# min:flags.0?true results:flags.1?Vector total_voters:flags.2?int recent_voters:flags.3?Vector solution:flags.4?string solution_entities:flags.4?Vector = PollResults;\nchatOnlines#f041e250 onlines:int = ChatOnlines;\nstatsURL#47a971e0 url:string = StatsURL;\nchatAdminRights#5fb224d5 flags:# change_info:flags.0?true post_messages:flags.1?true edit_messages:flags.2?true delete_messages:flags.3?true ban_users:flags.4?true invite_users:flags.5?true pin_messages:flags.7?true add_admins:flags.9?true anonymous:flags.10?true = ChatAdminRights;\nchatBannedRights#9f120418 flags:# view_messages:flags.0?true send_messages:flags.1?true send_media:flags.2?true send_stickers:flags.3?true send_gifs:flags.4?true send_games:flags.5?true send_inline:flags.6?true embed_links:flags.7?true send_polls:flags.8?true change_info:flags.10?true invite_users:flags.15?true pin_messages:flags.17?true until_date:int = ChatBannedRights;\ninputWallPaper#e630b979 id:long access_hash:long = InputWallPaper;\ninputWallPaperSlug#72091c80 slug:string = InputWallPaper;\ninputWallPaperNoFile#8427bbac = InputWallPaper;\naccount.wallPapersNotModified#1c199183 = account.WallPapers;\naccount.wallPapers#702b65a9 hash:int wallpapers:Vector = account.WallPapers;\ncodeSettings#debebe83 flags:# allow_flashcall:flags.0?true current_number:flags.1?true allow_app_hash:flags.4?true = CodeSettings;\nwallPaperSettings#5086cf8 flags:# blur:flags.1?true motion:flags.2?true background_color:flags.0?int second_background_color:flags.4?int intensity:flags.3?int rotation:flags.4?int = WallPaperSettings;\nautoDownloadSettings#e04232f3 flags:# disabled:flags.0?true video_preload_large:flags.1?true audio_preload_next:flags.2?true phonecalls_less_data:flags.3?true photo_size_max:int video_size_max:int file_size_max:int video_upload_maxbitrate:int = AutoDownloadSettings;\naccount.autoDownloadSettings#63cacf26 low:AutoDownloadSettings medium:AutoDownloadSettings high:AutoDownloadSettings = account.AutoDownloadSettings;\nemojiKeyword#d5b3b9f9 keyword:string emoticons:Vector = EmojiKeyword;\nemojiKeywordDeleted#236df622 keyword:string emoticons:Vector = EmojiKeyword;\nemojiKeywordsDifference#5cc761bd lang_code:string from_version:int version:int keywords:Vector = EmojiKeywordsDifference;\nemojiURL#a575739d url:string = EmojiURL;\nemojiLanguage#b3fb5361 lang_code:string = EmojiLanguage;\nfileLocationToBeDeprecated#bc7fc6cd volume_id:long local_id:int = FileLocation;\nfolder#ff544e65 flags:# autofill_new_broadcasts:flags.0?true autofill_public_groups:flags.1?true autofill_new_correspondents:flags.2?true id:int title:string photo:flags.3?ChatPhoto = Folder;\ninputFolderPeer#fbd2c296 peer:InputPeer folder_id:int = InputFolderPeer;\nfolderPeer#e9baa668 peer:Peer folder_id:int = FolderPeer;\nmessages.searchCounter#e844ebff flags:# inexact:flags.1?true filter:MessagesFilter count:int = messages.SearchCounter;\nurlAuthResultRequest#92d33a0e flags:# request_write_access:flags.0?true bot:User domain:string = UrlAuthResult;\nurlAuthResultAccepted#8f8c0e4e url:string = UrlAuthResult;\nurlAuthResultDefault#a9d6db1f = UrlAuthResult;\nchannelLocationEmpty#bfb5ad8b = ChannelLocation;\nchannelLocation#209b82db geo_point:GeoPoint address:string = ChannelLocation;\npeerLocated#ca461b5d peer:Peer expires:int distance:int = PeerLocated;\npeerSelfLocated#f8ec284b expires:int = PeerLocated;\nrestrictionReason#d072acb4 platform:string reason:string text:string = RestrictionReason;\ninputTheme#3c5693e9 id:long access_hash:long = InputTheme;\ninputThemeSlug#f5890df1 slug:string = InputTheme;\ntheme#28f1114 flags:# creator:flags.0?true default:flags.1?true id:long access_hash:long slug:string title:string document:flags.2?Document settings:flags.3?ThemeSettings installs_count:int = Theme;\naccount.themesNotModified#f41eb622 = account.Themes;\naccount.themes#7f676421 hash:int themes:Vector = account.Themes;\nauth.loginToken#629f1980 expires:int token:bytes = auth.LoginToken;\nauth.loginTokenMigrateTo#68e9916 dc_id:int token:bytes = auth.LoginToken;\nauth.loginTokenSuccess#390d5c5e authorization:auth.Authorization = auth.LoginToken;\naccount.contentSettings#57e28221 flags:# sensitive_enabled:flags.0?true sensitive_can_change:flags.1?true = account.ContentSettings;\nmessages.inactiveChats#a927fec5 dates:Vector chats:Vector users:Vector = messages.InactiveChats;\nbaseThemeClassic#c3a12462 = BaseTheme;\nbaseThemeDay#fbd81688 = BaseTheme;\nbaseThemeNight#b7b31ea8 = BaseTheme;\nbaseThemeTinted#6d5f77ee = BaseTheme;\nbaseThemeArctic#5b11125a = BaseTheme;\ninputThemeSettings#bd507cd1 flags:# base_theme:BaseTheme accent_color:int message_top_color:flags.0?int message_bottom_color:flags.0?int wallpaper:flags.1?InputWallPaper wallpaper_settings:flags.1?WallPaperSettings = InputThemeSettings;\nthemeSettings#9c14984a flags:# base_theme:BaseTheme accent_color:int message_top_color:flags.0?int message_bottom_color:flags.0?int wallpaper:flags.1?WallPaper = ThemeSettings;\nwebPageAttributeTheme#54b56617 flags:# documents:flags.0?Vector settings:flags.1?ThemeSettings = WebPageAttribute;\nmessageUserVote#a28e5559 user_id:int option:bytes date:int = MessageUserVote;\nmessageUserVoteInputOption#36377430 user_id:int date:int = MessageUserVote;\nmessageUserVoteMultiple#e8fe0de user_id:int options:Vector date:int = MessageUserVote;\nmessages.votesList#823f649 flags:# count:int votes:Vector users:Vector next_offset:flags.0?string = messages.VotesList;\nbankCardOpenUrl#f568028a url:string name:string = BankCardOpenUrl;\npayments.bankCardData#3e24e573 title:string open_urls:Vector = payments.BankCardData;\ndialogFilter#7438f7e8 flags:# contacts:flags.0?true non_contacts:flags.1?true groups:flags.2?true broadcasts:flags.3?true bots:flags.4?true exclude_muted:flags.11?true exclude_read:flags.12?true exclude_archived:flags.13?true id:int title:string emoticon:flags.25?string pinned_peers:Vector include_peers:Vector exclude_peers:Vector = DialogFilter;\ndialogFilterSuggested#77744d4a filter:DialogFilter description:string = DialogFilterSuggested;\n// Some unused classes were removed below this line\nvideoSize#e831c556 flags:# type:string location:FileLocation w:int h:int size:int video_start_ts:flags.0?double = VideoSize;\nmessages.discussionMessage#f5dd8f9d flags:# messages:Vector max_id:flags.0?int read_inbox_max_id:flags.1?int read_outbox_max_id:flags.2?int chats:Vector users:Vector = messages.DiscussionMessage;\nmessageReplyHeader#a6d57763 flags:# reply_to_msg_id:int reply_to_peer_id:flags.0?Peer reply_to_top_id:flags.1?int = MessageReplyHeader;\nmessageReplies#4128faac flags:# comments:flags.0?true replies:int replies_pts:int recent_repliers:flags.1?Vector channel_id:flags.0?int max_id:flags.2?int read_max_id:flags.3?int = MessageReplies;\npeerBlocked#e8fd8014 peer_id:Peer date:int = PeerBlocked;\n---functions---\ninitConnection#c1cd5ea9 {X:Type} flags:# api_id:int device_model:string system_version:string app_version:string system_lang_code:string lang_pack:string lang_code:string proxy:flags.0?InputClientProxy params:flags.1?JSONValue query:!X = X;\ninvokeWithLayer#da9b0d0d {X:Type} layer:int query:!X = X;\nauth.sendCode#a677244f phone_number:string api_id:int api_hash:string settings:CodeSettings = auth.SentCode;\nauth.signUp#80eee427 phone_number:string phone_code_hash:string first_name:string last_name:string = auth.Authorization;\nauth.signIn#bcd51581 phone_number:string phone_code_hash:string phone_code:string = auth.Authorization;\nauth.logOut#5717da40 = Bool;\nauth.resetAuthorizations#9fab0d1a = Bool;\nauth.exportAuthorization#e5bfffcd dc_id:int = auth.ExportedAuthorization;\nauth.importAuthorization#e3ef9613 id:int bytes:bytes = auth.Authorization;\nauth.bindTempAuthKey#cdd42a05 perm_auth_key_id:long nonce:long expires_at:int encrypted_message:bytes = Bool;\nauth.checkPassword#d18b4d16 password:InputCheckPasswordSRP = auth.Authorization;\nauth.requestPasswordRecovery#d897bc66 = auth.PasswordRecovery;\nauth.resendCode#3ef1a9bf phone_number:string phone_code_hash:string = auth.SentCode;\nauth.cancelCode#1f040578 phone_number:string phone_code_hash:string = Bool;\nauth.dropTempAuthKeys#8e48a188 except_auth_keys:Vector = Bool;\nauth.exportLoginToken#b1b41517 api_id:int api_hash:string except_ids:Vector = auth.LoginToken;\nauth.importLoginToken#95ac5ce4 token:bytes = auth.LoginToken;\naccount.updateNotifySettings#84be5b93 peer:InputNotifyPeer settings:InputPeerNotifySettings = Bool;\naccount.getNotifySettings#12b3ad31 peer:InputNotifyPeer = PeerNotifySettings;\naccount.updateProfile#78515775 flags:# first_name:flags.0?string last_name:flags.1?string about:flags.2?string = User;\naccount.getWallPapers#aabb1763 hash:int = account.WallPapers;\naccount.uploadWallPaper#dd853661 file:InputFile mime_type:string settings:WallPaperSettings = WallPaper;\naccount.checkUsername#2714d86c username:string = Bool;\naccount.updateUsername#3e0bdd7c username:string = User;\naccount.getPrivacy#dadbc950 key:InputPrivacyKey = account.PrivacyRules;\naccount.setPrivacy#c9f81ce8 key:InputPrivacyKey rules:Vector = account.PrivacyRules;\naccount.getAuthorizations#e320c158 = account.Authorizations;\naccount.resetAuthorization#df77f3bc hash:long = Bool;\naccount.getPassword#548a30f5 = account.Password;\naccount.getPasswordSettings#9cd4eaf9 password:InputCheckPasswordSRP = account.PasswordSettings;\naccount.updatePasswordSettings#a59b102f password:InputCheckPasswordSRP new_settings:account.PasswordInputSettings = Bool;\naccount.sendConfirmPhoneCode#1b3faa88 hash:string settings:CodeSettings = auth.SentCode;\naccount.confirmPhone#5f2178c3 phone_code_hash:string phone_code:string = Bool;\naccount.getTmpPassword#449e0b51 password:InputCheckPasswordSRP period:int = account.TmpPassword;\naccount.sendVerifyPhoneCode#a5a356f9 phone_number:string settings:CodeSettings = auth.SentCode;\naccount.confirmPasswordEmail#8fdf1920 code:string = Bool;\naccount.getContactSignUpNotification#9f07c728 = Bool;\naccount.setContactSignUpNotification#cff43f61 silent:Bool = Bool;\nusers.getUsers#d91a548 id:Vector = Vector;\nusers.getFullUser#ca30a5b1 id:InputUser = UserFull;\ncontacts.getContacts#c023849f hash:int = contacts.Contacts;\ncontacts.importContacts#2c800be5 contacts:Vector = contacts.ImportedContacts;\ncontacts.deleteContacts#96a0e00 id:Vector = Updates;\ncontacts.block#68cc1411 id:InputPeer = Bool;\ncontacts.unblock#bea65d50 id:InputPeer = Bool;\ncontacts.getBlocked#f57c350f offset:int limit:int = contacts.Blocked;\ncontacts.search#11f812d8 q:string limit:int = contacts.Found;\ncontacts.resolveUsername#f93ccba3 username:string = contacts.ResolvedPeer;\ncontacts.getTopPeers#d4982db5 flags:# correspondents:flags.0?true bots_pm:flags.1?true bots_inline:flags.2?true phone_calls:flags.3?true forward_users:flags.4?true forward_chats:flags.5?true groups:flags.10?true channels:flags.15?true offset:int limit:int hash:int = contacts.TopPeers;\nmessages.getMessages#63c66506 id:Vector = messages.Messages;\nmessages.getDialogs#a0ee3b73 flags:# exclude_pinned:flags.0?true folder_id:flags.1?int offset_date:int offset_id:int offset_peer:InputPeer limit:int hash:int = messages.Dialogs;\nmessages.getHistory#dcbb8260 peer:InputPeer offset_id:int offset_date:int add_offset:int limit:int max_id:int min_id:int hash:int = messages.Messages;\nmessages.search#c352eec flags:# peer:InputPeer q:string from_id:flags.0?InputPeer top_msg_id:flags.1?int filter:MessagesFilter min_date:int max_date:int offset_id:int add_offset:int limit:int max_id:int min_id:int hash:int = messages.Messages;\nmessages.readHistory#e306d3a peer:InputPeer max_id:int = messages.AffectedMessages;\nmessages.deleteHistory#1c015b09 flags:# just_clear:flags.0?true revoke:flags.1?true peer:InputPeer max_id:int = messages.AffectedHistory;\nmessages.deleteMessages#e58e95d2 flags:# revoke:flags.0?true id:Vector = messages.AffectedMessages;\nmessages.receivedMessages#5a954c0 max_id:int = Vector;\nmessages.setTyping#58943ee2 flags:# peer:InputPeer top_msg_id:flags.0?int action:SendMessageAction = Bool;\nmessages.sendMessage#520c3870 flags:# no_webpage:flags.1?true silent:flags.5?true background:flags.6?true clear_draft:flags.7?true peer:InputPeer reply_to_msg_id:flags.0?int message:string random_id:long reply_markup:flags.2?ReplyMarkup entities:flags.3?Vector schedule_date:flags.10?int = Updates;\nmessages.sendMedia#3491eba9 flags:# silent:flags.5?true background:flags.6?true clear_draft:flags.7?true peer:InputPeer reply_to_msg_id:flags.0?int media:InputMedia message:string random_id:long reply_markup:flags.2?ReplyMarkup entities:flags.3?Vector schedule_date:flags.10?int = Updates;\nmessages.forwardMessages#d9fee60e flags:# silent:flags.5?true background:flags.6?true with_my_score:flags.8?true from_peer:InputPeer id:Vector random_id:Vector to_peer:InputPeer schedule_date:flags.10?int = Updates;\nmessages.getChats#3c6aa187 id:Vector = messages.Chats;\nmessages.getFullChat#3b831c66 chat_id:int = messages.ChatFull;\nmessages.editChatTitle#dc452855 chat_id:int title:string = Updates;\nmessages.editChatPhoto#ca4c79d8 chat_id:int photo:InputChatPhoto = Updates;\nmessages.createChat#9cb126e users:Vector title:string = Updates;\nmessages.getDhConfig#26cf8950 version:int random_length:int = messages.DhConfig;\nmessages.readMessageContents#36a73f77 id:Vector = messages.AffectedMessages;\nmessages.getStickers#43d4f2c emoticon:string hash:int = messages.Stickers;\nmessages.getAllStickers#1c9618b1 hash:int = messages.AllStickers;\nmessages.getWebPagePreview#8b68b0cc flags:# message:string entities:flags.3?Vector = MessageMedia;\nmessages.exportChatInvite#df7534c peer:InputPeer = ExportedChatInvite;\nmessages.getStickerSet#2619a90e stickerset:InputStickerSet = messages.StickerSet;\nmessages.installStickerSet#c78fe460 stickerset:InputStickerSet archived:Bool = messages.StickerSetInstallResult;\nmessages.uninstallStickerSet#f96e55de stickerset:InputStickerSet = Bool;\nmessages.migrateChat#15a3b8e3 chat_id:int = Updates;\nmessages.searchGlobal#4bc6589a flags:# folder_id:flags.0?int q:string filter:MessagesFilter min_date:int max_date:int offset_rate:int offset_peer:InputPeer offset_id:int limit:int = messages.Messages;\nmessages.getDocumentByHash#338e2464 sha256:bytes size:int mime_type:string = Document;\nmessages.getSavedGifs#83bf3d52 hash:int = messages.SavedGifs;\nmessages.getInlineBotResults#514e999d flags:# bot:InputUser peer:InputPeer geo_point:flags.0?InputGeoPoint query:string offset:string = messages.BotResults;\nmessages.editMessage#48f71778 flags:# no_webpage:flags.1?true peer:InputPeer id:int message:flags.11?string media:flags.14?InputMedia reply_markup:flags.2?ReplyMarkup entities:flags.3?Vector schedule_date:flags.15?int = Updates;\nmessages.getBotCallbackAnswer#9342ca07 flags:# game:flags.1?true peer:InputPeer msg_id:int data:flags.0?bytes password:flags.2?InputCheckPasswordSRP = messages.BotCallbackAnswer;\nmessages.getPeerDialogs#e470bcfd peers:Vector = messages.PeerDialogs;\nmessages.saveDraft#bc39e14b flags:# no_webpage:flags.1?true reply_to_msg_id:flags.0?int peer:InputPeer message:string entities:flags.3?Vector = Bool;\nmessages.getFeaturedStickers#2dacca4f hash:int = messages.FeaturedStickers;\nmessages.readFeaturedStickers#5b118126 id:Vector = Bool;\nmessages.getRecentStickers#5ea192c9 flags:# attached:flags.0?true hash:int = messages.RecentStickers;\nmessages.getWebPage#32ca8f91 url:string hash:int = WebPage;\nmessages.toggleDialogPin#a731e257 flags:# pinned:flags.0?true peer:InputDialogPeer = Bool;\nmessages.getPinnedDialogs#d6b94df2 folder_id:int = messages.PeerDialogs;\nmessages.uploadMedia#519bc2b1 peer:InputPeer media:InputMedia = MessageMedia;\nmessages.getFavedStickers#21ce0b0e hash:int = messages.FavedStickers;\nmessages.faveSticker#b9ffc55b id:InputDocument unfave:Bool = Bool;\nmessages.sendMultiMedia#cc0110cb flags:# silent:flags.5?true background:flags.6?true clear_draft:flags.7?true peer:InputPeer reply_to_msg_id:flags.0?int multi_media:Vector schedule_date:flags.10?int = Updates;\nmessages.searchStickerSets#c2b7d08b flags:# exclude_featured:flags.0?true q:string hash:int = messages.FoundStickerSets;\nmessages.markDialogUnread#c286d98f flags:# unread:flags.0?true peer:InputDialogPeer = Bool;\nmessages.updatePinnedMessage#d2aaf7ec flags:# silent:flags.0?true unpin:flags.1?true pm_oneside:flags.2?true peer:InputPeer id:int = Updates;\nmessages.sendVote#10ea6184 peer:InputPeer msg_id:int options:Vector = Updates;\nmessages.getOnlines#6e2be050 peer:InputPeer = ChatOnlines;\nmessages.editChatAbout#def60797 peer:InputPeer about:string = Bool;\nmessages.editChatDefaultBannedRights#a5866b41 peer:InputPeer banned_rights:ChatBannedRights = Updates;\nmessages.getScheduledHistory#e2c2685b peer:InputPeer hash:int = messages.Messages;\nmessages.sendScheduledMessages#bd38850a peer:InputPeer id:Vector = Updates;\nmessages.deleteScheduledMessages#59ae2b16 peer:InputPeer id:Vector = Updates;\nmessages.getPollVotes#b86e380e flags:# peer:InputPeer id:int option:flags.0?bytes offset:flags.1?string limit:int = messages.VotesList;\nmessages.getDialogFilters#f19ed96d = Vector;\nmessages.getSuggestedDialogFilters#a29cd42c = Vector;\nmessages.updateDialogFilter#1ad4a04a flags:# id:int filter:flags.0?DialogFilter = Bool;\nmessages.getReplies#24b581ba peer:InputPeer msg_id:int offset_id:int offset_date:int add_offset:int limit:int max_id:int min_id:int hash:int = messages.Messages;\nmessages.getDiscussionMessage#446972fd peer:InputPeer msg_id:int = messages.DiscussionMessage;\nmessages.readDiscussion#f731a9f4 peer:InputPeer msg_id:int read_max_id:int = Bool;\nmessages.unpinAllMessages#f025bc8b peer:InputPeer = messages.AffectedHistory;\nupdates.getState#edd4882a = updates.State;\nupdates.getDifference#25939651 flags:# pts:int pts_total_limit:flags.0?int date:int qts:int = updates.Difference;\nupdates.getChannelDifference#3173d78 flags:# force:flags.0?true channel:InputChannel filter:ChannelMessagesFilter pts:int limit:int = updates.ChannelDifference;\nphotos.uploadProfilePhoto#89f30f69 flags:# file:flags.0?InputFile video:flags.1?InputFile video_start_ts:flags.2?double = photos.Photo;\nupload.saveFilePart#b304a621 file_id:long file_part:int bytes:bytes = Bool;\nupload.getFile#b15a9afc flags:# precise:flags.0?true cdn_supported:flags.1?true location:InputFileLocation offset:int limit:int = upload.File;\nupload.saveBigFilePart#de7b673d file_id:long file_part:int file_total_parts:int bytes:bytes = Bool;\nhelp.getConfig#c4f9186b = Config;\nhelp.getNearestDc#1fb33026 = NearestDc;\nhelp.getSupport#9cdf08cd = help.Support;\nhelp.acceptTermsOfService#ee72f79a id:DataJSON = Bool;\nchannels.readHistory#cc104937 channel:InputChannel max_id:int = Bool;\nchannels.deleteMessages#84c1fd4e channel:InputChannel id:Vector = messages.AffectedMessages;\nchannels.getMessages#ad8c9a23 channel:InputChannel id:Vector = messages.Messages;\nchannels.getParticipants#123e05e9 channel:InputChannel filter:ChannelParticipantsFilter offset:int limit:int hash:int = channels.ChannelParticipants;\nchannels.getParticipant#546dd7a6 channel:InputChannel user_id:InputUser = channels.ChannelParticipant;\nchannels.getChannels#a7f6bbb id:Vector = messages.Chats;\nchannels.getFullChannel#8736a09 channel:InputChannel = messages.ChatFull;\nchannels.createChannel#3d5fb10f flags:# broadcast:flags.0?true megagroup:flags.1?true title:string about:string geo_point:flags.2?InputGeoPoint address:flags.2?string = Updates;\nchannels.editAdmin#d33c8902 channel:InputChannel user_id:InputUser admin_rights:ChatAdminRights rank:string = Updates;\nchannels.editTitle#566decd0 channel:InputChannel title:string = Updates;\nchannels.editPhoto#f12e57c9 channel:InputChannel photo:InputChatPhoto = Updates;\nchannels.checkUsername#10e6bd2c channel:InputChannel username:string = Bool;\nchannels.updateUsername#3514b3de channel:InputChannel username:string = Bool;\nchannels.joinChannel#24b524c5 channel:InputChannel = Updates;\nchannels.leaveChannel#f836aa95 channel:InputChannel = Updates;\nchannels.inviteToChannel#199f3a6c channel:InputChannel users:Vector = Updates;\nchannels.deleteChannel#c0111fe3 channel:InputChannel = Updates;\nchannels.exportMessageLink#e63fadeb flags:# grouped:flags.0?true thread:flags.1?true channel:InputChannel id:int = ExportedMessageLink;\nchannels.toggleSignatures#1f69b606 channel:InputChannel enabled:Bool = Updates;\nchannels.editBanned#72796912 channel:InputChannel user_id:InputUser banned_rights:ChatBannedRights = Updates;\nchannels.readMessageContents#eab5dc38 channel:InputChannel id:Vector = Bool;\nchannels.togglePreHistoryHidden#eabbb94c channel:InputChannel enabled:Bool = Updates;\nchannels.getGroupsForDiscussion#f5dad378 = messages.Chats;\nchannels.setDiscussionGroup#40582bb2 broadcast:InputChannel group:InputChannel = Bool;\npayments.getPaymentForm#99f09745 msg_id:int = payments.PaymentForm;\npayments.getPaymentReceipt#a092a980 msg_id:int = payments.PaymentReceipt;\npayments.validateRequestedInfo#770a8e74 flags:# save:flags.0?true msg_id:int info:PaymentRequestedInfo = payments.ValidatedRequestedInfo;\npayments.sendPaymentForm#2b8879b3 flags:# msg_id:int requested_info_id:flags.0?string shipping_option_id:flags.1?string credentials:InputPaymentCredentials = payments.PaymentResult;\npayments.getSavedInfo#227d824b = payments.SavedInfo;\nlangpack.getLangPack#f2f2330a lang_pack:string lang_code:string = LangPackDifference;\nlangpack.getLanguages#42c6978f lang_pack:string = Vector;\nfolders.editPeerFolders#6847d0ab folder_peers:Vector = Updates;\n// LAYER 121\n"},function(e,t){e.exports="resPQ#05162463 nonce:int128 server_nonce:int128 pq:string server_public_key_fingerprints:Vector = ResPQ;\np_q_inner_data#83c95aec pq:string p:string q:string nonce:int128 server_nonce:int128 new_nonce:int256 = P_Q_inner_data;\nserver_DH_params_fail#79cb045d nonce:int128 server_nonce:int128 new_nonce_hash:int128 = Server_DH_Params;\nserver_DH_params_ok#d0e8075c nonce:int128 server_nonce:int128 encrypted_answer:string = Server_DH_Params;\nserver_DH_inner_data#b5890dba nonce:int128 server_nonce:int128 g:int dh_prime:string g_a:string server_time:int = Server_DH_inner_data;\nclient_DH_inner_data#6643b654 nonce:int128 server_nonce:int128 retry_id:long g_b:string = Client_DH_Inner_Data;\ndh_gen_ok#3bcbf734 nonce:int128 server_nonce:int128 new_nonce_hash1:int128 = Set_client_DH_params_answer;\ndh_gen_retry#46dc1fb9 nonce:int128 server_nonce:int128 new_nonce_hash2:int128 = Set_client_DH_params_answer;\ndh_gen_fail#a69dae02 nonce:int128 server_nonce:int128 new_nonce_hash3:int128 = Set_client_DH_params_answer;\ndestroy_auth_key_ok#f660e1d4 = DestroyAuthKeyRes;\ndestroy_auth_key_none#0a9f2259 = DestroyAuthKeyRes;\ndestroy_auth_key_fail#ea109b13 = DestroyAuthKeyRes;\n---functions---\nreq_pq#60469778 nonce:int128 = ResPQ;\nreq_pq_multi#be7e8ef1 nonce:int128 = ResPQ;\nreq_DH_params#d712e4be nonce:int128 server_nonce:int128 p:string q:string public_key_fingerprint:long encrypted_data:string = Server_DH_Params;\nset_client_DH_params#f5045f1f nonce:int128 server_nonce:int128 encrypted_data:string = Set_client_DH_params_answer;\ndestroy_auth_key#d1435160 = DestroyAuthKeyRes;\n---types---\nmsgs_ack#62d6b459 msg_ids:Vector = MsgsAck;\nbad_msg_notification#a7eff811 bad_msg_id:long bad_msg_seqno:int error_code:int = BadMsgNotification;\nbad_server_salt#edab447b bad_msg_id:long bad_msg_seqno:int error_code:int new_server_salt:long = BadMsgNotification;\nmsgs_state_req#da69fb52 msg_ids:Vector = MsgsStateReq;\nmsgs_state_info#04deb57d req_msg_id:long info:string = MsgsStateInfo;\nmsgs_all_info#8cc0d131 msg_ids:Vector info:string = MsgsAllInfo;\nmsg_detailed_info#276d3ec6 msg_id:long answer_msg_id:long bytes:int status:int = MsgDetailedInfo;\nmsg_new_detailed_info#809db6df answer_msg_id:long bytes:int status:int = MsgDetailedInfo;\nmsg_resend_req#7d861a08 msg_ids:Vector = MsgResendReq;\nrpc_error#2144ca19 error_code:int error_message:string = RpcError;\nfuture_salt#0949d9dc valid_since:int valid_until:int salt:long = FutureSalt;\nfuture_salts#ae500895 req_msg_id:long now:int salts:vector = FutureSalts;\npong#347773c5 msg_id:long ping_id:long = Pong;\ndestroy_session_ok#e22045fc session_id:long = DestroySessionRes;\ndestroy_session_none#62d350c9 session_id:long = DestroySessionRes;\nnew_session_created#9ec20908 first_msg_id:long unique_id:long server_salt:long = NewSession;\n---functions---\nping#7abe77ec ping_id:long = Pong;\n"},function(e,t,n){const s=n(46),{sleep:i}=n(8),a=n(27),r=n(30),o=n(8),{BinaryWriter:c}=n(33),u=n(19),l=n(48),d=n(88),{LAYER:f}=n(52),{constructors:p,requests:h}=n(18),g=n(56),{UpdateConnectionState:m}=n(40),{ConnectionTCPObfuscated:y}=n(63),{authFlow:b,checkAuthorization:_}=n(94),{downloadFile:w}=n(95),{uploadFile:v}=n(96),{updateTwoFaSettings:A}=n(97),I=["w","y","d","x","c","m","b","a","s"];class P{constructor(e,t,n,i=P.DEFAULT_OPTIONS){if(void 0===t||void 0===n)throw Error('Your API ID or Hash are invalid. Please read "Requirements" on README.md');const a={...P.DEFAULT_OPTIONS,...i};if(this.apiId=t,this.apiHash=n,this._useIPV6=a.useIPV6,"string"==typeof a.baseLogger?this._log=new s:this._log=a.baseLogger,"string"!=typeof e&&e){if(!(e instanceof l))throw new Error("The given session must be str or a session instance")}else try{throw new Error("not implemented")}catch(t){e=new r}this.floodSleepLimit=a.floodSleepLimit,this._eventBuilders=[],this._phoneCodeHash={},this.session=e,this.apiId=parseInt(t),this.apiHash=n,this._requestRetries=a.requestRetries,this._connectionRetries=a.connectionRetries,this._retryDelay=a.retryDelay||0,a.proxy&&this._log.warn("proxies are not supported"),this._proxy=a.proxy,this._timeout=a.timeout,this._autoReconnect=a.autoReconnect,this._connection=a.connection,this._floodWaitedRequests={},this._initWith=e=>new h.InvokeWithLayer({layer:f,query:new h.InitConnection({apiId:this.apiId,deviceModel:a.deviceModel||d.type().toString()||"Unknown",systemVersion:a.systemVersion||d.release().toString()||"1.0",appVersion:a.appVersion||"1.0",langCode:a.langCode,langPack:"",systemLangCode:a.systemLangCode,query:e,proxy:null})}),this._args=a,this._config=null,this.phoneCodeHashes=[],this._borrowedSenderPromises={},this._additionalDcsDisabled=a.additionalDcsDisabled}async connect(){await this._initSession(),this._sender=new g(this.session.getAuthKey(),{logger:this._log,dcId:this.session.dcId,retries:this._connectionRetries,delay:this._retryDelay,autoReconnect:this._autoReconnect,connectTimeout:this._timeout,authKeyCallback:this._authKeyCallback.bind(this),updateCallback:this._handleUpdate.bind(this),isMainSender:!0});const e=new this._connection(this.session.serverAddress,this.session.port,this.session.dcId,this._log);await this._sender.connect(e),this.session.setAuthKey(this._sender.authKey),await this._sender.send(this._initWith(new h.help.GetConfig({}))),this._updateLoop()}async _initSession(){await this.session.load(),this.session.serverAddress&&this.session.serverAddress.includes(":")===this._useIPV6||this.session.setDC(2,this._useIPV6?"[2001:67c:4e8:f002::a]":"venus.web.telegram.org",this._args.useWSS?443:80)}async _updateLoop(){for(;this.isConnected();){await o.sleep(3e3);try{await E(()=>k(this._sender.send(new h.Ping({pingId:o.getRandomInt(Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER)})),1500),3,100)}catch(e){return await this.disconnect(),void this.connect()}if((new Date).getTime()-this._lastRequest>18e5)try{await this.invoke(new h.updates.GetState)}catch(e){}}}async disconnect(){this._sender&&await this._sender.disconnect(),await Promise.all(Object.values(this._borrowedSenderPromises).map(e=>e.then(e=>{if(e)return e.disconnect()}))),this._borrowedSenderPromises={}}async destroy(){await this.disconnect(),this.session.delete(),this._eventBuilders=[]}async _switchDC(e){this._log.info("Reconnecting to new data center "+e);const t=u.getDC(e);return this.session.setDC(e,t.ipAddress,t.port),await this._sender.authKey.setKey(null),this.session.setAuthKey(null),await this.disconnect(),this.connect()}async _authKeyCallback(e,t){this.session.setAuthKey(e,t)}_cleanupBorrowedSender(e){delete this._borrowedSenderPromises[e]}async _borrowExportedSender(e){if(this._additionalDcsDisabled)return;let t=this._borrowedSenderPromises[e];return t||(t=this._createExportedSender(e),this._borrowedSenderPromises[e]=t,t.then(t=>{t||delete this._borrowedSenderPromises[e]})),t}async _createExportedSender(e){const t=u.getDC(e),n=new g(this.session.getAuthKey(e),{logger:this._log,dcId:e,retries:this._connectionRetries,delay:this._retryDelay,autoReconnect:this._autoReconnect,connectTimeout:this._timeout,authKeyCallback:this._authKeyCallback.bind(this),isMainSender:e===this.session.dcId,onConnectionBreak:this._cleanupBorrowedSender.bind(this)});for(let s=0;s<5;s++)try{if(await n.connect(new this._connection(t.ipAddress,t.port,e,this._log)),this.session.dcId!==e){this._log.info("Exporting authorization for data center "+t.ipAddress);const s=await this.invoke(new h.auth.ExportAuthorization({dcId:e})),i=this._initWith(new h.auth.ImportAuthorization({id:s.id,bytes:s.bytes}));await n.send(i)}return n.dcId=e,n}catch(e){await n.disconnect()}return null}async downloadFile(e,t={}){return w(this,e,t)}async downloadMedia(e,t){let n,s;if(e instanceof p.Message?(n=e.date,s=e.media):(n=(new Date).getTime(),s=e),"string"==typeof s)throw new Error("not implemented");return s instanceof p.MessageMediaWebPage&&s.webpage instanceof p.WebPage&&(s=s.webpage.document||s.webpage.photo),s instanceof p.MessageMediaPhoto||s instanceof p.Photo?this._downloadPhoto(s,t):s instanceof p.MessageMediaDocument||s instanceof p.Document?this._downloadDocument(s,t):s instanceof p.MessageMediaContact?this._downloadContact(s,t):s instanceof p.WebDocument||s instanceof p.WebDocumentNoProxy?this._downloadWebDocument(s,t):void 0}async downloadProfilePhoto(e,t=!1){const n=t?"x":"m";let s,i,a;if([765557111,3316604308,524706233,3566872215].includes(e.SUBCLASS_OF_ID)){if(!e.photo)return e.chatPhoto?this._downloadPhoto(e.chatPhoto,{sizeType:n}):null;s=e.photo}else s=e;if(!(s instanceof p.UserProfilePhoto||s instanceof p.ChatPhoto))return null;{i=s.dcId;const n=t?s.photoBig:s.photoSmall;a=new p.InputPeerPhotoFileLocation({peer:u.getInputPeer(e),localId:n.localId,volumeId:n.volumeId,big:t})}try{return this.downloadFile(a,{dcId:i})}catch(e){throw e}}async downloadStickerSetThumb(e){if(!e.thumb||!e.thumb.location)return;const{location:t}=e.thumb;return this.downloadFile(new p.InputStickerSetThumb({stickerset:new p.InputStickerSetID({id:e.id,accessHash:e.accessHash}),localId:t.localId,volumeId:t.volumeId}),{dcId:e.thumbDcId})}_pickFileSize(e,t){if(!t||!e||!e.length)return null;let n;for(let s=I.indexOf(t);se.type===I[s]),n)return n;return null}_downloadCachedPhotoSize(e){let t;return t=e instanceof p.PhotoStrippedSize?u.strippedPhotoToJpg(e.bytes):e.bytes,t}async _downloadPhoto(e,t){if(e instanceof p.MessageMediaPhoto&&(e=e.photo),!(e instanceof p.Photo))return;const n=this._pickFileSize(e.sizes,t.sizeType);return!n||n instanceof p.PhotoSizeEmpty?void 0:n instanceof p.PhotoCachedSize||n instanceof p.PhotoStrippedSize?this._downloadCachedPhotoSize(n):this.downloadFile(new p.InputPhotoFileLocation({id:e.id,accessHash:e.accessHash,fileReference:e.fileReference,thumbSize:n.type}),{dcId:e.dcId,fileSize:n.size,progressCallback:t.progressCallback})}async _downloadDocument(e,t){if(e instanceof p.MessageMediaDocument&&(e=e.document),!(e instanceof p.Document))return;let n=null;if(t.sizeType){if(n=e.thumbs?this._pickFileSize(e.thumbs,t.sizeType):null,!n&&e.mimeType.startsWith("video/"))return;if(n&&(n instanceof p.PhotoCachedSize||n instanceof p.PhotoStrippedSize))return this._downloadCachedPhotoSize(n)}return this.downloadFile(new p.InputDocumentFileLocation({id:e.id,accessHash:e.accessHash,fileReference:e.fileReference,thumbSize:n?n.type:""}),{fileSize:n?n.size:e.size,progressCallback:t.progressCallback,start:t.start,end:t.end,dcId:e.dcId,workers:t.workers})}_downloadContact(e,t){throw new Error("not implemented")}_downloadWebDocument(e,t){throw new Error("not implemented")}async invoke(e){if("request"!==e.classType)throw new Error("You can only invoke MTProtoRequests");this._lastRequest=(new Date).getTime();let t=0;for(t=0;tPromise.reject(new Error("TIMEOUT")))])}async function E(e,t,n){for(let s=0;s1)for(var n=1;n0?(this._pending=!0,this._queue.shift()(this._dispatchNext.bind(this))):this._pending=!1},e}();t.default=s},function(e,t,n){(function(t){var s=function(){return this||void 0===t?this:t}(),i=s.WebSocket||s.MozWebSocket,a=n(86);function r(e,t){return t?new i(e,t):new i(e)}i&&["CONNECTING","OPEN","CLOSING","CLOSED"].forEach((function(e){Object.defineProperty(r,e,{get:function(){return i[e]}})})),e.exports={w3cwebsocket:i?r:null,version:a}}).call(this,n(43))},function(e,t,n){e.exports=n(87).version},function(e){e.exports=JSON.parse('{"_args":[["websocket@1.0.30","/Users/alexander/dev/telegram-t"]],"_from":"websocket@1.0.30","_id":"websocket@1.0.30","_inBundle":false,"_integrity":"sha512-aO6klgaTdSMkhfl5VVJzD5fm+Srhh5jLYbS15+OiI1sN6h/RU/XW6WN9J1uVIpUKNmsTvT3Hs35XAFjn9NMfOw==","_location":"/websocket","_phantomChildren":{},"_requested":{"type":"version","registry":true,"raw":"websocket@1.0.30","name":"websocket","escapedName":"websocket","rawSpec":"1.0.30","saveSpec":null,"fetchSpec":"1.0.30"},"_requiredBy":["/"],"_resolved":"https://registry.npmjs.org/websocket/-/websocket-1.0.30.tgz","_spec":"1.0.30","_where":"/Users/alexander/dev/telegram-t","author":{"name":"Brian McKelvey","email":"theturtle32@gmail.com","url":"https://github.com/theturtle32"},"browser":"lib/browser.js","bugs":{"url":"https://github.com/theturtle32/WebSocket-Node/issues"},"config":{"verbose":false},"contributors":[{"name":"Iñaki Baz Castillo","email":"ibc@aliax.net","url":"http://dev.sipdoc.net"}],"dependencies":{"debug":"^2.2.0","nan":"^2.14.0","typedarray-to-buffer":"^3.1.5","yaeti":"^0.0.6"},"description":"Websocket Client & Server Library implementing the WebSocket protocol as specified in RFC 6455.","devDependencies":{"buffer-equal":"^1.0.0","faucet":"^0.0.1","gulp":"^4.0.2","gulp-jshint":"^2.0.4","jshint":"^2.0.0","jshint-stylish":"^2.2.1","tape":"^4.9.1"},"directories":{"lib":"./lib"},"engines":{"node":">=0.10.0"},"homepage":"https://github.com/theturtle32/WebSocket-Node","keywords":["websocket","websockets","socket","networking","comet","push","RFC-6455","realtime","server","client"],"license":"Apache-2.0","main":"index","name":"websocket","repository":{"type":"git","url":"git+https://github.com/theturtle32/WebSocket-Node.git"},"scripts":{"gulp":"gulp","install":"(node-gyp rebuild 2> builderror.log) || (exit 0)","test":"faucet test/unit"},"version":"1.0.30"}')},function(e,t){t.endianness=function(){return"LE"},t.hostname=function(){return"undefined"!=typeof location?location.hostname:""},t.loadavg=function(){return[]},t.uptime=function(){return 0},t.freemem=function(){return Number.MAX_VALUE},t.totalmem=function(){return Number.MAX_VALUE},t.cpus=function(){return[]},t.type=function(){return"Browser"},t.release=function(){return"undefined"!=typeof navigator?navigator.appVersion:""},t.networkInterfaces=t.getNetworkInterfaces=function(){return{}},t.arch=function(){return"javascript"},t.platform=function(){return"browser"},t.tmpdir=t.tmpDir=function(){return"/tmp"},t.EOL="\n",t.homedir=function(){return"/"}},function(e,t,n){(function(t){const s=n(15),{readBigIntFromBuffer:i,readBufferFromBigInt:a,getByteArray:r,sha1:o,generateRandomBytes:c,modExp:u}=n(8),l=[{fingerprint:[40,85,94,156,117,240,61,22,65,244,169,2,33,107,232,108,2,43,180,195],n:s("24403446649145068056824081744112065346446136066297307473868293895086332508101251964919587745984311372853053253457835208829824428441874946556659953519213382748319518214765985662663680818277989736779506318868003755216402538945900388706898101286548187286716959100102939636333452457308619454821845196109544157601096359148241435922125602449263164512290854366930013825808102403072317738266383237191313714482187326643144603633877219028262697593882410403273959074350849923041765639673335775605842311578109726403165298875058941765362622936097839775380070572921007586266115476975819175319995527916042178582540628652481530373407"),e:65537},{fingerprint:[140,171,9,34,146,246,166,50,10,170,229,247,155,114,28,177,29,106,153,154],n:s("25081407810410225030931722734886059247598515157516470397242545867550116598436968553551465554653745201634977779380884774534457386795922003815072071558370597290368737862981871277312823942822144802509055492512145589734772907225259038113414940384446493111736999668652848440655603157665903721517224934142301456312994547591626081517162758808439979745328030376796953660042629868902013177751703385501412640560275067171555763725421377065095231095517201241069856888933358280729674273422117201596511978645878544308102076746465468955910659145532699238576978901011112475698963666091510778777356966351191806495199073754705289253783"),e:65537},{fingerprint:[243,218,109,239,16,202,176,78,167,8,255,209,120,234,205,112,111,42,91,176],n:s("22347337644621997830323797217583448833849627595286505527328214795712874535417149457567295215523199212899872122674023936713124024124676488204889357563104452250187725437815819680799441376434162907889288526863223004380906766451781702435861040049293189979755757428366240570457372226323943522935844086838355728767565415115131238950994049041950699006558441163206523696546297006014416576123345545601004508537089192869558480948139679182328810531942418921113328804749485349441503927570568778905918696883174575510385552845625481490900659718413892216221539684717773483326240872061786759868040623935592404144262688161923519030977"),e:65537},{fingerprint:[128,80,214,72,77,244,98,7,201,250,37,244,227,51,96,199,182,37,224,113],n:s("24573455207957565047870011785254215390918912369814947541785386299516827003508659346069416840622922416779652050319196701077275060353178142796963682024347858398319926119639265555410256455471016400261630917813337515247954638555325280392998950756512879748873422896798579889820248358636937659872379948616822902110696986481638776226860777480684653756042166610633513404129518040549077551227082262066602286208338952016035637334787564972991208252928951876463555456715923743181359826124083963758009484867346318483872552977652588089928761806897223231500970500186019991032176060579816348322451864584743414550721639495547636008351"),e:65537}],d={};l.forEach(({fingerprint:e,...t})=>{d[i(e.slice(-8),!0,!0)]=t}),e.exports={encrypt:async function(e,n){const r=d[e];if(!r)return;const l=c(235-n.length),f=t.concat([await o(n),n,l]),p=i(f,!1),h=u(p,s(r.e),r.n);return a(h,256,!1)}}}).call(this,n(11).Buffer)},function(e,t){e.exports=class{constructor(e,t=null){this.containerId=null,this.msgId=null,this.request=e,this.data=e.getBytes(),this.after=t,this.result=null,this.promise=new Promise((e,t)=>{this.resolve=e,this.reject=t})}}},function(e,t,n){const{Connection:s}=n(41),{ConnectionTCPFull:i}=n(92),{ConnectionTCPAbridged:a}=n(62),{ConnectionTCPObfuscated:r}=n(63);e.exports={Connection:s,ConnectionTCPFull:i,ConnectionTCPAbridged:a,ConnectionTCPObfuscated:r}},function(e,t){},function(e,t,n){(function(t){const s=n(36);e.exports=class{constructor(e,n){if(!t.isBuffer(e)||!t.isBuffer(n)||16!==n.length)throw new Error("Key and iv need to be a buffer");this.cipher=s.createCipheriv("AES-256-CTR",e,n)}encrypt(e){return t.from(this.cipher.update(e))}}}).call(this,n(11).Buffer)},function(e,t,n){"use strict";n.r(t),n.d(t,"authFlow",(function(){return u})),n.d(t,"checkAuthorization",(function(){return l}));var s=n(6),i=n.n(s),a=n(19),r=n.n(a),o=n(8),c=n(29);async function u(e,t,n){const s="phoneNumber"in n?await d(e,t,n):await async function(e,t,n){const{apiId:s,apiHash:a}=t,{botAuthToken:r}=n,{user:o}=await e.invoke(new i.a.auth.ImportBotAuthorization({apiId:s,apiHash:a,botAuthToken:r}));return o}(e,t,n);e._log.info("Signed in successfully as",r.a.getDisplayName(s))}async function l(e){try{return await e.invoke(new i.a.updates.GetState),!0}catch(e){return!1}}async function d(e,t,n){let s,a,r,o=!1;for(;;)try{if("function"==typeof n.phoneNumber)try{s=await n.phoneNumber()}catch(s){if("RESTART_AUTH_WITH_QR"===s.message)return f(e,t,n);throw s}else s=n.phoneNumber;const i=await p(e,t,s,n.forceSMS);if(a=i.phoneCodeHash,o=i.isCodeViaApp,"string"!=typeof a)throw new Error("Failed to retrieve phone code hash");break}catch(e){if("function"!=typeof n.phoneNumber)throw e;n.onError(e)}let c,u=!1;for(;;)try{try{r=await n.phoneCode(o)}catch(s){if("RESTART_AUTH"===s.message)return d(e,t,n)}if(!r)throw new Error("Code is empty");const l=await e.invoke(new i.a.auth.SignIn({phoneNumber:s,phoneCodeHash:a,phoneCode:r}));if(l instanceof i.a.auth.AuthorizationSignUpRequired){u=!0,c=l.termsOfService;break}return l.user}catch(s){if("SESSION_PASSWORD_NEEDED"===s.message)return h(e,t,n);n.onError(s)}if(u)for(;;)try{const[t,r]=await n.firstAndLastNames();if(!t)throw new Error("First name is required");const{user:o}=await e.invoke(new i.a.auth.SignUp({phoneNumber:s,phoneCodeHash:a,firstName:t,lastName:r}));return c&&await e.invoke(new i.a.help.AcceptTermsOfService({id:c.id})),o}catch(e){n.onError(e)}return n.onError(new Error("Auth failed")),d(e,t,n)}async function f(e,t,n){let s=!1;const a=(async()=>{for(;!s;){const t=await e.invoke(new i.a.auth.ExportLoginToken({apiId:Number("739222"),apiHash:"60d1e1063c72d4bc4cfdda99e8906f94",exceptIds:[]}));if(!(t instanceof i.a.auth.LoginToken))throw new Error("Unexpected");const{token:s,expires:a}=t;await Promise.race([n.qrCode({token:s,expires:a}),Object(o.sleep)(3e4)])}})(),r=new Promise(t=>{e.addEventHandler(e=>{e instanceof i.a.UpdateLoginToken&&t()},{build:e=>e})});try{await Promise.race([r,a])}catch(s){if("RESTART_AUTH"===s.message)return d(e,t,n);throw s}finally{s=!0}try{const t=await e.invoke(new i.a.auth.ExportLoginToken({apiId:Number("739222"),apiHash:"60d1e1063c72d4bc4cfdda99e8906f94",exceptIds:[]}));if(t instanceof i.a.auth.LoginTokenSuccess&&t.authorization instanceof i.a.auth.Authorization)return t.authorization.user;if(t instanceof i.a.auth.LoginTokenMigrateTo){await e._switchDC(t.dcId);const n=await e.invoke(new i.a.auth.ImportLoginToken({token:t.token}));if(n instanceof i.a.auth.LoginTokenSuccess&&n.authorization instanceof i.a.auth.Authorization)return n.authorization.user}}catch(s){if("SESSION_PASSWORD_NEEDED"===s.message)return h(e,t,n);throw s}throw void 0}async function p(e,t,n,s=!1){try{const{apiId:a,apiHash:r}=t,o=await e.invoke(new i.a.auth.SendCode({phoneNumber:n,apiId:a,apiHash:r,settings:new i.a.CodeSettings}));if(!s||o.type instanceof i.a.auth.SentCodeTypeSms)return{phoneCodeHash:o.phoneCodeHash,isCodeViaApp:o.type instanceof i.a.auth.SentCodeTypeApp};const c=await e.invoke(new i.a.auth.ResendCode({phoneNumber:n,phoneCodeHash:o.phoneCodeHash}));return{phoneCodeHash:c.phoneCodeHash,isCodeViaApp:c.type instanceof i.a.auth.SentCodeTypeApp}}catch(i){if("AUTH_RESTART"===i.message)return p(e,t,n,s);throw i}}async function h(e,t,n){for(;;)try{const t=await e.invoke(new i.a.account.GetPassword),s=await n.password(t.hint);if(!s)throw new Error("Password is empty");const a=await Object(c.computeCheck)(t,s),{user:r}=await e.invoke(new i.a.auth.CheckPassword({password:a}));return r}catch(e){n.onError(e)}}},function(e,t,n){"use strict";n.r(t),function(e){n.d(t,"downloadFile",(function(){return c}));var s=n(6),i=n.n(s),a=n(19),r=n(8);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}async function c(t,n,s){let{partSizeKb:o,fileSize:c,workers:l=1,end:d}=s;const{dcId:f,progressCallback:p,start:h=0}=s;d=d&&d{try{const s=await Promise.race([await y.send(new i.a.upload.GetFile({location:n,offset:w,limit:e,precise:t||void 0})),Object(r.sleep)(15e3).then(()=>Promise.reject(new Error("REQUEST_TIMEOUT")))]);if(p){if(p.isCanceled)throw new Error("USER_CANCELED");A+=1/m,p(A)}return!d&&s.bytes.lengthd)break}const I=(await Promise.all(_)).filter(Boolean),P=d?d+1-h:void 0;return e.concat(I,P)}class u{constructor(e){this.maxWorkers=e,o(this,"deferred",void 0),o(this,"activeWorkers",0)}requestWorker(){return this.activeWorkers++,this.activeWorkers>this.maxWorkers?(this.deferred=function(){let e;return{promise:new Promise(t=>{e=t}),resolve:e}}(),this.deferred.promise):Promise.resolve()}releaseWorker(){this.activeWorkers--,this.deferred&&this.activeWorkers<=this.maxWorkers&&this.deferred.resolve()}}}.call(this,n(11).Buffer)},function(e,t,n){"use strict";n.r(t),function(e){n.d(t,"uploadFile",(function(){return o}));var s=n(6),i=n.n(s),a=n(8),r=n(19);async function o(t,n){const{file:s,onProgress:o}=n;let{workers:c}=n;const{name:u,size:l}=s,d=Object(a.readBigIntFromBuffer)(Object(a.generateRandomBytes)(8),!0,!0),f=l>10485760,p=1024*Object(r.getAppropriatedPartSize)(l),h=Math.floor((l+p-1)/p),g=e.from(await function(e){return new Response(e).arrayBuffer()}(s)),m=await t._borrowExportedSender(t.session.dcId);c&&l||(c=1),c>=h&&(c=h);let y=0;o&&o(y);for(let e=0;eh&&(n=h);for(let s=e;s{if(await m.send(f?new i.a.upload.SaveBigFilePart({fileId:d,filePart:s,fileTotalParts:h,bytes:e}):new i.a.upload.SaveFilePart({fileId:d,filePart:s,bytes:e})),o){if(o.isCanceled)throw new Error("USER_CANCELED");y+=1/h,o(y)}})())}try{await Promise.race([await Promise.all(t),Object(a.sleep)(15e3*c).then(()=>Promise.reject(new Error("TIMEOUT")))])}catch(t){if("TIMEOUT"===t.message){console.warn("Upload timeout. Retrying..."),e-=c;continue}throw t}}return f?new i.a.InputFileBig({id:d,parts:h,name:u}):new i.a.InputFile({id:d,parts:h,name:u,md5Checksum:""})}}.call(this,n(11).Buffer)},function(e,t,n){"use strict";n.r(t),function(e){n.d(t,"updateTwoFaSettings",(function(){return u}));var s=n(6),i=n.n(s),a=n(8),r=n(29),o=n(27),c=n.n(o);async function u(t,{isCheckPassword:n,currentPassword:s,newPassword:o,hint:u="",email:l,emailCodeCallback:d,onEmailCodeError:f}){if(!o&&!s)throw new Error("Neither `currentPassword` nor `newPassword` is present");if(l&&(!d||!f))throw new Error("`email` present without `emailCodeCallback` and `onEmailCodeError`");const p=await t.invoke(new i.a.account.GetPassword);p.newAlgo instanceof i.a.PasswordKdfAlgoUnknown||(p.newAlgo.salt1=e.concat([p.newAlgo.salt1,Object(a.generateRandomBytes)(32)])),!p.hasPassword&&s&&(s=void 0);const h=s?await Object(r.computeCheck)(p,s):new i.a.InputCheckPasswordEmpty;if(n)await t.invoke(new i.a.auth.CheckPassword({password:h}));else try{await t.invoke(new i.a.account.UpdatePasswordSettings({password:h,newSettings:new i.a.account.PasswordInputSettings({newAlgo:p.newAlgo,newPasswordHash:o?await Object(r.computeDigest)(p.newAlgo,o):e.alloc(0),hint:u,email:l,newSecureSettings:void 0})}))}catch(e){if(!(e instanceof c.a.EmailUnconfirmedError))throw e;for(;;)try{const n=await d(e.codeLength);if(!n)throw new Error("Code is empty");await t.invoke(new i.a.account.ConfirmPasswordEmail({code:n}));break}catch(e){f(e)}}}}.call(this,n(11).Buffer)},function(e,t){e.exports="0.0.2"},function(e,t,n){const s=n(100),i=n(101);class a extends Error{}e.exports={NewMessage:s,StopPropagation:a,Raw:i}},function(e,t){},function(e,t,n){const{EventBuilder:s}=n(102);e.exports=class extends s{constructor(e={types:null,func:null}){super(),e.types?this.types=e.types:this.types=!0}build(e,t=null){return e}}},function(e,t){e.exports={EventBuilder:class{constructor(e={chats:null,blacklistChats:null,func:null}){this.chats=e.chats,this.blacklistChats=Boolean(e.blacklistChats),this.resolved=!1,this.func=e.func}build(e,t=null){}},EventCommon:class{}}},function(e,t,n){const s=n(30),i=n(104),a=n(105),r=n(106);e.exports={Memory:s,StringSession:i,CacheApiSession:a,LocalStorageSession:r}},function(e,t,n){(function(t){const s=n(30),i=n(32),a=n(25);class r extends s{constructor(e=null){if(super(),e){if("1"!==e[0])throw new Error("Not a valid string");e=e.slice(1);const t=r.decode(e),n=new a(t);this._dcId=n.read(1).readUInt8(0);const s=n.read(2).readInt16BE(0);this._serverAddress=String(n.read(s)),this._port=n.read(2).readInt16BE(0),this._key=n.read(-1)}}static encode(e){return e.toString("base64")}static decode(e){return t.from(e,"base64")}async load(){this._key&&(this._authKey=new i,await this._authKey.setKey(this._key))}save(){if(!this.authKey)return"";const e=t.from([this.dcId]),n=t.from(this.serverAddress),s=t.alloc(2);s.writeInt16BE(n.length,0);const i=t.alloc(2);return i.writeInt16BE(this.port,0),"1"+r.encode(t.concat([e,s,n,i,this.authKey.getKey()]))}getAuthKey(e){if(!e||e===this.dcId)return this.authKey}setAuthKey(e,t){t&&t!==this.dcId||(this.authKey=e)}}e.exports=r}).call(this,n(11).Buffer)},function(e,t,n){const s=n(64);e.exports=class extends s{async _fetchFromCache(e){const t=new Request(e),n=await self.caches.open("GramJs"),s=await n.match(t);return s?s.text():null}async _saveToCache(e,t){const n=new Request(e),s=new Response(t);return(await self.caches.open("GramJs")).put(n,s)}}},function(e,t,n){const s=n(64);e.exports=class extends s{async _fetchFromCache(e){return localStorage.getItem(e)}async _saveToCache(e,t){return localStorage.setItem(e,t)}}},function(e,t,n){"use strict";n.r(t);var s={};n.r(s),n.d(s,"destroy",(function(){return d.a})),n.d(s,"downloadMedia",(function(){return d.b})),n.d(s,"fetchCurrentUser",(function(){return d.c})),n.d(s,"provideAuthPhoneNumber",(function(){return o.l})),n.d(s,"provideAuthCode",(function(){return o.j})),n.d(s,"provideAuthPassword",(function(){return o.k})),n.d(s,"provideAuthRegistration",(function(){return o.m})),n.d(s,"restartAuth",(function(){return o.n})),n.d(s,"restartAuthWithQr",(function(){return o.o})),n.d(s,"fetchChats",(function(){return c.j})),n.d(s,"fetchFullChat",(function(){return c.k})),n.d(s,"fetchSuperGroupOnlines",(function(){return c.n})),n.d(s,"searchChats",(function(){return c.v})),n.d(s,"requestChatUpdate",(function(){return c.t})),n.d(s,"saveDraft",(function(){return c.u})),n.d(s,"clearDraft",(function(){return c.a})),n.d(s,"fetchChat",(function(){return c.h})),n.d(s,"updateChatMutedState",(function(){return c.G})),n.d(s,"createChannel",(function(){return c.b})),n.d(s,"joinChannel",(function(){return c.q})),n.d(s,"leaveChannel",(function(){return c.r})),n.d(s,"deleteChannel",(function(){return c.d})),n.d(s,"createGroupChat",(function(){return c.c})),n.d(s,"editChatPhoto",(function(){return c.g})),n.d(s,"toggleChatPinned",(function(){return c.y})),n.d(s,"toggleChatArchived",(function(){return c.x})),n.d(s,"toggleDialogUnread",(function(){return c.z})),n.d(s,"fetchChatFolders",(function(){return c.i})),n.d(s,"editChatFolder",(function(){return c.f})),n.d(s,"deleteChatFolder",(function(){return c.e})),n.d(s,"fetchRecommendedChatFolders",(function(){return c.m})),n.d(s,"getChatByUsername",(function(){return c.o})),n.d(s,"togglePreHistoryHidden",(function(){return c.A})),n.d(s,"updateChatDefaultBannedRights",(function(){return c.E})),n.d(s,"updateChatMemberBannedRights",(function(){return c.F})),n.d(s,"updateChatTitle",(function(){return c.H})),n.d(s,"updateChatAbout",(function(){return c.C})),n.d(s,"toggleSignatures",(function(){return c.B})),n.d(s,"updateChatAdmin",(function(){return c.D})),n.d(s,"fetchGroupsForDiscussion",(function(){return c.l})),n.d(s,"setDiscussionGroup",(function(){return c.w})),n.d(s,"migrateChat",(function(){return c.s})),n.d(s,"fetchMessages",(function(){return u.g})),n.d(s,"fetchMessage",(function(){return u.e})),n.d(s,"sendMessage",(function(){return u.v})),n.d(s,"pinMessage",(function(){return u.q})),n.d(s,"unpinAllMessages",(function(){return u.y})),n.d(s,"deleteMessages",(function(){return u.b})),n.d(s,"deleteHistory",(function(){return u.a})),n.d(s,"markMessageListRead",(function(){return u.o})),n.d(s,"markMessagesRead",(function(){return u.p})),n.d(s,"requestThreadInfoUpdate",(function(){return u.r})),n.d(s,"searchMessagesLocal",(function(){return u.u})),n.d(s,"searchMessagesGlobal",(function(){return u.t})),n.d(s,"fetchWebPagePreview",(function(){return u.j})),n.d(s,"editMessage",(function(){return u.d})),n.d(s,"forwardMessages",(function(){return u.l})),n.d(s,"loadPollOptionResults",(function(){return u.n})),n.d(s,"sendPollVote",(function(){return u.w})),n.d(s,"findFirstMessageIdAfterDate",(function(){return u.k})),n.d(s,"fetchPinnedMessages",(function(){return u.h})),n.d(s,"fetchScheduledHistory",(function(){return u.i})),n.d(s,"sendScheduledMessages",(function(){return u.x})),n.d(s,"rescheduleMessage",(function(){return u.s})),n.d(s,"deleteScheduledMessages",(function(){return u.c})),n.d(s,"fetchMessageLink",(function(){return u.f})),n.d(s,"fetchFullUser",(function(){return y})),n.d(s,"fetchNearestCountry",(function(){return b})),n.d(s,"fetchTopUsers",(function(){return _})),n.d(s,"fetchContactList",(function(){return w})),n.d(s,"fetchUsers",(function(){return v})),n.d(s,"updateContact",(function(){return A})),n.d(s,"deleteUser",(function(){return I})),n.d(s,"fetchStickerSets",(function(){return E})),n.d(s,"fetchRecentStickers",(function(){return R})),n.d(s,"fetchFavoriteStickers",(function(){return U})),n.d(s,"fetchFeaturedStickers",(function(){return O})),n.d(s,"faveSticker",(function(){return T})),n.d(s,"fetchStickers",(function(){return B})),n.d(s,"fetchSavedGifs",(function(){return j})),n.d(s,"searchStickers",(function(){return x})),n.d(s,"installStickerSet",(function(){return N})),n.d(s,"uninstallStickerSet",(function(){return F})),n.d(s,"searchGifs",(function(){return V})),n.d(s,"fetchAnimatedEmojis",(function(){return D})),n.d(s,"fetchStickersForEmoji",(function(){return L})),n.d(s,"checkChatUsername",(function(){return z})),n.d(s,"setChatUsername",(function(){return K})),n.d(s,"updatePrivateLink",(function(){return G})),n.d(s,"updateProfile",(function(){return ue})),n.d(s,"checkUsername",(function(){return le})),n.d(s,"updateUsername",(function(){return de})),n.d(s,"fetchBlockedContacts",(function(){return me})),n.d(s,"blockContact",(function(){return ye})),n.d(s,"unblockContact",(function(){return be})),n.d(s,"updateProfilePhoto",(function(){return fe})),n.d(s,"uploadProfilePhoto",(function(){return pe})),n.d(s,"fetchWallpapers",(function(){return he})),n.d(s,"uploadWallpaper",(function(){return ge})),n.d(s,"fetchAuthorizations",(function(){return _e})),n.d(s,"terminateAuthorization",(function(){return we})),n.d(s,"terminateAllAuthorizations",(function(){return ve})),n.d(s,"loadNotificationsSettings",(function(){return Ae})),n.d(s,"updateContactSignUpNotification",(function(){return Ie})),n.d(s,"updateNotificationSettings",(function(){return Pe})),n.d(s,"fetchLanguages",(function(){return Se})),n.d(s,"fetchLangPack",(function(){return Ce})),n.d(s,"fetchPrivacySettings",(function(){return Me})),n.d(s,"setPrivacySettings",(function(){return ke})),n.d(s,"getPasswordInfo",(function(){return Z})),n.d(s,"checkPassword",(function(){return Q})),n.d(s,"clearPassword",(function(){return X})),n.d(s,"updatePassword",(function(){return ee})),n.d(s,"updateRecoveryEmail",(function(){return te})),n.d(s,"provideRecoveryEmailCode",(function(){return ne})),n.d(s,"answerCallbackButton",(function(){return Re.a})),n.d(s,"validateRequestedInfo",(function(){return Oe})),n.d(s,"sendPaymentForm",(function(){return Te})),n.d(s,"getPaymentForm",(function(){return Be})),n.d(s,"getReceipt",(function(){return De}));var i=n(4),a=n(28),r=n(26),o=n(16),c=n(7),u=n(12),l=n(0),d=n(1),f=n(2),p=n(13),h=n(5),g=n(3);let m;async function y({id:e,accessHash:t}){const n=Object(f.g)(e,t);if(!(n instanceof l.Api.InputUser))return;const s=await Object(d.e)(new l.Api.users.GetFullUser({id:n}));if(!s)return;const i=Object(p.b)(s);m({"@type":"updateUser",id:e,user:{fullInfo:i.fullInfo}})}async function b(){const e=await Object(d.e)(new l.Api.help.GetNearestDc);return e?e.country:void 0}async function _({hash:e=0}){const t=await Object(d.e)(new l.Api.contacts.GetTopPeers({hash:e,correspondents:!0}));if(!(t instanceof l.Api.contacts.TopPeers))return;const n=t.users.map(p.a).filter(e=>!!e&&!e.isSelf),s=n.map(({id:e})=>e);return{hash:Object(f.q)(s),ids:s,users:n}}async function w({hash:e=0}){const t=await Object(d.e)(new l.Api.contacts.GetContacts({hash:e}));if(t&&!(t instanceof l.Api.contacts.ContactsNotModified))return t.users.forEach(e=>{e instanceof l.Api.User&&(h.a.users[e.id]=e)}),{hash:Object(f.q)([t.savedCount,...t.contacts.map(({userId:e})=>e)]),users:t.users.map(p.a).filter(Boolean),chats:t.users.map(e=>Object(g.d)(e)).filter(Boolean)}}async function v({users:e}){const t=await Object(d.e)(new l.Api.users.GetUsers({id:e.map(({id:e,accessHash:t})=>Object(f.i)(e,t))}));if(t&&t.length)return t.forEach(e=>{e instanceof l.Api.User&&(h.a.users[e.id]=e)}),t.map(p.a).filter(Boolean)}function A({phone:e,firstName:t,lastName:n}){return Object(d.e)(new l.Api.contacts.ImportContacts({contacts:[Object(f.e)({phone:e||"",firstName:t||"",lastName:n||""})]}))}async function I({id:e,accessHash:t}){const n=Object(f.g)(e,t);if(!(n instanceof l.Api.InputUser))return;await Object(d.e)(new l.Api.contacts.DeleteContacts({id:[n]}))&&m({"@type":"deleteUser",id:e})}var P=n(21),S=n(9);let C,M,k;async function E({hash:e}){const t=await Object(d.e)(new l.Api.messages.GetAllStickers({hash:e}));if(t&&!(t instanceof l.Api.messages.AllStickersNotModified))return t.sets.forEach(e=>{e.thumb&&(h.a.stickerSets[String(e.id)]=e)}),{hash:t.hash,sets:t.sets.map(P.b)}}async function R({hash:e}){const t=await Object(d.e)(new l.Api.messages.GetRecentStickers({hash:e}));if(t&&!(t instanceof l.Api.messages.RecentStickersNotModified))return{hash:t.hash,stickers:q(t.stickers)}}async function U({hash:e}){const t=await Object(d.e)(new l.Api.messages.GetFavedStickers({hash:e}));if(t&&!(t instanceof l.Api.messages.FavedStickersNotModified))return{hash:t.hash,stickers:q(t.stickers)}}async function O({hash:e}){const t=await Object(d.e)(new l.Api.messages.GetFeaturedStickers({hash:e}));if(t&&!(t instanceof l.Api.messages.FeaturedStickersNotModified))return{hash:t.hash,sets:t.sets.map(P.c)}}async function T({sticker:e,unfave:t}){const n=new l.Api.messages.FaveSticker({id:Object(f.f)(e),unfave:t});await Object(d.e)(n)&&C({"@type":"updateFavoriteStickers"})}async function B({stickerSetId:e,accessHash:t}){const n=await Object(d.e)(new l.Api.messages.GetStickerSet({stickerset:Object(f.l)(e,t)}));var s;if(n)return{set:Object(P.b)(n.set),stickers:q(n.documents),packs:(s=n.packs,s.reduce((e,{emoticon:t,documents:n})=>(e[t]=n.map(e=>Object(P.a)(h.a.documents[String(e)])).filter(Boolean),e),{}))}}async function D(){const e=await Object(d.e)(new l.Api.messages.GetStickerSet({stickerset:new l.Api.InputStickerSetAnimatedEmoji}));if(e)return{set:Object(P.b)(e.set),stickers:q(e.documents)}}async function x({query:e,hash:t}){const n=await Object(d.e)(new l.Api.messages.SearchStickerSets({q:e,hash:t}));if(n&&!(n instanceof l.Api.messages.FoundStickerSetsNotModified))return{hash:n.hash,sets:n.sets.map(P.c)}}async function j({hash:e}){const t=await Object(d.e)(new l.Api.messages.GetSavedGifs({hash:e}));if(t&&!(t instanceof l.Api.messages.SavedGifsNotModified))return{hash:t.hash,gifs:H(t.gifs)}}async function N({stickerSetId:e,accessHash:t}){await Object(d.e)(new l.Api.messages.InstallStickerSet({stickerset:Object(f.l)(e,t)}))&&C({"@type":"updateStickerSet",id:e,stickerSet:{installedDate:Date.now()}})}async function F({stickerSetId:e,accessHash:t}){await Object(d.e)(new l.Api.messages.UninstallStickerSet({stickerset:Object(f.l)(e,t)}))&&C({"@type":"updateStickerSet",id:e,stickerSet:{installedDate:void 0}})}async function V({query:e,offset:t=""}){if(!M){const e=await Object(d.e)(new l.Api.help.GetConfig);if(!e)return;const t=await Object(d.e)(new l.Api.contacts.ResolveUsername({username:e.gifSearchUsername}));if(!(t&&t.users[0]instanceof l.Api.User))return;M=new l.Api.InputUser({userId:t.peer.userId,accessHash:t.users[0].accessHash})}const n=await Object(d.e)(new l.Api.messages.GetInlineBotResults({bot:M,peer:new l.Api.InputPeerEmpty,query:e,offset:t}));if(!n)return;const s=n.results.map(e=>{if(e instanceof l.Api.BotInlineMediaResult)return e.document}).filter(Boolean);return{nextOffset:n.nextOffset,gifs:H(s)}}async function L({emoji:e,hash:t=0}){const n=await Object(d.e)(new l.Api.messages.GetStickers({emoticon:e,hash:t}));if(n&&!(n instanceof l.Api.messages.StickersNotModified))return{stickers:q(n.stickers),hash:n.hash}}function q(e){return e.map(e=>{if(e instanceof l.Api.Document){const t=Object(P.a)(e);if(t)return h.a.documents[String(e.id)]=e,t}}).filter(Boolean)}function H(e){return e.map(e=>{if(e instanceof l.Api.Document){const t=Object(S.m)(e);if(t)return h.a.documents[String(e.id)]=e,t}}).filter(Boolean)}async function z({username:e}){try{return await Object(d.e)(new l.Api.channels.CheckUsername({channel:new l.Api.InputChannelEmpty,username:e}),void 0,!0)}catch(e){return!1}}async function K({chat:e,username:t}){await Object(d.e)(new l.Api.channels.UpdateUsername({channel:Object(f.g)(e.id,e.accessHash),username:t}))&&k({"@type":"updateChat",id:e.id,chat:{username:t}})}async function G({chat:e}){const t=await Object(d.e)(new l.Api.messages.ExportChatInvite({peer:Object(f.i)(e.id,e.accessHash)}));t&&t instanceof l.Api.ChatInviteExported&&k({"@type":"updateChatFullInfo",id:e.id,fullInfo:{inviteLink:t.link}})}const W={EMAIL_UNCONFIRMED:"Email unconfirmed",EMAIL_HASH_EXPIRED:"Email hash expired",NEW_SALT_INVALID:"The new salt is invalid",NEW_SETTINGS_INVALID:"The new password settings are invalid",CODE_INVALID:"Invalid Code",PASSWORD_HASH_INVALID:"Invalid Password"},J={};let $;async function Z(){const e=await Object(d.e)(new l.Api.account.GetPassword);if(!e)return;const{hint:t,hasPassword:n}=e;return{hint:t,hasPassword:n}}function Y(e){return $({"@type":"updateTwoFaStateWaitCode",length:e}),new Promise((e,t)=>{J.resolve=e,J.reject=t})}async function Q(e){try{return await Object(d.f)({isCheckPassword:!0,currentPassword:e}),!0}catch(e){return se(e),!1}}async function X(e){try{return await Object(d.f)({currentPassword:e}),!0}catch(e){return se(e),!1}}async function ee(e,t,n,s){try{return await Object(d.f)({currentPassword:e,newPassword:t,hint:n,email:s,emailCodeCallback:Y,onEmailCodeError:se}),!0}catch(e){return se(e),!1}}async function te(e,t){try{return await Object(d.f)({currentPassword:e,newPassword:e,email:t,emailCodeCallback:Y,onEmailCodeError:se}),!0}catch(e){return se(e),!1}}function ne(e){J.resolve(e)}function se(e){let t;if(e instanceof l.errors.FloodWaitError){const n=Math.ceil(Number(e.seconds)/60/60);t="Too many attempts. Try again in "+(n>1?n+" hours":"an hour")}else t=W[e.message];t||(t="Unexpected Error",i.g&&console.error(e)),$({"@type":"updateTwoFaError",message:t})}var ie=n(15),ae=n.n(ie),re=n(23),oe=n(17),ce=n(14);function ue({firstName:e,lastName:t,about:n}){return Object(d.e)(new l.Api.account.UpdateProfile({firstName:e||"",lastName:t||"",about:n||""}))}function le(e){return Object(d.e)(new l.Api.account.CheckUsername({username:e}))}function de(e){return Object(d.e)(new l.Api.account.UpdateUsername({username:e}))}async function fe(e){const t=await Object(d.g)(e);return Object(d.e)(new l.Api.photos.UploadProfilePhoto({file:t}))}async function pe(e){const t=await Object(d.g)(e);await Object(d.e)(new l.Api.photos.UploadProfilePhoto({file:t}))}async function he(e){const t=await Object(d.e)(new l.Api.account.GetWallPapers({hash:e}));if(!t||t instanceof l.Api.account.WallPapersNotModified)return;const n=t.wallpapers.filter(e=>e instanceof l.Api.WallPaper&&e.document instanceof l.Api.Document&&(!e.pattern&&"application/x-tgwallpattern"!==e.document.mimeType));return n.forEach(e=>{h.a.documents[String(e.document.id)]=e.document}),{hash:t.hash,wallpapers:n.map(re.b).filter(Boolean)}}async function ge(e){const t=await Object(d.g)(e),n=await Object(d.e)(new l.Api.account.UploadWallPaper({file:t,mimeType:e.type,settings:new l.Api.WallPaperSettings}));if(!(n&&n instanceof l.Api.WallPaper))return;const s=Object(re.b)(n);return s?(h.a.documents[String(n.document.id)]=n.document,{wallpaper:s}):void 0}async function me(){const e=await Object(d.e)(new l.Api.contacts.GetBlocked({limit:i.e}));if(e)return Ee(e),{users:e.users.map(p.a).filter(Boolean),chats:e.chats.map(e=>Object(g.d)(e,void 0,!0)).filter(Boolean),blockedIds:e.blocked.map(e=>Object(g.k)(e.peerId)),totalCount:e instanceof l.Api.contacts.BlockedSlice?e.count:e.blocked.length}}function ye(e){return Object(d.e)(new l.Api.contacts.Block({id:Object(f.o)(e)}))}function be(e,t){return Object(d.e)(new l.Api.contacts.Unblock({id:Object(f.i)(e,t)}))}async function _e(){const e=await Object(d.e)(new l.Api.account.GetAuthorizations);if(e)return e.authorizations.map(re.a)}function we(e){return Object(d.e)(new l.Api.account.ResetAuthorization({hash:ae()(e)}))}function ve(){return Object(d.e)(new l.Api.auth.ResetAuthorizations)}async function Ae(){const[e,t,n,s]=await Promise.all([Object(d.e)(new l.Api.account.GetContactSignUpNotification),Object(d.e)(new l.Api.account.GetNotifySettings({peer:new l.Api.InputNotifyUsers})),Object(d.e)(new l.Api.account.GetNotifySettings({peer:new l.Api.InputNotifyChats})),Object(d.e)(new l.Api.account.GetNotifySettings({peer:new l.Api.InputNotifyBroadcasts}))]);if(!t||!n||!s)return!1;const{silent:i,muteUntil:a,showPreviews:r}=t,{silent:o,muteUntil:c,showPreviews:u}=n,{silent:f,muteUntil:p,showPreviews:h}=s;return{hasContactJoinedNotifications:!e,hasPrivateChatsNotifications:!(i||"number"==typeof a&&Date.now()<1e3*a),hasPrivateChatsMessagePreview:r,hasGroupNotifications:!(o||"number"==typeof c&&Date.now()<1e3*c),hasGroupMessagePreview:u,hasBroadcastNotifications:!(f||"number"==typeof p&&Date.now()<1e3*p),hasBroadcastMessagePreview:h}}function Ie(e){return Object(d.e)(new l.Api.account.SetContactSignUpNotification({silent:e}))}function Pe(e,{isSilent:t,isShowPreviews:n}){let s;s="contact"===e?new l.Api.InputNotifyUsers:"group"===e?new l.Api.InputNotifyChats:new l.Api.InputNotifyBroadcasts;const i={showPreviews:n,silent:t,muteUntil:t?2**31-1:void 0};return Object(d.e)(new l.Api.account.UpdateNotifySettings({peer:s,settings:new l.Api.InputPeerNotifySettings(i)}))}async function Se(){const e=await Object(d.e)(new l.Api.langpack.GetLanguages({langPack:i.i}));if(e)return e.map(oe.b)}async function Ce({sourceLangPacks:e,langCode:t}){const n=(await Promise.all(e.map(e=>Object(d.e)(new l.Api.langpack.GetLangPack({langPack:e,langCode:t}))))).filter(Boolean).map(e=>Object(ce.a)(e.strings.map(oe.b),"key"));if(n.length)return{langPack:Object.assign({},...n.reverse())}}async function Me(e){const t=Object(f.k)(e),n=await Object(d.e)(new l.Api.account.GetPrivacy({key:t}));if(n)return Ee(n),Object(re.d)(n.rules)}async function ke(e,t){const n=Object(f.k)(e),s=[];switch(t.allowedUsers&&s.push(new l.Api.InputPrivacyValueAllowUsers({users:t.allowedUsers.map(({id:e,accessHash:t})=>Object(f.i)(e,t))})),t.allowedChats&&s.push(new l.Api.InputPrivacyValueAllowChatParticipants({chats:t.allowedChats.map(({id:e})=>-e)})),t.blockedUsers&&s.push(new l.Api.InputPrivacyValueDisallowUsers({users:t.blockedUsers.map(({id:e,accessHash:t})=>Object(f.i)(e,t))})),t.blockedChats&&s.push(new l.Api.InputPrivacyValueDisallowChatParticipants({chats:t.blockedChats.map(({id:e})=>-e)})),t.visibility){case"everybody":s.push(new l.Api.InputPrivacyValueAllowAll);break;case"contacts":s.push(new l.Api.InputPrivacyValueAllowContacts);break;case"nonContacts":s.push(new l.Api.InputPrivacyValueDisallowContacts);break;case"nobody":s.push(new l.Api.InputPrivacyValueDisallowAll)}const i=await Object(d.e)(new l.Api.account.SetPrivacy({key:n,rules:s}));if(i)return Ee(i),Object(re.d)(i.rules)}function Ee(e){e.users.forEach(e=>{e instanceof l.Api.User&&(h.a.users[e.id]=e)}),e.chats.forEach(e=>{(e instanceof l.Api.Chat||e instanceof l.Api.Channel)&&(h.a.chats[e.id]=e)})}var Re=n(72);function Ue(e){if(e)return Object.values(e).map(e=>({id:e.id,title:e.title,amount:e.prices.reduce((e,t)=>e+Number(t.amount.value),0),prices:e.prices.map(({label:e,amount:t})=>({label:e,amount:Number(t.value)}))}))}async function Oe({messageId:e,requestInfo:t,shouldSave:n}){const s=await Object(d.e)(new l.Api.payments.ValidateRequestedInfo({msgId:e,save:n||void 0,info:Object(f.p)(t)}));if(!s)return;const{id:i,shippingOptions:a}=s;return i?{id:i,shippingOptions:Ue(a)}:void 0}function Te({messageId:e,requestedInfoId:t,shippingOptionId:n,credentials:s}){return Object(d.e)(new l.Api.payments.SendPaymentForm({msgId:e,requestedInfoId:t,shippingOptionId:n,credentials:new l.Api.InputPaymentCredentials({save:s.save,data:new l.Api.DataJSON({data:JSON.stringify(s.data)})})}),!0)}async function Be({messageId:e}){const t=await Object(d.e)(new l.Api.payments.GetPaymentForm({msgId:e}));if(t)return function(e){const{canSaveCredentials:t,passwordMissing:n,providerId:s,nativeProvider:i,nativeParams:a,savedInfo:r,invoice:o}=e,{test:c,nameRequested:u,phoneRequested:l,emailRequested:d,shippingAddressRequested:f,flexible:p,phoneToProvider:h,emailToProvider:g,currency:m,prices:y}=o,b=y.map(({label:e,amount:t})=>({label:e,amount:Number(t.value)})),_=a?JSON.parse(a.data):{};return{canSaveCredentials:t,passwordMissing:n,providerId:s,nativeProvider:i,savedInfo:r,invoice:{test:c,nameRequested:u,phoneRequested:l,emailRequested:d,shippingAddressRequested:f,flexible:p,phoneToProvider:h,emailToProvider:g,currency:m,prices:b},nativeParams:{needCardholderName:_.need_cardholder_name,needCountry:_.need_country,needZip:_.need_zip,publishableKey:_.publishable_key}}}(t)}async function De(e){const t=await Object(d.e)(new l.Api.payments.GetPaymentReceipt({msgId:e}));if(t)return function(e){const{invoice:t,info:n,shipping:s,currency:i,totalAmount:a,credentialsTitle:r}=e,{shippingAddress:o,phone:c,name:u}=n||{},{prices:l}=t,d=l.map(({label:e,amount:t})=>({label:e,amount:Number(t.value)}));let f,p;return s&&(f=s.prices.map(({label:e,amount:t})=>({label:e,amount:Number(t.value)})),p=s.title),{currency:i,prices:d,info:{shippingAddress:o,phone:c,name:u},totalAmount:Number(a.value),credentialsTitle:r,shippingPrices:f,shippingMethod:p}}(t)}let xe;async function je(e,t=""){xe=e,Object(r.a)(qe),Object(o.a)(qe),Object(c.p)(qe),Object(u.m)(qe),function(e){m=e}(qe),function(e){C=e}(qe),function(e){k=e}(qe),function(e){$=e}(qe),await Object(d.d)(t,qe)}const Ne=Object(a.c)((function(e){if(!Le||e!==Ve)return;const t=Le;Le=void 0,t.forEach(xe)}));let Fe,Ve,Le;function qe(e){Le?Le.push(e):Le=[e],Fe&&!i.b.has(e["@type"])||(Fe=Object(a.b)(Ne,i.c,!0),Ve=Math.random()),Fe(Ve)}self.onerror=e=>{console.error(e),Ke({type:"unhandledError",error:{message:e.message||"Uncaught exception in worker"}})},self.addEventListener("unhandledrejection",e=>{console.error(e),Ke({type:"unhandledError",error:{message:e.reason||"Uncaught rejection in worker"}})});const He=new Map;function ze(e){Ke({type:"update",update:e})}function Ke(e,t){t?postMessage(e,[t]):postMessage(e)}i.g&&console.log(">>> FINISH LOAD WORKER"),onmessage=async e=>{const{data:t}=e;switch(t.type){case"initApi":await je(ze,t.args[0]);break;case"callMethod":{const{messageId:e,name:n,args:a}=t;try{if(e){const t=(...t)=>{const n=t[t.length-1];Ke({type:"methodCallback",messageId:e,callbackArgs:t},n instanceof ArrayBuffer?n:void 0)};He.set(e,t),a.push(t)}const t=await function(e,...t){return s[e](...t)}(n,...a),{arrayBuffer:i}="object"==typeof t&&"arrayBuffer"in t&&t||{};e&&Ke({type:"methodResponse",messageId:e,response:t},i)}catch(t){i.g&&console.error(t),e&&Ke({type:"methodResponse",messageId:e,error:{message:t.message}})}e&&He.delete(e);break}case"cancelProgress":{const e=He.get(t.messageId);e&&(e.isCanceled=!0);break}}}}]); \ No newline at end of file diff --git a/dist/c40704558924293a9c69.worker.js.LICENSE.txt b/dist/ac9bd12fa11f2e2e69fe.worker.js.LICENSE.txt similarity index 100% rename from dist/c40704558924293a9c69.worker.js.LICENSE.txt rename to dist/ac9bd12fa11f2e2e69fe.worker.js.LICENSE.txt diff --git a/dist/icomoon.099b3b84c42b396b6486806692ed75c2.woff2 b/dist/icomoon.099b3b84c42b396b6486806692ed75c2.woff2 new file mode 100644 index 0000000000000000000000000000000000000000..2657d4b37aa2e0693725483d0404f21eb5986d9f GIT binary patch literal 14428 zcmV-iIHSjRPew8T0RR91061I#4FCWD0Dyo105}2w0RR9100000000000000000000 z0000#Mn+Uk92y=5U;u(%5eN!_=tP0CLJNWj00A}vBm;sH1Rw>28wZLf8;@f}Mum+7 zfKc$fh|1N(_u2#tM`OAe84HM>bRon!-{g_1@~f%_uBJGLu&u=tkLyo^FlRjT zy;GI!q0Y|eph%#*3k(X5Rb>4*8(V*S2eAuemLUjjhnRTCEv?D0#?0ETk!^*kEv$zg z5&=&fiT+3B<-}Z@)~!TKR|K=5Z2t;IQ_v9l?rvbay(59RF&5)%QxLKGVBEZc)3C`r z-vw&_XKLE+g2WkA-L77+^6A;D7}K4isrBdNrvO)p9v3~nn&SoQ46H3eoR#9mEdG@+ZrgpTr-TBV{ z@7P%cNDNrEWlJ7V9tr?}0`Ob=+%@P?x3+!fghGcUbpK6Z009Ur6y(Hs07#^F&{{xI z#ZI_iC)c2l2Ko!AAUYU7H;4=BwE+6#Gg7a&*E=MF>Rvzy6Ov@ekYcA$2*}+?21#2P zfCgZxHWmKynfJZd>wwS+hP?NDO5-Mm3^eTq5R!vPwuCpt8gnV)ii$;c75T2%s8* zY(O)e%qA>~QA`r6VgLecVwQ-(TppkTGfM`Lj`tXxqKHiV;EEUDR{h-9XXzT-)*@XFK!Prsq3S`d*{H zLR2iOI>%s$AJ< z7ynQ&6oRvY6-T?23SdN7iJ4-RzC4KLojn{scH(p0cRc(+2A*4x*wo9wD(ra-1D7s* zAj#KNSm?+L+9%2u6b%Ik*vQiiDt!T0y*w~EgjUEJiSKhEBz+2~IYiJ3n}V}k)RV`lSYP<{>~ZDVPQ3h??Y#h=KPh>D?*GReVYxYZ zXx-@kC&@=uIH*_Y?EPH3(PJpeG3*8y^v(rJ21MZ(lb8+%O0B z+>2d_TeL6rs9?NF$S5KPjcL{@P5V`NiCID+^U#aIUhH?uz52Up+TRS<=o)Oc2zmuY zc+%*{kt#{0CXN6wI%Xm;F+d|{;F3^`ByD6=F}JN@i>C@1sE8Cvk7I0!H1ihh;<)TOA5qLZ~nTy_$`1pN62ViRS?Km^?01aeoCgr&A)zHGgJx z+al80cqbH(0JmtjYrSl4Q^ADK+XKw;L0l4NxV*ydcr;cX>LXsq0E`TDv@p9{>r4Ln z1-suC!Zn+UgPp@FNxGVb`fRq_9^YZ(W<7H(lH;}%*sX_{(ds<#j);~@#U>qp01hL; zdML8|{>cnN?0UvM#t%thLvT(@L>o6ZQxm$62%sNR+=7`sM$nO~!*iSx)7tPbFjj8b zAh-u~3?1~Q05rc7wqiVNoogz&_a+~@=6Dfz*KxB^inGc>%yyarult_4yGCfR!I9e( zl;{pphfZu2RjP>V**pqbV+}+N#dKD?R>ofnt0G!|j2~qRq2g=m1+pL2T_MST|hSFj2g@Ty*Z!hjZw5jI<&6-JBKP;%xo10*7UVJ&ql{lJrps_857!BXsfgm(yb?gxdek2NU3*f5b z(aVECLlGs+pr5sC0REHa??#PIW3@#D$KXaBz#bsBUm(E>JA>2~=}8V%CJXCmfh3-twbhh>*fkko4`d1}!#0nO2kEto;C z{mfx+yI5>g&3+K!T0{->uv7?drlw8!4n+4o@BR7(c59^}F{)C~)^bOY3oQR1w3Q1< zU$gp!hd#?M09u2xb`lC(`T^Wq6JfW=kCj?(@Mj=HCR&m7^Tw1S|OsO*WJPZOf6aWE* zTjYy}mT&fLV}$NV#xR|PUq=^!iO0xki~lE{qg^Xi`ySk8#iLTMqWqW&9PHFMOUGu5 zW?p!{RqEh!80CCzL?D`rC3#pQ;kSNDOIoqN3I&?C;Pp)|aVpcaaHy=31x5+W&ZEtZ z`7LbK^So5DV~C2ZXrHRS@43w^rHEWn|SkpN;jph)Gx+*)*(~Cl%cvZxSOyzx9pC(S+h$Gw+_nKGqSW; z_72CHzhJjNdt^q&o{pXl5_ApC`jzVdrVRC|RM=MQ{{C)$f9K$d0IA}z!K=>>j;!jR zZ_3)(Yt)!u+XN%ITSch_e)e=ADc1s&1aVkaEQRimwCM?W>}g{m_M)d)fSB4oHtr0 zQSE>P;&?;C1+vTp?SB4pm~&)*YK_zBd~>Va&39U|U}Pn{jDO+{eD8TGyitqhr#nQ5 zT{bt(NO^V)`*Wf-;eoW^V-AN_`=U+wY;PBA&z?orD6gkGt@uaPpQYgRaYC?{%TpHV+I&0 zn?Df*TxRAz>N+ESdu0&IE30VW`~d6}PzEeu^m|klE)}dCM+2Y<;S$zuAye1z;#Bgm z55{XXIUe}6LLvMFZMSX%^z7K?B4XAn$17@`mnzWu@nXppMwygU2fA~#Fg6;c0s#;a zPO9(G#onar9}P+OM2_3S&!fBB>FzgoHqe8#B9bRVU5_l(T+(wrQn6w3=|C20MuQg0HMVAb_OG-?B)knfz{~oub>zl>t8ieXTQsq8l z734~Zl^}M)#}@bMXhG|rH|5;p_wQfnv_%fp))J0;eK6cl&B{mcTZW+6{3_$-mzS5o zUdV-ZTbPhsx6qoVM`5eRwj1G7VxwtngrS%WxFsAFPuW0|rkYN&j1VynRPYox3lGhyZre?2A0Y zRPlWG^U^m&WDoDuk#KNgwTV>)Ra=BmkOsXDK6A3SamldxrP?!)doTn;ODFojHJGoU zl#4}0$Ek!yBx4ar!^B3ads+a5cTRcN7zIG>iPUBn?ca2?ws~tr(iNxav=I%no@dP- zD<@CYCyxh6DUvp+UE>-k!^(oqiB^+w9f~{LKj_&bLTWu`1OeO69|S>3z%uue{U-~2 zl52@n`onX+{E^#enXpWpR)zs=muAKbe;TVyjgP{$c8G;nNNtfbaaRpBBx>kTp>eJv zz3>UCz851%qb-jTRQc5$Q3~B8L1qOSpg3cN^{rWiHmlGy->TB5|?$f_uALJ69kb+6*!hAW++k3rF1 zghS-01<>xc;;sNu5GxBE$ChLFdU3`mc9G8kGziW#(%+vFS;M_UjV)YF&{A-z?bJ=k$z+w0d{@0a}apEvx9JA%j9 z1oNUbn_oQr`R&9Y5pD-R(q=@HN>0lJxhF*wR-o!(r5a!Tp#o94PldfY5aEyC(hDr3 z(LzS*a1d59^+pM7C1HF+VL&9)LA@ZZZKjV#9u|P;wAd6XdopVmj!=Y%Ee0rQM!`&% z#)+_nlbPfH)nV}x-tlYZ@MeqcbiV-)Z4UgY3vC_@^yIYS64lmHKJJ8CN&Wprvr_N? zzd2<0ji;$J{k>&pKH)$T}M&x#Ws?2}Zs5q$j><%o8GgsTfi4YMZUqygp0VaY8-Cb8x=I4p8y48J_!>Xb?Lt6=g21W-_377#(MHO7KWC<&@R}0Cj&Z0f{ij8E=kBG$Mj)R{w-&fSr@=FD;t>|2~ zT5Xmo>FRJyt3{LzjPFQAj#1OiGD*oqkA_bvGoz=vmJ1qX$ncBmoN_bXsUji>_M~9$ z=|D`D*^Wvl&O94;C%iKoeu{nfw4Kla6JjQ1+fV7x4U0%_Cf7UMT)_6hhZ{nI_r{g? z#xWEiG=51UkO@jA%)FAbtYStS#>kwH>y4Q&1C-*@u}%v}^6Xvr9je6K8Ti+2k4VCR z1{DyxGk*bJ<E58_PmBW#T6S!lm*802E+D8L%;r@@FhH3Mdlo!B26T2c_unJHu>G#@>Iq{xThcmvXm?h%En&4fCHoi#VP@@P{JOCMsr)QBLQ zBV;_d5YjXy*7LQ@ly)a&&2bqBDwuqOWQqgaoK;xJp{|kyk^PXro}+;_WFF>N*xcBq zg9_yQpj>0S4qRMH3CH^(vx%0NzQH>w{J;UUgHeuao>zhTErcN07;~_&O%HUyj^Kwm zkwXeTl{a^NjXv-;n>cbBTYIWBXUF<&rpYH<0mH;2e}Ah%d?Lq3wT^XUV4#OP(l<8L zRwh(s{3{F#9w+mttq|05#vzfTG|)zamXgQ7xF$9) z$Zh@h71Nh-iC3b{UYzb56^<$&ywrTPaxK{uJJF@BbV zGO_I0=;T`SVRogN37*N4#&Z-bPiOpKCSK;+alFYr*V00G1B4X)0%9~(?n4g4C)pb@ zLwD%nOa{Rfu%m7gUYr4W)QS~+Ldsj2_+g8VTpt1%OJ)wN0Z5@i+V#@NiTahSfRjZc z3Z|g8pb}hxx>iu&(z&k2UUyuDwX7hCTcUYbBVkjW%-V0%@AHzNn zF#*q5BNuu`^W$qKR`tTRWHKHhpB!}%i-~9RS_y=mXw!5 z%#ft6);e@^zc+Ev%78J?E^xt6&YGh#d}FUOCbg0T$zZgt3y?68FvmMR6|WKJwZR-A zPV{xXc)2WH0vCdNJ2j$`MyK<3URYQqdc3ev8g!eT40Qc)Bh668pix?G>#wAqIfGIH zJ<2kMoMe_9LbyOezY;kcO2KZus+QT1#e^ZW9a;MiQrZ&HI`>P|ekrOq zWFM*$9`^DH6=SI^chlpe4TBgkcF#EQ%batTg7%n+3qS0+jyK4LO~W`c@KMM}njKB( zqf8qIG!ZLnWg;*@G9K6hf3v1zY5v!oK2O@Hf^^1 z<{Sc*H1g1{a%7J4m|Mi2K=_XVV~R0#d%`P%$k{Ac@0b+8Bf%#2($nGbnbL^pXm&8g zqsLTI$Ksm&h0F<|nwkuAnEC--(R2z(mt&eyQ*6jRdmYBR_p4H9vxPHn$U?8$TV`V! zwc%QTsDGtmch1x-IHXB^o{BIMn`WVszNy}1ZP}|QGj?;r#m{r!s{jA$;j=UDl>dMK zefG)PzxBeucVG5=`PZ_Uee7mT<@ba9iuC#P=7DYqMH&2X}>N!DHZb zs)vU%1!K?Zp0I+>Xv5ydbxOJH%Vs4W`7Z43$BLm!5!gki&x{7qG~-@(y+7VQbW-brG zu;n3{B0UQHbP6kPHnMj#L(rwG&Ref-AZ?QIDNNY9D^(6@U!SBTCz)w#9>HPKG2z5F zV_FpzuG9wc+E8xlxK{Uf_r=;t-+Y^t^zApUa9IB_ubQud<-&;z$Kzmp zq?xI&pBq{BRZlo8`dU}`=`a4yZxprJBSaCAN4YxPpG)n^4*jXFYtbwUuCL_YVj?Y5 z?hA!OliU5@{(Y;xX2=>%tNC8Oxcp?wNB*#)%YB;o+%@$Mv_puS=K~4VGj&LUo#3BuhBaVu6$_KDmD=ia=o^&t+3|08@JDcE9PJI?EbPx((jS> z>^<;djWZuKtoaY3zb<%1hl0Y}n?RepjR*`wRXp(|@vgo7a8IA4A8cK9jfd`(Je!bIE_qV{ocC_qbIY=W_4C-TG^bVIUtR2#jkqu+?aXVZZ`9 zFs_9-ca8os6+JFQNDLApJf8Zbq|H7J1gB2<__)aB@afff0fXFcnedqBQ z)H7zNhs-pNZ3A~D-l4a!TYa9tQ3Kk+8{&1KI3nqie|!4oI2C1OTaXuu*yl*6bQG7z z>O`K$DqbL45F?*Ds{v{VP*7!q*n;a`0OXn}T)Yg9iK9KTjBrkMSv&?+x=}K&L(94nL)4rk=HICPN}2dzmK*DM)3U-5ID* zn*##AILKcOaLWk);G(>F#Q`#RK>FNm`&$k(Dmj-fZPVtW3nZun$GQb*t`?LU1QQi* zu*IHi85hBsW&TKn=h4%z7?b{tm}fXa)lT^#d%7xtLO-yn7xKlW{b$v^lHR;V;T!+t zZ2!1o`F0M7&##CbiQVRV?&~83RKZW~%#CMTB0M*ZZEMO_z~WoV%&~`GT>D+lJG091 z^Mu>fp&j^{DWr1I^K0Lo;vC-O@?p-YQ^hJOA&eJE-bU}I1MkVaG*OzkekSvsAO9`O zLBh?;6U31aV!h@2y<-9-Lb>Mb`Z?JYuWy)>WsR~&MO9mLy=EYYg!v}@UR6}YD<=sb z7|N}%p5`)IZF&+7H$6INN0)m9ng{cU*g^z|2Ou-<71iav?FSnVamzAuCYmQCZ}mEB z;<`|@0Z$+I1A=4FjUy6yrTUQ`lTv!9}dNY&BoYTA{i5xnkrk0e!$f~SQ zhZ~yqV$rm5ZBz6Pg?v^XlDh4>k%Qvs^qsbOinRGw-}EG5FGZY)6{jSdi{{getFFx$ zw|@Qf6oEh)&tN2K7d8IG0&n*2HL6zcJj(=!rT(>B6R;}E>3kyA@00eO-yHUTc^y2U zYK$}J^{r4!nsLh(ZjYqr^y5=H$YwKKETgz2KbD%6AhngDpBJtw(Sf$?I(RYDAF~(? z7K=_lIJjktUUy#sBNtS@!Wq5s-gQUsc<>=JeL;kM2ez&Rz&ohXaF%u*`%a6iO*Tr@ zWl#|MWnMQOM0Zz8U>JM=qJfa)cFc;lMlD|+HOrJ8jwq`o!Lg$4sKujnYkZa;T}y0z zr;N;5!u>CL^_t%mfOlhUGun%_nO=0D(Q<~M-qhxbcjt)VV%hS;G7GT@ zkzekZt_?3GhM1QP(&8@!;B}yA!Q%)S4-7S8!FN%yAJhaX8;V%rE8{KOkyvB10029v zmjwp?TO18|6Pc_&NnekoM;6l~eITBugn4UV(24817tzJD{mvCDfdp<$4GpRru?Bz$ zdvDmuEgT1ce{;^xh+kbFthK#qY4?_oS!7ietD?;}GtpNc^3sAD0vjfb8mtDZLmZDl zhdORb*lfwojzbUFtO#V#KsYzMt zto#tk+Gh*-5zqbno<|%yKW}uwhMX{EhAKmH+_#Wd_~`f0tLJ{YZ%i7y0n=IRd{cjE z8o3svO~RhjpjYFfmtvDAf!#Eax=E87R~ifiaVZmBvKWi{o3IXe&y-||Fmhh;KOX{v z-v8S$Gh3XvB~~Jigz|^?L4ktQ;YVeyW4-3UIHoXMD=-H8nI(*1`S|vyzo@z_zw>&w z-9DVMq5N1y(3EYA7Uaw}#ub|z>Z)-OCE!di$b`vouqD{Nn`^Tl;n#$loG&-ozuEFh zk>v)X*17}_0pWUi-S-{HD@$5hz*p@1$1TnS2Q1{RD=O-CxFGjb@PKLke@G(3{K%g9 z!;PI=@U5MeFr)c`-ggyiyzWc~^191>VfNx?GvfGIIeX;-*bQEegxCe_wvG&?E+9da zq0*I0+S*yI>)*V|ium)lyrM6+26g|;2F-!RfyI^1OlgL+3K{sw64S=(;9*){t?w-J zS6|Wc-rHMdg{I<3ybiQ2j21>ShkN+WD?URa+rE%GEV~*_J--ZNJr$AAw%W+Uv@U=0 zd6tNA@eIpbqC=*NiqvWPqHLQ$kzpTEi~L+GY^mleL1!-9tvzUIk(TA(tAma7;r}Rx zVo&+x-W50`rx?h!kt(z#kin0foI-8Z%BxFhCR<1_pSifDHA_$dJ_g*Xad0Twq#w{n zAKGuO9chi8>Fm-J;F|jmJfDIUou*eeISD?J+iE!octoi`9cRO&7OC@d$=S7)6LBPv zlpLFFUp-m5Euzd~HiQ{NYpO#R-=R~Y`QPI6|GBy^{NH?^ zDovhdlIZ&L?CA)H!p-OTs(g{KuA6_B1#kmHLjCT3`MtzG#Pm^dkYHp_rebpQR1TI| z03UAt6TRjo1f~YH^R@Jv!x_xVk$$zgalWP+6Bn(%%+AxrXZQ8Rn?t*ZVmlh5cImg;7%(j0N*#vi!?rcwm%=XSs>>hSvh$7&2ltLKmTTJ zCF|1}(^x3;1Cz{$Cz(_;Mo*pegm07fN&33GD=OLp+j$9aZbm`JgA2hvB}oT7iJSHc zwInvXBvV?^7g3Q^;=^VEHcW>1dooMdta*m-mV;GeEWnz|;;>e;yv`ZFIOE`WrOwg7 zN>aU#Ha1TxLKC=;rY~tK;zf}^;eGNvkrY>v`rB`_iof1zO7zwGY15V~Q{z(;Q+JwI zCz@6gmD88|rLZKpJHPHAT}!88>ajtiK{H)FF(69&kwR;>B!B;X!qYyJ95yOoqI$Z< zXc!z*yP-^1`15JxrKOw6lpwmpN)t~Kk7@itCxI!H%zrOFxY4$j#NRiB3oUVgtBmO= z;F7Q*P2$Y0h7s0(mpa4|8Lfq!|*`uauhgf5Hc zCy@|cJ<^^&X`js&6hhfSfz#fDf!KVx(N;pz(KivrnoZ&Xh)N{ACInfncB+ed8YfzQ zvw3sB@K+T!he~PLZ7bMCJY7j}w@C(vJZH|~aG~vFWOjG=OZq{gbMxlwQ6u&;`X1YW zK%mP~OuVo*&}wa+%p8dB5!@@~Q7=C+rM5O_=ImJy7g4G5qKC6)XM{D=dP)h%4_b(UNfe?}pL)hmsm=`c!+mbB-pZy_3KrD1&o`_2 zsc@vf!rmk4+kvv4GA-$9-YM70mF;4wgGoWblB+f7z zf8PlpVcpeaMb7CpxRh%WGHnZ13&Qj(o32lp=OYcY-SbBR*Vu2L)rFhdtITU9O>efC zaK>-PBBt;HOHvDSG>;Ri0$f96a8*l=6y^y&DjAi|S~Kv}@6_&u&brvi{|$Veck%FL zOMDp#?dq(MYT@y^l8)tqg!L8mC{M;Houx~R)u~MBBI<&KdB*+9t?&AVgauS_nn|gP zP1Id1Wqc`8&MxO#^1^pPw+nOZgAHYj!!S$lqZ(+e38KWtmIl>MW=l9amQcVbrDj=j zXC7Tsl#YdOqC>uDFPeIu5w%jhAbcl`5Zb_oXxxR`D$Nj{L(_!{h{~Q zbwl?B#$Z-+Ta`3ObD41oq~%+ESW_%p>DT@S=q2u+o)X8oxzMwR8?6`k`x+f=I;X5u zRafI$Tv??v$2lWQ`#ZxrOG}q6-?HwYxRdTsdUF2q=?vXU%#0jd5SPpR@9@9Vs~t7R zuI_l~>8VLPuspG4e~ktbAtHM<7tKWhcacgm`(*kjkU=DweQ>`+5>5HtN6DrvR08GE zcT*m~79DsehL&CiVAuq3mXMv4N$}L2bvonRdSSb)Szh9W)JKoc`e-nPB+nJ?V(#)L zr)w7C@}k_Q(p&=eELzTG$_n{nQBct`K8Be)I=@Ha`S<~^Le$%z82*gpeDV^WAyn9& z=ikWV&e8w*YRB)S9`}PJeb^M5_cuvDyGn~DCp=*nK zFg{r_kv3*NtVyOI! zFFZHwS2C4Wy!pb}#9Z}rk`jI-(Je^ewmbnFj+R!xxR`e_7l@Ae%y_F6l$8o@zBYY^ zO#%@c-_Dr93r?AlPJ76yKFMUt&aSLXnoh(OjHaYCW;|(nl4knNG*k^ml1OJbDh@j? zgz}B8Y+2yPk}V4ksOHRpP);Kws2!b-;udmLoS!k{qt~m{1Id_6oM~ogU)=p;|J#(n zchRXVrePC}4$}KoniEl;JW(?Vq2V z2DNf6HeVgb_6Cs_BG{krz2TmXqc!k`eFI;<+_Sp=&wKF|W3*r_SYQce7uJYjtqsJ- zh=p>0;3K^CS<{soyx`UDuU;ucs4hKx{kdz_l*yARdd=r=et!7v=VJY$-0W;xrr7ZL zt_OwV{?7!#&;9-H2Mg}``}^OEwENog7xpvB>VB;$Ph1?gA;qqX&8iE5V2I>riBaMS z77MCFDKk_HZ*i>`X=`n_y>VU}vnKp6qgd7xG;Y-dvE_-jvwhT)@|PFZB(^UN4m?Hg9xK0@m-5 z_Dr+!Xn~xlds%xjN7zOtHoE9xk92`7?Hc)*!adUNr-S0S{Q2{m6z!fCr#qjQc1J>7 z9a(W%xH(T?5U`eZsEV`M zo#+AdG0q{gJAF=f8R%Jhhf5>1BuLv!H?>9gr~`s%ZGypS#i?tNw}&GB3x>8~Rw{W< zq?VU;v0H28IVSCt=DmTLO-6FbVjcZS^%BWx1%;yMsq4=E6%aR3ua66i)9WY31^jh( z-PGtpQ9)WVUbkAAn`)-Vu~2p(8)e1O&8fMom31J?H`@{p9f39COYrC~uuSDG%5~J< zW-0x6DQ(qb$IODL(AbuljwSmmKBGZRfklCZl^#^y?vuf)zNpy$XkzHR4XVP=#Hkh;O9dHJ%j;PCW)Mvm08yj-6 zJ76eAdaLP19jV*th#iSl%bEV9zaADdHb z@)_}6AuaZNe3@9)`+ zFD`ZGeDMYJQ?JjME{rv+nZ*mT2MD8WnAspO2G^9_{(o8;t!s_dC@=(@1D|1}JmpfN z{a_Vi|9}xLPw`iGRM#YYq*l~4r%X&+oR{|h+v7wo-ykppZ+2l;SXO9bjnE`An$04U z(AZd;l7lKNT#!H{DQ`t{Y}b~k^fN!EFP*DVf1J<;RmbEuX2QOgvYHRIbMnRI+$BZ< z2(`&#_V&P?(SJV_+W!VHA>UJWhi{X0}(z^5fU-1W|V>|=vz&}h>W zmzn{ae2iWilY_%TILNcPY@^O@k0XJ>!DQ3$)Wd|<@Z_-W3`{*j5T42q2z?s%xAuaS zz`Fz%;NHG&UmM!=8bbyp+vPc@9k;TTfNWQ=z2#SkF z>as%&rl-=b4||O)m}!K6geVhXBM4K^2&%+hy-ZbDc;zpdpF5Add{7-QsW3Y%JM`na z=+x*mmL;4@Ba>+qo0*e1Oxitu$E;6uxtIeJmiBV%&Lu$4j%VqnWic`A#Ic}rQZiy^WwL(0kcwMZWL0Yh$rzzz8k z6I~VgY}>x|iegCx*?>kR=Va69;vYnaGZ}Z?oRT*pM45!k7l}xQe8zDCH*9zNgm;XZ zg>Rg;HZ}Bb)sJG{f|k;smo#lW%0Q@Xtg+)eNx@_YBL~!nFIu?aPBTdcv*+TP8*S|f{F}D*2!&4U9tr{lK#JRkf%H93ym-1 z!4vb({HPpl;eO|0yPOM78@{ZvrKb;M`EK8{YuBy@Uawz25l^zfFbknDyrXn>>2589 z5QEO2>j6Z`fQmK41NqjR*@)>Yo(wnerqNRjQ3&4=xLSb5FiY@H5f*q!z!*(V8wd9T zu<8g1J|^cmdnv<;k3-7Q;{y#2LMSMn8Lre+|HLD`sA>%!TUyqMAPNNycb1jLhI0n* z5g4?kyct5S0qld0#?t=kYRp->b|&4s*u@RFBsoUiIZI&{o9#Ieb(Fsi&;}XiZcA@ktsGD*{Q=bd znr@gqG2CbsW}BX-Mzin_Ynickz@EJNGh#lZg1Cxj5Cm#EC293BhJ2aB7{k`p1E@js z6aWC6vZQ!Mtx5Hp+_4-eKO12qi4hJahcl9MATD>0BO;O7i>z81C0tM@6Hn%?n$WD9 z;5xsqdBT{H2HO?XA)hQ4Lt!UZ(CrIA{+(2#|Y+o1y?a)L>2Ngg7 ztbkg5ws2twIDH5j$J`8@$cl~;>sX`%i1$nPppdE#%ymOjd>jd9!Ffa858$&y=`cj4 z=WvFL7T_|EsRti{lMgBbavdY3aPlg;KrIlLEZ~n&6&|eyX*I|xD18874z)to42Nif zY0wca47+E?B1jF`TVv*NzYq9kCvJxT6>uXUz@h_*HjowO6u<;+1yZx|!~ntI#*R5e zrU##G6kvgYBrcGp28wZLV8ysR~2grqu z1AzA9xe*nsyC02+VdF6L4DZPP|7+55L^W(xaQ}!3h9#>lt+#C#CUy97872lgb`OYz z9FZmBa_?+NsPX6PdVTiIdBdC2FJY5(iX38qj*KeTH*vBBWM}es5~%{o0%^hDAJ-yh zVB5%_I@4+XG9DS2XRKR@ zln%9-lxgj|kCMg0%vZpEj!hR+9Rq@Hn2L>ag%X6poSK~+T1op63<)G_<3bV-*`M?q ze+4ZM!Y;!Y8`U-fyBUe`M@Y~lknIiW&sEoC_vzmhE{0_DlDPnF(`q-Ddr`VNm-A?C5leG zkW1(8>{69uuKZk7ey&1nTVLy*G#Md5%GPHK_On!vgK#Ln0rEw!Xc+Hn^E02F|KT4%40 z?|Eb0Ngi5VrqF#KoB#ru&q<}B01*2}Kaq#x>pqoQ9lt-&PYVq=PY*gpHK4uveVuY{ zC+P2ni%NpXiGX%DS8zyPNiuCS9TfrU!9{!3=kmC~x9j!Xks>$H5pdiIpd$x$QM8lT z4uvpCf19v_Ay9b)HnAWHjU;p@!@l#zU4{>bd>vwhtBJuSk0luCSRIV7pkO* zG&6-7OcjKFNJ}sZ$4MN}bP{n%o*-LO?4I=y)?`vj5GW2T0=|s^aMTc_HUV#AvUcv0 zO(VP%5P>B~_@Sw3qIYTOvjb+jkyI2;MaKcYeYuYhv2tX@TgPrgQv<-mDoq{u2M$}< zrvUk;-Degs&zXEJC4vX|P##|`J4UG$K#q1U(+ok$wWRvyS+iO?fSk)y(HNI83<#Om zfPmKGacc?sZRehpbH;R$V@UvK#&br|=>QPPVJj6e((Hyg9fTFp@vLEt1z~nf`9w<< z;3NSkh?drxF^{Y6q_sxxwigkXVdxRgp1W8{j;$yEA4ZgJuCmMIDU#ztjf?l@J@W_G9vtPn z7-_MHm#~Lp$Er*A;?;8g&tq3TTfmB=T}l-&BCN!=;uXIzh;3UnY#clNxo$C&3o`JW zg2X01nwF<;90o2v7{IZws<5;$j+39RrJ!IaV89Z+niAO!YVAjMte)Bh-e6SDb%w>AOwi1* zGi1(t1b`t?3>hkLHFkg?>Qk{`1kC&a%~rx|H$?| z01qD5)#CH-m?JDFCl9R~J-(8xZ^1!)@@DVn+Kn;7c8)Y_r9?!C2Q~YXxPA&10YJJ3 z3SidllQSCXlMs_eN*rOBM0w$LcKUO-4=dS)EE6x&%i5MB%O{&v#x^_SZ&CrAVf^(9 zdKKZxUQG_-{I${YTZY5k)&s&N-7w3(bkKE3G_$7CN0(=e^K02AI*6n!pq@7v{9+(N zH2iWl;|=RZ1~<%sz3;p3#3{O-{A4lSBos8_B^pzySC;at@DkfqDk~2?AL}DVm)vcn zhj{}X>~p$`Iu$`vNQ76LZ5%0(R9fN)Ff;E&1R@4_;|yHli@|UsDV1fa28E}K4LA@h zvaGtY6EMfU8*r{cyM6AvgT=Caz>t6$H_U`Vtm;>!+K?`>EbJ z3L}HPt=yHi@^RNbp!>8EuK82~Xcnu~?QS1#bNFUwW`{$nQSN>uE1b>q=MD+8*=4{N zL`$V=-4?hO5k`^7@|vq1WTEF7cW*x&hjqb24T&~x7E_Ztj|iY2liY%tGe+Q^D$kvwLf3yuT3ZtFf`A^adL6=>kE_Fr@zu&o3E2NRe9_-cmEs%y3-@K@0}Y zzyIe=7b?rqF4uN`!Eb?j``JhDftOfwME|O2eX1_O7?} z2SG=44dV0f3%5rZZXaQ{LS_IhE$5jv*Oe%GF%gpyAK3*G&KY4S(iOZ$AK$onY z#Dnh&-v0J{uheGCVTAcozeF?_OY*Qt!LR?YhB|Rw8cM{Q_WC6UJeFx#Xe%jYnz4vw z`^A}P?f_eLm3OJ?2%<7;Xrj0+o?nYS1R`Y?89`Q!kSV>^6fZ>9do*kS% zRb8&Q^Rb^(G`DveMzXK0(hB?-?8J1o6IMn`X*p`vy@Qw;wlv-RU2^NDKQX|ncUHbZ zP7G|)*f`VqoRRm4kM>yn1>F1`f*HgoPXurbf{z~aN-<<%X^Aj(&giQp_(uZX zlul@~gD8;A2@=lJG9C1q^o1}x(f;Tf$Hw!GrFA#Hmt@+|OZb`C;!o`NotZx)Yka$d z2j5};^o*ou88m0EbHon|UOIUdLII9@k3cmrRGoG=a#Z)yVE|O^0&D7Ou|K%lYT(0Q z_G25SWPQ)gog{FE# zwAHW{0nJrIuZA0gCYxX21YQJlMN60Xnp%9V>f2>e8y!fZ13#f5y5=|nl6^KZvhLvB z8YoANyi+-DGdC8n;uc8$&$g`mt01ar^F*+_q~xSmYe~2o-VIB*p_!N0z_sBc9h%J2 zQLb>Q5~NP-T;OiKt+;-_8|N;+)<05hPaLXUO~mPQ!NdTQS~ekUnH*!|r-~bIi|0X- ziv_uDOh~PJXie9nu;uBn6W({mRSj1_VG+K934S=XF8c8Rs(Qc~u z0>gaJ$672sBw#PV94f7j78(IP=w`|2+Lqz_S;MfF6-Ekxw{kSB-8}_F1hAv#KgAKG z$}ZPG&6Fup^)M%ogo6|NkjQVrZ`**7lRbI`_Ef1$hVLKLh5_lp%!##hV}DwM{&EJn z2q`*ADs&7Tm0sy>|y1Du&08W%7_cyYC^|2F`2NOwGoTbuEG|E#vQ)yT^ zS$3-WazMtAw8?0JOJFuu7APlLOPlLZ+~NLNv+F6S^_PDvVC(rt7$7z6^gB(zGQ_1^ zLo(^N&&BdB+gLMQA#q&j1E4O;c9RH+5vW7rww?cXPDE%i4IPu}#;SDCaIVbGYmg4#uMaQB z?F#^C9j58r)=99rjJIn22s04(-V865OO*^>aMti6Th~CSf zjMQp@YIj<=BY+o+m4%99OWAxv;pV2N|5?SYV!G$k@vQsd*Z^tvB6_E3mOI08A1E-x z6h*$Y5XUnZXJy@&@^ss~Ca@!)kgn__V!QrXRid%;@M?}CPeL4^BMxeO4Wh8=dJV^Z0SP=58maSX_!Mbx?OU$5R(<;W6(3m#@Cce9 zUUX3N!Fl7;2?Y^e1wVRBLQ8`^-9l>Le~%|1fqhb2nyW4@$ehMeqn2HUevk8(*u85Z)(0f<&*f))N45SZ=76qTS+15Q%QqqF` z{xNo~o2qwU><7>Au;5X+eJ_LpmD2n2?Jhy65W18g2_Gd>FXRmH4#Lgf83tDx1ll1` zGi|ZpU~*VsK{#@?A2F0NP}tynJZk=I1gtYpdv;n7K*-)qaawR*;{ph3H=v{tSB?uw zU59$Z6FqWbd_*PM-LO}zYX7Q%+ZRwhUJI(!mg1uX)PzvaClVMo#k9wR95@|+X<{>} zaPI5@d<>?Q-cmtoP@WvFxaqhg*5n3;WkN;~@^m&*CfTp3H{dbUMI6MD9miXG1E;U6 z$}qKz4!k8`23yMG;F7Qagdo_IlDVM+ zIqmczDILD^OuUtNH`e|b*M8JCqXRlbbjqQNaNvdwB-fDJHE!L&&w~#)a{=C)t<0NK z7(=ev=Ot1yZrFtJcXE#o3B!O1GU>Ns6Xpv5AwM|AX&MQh{oB4n6dI^K-0!%i837Al#*sPr7FIe3upiFT3!(?wWxmD%M8%hQO z^WJQ6sBlADa-wt=hs=nc&-9#;dENrk6-X1E6NRhYggk`pHMiXAXi;_bbwp@tLlDjp z3Thv=DdrL5`Eq7TyOy#hunYthq?UoQdr31X9WeszSsYkqk%RE50fl>-~3CL zAz*T2au4mgaP}xAObCIlLJVD|K)%vuV5gbg%E^ADF+GL^gtVI3%-|< zEM{?;Z0^Y%74T9_>@UaGW>=cDV*J*a`a4@uhT%uP|D+)@k>gRVxsD8u_6m3Vr-!?n zDb+HwiiLAZlPPJ7I73}cgm0YeG?%=$Cg58jG=yDa-6_VO;q3T4M3 zFy`5o-Mnsox3Db;m2o_OFA==%n%bHMoq)q{Nc)INq?w*_aA07tq*_jNGR8MKe- zS7_Kv6DsCbS?==V0}Y2bFm~4j@JoVQkpj0^%!LZG>v)4q*fpY&fs8@{Yc`uOrc65r zSyik|CFLlov~OO-n3ePJ4h3G)nkv^-=*J4M3|_fQd$5!qJSyandnQ%puIoy#sSF{I z)us&XDM#i6r`$aD1l;$gpMW#Pxw?Jfu^@6w)==-76u=`vGOw@hx0!ODlTi#s8iL8l znSqm>L|eo#ub)NF$r8nWr~tq~ ztWm;A6fNg{?8OsHOB27wDSDGcF{~JZMhTl4&1;E(F)Lj{bJK>PDxq63IDJj!?KM}~ zk4X^8=OTcJxRIId^WUx1^ni~)Ki?E%0r10zDd`FF;ZH8x*>+c4v1nn98m%U!0)Ru)tmX%-nxxMXM*WLcEkFk z)n1iMUez$7LsFLopy;xIRIv^LK3au^TLbSNNfCBxE3(#U>WCXkXX>`Ikg+S@BB z%!p?g8;3Ch@rY>rhf$4+LMYP+xGe}LaZICq(sjOS!cRX>oA&chwsOAfiFWIkzwx<7 zkX6A`5#*xr3&x@e*l;65S35hb_=lcgX2g}w;1l0H$*vc-*h0mjVTUH4z(d@hV6ONZGk~1}A`@PviD0j-i zaFQlEfrE&ZfD5<)0z@A&i9{yw2%(!`nwy5SB1khL?@=HhE?@qDDEj0ZNMU{+@TO1# z!8AtJ5KX)H`m6l?V<%0Y)Y0J|mM^_3=7EUAApqb*bUMRy!QWKGqt^qe^g%O(@9Lo7 zzq7f_uvuD30{x^1I86dzKX6+Y4s|Q7k9xP%?Pf2JbvV|L`H#{k>9bg!+@SxD?LIu0 z37B&acmMdDQw+u??%3`A*1fcWc+AERLf+GJ>F<$Sb?IET(IXW!wJv#rOu1GnhkP5S<9 z1jkX1LC;bnZTfyQXhS(>{LB^F+eGB32qw~ru;^&w11Ax9c4pMprqfw1ZTJZT2fZMC z0&iDqTreszFJh>yk{S-fb&XBP0KLDCa-Fq!VDd$_0K= z$s%3BTO}ZD6h%I{-Fo$m8S25T2g@BjcR4;GH_#is?k9*IY2yxZ+Ysyz#m9Z(?w#dO z6c@L{Zxm6l;ST32E)UfKzm8J8f!i5+`RK12poRb$@iq+oq1X$Iak4ZfUIs(OY!A%C z?CwspTdztsh^d3V8n?4SbmjW3b;EA_hg(z~at}UAIDL1@d30H2Naj|4?s_-(+@j1H zh%yzo!>}TX40jZpq7=o&OJQ=90*2cJe5M*qH*GSU&r_9b2%#wW4qM7CUP5KQj=40S zE|HM4)S(Dvs4&Fl;49Q7KfjL-@>l&_GThgD2zOerpUmZ#JbTODri1h{_Js>uG?~bJ z2_nHTG9Ss*fFiwc#KQA8t8>g_+<#-9zvIDKwB$>MX^%qZ=#Nn}lYUE|u8O75Z!F5W z?2z1fRP-(-S3jrV4UgDczb;+2l?`IDOQVLPws@cU@lXy$_=hXC^+XZj*-0#GL%ITH zZZ9@P9ei`;Upe>WO8d7H!qn02*vU!667lORzjU(?wz+(e-QArnq6|X0VWcgzJ{s^G z&q@*}h1BLVKKbxIGA*olSy=)Jk`m zq1TV6I?2HeoM8^FgM#!UWZs}0K20|KE7~9rTEwhiKT+qk#=}%mQCj`EbD}jo8Mlpl z(X+Y8$X<6Nq#r7lg|ImAjRgc}tJz6Cm>jI6;vsTO-~RCl`(YsRL#QrKbYXd?%f8}s_my4pk4Br&6|K%kq$?W zjOvy4K3o&FXWTX}P}N84b-HFKA<59*&gqf#oOs@?g{)Tn`C_tD@q;O8u~KU>vb}Iw ziFCAN(-Iajd{MJrZ#HXn0|V{tI_*~l44+el3U}m2d)FJev> z;l9V2D~H)BlY;(>_hvd@gLgfCkbK2w+N_Hc_q-nF1( zFB##w#h9rgs_??M%Si0SoPU1GuIXn1cs7*QAg8c4a|-FGH=o2Q*LAw#j_N__0#p7w z?ikjeFFw9cX2v%n@(Uf=dEr4KhPm3+%^Qsc^)dGfuVZT|27ihHpB^(f-;mT zWsJEPfeM=i0N6pTjL(0@W&@t73}&ySw@1<=i|mnpBZp(eygo4Cz--+Q?WEbNWBCdo z!7wHV2h0r_6F`W)E$rarjsd{CK5KjE-_9?Vs#8fxcb1KsW#y$SBTUy*k#}FRk_2`9 zx^W|Vi{4@niGiU5ZPz6%mgIWd0SJz%k?4!`MY6j=a{}k&CvK{wYq@89^}>f)+iFJj z6MXY|`Qq*gY3j7>0LhwH3wWWgeSBVr9ymK^Wd8b$AZ3awMRL?Tmz(?G-@waf{v8;2#ye$^hUwnJTHrZZ zm?p;9IR#I@@CBcr)#ay$L|&nVkVU@y<+Fe-bD)O@7HBQK$o|8%-5&X^m_N|X#1)Cn>_P1dX;4{765{E^6FpP;CJSvB)=b6caNGK`}Ubho0peXZ*xMf$>0Ik z`u~tfBJjd`<_^_&v}2n)%s~dzIi2@P=2-Q~Hu!y~>0HgCMiXrRT3NGVKEVav4hPtT ztd_PErPeQ2oTAc}NLpH%&FemVNDF=RPgdUdn+08evOpuhfL~DNNR_5Y%i;d7%#khJ zHZH31)_Bh}{qO@d>$9zCW?&*VjoXH_1W|*i?r?^0z2ng(vaJg!L$b>el!sFoYALXU zy4gw^qIUX{9=9&Q`rhF2 zo<9FC{1cv6d0bZ91o73^>C<60nUl@+R(Zogo!1`~`*HXIfj+mt|5aieWO%9Aus^&j zRWVUKnStI|fDmr|@l)=_g{}s*)3fx-W9d!G;Xbvger{X^CeB!Kk(H&5N$>5AF$FfE zfmGB>&XyzixJU#y560!#OeR}nT*Q$h<22Kzz2A72DZ^#Vvm4(BC_#*hh-=(CTTWa? zh4Jsu?JMF>C~Ia^m;zvp_7$jZU$ zH_PEP-Q4R{Wz279OkpC7FANfoFu|yrG17h99lS-_E9vd(DlKj0w{l|%nJGDK_s;oy z6;9jdp1N_jNJC_?3R9(}y`iPk3cXlNz#@%nn zUEDEnJyK_DU?GW~2Uj;u$U|Z|52i0}$m52SzTp*Vj#!C{Nc`uYnFT*?H%|4|_-K-r zDHCH7rzUPUt(t0FQBY1^=99o8?`{9F0W}>z5mk>481!+|)#LrbHD4(-dSm>rzs4@k z$>^Bje&f~C;|%(NQMC)oc!jr*A}=c1L?R1l16B{73oNBk0}dQhFj;@kJ+Q&ImO_55 z8!t4)0H!h|BY;Ch2Q7&bw;Fm--)+huMI>=8m!liojuZ?UTLq@Di}jK0#D=K!-1%5xxrdU)Y3LqHITe9q#vT-IGil7 zSZow0=-gy|1S+Z9t}+hS$bRv$Pbt!11nO9PkiYf>sFl{=p*#HzG9l|`cHOi38ntC z(I_(p5_bsA-!}t@U3>XzMb6=IxU}=n;x=0>2-2-+xH@T$my~b4;|udw+isrL1{+(; zO=~0#AKG;|<)0&=leqjGmBQ?}=dtB}&MwrssKtkJvxHw2j!0*&?tkgiy)(9>I%?v7 z{qwTUAG~OgE5m`E9R*Y@JYQSbFkcY6uCx~6%IHNiwNsaVX9kfWlC1XUAR61J8p z64Hw(Y39s);~M34?EGpv;Ej~s)=O626=_!A2VwvMi%UlgT$`(?;|S8qJtQP3Ijbzd zUy8r|$7~Z%o4x31jV2s8(WH~f~xb3jwLSJ?8Tg9-b}ml1RxhUyLt-kXQo2WE>5sq;K>yl z*my=+rmCpGG?=nnYl?P+74>xlbrcmXUDm#Ke@F+-u5{@9<-?V`0wDe z=@s_MBbT?`clT6I-M4IN)85KBNDPZ@6&xfJ0i1;@NzL)(Zy>!`QnP=rT@pe5*GtJF zFHi#I;cHVqK!4h>c9fZ)G62N}kY{ljC{tk6opm^t>Gav{oKEmuJe}IbBeO0ZOd`rN z#XA@~Jn_kKGqQPc=BP9mi;hLhnG9JjU(6Ha%|jy@nIm(1B<`;tkP2bve52_Y$^GWZ z-LG)KaW8)%bZ7RbKWzJ#*yDO}N%`Zp6F1nDr>f>*QTkK1vR$)v&rwm?sMm;EC5VJ` zqWi_~x^AC=WZ&XqTk#|oM{y}4vA*c9*VNx}LyJ-%$d*sxh0d6fl{sZxK-T>0*WFS# zDn_qe<7W%UO%CPp<;<+fQwZ4zFLW}NQ8(KJ7uIE%W+Q)mK=B?IFO5FH>5n8Ch$Njz zw8YsT6E7K09W@=)#)_8@ZM8_-viOa6q9&9<23-8~*-ZtLX+nNM@6nzIrAN61|IWDj zpk(iYGebUwlc@!p&Yhl`seVmV5*|pj^J6(pFTf!L$5+2OpLISHh>v*9_^1&U7YT1l zlRSeXkHpH4GiJ~o=gvsRE$9@TW;CX!mz7PMPRJGv#%XcFaQ5_Rn(*($ivyQd z-sF;4PS>^NV6v%vGihr?5q7!2ZZl_^y#PH_mln@ffJ~pAgcTi8)uUTZ8#HoF zZl#WcPYH+%VD!;-Z;09G-x9b(-u$<3cde>@bSI{Cl}yorU4WPg8hqYWj}oujG(KdYa7U-(__r4H zWJ)RvXQif~CoSI|?{xeU@QVOz%$eHSFrmQZ&%XAa?*|mU9+VWDKeCH~RXx(4G#e!g z=!ESH+Lan%>mOh5q=h}gsboFQ$j2z`(c^kQB8JIdzphNs>}qnjUx6; z%)gzEZ3K-Iu$1Z9iF&-wS?l+7x`MX=SSt@&wcJo>PxyVPF-xcyGMBWe3es5}$Ufvb z#wM{kyiRoLX=(kAEg@Z5=E_AX!Z!mb<{=^e7;$el2aIH|;%bPFM*hezIOZ5AC+rY(Hd<+Se|oz4x8jn0i% zx>QWIlQx}xT2*Z-k!E+<(`%~;skDsQb*8jhJ0XQyjaR4HYf}gvE9)}S+X%3m(ast> zi4eOS_Nd_~#ROMl%hjjs)lW|mB_i^z>nJBZxNC@3$)av5WZTvj^P$L;GD@+mNsIgm z+ar$|VT$5r6u{rHVgkrYO0*$i90iL`(BG!wiZ$(Xdp~1hh@aF%Ll4w~gEe4_9-^71~60?*`@Yen1^u7HC zLP>(Jx~-xz_A9lbvN2(N(xR-S|K03Ia{hXu33$?T(}L0h>nlY@vB6{#8%2itsu&$) zZf=M?k|@6pO;Mfg;mId|PhK)RPW^Rk3se!AS)WSqzL3^nm5Q0FfEb?Zr zzcupgwL+ou%!Axhb_H*dz5=?v7ATJ-Xt*o=$g#9!n=9(r!#XmM1dTK-Y>6I_J50 zDi6fam&L>Y)Wd?{?yJ|Mzdcg&$89}`QH5u-F8B5{xBT{d;!5@Qy@?CMXGCU(#rwih zu#^(OVlk@`(<$Xfg(S3CHc>r#-Jp+)Q_C8)$~#j1J zF6d>_2n;R!JwzBV3x*jwx}Xew_cl>s=9au=%yS%id#}Q8LT-9cdf?a95s48=Omi@W zN+MCoRy{{yn7DK7mPu15&(vrg_9}F}-@+-S^$!)?Kdk;R(DgDTB$A9874>Yz^2S3Z z{R~Nl(ExJ1vg^2B3$|U-d9&`!NGXY`BBl&#-)M~~{FUa`cSuD$pzQpa4o7DRzBJ96 zrOPWicvOxUHj_yLI=YRJb6F(jEo6<(2f@NPoRfL9NFMkohS;bAU&`;O__Ek*%ht`8 z6pKqqdL%qPBb`bM`ArNv*tmj2@*%w3%4wKVRR0#Q)}wqL)WbULRl9!81ORk;zDjTg zBfqbs0L`uy_t+(sh?lk7&9q5mC6uR0qPp5PR>zycBjtOfgE&!BpK5F=moPs2Hnw;F9=DU@9$Bw^R|9;)NL_A6Y{Y;ol_m09*r#m$bKy(^!s0RQg zQ&sE%9*k$qiHR7y<2i&nx^MWDfF;ax1fB+<+0FvIO5Cho0w6{U(;DC`0K4`B|08mo zvzs!g;3%Yw9v^OC075`Pey}pGViP5LaTRe`R8esU3@a4W*HK&)70#Kshoh=3N=F#*2z-lp~zv# zMupT~BzKHlfz4?mzwj3FANoMD9F;5B34l5q;8I8eJW@o8QxZtZC=T#PJ%$5y7V31N za;|*@RT{kAYIMlanUP&}(q0{3C53&+ZQJ?OQ&gO6yEvFfzW&LWUFMzt<)ATjtgAEo@ zy6$SIH;I0?78_3W+u~RKA3hgSK^(;^2m+NIlBC*5eYVVQh-7JN0aO?F5&!@kGFCjJ zj*Io{)Ug~cI~``hQ$y_xHan7YI1Xo*J#;GN6ufc;Nw}m;7BZ2$a$KV}!F6$M@8Lq0Y8a?d3-1fVS*&}juOxhYBD_0B^)UkXn$(IxLhMIf(a zE&!5B63eum96XY9p$VgK-uVbL8-a^lyXd~~)SB_pLIn?7018Mxua#%py!L{P&ydOaxS~OXy(-SuJx7UcPu8?QIvDX zRz;^OKsJ@LJxd=u+z+r?+?-qiXiC^{8I27t2|V!$3b{Jl7DSD8DaLo!dHLxYZiP^A za-CpA=tM)KlZ@Q^lQFcoaLL%PiO%1(9V?+h)4gb}6AZpiG@^Bqk#v7DU&Ssgj79Nu zv9_vGYPMN~N3T{0@8x%g>u1YSu0o?4R&#;ho1BiI?ql1-W6I4{uWGnRjB%oYPolh% zpeRq{#N6n3nCh2q#F2W<+9%l;vb{g;J%~Xmxr6?_hM~nBz`3>6FvXIP0AA zF1YBD%dWWUn(J=32?9f)FgOBZjLgUMoZxIDf}vo!z!0000WNs=TtWr7>)Nd{ zI(iTf9-Ku`^dN|^dl5W%5)a;G;K9E_P!G-@PqqoZ@O|Is`8?m};Z1lye}#|V!Duba z&JrNF?p-HRaJEkf^e*oihZiE9S1a}E79mhWelw7{{E4nrw*&SL^U%4}we`I_$UYF# zSPXRK`^MwiYV|fDO&vYOK#AoyOErYZ<}n`$B)q3rYxTx1GMvfaJSOy;Oq2D^74(&N zu>gFai`Np3dUY2~dk5H&kjWG~TkKhU!q13$Mmw;T99?%~M-?Dytj4)*&` z;mO?&OT0hF>@nLS9rA)4p+5y>n9LidU(B0HP?#h{bzVqCgrj{d`ejJ580J6B2KXjbWS&c? zw5<;h&5VpX&gjU@(6HWC(;V8loxrZe&)qwk%G0>Q(YEHrSt^R1d^j9VhYvl+E@`+* zw&VRDXU19GGYn5>$JrKJ5G6@01RXM+P_2lhi%~!A0)V0@Nr7>UY>bI%DsH)`3qn#+ zRhDt>bSfK`<#0BYwq0J;&2Sw!7*;ykBYh!vDAsPAMnF8mx_L+ z>=&0zTo{)tr}2Sh3Zal-TKEcrw~IRXbu@NMnf^v3ihz(W&);_boxR0|58eKQ24yH# dz5c@{1^tqX^`N^8Q$!BDgu!GxZ&;V)o;hNA!g delta 321 zcmX@{jq%1OMzL~#H#Y`G1|X=6VBiMRJPeGJ4Xec_>Il~_O3qCzU|?X(07`^_uz1*I z=Jdp3kk}p|p96{o(sL@)fMQ1&7>a;ui!vT6`~S^IO-x~6DA56`F#};4mqYI}fPz3V zpg4mH2(uqzamvUosQ`*~FfcH&fbcH{>#I5W$v|~>Wj#Pcfr5-I|7B%LauX|n7MD)| zYE%H@en#`W#N1S%*ao1QHV~fa#reA+zqkbGAB%~9{26N|`!ISl)@+`^IJHO_x9r0CsLo@&Et; diff --git a/dist/index.html b/dist/index.html index 25f1fc0f..3d1e8f4b 100644 --- a/dist/index.html +++ b/dist/index.html @@ -1 +1 @@ -Telegram
\ No newline at end of file +Telegram
\ No newline at end of file diff --git a/dist/main.726f20d1ee31091db6ea.css b/dist/main.726f20d1ee31091db6ea.css new file mode 100644 index 00000000..ce912bf9 --- /dev/null +++ b/dist/main.726f20d1ee31091db6ea.css @@ -0,0 +1 @@ +#UiLoader{height:100%}@media (max-width:600px){#UiLoader{height:calc(var(--vh, 1vh)*100)}}#UiLoader .mask{position:fixed;top:0;left:0;right:0;margin:0 auto;width:100%;max-width:1680px;height:100%;z-index:var(--z-ui-loader-mask);display:flex}#UiLoader .mask .left{flex:1;background:var(--color-background);min-width:15.5rem;max-width:26.5rem}@media (min-width:1680px){#UiLoader .mask .left{border-left:1px solid var(--color-borders)}}@media (max-width:1275px){#UiLoader .mask .left{flex:2}}@media (max-width:925px){#UiLoader .mask .left{min-width:26.5rem}}@media (max-width:600px){#UiLoader .mask .left{max-width:none;width:100vw}}#UiLoader .mask .middle{flex:3;border-left:1px solid var(--color-borders);border-right:1px solid var(--color-borders);position:relative;z-index:1;overflow:hidden}#UiLoader .mask .middle:before{content:"";display:block;position:absolute;top:0;left:0;bottom:0;right:0;background:no-repeat 50%;background-size:cover;z-index:-1;transform-origin:left center}.theme-dark body.initial #UiLoader .mask .middle:before{background-color:#0f0f0f}.theme-light body.initial #UiLoader .mask .middle:before,body:not(.initial) #UiLoader .mask .middle:before{background-image:url(chat-bg.0e9c45048ff468c28042bcf15ff9e0d2.jpg)}#UiLoader .mask .middle.with-right-column:before{transform:scale(.67)}@media screen and (min-width:1276px){#UiLoader .mask .middle:before{margin:-16rem -5rem -20rem 0}}#UiLoader .mask .middle.custom-bg-image:before{margin:-1rem;background-image:none!important}@media (max-width:1275px){#UiLoader .mask .middle{flex:3;border-right:none}}@media (max-width:600px){#UiLoader .mask .middle{display:none}}#UiLoader .mask .right{position:absolute;top:0;right:0;z-index:1;height:100%;width:var(--right-column-width);min-width:15.5rem;max-width:26.5rem;border-left:1px solid var(--color-borders);background:var(--color-background)}#UiLoader .blank{flex:1;background:var(--color-background)}.Spinner{--spinner-size:2rem;position:relative;display:flex;align-items:center;justify-content:center;width:var(--spinner-size);height:var(--spinner-size)}.Spinner>div{position:absolute;top:0;left:0;right:0;bottom:0;background-repeat:no-repeat;background-size:100%;animation-name:spin;animation-duration:1s;animation-iteration-count:infinite;animation-timing-function:linear}.Spinner.with-background:before{content:"";position:absolute;left:-.125rem;top:-.125rem;bottom:-.125rem;right:-.125rem;border-radius:50%;background:rgba(0,0,0,.25)}.Spinner.white>div{background-image:var(--spinner-white-data)}.Spinner.white.with-background>div{background-image:var(--spinner-white-thin-data)}.Spinner.blue>div{background-image:var(--spinner-blue-data)}.Spinner.black>div{background-image:var(--spinner-black-data)}.Spinner.green>div{background-image:var(--spinner-green-data)}.Spinner.gray>div{background-image:var(--spinner-gray-data)}@keyframes spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}@keyframes ripple-animation{0%{transform:scale(0);opacity:1}50%{opacity:1}to{opacity:0;transform:scale(2)}}.ripple-container{position:absolute;top:0;left:0;bottom:0;right:0}body.animation-level-0 .ripple-container{display:none}.ripple-container span{position:absolute;display:block;background-color:var(--ripple-color,rgba(0,0,0,.08));border-radius:50%;transform:scale(0);animation:ripple-animation .7s}.Button{outline:none!important;display:flex;align-items:center;justify-content:center;width:100%;height:3.5rem;border:0;border-radius:var(--border-radius-default);background:transparent;padding:.625rem;color:#fff;line-height:1.2;cursor:pointer;text-transform:uppercase;flex-shrink:0;position:relative;overflow:hidden;transition:background-color .15s,color .15s;text-decoration:none!important}.Button.clicked,.Button:active,body.animation-level-0 .Button{transition:none!important}.Button.disabled{opacity:.5!important;cursor:default;pointer-events:none}.Button.round{width:3.5rem;border-radius:50%}.Button.round i{font-size:1.5rem}.Button.primary{background:var(--color-primary);color:var(--color-white);--ripple-color:rgba(0,0,0,0.08)}.Button.primary:not(.disabled):not(:disabled).active,.Button.primary:not(.disabled):not(:disabled):active,.Button.primary:not(.disabled):not(:disabled):focus,.Button.primary:not(.disabled):not(:disabled):hover{background:var(--color-primary-shade)}body.animation-level-0 .Button.primary:not(.disabled):not(:disabled):active{background:var(--color-primary-shade-darker)}.Button.secondary{background:var(--color-background);color:rgba(var(--color-text-secondary-rgb),.75);--ripple-color:rgba(0,0,0,0.08)}.Button.secondary:not(.disabled):not(:disabled).active,.Button.secondary:not(.disabled):not(:disabled):active,.Button.secondary:not(.disabled):not(:disabled):focus,.Button.secondary:not(.disabled):not(:disabled):hover{background:var(--color-primary);color:#fff}body.animation-level-0 .Button.secondary:not(.disabled):not(:disabled):active{background:var(--color-primary-shade)}.Button.gray{background:var(--color-background);color:var(--color-text-secondary);--ripple-color:rgba(0,0,0,0.08)}.Button.gray:not(.disabled):not(:disabled).active,.Button.gray:not(.disabled):not(:disabled):active,.Button.gray:not(.disabled):not(:disabled):focus,.Button.gray:not(.disabled):not(:disabled):hover{color:var(--color-primary)}body.animation-level-0 .Button.gray:not(.disabled):not(:disabled):active{background:var(--color-chat-hover)}.Button.danger{background:var(--color-background);color:var(--color-error);--ripple-color:rgba(var(--color-error-rgb),.16)}.Button.danger:not(.disabled):not(:disabled).active,.Button.danger:not(.disabled):not(:disabled):active,.Button.danger:not(.disabled):not(:disabled):focus,.Button.danger:not(.disabled):not(:disabled):hover{background:var(--color-error);color:var(--color-white)}body.animation-level-0 .Button.danger:not(.disabled):not(:disabled):active{background:var(--color-error-shade)}.Button.text{background:none}.Button.text.primary{color:var(--color-primary);background:none}.Button.text.primary:not(.disabled):not(:disabled).active,.Button.text.primary:not(.disabled):not(:disabled):active,.Button.text.primary:not(.disabled):not(:disabled):focus,.Button.text.primary:not(.disabled):not(:disabled):hover{background:rgba(var(--color-primary-shade-rgb),.08)}body.animation-level-0 .Button.text.primary:not(.disabled):not(:disabled):active{background:rgba(var(--color-primary-shade-rgb),.16)}.Button.text.secondary{background:none;color:var(--color-text-secondary)}.Button.text.danger:not(.disabled):not(:disabled).active,.Button.text.danger:not(.disabled):not(:disabled):active,.Button.text.danger:not(.disabled):not(:disabled):focus,.Button.text.danger:not(.disabled):not(:disabled):hover{background:rgba(var(--color-error-rgb),.08);color:var(--color-error)}body.animation-level-0 .Button.text.danger:not(.disabled):not(:disabled):active{background:rgba(var(--color-error-rgb),.16)}.Button.faded{opacity:.75}.Button.faded.activated,.Button.faded:not(.disabled):not(:disabled).active,.Button.faded:not(.disabled):not(:disabled):active,.Button.faded:not(.disabled):not(:disabled):focus,.Button.faded:not(.disabled):not(:disabled):hover{opacity:1}.Button.translucent{background-color:initial;color:var(--color-text-secondary);--ripple-color:rgba(var(--color-text-secondary-rgb),0.08)}.Button.translucent:not(.disabled):not(:disabled).active,.Button.translucent:not(.disabled):not(:disabled):active,.Button.translucent:not(.disabled):not(:disabled):focus,.Button.translucent:not(.disabled):not(:disabled):hover{background-color:rgba(var(--color-text-secondary-rgb),.08)}body.animation-level-0 .Button.translucent:not(.disabled):not(:disabled):active{background-color:rgba(var(--color-text-secondary-rgb),.16)}.Button.translucent.activated{color:var(--color-primary)}.Button.translucent-white{background-color:initial;color:hsla(0,0%,100%,.5);--ripple-color:hsla(0,0%,100%,0.08)}.Button.translucent-white:not(.disabled):not(:disabled).active,.Button.translucent-white:not(.disabled):not(:disabled):active,.Button.translucent-white:not(.disabled):not(:disabled):focus,.Button.translucent-white:not(.disabled):not(:disabled):hover{background-color:hsla(0,0%,100%,.08);color:#fff}body.animation-level-0 .Button.translucent-white:not(.disabled):not(:disabled):active{background-color:hsla(0,0%,100%,.16)}.Button.dark{background-color:rgba(0,0,0,.75);color:#fff;--ripple-color:hsla(0,0%,100%,0.08)}.Button.dark:not(.disabled):not(:disabled).active,.Button.dark:not(.disabled):not(:disabled):active,.Button.dark:not(.disabled):not(:disabled):focus,.Button.dark:not(.disabled):not(:disabled):hover{background-color:rgba(0,0,0,.85);color:#fff}body.animation-level-0 .Button.dark:not(.disabled):not(:disabled):active{background-color:rgba(0,0,0,.95)}.Button.smaller{height:2.75rem;padding:.3125rem}.Button.smaller.round{width:2.75rem}.Button.smaller.pill{height:2.5rem;border-radius:1.25rem;padding:.3125rem 1rem}.Button.smaller.with-icon{padding-left:.75rem;padding-right:1.25rem}.Button.smaller.with-icon i{font-size:1.5rem;margin-right:.5rem}@media (max-width:600px){.Button.smaller{height:2.5rem}.Button.smaller.round{width:2.5rem}}.Button.tiny{height:2.25rem;padding:.4375rem;border-radius:var(--border-radius-default-small);font-size:.875rem;font-weight:500}.Button.tiny.round{width:2.25rem;height:2.25rem;border-radius:50%}.Button.tiny i{font-size:1.25rem}.Button.tiny.pill{height:2rem;border-radius:1rem;padding:.3125rem 1rem;font-size:1rem}.Button.fluid{padding-left:1.75rem;padding-right:1.75rem;width:auto}.Button.fluid.tiny{padding-left:1.375rem;padding-right:1.375rem}.Button.pill{border-radius:1.75rem;padding-left:1.75rem;padding-right:1.75rem;text-transform:none}.Button.loading{position:relative;pointer-events:none}.Button.loading .Spinner{position:absolute;right:.875rem;top:.875rem;--spinner-size:1.8rem}.Button .emoji{vertical-align:-3px}.Menu.fluid .bubble{min-width:13.5rem;width:auto}.Menu .backdrop{position:fixed;left:-100vw;right:-100vw;top:-100vh;bottom:-100vh;z-index:var(--z-menu-backdrop)}.Menu .bubble{overflow:hidden;display:block;list-style:none;padding:.5rem 0;margin:0;position:absolute;background-color:var(--color-background);box-shadow:0 .25rem .5rem .1rem var(--color-default-shadow);border-radius:var(--border-radius-default);min-width:13.5rem;z-index:var(--z-menu-bubble);transform:scale(.2);transition:opacity .2s cubic-bezier(.2,0,.2,1),transform .2s cubic-bezier(.2,0,.2,1)!important;--offset-y:calc(100% + 0.5rem);--offset-x:0}.Menu .bubble.open{transform:scale(1)}.Menu .bubble.closing{transition:opacity .2s ease-in,transform .2s ease-in!important}body.animation-level-0 .Menu .bubble{transform:none!important;transition:opacity .15s!important}body.has-open-dialog .Menu .bubble{transition:none!important}.Menu .bubble.top{top:var(--offset-y)}.Menu .bubble.bottom{bottom:var(--offset-y)}.Menu .bubble.left{left:var(--offset-x)}.Menu .bubble.right{right:var(--offset-x)}.Menu .bubble.with-footer{padding-bottom:0}.Menu .footer{padding:.5rem 0;background:#f4f4f5;color:var(--color-text-secondary);font-size:.8125rem;text-align:center}.DropdownMenu,.MenuItem{position:relative}.MenuItem{width:100%;background:none;border:none!important;box-shadow:none!important;outline:none!important;display:flex;padding:1rem;overflow:hidden;line-height:1.5rem;white-space:nowrap;color:var(--color-text);--ripple-color:rgba(0,0,0,0.08);cursor:pointer}.MenuItem:focus,.MenuItem:hover{background-color:var(--color-chat-hover);text-decoration:none;color:inherit}.MenuItem i{font-size:1.5rem;color:var(--color-text-secondary)}.MenuItem .menu-item-name,.MenuItem i{margin-right:2rem}.MenuItem.disabled{opacity:.5!important;cursor:default!important}.MenuItem.destructive{color:var(--color-error)}.MenuItem.destructive i{color:inherit}.MenuItem:not(.has-ripple):not(.disabled):active{background-color:var(--color-chat-active);transition:none!important}.MenuItem>.Switcher{margin-left:auto}.CountryCodeInput .input-group{cursor:pointer;z-index:var(--z-country-code-input-group)}.CountryCodeInput .input-group .Spinner{position:absolute;top:1rem;right:.75rem;opacity:.5;--spinner-size:1.5rem}.CountryCodeInput .input-group .css-icon-down{position:absolute;top:1.125rem;right:1rem;width:.75rem;height:.75rem;border:2px solid var(--color-text-secondary);border-top:0;border-left:0;transform:scaleY(1) rotate(45deg);transition:color .2s ease,transform .2s ease,top .2s ease}.CountryCodeInput .input-group .css-icon-down.open{border-color:var(--color-primary);transform:scaleY(-1) rotate(45deg);top:1.5rem}.CountryCodeInput .bubble{width:100%;max-height:23.5rem;overflow-y:auto;transform-origin:top center!important;transform:scale(.95)}.CountryCodeInput .bubble.open{transform:scaleY(1)}.CountryCodeInput .MenuItem button{display:flex;align-items:center}.CountryCodeInput .MenuItem.no-results button{justify-content:center;padding:.5rem 1rem}.CountryCodeInput .MenuItem.no-results button span{font-size:.875rem}.CountryCodeInput .country-flag{font-size:2rem;margin-right:2rem}.CountryCodeInput .country-flag .emoji{width:2rem;height:2rem;display:inline-block;vertical-align:4px;margin:-.5rem .125rem}.CountryCodeInput .country-name{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-right:1rem;text-align:left}.CountryCodeInput .country-code{margin-left:auto;opacity:.5}.Checkbox{display:block;position:relative;padding-left:4.5rem;text-align:left;margin-bottom:1.5rem;line-height:1.5rem;cursor:pointer}.Checkbox.disabled{pointer-events:none;opacity:.5}.Checkbox.round .Checkbox-main:before{border-radius:50%}.Checkbox.round .Checkbox-main:after{background:var(--color-primary) url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTIiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEzLjkuOEw1LjggOC45IDIuMSA1LjJjLS40LS40LTEuMS0uNC0xLjYgMC0uNC40LS40IDEuMSAwIDEuNkw1IDExLjJjLjQuNCAxLjEuNCAxLjYgMGw4LjktOC45Yy40LS40LjQtMS4xIDAtMS42LS41LS40LTEuMi0uNC0xLjYuMXoiIGZpbGw9IiNGRkYiLz48L3N2Zz4=) no-repeat 50% 50%;background-size:12px;border-radius:50%}.Checkbox.loading .Checkbox-main:after,.Checkbox.loading .Checkbox-main:before{opacity:0!important}.Checkbox.loading .Spinner{position:absolute;left:.375rem;top:.125rem;opacity:0;animation:fade-in .2s ease forwards;--spinner-size:1.25rem}.Checkbox.blocking input:not(:checked)~.Checkbox-main:before{border-color:var(--color-error)}.Checkbox.blocking input:not(:checked)~.Checkbox-main:after{background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMCAwaDI0djI0SDB6Ii8+PHBhdGggZmlsbD0iI2U1MzkzNSIgZmlsbC1ydWxlPSJub256ZXJvIiBkPSJNMTggM2EzIDMgMCAwMTMgM3YxMmEzIDMgMCAwMS0zIDNINmEzIDMgMCAwMS0zLTNWNmEzIDMgMCAwMTMtM2gxMnptLTIgOEg4YTEgMSAwIDAwMCAyaDhhMSAxIDAgMDAwLTJ6Ii8+PC9nPjwvc3ZnPg==);opacity:1;background-size:1.375rem;background-position:-.125rem -.125rem}.Checkbox input{position:absolute;z-index:var(--z-below);opacity:0}.Checkbox .Checkbox-main:after,.Checkbox .Checkbox-main:before{content:"";display:block;position:absolute;left:1.1875rem;top:.1875rem;width:1.125rem;height:1.125rem}.Checkbox .Checkbox-main:before{border:2px solid var(--color-borders);border-radius:.25rem;background-color:var(--color-white);transition:border-color .1s ease}.Checkbox .Checkbox-main:after{background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAyMCI+PHBhdGggZD0iTTE2LjcgMEMxOC41IDAgMjAgMS41IDIwIDMuM3YxMy4zYzAgMS44LTEuNSAzLjMtMy4zIDMuM0gzLjNDMS41IDIwIDAgMTguNSAwIDE2LjdWMy4zQzAgMS41IDEuNSAwIDMuMyAwaDEzLjR6bS0uOCA0LjhsLTguMSA4LjEtMy43LTMuN2MtLjQtLjQtMS4xLS40LTEuNiAwLS40LjQtLjQgMS4xIDAgMS42TDcgMTUuMmMuNC40IDEuMS40IDEuNiAwbDguOS04LjljLjQtLjQuNC0xLjEgMC0xLjYtLjUtLjQtMS4yLS40LTEuNi4xeiIgZmlsbD0iIzRlYTRmNiIvPjwvc3ZnPg==);background-size:contain;background-repeat:no-repeat;opacity:0;transition:opacity .1s ease}.Checkbox .Checkbox-main .label{display:block}.Checkbox .Checkbox-main .subLabel{display:block;font-size:.875rem;line-height:1rem;color:var(--color-text-secondary)}.Checkbox input:checked~.Checkbox-main:before{border-color:var(--color-primary)}.Checkbox input:checked~.Checkbox-main:after{opacity:1}.Loading{display:flex;height:100%;align-items:center;justify-content:center}.Loading .Spinner{--spinner-size:2.75rem}.auth-form{width:100%;max-width:25.5rem;margin:0 auto;padding:6rem 1rem 1rem;text-align:center}@media (min-width:600px) and (min-height:450px){.auth-form{padding:6.8rem 1.5rem 1.5rem}}.auth-form #logo,.auth-form .AvatarEditable label{display:block;margin-left:auto;margin-right:auto;width:7.5rem;height:7.5rem;margin-bottom:1.75rem}@media (min-width:600px) and (min-height:450px){.auth-form #logo,.auth-form .AvatarEditable label{width:10rem;height:10rem;margin-bottom:2.5rem}}.auth-form #logo{background-size:100%;background:url(telegram-logo.df3a91becaa9678c529b4c4cadd45204.svg) 50% no-repeat}.auth-form .caption-image{margin-bottom:.5rem;height:19px;background:url(auth-caption.4791dbecd189f14e85d8e9776308639d.png) 50% no-repeat;background-size:auto 100%}@media (min-width:600px){.auth-form .caption-image{height:48px;background-size:273px auto}}.auth-form h2{font-size:1.25rem;line-height:1}@media (min-width:600px){.auth-form h2{font-size:2rem;line-height:1.5}}.auth-form .note{font-size:.875rem;line-height:1.35;margin-bottom:2.5rem;color:var(--color-text-secondary)}@media (min-width:600px){.auth-form .note{font-size:1rem;margin-bottom:3rem}}#auth-code-form,#auth-password-form,#auth-phone-number-form,#auth-qr-form,#auth-registration-form{height:100%;overflow-y:auto}#auth-phone-number-form form{min-height:26.25rem}#auth-phone-number-form .Button{margin-top:2.75rem}#auth-phone-number-form .Button+.Button{margin-top:1rem}#auth-code-form h2,#auth-password-form h2,.auth-number-edit{display:flex;align-items:center;justify-content:center}.auth-number-edit{width:2.5rem;height:2.5rem;padding:.5rem;font-size:1.5rem;color:var(--color-text-secondary);opacity:.75;cursor:pointer}.auth-number-edit:focus,.auth-number-edit:hover{opacity:1}#auth-qr-form .qr-container{height:280px;opacity:1;transform:scale(1);transition:transform .3s cubic-bezier(.34,1.56,.64,1),opacity .3s}#auth-qr-form .qr-container.pre-animate{opacity:.5;transform:scale(.8)}#auth-qr-form h3{margin:1.5rem 0 1rem}#auth-qr-form ol{list-style:none;counter-reset:item;padding:0 2rem}#auth-qr-form ol li{counter-increment:item;text-align:left;margin:.75rem 0;display:flex}#auth-qr-form ol li:before{content:counter(item);display:flex;justify-content:center;align-items:center;min-width:1.4rem;height:1.4rem;padding:0;margin:0 .75rem 0 0;background:var(--color-primary);border-radius:50%;font-size:smaller;color:#fff}#sign-in-password{word-break:normal!important}@font-face{font-family:Roboto;font-style:normal;font-weight:400;font-display:swap;src:local("Roboto"),local("Roboto-Regular"),url(KFOmCnqEu92Fr1Mu72xKKTU1Kvnz.499af208fa04aa805317cf014d869692.woff2) format("woff2");unicode-range:u+0460-052f,u+1c80-1c88,u+20b4,u+2de0-2dff,u+a640-a69f,u+fe2e-fe2f}@font-face{font-family:Roboto;font-style:normal;font-weight:400;font-display:swap;src:local("Roboto"),local("Roboto-Regular"),url(KFOmCnqEu92Fr1Mu5mxKKTU1Kvnz.6b69287db14836e8ccee577d6457b127.woff2) format("woff2");unicode-range:u+0400-045f,u+0490-0491,u+04b0-04b1,u+2116}@font-face{font-family:Roboto;font-style:normal;font-weight:400;font-display:swap;src:local("Roboto"),local("Roboto-Regular"),url(KFOmCnqEu92Fr1Mu7mxKKTU1Kvnz.350ec982325895563ada47d14c7936da.woff2) format("woff2");unicode-range:u+1f??}@font-face{font-family:Roboto;font-style:normal;font-weight:400;font-display:swap;src:local("Roboto"),local("Roboto-Regular"),url(KFOmCnqEu92Fr1Mu4WxKKTU1Kvnz.af30acd9d70ade5b828db02d25348da2.woff2) format("woff2");unicode-range:u+0370-03ff}@font-face{font-family:Roboto;font-style:normal;font-weight:400;font-display:swap;src:local("Roboto"),local("Roboto-Regular"),url(KFOmCnqEu92Fr1Mu7WxKKTU1Kvnz.62afd8a72052ca925aafb4006fddff88.woff2) format("woff2");unicode-range:u+0102-0103,u+0110-0111,u+1ea0-1ef9,u+20ab}@font-face{font-family:Roboto;font-style:normal;font-weight:400;font-display:swap;src:local("Roboto"),local("Roboto-Regular"),url(KFOmCnqEu92Fr1Mu7GxKKTU1Kvnz.009379f5feecd3ef689ad46e029b31e6.woff2) format("woff2");unicode-range:u+0100-024f,u+0259,u+1e??,u+2020,u+20a0-20ab,u+20ad-20cf,u+2113,u+2c60-2c7f,u+a720-a7ff}@font-face{font-family:Roboto;font-style:normal;font-weight:400;font-display:swap;src:local("Roboto"),local("Roboto-Regular"),url(KFOmCnqEu92Fr1Mu4mxKKTU1Kg.465390c6e54c60f4a15ff698f372e858.woff2) format("woff2");unicode-range:u+00??,u+0131,u+0152-0153,u+02bb-02bc,u+02c6,u+02da,u+02dc,u+2000-206f,u+2074,u+20ac,u+2122,u+2191,u+2193,u+2212,u+2215,u+feff,u+fffd}@font-face{font-family:Roboto;font-style:normal;font-weight:500;font-display:swap;src:local("Roboto Medium"),local("Roboto-Medium"),url(KFOlCnqEu92Fr1MmEU9fCRc4AMP6lbBP.66efaee062df58309edc4cdfaef3f094.woff2) format("woff2");unicode-range:u+0460-052f,u+1c80-1c88,u+20b4,u+2de0-2dff,u+a640-a69f,u+fe2e-fe2f}@font-face{font-family:Roboto;font-style:normal;font-weight:500;font-display:swap;src:local("Roboto Medium"),local("Roboto-Medium"),url(KFOlCnqEu92Fr1MmEU9fABc4AMP6lbBP.3e1bb90afe5eb4a94c5ffdb911fd21d0.woff2) format("woff2");unicode-range:u+0400-045f,u+0490-0491,u+04b0-04b1,u+2116}@font-face{font-family:Roboto;font-style:normal;font-weight:500;font-display:swap;src:local("Roboto Medium"),local("Roboto-Medium"),url(KFOlCnqEu92Fr1MmEU9fCBc4AMP6lbBP.acd64c8bf32762464b8f2c0600dc2b89.woff2) format("woff2");unicode-range:u+1f??}@font-face{font-family:Roboto;font-style:normal;font-weight:500;font-display:swap;src:local("Roboto Medium"),local("Roboto-Medium"),url(KFOlCnqEu92Fr1MmEU9fBxc4AMP6lbBP.cab892ae9aa422233ea43db289e0c038.woff2) format("woff2");unicode-range:u+0370-03ff}@font-face{font-family:Roboto;font-style:normal;font-weight:500;font-display:swap;src:local("Roboto Medium"),local("Roboto-Medium"),url(KFOlCnqEu92Fr1MmEU9fCxc4AMP6lbBP.01bafbfbc1e4ebe0139d259614d5c12d.woff2) format("woff2");unicode-range:u+0102-0103,u+0110-0111,u+1ea0-1ef9,u+20ab}@font-face{font-family:Roboto;font-style:normal;font-weight:500;font-display:swap;src:local("Roboto Medium"),local("Roboto-Medium"),url(KFOlCnqEu92Fr1MmEU9fChc4AMP6lbBP.d3c211af53a789d2f9fd79599baca39a.woff2) format("woff2");unicode-range:u+0100-024f,u+0259,u+1e??,u+2020,u+20a0-20ab,u+20ad-20cf,u+2113,u+2c60-2c7f,u+a720-a7ff}@font-face{font-family:Roboto;font-style:normal;font-weight:500;font-display:swap;src:local("Roboto Medium"),local("Roboto-Medium"),url(KFOlCnqEu92Fr1MmEU9fBBc4AMP6lQ.324b1e6d0f5ae7c6ab42fed5516c7b3d.woff2) format("woff2");unicode-range:u+00??,u+0131,u+0152-0153,u+02bb-02bc,u+02c6,u+02da,u+02dc,u+2000-206f,u+2074,u+20ac,u+2122,u+2191,u+2193,u+2212,u+2215,u+feff,u+fffd}*,:after,:before{box-sizing:border-box}html{font-family:sans-serif;line-height:1.15;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;-ms-overflow-style:scrollbar;-webkit-tap-highlight-color:rgba(0,0,0,0)}article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}body{margin:0;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol;font-size:1rem;font-weight:400;line-height:1.5;color:#212529;text-align:left;background-color:#fff}[tabindex="-1"]:focus{outline:none!important}hr{box-sizing:initial;height:0;overflow:visible}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5rem;font-weight:500}p{margin-top:0;margin-bottom:1rem}abbr[data-original-title],abbr[title]{text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;cursor:help;border-bottom:0}address{font-style:normal;line-height:inherit}address,dl,ol,ul{margin-bottom:1rem}dl,ol,ul{margin-top:0}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}dt{font-weight:500}dd{margin-bottom:.5rem;margin-left:0}blockquote{margin:0 0 1rem}dfn{font-style:italic}b,strong{font-weight:500}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:initial}sub{bottom:-.25em}sup{top:-.5em}a{color:theme-color("primary");text-decoration:none;background-color:initial;-webkit-text-decoration-skip:objects}a:hover{color:#0056b3;text-decoration:underline}a:not([href]):not([tabindex]),a:not([href]):not([tabindex]):focus,a:not([href]):not([tabindex]):hover{color:inherit;text-decoration:none}a:not([href]):not([tabindex]):focus{outline:0}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}pre{margin-top:0;margin-bottom:1rem;overflow:auto;-ms-overflow-style:scrollbar}figure{margin:0 0 1rem}img{vertical-align:middle;border-style:none}svg:not(:root){overflow:hidden}[role=button],a,area,button,input:not([type=range]),label,select,summary,textarea{touch-action:manipulation}table{border-collapse:collapse}caption{padding-top:.75rem;padding-bottom:.75rem;color:#868e96;text-align:left;caption-side:bottom}th{text-align:inherit}label{display:inline-block;margin-bottom:.5rem}button{border-radius:0}button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}button,input,optgroup,select,textarea{margin:0;font-family:inherit;font-size:inherit;line-height:inherit}button,input{overflow:visible}button,select{text-transform:none}[type=reset],[type=submit],button,html [type=button]{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{padding:0;border-style:none}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=date],input[type=datetime-local],input[type=month],input[type=time]{-webkit-appearance:listbox}textarea{overflow:auto;resize:vertical}fieldset{min-width:0;padding:0;margin:0;border:0}legend{display:block;width:100%;max-width:100%;padding:0;margin-bottom:.5rem;font-size:1.5rem;line-height:inherit;color:inherit;white-space:normal}progress{vertical-align:initial}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{outline-offset:-2px;-webkit-appearance:none}[type=search]::-webkit-search-cancel-button,[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{font:inherit;-webkit-appearance:button}output{display:inline-block}summary{display:list-item}template{display:none}[hidden]{display:none!important}:root{--color-background:#fff;--color-background-selected:#f4f4f5;--color-background-own:#eefedf;--color-background-own-selected:#d4fcae;--color-background-own-rgb:238,254,223;--color-text:#000;--color-text-lighter:#2e3939;--color-text-secondary:#707579;--color-text-secondary-rgb:112,117,121;--color-text-meta:#686c72;--color-text-meta-rgb:104,108,114;--color-text-meta-colored:#4fae4e;--color-text-green:#4fae4e;--color-text-green-rgb:79,174,78;--color-borders:#dadce0;--color-borders-input:#dadce0;--color-webpage-initial-background:#2e3939;--color-interactive-active:var(--color-primary);--color-interactive-inactive:rgba(var(--color-text-secondary-rgb),0.25);--color-interactive-buffered:rgba(var(--color-text-secondary-rgb),0.25);--color-primary:#50a2e9;--color-primary-rgb:80,162,233;--color-primary-shade:#4a95d6;--color-primary-shade-darker:#4388c4;--color-primary-shade-rgb:74,149,214;--color-green:#4dcd5e;--color-green-darker:#41ac4f;--color-error:#e53935;--color-error-shade:#d33431;--color-error-rgb:229,57,53;--color-warning:#fb8c00;--color-yellow:#fdd764;--color-links:#52a1ef;--color-links-hover:#2d8dec;--color-links-darker:#157be0;--color-links-darker-hover:#1166ba;--color-own-links:#fff;--color-placeholders:#a2acb4;--color-code:#4a729a;--color-code-bg:rgba(112,117,121,0.08);--color-code-own:#3c7940;--color-code-own-bg:rgba(112,117,121,0.08);--color-accent-own:#4fae4e;--color-message-meta-own:#4fae4e;--color-reply-hover:#f4f4f4;--color-reply-active:#e8e9ea;--color-reply-own-hover:#dbf4ce;--color-reply-own-active:#c8ebbc;--color-white:#fff;--color-gray:#c4c9cc;--color-chat-hover:#f4f4f5;--color-chat-active:#ededed;--color-selection-highlight:#3993fb;--color-selection-highlight-emoji:rgba(57,147,251,0.7);--color-user-1:#e17076;--color-user-2:#7bc862;--color-user-4:#65aadd;--color-user-5:#a695e7;--color-user-6:#ee7aae;--color-user-7:#6ec9cb;--color-user-8:#faa774;--color-default-shadow:hsla(0,0%,44.7%,0.25);--color-light-shadow:hsla(0,0%,44.7%,0.17);--border-radius-default:0.75rem;--border-radius-default-small:0.625rem;--border-radius-default-tiny:0.375rem;--border-radius-messages:0.75rem;--border-radius-messages-small:0.375rem;--messages-container-width:45.5rem;--right-column-width:26.5rem;--header-height:3.625rem;--symbol-menu-width:26.25rem;--symbol-menu-height:23.25rem;--symbol-menu-footer-height:3rem;--z-ui-loader-mask:2000;--z-right-column:900;--z-header-menu:990;--z-header-menu-backdrop:980;--z-modal:1000;--z-media-viewer:1500;--z-drop-area:55;--z-notification:50;--z-animation-fade:50;--z-menu-bubble:21;--z-menu-backdrop:20;--z-message-highlighted:13;--z-message-context-menu:12;--z-mobile-search:11;--z-middle-header:10;--z-middle-footer:10;--z-country-code-input-group:10;--z-message-select-control:9;--z-message-select-area:8;--z-sticky-date:9;--z-register-add-avatar:5;--z-media-viewer-head:3;--z-below:-1;--spinner-white-data:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZD0iTTEwLjggMjIuNEM2IDIxLjkgMi4xIDE4IDEuNiAxMy4yLjkgNy4xIDUuNCAxLjkgMTEuMyAxLjVjLjQgMCAuNy0uMy43LS43IDAtLjQtLjQtLjgtLjgtLjhDNC44LjQtLjIgNS45IDAgMTIuNS4yIDE4LjYgNS40IDIzLjggMTEuNSAyNGM2LjYuMiAxMi00LjggMTIuNC0xMS4yIDAtLjQtLjMtLjgtLjgtLjgtLjQgMC0uNy4zLS43LjctLjMgNS45LTUuNSAxMC40LTExLjYgOS43eiIgZmlsbD0iI2ZmZiIvPjwvc3ZnPg==);--spinner-white-thin-data:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZmlsbD0iI2ZmZiIgZD0iTTEyIDIzQzUuOSAyMyAxIDE4LjEgMSAxMlM1LjkgMSAxMiAxVjBDNS40IDAgMCA1LjQgMCAxMnM1LjQgMTIgMTIgMTIgMTItNS40IDEyLTEyaC0xYzAgNi4xLTQuOSAxMS0xMSAxMXoiLz48L3N2Zz4=);--spinner-blue-data:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZD0iTTEwLjggMjIuNEM2IDIxLjkgMi4xIDE4IDEuNiAxMy4yLjkgNy4xIDUuNCAxLjkgMTEuMyAxLjVjLjQgMCAuNy0uMy43LS43IDAtLjQtLjQtLjgtLjgtLjhDNC44LjQtLjIgNS45IDAgMTIuNS4yIDE4LjYgNS40IDIzLjggMTEuNSAyNGM2LjYuMiAxMi00LjggMTIuNC0xMS4yIDAtLjQtLjMtLjgtLjgtLjgtLjQgMC0uNy4zLS43LjctLjMgNS45LTUuNSAxMC40LTExLjYgOS43eiIgZmlsbD0iIzRlYTRmNiIvPjwvc3ZnPg==);--spinner-black-data:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZD0iTTEwLjggMjIuNEM2IDIxLjkgMi4xIDE4IDEuNiAxMy4yLjkgNy4xIDUuNCAxLjkgMTEuMyAxLjVjLjQgMCAuNy0uMy43LS43IDAtLjQtLjQtLjgtLjgtLjhDNC44LjQtLjIgNS45IDAgMTIuNS4yIDE4LjYgNS40IDIzLjggMTEuNSAyNGM2LjYuMiAxMi00LjggMTIuNC0xMS4yIDAtLjQtLjMtLjgtLjgtLjgtLjQgMC0uNy4zLS43LjctLjMgNS45LTUuNSAxMC40LTExLjYgOS43eiIgZmlsbD0iIzJlMzkzOSIvPjwvc3ZnPg==);--spinner-green-data:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZD0iTTEwLjggMjIuNEM2IDIxLjkgMi4xIDE4IDEuNiAxMy4yLjkgNy4xIDUuNCAxLjkgMTEuMyAxLjVjLjQgMCAuNy0uMy43LS43IDAtLjQtLjQtLjgtLjgtLjhDNC44LjQtLjIgNS45IDAgMTIuNS4yIDE4LjYgNS40IDIzLjggMTEuNSAyNGM2LjYuMiAxMi00LjggMTIuNC0xMS4yIDAtLjQtLjMtLjgtLjgtLjgtLjQgMC0uNy4zLS43LjctLjMgNS45LTUuNSAxMC40LTExLjYgOS43eiIgZmlsbD0iIzRmYWU0ZSIvPjwvc3ZnPg==);--spinner-gray-data:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZD0iTTEwLjggMjIuNEM2IDIxLjkgMi4xIDE4IDEuNiAxMy4yLjkgNy4xIDUuNCAxLjkgMTEuMyAxLjVjLjQgMCAuNy0uMy43LS43IDAtLjQtLjQtLjgtLjgtLjhDNC44LjQtLjIgNS45IDAgMTIuNS4yIDE4LjYgNS40IDIzLjggMTEuNSAyNGM2LjYuMiAxMi00LjggMTIuNC0xMS4yIDAtLjQtLjMtLjgtLjgtLjgtLjQgMC0uNy4zLS43LjctLjMgNS45LTUuNSAxMC40LTExLjYgOS43eiIgZmlsbD0iIzcwNzU3OSIvPjwvc3ZnPg==);--drag-target-border:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='100%25' height='100%25' fill='none' rx='8' ry='8' stroke='%23DDDFE0' stroke-width='4' stroke-dasharray='9.1, 10.5' stroke-dashoffset='3' stroke-linecap='round'/%3E%3C/svg%3E");--drag-target-border-hovered:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='100%25' height='100%25' fill='none' rx='8' ry='8' stroke='%2363A2E3' stroke-width='4' stroke-dasharray='9.1, 10.5' stroke-dashoffset='3' stroke-linecap='round'/%3E%3C/svg%3E");--layer-transition:300ms cubic-bezier(0.33,1,0.68,1);--layer-blackout-opacity:0.3;--slide-transition:450ms cubic-bezier(0.25,1,0.5,1);--select-transition:200ms ease-out;--vh:1vh}@media (min-width:1276px) and (max-width:1680px){:root{--right-column-width:25vw}}@media (max-width:600px){:root{--right-column-width:100vw;--header-height:3.5rem;--symbol-menu-width:100vw;--symbol-menu-height:14.6875rem;--layer-transition:450ms cubic-bezier(0.25,1,0.5,1)}}.m-0{margin:0!important}.mt-0,.my-0{margin-top:0!important}.mr-0,.mx-0{margin-right:0!important}.mb-0,.my-0{margin-bottom:0!important}.ml-0,.mx-0{margin-left:0!important}.m-1{margin:.25rem!important}.mt-1,.my-1{margin-top:.25rem!important}.mr-1,.mx-1{margin-right:.25rem!important}.mb-1,.my-1{margin-bottom:.25rem!important}.ml-1,.mx-1{margin-left:.25rem!important}.m-2{margin:.5rem!important}.mt-2,.my-2{margin-top:.5rem!important}.mr-2,.mx-2{margin-right:.5rem!important}.mb-2,.my-2{margin-bottom:.5rem!important}.ml-2,.mx-2{margin-left:.5rem!important}.m-3{margin:1rem!important}.mt-3,.my-3{margin-top:1rem!important}.mr-3,.mx-3{margin-right:1rem!important}.mb-3,.my-3{margin-bottom:1rem!important}.ml-3,.mx-3{margin-left:1rem!important}.m-4{margin:1.5rem!important}.mt-4,.my-4{margin-top:1.5rem!important}.mr-4,.mx-4{margin-right:1.5rem!important}.mb-4,.my-4{margin-bottom:1.5rem!important}.ml-4,.mx-4{margin-left:1.5rem!important}.m-5{margin:2rem!important}.mt-5,.my-5{margin-top:2rem!important}.mr-5,.mx-5{margin-right:2rem!important}.mb-5,.my-5{margin-bottom:2rem!important}.ml-5,.mx-5{margin-left:2rem!important}.m-6{margin:3rem!important}.mt-6,.my-6{margin-top:3rem!important}.mr-6,.mx-6{margin-right:3rem!important}.mb-6,.my-6{margin-bottom:3rem!important}.ml-6,.mx-6{margin-left:3rem!important}.p-0{padding:0!important}.pt-0,.py-0{padding-top:0!important}.pr-0,.px-0{padding-right:0!important}.pb-0,.py-0{padding-bottom:0!important}.pl-0,.px-0{padding-left:0!important}.p-1{padding:.25rem!important}.pt-1,.py-1{padding-top:.25rem!important}.pr-1,.px-1{padding-right:.25rem!important}.pb-1,.py-1{padding-bottom:.25rem!important}.pl-1,.px-1{padding-left:.25rem!important}.p-2{padding:.5rem!important}.pt-2,.py-2{padding-top:.5rem!important}.pr-2,.px-2{padding-right:.5rem!important}.pb-2,.py-2{padding-bottom:.5rem!important}.pl-2,.px-2{padding-left:.5rem!important}.p-3{padding:1rem!important}.pt-3,.py-3{padding-top:1rem!important}.pr-3,.px-3{padding-right:1rem!important}.pb-3,.py-3{padding-bottom:1rem!important}.pl-3,.px-3{padding-left:1rem!important}.p-4{padding:1.5rem!important}.pt-4,.py-4{padding-top:1.5rem!important}.pr-4,.px-4{padding-right:1.5rem!important}.pb-4,.py-4{padding-bottom:1.5rem!important}.pl-4,.px-4{padding-left:1.5rem!important}.p-5{padding:2rem!important}.pt-5,.py-5{padding-top:2rem!important}.pr-5,.px-5{padding-right:2rem!important}.pb-5,.py-5{padding-bottom:2rem!important}.pl-5,.px-5{padding-left:2rem!important}.p-6{padding:3rem!important}.pt-6,.py-6{padding-top:3rem!important}.pr-6,.px-6{padding-right:3rem!important}.pb-6,.py-6{padding-bottom:3rem!important}.pl-6,.px-6{padding-left:3rem!important}.input-group{position:relative;margin-bottom:1.5rem}.input-group label{display:block;padding:0 .25rem;position:absolute;left:.75rem;top:.95rem;background-color:var(--color-background);font-size:1rem;font-weight:400;color:var(--color-placeholders);transition:transform .15s ease-out,color .15s ease-out;cursor:text;pointer-events:none;transform-origin:left center;white-space:nowrap}.input-group.with-arrow:after{content:"";position:absolute;height:.75rem;width:.75rem;border-left:1px solid var(--color-text-secondary);border-bottom:1px solid var(--color-text-secondary);transform:rotate(-45deg);right:2rem;top:1rem}.input-group.error label,.input-group .form-control.focus+label,.input-group .form-control:focus+label,.input-group.success label,.input-group.touched label{transform:scale(.75) translate(-.5rem,-2.25rem)}.input-group .form-control::placeholder,.input-group input::placeholder{color:var(--color-placeholders)}.input-group.touched label{color:var(--color-text-secondary)}.input-group.error label{color:var(--color-error)!important}.input-group.success label{color:var(--color-text-green)!important}.input-group.disabled{opacity:.5;pointer-events:none}.form-control{--border-width:1px;display:block;width:100%;height:3.375rem;padding:calc(.75rem - var(--border-width)) calc(.9rem - var(--border-width));border:var(--border-width) solid var(--color-borders-input);border-radius:var(--border-radius-default);color:var(--color-text);background-color:var(--color-background);outline:none;transition:border-color .15s ease;word-break:break-word;-webkit-appearance:none;font-size:1rem;line-height:1.25rem}.form-control:hover{border-color:var(--color-primary)}.form-control:hover+label{color:var(--color-primary)}.form-control.focus,.form-control:focus{border-color:var(--color-primary);box-shadow:inset 0 0 0 1px var(--color-primary);caret-color:var(--color-primary)}.form-control.focus+label,.form-control:focus+label{color:var(--color-primary)}.form-control:disabled{background:none!important}.error .form-control{border-color:var(--color-error);box-shadow:inset 0 0 0 1px var(--color-error);caret-color:var(--color-error)}.success .form-control{border-color:var(--color-text-green);box-shadow:inset 0 0 0 1px var(--color-text-green);caret-color:var(--color-text-green)}select.form-control option{line-height:2rem}textarea.form-control{resize:none;overflow:hidden;line-height:1.3125rem;padding-top:calc(1rem - var(--border-width));padding-bottom:calc(1rem - var(--border-width))}.input-group.password-input{position:relative}.input-group.password-input .form-control{padding-right:3.375rem}.input-group.password-input .toggle-password{position:absolute;top:0;right:0;width:3.375rem;height:3.375rem;display:flex;align-items:center;justify-content:center;cursor:pointer;outline:none!important;color:var(--color-text-secondary);opacity:.7;font-size:1.5rem}.input-group.password-input .toggle-password:focus,.input-group.password-input .toggle-password:hover{opacity:1}@font-face{font-family:icomoon;src:url(icomoon.099b3b84c42b396b6486806692ed75c2.woff2) format("woff2"),url(icomoon.7b0715ba585094f4b95b55f048b397ba.woff) format("woff");font-weight:400;font-style:normal;font-display:block}[class*=" icon-"],[class^=icon-]{font-family:icomoon!important;speak:none;font-style:normal;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.icon-bug:before{content:"\e97d"}.icon-darkmode:before{content:"\e979"}.icon-animations:before{content:"\e97a"}.icon-enter:before{content:"\e97b"}.icon-fontsize:before{content:"\e97c"}.icon-permissions:before{content:"\e976"}.icon-card:before{content:"\e977"}.icon-truck:before{content:"\e978"}.icon-share-filled:before{content:"\e95a"}.icon-bold:before{content:"\e961"}.icon-bot-command:before{content:"\e962"}.icon-calendar-filter:before{content:"\e963"}.icon-comments:before{content:"\e964"}.icon-comments-sticker:before{content:"\e965"}.icon-arrow-down:before{content:"\e966"}.icon-email:before{content:"\e967"}.icon-italic:before{content:"\e968"}.icon-link:before{content:"\e969"}.icon-mention:before{content:"\e96a"}.icon-monospace:before{content:"\e96b"}.icon-next:before{content:"\e96c"}.icon-password-off:before{content:"\e96d"}.icon-pin-list:before{content:"\e96e"}.icon-previous:before{content:"\e96f"}.icon-replace:before{content:"\e970"}.icon-schedule:before{content:"\e971"}.icon-strikethrough:before{content:"\e972"}.icon-underlined:before{content:"\e973"}.icon-zoom-in:before{content:"\e974"}.icon-zoom-out:before{content:"\e975"}.icon-select:before{content:"\e960"}.icon-folder:before{content:"\e913"}.icon-bots:before{content:"\e915"}.icon-calendar:before{content:"\e916"}.icon-cloud-download:before{content:"\e917"}.icon-colorize:before{content:"\e918"}.icon-forward:before{content:"\e927"}.icon-reply:before{content:"\e947"}.icon-help:before{content:"\e92a"}.icon-info:before{content:"\e92b"}.icon-info-filled:before{content:"\e91b"}.icon-delete-filled:before{content:"\e91c"}.icon-delete:before{content:"\e91d"}.icon-edit:before{content:"\e923"}.icon-new-chat-filled:before{content:"\e939"}.icon-send:before{content:"\e94a"}.icon-send-outline:before{content:"\e94b"}.icon-add-user-filled:before{content:"\e904"}.icon-add-user:before{content:"\e905"}.icon-delete-user:before{content:"\e91e"}.icon-microphone:before{content:"\e935"}.icon-microphone-alt:before{content:"\e93b"}.icon-poll:before{content:"\e938"}.icon-revote:before{content:"\e93a"}.icon-photo:before{content:"\e940"}.icon-document:before{content:"\e91f"}.icon-camera:before{content:"\e90e"}.icon-camera-add:before{content:"\e90f"}.icon-logout:before{content:"\e932"}.icon-saved-messages:before{content:"\e948"}.icon-settings:before{content:"\e94e"}.icon-phone:before{content:"\e93f"}.icon-attach:before{content:"\e909"}.icon-copy:before{content:"\e91a"}.icon-channel:before{content:"\e911"}.icon-group:before{content:"\e929"}.icon-user:before{content:"\e959"}.icon-non-contacts:before{content:"\e928"}.icon-active-sessions:before{content:"\e902"}.icon-admin:before{content:"\e906"}.icon-download:before{content:"\e921"}.icon-location:before{content:"\e930"}.icon-stop:before{content:"\e952"}.icon-archive:before{content:"\e908"}.icon-unarchive:before{content:"\e953"}.icon-readchats:before{content:"\e933"}.icon-unread:before{content:"\e957"}.icon-message:before{content:"\e934"}.icon-lock:before{content:"\e931"}.icon-unlock:before{content:"\e954"}.icon-mute:before{content:"\e937"}.icon-unmute:before{content:"\e955"}.icon-pin:before{content:"\e941"}.icon-unpin:before{content:"\e956"}.icon-smallscreen:before{content:"\e95e"}.icon-fullscreen:before{content:"\e95f"}.icon-large-pause:before{content:"\e92e"}.icon-large-play:before{content:"\e92f"}.icon-pause:before{content:"\e93d"}.icon-play:before{content:"\e943"}.icon-channelviews:before{content:"\e912"}.icon-message-succeeded:before{content:"\e900"}.icon-message-read:before{content:"\e901"}.icon-message-pending:before{content:"\e94c"}.icon-message-failed:before{content:"\e94d"}.icon-favorite:before{content:"\e93e"}.icon-keyboard:before{content:"\e944"}.icon-delete-left:before{content:"\e945"}.icon-recent:before{content:"\e946"}.icon-gifs:before{content:"\e94f"}.icon-stickers:before{content:"\e95b"}.icon-smile:before{content:"\e950"}.icon-animals:before{content:"\e907"}.icon-eats:before{content:"\e922"}.icon-sport:before{content:"\e951"}.icon-car:before{content:"\e910"}.icon-lamp:before{content:"\e92c"}.icon-language:before{content:"\e92d"}.icon-flag:before{content:"\e926"}.icon-more:before{content:"\e936"}.icon-search:before{content:"\e949"}.icon-remove:before{content:"\e95c"}.icon-add:before{content:"\e903"}.icon-check:before{content:"\e914"}.icon-close:before{content:"\e919"}.icon-arrow-left:before{content:"\e90d"}.icon-arrow-right:before{content:"\e93c"}.icon-down:before{content:"\e920"}.icon-up:before{content:"\e958"}.icon-eye-closed:before{content:"\e925"}.icon-eye:before{content:"\e924"}.icon-muted-chat:before{content:"\e95d"}.icon-avatar-archived-chats:before{content:"\e90a"}.icon-avatar-deleted-account:before{content:"\e90b"}.icon-avatar-saved-messages:before{content:"\e90c"}.icon-pinned-chat:before{content:"\e942"}.media-inner{position:relative}.media-inner img,.media-inner video{display:block;object-fit:cover}.media-inner video{background:no-repeat 50% 50%;background-size:contain}.media-inner .media-loading,.media-inner .thumbnail~.full-media{position:absolute}.media-inner .thumbnail.empty{visibility:hidden}.animated-close-icon{position:absolute;transform:rotate(-45deg)}.animated-close-icon,.animated-close-icon:after,.animated-close-icon:before{width:1.125rem;height:.125rem;border-radius:.125rem;background-color:var(--color-text-secondary);transition:transform var(--slide-transition)}.animated-close-icon:after,.animated-close-icon:before{position:absolute;left:0;top:0;content:""}.animated-close-icon:before{transform:rotate(90deg)}.animated-close-icon.no-transition,.animated-close-icon.no-transition:after,.animated-close-icon.no-transition:before{transition:none}.animated-close-icon.state-back{transform:rotate(180deg)}.animated-close-icon.state-back:before{transform:rotate(45deg) scaleX(.75) translateY(-.375rem)}.animated-close-icon.state-back:after{transform:rotate(-45deg) scaleX(.75) translateY(.375rem)}.chat-list{height:100%;overflow-y:auto;padding:0 .125rem .5rem .4375rem}.chat-list .scroll-container{position:relative}.chat-list .ListItem.chat-item-clickable{margin:0}@media (max-width:600px){.chat-list{padding-left:0;padding-right:0}}.chat-list .no-results{color:var(--color-text-meta);margin-top:2rem;text-align:center}html{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:optimizeSpeed}body,html{width:100%;height:100%;background:var(--color-background);margin:0;padding:0;font-size:16px;font-family:Roboto,Helvetica Neue,Apple Color Emoji,sans-serif;color:var(--color-text);overflow:hidden}@media (max-width:600px){body,html{height:calc(var(--vh, 1vh)*100)}}body.cursor-grabbing,body.cursor-grabbing *{cursor:grabbing!important}#root{height:100%;max-width:1680px;margin:0 auto}@media (max-width:600px){#root{height:calc(var(--vh, 1vh)*100)}}#middle-column-portals,#portals{position:absolute;top:0;left:0;right:0}.hidden{visibility:hidden}.no-selection{user-select:none;-webkit-user-select:none!important}.visually-hidden{position:absolute!important;width:0;height:0;overflow:hidden;clip:rect(0,0,0,0);z-index:-1}.not-implemented{opacity:.5}.not-implemented,.not-implemented *{cursor:not-allowed!important}*{box-sizing:border-box}.disable-animations #root *{transition:none!important}.custom-scroll,.custom-scroll-x{scrollbar-width:thin;scrollbar-color:rgba(90,90,90,0) transparent;transition:scrollbar-color .3s ease;-webkit-overflow-scrolling:touch;pointer-events:auto}.custom-scroll-x::-webkit-scrollbar-thumb,.custom-scroll::-webkit-scrollbar-thumb{background-color:rgba(90,90,90,0);border-radius:.35rem}.custom-scroll-x:focus,.custom-scroll-x:focus-within,.custom-scroll-x:hover,.custom-scroll:focus,.custom-scroll:focus-within,.custom-scroll:hover{scrollbar-color:rgba(90,90,90,.3) transparent}.custom-scroll-x:focus-within::-webkit-scrollbar-thumb,.custom-scroll-x:focus::-webkit-scrollbar-thumb,.custom-scroll-x:hover::-webkit-scrollbar-thumb,.custom-scroll:focus-within::-webkit-scrollbar-thumb,.custom-scroll:focus::-webkit-scrollbar-thumb,.custom-scroll:hover::-webkit-scrollbar-thumb{background-color:rgba(90,90,90,.3)}.custom-scroll::-webkit-scrollbar{width:.375rem}.custom-scroll-x::-webkit-scrollbar{height:.35rem}.no-scrollbar{scrollbar-width:none}.no-scrollbar::-webkit-scrollbar{display:none}.emoji-small{background:no-repeat;background-size:1.25rem;color:transparent;display:inline-block;width:1.25rem;height:1.25rem;margin-right:1px;overflow:hidden}.emoji-small::selection{background-color:var(--color-selection-highlight-emoji);color:transparent}div[role=button]{outline:none!important;cursor:pointer}.opacity-transition{opacity:1;transition:opacity .15s ease}.opacity-transition:not(.open){opacity:0}.opacity-transition:not(.shown){display:none}.opacity-transition.slow{transition-duration:.3s}.color-primary{color:var(--color-primary)!important}.color-danger{color:var(--color-error)!important}.text-muted{color:var(--color-text-secondary)!important}@keyframes grow-icon{0%{transform:scale(.5);opacity:.8}50%{transform:scale(1.1);opacity:1}to{transform:scale(1)}}@keyframes hide-icon{0%{transform:scale(1);opacity:.4}to{transform:scale(.5);opacity:0}} \ No newline at end of file diff --git a/dist/main.7db5953f86bccab87bbe.js b/dist/main.7db5953f86bccab87bbe.js new file mode 100644 index 00000000..3ab4dee9 --- /dev/null +++ b/dist/main.7db5953f86bccab87bbe.js @@ -0,0 +1 @@ +!function(e){function t(t){for(var n,r,o=t[0],d=t[1],c=0,a=[];c=0&&I(e[t]);t--);return t+17&&console.warn(`[Teact] Slow component render: ${n}, ${Math.round(t)} ms`),O[n].renderTimes.push(t),O[n].renderCount++}}catch(t){Object(c.a)(t),u=e.renderedValue}if(e.isMounted&&u===e.renderedValue)return e.$element;e.renderedValue=u;const o=w(u);return e.$element=y(e,[o]),e.$element}function C(e,t){return typeof e!=typeof t||(e.type!==t.type||(b(e)&&b(t)?e.value!==t.value:h(e)&&h(t)?e.tag!==t.tag||e.props.key!==t.props.key:!(!m(e)||!m(t))&&(e.componentInstance.Component!==t.componentInstance.Component||e.props.key!==t.props.key)))}function E(e){p(e)&&(m(e)?function(e){if(!e.isMounted)return;e.hooks.memos.byCursor.forEach(e=>{e.current=null}),e.hooks.effects.byCursor.forEach(({cleanup:e})=>{if("function"==typeof e)try{e()}catch(e){Object(c.a)(e)}}),e.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.Component=null,e.props=null,e.forceUpdate=null,e.onUpdate=null}(e)}(e.componentInstance):e.target&&(Object(a.b)(e.target),e.target=null),e.children.forEach(E))}function S(e){return j(e),e.isMounted=!0,e.$element}function M(e){return m(e)?M(e.children[0]):e.target}function A(e,t){m(e)?A(e.children[0],t):e.target=t}function k(e){const{cursor:t,byCursor:n}=f.hooks.state;var r;return void 0===n[t]&&(n[t]={value:e,nextValue:e,setter:(r=f,e=>{n[t].nextValue!==e&&(n[t].nextValue="function"==typeof e?e(n[t].value):e,r.scheduleNextState&&r.forceUpdate||(r.scheduleNextState=Object(u.h)(()=>function(e){e.isMounted&&e.hooks.state.byCursor.forEach(e=>{e.value=e.nextValue})}(r)),r.forceUpdate=Object(u.i)(()=>function(e){if(!e.isMounted||!e.onUpdate)return;const t=e.$element;j(e),e.$element!==t&&e.onUpdate()}(r))),r.scheduleNextState(),r.forceUpdate())})}),f.hooks.state.cursor++,[n[t].value,n[t].setter]}function T(e,t,n){const{cursor:r,byCursor:u}=f.hooks.effects,o=f,d=()=>{if(!o.isMounted)return;const{cleanup:e}=u[r];if("function"==typeof e)try{e()}catch(e){Object(c.a)(e)}u[r].cleanup=t()};void 0!==u[r]&&n&&u[r].dependencies?n.some((e,t)=>e!==u[r].dependencies[t])&&e(d):e(d),u[r]={effect:t,dependencies:n,cleanup:u[r]?u[r].cleanup:void 0},f.hooks.effects.cursor++}function N(e,t){return T(u.b,e,t)}function P(e,t){return T(u.d,e,t)}function D(e,t){const{cursor:n,byCursor:r}=f.hooks.memos;let{current:u}=r[n]||{};return(void 0===r[n]||t.some((e,t)=>e!==r[n].dependencies[t]))&&(u=e()),r[n]={current:u,dependencies:t},f.hooks.memos.cursor++,u}function L(e,t){return D(()=>e,t)}function x(e){return D(()=>({current:e}),[])}function B(e,t=d.a){return function(n){const r=x(n),u=x();return(!u.current||r.current&&!t(r.current,n))&&(r.current=n,u.current=g(e,n)),u.current}}document.addEventListener("dblclick",()=>{console.log("COMPONENTS",Object(o.k)(Object.values(O),"renderCount","desc"))}),t.a={createElement:g,Fragment:s}},function(e,t,n){"use strict";n.d(t,"f",(function(){return r})),n.d(t,"m",(function(){return u})),n.d(t,"o",(function(){return o})),n.d(t,"z",(function(){return d})),n.d(t,"n",(function(){return c})),n.d(t,"y",(function(){return a})),n.d(t,"w",(function(){return i})),n.d(t,"x",(function(){return s})),n.d(t,"v",(function(){return f})),n.d(t,"G",(function(){return l})),n.d(t,"H",(function(){return b})),n.d(t,"I",(function(){return h})),n.d(t,"J",(function(){return m})),n.d(t,"l",(function(){return p})),n.d(t,"A",(function(){return g})),n.d(t,"Q",(function(){return v})),n.d(t,"M",(function(){return I})),n.d(t,"N",(function(){return w})),n.d(t,"O",(function(){return O})),n.d(t,"h",(function(){return j})),n.d(t,"j",(function(){return C})),n.d(t,"i",(function(){return E})),n.d(t,"cb",(function(){return S})),n.d(t,"P",(function(){return M})),n.d(t,"u",(function(){return A})),n.d(t,"rb",(function(){return k})),n.d(t,"a",(function(){return T})),n.d(t,"e",(function(){return N})),n.d(t,"d",(function(){return P})),n.d(t,"p",(function(){return D})),n.d(t,"q",(function(){return L})),n.d(t,"r",(function(){return x})),n.d(t,"s",(function(){return B})),n.d(t,"Z",(function(){return R})),n.d(t,"Y",(function(){return F})),n.d(t,"S",(function(){return U})),n.d(t,"R",(function(){return _})),n.d(t,"V",(function(){return G})),n.d(t,"U",(function(){return $})),n.d(t,"T",(function(){return W})),n.d(t,"D",(function(){return z})),n.d(t,"c",(function(){return H})),n.d(t,"jb",(function(){return K})),n.d(t,"kb",(function(){return V})),n.d(t,"eb",(function(){return q})),n.d(t,"fb",(function(){return J})),n.d(t,"mb",(function(){return Y})),n.d(t,"ib",(function(){return Q})),n.d(t,"nb",(function(){return Z})),n.d(t,"ob",(function(){return X})),n.d(t,"lb",(function(){return ee})),n.d(t,"pb",(function(){return te})),n.d(t,"gb",(function(){return ne})),n.d(t,"hb",(function(){return re})),n.d(t,"K",(function(){return ue})),n.d(t,"L",(function(){return oe})),n.d(t,"db",(function(){return de})),n.d(t,"C",(function(){return ce})),n.d(t,"k",(function(){return ae})),n.d(t,"W",(function(){return ie})),n.d(t,"X",(function(){return se})),n.d(t,"bb",(function(){return fe})),n.d(t,"b",(function(){return le})),n.d(t,"g",(function(){return be})),n.d(t,"F",(function(){return he})),n.d(t,"E",(function(){return me})),n.d(t,"ab",(function(){return pe})),n.d(t,"B",(function(){return ge})),n.d(t,"qb",(function(){return ye})),n.d(t,"t",(function(){return ve}));const r="Telegram WebZ alpha 2499a4c",u=!1,o=!1,d=!1,c="Shoot!\nSomething went wrong, please see the error details in Dev Tools Console.",a="GramJs:sessionId",i=!1,s="tt-global-state",f=30,l=!1,b="tt-media",h="tt-media-avatars",m="tt-media-progressive",p="tt-custom-bg",g="tt-lang-packs",y=(new Set(["newMessage","newScheduledMessage","deleteMessages","deleteScheduledMessages","deleteHistory"]),"undefined"!=typeof window&&window.innerHeight>=900),v=1,I=750,w=y?60:40,O=2*w,j=72,C=y?30:25,E=100,S=42,M=42,A=20,k=25,T=!1,N=2,P=N,D=16,L=1e4,x="editable-message-text",B="editable-message-text-modal",R=1440,F=1150,U=1275,_=925,G=600,$=950,W=450,z=1e9,H=100,K=13,V=11,q=160,J=120,Y=64,Q=48,Z=32,X=64,ee=64,te=160,ne=140,re=80,ue="MEMOJI_STICKER",oe=200,de=450,ce=450,ae="image/png,image/gif,image/jpeg,video/mp4,video/avi,video/quicktime",ie="((ftp|https?):\\/\\/)?((www\\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\\.[a-zA-Z0-9()]{1,6})\\b([-a-zA-Z0-9()@:%_+.~#?&/=]*)",se=/^(?:https?:\/\/)?(?:t\.me\/)([\d\w_]+)(?:\/([\d]+))?$/gm,fe=777e3,le=0,be=1,he=10,me=5,pe=2147483646,ge=["android","ios"],ye="TelegramTips",ve="https://bugs.telegram.org/?tag_ids=41&sort=time"},function(e,t,n){"use strict";n.d(t,"g",(function(){return y})),n.d(t,"e",(function(){return v})),n.d(t,"d",(function(){return I})),n.d(t,"b",(function(){return w})),n.d(t,"a",(function(){return O})),n.d(t,"f",(function(){return j})),n.d(t,"h",(function(){return C}));var r=n(0),u=n(1),o=n(29),d=n(22),c=n(9),a=n(25),i=n(3),s=n(21);function f(){return(f=Object.assign||function(e){for(var t=1;t7&&console.warn(`[TeactN] Slow containers update: ${Math.round(t)} ms`)}}],m={},p=new Map;const g=Object(c.i)((function(){h.forEach(e=>e(l))}));function y(e){"object"==typeof e&&e!==l&&(l=e,g())}function v(){return l}function I(){return m}function w(e,t){b[e]||(b[e]=[],m[e]=t=>{!function(e,t){b[e]&&b[e].forEach(e=>{const n=e(l,m,t);n&&y(n)})}(e,t)}),b[e].push(t)}function O(e){h.push(e)}function j(e){const t=h.indexOf(e);-1!==t&&h.splice(t,1)}function C(e=(()=>({})),t=(()=>({}))){return n=>function(u){const[c]=Object(r.r)(Object(d.a)(p)),i=Object(o.a)();Object(r.n)(()=>()=>{p.delete(c)},[c]);let b=p.get(c);if(b||(b={mapStateToProps:e,mapReducersToProps:t,ownProps:u,areMappedPropsChanged:!1,forceUpdate:i,DEBUG_updates:0,DEBUG_componentName:n.name},p.set(c,b)),b.areMappedPropsChanged&&(b.areMappedPropsChanged=!1),!b.mappedProps||!Object(a.a)(b.ownProps,u)){b.ownProps=u;try{b.mappedProps={...e(l,u),...t(y,m)}}catch(e){Object(s.a)(e)}}return r.a.createElement(n,f({},b.mappedProps,u))}}function E(e,t){const n=Object.keys(e);return n.length!==Object.keys(t).length?["LENGTH"]:n.filter(n=>e[n]!==t[n])}u.m&&(window.getGlobal=v,document.addEventListener("dblclick",()=>{console.log("GLOBAL CONTAINERS",Object(i.k)(Object.values(p),"DEBUG_updates","desc"))}))},function(e,t,n){"use strict";function r(e,t){return e.reduce((e,n)=>(e[n[t]]=n,e),{})}function u(e,t){return Object.keys(e).reduce((n,r,u)=>(n[r]=t(e[r],r,u,e),n),{})}function o(e,t){return t.reduce((t,n)=>(t[n]=e[n],t),{})}function d(e,t){return t.reduce((t,n)=>(e[n]&&(t[n]=e[n]),t),{})}function c(e,t){const n=new Set(t.map(String));return o(e,Object.keys(e).filter(e=>!n.has(e)))}function a(e,t,n="asc"){return e.sort((e,r)=>{if(Array.isArray(t)){const[u,o]=Array.isArray(n)?n:[n,n],[d,c]=t;let a,i;if("function"==typeof d?(a=d(e)||0,i=d(r)||0):"string"==typeof d&&(a=e[d]||0,i=r[d]||0),a!==i)return"asc"===u?a-i:i-a;{let t,n;return"function"==typeof c?(t=c(e)||0,n=c(r)||0):"string"==typeof c&&(t=e[c]||0,n=r[c]||0),"asc"===o?t-n:n-t}}let u,o;return"function"==typeof t?(u=t(e)||0,o=t(r)||0):"string"==typeof t&&(u=e[t]||0,o=r[t]||0),"asc"===n?u-o:o-u})}function i(e){return e.reduce((e,t)=>Array.isArray(t)?e.concat(t):(e.push(t),e),[])}function s(e){return Array.from(new Set(e))}function f(e){return e.filter(Boolean)}function l(e,t){return e.length===t.length&&e.every((e,n)=>e===t[n])}function b(e,t){return e[0]<=t[t.length-1]&&e[e.length-1]>=t[0]}function h(e,t){return e.filter(e=>t.has(e))}function m(e,t){const n=[];for(let r=0;r(t[n]=p(e[n]),t),{})}function g(e,t){let n=e.length;for(;n--;)if(t(e[n],n,e))return e[n]}n.d(t,"c",(function(){return r})),n.d(t,"i",(function(){return u})),n.d(t,"l",(function(){return o})),n.d(t,"m",(function(){return d})),n.d(t,"j",(function(){return c})),n.d(t,"k",(function(){return a})),n.d(t,"h",(function(){return i})),n.d(t,"o",(function(){return s})),n.d(t,"e",(function(){return f})),n.d(t,"a",(function(){return l})),n.d(t,"b",(function(){return b})),n.d(t,"f",(function(){return h})),n.d(t,"n",(function(){return m})),n.d(t,"d",(function(){return p})),n.d(t,"g",(function(){return g}))},function(e,t,n){"use strict";n.d(t,"Y",(function(){return r.c})),n.d(t,"Z",(function(){return r.d})),n.d(t,"ab",(function(){return r.e})),n.d(t,"xb",(function(){return r.h})),n.d(t,"pb",(function(){return r.f})),n.d(t,"wb",(function(){return r.g})),n.d(t,"W",(function(){return r.a})),n.d(t,"X",(function(){return r.b})),n.d(t,"lb",(function(){return u.w})),n.d(t,"kb",(function(){return u.v})),n.d(t,"ib",(function(){return u.t})),n.d(t,"nb",(function(){return u.y})),n.d(t,"jb",(function(){return u.u})),n.d(t,"ob",(function(){return u.z})),n.d(t,"m",(function(){return u.j})),n.d(t,"T",(function(){return u.p})),n.d(t,"l",(function(){return u.i})),n.d(t,"g",(function(){return u.e})),n.d(t,"h",(function(){return u.f})),n.d(t,"f",(function(){return u.d})),n.d(t,"mb",(function(){return u.x})),n.d(t,"gb",(function(){return u.r})),n.d(t,"q",(function(){return u.m})),n.d(t,"yb",(function(){return u.A})),n.d(t,"e",(function(){return u.c})),n.d(t,"c",(function(){return u.a})),n.d(t,"J",(function(){return u.o})),n.d(t,"k",(function(){return u.h})),n.d(t,"j",(function(){return u.g})),n.d(t,"hb",(function(){return u.s})),n.d(t,"d",(function(){return u.b})),n.d(t,"Bb",(function(){return u.C})),n.d(t,"Ab",(function(){return u.B})),n.d(t,"p",(function(){return u.l})),n.d(t,"o",(function(){return u.k})),n.d(t,"fb",(function(){return u.q})),n.d(t,"I",(function(){return u.n})),n.d(t,"A",(function(){return i})),n.d(t,"zb",(function(){return s})),n.d(t,"F",(function(){return f})),n.d(t,"M",(function(){return l})),n.d(t,"N",(function(){return b})),n.d(t,"x",(function(){return h})),n.d(t,"K",(function(){return m})),n.d(t,"n",(function(){return p})),n.d(t,"tb",(function(){return g})),n.d(t,"ub",(function(){return y})),n.d(t,"qb",(function(){return v})),n.d(t,"db",(function(){return I})),n.d(t,"vb",(function(){return w})),n.d(t,"eb",(function(){return O})),n.d(t,"U",(function(){return j})),n.d(t,"V",(function(){return C})),n.d(t,"sb",(function(){return E})),n.d(t,"rb",(function(){return S})),n.d(t,"v",(function(){return k})),n.d(t,"cb",(function(){return T})),n.d(t,"G",(function(){return N})),n.d(t,"O",(function(){return P})),n.d(t,"t",(function(){return D})),n.d(t,"u",(function(){return L})),n.d(t,"L",(function(){return x})),n.d(t,"y",(function(){return B})),n.d(t,"H",(function(){return R})),n.d(t,"z",(function(){return F})),n.d(t,"P",(function(){return U})),n.d(t,"Q",(function(){return _})),n.d(t,"E",(function(){return G})),n.d(t,"D",(function(){return $})),n.d(t,"C",(function(){return z})),n.d(t,"B",(function(){return H})),n.d(t,"b",(function(){return V})),n.d(t,"i",(function(){return q})),n.d(t,"R",(function(){return J})),n.d(t,"S",(function(){return Y})),n.d(t,"bb",(function(){return Q})),n.d(t,"s",(function(){return Z})),n.d(t,"w",(function(){return X})),n.d(t,"r",(function(){return ee})),n.d(t,"a",(function(){return te}));var r=n(23),u=n(24),o=n(5),d=n(1),c=n(58);const a=new RegExp(d.W,"i");function i(e){const{chatId:t,id:n}=e;return`msg${t}-${n}`}function s(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 l(e,t=!1){const{text:n,photo:r,video:u,audio:o,voice:d,document:c,sticker:a,contact:i,poll:s,invoice:f}=e.content;if(e.groupedId)return n?`${t?"":"🖼 "}${n.text}`:"Album";if(r)return n?`${t?"":"🖼 "}${n.text}`:"Photo";if(u)return u.isGif?n?`${t?"":"GIF "}${n.text}`:"GIF":n?`${t?"":"📹 "}${n.text}`:"Video";if(a)return"Sticker "+a.emoji;if(o){const e=[o.title,o.performer].filter(Boolean).join(" — ")||n&&n.text;return e?"🎧 "+e:"Audio"}return d?n?`${t?"":"🎤 "}${n.text}`:"Voice Message":c?`${t?"":"📎 "}${n?n.text:c.fileName}`:i?"Contact":s?"📊 "+s.summary.question:f?"Invoice":n?n.text:"The message is not supported on this version of Telegram"}function b(e){const{text:t,sticker:n,photo:r,video:u,audio:o,voice:d,document:c,poll:a,webPage:i,contact:s,invoice:f}=e.content;return t?t.text:n||r||u||o||d||c||s||a||i||f?void 0:"The message is not supported on this version of Telegram"}function h(e){const{text:t,sticker:n,photo:r,video:u,audio:o,voice:d,document:a,poll:i,webPage:s,contact:f}=e.content;return!!(n||u&&u.isRound)||!(!t||r||u||o||d||a||i||s||f)&&(Object(c.a)(t.text)||!1)}function m(e){const{text:t}=e.content;if(t&&t.text.length<=6&&1===h(e))return t.text}function p(e){const{text:t}=e.content;let n;if(t&&t.entities){let e=t.entities.find(e=>e.type===o.ApiMessageEntityTypes.TextUrl);if(e&&(n=e.url.match(a)),!n&&(e=t.entities.find(e=>e.type===o.ApiMessageEntityTypes.Url),e)){const{offset:r,length:u}=e;n=t.text.substring(r,r+u).match(a)}}if(!n&&t&&(n=t.text.match(a)),n)return{url:n[0],domain:n[3]}}function g(e){return e.isOutgoing}function y(e){return Boolean(e.replyToMessageId)}function v(e){return Boolean(e.forwardInfo)}function I(e){return!!e.content.action}function w(e){return e.chatId===d.bb&&E(e)}function O(e){return Boolean(e.senderId)&&e.senderId<0&&g(e)}function j(e){return e.id>0?Object(r.d)(e):Object(u.i)(e)}function C(e){return e.sendingState?"messageSendingStateFailed"===e.sendingState?"failed":"pending":"succeeded"}function E(e){return e.id>=d.D}function S(e){return e.content.action&&"historyClear"===e.content.action.type}var M=n(7),A=n(53);function k(e){return e.content}function T(e){return Boolean(N(e)||P(e)||B(e)||x(e)||function(e){return e.content.contact}(e)||R(e)||D(e)||L(e)||function(e){return e.content.voice}(e))}function N(e){return e.content.photo}function P(e){return e.content.video}function D(e){return e.content.action}function L(e){return e.content.audio}function x(e){return e.content.sticker}function B(e){return e.content.document}function R(e){return e.content.poll}function F(e){return e.content.invoice}function U(e){return e.content.webPage}function _(e){const t=U(e);return t?t.photo:void 0}function G(e){const t=function(e){const t=N(e)||P(e)||B(e)||x(e)||_(e);if(t)return t.thumbnail}(e);return t?t.dataUri:void 0}function $(e,t){const{photo:n,video:r,sticker:u,audio:o,voice:d,document:c}=e.content,a=_(e);if(!(n||r||u||a||o||d||c))return;const s=i(e);if(n||a)switch(t){case"micro":case"pictogram":return s+"?size=m";case"inline":if(K(e))return;return s+"?size=x";case"viewerPreview":return s+"?size=x";case"viewerFull":return s+"?size=z"}if(r)switch(t){case"micro":case"pictogram":return s+"?size=m";case"inline":if(K(e))return;return V(r)?W(r,s):s+"?size=z";case"viewerPreview":return s+"?size=m";case"viewerFull":return W(r,s);case"download":return s+"?download"}if(c)switch(t){case"micro":case"pictogram":case"inline":if(!Object(A.c)(c)||K(e))return;return s+"?size=m";default:return s}if(u)switch(t){case"micro":return;case"pictogram":return s+"?size=m";default:return s}if(o)switch(t){case"micro":case"pictogram":return;default:return W(o,s)}if(d)switch(t){case"micro":case"pictogram":return;default:return s}}function W(e,t){return M.h&&M.i?`${t}?fileSize=${e.size}&mimeType=${e.mimeType}`:t}function z(e,t){const{sticker:n,video:r,audio:u,voice:d}=e.content;return n&&"inline"===t&&n.isAnimated?o.ApiMediaFormat.Lottie:r&&M.h&&("viewerFull"===t||"inline"===t&&V(r))?o.ApiMediaFormat.Progressive:u||d?d&&!M.g?o.ApiMediaFormat.BlobUrl:o.ApiMediaFormat.Progressive:o.ApiMediaFormat.BlobUrl}function H(e){const{photo:t,video:n,webPage:r}=e.content;return t||r&&r.photo?`photo${e.date}.jpeg`:n?n.fileName:void 0}function K(e){const{photo:t,video:n,document:r}=e.content;return t&&t.blobUrl||n&&n.blobUrl||r&&r.previewBlobUrl}function V(e){return e.isGif||e.isRound||e.size<=10485760}function q(e,t,n=!1){const r=X(e,t,"media");return n?r.reverse():r}function J(e){return e.sizes.find(e=>"z"===e.type)||e.sizes.find(e=>"y"===e.type)||Y(e)}function Y(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 Q(e){if(e.width&&e.height)return e}function Z(e,t,n=!1){const r=E(e);return{isUploading:r,isTransferring:r||n,transferProgress:Number(t)}}function X(e,t,n){let r;switch(n){case"media":r=e=>{const t=P(e);return N(e)||t&&!t.isRound&&!t.isGif};break;case"documents":r=B;break;case"links":r=e=>U(e)||function(e){const{text:t}=e.content,n=t&&t.text.match(a);if(n)return{url:n[0],domain:n[3]}}(e);break;case"audio":r=L;break;default:return[]}return t.reduce((t,n)=>(e[n]&&r(e[n])&&t.push(n),t),[])}function ee(e){const{audio:t,voice:n,video:r}=k(e),u=t||n||r;if(u)return u.duration}function te(e,t){return`${e}_${t}`}n(54)},function(e,t,n){"use strict";var r=n(59);n.o(r,"ApiMediaFormat")&&n.d(t,"ApiMediaFormat",(function(){return r.ApiMediaFormat})),n.o(r,"ApiMessageEntityTypes")&&n.d(t,"ApiMessageEntityTypes",(function(){return r.ApiMessageEntityTypes})),n.o(r,"MAIN_THREAD_ID")&&n.d(t,"MAIN_THREAD_ID",(function(){return r.MAIN_THREAD_ID})),n.o(r,"MESSAGE_DELETED")&&n.d(t,"MESSAGE_DELETED",(function(){return r.MESSAGE_DELETED}));var u=n(60);n.o(u,"ApiMediaFormat")&&n.d(t,"ApiMediaFormat",(function(){return u.ApiMediaFormat})),n.o(u,"ApiMessageEntityTypes")&&n.d(t,"ApiMessageEntityTypes",(function(){return u.ApiMessageEntityTypes})),n.o(u,"MAIN_THREAD_ID")&&n.d(t,"MAIN_THREAD_ID",(function(){return u.MAIN_THREAD_ID})),n.o(u,"MESSAGE_DELETED")&&n.d(t,"MESSAGE_DELETED",(function(){return u.MESSAGE_DELETED}));var o=n(61);n.d(t,"ApiMessageEntityTypes",(function(){return o.a})),n.d(t,"MAIN_THREAD_ID",(function(){return o.b})),n.d(t,"MESSAGE_DELETED",(function(){return o.c}));var d=n(62);n.o(d,"ApiMediaFormat")&&n.d(t,"ApiMediaFormat",(function(){return d.ApiMediaFormat}));var c=n(63);n.d(t,"ApiMediaFormat",(function(){return c.a}));n(64),n(65)},function(e,t,n){"use strict";n.d(t,"R",(function(){return ke})),n.d(t,"ib",(function(){return Te})),n.d(t,"U",(function(){return Ne})),n.d(t,"Bb",(function(){return a})),n.d(t,"f",(function(){return i})),n.d(t,"o",(function(){return s})),n.d(t,"N",(function(){return f})),n.d(t,"M",(function(){return l})),n.d(t,"vb",(function(){return b})),n.d(t,"n",(function(){return h})),n.d(t,"g",(function(){return m})),n.d(t,"J",(function(){return p})),n.d(t,"d",(function(){return g})),n.d(t,"K",(function(){return y})),n.d(t,"j",(function(){return v})),n.d(t,"i",(function(){return I})),n.d(t,"L",(function(){return w})),n.d(t,"h",(function(){return O})),n.d(t,"x",(function(){return k})),n.d(t,"q",(function(){return T})),n.d(t,"m",(function(){return N})),n.d(t,"lb",(function(){return P})),n.d(t,"W",(function(){return L})),n.d(t,"bb",(function(){return x})),n.d(t,"w",(function(){return B})),n.d(t,"Cb",(function(){return R})),n.d(t,"eb",(function(){return F})),n.d(t,"jb",(function(){return U})),n.d(t,"mb",(function(){return _})),n.d(t,"hb",(function(){return G})),n.d(t,"B",(function(){return $})),n.d(t,"D",(function(){return W})),n.d(t,"A",(function(){return z})),n.d(t,"xb",(function(){return H})),n.d(t,"E",(function(){return K})),n.d(t,"yb",(function(){return V})),n.d(t,"zb",(function(){return q})),n.d(t,"wb",(function(){return J})),n.d(t,"a",(function(){return Y})),n.d(t,"V",(function(){return Q})),n.d(t,"k",(function(){return Z})),n.d(t,"kb",(function(){return X})),n.d(t,"C",(function(){return ee})),n.d(t,"l",(function(){return te})),n.d(t,"G",(function(){return ne})),n.d(t,"S",(function(){return re})),n.d(t,"ab",(function(){return ue})),n.d(t,"ob",(function(){return oe})),n.d(t,"I",(function(){return de})),n.d(t,"b",(function(){return ce})),n.d(t,"e",(function(){return ae})),n.d(t,"Ab",(function(){return ie})),n.d(t,"gb",(function(){return se})),n.d(t,"F",(function(){return fe})),n.d(t,"P",(function(){return le})),n.d(t,"p",(function(){return be})),n.d(t,"Q",(function(){return he})),n.d(t,"T",(function(){return me})),n.d(t,"H",(function(){return pe})),n.d(t,"Y",(function(){return ge})),n.d(t,"O",(function(){return ye})),n.d(t,"nb",(function(){return ve})),n.d(t,"Z",(function(){return Ie})),n.d(t,"pb",(function(){return we})),n.d(t,"qb",(function(){return Oe})),n.d(t,"rb",(function(){return je})),n.d(t,"s",(function(){return Pe})),n.d(t,"z",(function(){return Ce})),n.d(t,"v",(function(){return Ee})),n.d(t,"u",(function(){return Se})),n.d(t,"X",(function(){return Me})),n.d(t,"t",(function(){return Ae})),n.d(t,"y",(function(){return C})),n.d(t,"r",(function(){return E})),n.d(t,"sb",(function(){return S})),n.d(t,"tb",(function(){return M})),n.d(t,"c",(function(){return A})),n.d(t,"cb",(function(){return De})),n.d(t,"db",(function(){return Le})),n.d(t,"fb",(function(){return xe})),n.d(t,"ub",(function(){return Be}));var r=n(18),u=n(7),o=n(5),d=n(1),c=n(4);function a(e,t){return e.users.byId[t]}function i(e,t){return e.chats.byId[t]}function s(e,t){const n=Object(c.T)(t);return!!n&&a(e,n)}function f(e,t){return t===e.currentUserId}function l(e,t){const n=s(e,t);return n&&Object(c.wb)(n)}function b(e){return Object.values(e.chats.byId).find(({isSupport:e})=>e)}function h(e,t){if(Object(c.lb)(t.id)||Object(c.jb)(t))return;if(Object(c.nb)(t))return t.onlineCount;if(!t.fullInfo||!t.fullInfo.members)return;return t.fullInfo.members.map(e=>e.userId).reduce((t,n)=>e.users.byId[n]&&Object(c.xb)(e.users.byId[n])?t+1:t,0)}function m(e,t){const n=i(e,t),r=n&&Object(c.T)(n),u=r&&a(e,r);if(u&&Object(c.wb)(u))return u}function p(e,t){const n=i(e,t),r=m(e,t);if(!n||!r)return!1;if(n.lastMessage&&Object(c.rb)(n.lastMessage))return!0;const u=e.messages.byChatId[t];if(!u)return!1;const{listedIds:d}=u.threadsById[o.MAIN_THREAD_ID]||{};return d&&!d.length}function g(e){return Boolean(e.chats.listIds.active)}function y(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 v(e,t){const n=i(e,t);if(n&&y(e,t))return n.folderId===d.g?"archived":"active"}function I(e,t){return e.chatFolders.byId[t]}function w(e,t,n=d.b){const{active:r,archived:u}=e.chats.orderedPinnedIds;if(n===d.b)return!!r&&r.includes(t);if(n===d.g)return!!u&&u.includes(t);const{byId:o}=e.chatFolders,{pinnedChatIds:c}=o[n]||{};return!!c&&c.includes(t)}function O(e,t){const n=t.toLowerCase();return Object.values(e.chats.byId).find(e=>e.username&&e.username.toLowerCase()===n)}var j=n(3);function C(e){return e.stickers.search}function E(e){return e.gifs.search}function S(e,t){return e.stickers.setsById[t]}function M(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 A(e,t){const{animatedEmojis:n}=e;if(n&&n.stickers)return t=t.replace("️",""),n.stickers.find(e=>e.emoji===t)}function k(e){const{messageLists:t}=e.messages;if(t&&t.length)return t[t.length-1]}function T(e){const{chatId:t}=k(e)||{};return t?i(e,t):void 0}function N(e,t){const n=e.messages.byChatId[t];return n?n.byId:void 0}function P(e,t){const n=e.scheduledMessages.byChatId[t];return n?n.byId:void 0}function D(e,t,n,r){const u=e.messages.byChatId[t];if(!u)return;const o=u.threadsById[n];return o?o[r]:void 0}function L(e,t,n){return D(e,t,n,"listedIds")}function x(e,t,n){return D(e,t,n,"outlyingIds")}function B(e,t,n,r){switch(r){case"thread":return R(e,t,n);case"pinned":return F(e,t);case"scheduled":return U(e,t)}}function R(e,t,n){return D(e,t,n,"viewportIds")}function F(e,t){return D(e,t,o.MAIN_THREAD_ID,"pinnedIds")}function U(e,t){return D(e,t,o.MAIN_THREAD_ID,"scheduledIds")}function _(e,t,n){return D(e,t,n,"scrollOffset")}function G(e,t,n){return D(e,t,n,"replyingToId")}function $(e,t,n){return D(e,t,n,"editingId")}function W(e,t){return D(e,t,o.MAIN_THREAD_ID,"editingScheduledId")}function z(e,t,n){return D(e,t,n,"draft")}function H(e,t,n){return D(e,t,n,"threadInfo")}function K(e,t,n){return D(e,t,n,"firstMessageId")}function V(e,t,n){if(n===o.MAIN_THREAD_ID)return i(e,t);const r=H(e,t,n);return r?i(e,r.originChannelId||t):void 0}function q(e,t,n){if(n===o.MAIN_THREAD_ID)return;const r=H(e,t,n);return r?r.topMessageId:void 0}function J(e,t,n){const r=e.messages.byChatId[t];if(!r)return;const{replyToMessageId:u,replyToTopMessageId:o}=n;return u||o?Object.values(r.threadsById).find(e=>e.threadInfo&&(u&&u===e.threadInfo.topMessageId||o&&o===e.threadInfo.topMessageId)):void 0}function Y(e,t,n){const r=k(e);if(!r)return!1;const{threadInfo:u}=J(e,t,n)||{};return t===r.chatId&&(r.threadId===o.MAIN_THREAD_ID||u&&r.threadId===u.threadId)}function Q(e,t,n){const r=R(e,t,n);if(!r||!r.length)return!0;let u;if(n===o.MAIN_THREAD_ID){const n=i(e,t);if(!n||!n.lastMessage)return!0;u=n.lastMessage.id}else{const r=H(e,t,n);if(!r||!r.lastMessageId)return;u=r.lastMessageId}return u>=d.D&&!Z(e,t,u)||r[r.length-1]>=u}function Z(e,t,n){const r=N(e,t);return r?r[n]:void 0}function X(e,t,n){const r=P(e,t);return r?r[n]:void 0}function ee(e,t,n,r){if("scheduled"===r){const n=W(e,t);return n?X(e,t,n):void 0}{const r=$(e,t,n);return r?Z(e,t,r):void 0}}function te(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 ne(e,t){const{chatId:n,messageId:r}=e.focusedMessage||{};return n===t?r:void 0}function re(e,t){const n=ne(e,t.chatId);return!!n&&(n===t.id||n===t.previousLocalId)}function ue(e,t,n=!1){return function(e,t){const{lastReadOutboxMessageId:n}=i(e,t.chatId)||{};return Object(c.sb)(t)||!n||n0?a(e,n):i(e,n)}function de(e,t){const{forwardInfo:n}=t;if(n)return n.isChannelPost&&n.fromChatId?i(e,n.fromChatId):n.senderUserId?a(e,n.senderUserId):void 0}function ce(e,t,n){const r=i(e,t.chatId);if(!r||r.isRestricted)return{};const u=Object(c.lb)(r.id),o=f(e,t.chatId),d=Object(c.ib)(r),a=Object(c.nb)(r),s=Object(c.jb)(r),l=Object(c.vb)(t),b=Object(c.tb)(t),h=Object(c.db)(t),{content:m}=t,p=(o||Date.now()-1e3*t.date<1728e5)&&!(m.sticker||m.contact||m.poll||m.action||m.audio||m.video&&m.video.isRound)&&!Object(c.qb)(t)&&!t.viaBotId,g=Object(c.e)(r,n)&&!l,y=u||r.isCreator||!s&&!Object(c.yb)(r,"pinMessages")||Object(c.q)(r,"pinMessages");let v=!h&&y,I=!1;const w=F(e,r.id);v&&(I=Boolean(w&&w.includes(t.id)),v=!I);const O=u||b||d||r.isCreator||Object(c.q)(r,"deleteMessages"),j=O&&!l&&(u&&!o||d&&(b||Object(c.q)(r,"deleteMessages"))),C=!h&&p&&(b||s&&(r.isCreator||Object(c.q)(r,"editMessages"))),E=!h&&!l,S=Boolean(t.content.sticker),M=S&&function(e,t){const{stickers:n}=e.stickers.favorite;return n&&n.some(({id:e})=>e===t.id)}(e,t.content.sticker),A=!h&&S&&!M,k=!h&&M,T=!h,N=!h&&(s||a),P=!h;return{noOptions:[g,C,v,I,O,j,E,A,k,T,N,P].every(e=>!e),canReply:g,canEdit:C,canPin:v,canUnpin:I,canDelete:O,canDeleteForAll:j,canForward:E,canFaveSticker:A,canUnfaveSticker:k,canCopy:T,canCopyLink:N,canSelect:P}}function ae(e){const{messageIds:t}=e.selectedMessages||{},{chatId:n,threadId:r}=k(e)||{},u=n&&N(e,n);if(!u||!t||!r)return{};const o=t.map(t=>u[t]&&ce(e,u[t],r)).filter(Boolean);return{canDelete:o.every(e=>e.canDelete),canDeleteForAll:o.every(e=>e.canDeleteForAll)}}function ie(e,t){const n=e.fileUploads.byMessageLocalId[t.previousLocalId||t.id];return n?n.progress:void 0}function se(e,t,n){if(n===o.MAIN_THREAD_ID){const n=i(e,t);if(!n)return;if(!n.lastReadInboxMessageId)return;return n.lastMessage?Object(c.sb)(n.lastMessage)?n.lastMessage.id:Math.min(n.lastMessage.id,n.lastReadInboxMessageId):n.lastReadInboxMessageId}{const r=H(e,t,n);if(!r)return;return r.lastReadInboxMessageId?r.lastMessageId?Math.min(r.lastReadInboxMessageId,r.lastMessageId):r.lastReadInboxMessageId:r.topMessageId}}function fe(e,t,n){if(n===o.MAIN_THREAD_ID){const n=i(e,t);if(!n||!n.unreadCount)return}else{const r=H(e,t,n);if(!r||r.lastMessageId===r.lastReadInboxMessageId)return}const r=x(e,t,n),u=L(e,t,n),d=N(e,t);if(!d||!r&&!u)return;const c=se(e,t,n);if(r){const e=r.find(e=>!c||e>c&&d[e]&&!d[e].isOutgoing);if(e)return e}if(u){const e=u.find(e=>!c||e>c&&d[e]&&!d[e].isOutgoing);if(e)return e}}function le(e){const{forwardMessages:t}=e;return Boolean(t.isModalShown)}function be(e,t){const n=Object.values(e.chats.byId).find(e=>Object(c.ob)(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 u=i(e,Number(n));return u&&Object(c.ob)(u)&&r[u.id].byId[t]}))}function he(e){const{selectedMessages:t}=e;return Boolean(t)}function me(e,t){const{messageIds:n}=e.selectedMessages||{};return!!n&&n.includes(t)}function pe(e,t,n){const r=N(e,t);if(r)return Object.values(r).filter(e=>e.groupedId===n&&e.forwardInfo).map(({forwardInfo:e})=>e.fromMessageId)}function ge(e,t,n){const r=N(e,t);if(r)return Object.keys(r).map(Number).filter(e=>r[e].groupedId===n)}function ye(e,t,n){const{messageIds:r}=e.selectedMessages||{};if(!r)return!1;const u=ge(e,t,n);return u&&u.every(e=>r.includes(e))}function ve(e){const{messageIds:t}=e.selectedMessages||{};return t?t.length:0}function Ie(e,t){const n=i(e,t);if(!n)return;if(!l(e,n))return;const r=N(e,t),u=R(e,t,o.MAIN_THREAD_ID);if(!r||!u)return;const d=Object(j.g)(u,e=>!r[e].isOutgoing&&Boolean(r[e].keyboardButtons)),c=Object(j.g)(u,e=>Boolean(r[e].shouldHideKeyboardButtons));return d&&c&&c>d?void 0:d?r[d]:void 0}function we(e,t,n,r){const{shouldAutoDownloadMediaFromContacts:u,shouldAutoDownloadMediaInPrivateChats:o,shouldAutoDownloadMediaInGroups:d,shouldAutoDownloadMediaInChannels:a}=e.settings.byKey;return Boolean(o&&Object(c.lb)(n.id)||d&&Object(c.kb)(n)||a&&Object(c.jb)(n)||u&&r&&(r.id===e.currentUserId||function(e,t){return e.contactList&&e.contactList.userIds.includes(t.id)}(e,r)))}function Oe(e,t){const n=Object(c.O)(t);if(!n)return;const{shouldAutoPlayVideos:r,shouldAutoPlayGifs:u}=e.settings.byKey,o=n.isGif||n.isRound;return r&&!o||u&&o}function je(e){return e.settings.byKey.shouldLoopStickers}function Ce(e){const{chatId:t,threadId:n}=k(e)||{};if(!t||!n)return;const r=Object(c.a)(t,n),u=e.localTextSearch.byChatThreadKey[r];return u&&u.isActive?u:void 0}function Ee(e){const{byChatId:t}=e.localMediaSearch,{chatId:n}=k(e)||{},r=e.users.selectedId;return r&&t[r]?r:n}function Se(e){const t=Ee(e);if(t)return e.localMediaSearch.byChatId[t]}function Me(e,t){return e.management.byChatId[t]}function Ae(e){const{chatId:t,threadId:n}=k(e)||{};if(!t||!n)return;if(Object(c.lb)(t))return"user";const r=i(e,t);return r?Object(c.kb)(r)?"group":"channel":void 0}function ke(e){const{mediaViewer:t}=e;return Boolean(t.messageId||t.avatarOwnerId)}function Te(e){const{users:t,isChatInfoShown:n,isStatisticsShown:o}=e,d=function(e){const{pollResults:t}=e;return Boolean(t.messageId)}(e),c=Boolean(!u.f&&Ce(e)),a=function(e){const{chatId:t,threadId:n}=k(e)||{};if(!t||!n)return;const r=e.management.byChatId[t];return r&&r.isActive?r:void 0}(e),i=void 0!==C(e).query,s=void 0!==E(e).query,{chatId:f}=k(e)||{},l=t.selectedId,b=g(e),h=Boolean(l&&b),m=Boolean(f&&b)&&n;return d?r.l.PollResults:c?r.l.Search:a?r.l.Management:o?r.l.Statistics:i?r.l.StickerSearch:s?r.l.GifSearch:h?r.l.UserInfo:m?r.l.ChatInfo:void 0}function Ne(e){return void 0!==Te(e)}function Pe(e){return e.globalSearch.query}function De(e){return e.payment.messageId}function Le(e){return e.payment.formId}function xe(e){return e.payment.nativeParams?e.payment.nativeParams.publishableKey:void 0}function Be(e){return e.payment.stripeCredentials}},function(e,t,n){"use strict";n.d(t,"n",(function(){return u})),n.d(t,"e",(function(){return o})),n.d(t,"d",(function(){return d})),n.d(t,"b",(function(){return c})),n.d(t,"i",(function(){return a})),n.d(t,"k",(function(){return i})),n.d(t,"f",(function(){return s})),n.d(t,"l",(function(){return f})),n.d(t,"c",(function(){return l})),n.d(t,"j",(function(){return b})),n.d(t,"h",(function(){return h})),n.d(t,"g",(function(){return m})),n.d(t,"a",(function(){return p})),n.d(t,"m",(function(){return g})),n.d(t,"o",(function(){return v}));var r=n(1);const u=function(){const{userAgent:e,platform:t}=window.navigator;let n;return-1!==["Macintosh","MacIntel","MacPPC","Mac68K"].indexOf(t)?n="Mac OS":-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}(),o="Mac OS"===u,d="iOS"===u,c="Android"===u,a=/^((?!chrome|android).)*safari/i.test(navigator.userAgent),i=window.matchMedia("(pointer: coarse)").matches,s=window.innerWidth<=r.V||window.innerWidth<=r.U&&window.innerHeight<=r.T,f=navigator.mediaDevices&&"getUserMedia"in navigator.mediaDevices&&(window.AudioContext||window.webkitAudioContext),l=(document.documentElement.style,u&&(o||d)),b="serviceWorker"in navigator,h=b,m=(window,Boolean((new Audio).canPlayType("audio/ogg; codecs=opus"))),p=window.devicePixelRatio||1,g=d;let y;function v(){return Boolean(y)}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=>{y=e})},function(e,t,n){"use strict";t.a=(...e)=>e.filter(Boolean).join(" ")},function(e,t,n){"use strict";function r(e,t,n=!0,r=!0){let u;return(...o)=>{u?(clearTimeout(u),u=void 0):n&&e(...o),u=self.setTimeout(()=>{r&&e(...o),u=void 0},t)}}function u(e,t,n=!0){let r,u,o;return(...d)=>{u=!0,o=d,r||(n&&(u=!1,e(...o)),r=self.setInterval(()=>{if(!u)return self.clearInterval(r),void(r=void 0);u=!1,e(...o)},t))}}function o(e){return a(h,e)}function d(e){return a(m,e)}function c(e){return a(i,e)}function a(e,t){let n,r=!1;return(...u)=>{n=u,r||(r=!0,e(()=>{r=!1,t(...n)}))}}function i(e){Promise.resolve().then(e)}function s(e){self.requestIdleCallback?self.requestIdleCallback(e):i(e)}n.d(t,"a",(function(){return r})),n.d(t,"g",(function(){return u})),n.d(t,"i",(function(){return o})),n.d(t,"h",(function(){return d})),n.d(t,"j",(function(){return c})),n.d(t,"d",(function(){return i})),n.d(t,"c",(function(){return s})),n.d(t,"e",(function(){return f})),n.d(t,"f",(function(){return l})),n.d(t,"b",(function(){return h}));const f=e=>new Promise(t=>{setTimeout(()=>t(),e)});function l(){return new Promise(e=>{requestAnimationFrame(e)})}let b;function h(e,t=!1){b?t?b.unshift(e):b.push(e):(b=[e],requestAnimationFrame(()=>{const e=b;b=void 0,e.forEach(e=>e())}))}function m(e){return h(e,!0)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return y})),n.d(t,"c",(function(){return O})),n.d(t,"b",(function(){return j}));var r=n(1),u=n(13),o=n(11);var d=n(3),c=n.p+"en-extra.e73049da90714ecdae3233e8ffa74d39.json",a=n.p+"es-extra.b80575cdf988e1a7e3a915abe97f63b4.json",i=n.p+"it-extra.78e5568451a888818c7e2209e05a9602.json",s=n.p+"pl-extra.38fd67a6c26e58f5c912568332c7c074.json",f=n.p+"ru-extra.5761b75bfbe92bb46eb8bba9acbdbb4c.json",l=n(45);const b={en:c,es:a,it:i,pl:s,ru:f},h=["value","zeroValue","oneValue","twoValue","fewValue","manyValue","otherValue"],m={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},p=new Map;let g;const{addCallback:y,removeCallback:v,runCallbacks:I}=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 w;async function O(e,t){if(g&&e===w)return document.documentElement.lang=e,void(t&&t());const n=await async function(e){const t=await u.c(r.A,e,u.a.Json);if(t)return t;const n=await Object(o.a)("fetchLangPack",{sourceLangPacks:r.B,langCode:e});if(n)return await u.d(r.A,e,n.langPack),n.langPack;return}(e);if(n){if(b[e])try{const t=await fetch(b[e]),r=await t.json(),u=Object(d.i)(r,(e,t)=>({key:t,value:e}));Object.assign(n,u)}catch(e){r.m&&console.error(e)}p.clear(),w=e,g=n,document.documentElement.lang=e,t&&t(),I(g)}}function j(e,t,n){if(void 0!==t){const r=p.get(`${e}_${t}_${n}`);if(r)return r}if(!g)return e;const r=g[e];if(!r)return e;const u=r["number"==typeof t?function(e){const t=w&&m[w]?m[w](e):0;return h[t]}(t):"value"];if(!u||!u.trim()){const t=e.split(".");return t[t.length-1]}if(void 0!==t){const r=function(e,t){return e.replace(/%\d?\$?[sdf@]/,String(t))}(u,"i"===n?Object(l.a)(t):t);return p.set(`${e}_${t}_${n}`,r),r}return u}},function(e,t,n){"use strict";n.d(t,"c",(function(){return s})),n.d(t,"a",(function(){return f})),n.d(t,"b",(function(){return l}));var r=n(70),u=n.n(r),o=n(1),d=n(22);let c;const a=new Map,i=new Map;function s(e,t=""){return c||(o.m&&console.log(">>> START LOAD WORKER"),c=new u.a,function(e){c.addEventListener("message",({data:t})=>{if("update"===t.type)e(t.update);else if("methodResponse"===t.type){const e=a.get(t.messageId);e&&(t.error?e.reject(t.error):e.resolve(t.response))}else if("methodCallback"===t.type){const e=a.get(t.messageId);e&&e.callback&&e.callback(...t.callbackArgs)}else if("unhandledError"===t.type)throw t.error})}(e)),b({type:"initApi",args:[t]})}function f(e,...t){if(c)return b({type:"callMethod",name:e,args:t});o.m&&console.warn("API is not initialized")}function l(e){e.isCanceled=!0;const{messageId:t}=i.get(e)||{};t&&c.postMessage({type:"cancelProgress",messageId:t})}function b(e){const t=Object(d.a)(a),n={messageId:t,...e},r={messageId:t},u=new Promise((e,t)=>{Object.assign(r,{resolve:e,reject:t})});if("function"==typeof n.args[1]){const e=n.args.pop();r.callback=e,i.set(e,r)}return a.set(t,r),u.catch(()=>{}).finally(()=>{a.delete(t),r.callback&&i.delete(r.callback)}),c.postMessage(n),u}},function(e,t,n){"use strict";n.d(t,"a",(function(){return u})),n.d(t,"d",(function(){return c})),n.d(t,"c",(function(){return a})),n.d(t,"b",(function(){return s}));var r=n(1);let u;!function(e){e[e.Auth=0]="Auth",e[e.Main=1]="Main",e[e.Extra=2]="Extra"}(u||(u={}));const o={},d={};async function c(e,t){if(!o[e]){switch(e){case u.Auth:o[u.Auth]=n.e(4).then(n.bind(null,92));break;case u.Main:r.m&&console.log(">>> START LOAD MAIN BUNDLE"),o[u.Main]=Promise.all([n.e(0),n.e(3)]).then(n.bind(null,91));break;case u.Extra:o[u.Extra]=Promise.all([n.e(0),n.e(2)]).then(n.bind(null,90))}o[e].then(f)}const c=await o[e];return d[e]||(d[e]=c),a(e,t)}function a(e,t){const n=d[e];if(n)return n[t]}const i=[];function s(e){i.includes(e)||i.push(e)}function f(){i.forEach(e=>{e()})}},function(e,t,n){"use strict";n.d(t,"a",(function(){return u})),n.d(t,"c",(function(){return o})),n.d(t,"d",(function(){return d})),n.d(t,"b",(function(){return c}));const r=self.caches;let u;async function o(e,t,n){if(!r)return;const o=new Request(t),d=await r.open(e),c=await d.match(o);if(c)switch(n){case u.Text:return c.text();case u.Blob:{const e=await c.blob();if("sticker"===t.substr(0,7))return new Blob([e],{type:"image/webp"});if(!e.type){const t=c.headers.get("Content-Type");if(t)return new Blob([e],{type:t})}return e}case u.Json:return c.json();default:return}}async function d(e,t,n){if(!r)return;const u="string"==typeof n||n instanceof Blob?n:JSON.stringify(n),o=new Request(t),d=new Response(u);return(await r.open(e)).put(o,d)}function c(e){if(r)return r.delete(e)}!function(e){e[e.Text=0]="Text",e[e.Blob=1]="Blob",e[e.Json=2]="Json"}(u||(u={}))},function(e,t,n){"use strict";n.d(t,"d",(function(){return o})),n.d(t,"a",(function(){return d})),n.d(t,"b",(function(){return c})),n.d(t,"g",(function(){return a})),n.d(t,"h",(function(){return i})),n.d(t,"c",(function(){return s})),n.d(t,"e",(function(){return f})),n.d(t,"f",(function(){return l}));var r=n(9);function u(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}"undefined"==typeof File&&(self.File=class extends Blob{constructor(e,t,n){if(n){const{type:t,...r}=n;super(e,{type:t}),u(this,"name",void 0),Object.assign(this,r)}else super(e),u(this,"name",void 0);this.name=t}});function o(e){const t=e.split(","),n=t[0].match(/:(.*?);/)[1],r=atob(t[1]);let u=r.length;const o=new Uint8Array(u);for(;u--;)o[u]=r.charCodeAt(u);return new Blob([o],{type:n})}function d(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 c(e,t){return new File([e],t,{lastModified:Date.now(),type:e.type})}function a(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 s(e){const t=await i(e);return Promise.race([Object(r.e)(2e3),new Promise((e,n)=>{t.onseeked=()=>{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 f(e){return(await fetch(e)).blob()}function l(e){const t=document.createElement("canvas");t.width=e.width,t.height=e.height;return t.getContext("2d").drawImage(e,0,0),t}},function(e,t,n){"use strict";n.d(t,"b",(function(){return o}));const r=/\uFE0F/g,u=String.fromCharCode(8205);function o(e){return e.indexOf(u)<0?e.replace(r,""):e}t.a=/(?:\u2624|\ud83d\udc68\ud83c\udffb\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffc-\udfff]|\ud83d\udc68\ud83c\udffc\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb\udffd-\udfff]|\ud83d\udc68\ud83c\udffd\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb\udffc\udffe\udfff]|\ud83d\udc68\ud83c\udffe\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb-\udffd\udfff]|\ud83d\udc68\ud83c\udfff\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb-\udffe]|\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\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\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\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\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\ud83e\udd1d\u200d\ud83e\uddd1\ud83c[\udffb-\udfff]|\ud83e\uddd1\ud83c\udffc\u200d\ud83e\udd1d\u200d\ud83e\uddd1\ud83c[\udffb-\udfff]|\ud83e\uddd1\ud83c\udffd\u200d\ud83e\udd1d\u200d\ud83e\uddd1\ud83c[\udffb-\udfff]|\ud83e\uddd1\ud83c\udffe\u200d\ud83e\udd1d\u200d\ud83e\uddd1\ud83c[\udffb-\udfff]|\ud83e\uddd1\ud83c\udfff\u200d\ud83e\udd1d\u200d\ud83e\uddd1\ud83c[\udffb-\udfff]|\ud83e\uddd1\u200d\ud83e\udd1d\u200d\ud83e\uddd1|\ud83d\udc6b\ud83c[\udffb-\udfff]|\ud83d\udc6c\ud83c[\udffb-\udfff]|\ud83d\udc6d\ud83c[\udffb-\udfff]|\ud83d[\udc6b-\udc6d])|(?:\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\uddd6-\udddd])(?:\ud83c[\udffb-\udfff])?\u200d[\u2640\u2642]\ufe0f|(?:\ud83d\udc68\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68|\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\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d[\udc68\udc69]|\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\u2764\ufe0f\u200d\ud83d\udc68|\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\u2764\ufe0f\u200d\ud83d[\udc68\udc69]|\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|\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|\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-\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},function(e,t,n){"use strict";var r=n(0),u=n(20);n(86);t.a=Object(r.h)(({color:e="blue"})=>r.a.createElement("div",{className:"Loading"},r.a.createElement(u.a,{color:e,withBackground:"white"===e})))},function(e,t,n){"use strict";var r=n(0),u=n(12),o=n(29);t.a=(e,t,n=!1,d=!1)=>{const c=Object(u.c)(e,t),a=Object(o.a)();return d&&Object(u.b)(a),Object(r.n)(()=>{n||c||Object(u.d)(e,t).then(a)},[e,a,c,t,n]),c}},function(e,t,n){"use strict";let r,u,o,d,c,a,i,s,f,l,b,h;n.d(t,"e",(function(){return r})),n.d(t,"b",(function(){return u})),n.d(t,"m",(function(){return o})),n.d(t,"d",(function(){return d})),n.d(t,"c",(function(){return c})),n.d(t,"l",(function(){return a})),n.d(t,"h",(function(){return i})),n.d(t,"a",(function(){return s})),n.d(t,"j",(function(){return f})),n.d(t,"f",(function(){return l})),n.d(t,"k",(function(){return b})),n.d(t,"i",(function(){return h})),n.d(t,"n",(function(){return m})),n.d(t,"g",(function(){return p})),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"}(u||(u={})),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.FoldersIncludedChats=28]="FoldersIncludedChats",e[e.FoldersExcludedChats=29]="FoldersExcludedChats",e[e.TwoFaDisabled=30]="TwoFaDisabled",e[e.TwoFaNewPassword=31]="TwoFaNewPassword",e[e.TwoFaNewPasswordConfirm=32]="TwoFaNewPasswordConfirm",e[e.TwoFaNewPasswordHint=33]="TwoFaNewPasswordHint",e[e.TwoFaNewPasswordEmail=34]="TwoFaNewPasswordEmail",e[e.TwoFaNewPasswordEmailCode=35]="TwoFaNewPasswordEmailCode",e[e.TwoFaEnabled=36]="TwoFaEnabled",e[e.TwoFaChangePasswordCurrent=37]="TwoFaChangePasswordCurrent",e[e.TwoFaChangePasswordNew=38]="TwoFaChangePasswordNew",e[e.TwoFaChangePasswordConfirm=39]="TwoFaChangePasswordConfirm",e[e.TwoFaChangePasswordHint=40]="TwoFaChangePasswordHint",e[e.TwoFaTurnOff=41]="TwoFaTurnOff",e[e.TwoFaRecoveryEmailCurrentPassword=42]="TwoFaRecoveryEmailCurrentPassword",e[e.TwoFaRecoveryEmail=43]="TwoFaRecoveryEmail",e[e.TwoFaRecoveryEmailCode=44]="TwoFaRecoveryEmailCode",e[e.TwoFaCongratulations=45]="TwoFaCongratulations"}(o||(o={})),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"}(d||(d={})),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"}(c||(c={})),function(e){e[e.ChatInfo=0]="ChatInfo",e[e.UserInfo=1]="UserInfo",e[e.Search=2]="Search",e[e.Management=3]="Management",e[e.Statistics=4]="Statistics",e[e.StickerSearch=5]="StickerSearch",e[e.GifSearch=6]="GifSearch",e[e.PollResults=7]="PollResults"}(a||(a={})),function(e){e[e.Inline=0]="Inline",e[e.ScheduledInline=1]="ScheduledInline",e[e.SharedMedia=2]="SharedMedia",e[e.ProfileAvatar=3]="ProfileAvatar",e[e.MiddleHeaderAvatar=4]="MiddleHeaderAvatar",e[e.Album=5]="Album",e[e.ScheduledAlbum=6]="ScheduledAlbum",e[e.SearchResult=7]="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"}(s||(s={})),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.Idle=0]="Idle",e[e.InProgress=1]="InProgress",e[e.Complete=2]="Complete",e[e.Error=3]="Error"}(l||(l={})),function(e){e[e.Profile=0]="Profile",e[e.SharedMedia=1]="SharedMedia",e[e.MemberList=2]="MemberList"}(b||(b={})),function(e){e[e.ShippingInfo=0]="ShippingInfo",e[e.Shipping=1]="Shipping",e[e.PaymentInfo=2]="PaymentInfo",e[e.Checkout=3]="Checkout"}(h||(h={}));const m="UPLOADING_WALLPAPER_SLUG";let p;!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"}(p||(p={}))},function(e,t,n){"use strict";n.d(t,"d",(function(){return u})),n.d(t,"e",(function(){return o})),n.d(t,"b",(function(){return d})),n.d(t,"c",(function(){return c})),n.d(t,"a",(function(){return r}));var r="AF🇦🇫93Afghanistan\nAO🇦🇴244Angola\nAL🇦🇱355Albania\nAD🇦🇩376Andorra\nAE🇦🇪971United Arab Emirates\nAR🇦🇷54Argentina\nAM🇦🇲374Armenia\nAG🇦🇬1268Antigua and Barbuda\nAU🇦🇺61Australia\nAT🇦🇹43Austria\nAZ🇦🇿994Azerbaijan\nBI🇧🇮257Burundi\nBE🇧🇪32Belgium\nBJ🇧🇯229Benin\nBF🇧🇫226Burkina Faso\nBD🇧🇩880Bangladesh\nBG🇧🇬359Bulgaria\nBH🇧🇭973Bahrain\nBS🇧🇸1242Bahamas\nBA🇧🇦387Bosnia and Herzegovina\nBY🇧🇾375Belarus\nBZ🇧🇿501Belize\nBO🇧🇴591Bolivia\nBR🇧🇷55Brazil\nBB🇧🇧1246Barbados\nBN🇧🇳673Brunei\nBT🇧🇹975Bhutan\nBW🇧🇼267Botswana\nCF🇨🇫236Central African Republic\nCA🇨🇦1Canada\nCH🇨🇭41Switzerland\nCL🇨🇱56Chile\nCN🇨🇳86China\nCI🇨🇮225Ivory Coast\nCM🇨🇲237Cameroon\nCD🇨🇩243DR Congo\nCG🇨🇬242Republic of the Congo\nCO🇨🇴57Colombia\nKM🇰🇲269Comoros\nCV🇨🇻238Cape Verde\nCR🇨🇷506Costa Rica\nCU🇨🇺53Cuba\nCY🇨🇾357Cyprus\nCZ🇨🇿420Czechia\nDE🇩🇪49Germany\nDJ🇩🇯253Djibouti\nDM🇩🇲1767Dominica\nDK🇩🇰45Denmark\nDO🇩🇴1Dominican Republic\nDZ🇩🇿213Algeria\nEC🇪🇨593Ecuador\nEG🇪🇬20Egypt\nER🇪🇷291Eritrea\nES🇪🇸34Spain\nEE🇪🇪372Estonia\nET🇪🇹251Ethiopia\nFI🇫🇮358Finland\nFJ🇫🇯679Fiji\nFR🇫🇷33France\nFM🇫🇲691Micronesia\nGA🇬🇦241Gabon\nGB🇬🇧44United Kingdom\nGE🇬🇪995Georgia\nGH🇬🇭233Ghana\nGN🇬🇳224Guinea\nGM🇬🇲220Gambia\nGW🇬🇼245Guinea-Bissau\nGQ🇬🇶240Equatorial Guinea\nGR🇬🇷30Greece\nGD🇬🇩1473Grenada\nGT🇬🇹502Guatemala\nGY🇬🇾592Guyana\nHN🇭🇳504Honduras\nHR🇭🇷385Croatia\nHT🇭🇹509Haiti\nHU🇭🇺36Hungary\nID🇮🇩62Indonesia\nIN🇮🇳91India\nIE🇮🇪353Ireland\nIR🇮🇷98Iran\nIQ🇮🇶964Iraq\nIS🇮🇸354Iceland\nIL🇮🇱972Israel\nIT🇮🇹39Italy\nJM🇯🇲1876Jamaica\nJO🇯🇴962Jordan\nJP🇯🇵81Japan\nKZ🇰🇿7Kazakhstan\nKE🇰🇪254Kenya\nKG🇰🇬996Kyrgyzstan\nKH🇰🇭855Cambodia\nKI🇰🇮686Kiribati\nKN🇰🇳1869Saint Kitts and Nevis\nKR🇰🇷82South Korea\nKW🇰🇼965Kuwait\nLA🇱🇦856Laos\nLB🇱🇧961Lebanon\nLR🇱🇷231Liberia\nLY🇱🇾218Libya\nLC🇱🇨1758Saint Lucia\nLI🇱🇮423Liechtenstein\nLK🇱🇰94Sri Lanka\nLS🇱🇸266Lesotho\nLT🇱🇹370Lithuania\nLU🇱🇺352Luxembourg\nLV🇱🇻371Latvia\nMA🇲🇦212Morocco\nMC🇲🇨377Monaco\nMD🇲🇩373Moldova\nMG🇲🇬261Madagascar\nMV🇲🇻960Maldives\nMX🇲🇽52Mexico\nMH🇲🇭692Marshall Islands\nMK🇲🇰389North Macedonia\nML🇲🇱223Mali\nMT🇲🇹356Malta\nMM🇲🇲95Myanmar\nME🇲🇪382Montenegro\nMN🇲🇳976Mongolia\nMZ🇲🇿258Mozambique\nMR🇲🇷222Mauritania\nMU🇲🇺230Mauritius\nMW🇲🇼265Malawi\nMY🇲🇾60Malaysia\nNA🇳🇦264Namibia\nNE🇳🇪227Niger\nNG🇳🇬234Nigeria\nNI🇳🇮505Nicaragua\nNL🇳🇱31Netherlands\nNO🇳🇴47Norway\nNP🇳🇵977Nepal\nNR🇳🇷674Nauru\nNZ🇳🇿64New Zealand\nOM🇴🇲968Oman\nPK🇵🇰92Pakistan\nPA🇵🇦507Panama\nPE🇵🇪51Peru\nPH🇵🇭63Philippines\nPW🇵🇼680Palau\nPG🇵🇬675Papua New Guinea\nPL🇵🇱48Poland\nKP🇰🇵850North Korea\nPT🇵🇹351Portugal\nPY🇵🇾595Paraguay\nQA🇶🇦974Qatar\nRO🇷🇴40Romania\nRU🇷🇺7Russia\nRW🇷🇼250Rwanda\nSA🇸🇦966Saudi Arabia\nSD🇸🇩249Sudan\nSN🇸🇳221Senegal\nSG🇸🇬65Singapore\nSB🇸🇧677Solomon Islands\nSL🇸🇱232Sierra Leone\nSV🇸🇻503El Salvador\nSM🇸🇲378San Marino\nSO🇸🇴252Somalia\nRS🇷🇸381Serbia\nSS🇸🇸211South Sudan\nST🇸🇹239São Tomé and Príncipe\nSR🇸🇷597Suriname\nSK🇸🇰421Slovakia\nSI🇸🇮386Slovenia\nSE🇸🇪46Sweden\nSZ🇸🇿268Eswatini\nSC🇸🇨248Seychelles\nSY🇸🇾963Syria\nTD🇹🇩235Chad\nTG🇹🇬228Togo\nTH🇹🇭66Thailand\nTJ🇹🇯992Tajikistan\nTM🇹🇲993Turkmenistan\nTL🇹🇱670Timor-Leste\nTO🇹🇴676Tonga\nTT🇹🇹1868Trinidad and Tobago\nTN🇹🇳216Tunisia\nTR🇹🇷90Turkey\nTV🇹🇻688Tuvalu\nTZ🇹🇿255Tanzania\nUG🇺🇬256Uganda\nUA🇺🇦380Ukraine\nUY🇺🇾598Uruguay\nUS🇺🇸1United States\nUZ🇺🇿998Uzbekistan\nVA🇻🇦3Vatican City\nVC🇻🇨1784Saint Vincent and the Grenadines\nVE🇻🇪58Venezuela\nVN🇻🇳84Vietnam\nVU🇻🇺678Vanuatu\nWS🇼🇸685Samoa\nYE🇾🇪967Yemen\nZA🇿🇦27South Africa\nZM🇿🇲260Zambia\nZW🇿🇼263Zimbabwe".split("\n").map(e=>({id:e.substr(0,2),flag:e.substr(2,4),code:"+"+e.match(/\d+/)[0],name:e.split(/\d+/)[1]}));function u(e){return r.find(t=>t.id===e)}function o(e){let t=e.replace(/[^\d+]+/g,"");t.startsWith("+")||(t="+"+t);const n=r.filter(e=>t.startsWith(e.code)).sort((e,t)=>e.code.length-t.code.length);return n[n.length-1]}function d(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){switch(e?e.id:"UNKNOWN"){case"RU":case"US":return/(\d{1,3})(\d{1,3})?(\d{1,2})?(\d{1,2})?()?/;case"GB":return/(\d{1,4})(\d{1,5})?()?()?()?/;case"UA":case"FI":case"AE":return/(\d{1,2})(\d{1,3})?(\d{1,2})?(\d{1,2})?()?/;default:return/(\d{1,3})(\d{1,3})?(\d{1,3})?(\d{1,3})?(\d{1,3})?/}}(t),(e,n,r,u,o,d)=>{const c=t&&"GB"===t.id?" ":"-";let a="";return n&&(a=""+n),r&&(a+=" "+r),u&&(a+=`${c}${u}`),o&&(a+=`${c}${o}`),d&&(a+=`${c}${d}`),a}),n}function c(e){const t=e.startsWith("+")?e:"+"+e,n=o(t);return n?`${n.code} ${d(t,n)}`:t}},function(e,t,n){"use strict";var r=n(0),u=n(8);n(78);t.a=({color:e="blue",withBackground:t})=>r.a.createElement("div",{className:Object(u.a)("Spinner",e,t&&"with-background")},r.a.createElement("div",null))},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(1),u=n(9);window.addEventListener("error",c),window.addEventListener("unhandledrejection",c);const o=Date.now();let d=!1;function c(e){e.preventDefault(),a(e instanceof ErrorEvent?e.error:e.reason)}Object(u.g)(window.alert,1e3);function a(e){if(console.error(e),!d){if(Date.now()-o<=5e3){if(localStorage.getItem(r.x))localStorage.removeItem(r.x);else{if(!localStorage.getItem(r.y))return;localStorage.removeItem(r.y)}return d=!0,void window.location.reload()}0}}},function(e,t,n){"use strict";t.a=e=>{let t;do{t=String(Math.random()).replace("0.","id")}while(e.hasOwnProperty(t));return t}},function(e,t,n){"use strict";n.d(t,"c",(function(){return c})),n.d(t,"d",(function(){return a})),n.d(t,"e",(function(){return i})),n.d(t,"h",(function(){return s})),n.d(t,"f",(function(){return f})),n.d(t,"g",(function(){return l})),n.d(t,"a",(function(){return b})),n.d(t,"b",(function(){return h}));var r=n(1),u=n(28),o=n(3);const d=[1,8,5,2,7,4,6];function c(e){if(e)switch(e.type){case"userTypeBot":case"userTypeRegular":return e.firstName;case"userTypeDeleted":case"userTypeUnknown":return"Deleted";default:return}}function a(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 i(e,t){if(e.id===r.bb)return t("ServiceNotifications").toLowerCase();if(e.type&&"userTypeBot"===e.type)return"bot";if(!e.status)return"";switch(e.status.type){case"userStatusEmpty":return t("ALongTimeAgo");case"userStatusLastMonth":return t("WithinAMonth");case"userStatusLastWeek":return t("WithinAWeek");case"userStatusOffline":{const{wasOnline:n}=e.status;if(!n)return t("LastSeen.Offline");const r=new Date,o=new Date(1e3*n);if(o>=r)return t("LastSeen.JustNow");const d=new Date(r.getTime()-o.getTime());if(d.getTime()/1e3<60)return t("LastSeen.JustNow");if(d.getTime()/1e3<3600){return t("LastSeen.MinutesAgo",Math.floor(d.getTime()/1e3/60))}const c=new Date;if(c.setHours(0,0,0,0),o>c){if(d.getTime()/1e3<21600){return t("LastSeen.HoursAgo",Math.floor(d.getTime()/1e3/60/60))}return t("LastSeen.TodayAt",Object(u.h)(o))}const a=new Date;return a.setDate(r.getDate()-1),c.setHours(0,0,0,0),o>a?t("LastSeen.YesterdayAt",Object(u.h)(o)):t("LastSeen.AtDate",Object(u.b)(o))}case"userStatusOnline":return t("Online");case"userStatusRecently":return t("Lately");default:return}}function s(e){const{id:t,status:n,type:u}=e;return!!n&&(t!==r.bb&&("userStatusOnline"===n.type&&"userTypeBot"!==u))}function f(e){return!(!e.status||"userTypeBot"===e.type||e.id===r.bb)&&("userTypeDeleted"===e.type||"userTypeUnknown"===e.type)}function l(e){return"userTypeBot"===e.type}function b(e,t,n){return Object(o.k)(e,e=>{const r=Date.now()/1e3;if(n&&n.includes(e))return r+172800-n.indexOf(e);const u=t[e];if(!u||!u.status)return 0;if("userStatusOnline"===u.status.type)return u.status.expires;if("userStatusOffline"===u.status.type&&u.status.wasOnline)return u.status.wasOnline;switch(u.status.type){case"userStatusRecently":return r-86400;case"userStatusLastWeek":return r-604800;case"userStatusLastMonth":return r-18144e3;default:return 0}},"desc")}function h(e){const t=e?Math.abs(e.id)%7:0;return d[t]}},function(e,t,n){"use strict";n.d(t,"w",(function(){return a})),n.d(t,"v",(function(){return i})),n.d(t,"t",(function(){return s})),n.d(t,"y",(function(){return f})),n.d(t,"u",(function(){return l})),n.d(t,"z",(function(){return b})),n.d(t,"j",(function(){return h})),n.d(t,"p",(function(){return m})),n.d(t,"i",(function(){return p})),n.d(t,"e",(function(){return g})),n.d(t,"f",(function(){return y})),n.d(t,"d",(function(){return v})),n.d(t,"x",(function(){return I})),n.d(t,"r",(function(){return w})),n.d(t,"m",(function(){return O})),n.d(t,"A",(function(){return j})),n.d(t,"c",(function(){return C})),n.d(t,"a",(function(){return E})),n.d(t,"o",(function(){return S})),n.d(t,"h",(function(){return M})),n.d(t,"g",(function(){return A})),n.d(t,"s",(function(){return k})),n.d(t,"b",(function(){return T})),n.d(t,"C",(function(){return N})),n.d(t,"B",(function(){return P})),n.d(t,"l",(function(){return D})),n.d(t,"k",(function(){return L})),n.d(t,"q",(function(){return x})),n.d(t,"n",(function(){return B}));var r=n(5),u=n(1),o=n(3),d=n(23),c=n(10);function a(e){return e>0}function i(e){return s(e)||f(e)}function s(e){return"chatTypeBasicGroup"===e.type}function f(e){return"chatTypeSuperGroup"===e.type}function l(e){return"chatTypeChannel"===e.type}function b(e){return"chatTypePrivate"===e.type||"chatTypeBasicGroup"===e.type}function h(e){switch(e.type){case"chatTypePrivate":return"PrivateChat";case"chatTypeBasicGroup":case"chatTypeSuperGroup":return"AccDescrGroup";case"chatTypeChannel":return"AccDescrChannel";default:return"Chat"}}function m(e){if("chatTypePrivate"===e.type||"chatTypeSecret"===e.type)return e.id}function p(e,t){return t&&e.id===t.id&&t.isSelf?Object(c.b)("SavedMessages"):e.title||Object(c.b)("HiddenName")}function g(e){if(e.fullInfo)return e.fullInfo.about}function y(e){const{username:t}=e,{inviteLink:n}=e.fullInfo||{};return n&&n.length?n:t?"t.me/"+t:""}function v(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 w(e){return Boolean(e.adminRights)}function O(e,t){return!!e.adminRights&&e.adminRights[t]}function j(e,t){return Boolean(e.currentUserBannedRights&&e.currentUserBannedRights[t]||e.defaultBannedRights&&e.defaultBannedRights[t])}function C(e,t){return t!==r.MAIN_THREAD_ID||!(e.isRestricted||e.migratedTo||e.isNotJoined)&&(!!e.isCreator||(!!a(e.id)||(l(e)?O(e,"postMessages"):w(e)||!j(e,"sendMessages"))))}function E(e,t=!1){if(!e)return{canAttachMedia:!1,canAttachPolls:!1,canSendStickers:!1,canSendGifs:!1,canAttachEmbedLinks:!1};const n=w(e);return{canAttachMedia:n||!j(e,"sendMedia"),canAttachPolls:(n||!j(e,"sendPolls"))&&(!a(e.id)||t),canSendStickers:n||!j(e,"sendStickers"),canSendGifs:n||!j(e,"sendGifs"),canAttachEmbedLinks:n||!j(e,"embedLinks")}}function S(e){return e.currentUserBannedRights&&e.currentUserBannedRights.sendMessages?"You are not allowed to send messages in this chat.":e.defaultBannedRights&&e.defaultBannedRights.sendMessages?"Sending messages is not allowed in this chat.":void 0}function M(e){if(e&&e.fullInfo)return e.fullInfo.slowMode}function A(e){return Math.max(e.joinDate||0,e.lastMessage?e.lastMessage.date:0)}function k(e){return e.folderId===u.g}function T(e){return s(e)||(f(e)||l(e))&&e.isCreator}function N(e,t,n,r){const u=n.excludedChatIds?new Set(n.excludedChatIds):void 0,o=n.excludedChatIds?new Set(n.includedChatIds):void 0,d=n.excludedChatIds?new Set(n.pinnedChatIds):void 0;return[(r||Object.keys(e).map(Number)).filter(r=>function(e,t,n,r,u,o){if(r&&r.has(e.id))return!1;if(u&&u.has(e.id))return!0;if(o&&o.has(e.id))return!0;if(k(e)&&t.excludeArchived)return!1;if(e.isMuted&&t.excludeMuted)return!1;if(!e.unreadCount&&!e.unreadMentionsCount&&!e.hasUnreadMark&&t.excludeRead)return!1;if(a(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(i(e))return!!t.groups;if(l(e))return!!t.channels}return!1}(e[r],n,t,u,o,d)),n.pinnedChatIds]}function P(e,t,n,r="all"){function u(e){if(!e||!e.lastMessage||e.migratedTo)return!1;switch(r){case"all":if(k(e))return!1;break;case"archived":if(!k(e))return!1}return!e.isRestricted&&!e.isNotJoined}const d=t.map(t=>e[t]).filter(u),c=new Set(t);return{pinnedChats:n?n.map(t=>e[t]).filter(u).filter(e=>c.has(e.id)):[],otherChats:Object(o.k)(n?d.filter(e=>!n.includes(e.id)):d,A,"desc")}}function D(e,t,n,r){const[u]=N(e,t,n,r),o=u.map(t=>e[t]).filter(e=>e&&e.lastMessage&&!e.isRestricted&&!e.isNotJoined);return{unreadDialogsCount:o.reduce((e,t)=>t.unreadCount||t.hasUnreadMark?e+1:e,0),hasActiveDialogs:o.some(e=>e.unreadMentionsCount||!e.isMuted&&(e.unreadCount||e.hasUnreadMark))}}function L(e,t,n,r,u){const{id:o,title:d,emoticon:c,description:a,pinnedChatIds:i,excludedChatIds:s,includedChatIds:f,excludeArchived:l,excludeMuted:b,excludeRead:h,...m}=n;if(Object.values(m).filter(Boolean).length>1||s&&s.length||f&&f.length){return u("Chats",function(e,t,n,r){const[u,o]=N(e,t,n,r),{pinnedChats:d,otherChats:c}=P(e,u,o,"folder");return d.length+c.length}(e,t,n,r))}return m.bots?u("FilterBots"):m.groups?u("FilterGroups"):m.channels?u("FilterChannels"):m.contacts?u("FilterContacts"):m.nonContacts?u("FilterNonContacts"):void 0}function x(e){return!!e&&e.id<0}function B(e,t){if(t&&!a(e))return t.isSelf?"You":Object(d.c)(t)}},function(e,t,n){"use strict";function r(e,t){const n=Object.keys(e);return n.length===Object.keys(t).length&&n.every(n=>e[n]===t[n])}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return a})),n.d(t,"c",(function(){return i})),n.d(t,"b",(function(){return b}));var r=n(1);const u=new Set(["scroll","mouseenter","mouseleave"]),o={},d=new Map,c={};function a(e,t,n){const r=s(t,e);f(r,e)?function(e,t,n){c[e]||(c[e]=0,document.addEventListener(e,h));(function(e){o[e]||(o[e]=new Map);return o[e]})(e).set(t,n),function(e){const t=d.get(e);if(t)return t;const n=new Set;return d.set(e,n),n}(t).add(e),c[e]++}(r,e,n):e.addEventListener(r,n)}function i(e,t,n){const r=s(t,e);f(r,e)?l(r,e):e.removeEventListener(r,n)}function s(e,t){const n=e.replace(/^on/,"").toLowerCase();return"change"===n&&"SELECT"!==t.tagName?"input":"doubleclick"===n?"dblclick":"focus"===n?"focusin":"blur"===n?"focusout":n}function f(e,t){return!u.has(e)&&"VIDEO"!==t.tagName&&"IFRAME"!==t.tagName}function l(e,t){c[e]--,c[e]||document.removeEventListener(e,h),o[e].delete(t),d.get(t).delete(e)}function b(e){const t=d.get(e);t&&(t.forEach(t=>l(t,e)),d.delete(e))}function h(e){const t=o[e.type];if(t){let n=!1,r=e.target;const u=()=>{n=!0},o=()=>{e.preventDefault()},d=new Proxy(e,{get:(e,t)=>"currentTarget"===t?r:"stopPropagation"===t||"stopImmediatePropagation"===t?u:"preventDefault"===t?o:Reflect.get(e,t)});for(;r&&r!==document.body;){const e=t.get(r);if(e&&(e(d),n))return;r=r.parentNode}}}r.m&&document.addEventListener("dblclick",()=>{console.log("DELEGATED EVENTS",{delegationRegistry:o,delegatedEventsByElement:d,documentEventCounters:c})})},function(e,t,n){"use strict";var r=n(0),u=n(8);t.a=(e=!1,t,n=!1,o="fast",d=!1)=>{const[c,a]=Object(r.r)(!e),i=Object(r.q)(),[s,f]=Object(r.r)(!1);e?(a(!1),f(!0),i.current&&(window.clearTimeout(i.current),i.current=void 0)):(f(!1),c||i.current||(i.current=window.setTimeout(()=>{a(!0),t&&t(),i.current=void 0},d?0:350)));const l=s||e&&n,b=Boolean(i.current),h=e||b;return{shouldRender:h,transitionClassNames:Object(u.a)(o&&"opacity-transition",o,l&&"open",h&&"shown",b&&"closing")}}},function(e,t,n){"use strict";n.d(t,"j",(function(){return a})),n.d(t,"k",(function(){return i})),n.d(t,"n",(function(){return s})),n.d(t,"h",(function(){return l})),n.d(t,"g",(function(){return b})),n.d(t,"b",(function(){return h})),n.d(t,"f",(function(){return m})),n.d(t,"c",(function(){return p})),n.d(t,"d",(function(){return y})),n.d(t,"e",(function(){return v})),n.d(t,"i",(function(){return I})),n.d(t,"a",(function(){return w})),n.d(t,"l",(function(){return j})),n.d(t,"m",(function(){return C}));var r=n(41),u=n(10);const o=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],d=["January","February","March","April","May","June","July","August","September","October","November","December"],c=d.map(e=>e.toLowerCase());function a(e){const t=new Date(e);return t.setHours(0,0,0,0),t}function i(e){return a(e).getTime()}function s(e){const t=new Date(1e3*e);return`${t.getFullYear()}-${t.getMonth()}`}function f(e){return`${e.getFullYear()}-${e.getMonth()+1}-${e.getDate()}`}function l(e){const t="number"==typeof e?new Date(e):e;return`${String(t.getHours()).padStart(2,"0")}:${String(t.getMinutes()).padStart(2,"0")}`}function b(e){const t="number"==typeof e?new Date(e):e,n=a(new Date);if(t>=n)return l(t);const r=new Date(n);if(r.setDate(n.getDate()-7),t>=r)return Object(u.b)("Weekday.Short"+o[t.getDay()]);const d=t.getFullYear()!==n.getFullYear();return g(t,Object(u.b)(d?"formatDateScheduleYear":"formatDateSchedule")||(d?"d MMM yyyy":"d MMM"))}function h(e){return g("number"==typeof e?new Date(e):e,Object(u.b)("formatterYearMax")||"dd.MM.yyyy")}function m(e,t=!1){return g(e,Object(u.b)(t?"formatterMonthYear2":"formatterMonthYear")||"MMM yyyy")}function p(e,t=!1,n=!1){const r="number"==typeof e?new Date(e):e,d=a(new Date);if(!n){if(f(r)===f(d))return(t?E:S)(Object(u.b)("Weekday.Today"));const e=new Date(d);if(e.setDate(d.getDate()-1),f(r)===f(e))return(t?E:S)(Object(u.b)("Weekday.Yesterday"));const n=new Date(d),c=new Date(d);if(n.setDate(d.getDate()-7),c.setDate(d.getDate()+7),r>=n&&r<=c){const e=o[r.getDay()];return t?E(Object(u.b)("Weekday.Short"+e)):S(Object(u.b)("Weekday."+e))}}const c=r.getFullYear()!==d.getFullYear(),i=t?c?"formatDateScheduleYear":"formatDateSchedule":c?"chatFullDate":"chatDate";return(t?E:S)(g(r,Object(u.b)(i)||"d MMMM yyyy"))}function g(e,t){const n=e.getDate(),r=e.getMonth();return t.replace("LLLL",Object(u.b)(d[r])).replace("MMMM",Object(u.b)("Month.Gen"+d[r])).replace("MMM",Object(u.b)("Month.Short"+d[r])).replace("MM",String(r+1).padStart(2,"0")).replace("dd",String(n).padStart(2,"0")).replace("d",String(n)).replace("yyyy",String(e.getFullYear()))}function y(e){const t="number"==typeof e?new Date(e):e;return`${p(t,!0)}, ${l(t)}`}function v(e){const t=Math.floor(e/3600),n=Math.floor(e%3600/60),r=Math.floor(e%3600%60);let u="";return t>0?(u+=String(t).padStart(2,"0")+":",u+=String(n).padStart(2,"0")+":"):u+=String(n)+":",u+=String(r).padStart(2,"0"),u}function I(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 u=(e=Math.floor(e/60))%60;e-=u;const o=(e=Math.floor(e/60))%60;return o>0&&t.push(String(o).padStart(2,"0")),t.push(String(u).padStart(o>0?2:1,"0")),t.push(String(r).padStart(2,"0")),`${t.join(":")},${String(n).padStart(2,"0")}`}function w(e){return e.toLocaleString("en-US",{year:"numeric",month:"short",day:"numeric"})}function O(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 j(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||!O(t,n-1,r||void 0)?void 0:`${r?r+"-":""}${String(n).padStart(2,"0")}-${String(t).padStart(2,"0")}`}const u=e.split(" "),o=t?u[0]:u[1],d=(t?u[1]:u[0]).toLowerCase(),a=c.findIndex(e=>e.startsWith(d));return-1!==a&&O(Number(o),a)?`${String(a+1).padStart(2,"0")}-${String(o).padStart(2,"0")}`:void 0}function C(e){return e+r.j/1e3}function E(e){return`${e[0].toLowerCase()}${e.slice(1)}`}function S(e){return`${e[0].toUpperCase()}${e.slice(1)}`}},function(e,t,n){"use strict";var r=n(0);t.a=()=>{const[,e]=Object(r.r)(!1);return Object(r.m)(()=>{e(e=>!e)},[])}},function(e){e.exports=JSON.parse('{"--color-primary":["#50A2E9","#868DF5"],"--color-background":["#FFFFFF","#212121"],"--color-background-own":["#EEFEDF","#A45D37"],"--color-chat-hover":["#F4F4F5","#2C2C2C"],"--color-chat-active":["#ededed","#292929"],"--color-text":["#000000","#FFFFFF"],"--color-text-secondary":["#707579","#AAAAAA"],"--color-borders":["#DADCE0","#100F10"],"--color-borders-input":["#DADCE0","#5B5B5A"],"--color-links":["#52A1EF","#868DF6"],"--color-gray":["#C4C9CC","#808080"],"--color-default-shadow":["#72727240","#21212140"],"--color-light-shadow":["#7272722B","#00000040"],"--color-green":["#4DCD5E","#868DF5"],"--color-text-meta-colored":["#4DCD5E","#868DF5"],"--color-reply-own-hover":["#DBF4CE","#A26947"],"--color-reply-own-active":["#C8EBBC","#B0714C"],"--color-accent-own":["#4FAE4E","#FFFFFF"],"--color-message-meta-own":["#4FAE4E","#D9BDAD"],"--color-own-links":["#52A1EF","#FFFFFF"],"--color-code-own":["#3C7940","#FFFFFF"]}')},function(e,t,n){"use strict";var r=n(0),u=n(8),o=n(20),d=n(33);n(80);t.a=({ref:e,type:t="button",onClick:n,onContextMenu:c,onMouseDown:a,onMouseEnter:i,onMouseLeave:s,onFocus:f,children:l,size:b="default",color:h="primary",className:m,round:p,pill:g,fluid:y,isText:v,isLoading:I,ariaLabel:w,href:O,download:j,disabled:C,ripple:E,faded:S,tabIndex:M})=>{let A=Object(r.q)(null);e&&(A=e);const[k,T]=Object(r.r)(!1),N=Object(u.a)("Button",m,b,h,p&&"round",g&&"pill",y&&"fluid",C&&"disabled",v&&"text",I&&"loading",E&&"has-ripple",S&&"faded",k&&"clicked"),P=Object(r.m)(e=>{!C&&n&&n(e),T(!0),setTimeout(()=>{T(!1)},400)},[C,n]),D=Object(r.m)(e=>{e.preventDefault(),!C&&a&&a(e)},[a,C]);return O?r.a.createElement("a",{ref:A,className:N,href:O,title:w,download:j,tabIndex:M},l,!C&&E&&r.a.createElement(d.a,null)):r.a.createElement("button",{ref:A,type:t,className:N,onClick:P,onContextMenu:c,onMouseDown:D,onMouseEnter:i&&!C?i:void 0,onMouseLeave:s&&!C?s:void 0,onFocus:f&&!C?f:void 0,"aria-label":w,title:w,tabIndex:M},I?r.a.createElement("div",null,r.a.createElement("span",null,"Please wait.."),r.a.createElement(o.a,{color:v?"blue":"white"})):l,!C&&E&&r.a.createElement(d.a,null))}},function(e,t,n){"use strict";var r=n(0),u=n(8);n(83);t.a=e=>{const{icon:t,className:n,children:o,onClick:d,href:c,download:a,disabled:i,destructive:s,ariaLabel:f}=e,l=Object(r.m)(e=>{if(i||!d)return e.stopPropagation(),void e.preventDefault();d(e)},[i,d]),b=Object(r.m)(e=>{if(13===e.keyCode||32===e.keyCode)return i||!d?(e.stopPropagation(),void e.preventDefault()):void d(e)},[i,d]),h=Object(u.a)("MenuItem",n,i&&"disabled",s&&"destructive"),m=r.a.createElement(r.a.Fragment,null,t&&r.a.createElement("i",{className:"icon-"+t}),o);return c?r.a.createElement("a",{tabIndex:0,className:h,href:c,download:a,"aria-label":f,title:f,target:"_blank",rel:"noopener noreferrer"},m):r.a.createElement("div",{role:"button",tabIndex:0,className:h,onClick:l,onKeyDown:b,"aria-label":f,title:f},m)}},function(e,t,n){"use strict";var r=n(0),u=n(9);n(79);t.a=()=>{const[e,t]=Object(r.r)([]),n=Object(r.p)(()=>Object(u.a)(()=>{t([])},700,!1),[]),o=Object(r.m)(r=>{if(0!==r.button)return;const u=r.currentTarget,o=u.getBoundingClientRect(),d=u.offsetWidth/2;t([...e,{x:r.clientX-o.x-d/2,y:r.clientY-o.y-d/2,size:d}]),requestAnimationFrame(()=>{n()})},[e,n]);return r.a.createElement("div",{className:"ripple-container",onMouseDown:o},e.map(({x:e,y:t,size:n})=>r.a.createElement("span",{style:`left: ${e}px; top: ${t}px; width: ${n}px; height: ${n}px;`})))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return f})),n.d(t,"c",(function(){return l}));var r=n(73),u=n.n(r),o=n(7),d=n(14),c=n(9);let a,i;const s="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII=";async function f(e,t){for(b();!i.wasmReady;)await Object(c.e)(2e3);const{result:n,width:r,height:u}=await function(e,t){return new Promise(n=>{i.requests=i.requests||new Map,i.requests.set(e,n),i.postMessage({id:e,blob:t})})}(e,t);if(r&&u)return function({result:e,width:t,height:n}){a||(a=document.createElement("canvas"));return new Promise(r=>{const u=new ImageData(e,t,n);a.width=t,a.height=n;a.getContext("2d").putImageData(u,0,0),a.toBlob(e=>{r(null!=e?e:void 0)},"image/png",1)})}({result:n,width:r,height:u})}async function l(e,t){if(Object(o.o)()||"data:image/webp"!==t.substr(0,15))return t;b();const n=await f(e,Object(d.d)(t));if(!n)throw new Error("Can't convert webp to png. Url: "+t);return Object(d.a)(n)}function b(){i||(i=new u.a,i.wasmReady=!1,i.onmessage=h)}function h(e){const{id:t}=e.data;switch(e.data.type){case"initialized":i.wasmReady=!0;break;case"result":if(i.requests.has(t)){const n=i.requests.get(t);i.requests.delete(t),n(e.data)}}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return b}));var r=n(0),u=n(15),o=n(1),d=n(7),c=n(67),a=n(8),i=n(68),s=n(52);const f=/^[\d\wа-яё]$/i,l=/(\*\*|__).+?\1/g;function b(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 u.a.lastIndex=0,h(e,"big","jsx");case"emoji":return u.a.lastIndex=0,h(e,"small","jsx");case"emoji_html":return u.a.lastIndex=0,h(e,"small","html");case"br":return m(e,"jsx");case"br_html":return m(e,"html");case"highlight":return o=e,d=n.highlight,o.reduce((e,t)=>{if("string"!=typeof t||!d)return[...e,t];const n=t.toLowerCase(),u=n.indexOf(d.toLowerCase()),o=n[u+d.length];if(u<0||o&&o.match(f))return[...e,t];const c=[];return c.push(t.substring(0,u)),c.push(r.a.createElement("span",{className:"matching-text-highlight"},t.substring(u,u+d.length))),c.push(t.substring(u+d.length)),[...e,...c]},[]);case"links":return function(e){return e.reduce((e,t)=>{if("string"!=typeof t)return[...e,t];const n=[...t.match(p)||[],...t.match(g)||[]];if(!n.length)return[...e,t];const u=[];let o=n.shift(),d=0;for(;o;){const e=t.indexOf(o,d);u.push(t.substring(d,e)),o.startsWith("@")?u.push(r.a.createElement(i.a,{username:o},o)):u.push(r.a.createElement(s.a,{text:o,url:o})),d=e+o.length,o=n.shift()}return u.push(t.substring(d)),[...e,...u]},[])}(e);case"simple_markdown":return y(e,"jsx");case"simple_markdown_html":return y(e,"html")}var o,d;return e},[e])}function h(e,t,n){return d.c?e:e.reduce((e,o)=>{if("string"!=typeof o)return[...e,o];const d=o.split(u.a),i=o.match(u.a)||[];return e.push(d[0]),i.reduce((e,o,i)=>{const s=Object(c.a)(Object(u.b)(o)),f=Object(a.a)("emoji","small"===t&&"emoji-small");"jsx"===n&&e.push(r.a.createElement("img",{className:f,src:`./img-apple-${"big"===t?"160":"64"}/${s}.png`,alt:o})),"html"===n&&e.push(`${o}`);const l=2*i+2;return d[l]&&e.push(d[l]),e},e)},[])}function m(e,t){return e.reduce((e,n)=>"string"!=typeof n?[...e,n]:[...e,...n.split(/\r\n|\r|\n/g).reduce((e,n,u,o)=>{const d=n.trimLeft(),c=n.length-d.length;return e.push(String.fromCharCode(160).repeat(c)+d),u!==o.length-1&&e.push("jsx"===t?r.a.createElement("br",null):"
"),e},[])],[])}const p=new RegExp(o.W,"ig"),g=/@[\w\d_-]+/gi;function y(e,t){return e.reduce((e,n)=>{if("string"!=typeof n)return[...e,n];const u=n.split(l),o=n.match(l)||[];return e.push(u[0]),o.reduce((e,n,o)=>{"jsx"===t?e.push(n.startsWith("**")?r.a.createElement("b",null,n.replace(/\*\*/g,"")):r.a.createElement("i",null,n.replace(/__/g,""))):e.push(n.startsWith("**")?`${n.replace(/\*\*/g,"")}`:`${n.replace(/__/g,"")}`);const d=2*o+2;return u[d]&&e.push(u[d]),e},e)},[])}},function(e,t,n){"use strict";var r=n(0);t.a=(e=!1)=>{const[t,n]=Object(r.r)(e);return[t,Object(r.m)(()=>{n(!0)},[]),Object(r.m)(()=>{n(!1)},[])]}},function(e,t,n){"use strict";n.d(t,"q",(function(){return o})),n.d(t,"G",(function(){return d})),n.d(t,"r",(function(){return c})),n.d(t,"F",(function(){return a})),n.d(t,"K",(function(){return i})),n.d(t,"c",(function(){return s})),n.d(t,"I",(function(){return f})),n.d(t,"H",(function(){return l})),n.d(t,"L",(function(){return m})),n.d(t,"v",(function(){return y})),n.d(t,"d",(function(){return v})),n.d(t,"b",(function(){return I})),n.d(t,"J",(function(){return w})),n.d(t,"cb",(function(){return O})),n.d(t,"i",(function(){return j})),n.d(t,"j",(function(){return C})),n.d(t,"T",(function(){return E})),n.d(t,"bb",(function(){return S})),n.d(t,"f",(function(){return A})),n.d(t,"x",(function(){return k})),n.d(t,"ib",(function(){return T})),n.d(t,"jb",(function(){return N})),n.d(t,"t",(function(){return P})),n.d(t,"N",(function(){return D})),n.d(t,"M",(function(){return L})),n.d(t,"l",(function(){return x})),n.d(t,"E",(function(){return B})),n.d(t,"m",(function(){return R})),n.d(t,"gb",(function(){return F})),n.d(t,"fb",(function(){return U})),n.d(t,"O",(function(){return _})),n.d(t,"p",(function(){return G})),n.d(t,"hb",(function(){return $})),n.d(t,"n",(function(){return W})),n.d(t,"w",(function(){return H})),n.d(t,"lb",(function(){return K})),n.d(t,"mb",(function(){return V})),n.d(t,"e",(function(){return q})),n.d(t,"db",(function(){return J})),n.d(t,"k",(function(){return Y})),n.d(t,"P",(function(){return Z})),n.d(t,"Q",(function(){return X})),n.d(t,"S",(function(){return ee})),n.d(t,"R",(function(){return te})),n.d(t,"W",(function(){return ue})),n.d(t,"s",(function(){return oe})),n.d(t,"X",(function(){return de})),n.d(t,"V",(function(){return ae})),n.d(t,"U",(function(){return ie})),n.d(t,"Z",(function(){return fe})),n.d(t,"Y",(function(){return le})),n.d(t,"u",(function(){return be})),n.d(t,"ab",(function(){return he})),n.d(t,"a",(function(){return me})),n.d(t,"o",(function(){return pe})),n.d(t,"kb",(function(){return ge})),n.d(t,"eb",(function(){return ye})),n.d(t,"C",(function(){return ve})),n.d(t,"A",(function(){return Ie})),n.d(t,"y",(function(){return we})),n.d(t,"D",(function(){return Oe})),n.d(t,"z",(function(){return je})),n.d(t,"B",(function(){return Ce})),n.d(t,"g",(function(){return Ee})),n.d(t,"h",(function(){return Se}));var r=n(1),u=n(3);function o(e,t,n){return{...e,chats:{...e.chats,listIds:{...e.chats.listIds,[t]:n}}}}function d(e,t,n){const{[t]:r}=e.chats.listIds,u=r&&r.length?n.filter(e=>!r.includes(e)):n;return r&&!u.length?e:o(e,t,[...r||[],...u])}function c(e,t){return{...e,chats:{...e.chats,byId:t}}}function a(e,t,n){const{byId:r}=e.chats,o=r[t],d=n.isMin&&o&&!o.isMin,a={...o,...d?Object(u.j)(n,["isMin","accessHash"]):n};return a.id&&a.type?c(e,{...r,[t]:a}):e}function i(e,t){return Object.keys(t).forEach(n=>{e=a(e,Number(n),t[Number(n)])}),e}function s(e,t){const{byId:n}=e.chats;return Object.keys(t).map(Number).forEach(r=>{(!n[r]||n[r].isMin&&!t[r].isMin)&&(e=a(e,r,t[r]))}),e}function f(e,t,n){const u=n===r.g?"archived":"active";let o=e.chats.listIds;return Object.keys(o).forEach(e=>{const n=o[e]||[];e!==u||n.includes(t)?e!==u&&n.includes(t)&&(o={...o,[e]:n.filter(e=>e!==t)}):o={...o,[e]:[...n,t]}}),e=a(e={...e,chats:{...e.chats,listIds:o}},t,{folderId:n||void 0})}function l(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 b=n(5),h=n(6);function m(e,t,n=b.MAIN_THREAD_ID,r="thread"){return{...e,messages:{...e.messages,messageLists:t?[{chatId:t,threadId:n,type:r}]:void 0}}}function p(e,t,n){return g(e,t,{byId:n})}function g(e,t,n){const r=e.messages.byChatId[t]||{byId:{},threadsById:{}};return{...e,messages:{...e.messages,byChatId:{...e.messages.byChatId,[t]:{...r,...n}}}}}function y(e,t,n,r,u){return function(e,t,n,r){const u=e.messages.byChatId[t];return g(e,t,{threadsById:{...u&&u.threadsById,[n]:{...u&&u.threadsById[n],...r}}})}(e,t,n,{[r]:u})}function v(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=Object(h.m)(e,t);return r&&Object.keys(n).every(e=>Boolean(r[Number(e)]))?e:p(e,t,{...n,...r})}function w(e,t,n,r){const u=Object(h.m)(e,t)||{},o={...u[n],...r};return o.id?p(e,t,{...u,[n]:o}):e}function O(e,t,n,r){const u=Object(h.lb)(e,t)||{},o={...u[n],...r};return o.id?P(e,t,{...u,[n]:o},void 0):e}function j(e,t,n){const r=Object(h.m)(e,t);if(!r)return e;const o=Object.values(Object(u.m)(r,n)).filter(({forwardInfo:e})=>e&&e.isLinkedChannelPost),d=Object(u.j)(r,n);if(Object.keys(e.messages.byChatId[t].threadsById).map(Number).forEach(r=>{let u=Object(h.W)(e,t,r),o=Object(h.bb)(e,t,r),d=Object(h.Cb)(e,t,r),c=Object(h.eb)(e,t);n.forEach(e=>{u&&u.includes(e)&&(u=u.filter(t=>t!==e)),o&&o.includes(e)&&(o=o.filter(t=>t!==e)),d&&d.includes(e)&&(d=d.filter(t=>t!==e)),c&&c.includes(e)&&(c=c.filter(t=>t!==e))}),e=y(e,t,r,"listedIds",u),e=y(e,t,r,"outlyingIds",o),e=y(e,t,r,"viewportIds",d),e=y(e,t,r,"pinnedIds",c)}),o.length){const n=Object(h.x)(e),r=n&&n.chatId===t&&"thread"===n.type,u=n&&n.threadId;o.forEach(n=>{const{fromChatId:o,fromMessageId:d}=n.forwardInfo,c=Object(h.k)(e,o,d);r&&u===d&&(e=m(e,t)),c&&(e=w(e,o,d,{threadInfo:void 0}))})}return e=p(e,t,d)}function C(e,t,n){const r=Object(h.lb)(e,t);if(!r)return e;const o=Object(u.j)(r,n);let d=Object(h.jb)(e,t);return d&&(n.forEach(e=>{d.includes(e)&&(d=d.filter(t=>t!==e))}),e=y(e,t,b.MAIN_THREAD_ID,"scheduledIds",d)),e=P(e,t,o,void 0)}function E(e,t,n,r){const u=Object(h.W)(e,t,n),o=u&&u.length?r.filter(e=>!u.includes(e)):r;return u&&!o.length?e:y(e,t,n,"listedIds",M([...u||[],...o]))}function S(e,t,n,r){const u=Object(h.bb)(e,t,n),o=u&&u.length?r.filter(e=>!u.includes(e)):r;return u&&!o.length?e:y(e,t,n,"outlyingIds",M([...u||[],...o]))}function M(e){return e.sort((e,t)=>e-t)}function A(e,t,n,u){const o=Object(h.Cb)(e,t,n)||[];if(o.includes(u))return e;return y(e,t,n,"viewportIds",M([...o.length{e=T(e,t.chatId,t.threadId,t)}),e}function P(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 D(e,t,n,r=!1){return{...e,focusedMessage:{...e.focusedMessage,chatId:t,messageId:n,noHighlight:r}}}function L(e,t){return{...e,focusedMessage:{...e.focusedMessage,direction:t}}}function x(e,t,n){return{...e,selectedMessages:{chatId:t,messageIds:n?Array.prototype.concat([],n):[]}}}function B(e,t,n,r,o,d,c,a=!1){const{selectedMessages:i}=e;d&&(c=Object(h.Y)(e,t,d));const s=c||[o];if(!i)return x(e,t,s);const{messageIds:f}=i;let l;const b=s.filter(e=>!f.includes(e));if(b&&!b.length)l=f.filter(e=>!s.includes(e));else if(a&&f.length){const d=Object(h.w)(e,t,n,r),c=d.indexOf(f[f.length-1]),a=d.indexOf(o),i=Math.min(c,a),s=Math.max(c,a),b=d.slice(i,s+1);l=Object(u.o)([...f,...b])}else l=[...f,...b];return l.length?{...e,selectedMessages:{...i,messageIds:l}}:R(e)}function R(e){return{...e,selectedMessages:void 0}}function F(e,t,n,r,o){const d=r.map(t=>{const n=e.stickers.setsById[t.id];return n?{...n,...t}:t});return{...e,stickers:{...e.stickers,setsById:{...e.stickers.setsById,...Object(u.c)(d,"id")},[t]:{...e.stickers[t],hash:n,..."search"===t?{resultIds:o}:{setIds:r.map(({id:e})=>e)}}}}}function U(e,t,n){const r=e.stickers.setsById[t]||{};return{...e,stickers:{...e.stickers,setsById:{...e.stickers.setsById,[t]:{...r,...n}}}}}function _(e,t,n,r){const{results:u}=e.gifs.search;let o;if(t||!u)o=n;else{const e=new Set(u.map(e=>e.id));o=[...u,...n.filter(t=>!e.has(t.id))]}return{...e,gifs:{...e.gifs,search:{...e.gifs.search,offset:r,results:o}}}}function G(e,t){return{...e,animatedEmojis:t}}function $(e,t,n,r){const o=[...Object(h.tb)(e,t),...n||[]],d=Object(u.o)(o.map(({id:e})=>e)),c=Object(u.c)(o,"id"),a=d.map(e=>c[e]);return{...e,stickers:{...e.stickers,forEmoji:{emoji:t,stickers:a,hash:r}}}}function W(e){const{emoji:t,stickers:n,hash:r}=e.stickers.forEmoji||{};return t?$(e,t,n,r):e}var z=n(44);function H(e,t){return{...e,users:{...e.users,byId:t}}}function K(e,t,n){const{byId:r}=e.users,{hash:o,userIds:d}=e.contactList||{},c=r[t],a=n.isMin&&c&&!c.isMin,i={...c,...a?Object(u.j)(n,["isMin","accessHash"]):n};return i.id&&i.type?(i.isContact&&d&&!d.includes(t)&&(e={...e,contactList:{hash:o||0,userIds:[t,...d]}}),H(e,{...r,[t]:i})):e}function V(e,t){return Object.keys(t).map(Number).forEach(n=>{e=K(e,n,t[n])}),e}function q(e,t){const{byId:n}=e.users;return Object.keys(t).map(Number).forEach(r=>{(!n[r]||n[r].isMin&&!t[r].isMin)&&(e=K(e,r,t[r]))}),e}function J(e,t){return e.users.selectedId===t?e:{...e,users:{...e.users,selectedId:t}}}function Y(e,t){const{byId:n}=e.users,{hash:r,userIds:u}=e.contactList||{};return delete n[t],H(e={...e,contactList:{hash:r||0,userIds:u?u.filter(e=>e!==t):z.a}},n)}const Q=e=>`${e.chatId}_${e.id}`;function Z(e,t){return{...e,globalSearch:{...e.globalSearch,...t}}}function X(e,t){return Z(e,{currentContent:t})}function ee(e,t,n,r,o){const{resultsByType:d}=e.globalSearch||{},c=t.reduce((e,t)=>(e[Q(t)]=t,e),{}),a=d&&d[r]?d[r].foundIds:void 0;if(void 0!==a&&Object.keys(c).every(e=>a.includes(Q(c[e]))))return te(e,{messages:!1});const i=a||[],s=t.map(e=>Q(e)),f=Array.prototype.concat(i,s),l=Object(u.a)(i,f)?i:f;return Z(e=te(e,{messages:!1}),{resultsByType:{...(e.globalSearch||{}).resultsByType,[r]:{totalCount:n,nextOffsetId:o,foundIds:l}}})}function te(e,t){return Z(e,{fetchingStatus:{...e.globalSearch.fetchingStatus,...t}})}var ne=n(4);function re(e,t,n){return{...e,localTextSearch:{byChatThreadKey:{...e.localTextSearch.byChatThreadKey,[t]:n}}}}function ue(e,t,n,r,u){const o=Object(ne.a)(t,n);return re(e,o,{...e.localTextSearch.byChatThreadKey[o],isActive:r,query:u})}function oe(e,t,n,r,u,o){const d=Object(ne.a)(t,n);return re(e,d,{...e.localTextSearch.byChatThreadKey[d],results:{foundIds:r,totalCount:u,nextOffsetId:o}})}function de(e,t,n,r,o,d){const c=Object(ne.a)(t,n),{results:a}=e.localTextSearch.byChatThreadKey[c]||{},i=a&&a.foundIds||[],s=se(Object(u.o)(Array.prototype.concat(i,r)));return oe(e,t,n,Object(u.a)(i,s)?i:s,o,d)}function ce(e,t,n){return{...e,localMediaSearch:{byChatId:{...e.localMediaSearch.byChatId,[t]:n}}}}function ae(e,t,n){return ce(e,t,{...e.localMediaSearch.byChatId[t],currentType:n})}function ie(e,t,n,r,o,d){const{resultsByType:c}=e.localMediaSearch.byChatId[t]||{},a=c&&c[n]?c[n].foundIds:[],i=se(Object(u.o)(Array.prototype.concat(a,r)));return function(e,t,n,r,u,o){return ce(e,t,{...e.localMediaSearch.byChatId[t],resultsByType:{...(e.localMediaSearch.byChatId[t]||{}).resultsByType,[n]:{foundIds:r,totalCount:u,nextOffsetId:o}}})}(e,t,n,Object(u.a)(a,i)?a:i,o,d)}function se(e){return e.sort((e,t)=>e-t)}function fe(e,t){return{...e,management:{...e.management,progress:t}}}function le(e,t,n){return{...e,management:{...e.management,byChatId:{...e.management.byChatId,[t]:{...e.management.byChatId[t]||{},...n}}}}}function be(e,t){return{...e,settings:{...e.settings,byKey:{...e.settings.byKey,...t}}}}function he(e,t,n,r){switch(t){case"contact":return be(e,{...void 0!==n&&{hasPrivateChatsNotifications:!n},...void 0!==r&&{hasPrivateChatsMessagePreview:r}});case"group":return be(e,{...void 0!==n&&{hasGroupNotifications:!n},...void 0!==r&&{hasGroupMessagePreview:r}});case"broadcast":return be(e,{...void 0!==n&&{hasBroadcastNotifications:!n},...void 0!==r&&{hasBroadcastMessagePreview:r}});default:return}}function me(e,t){return{...e,blocked:{...e.blocked,ids:[t,...e.blocked.ids],totalCount:e.blocked.totalCount+1}}}function pe(e,t){return{...e,blocked:{...e.blocked,ids:e.blocked.ids.filter(e=>e!==t),totalCount:e.blocked.totalCount-1}}}function ge(e,t){return{...e,twoFaSettings:{...e.twoFaSettings,...t}}}function ye(e,t){return{...e,payment:{...e.payment,shippingOptions:t}}}function ve(e,t){return{...e,payment:{...e.payment,formId:t}}}function Ie(e,t){return{...e,payment:{...e.payment,step:t}}}function we(e,t){if(!t.content||!t.content.invoice)return e;const{title:n,text:r,description:u,photoUrl:o}=t.content.invoice;return{...e,payment:{...e.payment,invoiceContent:{title:n,text:r,description:u,photoUrl:o}}}}function Oe(e,t){return{...e,payment:{...e.payment,stripeCredentials:{...t}}}}function je(e,t){return{...e,payment:{...e.payment,...t}}}function Ce(e,t,n){if(!t||!n)return{...e,payment:{...e.payment,receipt:void 0}};const{invoice:r}=n.content,{photoUrl:u,text:o,title:d}=r||{};return{...e,payment:{...e.payment,receipt:{...t,photoUrl:u,text:o,title:d}}}}function Ee(e){return{...e,payment:{}}}function Se(e){return{...e,payment:{...e.payment,isPaymentModalOpen:!1}}}},function(e,t,n){"use strict";var r=n(0);t.a=function(e,t){const n=Object(r.q)(),{current:u}=n;return t&&void 0===e||(n.current=e),u}},function(e,t,n){"use strict";var r=n(0),u=n(8);t.a=Object(r.h)(({ref:e,id:t,className:n,value:o,label:d,error:c,success:a,disabled:i,readOnly:s,placeholder:f,autoComplete:l,inputMode:b,maxLength:h,onChange:m,onInput:p,onKeyPress:g,onKeyDown:y,onBlur:v})=>{const I=c||a||d,w=Object(u.a)("input-group",o&&"touched",c?"error":a&&"success",i&&"disabled",s&&"disabled",I&&"with-label",n);return r.a.createElement("div",{className:w},r.a.createElement("input",{ref:e,className:"form-control",type:"text",id:t,value:o||"",placeholder:f,maxLength:h,autoComplete:l,inputMode:b,disabled:i,readOnly:s,onChange:m,onInput:p,onKeyPress:g,onKeyDown:y,onBlur:v}),I&&r.a.createElement("label",{htmlFor:t},I))})},function(e,t,n){"use strict";var r=n(0),u=n(8),o=n(20);n(85);t.a=Object(r.h)(({id:e,name:t,value:n,label:d,subLabel:c,checked:a,disabled:i,round:s,blocking:f,isLoading:l,onChange:b,onCheck:h})=>{const m=Object(r.m)(e=>{b&&b(e),h&&h(e.currentTarget.checked)},[b,h]),p=Object(u.a)("Checkbox",i&&"disabled",s&&"round",l&&"loading",f&&"blocking");return r.a.createElement("label",{className:p},r.a.createElement("input",{type:"checkbox",id:e,name:t,value:n,checked:a,disabled:i,onChange:m}),r.a.createElement("div",{className:"Checkbox-main"},r.a.createElement("span",{className:"label"},d),c&&r.a.createElement("span",{className:"subLabel"},c)),l&&r.a.createElement(o.a,null))})},function(e,t,n){"use strict";n.d(t,"g",(function(){return r})),n.d(t,"f",(function(){return u})),n.d(t,"B",(function(){return o})),n.d(t,"i",(function(){return d})),n.d(t,"h",(function(){return c})),n.d(t,"r",(function(){return a})),n.d(t,"v",(function(){return i})),n.d(t,"s",(function(){return s})),n.d(t,"t",(function(){return f})),n.d(t,"u",(function(){return l})),n.d(t,"q",(function(){return b})),n.d(t,"e",(function(){return h})),n.d(t,"b",(function(){return m})),n.d(t,"c",(function(){return p})),n.d(t,"d",(function(){return g})),n.d(t,"E",(function(){return y})),n.d(t,"F",(function(){return v})),n.d(t,"G",(function(){return I})),n.d(t,"l",(function(){return w})),n.d(t,"n",(function(){return O})),n.d(t,"m",(function(){return j})),n.d(t,"k",(function(){return C})),n.d(t,"o",(function(){return E})),n.d(t,"J",(function(){return S})),n.d(t,"H",(function(){return M})),n.d(t,"I",(function(){return A})),n.d(t,"p",(function(){return k})),n.d(t,"C",(function(){return T})),n.d(t,"D",(function(){return N})),n.d(t,"j",(function(){return P})),n.d(t,"A",(function(){return D})),n.d(t,"z",(function(){return L})),n.d(t,"x",(function(){return x})),n.d(t,"y",(function(){return B})),n.d(t,"w",(function(){return R})),n.d(t,"a",(function(){return F}));const r=window.devicePixelRatio||1,u={begin:.8,end:1},o=300,d=500,c=10,a=320,i=15,s=2,f=.45,l=10,b=.5,h=20,m="300 10px Helvetica, Arial, sans-serif",p=45,g=50,y=30,v=1,I=.1,w=40,O=10,j=1,C=8,E=4,S=o,M=.1,A=.5,k=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],T=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],N=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],P=864e5,D=200,L=4,x=1e3,B=1,R=.5,F=["begin 200 fast","end 200 fast","labelFromIndex 200 fast floor","labelToIndex 200 fast ceil","xAxisScale 400","yMinViewport","yMaxViewport","yMinViewportSecond","yMaxViewportSecond","yMinMinimap","yMaxMinimap","yMinMinimapSecond","yMaxMinimapSecond","yAxisScale","yAxisScaleSecond"]},function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(50);function u(e){return Object(r.a)({onEsc:e})}},function(e,t,n){"use strict";n.d(t,"b",(function(){return d}));var r=n(0);let u,o=!1;const d=e=>{document.dispatchEvent(new Event("tt-event-heavy-animation-start")),o=!0,u&&(clearTimeout(u),u=void 0),u=window.setTimeout(()=>{o=!1,document.dispatchEvent(new Event("tt-event-heavy-animation-end")),u=void 0},e)};t.a=(e,t)=>{Object(r.n)(()=>(o&&e(),document.addEventListener("tt-event-heavy-animation-start",e),document.addEventListener("tt-event-heavy-animation-end",t),()=>{document.removeEventListener("tt-event-heavy-animation-end",t),document.removeEventListener("tt-event-heavy-animation-start",e)}),[t,e])}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));const r=[]},function(e,t,n){"use strict";function r(e){return String(e).replace(/\d(?=(\d{3})+$)/g,"$& ")}function u(e){return".0"===String(e.toFixed(1)).substr(-2)?Math.round(e):e.toFixed(1).replace(".",",")}function o(e){return e<1e3?e:e<1e6?u(e/1e3)+"K":u(e/1e6)+"M"}function d(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,"a",(function(){return r})),n.d(t,"b",(function(){return o})),n.d(t,"c",(function(){return d}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));const r=/[^\wа-яё]+/;function u(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)))}},function(e,t,n){"use strict";var r=n(0),u=n(27),o=n(69),d=n(51),c=n(42),a=n(8),i=n(43);n(81);t.a=({ref:e,containerRef:t,isOpen:n,className:s,style:f,children:l,positionX:b="left",positionY:h="top",autoClose:m=!1,footer:p,noCloseOnBackdrop:g=!1,onCloseAnimationEnd:y,onClose:v,onMouseEnter:I,onMouseLeave:w})=>{let O=Object(r.q)(null);e&&(O=e);const j=t||O,{transitionClassNames:C}=Object(u.a)(n,y);Object(r.n)(()=>n&&v?Object(c.a)(v):void 0,[n,v]),Object(d.a)(([e])=>{void 0!==e&&Object(i.b)(200)},[n]);const E=((e,t,n)=>{const[u,o]=Object(r.r)(-1);Object(r.n)(()=>{o(-1)},[t]);return Object(r.m)(t=>{const r=e.current;if(!r)return;if(13===t.keyCode&&n)return void n();if(38!==t.keyCode&&40!==t.keyCode)return;const d=document.activeElement,c=Array.from(r.children);let a=d&&c.indexOf(d)||u;if(38===t.keyCode&&a>0)a--;else if(40===t.keyCode&&a{const n=new Uint8Array(t);let r=new s.a,u=new l.a;r.onmessage=e=>{null===e.data?u.postMessage({command:"done"}):u.postMessage({command:"encode",buffers:e.data},e.data.map(({buffer:e})=>e))},u.onmessage=t=>{"page"===t.data.message&&(e(new Blob([t.data.page],{type:"audio/wav"})),r.terminate(),r=void 0,u.terminate(),u=void 0)},u.postMessage({command:"init",wavBitDepth:16,wavSampleRate:48e3}),r.postMessage({command:"init",decoderSampleRate:48e3,outputBufferSampleRate:48e3}),r.postMessage({command:"decode",pages:n},[n.buffer])})}var h=n(34);const m={[r.ApiMediaFormat.DataUri]:d.a.Text,[r.ApiMediaFormat.BlobUrl]:d.a.Blob,[r.ApiMediaFormat.Lottie]:d.a.Json,[r.ApiMediaFormat.Progressive]:void 0,[r.ApiMediaFormat.Stream]:void 0},p=new Map,g=new Map;function y(e,t,n){if(t===r.ApiMediaFormat.Progressive)return a.h?function(e){const t="./progressive/"+e;return p.set(e,t),Promise.resolve(t)}(e):y(e,r.ApiMediaFormat.BlobUrl,n);if(!g.has(e)){const i=async function(e,t,n){if(!u.G){const n=e.startsWith("avatar")?u.I:u.H,r=await d.c(n,e,m[t]);if(r){let t=r;if("audio/ogg"!==r.type||a.g||(t=await b(t)),"image/webp"===r.type&&!Object(a.o)()&&t){const n=await Object(h.b)(e,t);n&&(t=n)}const n=w(t);return p.set(e,n),n}}if(t===r.ApiMediaFormat.Stream){const r=new MediaSource,u=URL.createObjectURL(r);let d=!1;return r.addEventListener("sourceopen",()=>{if(d)return;d=!0;const u=r.addSourceBuffer("audio/mpeg");Object(o.a)("downloadMedia",{url:e,mediaFormat:t},(e,t)=>{n&&n(e),1===e&&r.endOfStream(),t&&u.appendBuffer(t)})}),p.set(e,u),u}const i=await Object(o.a)("downloadMedia",{url:e,mediaFormat:t},n);if(!i)throw new Error("Failed to fetch media");let{prepared:s,mimeType:f}=i;if("audio/ogg"===f&&!a.g){const e=await Object(c.e)(s);URL.revokeObjectURL(s);const t=await b(e);s=w(t),f=e.type}if("image/webp"===f&&!Object(a.o)()){const t=await Object(c.e)(s);URL.revokeObjectURL(s);const n=await Object(h.b)(e,t);n&&(s=w(n),f=t.type)}return p.set(e,s),s}(e,t,n).catch(e=>{u.m&&console.warn(e)}).finally(()=>{g.delete(e)});g.set(e,i)}return g.get(e)}function v(e){return p.get(e)}function I(e){Object(o.b)(e)}function w(e){return e instanceof Blob?URL.createObjectURL(e):e}a.h&&navigator.serviceWorker.addEventListener("message",async e=>{const{type:t,messageId:n,params:u}=e.data;if("requestPart"!==t)return;const d=await Object(o.a)("downloadMedia",{mediaFormat:r.ApiMediaFormat.Progressive,...u});if(!d)return;const{arrayBuffer:c,mimeType:a,fullSize:i}=d;navigator.serviceWorker.controller.postMessage({type:"partResponse",messageId:n,result:{arrayBuffer:c,mimeType:a,fullSize:i}},[c])})},function(e,t,n){"use strict";n.d(t,"b",(function(){return o}));var r=n(9);let u=o();function o(){const e=.01*window.innerHeight;return document.documentElement.style.setProperty("--vh",e+"px"),{width:window.innerWidth,height:window.innerHeight}}const d=Object(r.g)(()=>{u=o()},250,!0);window.addEventListener("resize",d),window.addEventListener("orientationchange",d),t.a={get:()=>u}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));const r={Enter:"onEnter",Backspace:"onBackspace",Delete:"onDelete",Esc:"onEsc",Escape:"onEsc",ArrowUp:"onUp",ArrowDown:"onDown",Tab:"onTab"},u={onEnter:[],onDelete:[],onBackspace:[],onEsc:[],onUp:[],onDown:[],onTab:[]};function o(e){return d()||document.addEventListener("keydown",c,!0),Object.keys(e).forEach(t=>{const n=e[t];if(!n)return;const r=u[t];r&&r.push(n)}),()=>{!function(e){Object.keys(e).forEach(t=>{const n=e[t],r=u[t];if(r){const e=r.findIndex(e=>e===n);-1!==e&&r.splice(e,1)}}),d()||document.removeEventListener("keydown",c,!1)}(e)}}function d(){return Object.values(u).some(e=>Boolean(e.length))}function c(e){const t=r[e.key];if(!t)return;const{length:n}=u[t];if(!n)return;e.stopPropagation();(0,u[t][n-1])(e)}},function(e,t,n){"use strict";var r=n(0),u=n(38);t.a=(e,t)=>{const n=Object(u.a)(t);return Object(r.n)(()=>e(n||[]),t)}},function(e,t,n){"use strict";var r=n(0),u=n(2);const o=e=>{const t=[];let n=0;const r=e.length;let u;for(;n65535&&(u-=65536,t.push(String.fromCharCode(u>>>10&1023|55296)),u=56320|1023&u),t.push(String.fromCharCode(u))}return t.join("")};function d(e,t,n){let r;for(e=n?Math.floor(e/700):e>>1,e+=Math.floor(e/t),r=0;e>455;r+=36)e=Math.floor(e/35);return Math.floor(r+36*e/(e+38))}function c(e,t){const n=[],r=[],u=e.length;let c,a,i,s,f,l,b,h,m,p,g,y,v;for(c=128,i=0,s=72,f=e.lastIndexOf("-"),f<0&&(f=0),l=0;l=128)throw new RangeError("Illegal input >= 0x80");n.push(e.charCodeAt(l))}for(b=f>0?f+1:0;b=u)throw RangeError("punycode_bad_input(1)");if(g=(I=e.charCodeAt(b++))-48<10?I-22:I-65<26?I-65:I-97<26?I-97:36,g>=36)throw RangeError("punycode_bad_input(2)");if(g>Math.floor((2147483647-i)/m))throw RangeError("punycode_overflow(1)");if(i+=g*m,y=p<=s?1:p>=s+26?26:p-s,gMath.floor(2147483647/(36-y)))throw RangeError("punycode_overflow(2)");m*=36-y}if(a=n.length+1,s=d(i-h,a,0===h),Math.floor(i/a)>2147483647-c)throw RangeError("punycode_overflow(3)");c+=Math.floor(i/a),i%=a,t&&r.splice(i,0,e.charCodeAt(b-1)-65<26),n.splice(i,0,c),i++}var I;if(t)for(i=0,v=n.length;iObject(s.l)(t,["openTelegramLink"]))(({url:e,text:t,className:n,children:u,openTelegramLink:o})=>{const d=Object(r.m)(t=>!(!(t.ctrlKey||t.altKey||t.shiftKey||t.metaKey)&&e&&e.match(i.X))||(t.preventDefault(),o({url:e}),!1),[o,e]);if(!e)return;const c=Object(f.a)(n||"text-entity-link",t.length>50&&"long-word-break-all");return r.a.createElement("a",{href:l(e),title:b(e),target:"_blank",rel:"noopener noreferrer",className:c,onClick:d},u||t)}))},function(e,t,n){"use strict";n.d(t,"e",(function(){return r})),n.d(t,"b",(function(){return u})),n.d(t,"d",(function(){return o})),n.d(t,"a",(function(){return d})),n.d(t,"c",(function(){return c}));function r(e){return e>536870912?(e/1073741824).toFixed(1)+" GB":e>524288?(e/1048576).toFixed(1)+" MB":(e/1024).toFixed(1)+" KB"}function u(e){const{fileName:t,mimeType:n}=e;return o(t,n)}function o(e,t){return e&&-1!==e.indexOf(".")?e.split(".").pop():t.split("/").pop()}function d(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 c(e){return Boolean(e.previewBlobUrl||e.thumbnail)}},function(e,t,n){"use strict";n.d(t,"b",(function(){return u})),n.d(t,"a",(function(){return d}));const r={missing_payment_information:{field:"cardNumber",fieldError:"Incorrect card number"},invalid_number:{field:"cardNumber",fieldError:"Incorrect card number"},number:{field:"cardNumber",fieldError:"Incorrect card number"},exp_year:{field:"expiry",fieldError:"Incorrect year"},exp_month:{field:"expiry",fieldError:"Incorrect month"},invalid_expiry_year:{field:"expiry",fieldError:"Incorrect year"},invalid_expiry_month:{field:"expiry",fieldError:"Incorrect month"},cvc:{field:"cvv",fieldError:"Incorrect CVV"},invalid_cvc:{field:"cvv",fieldError:"Incorrect CVV"}};function u(e){const{message:t,code:n,param:u}=e,{field:o,fieldError:d,description:c}=u?r[u]:r[n];return{field:o,fieldError:d,description:c||t}}const o={ADDRESS_STREET_LINE1_INVALID:{field:"streetLine1",fieldError:"Incorrect street address"},ADDRESS_STREET_LINE2_INVALID:{field:"streetLine2",fieldError:"Incorrect street address"},ADDRESS_CITY_INVALID:{field:"city",fieldError:"Incorrect city"},ADDRESS_COUNTRY_INVALID:{field:"countryIso2",fieldError:"Incorrect country"},ADDRESS_POSTCODE_INVALID:{field:"postCode",fieldError:"Incorrect post code"},ADDRESS_STATE_INVALID:{field:"state",fieldError:"Incorrect state"},REQ_INFO_NAME_INVALID:{field:"fullName",fieldError:"Incorrect name"},REQ_INFO_PHONE_INVALID:{field:"phone",fieldError:"Incorrect phone"},REQ_INFO_EMAIL_INVALID:{field:"email",fieldError:"Incorrect email"}};function d(e){return Object.values(e).reduce((e,t)=>{const n=o[t.message];return n&&(e={...e,[n.field]:n.fieldError}),e},{})}},function(e,t,n){"use strict";n.d(t,"b",(function(){return o})),n.d(t,"a",(function(){return d}));var r=n(9);let u;function o(e,t){t||(u&&!u.isCancelled&&(u.isCancelled=!0),u=t={isCancelled:!1}),Object(r.b)(()=>{!t.isCancelled&&e()&&o(e,t)})}function d(e){Object(r.b)(()=>{e()&&d(e)})}},function(e,t,n){"use strict";var r=n(0),u=n(47);n(82);t.a=({trigger:e,className:t,children:n,positionX:o="left",positionY:d="top",footer:c})=>{const a=Object(r.q)(null),i=Object(r.q)(null),[s,f]=Object(r.r)(!1);return r.a.createElement("div",{ref:i,className:"DropdownMenu "+(t||""),onKeyDown:e=>{const t=a.current;if(!s||40!==e.keyCode||!t)return;const n=document.activeElement,r=Array.from(t.children);n&&-1!==r.indexOf(n)||r[0].focus()}},e({onTrigger:()=>{f(!s)},isOpen:s}),r.a.createElement(u.a,{ref:a,containerRef:i,isOpen:s,className:t||"",positionX:o,positionY:d,footer:c,autoClose:!0,onClose:()=>{f(!1)}},n))}},function(e,t,n){"use strict";var r=n(0),u=n(22),o=n(1),d=n(26);const c=new Set(["key","ref","teactFastList","teactOrderKey"]),a={autoPlay:"autoplay",autoComplete:"autocomplete"},i={};function s(e,t,n,u,d,{skipComponentUpdate:c=!1,forceIndex:a=!1,fragment:i,moveDirection:g}={}){if(!c&&t&&n&&Object(r.d)(t)&&Object(r.d)(n)&&!Object(r.c)(t,n)&&(n=function(e,t){return e.componentInstance.props=t.componentInstance.props,Object(r.j)(e.componentInstance)}(t,n)),!c&&n&&Object(r.d)(n)&&n.componentInstance.isMounted&&l(n,u,d,e),t===n)return n;if(!t&&n){Object(r.d)(n)&&(n=f(n,u,d,e));const t=b(n);Object(r.k)(n,t),a&&e.childNodes[d]?e.insertBefore(t,e.childNodes[d]):(i||e).appendChild(t)}else if(t&&!n)e.removeChild(Object(r.b)(t)),Object(r.l)(t);else if(t&&n)if(Object(r.c)(t,n)){Object(r.d)(n)&&(n=f(n,u,d,e));const o=b(n);Object(r.k)(n,o),e.replaceChild(o,Object(r.b)(t)),Object(r.l)(t)}else{const u=Object(r.d)(t)&&Object(r.d)(n);if(u||Object(r.k)(n,Object(r.b)(t)),Object(r.f)(t)&&Object(r.f)(n)){if(g){const n=Object(r.b)(t),u=e.childNodes["up"===g?d:d+1];u?e.insertBefore(n,u):(i||e).appendChild(n)}u||function(e,t,n){const r=Object.keys(e.props),u=Object.keys(t.props);r.forEach(r=>{void 0!==e.props[r]&&void 0===t.props[r]&&p(n,r,e.props[r])}),u.forEach(r=>{void 0!==t.props[r]&&e.props[r]!==t.props[r]&&(void 0===e.props[r]?m(n,r,t.props[r]):function(e,t,n,r){"value"===t?e.value=void 0!==r?r:"":(p(e,t,n),m(e,t,r))}(n,r,e.props[r],t.props[r]))})}(t,n,Object(r.b)(t)),n.children=function(e,t,n){if(t.props.teactFastList)return function(e,t,n){const u=new Set(t.children.map(e=>{const t="props"in e&&e.props.key;return o.m&&Object(r.f)(e)&&!t&&console.warn("Missing `key` in `teactFastList`"),t}));let d=0;const c=e.children.reduce((e,r,o)=>{let c="props"in r?r.props.key:void 0;if(c&&!u.has(c))return s(n,r,void 0,t,-1),e;if(!c){const u=t.children[o],d=u&&"props"in u?u.props.key:void 0;if(!u||d)return s(n,r,void 0,t,-1),e;c="__indexKey#"+o}return e[c]={$element:r,index:d++,order:"props"in r?r.props.teactOrderKey:void 0},e},{});let a,i,f=[],l=0;t.children.forEach((e,r)=>{const u="props"in e?e.props.key:"__indexKey#"+r,o=c[u];if(!o)return a||(a=[],i=r),void a.push(e);a&&(f=f.concat(h(a,i,n,t)),i=void 0,a=void 0);const d="props"in e?e.props.teactOrderKey:void 0,b=o.index!==l&&o.order!==d,m=b&&l>o.index;b&&!m||l++,f.push(s(n,o.$element,e,t,r,{forceIndex:!0,...b&&{moveDirection:m?"down":"up"}}))}),a&&(f=f.concat(h(a,i,n,t)));return f}(e,t,n);const u=Math.max(e.children.length,t.children.length),d=[],c=t.children.length>e.children.length+1?document.createDocumentFragment():void 0;for(let r=0;r=e.children.length?{fragment:c}:void 0);u&&d.push(u)}c&&n.appendChild(c);return d}(t,n,u?e:Object(r.b)(t))}}return n}function f(e,t,n,u){if(!Object(r.d)(e))return e;const{componentInstance:o}=e;if(!o.isMounted){l(e=Object(r.i)(o),t,n,u);const d=e.children[0];Object(r.d)(d)&&(e.children=[f(d,e,0,u)]),o.isMounted=!0}return e}function l(e,t,n,r){const{componentInstance:u}=e;u.onUpdate=()=>{t.children[n]=s(r,t.children[n],u.$element,t,n,{skipComponentUpdate:!0})}}function b(e){if(Object(r.e)(e))return document.createTextNode("");if(Object(r.g)(e))return document.createTextNode(e.value);if(Object(r.d)(e))return b(e.children[0]);const{tag:t,props:n,children:u=[]}=e,o=document.createElement(t);return"object"==typeof n.ref&&(n.ref.current=o),Object.keys(n).forEach(e=>{m(o,e,n[e])}),e.children=u.map((t,n)=>s(o,void 0,t,e,n)),o}function h(e,t,n,r){if(1===e.length)return[s(n,void 0,e[0],r,t,{forceIndex:!0})];if(e.length>1){const u=document.createDocumentFragment(),o=e.map(e=>s(n,void 0,e,r,t,{fragment:u}));return n.childNodes[t]?n.insertBefore(u,n.childNodes[t]):n.appendChild(u),o}throw new Error("Unexpected input")}function m(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")?Object(d.a)(e,t,n):t.startsWith("data-")?e.setAttribute(t,n):c.has(t)||(e[a[t]||t]=n))}function p(e,t,n){"className"===t?e.className="":"value"===t?e.value="":"style"===t?e.style.cssText="":t.startsWith("on")?Object(d.c)(e,t,n):t.startsWith("data-")?e.removeAttribute(t):c.has(t)||delete e[a[t]||t]}t.a={render:function(e,t){if(!t)return;let n=t.getAttribute("data-teact-head-id");n||(n=Object(u.a)(i),i[n]={children:[]},t.setAttribute("data-teact-head-id",n));const r=i[n];r.children=[s(t,r.children[0],e,r,0)]}}},function(e,t,n){"use strict";var r=n(15);const u=new RegExp(`^(?:${r.a.source})+$`,"");t.a=e=>{if(e.length>24)return!1;if(!Boolean(e.match(u)))return!1;let t=0;for(;r.a.exec(e);)if(t++,t>3)return r.a.lastIndex=0,!1;return t}},function(e,t){},function(e,t){},function(e,t,n){"use strict";let r;n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return u})),n.d(t,"c",(function(){return o})),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 u=-1,o="MESSAGE_DELETED"},function(e,t){},function(e,t,n){"use strict";let r;n.d(t,"a",(function(){return 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={}))},function(e,t){},function(e,t){},function(e,t,n){"use strict";var r=n(55),u=n(30);let o=!1;const d=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?$/i,c=(e,t,n)=>(1-n)*e+n*t,a=Object.keys(u).map(e=>({property:e,colors:[i(u[e][0]),i(u[e][1])]}));function i(e){const t=d.exec(e);return{r:parseInt(t[1],16),g:parseInt(t[2],16),b:parseInt(t[3],16),a:t[4]?parseInt(t[4],16):void 0}}function s(e,t,n=1){a.forEach(({property:r,colors:u})=>{const o=Math.round(c(u[e].r,u[t].r,n)),d=Math.round(c(u[e].g,u[t].g,n)),a=Math.round(c(u[e].b,u[t].b,n)),i=u[e].a&&Math.round(c(u[e].a,u[t].a,n));document.documentElement.style.setProperty(r,i?`rgba(${o},${d},${a},${i/255})`:`rgb(${o},${d},${a})`)})}t.a=(e,t)=>{const n=o&&t,u="dark"===e?0:1,d="dark"===e?1:0,c=Date.now();document.documentElement.classList.remove("theme-"+("dark"===e?"light":"dark")),o&&document.documentElement.classList.add("disable-animations"),document.documentElement.classList.add("theme-"+e),setTimeout(()=>{document.documentElement.classList.remove("disable-animations")},500),o=!0,n?Object(r.b)(()=>{const e=Math.min((Date.now()-c)/200,1);return s(u,d,function(e){return 1-(1-e)**3.5}(e)),e<1}):s(u,d)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return d}));const r=["female_sign","male_sign","medical_symbol"];function u(e){const t=e.split("-").map(e=>parseInt(e,16));return String.fromCodePoint(...t)}function o(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 d(e){const t={categories:[],emojis:{}};for(let n=0;n({userOrChat:t?Object(d.Bb)(e,t):void 0}),(e,t)=>Object(o.l)(t,["openChat","openChatByUsername"]))(({username:e,userOrChat:t,children:n,openChat:u,openChatByUsername:o})=>r.a.createElement("a",{onClick:()=>{t?u({id:t.id}):e&&o({username:e.substring(1)})},className:"text-entity-link"},n))},function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(0);function u(e,t,n){Object(r.n)(()=>{const r=e=>{const r=t.current,u=e.target;r&&u&&(r.contains(e.target)&&!u.classList.contains("backdrop")||(e.preventDefault(),e.stopPropagation(),n&&n()))};return e&&n&&document.addEventListener("mousedown",r),()=>{document.removeEventListener("mousedown",r)}},[e,t,n])}},function(e,t,n){e.exports=function(){return new Worker(n.p+"ac9bd12fa11f2e2e69fe.worker.js")}},function(e,t,n){e.exports=function(){return new Worker(n.p+"01705582fc3eca0e007b.worker.js")}},function(e,t,n){e.exports=function(){return new Worker(n.p+"0dbbe0a906f6c2adf071.worker.js")}},function(e,t,n){e.exports=function(){return new Worker(n.p+"a66075669d8d0ac2d740.worker.js")}},function(e,t,n){"use strict";var r=n(2),u=n(7),o=n(10),d=n(66);Object(r.b)("init",e=>{const{theme:t,animationLevel:n,messageTextSize:r,language:c}=e.settings.byKey;Object(o.c)(c),document.documentElement.style.setProperty("--message-text-size",r+"px"),document.body.classList.add("initial"),document.body.classList.add("animation-level-"+n),document.body.classList.add(u.k?"is-touch-env":"is-pointer-env"),Object(d.a)(t,n>0),u.i&&document.body.classList.add("is-safari"),u.d?document.body.classList.add("is-ios"):u.b&&document.body.classList.add("is-android")}),Object(r.b)("setIsUiReady",(e,t,n)=>{const{uiReadyState:r}=n;return 2===r&&document.body.classList.remove("initial"),{...e,uiReadyState:r}}),Object(r.b)("setAuthPhoneNumber",(e,t,n)=>{const{phoneNumber:r}=n;return{...e,authPhoneNumber:r}}),Object(r.b)("setAuthRememberMe",(e,t,n)=>({...e,authRememberMe:Boolean(n)})),Object(r.b)("clearAuthError",e=>({...e,authError:void 0}))},function(e,t,n){"use strict";var r=n(2),u=n(1),o=n(11);Object(r.b)("initApi",(e,t)=>{const n=localStorage.getItem(u.y)||void 0;return Object(o.c)(t.apiUpdate,n),{...e,authIsSessionRemembered:Boolean(n)}}),Object(r.b)("setAuthPhoneNumber",(e,t,n)=>{const{phoneNumber:r}=n;return Object(o.a)("provideAuthPhoneNumber",r),{...e,authIsLoading:!0,authError:void 0}}),Object(r.b)("setAuthCode",(e,t,n)=>{const{code:r}=n;return Object(o.a)("provideAuthCode",r),{...e,authIsLoading:!0,authError:void 0}}),Object(r.b)("setAuthPassword",(e,t,n)=>{const{password:r}=n;return Object(o.a)("provideAuthPassword",r),{...e,authIsLoading:!0,authError:void 0}}),Object(r.b)("uploadProfilePhoto",(e,t,n)=>{const{file:r}=n;Object(o.a)("uploadProfilePhoto",r)}),Object(r.b)("signUp",(e,t,n)=>{const{firstName:r,lastName:u}=n;return Object(o.a)("provideAuthRegistration",{firstName:r,lastName:u}),{...e,authIsLoading:!0,authError:void 0}}),Object(r.b)("returnToAuthPhoneNumber",e=>(Object(o.a)("restartAuth"),{...e,authError:void 0})),Object(r.b)("gotToAuthQrCode",e=>(Object(o.a)("restartAuthWithQr"),{...e,authIsLoadingQrCode:!0,authError:void 0})),Object(r.b)("saveSession",(e,t,n)=>{const{sessionId:r}=n;localStorage.setItem(u.y,r)}),Object(r.b)("signOut",()=>{!async function(){await Object(o.a)("destroy"),localStorage.removeItem(u.y),Object(r.d)().init()}()}),Object(r.b)("loadNearestCountry",e=>{"connectionStateReady"===e.connectionState&&(async()=>{const e=await Object(o.a)("fetchNearestCountry");Object(r.g)({...Object(r.e)(),authNearestCountry:e})})()})},function(e,t,n){"use strict";var r=n(2),u=n(1),o=n(37),d=n(10);Object(r.b)("apiUpdate",(e,t,n)=>{switch(u.m&&"updateUserStatus"!==n["@type"]&&console.log("[GramJs] UPDATE",n["@type"],{update:n}),n["@type"]){case"updateApiReady":!function(e){Object(d.c)(e.settings.byKey.language)}(e);break;case"updateAuthorizationState":!function(e){let t=Object(r.e)();const n="authorizationStateReady"===t.authState,u=e.authorizationState;switch(Object(r.g)({...t,authState:u,authIsLoading:!1}),t=Object(r.e)(),u){case"authorizationStateLoggingOut":Object(r.g)({...t,isLoggingOut:!0});break;case"authorizationStateWaitCode":Object(r.g)({...t,authIsCodeViaApp:e.isCodeViaApp});break;case"authorizationStateWaitPassword":Object(r.g)({...t,authHint:e.hint});break;case"authorizationStateWaitQrCode":Object(r.g)({...t,authIsLoadingQrCode:!1,authQrCode:e.qrCode});break;case"authorizationStateReady":{if(n)break;Object(r.g)({...t,isLoggingOut:!1,lastSyncTime:Date.now()});const{sessionId:u}=e;u&&t.authRememberMe&&Object(r.d)().saveSession({sessionId:u});break}}}(n);break;case"updateAuthorizationError":!function(e){Object(r.g)({...Object(r.e)(),authError:e.message})}(n);break;case"updateConnectionState":!function(e){const{connectionState:t}=e,n=Object(r.e)();Object(r.g)({...n,connectionState:t}),"connectionStateReady"===t&&"authorizationStateReady"===n.authState?Object(r.d)().sync():"connectionStateBroken"===t&&Object(r.d)().signOut()}(n);break;case"updateCurrentUser":!function(e){const{currentUser:t}=e;Object(r.g)({...Object(o.lb)(Object(r.e)(),t.id,t),currentUserId:t.id})}(n);break;case"error":"SESSION_REVOKED"===n.error.message&&t.signOut(),t.showError({error:n.error})}})},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){"use strict";n.r(t);n(21),function(){function e(){var t=Error.call(this,"ServiceWorker is not supported.");return Object.setPrototypeOf(t,e.prototype),t}e.prototype=Object.create(Error.prototype)}();var r=n.p+"serviceWorker.js";var u=n(1),o=n(7),d=n(2);o.j&&window.addEventListener("load",async()=>{try{await navigator.serviceWorker.register(r),u.m&&console.log("ServiceWorker registered"),await navigator.serviceWorker.ready,navigator.serviceWorker.controller?u.m&&console.log("ServiceWorker ready"):(u.m&&console.error("ServiceWorker not available"),Object(d.d)().showError({error:{message:"SERVICE_WORKER_DISABLED"}}))}catch(e){u.m&&console.error("ServiceWorker registration failed: ",e)}});var c=n(57);const a={isLeftColumnShown:!0,isChatInfoShown:!1,uiReadyState:0,authRememberMe:!0,blocked:{ids:[],totalCount:0},users:{byId:{}},chats:{listIds:{},isFullyLoaded:{},orderedPinnedIds:{},totalCount:{},byId:{}},messages:{byChatId:{}},scheduledMessages:{byChatId:{}},chatFolders:{byId:{}},fileUploads:{byMessageLocalId:{}},recentEmojis:["grinning","kissing_heart","christmas_tree","brain","trophy"],stickers:{setsById:{},added:{},recent:{stickers:[]},favorite:{stickers:[]},featured:{setIds:[]},search:{},forEmoji:{}},gifs:{saved:{},search:{}},globalSearch:{},localTextSearch:{byChatThreadKey:{}},localMediaSearch:{byChatId:{}},management:{byChatId:{}},topPeers:{},mediaViewer:{},audioPlayer:{},forwardMessages:{},pollResults:{},payment:{},notifications:[],errors:[],activeSessions:[],settings:{byKey:{messageTextSize:u.p,isBackgroundBlurred:!0,animationLevel:u.d,messageSendKeyCombo:"enter",theme:"light",shouldAutoDownloadMediaFromContacts:!0,shouldAutoDownloadMediaInPrivateChats:!0,shouldAutoDownloadMediaInGroups:!0,shouldAutoDownloadMediaInChannels:!0,shouldAutoPlayGifs:!0,shouldAutoPlayVideos:!0,shouldSuggestStickers:!0,shouldLoopStickers:!0,language:"en"},privacy:{}},twoFaSettings:{}};var i=n(5),s=n(9),f=n(3),l=n(6);const b=Object(s.g)((function(){Object(s.c)(()=>{const e=Object(d.e)();if(e.isLoggingOut)return;const t={...a,...Object(f.l)(e,["authState","authPhoneNumber","authRememberMe","authIsSessionRemembered","authNearestCountry","currentUserId","contactList","chatFolders","topPeers","recentEmojis"]),isChatInfoShown:m(e),users:p(e),chats:g(e),messages:y(e),globalSearch:{recentlyFoundChatIds:e.globalSearch.recentlyFoundChatIds},settings:v(e)},n=JSON.stringify(t);localStorage.setItem(u.x,n)})}),1e3,!1);function h(e){if(!u.w){if(localStorage.getItem(u.y))return Object(d.a)(b),function(e){u.m&&console.time("global-state-cache-read");const t=localStorage.getItem(u.x),n=t?JSON.parse(t):void 0;u.m&&console.timeEnd("global-state-cache-read");n&&(n.settings.byKey={...e.settings.byKey,...n.settings.byKey});return{...e,...n}}(e)}}function m(e){return window.innerWidth>u.S&&e.isChatInfoShown}function p(e){const{users:{byId:t,selectedId:n}}=e;return{byId:t,selectedId:window.innerWidth>u.S?n:void 0}}function g(e){const t=[...(e.chats.listIds.active||[]).slice(0,u.v)],{chatId:n}=Object(l.x)(e)||{};return{...e.chats,byId:Object(f.l)(e.chats.byId,n?[...t,n]:t),listIds:{active:t},isFullyLoaded:{},orderedPinnedIds:{active:e.chats.orderedPinnedIds.active}}}function y(e){const t={},{chatId:n}=Object(l.x)(e)||{};[...(e.chats.listIds.active||[]).slice(0,u.v),...n?[n]:[]].forEach(n=>{const r=e.messages.byChatId[n];if(!r)return;const u=r.threadsById[i.MAIN_THREAD_ID];u&&u.viewportIds&&(t[n]={byId:Object(f.l)(r.byId,u.viewportIds),threadsById:{[i.MAIN_THREAD_ID]:u}})});const r=Object(l.x)(e);return{byChatId:t,messageLists:!r||o.f?void 0:[{...r,threadId:i.MAIN_THREAD_ID,type:"thread"}]}}function v(e){const{byKey:t}=e.settings;return{byKey:t,privacy:{}}}u.w||(Object(d.b)("saveSession",()=>{Object(d.a)(b)}),Object(d.b)("signOut",()=>{Object(d.f)(b),localStorage.removeItem(u.x)})),Object(d.b)("init",()=>{const e=Object(f.d)(a);return h(e)||e});var I=n(0),w=n(49),O=(n(74),n(75),n(76),n(24)),j=n(36),C=n(27),E=n(14);const S=["400 1em Roboto","500 1em Roboto"];function M(){if("fonts"in document)return Promise.all(S.map(e=>document.fonts.load(e)))}var A=n(48),k=n(12),T=n(8),N=(n(77),n.p+"telegram-logo.df3a91becaa9678c529b4c4cadd45204.svg"),P=n.p+"auth-caption.4791dbecd189f14e85d8e9776308639d.png",D=n.p+"monkey.a3d5fcdc50b18dc55695f7dd4101a8c9.svg";function L(){const{listIds:e,byId:t}=Object(d.e)().chats;if(e.active)return Promise.all(e.active.slice(0,10).map(e=>{const n=t[e];if(!n)return;const r=Object(O.d)(n);return r?A.b(r,i.ApiMediaFormat.DataUri):void 0}))}const x={main:()=>Promise.all([Object(k.d)(k.a.Main,"Main").then(M),L()]),authPhoneNumber:()=>Promise.all([Object(E.g)(P),Object(E.g)(N)]),authCode:()=>Promise.all([Object(E.g)(D),M()]),authPassword:()=>Object(E.g)(D),authQrCode:M};var B=Object(d.h)(e=>({uiReadyState:e.uiReadyState,hasCustomBackground:Boolean(e.settings.byKey.customBackground),isCustomBackgroundColor:Boolean((e.settings.byKey.customBackground||"").match(/^#[a-f\d]{6,8}$/i)),isRightColumnShown:Object(l.U)(e)}),(e,t)=>Object(f.l)(t,["setIsUiReady"]))(({page:e,children:t,hasCustomBackground:n,isCustomBackgroundColor:r,isRightColumnShown:u,setIsUiReady:o})=>{const[d,c]=Object(j.a)(),{shouldRender:a,transitionClassNames:i}=Object(C.a)(!d,void 0,!0);return Object(I.n)(()=>{let t;return Promise.race([Object(s.e)(700),x[e]()]).then(()=>{c(),o({uiReadyState:1}),t=window.setTimeout(()=>{o({uiReadyState:2})},1e3)}),()=>{t&&(clearTimeout(t),t=void 0),o({uiReadyState:0})}},[]),I.a.createElement("div",{id:"UiLoader"},t,a&&I.a.createElement("div",{className:Object(T.a)("mask",i)},"main"===e?I.a.createElement(I.a.Fragment,null,I.a.createElement("div",{className:"left"}),I.a.createElement("div",{className:Object(T.a)("middle",n&&!r&&"custom-bg-image",n&&r&&"custom-bg-color",u&&"with-right-column")}),u&&I.a.createElement("div",{className:"right"})):I.a.createElement("div",{className:"blank"})))}),R=n(13),F=n(19),U=n(31),_=n(39),G=n(46),$=n(35),W=n(56),z=n(32),H=n(20);n(84);const K=200+u.c;var V=Object(I.h)(({id:e,value:t,isLoading:n,onChange:r})=>{const u=Object(I.q)(null),[o,d]=Object(I.r)(),[c,a]=Object(I.r)(F.a);function i(e){d(e),a(function(e=""){return e.length?F.a.filter(t=>Object(G.a)(t.name,e)):F.a}(e))}const s=Object(I.m)(e=>{const{countryId:t}=e.currentTarget.firstElementChild.dataset,n=F.a.find(e=>e.id===t);n&&r(n),setTimeout(()=>i(void 0),K)},[r]),f=Object(I.m)(e=>{i(e.currentTarget.value)},[]),l=Object(I.m)(e=>{if(8!==e.keyCode)return;const n=e.currentTarget;t&&void 0===o&&(n.value=""),i(n.value)},[o,t]);return I.a.createElement(W.a,{className:"CountryCodeInput",trigger:({onTrigger:r,isOpen:d})=>{const c=()=>{if(d)return;setTimeout(()=>{u.current.select()},50),r();const e=document.getElementById("auth-phone-number-form");e.scrollTo({top:e.scrollHeight,behavior:"smooth"})},a=void 0!==o?o:t&&t.name||"";return I.a.createElement("div",{className:Object(T.a)("input-group",t&&"touched")},I.a.createElement("input",{ref:u,className:Object(T.a)("form-control",d&&"focus"),type:"text",id:e,value:a,autoComplete:"off",onClick:c,onFocus:c,onInput:f,onKeyDown:l}),I.a.createElement("label",null,"Country"),n?I.a.createElement(H.a,{color:"black"}):I.a.createElement("i",{onClick:c,className:Object(T.a)("css-icon-down",d&&"open")}))}},c.map(e=>I.a.createElement(z.a,{key:e.id,className:t&&e.id===t.id?"selected":"",onClick:s},I.a.createElement("span",{"data-country-id":e.id}),I.a.createElement("span",{className:"country-flag"},Object($.a)(e.flag,["hq_emoji"])),I.a.createElement("span",{className:"country-name"},e.name),I.a.createElement("span",{className:"country-code"},e.code))),!c.length&&I.a.createElement(z.a,{key:"no-results",className:"no-results",disabled:!0},I.a.createElement("span",null,"No countries matched your filter.")))}),q=n(40),J=n(16);let Y=!1;var Q=Object(I.h)(Object(d.h)(e=>Object(f.l)(e,["connectionState","authState","authPhoneNumber","authIsLoading","authIsLoadingQrCode","authError","authRememberMe","authNearestCountry"]),(e,t)=>Object(f.l)(t,["setAuthPhoneNumber","setAuthRememberMe","clearAuthError","loadNearestCountry","gotToAuthQrCode"]))(({connectionState:e,authState:t,authPhoneNumber:n,authIsLoading:r,authIsLoadingQrCode:d,authError:c,authRememberMe:a,authNearestCountry:i,setAuthPhoneNumber:s,setAuthRememberMe:f,loadNearestCountry:l,clearAuthError:b,gotToAuthQrCode:h})=>{const m=Object(I.q)(null),[p,g]=Object(I.r)(),[y,v]=Object(I.r)(),[w,O]=Object(I.r)(!1),[j,C]=Object(I.r)(),S=p?`${p.code} ${y||""}`:y,A=S&&S.replace(/[^\d]+/g,"").length>=10;Object(I.n)(()=>{o.k||m.current.focus()},[p]),Object(I.n)(()=>{"connectionStateReady"!==e||i||l()},[e,i,l]),Object(I.n)(()=>{!i||p||w||g(Object(F.d)(i))},[p,i,w]);const k=Object(I.m)(e=>{const t=Object(F.e)(e),n=!p||t&&t.id!==p.id?t:p;e.length?(!p||n&&n.code!==p.code)&&g(n):g(void 0),v(Object(F.b)(e,n))},[p]);Object(I.n)(()=>{void 0===y&&n&&k(n)},[n,y,k]),Object(I.o)(()=>{m.current&&j&&m.current.setSelectionRange(...j)},[j]),Object(I.n)(()=>{setTimeout(()=>{R.b(u.H),R.b(u.I),R.b(u.J),R.b(u.l),R.b(u.A)},2e3)},[]);const T=Object(I.m)(e=>{c&&b(),Y||(Y=!0,M(),Object(E.g)(D));const{value:t,selectionStart:n,selectionEnd:r}=e.target;C(n&&r&&r{f(e.target.checked)},[f]);const P="authorizationStateWaitPhoneNumber"===t;return I.a.createElement("div",{id:"auth-phone-number-form",className:"custom-scroll"},I.a.createElement("div",{className:"auth-form"},I.a.createElement("div",{id:"logo"}),I.a.createElement("div",{className:"caption-image"}),I.a.createElement("p",{className:"note"},"Please confirm your country and",I.a.createElement("br",null),"enter your phone number."),I.a.createElement("form",{action:"",onSubmit:function(e){e.preventDefault(),r||A&&s({phoneNumber:S})}},I.a.createElement(V,{id:"sign-in-phone-code",value:p,isLoading:!i&&!p,onChange:g}),I.a.createElement(_.a,{ref:m,id:"sign-in-phone-number",label:"Phone Number",value:S,error:c,inputMode:"tel",onChange:T}),I.a.createElement(q.a,{id:"sign-in-keep-session",label:"Keep me signed in",checked:Boolean(a),onChange:N}),A&&(P?I.a.createElement(U.a,{type:"submit",ripple:!0,isLoading:r},"Next"):I.a.createElement(J.a,null)),P&&I.a.createElement(U.a,{isText:!0,ripple:!0,isLoading:d,onClick:h},"Log in by QR code"))))})),Z=n(17);var X=()=>{const e=Object(Z.a)(k.a.Auth,"AuthCode");return e?I.a.createElement(e,null):I.a.createElement(J.a,null)};var ee=()=>{const e=Object(Z.a)(k.a.Auth,"AuthPassword");return e?I.a.createElement(e,null):I.a.createElement(J.a,null)};var te=()=>{const e=Object(Z.a)(k.a.Auth,"AuthRegister");return e?I.a.createElement(e,null):I.a.createElement(J.a,null)};var ne=()=>{const e=Object(Z.a)(k.a.Auth,"AuthQrCode");return e?I.a.createElement(e,null):I.a.createElement(J.a,null)};n(87);var re=Object(I.h)(Object(d.h)(e=>Object(f.l)(e,["authState"]),(e,t)=>Object(f.l)(t,["initApi"]))(({authState:e,initApi:t})=>{switch(Object(I.n)(()=>{t()},[t]),e){case"authorizationStateWaitCode":return I.a.createElement(B,{page:"authCode",key:"authCode"},I.a.createElement(X,null));case"authorizationStateWaitPassword":return I.a.createElement(B,{page:"authPassword",key:"authPassword"},I.a.createElement(ee,null));case"authorizationStateWaitRegistration":return I.a.createElement(te,null);case"authorizationStateWaitQrCode":return I.a.createElement(B,{page:"authQrCode",key:"authQrCode"},I.a.createElement(ne,null));case"authorizationStateWaitPhoneNumber":default:return I.a.createElement(B,{page:"authPhoneNumber",key:"authPhoneNumber"},I.a.createElement(Q,null))}}));var ue=()=>{const e=Object(Z.a)(k.a.Main,"Main");return e?I.a.createElement(e,null):void 0};function oe(){return d.c.createElement(B,{page:"main",key:"main"},d.c.createElement(ue,null))}var de=Object(d.h)(e=>Object(f.l)(e,["authState","authIsSessionRemembered"]))(({authState:e,authIsSessionRemembered:t})=>{if(Object(I.n)(()=>{Object(w.b)()},[]),e)switch(e){case"authorizationStateWaitPhoneNumber":case"authorizationStateWaitCode":case"authorizationStateWaitPassword":case"authorizationStateWaitRegistration":case"authorizationStateWaitQrCode":return d.c.createElement(re,null);case"authorizationStateClosed":case"authorizationStateClosing":case"authorizationStateLoggingOut":case"authorizationStateReady":return oe()}return t?oe():d.c.createElement(re,null)});n(88);u.m&&console.log(">>> INIT"),Object(d.d)().init(),u.m&&console.log(">>> START INITIAL RENDER"),c.a.render(d.c.createElement(de,null),document.getElementById("root")),u.m&&console.log(">>> FINISH INITIAL RENDER"),document.addEventListener("dblclick",()=>{console.log("GLOBAL STATE",Object(d.e)())})}]); \ No newline at end of file diff --git a/dist/main.927891ad2c746c7d8d56.js b/dist/main.927891ad2c746c7d8d56.js deleted file mode 100644 index 9adcf223..00000000 --- a/dist/main.927891ad2c746c7d8d56.js +++ /dev/null @@ -1 +0,0 @@ -!function(e){function t(t){for(var n,r,o=t[0],d=t[1],c=0,a=[];c=0&&I(e[t]);t--);return t+17&&console.warn(`[Teact] Slow component render: ${n}, ${Math.round(t)} ms`),O[n].renderTimes.push(t),O[n].renderCount++}}catch(t){Object(c.a)(t),u=e.renderedValue}if(e.isMounted&&u===e.renderedValue)return e.$element;e.renderedValue=u;const o=w(u);return e.$element=y(e,[o]),e.$element}function C(e,t){return typeof e!=typeof t||(e.type!==t.type||(b(e)&&b(t)?e.value!==t.value:h(e)&&h(t)?e.tag!==t.tag||e.props.key!==t.props.key:!(!m(e)||!m(t))&&(e.componentInstance.Component!==t.componentInstance.Component||e.props.key!==t.props.key)))}function E(e){p(e)&&(m(e)?function(e){if(!e.isMounted)return;e.hooks.memos.byCursor.forEach(e=>{e.current=null}),e.hooks.effects.byCursor.forEach(({cleanup:e})=>{if("function"==typeof e)try{e()}catch(e){Object(c.a)(e)}}),e.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.Component=null,e.props=null,e.forceUpdate=null,e.onUpdate=null}(e)}(e.componentInstance):e.target&&(Object(a.b)(e.target),e.target=null),e.children.forEach(E))}function S(e){return j(e),e.isMounted=!0,e.$element}function M(e){return m(e)?M(e.children[0]):e.target}function A(e,t){m(e)?A(e.children[0],t):e.target=t}function k(e){const{cursor:t,byCursor:n}=f.hooks.state;var r;return void 0===n[t]&&(n[t]={value:e,nextValue:e,setter:(r=f,e=>{n[t].nextValue!==e&&(n[t].nextValue="function"==typeof e?e(n[t].value):e,r.scheduleNextState&&r.forceUpdate||(r.scheduleNextState=Object(u.h)(()=>function(e){e.isMounted&&e.hooks.state.byCursor.forEach(e=>{e.value=e.nextValue})}(r)),r.forceUpdate=Object(u.i)(()=>function(e){if(!e.isMounted||!e.onUpdate)return;const t=e.$element;j(e),e.$element!==t&&e.onUpdate()}(r))),r.scheduleNextState(),r.forceUpdate())})}),f.hooks.state.cursor++,[n[t].value,n[t].setter]}function T(e,t,n){const{cursor:r,byCursor:u}=f.hooks.effects,o=f,d=()=>{if(!o.isMounted)return;const{cleanup:e}=u[r];if("function"==typeof e)try{e()}catch(e){Object(c.a)(e)}u[r].cleanup=t()};void 0!==u[r]&&n&&u[r].dependencies?n.some((e,t)=>e!==u[r].dependencies[t])&&e(d):e(d),u[r]={effect:t,dependencies:n,cleanup:u[r]?u[r].cleanup:void 0},f.hooks.effects.cursor++}function P(e,t){return T(u.b,e,t)}function N(e,t){return T(u.d,e,t)}function D(e,t){const{cursor:n,byCursor:r}=f.hooks.memos;let{current:u}=r[n]||{};return(void 0===r[n]||t.some((e,t)=>e!==r[n].dependencies[t]))&&(u=e()),r[n]={current:u,dependencies:t},f.hooks.memos.cursor++,u}function L(e,t){return D(()=>e,t)}function x(e){return D(()=>({current:e}),[])}function B(e,t=d.a){return function(n){const r=x(n),u=x();return(!u.current||r.current&&!t(r.current,n))&&(r.current=n,u.current=g(e,n)),u.current}}document.addEventListener("dblclick",()=>{console.log("COMPONENTS",Object(o.k)(Object.values(O),"renderCount","desc"))}),t.a={createElement:g,Fragment:s}},function(e,t,n){"use strict";n.d(t,"l",(function(){return r})),n.d(t,"n",(function(){return u})),n.d(t,"x",(function(){return o})),n.d(t,"m",(function(){return d})),n.d(t,"w",(function(){return c})),n.d(t,"u",(function(){return a})),n.d(t,"v",(function(){return i})),n.d(t,"t",(function(){return s})),n.d(t,"E",(function(){return f})),n.d(t,"F",(function(){return l})),n.d(t,"G",(function(){return b})),n.d(t,"H",(function(){return h})),n.d(t,"k",(function(){return m})),n.d(t,"y",(function(){return p})),n.d(t,"O",(function(){return y})),n.d(t,"K",(function(){return v})),n.d(t,"L",(function(){return I})),n.d(t,"M",(function(){return w})),n.d(t,"g",(function(){return O})),n.d(t,"i",(function(){return j})),n.d(t,"h",(function(){return C})),n.d(t,"ab",(function(){return E})),n.d(t,"N",(function(){return S})),n.d(t,"s",(function(){return M})),n.d(t,"ob",(function(){return A})),n.d(t,"a",(function(){return k})),n.d(t,"e",(function(){return T})),n.d(t,"d",(function(){return P})),n.d(t,"o",(function(){return N})),n.d(t,"p",(function(){return D})),n.d(t,"q",(function(){return L})),n.d(t,"r",(function(){return x})),n.d(t,"X",(function(){return B})),n.d(t,"W",(function(){return R})),n.d(t,"Q",(function(){return F})),n.d(t,"P",(function(){return U})),n.d(t,"T",(function(){return _})),n.d(t,"S",(function(){return G})),n.d(t,"R",(function(){return $})),n.d(t,"B",(function(){return W})),n.d(t,"c",(function(){return z})),n.d(t,"hb",(function(){return K})),n.d(t,"ib",(function(){return H})),n.d(t,"cb",(function(){return V})),n.d(t,"db",(function(){return q})),n.d(t,"kb",(function(){return J})),n.d(t,"gb",(function(){return Y})),n.d(t,"lb",(function(){return Q})),n.d(t,"mb",(function(){return Z})),n.d(t,"jb",(function(){return X})),n.d(t,"nb",(function(){return ee})),n.d(t,"eb",(function(){return te})),n.d(t,"fb",(function(){return ne})),n.d(t,"I",(function(){return re})),n.d(t,"J",(function(){return ue})),n.d(t,"bb",(function(){return oe})),n.d(t,"A",(function(){return de})),n.d(t,"j",(function(){return ce})),n.d(t,"U",(function(){return ae})),n.d(t,"V",(function(){return ie})),n.d(t,"Z",(function(){return se})),n.d(t,"b",(function(){return fe})),n.d(t,"f",(function(){return le})),n.d(t,"D",(function(){return be})),n.d(t,"C",(function(){return he})),n.d(t,"Y",(function(){return me})),n.d(t,"z",(function(){return pe}));const r=!1,u=!1,o=!1,d="Shoot!\nSomething went wrong, please see the error details in Dev Tools Console.",c="GramJs:sessionId",a=!1,i="tt-global-state",s=30,f=!1,l="tt-media",b="tt-media-avatars",h="tt-media-progressive",m="tt-custom-bg",p="tt-lang-packs",g=(new Set(["newMessage","newScheduledMessage","deleteMessages","deleteScheduledMessages","deleteHistory"]),"undefined"!=typeof window&&window.innerHeight>=900),y=1,v=750,I=g?60:40,w=2*I,O=72,j=g?30:25,C=100,E=42,S=42,M=20,A=25,k=!1,T=2,P=T,N=16,D=1e4,L="editable-message-text",x="editable-message-text-modal",B=1440,R=1150,F=1275,U=925,_=600,G=950,$=450,W=1e9,z=100,K=13,H=11,V=160,q=120,J=64,Y=48,Q=32,Z=64,X=64,ee=160,te=140,ne=80,re="MEMOJI_STICKER",ue=200,oe=450,de=450,ce="image/png,image/gif,image/jpeg,video/mp4,video/avi,video/quicktime",ae="((ftp|https?):\\/\\/)?((www\\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\\.[a-zA-Z0-9()]{1,6})\\b([-a-zA-Z0-9()@:%_+.~#?&/=]*)",ie=/^(?:https?:\/\/)?(?:t\.me\/)([\d\w_]+)(?:\/([\d]+))?$/gm,se=777e3,fe=0,le=1,be=10,he=5,me=2147483646,pe=["android","ios"]},function(e,t,n){"use strict";n.d(t,"g",(function(){return y})),n.d(t,"e",(function(){return v})),n.d(t,"d",(function(){return I})),n.d(t,"b",(function(){return w})),n.d(t,"a",(function(){return O})),n.d(t,"f",(function(){return j})),n.d(t,"h",(function(){return C}));var r=n(0),u=n(1),o=n(29),d=n(22),c=n(9),a=n(25),i=n(3),s=n(21);function f(){return(f=Object.assign||function(e){for(var t=1;t7&&console.warn(`[TeactN] Slow containers update: ${Math.round(t)} ms`)}}],m={},p=new Map;const g=Object(c.i)((function(){h.forEach(e=>e(l))}));function y(e){"object"==typeof e&&e!==l&&(l=e,g())}function v(){return l}function I(){return m}function w(e,t){b[e]||(b[e]=[],m[e]=t=>{!function(e,t){b[e]&&b[e].forEach(e=>{const n=e(l,m,t);n&&y(n)})}(e,t)}),b[e].push(t)}function O(e){h.push(e)}function j(e){const t=h.indexOf(e);-1!==t&&h.splice(t,1)}function C(e=(()=>({})),t=(()=>({}))){return n=>function(u){const[c]=Object(r.r)(Object(d.a)(p)),i=Object(o.a)();Object(r.n)(()=>()=>{p.delete(c)},[c]);let b=p.get(c);if(b||(b={mapStateToProps:e,mapReducersToProps:t,ownProps:u,areMappedPropsChanged:!1,forceUpdate:i,DEBUG_updates:0,DEBUG_componentName:n.name},p.set(c,b)),b.areMappedPropsChanged&&(b.areMappedPropsChanged=!1),!b.mappedProps||!Object(a.a)(b.ownProps,u)){b.ownProps=u;try{b.mappedProps={...e(l,u),...t(y,m)}}catch(e){Object(s.a)(e)}}return r.a.createElement(n,f({},b.mappedProps,u))}}function E(e,t){const n=Object.keys(e);return n.length!==Object.keys(t).length?["LENGTH"]:n.filter(n=>e[n]!==t[n])}u.l&&(window.getGlobal=v,document.addEventListener("dblclick",()=>{console.log("GLOBAL CONTAINERS",Object(i.k)(Object.values(p),"DEBUG_updates","desc"))}))},function(e,t,n){"use strict";function r(e,t){return e.reduce((e,n)=>(e[n[t]]=n,e),{})}function u(e,t){return Object.keys(e).reduce((n,r,u)=>(n[r]=t(e[r],r,u,e),n),{})}function o(e,t){return t.reduce((t,n)=>(t[n]=e[n],t),{})}function d(e,t){return t.reduce((t,n)=>(e[n]&&(t[n]=e[n]),t),{})}function c(e,t){const n=new Set(t.map(String));return o(e,Object.keys(e).filter(e=>!n.has(e)))}function a(e,t,n="asc"){return e.sort((e,r)=>{if(Array.isArray(t)){const[u,o]=Array.isArray(n)?n:[n,n],[d,c]=t;let a,i;if("function"==typeof d?(a=d(e)||0,i=d(r)||0):"string"==typeof d&&(a=e[d]||0,i=r[d]||0),a!==i)return"asc"===u?a-i:i-a;{let t,n;return"function"==typeof c?(t=c(e)||0,n=c(r)||0):"string"==typeof c&&(t=e[c]||0,n=r[c]||0),"asc"===o?t-n:n-t}}let u,o;return"function"==typeof t?(u=t(e)||0,o=t(r)||0):"string"==typeof t&&(u=e[t]||0,o=r[t]||0),"asc"===n?u-o:o-u})}function i(e){return e.reduce((e,t)=>Array.isArray(t)?e.concat(t):(e.push(t),e),[])}function s(e){return Array.from(new Set(e))}function f(e){return e.filter(Boolean)}function l(e,t){return e.length===t.length&&e.every((e,n)=>e===t[n])}function b(e,t){return e[0]<=t[t.length-1]&&e[e.length-1]>=t[0]}function h(e,t){return e.filter(e=>t.has(e))}function m(e,t){const n=[];for(let r=0;r(t[n]=p(e[n]),t),{})}function g(e,t){let n=e.length;for(;n--;)if(t(e[n],n,e))return e[n]}n.d(t,"c",(function(){return r})),n.d(t,"i",(function(){return u})),n.d(t,"l",(function(){return o})),n.d(t,"m",(function(){return d})),n.d(t,"j",(function(){return c})),n.d(t,"k",(function(){return a})),n.d(t,"h",(function(){return i})),n.d(t,"o",(function(){return s})),n.d(t,"e",(function(){return f})),n.d(t,"a",(function(){return l})),n.d(t,"b",(function(){return b})),n.d(t,"f",(function(){return h})),n.d(t,"n",(function(){return m})),n.d(t,"d",(function(){return p})),n.d(t,"g",(function(){return g}))},function(e,t,n){"use strict";n.d(t,"Y",(function(){return r.c})),n.d(t,"Z",(function(){return r.d})),n.d(t,"ab",(function(){return r.e})),n.d(t,"xb",(function(){return r.h})),n.d(t,"pb",(function(){return r.f})),n.d(t,"wb",(function(){return r.g})),n.d(t,"W",(function(){return r.a})),n.d(t,"X",(function(){return r.b})),n.d(t,"lb",(function(){return u.w})),n.d(t,"kb",(function(){return u.v})),n.d(t,"ib",(function(){return u.t})),n.d(t,"nb",(function(){return u.y})),n.d(t,"jb",(function(){return u.u})),n.d(t,"ob",(function(){return u.z})),n.d(t,"m",(function(){return u.j})),n.d(t,"T",(function(){return u.p})),n.d(t,"l",(function(){return u.i})),n.d(t,"g",(function(){return u.e})),n.d(t,"h",(function(){return u.f})),n.d(t,"f",(function(){return u.d})),n.d(t,"mb",(function(){return u.x})),n.d(t,"gb",(function(){return u.r})),n.d(t,"q",(function(){return u.m})),n.d(t,"yb",(function(){return u.A})),n.d(t,"e",(function(){return u.c})),n.d(t,"c",(function(){return u.a})),n.d(t,"J",(function(){return u.o})),n.d(t,"k",(function(){return u.h})),n.d(t,"j",(function(){return u.g})),n.d(t,"hb",(function(){return u.s})),n.d(t,"d",(function(){return u.b})),n.d(t,"Bb",(function(){return u.C})),n.d(t,"Ab",(function(){return u.B})),n.d(t,"p",(function(){return u.l})),n.d(t,"o",(function(){return u.k})),n.d(t,"fb",(function(){return u.q})),n.d(t,"I",(function(){return u.n})),n.d(t,"A",(function(){return i})),n.d(t,"zb",(function(){return s})),n.d(t,"F",(function(){return f})),n.d(t,"M",(function(){return l})),n.d(t,"N",(function(){return b})),n.d(t,"x",(function(){return h})),n.d(t,"K",(function(){return m})),n.d(t,"n",(function(){return p})),n.d(t,"tb",(function(){return g})),n.d(t,"ub",(function(){return y})),n.d(t,"qb",(function(){return v})),n.d(t,"db",(function(){return I})),n.d(t,"vb",(function(){return w})),n.d(t,"eb",(function(){return O})),n.d(t,"U",(function(){return j})),n.d(t,"V",(function(){return C})),n.d(t,"sb",(function(){return E})),n.d(t,"rb",(function(){return S})),n.d(t,"v",(function(){return k})),n.d(t,"cb",(function(){return T})),n.d(t,"G",(function(){return P})),n.d(t,"O",(function(){return N})),n.d(t,"t",(function(){return D})),n.d(t,"u",(function(){return L})),n.d(t,"L",(function(){return x})),n.d(t,"y",(function(){return B})),n.d(t,"H",(function(){return R})),n.d(t,"z",(function(){return F})),n.d(t,"P",(function(){return U})),n.d(t,"Q",(function(){return _})),n.d(t,"E",(function(){return G})),n.d(t,"D",(function(){return $})),n.d(t,"C",(function(){return z})),n.d(t,"B",(function(){return K})),n.d(t,"b",(function(){return V})),n.d(t,"i",(function(){return q})),n.d(t,"R",(function(){return J})),n.d(t,"S",(function(){return Y})),n.d(t,"bb",(function(){return Q})),n.d(t,"s",(function(){return Z})),n.d(t,"w",(function(){return X})),n.d(t,"r",(function(){return ee})),n.d(t,"a",(function(){return te}));var r=n(23),u=n(24),o=n(5),d=n(1),c=n(58);const a=new RegExp(d.U,"i");function i(e){const{chatId:t,id:n}=e;return`msg${t}-${n}`}function s(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 l(e,t=!1){const{text:n,photo:r,video:u,audio:o,voice:d,document:c,sticker:a,contact:i,poll:s,invoice:f}=e.content;if(e.groupedId)return n?`${t?"":"🖼 "}${n.text}`:"Album";if(r)return n?`${t?"":"🖼 "}${n.text}`:"Photo";if(u)return u.isGif?n?`${t?"":"GIF "}${n.text}`:"GIF":n?`${t?"":"📹 "}${n.text}`:"Video";if(a)return"Sticker "+a.emoji;if(o){const e=[o.title,o.performer].filter(Boolean).join(" — ")||n&&n.text;return e?"🎧 "+e:"Audio"}return d?n?`${t?"":"🎤 "}${n.text}`:"Voice Message":c?`${t?"":"📎 "}${n?n.text:c.fileName}`:i?"Contact":s?"📊 "+s.summary.question:f?"Invoice":n?n.text:"The message is not supported on this version of Telegram"}function b(e){const{text:t,sticker:n,photo:r,video:u,audio:o,voice:d,document:c,poll:a,webPage:i,contact:s,invoice:f}=e.content;return t?t.text:n||r||u||o||d||c||s||a||i||f?void 0:"The message is not supported on this version of Telegram"}function h(e){const{text:t,sticker:n,photo:r,video:u,audio:o,voice:d,document:a,poll:i,webPage:s,contact:f}=e.content;return!!(n||u&&u.isRound)||!(!t||r||u||o||d||a||i||s||f)&&(Object(c.a)(t.text)||!1)}function m(e){const{text:t}=e.content;if(t&&t.text.length<=6&&1===h(e))return t.text}function p(e){const{text:t}=e.content;let n;if(t&&t.entities){let e=t.entities.find(e=>e.type===o.ApiMessageEntityTypes.TextUrl);if(e&&(n=e.url.match(a)),!n&&(e=t.entities.find(e=>e.type===o.ApiMessageEntityTypes.Url),e)){const{offset:r,length:u}=e;n=t.text.substring(r,r+u).match(a)}}if(!n&&t&&(n=t.text.match(a)),n)return{url:n[0],domain:n[3]}}function g(e){return e.isOutgoing}function y(e){return Boolean(e.replyToMessageId)}function v(e){return Boolean(e.forwardInfo)}function I(e){return!!e.content.action}function w(e){return e.chatId===d.Z&&E(e)}function O(e){return Boolean(e.senderId)&&e.senderId<0&&g(e)}function j(e){return e.id>0?Object(r.d)(e):Object(u.i)(e)}function C(e){return e.sendingState?"messageSendingStateFailed"===e.sendingState?"failed":"pending":"succeeded"}function E(e){return e.id>=d.B}function S(e){return e.content.action&&"historyClear"===e.content.action.type}var M=n(7),A=n(53);function k(e){return e.content}function T(e){return Boolean(P(e)||N(e)||B(e)||x(e)||function(e){return e.content.contact}(e)||R(e)||D(e)||L(e)||function(e){return e.content.voice}(e))}function P(e){return e.content.photo}function N(e){return e.content.video}function D(e){return e.content.action}function L(e){return e.content.audio}function x(e){return e.content.sticker}function B(e){return e.content.document}function R(e){return e.content.poll}function F(e){return e.content.invoice}function U(e){return e.content.webPage}function _(e){const t=U(e);return t?t.photo:void 0}function G(e){const t=function(e){const t=P(e)||N(e)||B(e)||x(e)||_(e);if(t)return t.thumbnail}(e);return t?t.dataUri:void 0}function $(e,t){const{photo:n,video:r,sticker:u,audio:o,voice:d,document:c}=e.content,a=_(e);if(!(n||r||u||a||o||d||c))return;const s=i(e);if(n||a)switch(t){case"micro":case"pictogram":return s+"?size=m";case"inline":if(H(e))return;return s+"?size=x";case"viewerPreview":return s+"?size=x";case"viewerFull":return s+"?size=z"}if(r)switch(t){case"micro":case"pictogram":return s+"?size=m";case"inline":if(H(e))return;return V(r)?W(r,s):s+"?size=z";case"viewerPreview":return s+"?size=m";case"viewerFull":return W(r,s);case"download":return s+"?download"}if(c)switch(t){case"micro":case"pictogram":case"inline":if(!Object(A.c)(c)||H(e))return;return s+"?size=m";default:return s}if(u)switch(t){case"micro":return;case"pictogram":return s+"?size=m";default:return s}if(o)switch(t){case"micro":case"pictogram":return;default:return W(o,s)}if(d)switch(t){case"micro":case"pictogram":return;default:return s}}function W(e,t){return M.h&&M.i?`${t}?fileSize=${e.size}&mimeType=${e.mimeType}`:t}function z(e,t){const{sticker:n,video:r,audio:u,voice:d}=e.content;return n&&"inline"===t&&n.isAnimated?o.ApiMediaFormat.Lottie:r&&M.h&&("viewerFull"===t||"inline"===t&&V(r))?o.ApiMediaFormat.Progressive:u||d?d&&!M.g?o.ApiMediaFormat.BlobUrl:o.ApiMediaFormat.Progressive:o.ApiMediaFormat.BlobUrl}function K(e){const{photo:t,video:n,webPage:r}=e.content;return t||r&&r.photo?`photo${e.date}.jpeg`:n?n.fileName:void 0}function H(e){const{photo:t,video:n,document:r}=e.content;return t&&t.blobUrl||n&&n.blobUrl||r&&r.previewBlobUrl}function V(e){return e.isGif||e.isRound||e.size<=10485760}function q(e,t,n=!1){const r=X(e,t,"media");return n?r.reverse():r}function J(e){return e.sizes.find(e=>"z"===e.type)||e.sizes.find(e=>"y"===e.type)||Y(e)}function Y(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 Q(e){if(e.width&&e.height)return e}function Z(e,t,n=!1){const r=E(e);return{isUploading:r,isTransferring:r||n,transferProgress:Number(t)}}function X(e,t,n){let r;switch(n){case"media":r=e=>{const t=N(e);return P(e)||t&&!t.isRound&&!t.isGif};break;case"documents":r=B;break;case"links":r=e=>U(e)||function(e){const{text:t}=e.content,n=t&&t.text.match(a);if(n)return{url:n[0],domain:n[3]}}(e);break;case"audio":r=L;break;default:return[]}return t.reduce((t,n)=>(e[n]&&r(e[n])&&t.push(n),t),[])}function ee(e){const{audio:t,voice:n,video:r}=k(e),u=t||n||r;if(u)return u.duration}function te(e,t){return`${e}_${t}`}n(54)},function(e,t,n){"use strict";var r=n(59);n.o(r,"ApiMediaFormat")&&n.d(t,"ApiMediaFormat",(function(){return r.ApiMediaFormat})),n.o(r,"ApiMessageEntityTypes")&&n.d(t,"ApiMessageEntityTypes",(function(){return r.ApiMessageEntityTypes})),n.o(r,"MAIN_THREAD_ID")&&n.d(t,"MAIN_THREAD_ID",(function(){return r.MAIN_THREAD_ID})),n.o(r,"MESSAGE_DELETED")&&n.d(t,"MESSAGE_DELETED",(function(){return r.MESSAGE_DELETED}));var u=n(60);n.o(u,"ApiMediaFormat")&&n.d(t,"ApiMediaFormat",(function(){return u.ApiMediaFormat})),n.o(u,"ApiMessageEntityTypes")&&n.d(t,"ApiMessageEntityTypes",(function(){return u.ApiMessageEntityTypes})),n.o(u,"MAIN_THREAD_ID")&&n.d(t,"MAIN_THREAD_ID",(function(){return u.MAIN_THREAD_ID})),n.o(u,"MESSAGE_DELETED")&&n.d(t,"MESSAGE_DELETED",(function(){return u.MESSAGE_DELETED}));var o=n(61);n.d(t,"ApiMessageEntityTypes",(function(){return o.a})),n.d(t,"MAIN_THREAD_ID",(function(){return o.b})),n.d(t,"MESSAGE_DELETED",(function(){return o.c}));var d=n(62);n.o(d,"ApiMediaFormat")&&n.d(t,"ApiMediaFormat",(function(){return d.ApiMediaFormat}));var c=n(63);n.d(t,"ApiMediaFormat",(function(){return c.a}));n(64),n(65)},function(e,t,n){"use strict";n.d(t,"R",(function(){return ke})),n.d(t,"ib",(function(){return Te})),n.d(t,"U",(function(){return Pe})),n.d(t,"Bb",(function(){return a})),n.d(t,"f",(function(){return i})),n.d(t,"o",(function(){return s})),n.d(t,"N",(function(){return f})),n.d(t,"M",(function(){return l})),n.d(t,"vb",(function(){return b})),n.d(t,"n",(function(){return h})),n.d(t,"g",(function(){return m})),n.d(t,"J",(function(){return p})),n.d(t,"d",(function(){return g})),n.d(t,"K",(function(){return y})),n.d(t,"j",(function(){return v})),n.d(t,"i",(function(){return I})),n.d(t,"L",(function(){return w})),n.d(t,"h",(function(){return O})),n.d(t,"x",(function(){return k})),n.d(t,"q",(function(){return T})),n.d(t,"m",(function(){return P})),n.d(t,"lb",(function(){return N})),n.d(t,"W",(function(){return L})),n.d(t,"bb",(function(){return x})),n.d(t,"w",(function(){return B})),n.d(t,"Cb",(function(){return R})),n.d(t,"eb",(function(){return F})),n.d(t,"jb",(function(){return U})),n.d(t,"mb",(function(){return _})),n.d(t,"hb",(function(){return G})),n.d(t,"B",(function(){return $})),n.d(t,"D",(function(){return W})),n.d(t,"A",(function(){return z})),n.d(t,"xb",(function(){return K})),n.d(t,"E",(function(){return H})),n.d(t,"yb",(function(){return V})),n.d(t,"zb",(function(){return q})),n.d(t,"wb",(function(){return J})),n.d(t,"a",(function(){return Y})),n.d(t,"V",(function(){return Q})),n.d(t,"k",(function(){return Z})),n.d(t,"kb",(function(){return X})),n.d(t,"C",(function(){return ee})),n.d(t,"l",(function(){return te})),n.d(t,"G",(function(){return ne})),n.d(t,"S",(function(){return re})),n.d(t,"ab",(function(){return ue})),n.d(t,"ob",(function(){return oe})),n.d(t,"I",(function(){return de})),n.d(t,"b",(function(){return ce})),n.d(t,"e",(function(){return ae})),n.d(t,"Ab",(function(){return ie})),n.d(t,"gb",(function(){return se})),n.d(t,"F",(function(){return fe})),n.d(t,"P",(function(){return le})),n.d(t,"p",(function(){return be})),n.d(t,"Q",(function(){return he})),n.d(t,"T",(function(){return me})),n.d(t,"H",(function(){return pe})),n.d(t,"Y",(function(){return ge})),n.d(t,"O",(function(){return ye})),n.d(t,"nb",(function(){return ve})),n.d(t,"Z",(function(){return Ie})),n.d(t,"pb",(function(){return we})),n.d(t,"qb",(function(){return Oe})),n.d(t,"rb",(function(){return je})),n.d(t,"s",(function(){return Ne})),n.d(t,"z",(function(){return Ce})),n.d(t,"v",(function(){return Ee})),n.d(t,"u",(function(){return Se})),n.d(t,"X",(function(){return Me})),n.d(t,"t",(function(){return Ae})),n.d(t,"y",(function(){return C})),n.d(t,"r",(function(){return E})),n.d(t,"sb",(function(){return S})),n.d(t,"tb",(function(){return M})),n.d(t,"c",(function(){return A})),n.d(t,"cb",(function(){return De})),n.d(t,"db",(function(){return Le})),n.d(t,"fb",(function(){return xe})),n.d(t,"ub",(function(){return Be}));var r=n(18),u=n(7),o=n(5),d=n(1),c=n(4);function a(e,t){return e.users.byId[t]}function i(e,t){return e.chats.byId[t]}function s(e,t){const n=Object(c.T)(t);return!!n&&a(e,n)}function f(e,t){return t===e.currentUserId}function l(e,t){const n=s(e,t);return n&&Object(c.wb)(n)}function b(e){return Object.values(e.chats.byId).find(({isSupport:e})=>e)}function h(e,t){if(Object(c.lb)(t.id)||Object(c.jb)(t))return;if(Object(c.nb)(t))return t.onlineCount;if(!t.fullInfo||!t.fullInfo.members)return;return t.fullInfo.members.map(e=>e.userId).reduce((t,n)=>e.users.byId[n]&&Object(c.xb)(e.users.byId[n])?t+1:t,0)}function m(e,t){const n=i(e,t),r=n&&Object(c.T)(n),u=r&&a(e,r);if(u&&Object(c.wb)(u))return u}function p(e,t){const n=i(e,t),r=m(e,t);if(!n||!r)return!1;if(n.lastMessage&&Object(c.rb)(n.lastMessage))return!0;const u=e.messages.byChatId[t];if(!u)return!1;const{listedIds:d}=u.threadsById[o.MAIN_THREAD_ID]||{};return d&&!d.length}function g(e){return Boolean(e.chats.listIds.active)}function y(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 v(e,t){const n=i(e,t);if(n&&y(e,t))return n.folderId===d.f?"archived":"active"}function I(e,t){return e.chatFolders.byId[t]}function w(e,t,n=d.b){const{active:r,archived:u}=e.chats.orderedPinnedIds;if(n===d.b)return!!r&&r.includes(t);if(n===d.f)return!!u&&u.includes(t);const{byId:o}=e.chatFolders,{pinnedChatIds:c}=o[n]||{};return!!c&&c.includes(t)}function O(e,t){const n=t.toLowerCase();return Object.values(e.chats.byId).find(e=>e.username&&e.username.toLowerCase()===n)}var j=n(3);function C(e){return e.stickers.search}function E(e){return e.gifs.search}function S(e,t){return e.stickers.setsById[t]}function M(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 A(e,t){const{animatedEmojis:n}=e;if(n&&n.stickers)return t=t.replace("️",""),n.stickers.find(e=>e.emoji===t)}function k(e){const{messageLists:t}=e.messages;if(t&&t.length)return t[t.length-1]}function T(e){const{chatId:t}=k(e)||{};return t?i(e,t):void 0}function P(e,t){const n=e.messages.byChatId[t];return n?n.byId:void 0}function N(e,t){const n=e.scheduledMessages.byChatId[t];return n?n.byId:void 0}function D(e,t,n,r){const u=e.messages.byChatId[t];if(!u)return;const o=u.threadsById[n];return o?o[r]:void 0}function L(e,t,n){return D(e,t,n,"listedIds")}function x(e,t,n){return D(e,t,n,"outlyingIds")}function B(e,t,n,r){switch(r){case"thread":return R(e,t,n);case"pinned":return F(e,t);case"scheduled":return U(e,t)}}function R(e,t,n){return D(e,t,n,"viewportIds")}function F(e,t){return D(e,t,o.MAIN_THREAD_ID,"pinnedIds")}function U(e,t){return D(e,t,o.MAIN_THREAD_ID,"scheduledIds")}function _(e,t,n){return D(e,t,n,"scrollOffset")}function G(e,t,n){return D(e,t,n,"replyingToId")}function $(e,t,n){return D(e,t,n,"editingId")}function W(e,t){return D(e,t,o.MAIN_THREAD_ID,"editingScheduledId")}function z(e,t,n){return D(e,t,n,"draft")}function K(e,t,n){return D(e,t,n,"threadInfo")}function H(e,t,n){return D(e,t,n,"firstMessageId")}function V(e,t,n){if(n===o.MAIN_THREAD_ID)return i(e,t);const r=K(e,t,n);return r?i(e,r.originChannelId||t):void 0}function q(e,t,n){if(n===o.MAIN_THREAD_ID)return;const r=K(e,t,n);return r?r.topMessageId:void 0}function J(e,t,n){const r=e.messages.byChatId[t];if(!r)return;const{replyToMessageId:u,replyToTopMessageId:o}=n;return u||o?Object.values(r.threadsById).find(e=>e.threadInfo&&(u&&u===e.threadInfo.topMessageId||o&&o===e.threadInfo.topMessageId)):void 0}function Y(e,t,n){const r=k(e);if(!r)return!1;const{threadInfo:u}=J(e,t,n)||{};return t===r.chatId&&(r.threadId===o.MAIN_THREAD_ID||u&&r.threadId===u.threadId)}function Q(e,t,n){const r=R(e,t,n);if(!r||!r.length)return!0;let u;if(n===o.MAIN_THREAD_ID){const n=i(e,t);if(!n||!n.lastMessage)return!0;u=n.lastMessage.id}else{const r=K(e,t,n);if(!r||!r.lastMessageId)return;u=r.lastMessageId}return u>=d.B&&!Z(e,t,u)||r[r.length-1]>=u}function Z(e,t,n){const r=P(e,t);return r?r[n]:void 0}function X(e,t,n){const r=N(e,t);return r?r[n]:void 0}function ee(e,t,n,r){if("scheduled"===r){const n=W(e,t);return n?X(e,t,n):void 0}{const r=$(e,t,n);return r?Z(e,t,r):void 0}}function te(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 ne(e,t){const{chatId:n,messageId:r}=e.focusedMessage||{};return n===t?r:void 0}function re(e,t){const n=ne(e,t.chatId);return!!n&&(n===t.id||n===t.previousLocalId)}function ue(e,t,n=!1){return function(e,t){const{lastReadOutboxMessageId:n}=i(e,t.chatId)||{};return Object(c.sb)(t)||!n||n0?a(e,n):i(e,n)}function de(e,t){const{forwardInfo:n}=t;if(n)return n.isChannelPost&&n.fromChatId?i(e,n.fromChatId):n.senderUserId?a(e,n.senderUserId):void 0}function ce(e,t,n){const r=i(e,t.chatId);if(!r||r.isRestricted)return{};const u=Object(c.lb)(r.id),o=f(e,t.chatId),d=Object(c.ib)(r),a=Object(c.nb)(r),s=Object(c.jb)(r),l=Object(c.vb)(t),b=Object(c.tb)(t),h=Object(c.db)(t),{content:m}=t,p=(o||Date.now()-1e3*t.date<1728e5)&&!(m.sticker||m.contact||m.poll||m.action||m.audio||m.video&&m.video.isRound)&&!Object(c.qb)(t)&&!t.viaBotId,g=Object(c.e)(r,n)&&!l,y=u||r.isCreator||!s&&!Object(c.yb)(r,"pinMessages")||Object(c.q)(r,"pinMessages");let v=!h&&y,I=!1;const w=F(e,r.id);v&&(I=Boolean(w&&w.includes(t.id)),v=!I);const O=u||b||d||r.isCreator||Object(c.q)(r,"deleteMessages"),j=O&&!l&&(u&&!o||d&&(b||Object(c.q)(r,"deleteMessages"))),C=!h&&p&&(b||s&&(r.isCreator||Object(c.q)(r,"editMessages"))),E=!h&&!l,S=Boolean(t.content.sticker),M=S&&function(e,t){const{stickers:n}=e.stickers.favorite;return n&&n.some(({id:e})=>e===t.id)}(e,t.content.sticker),A=!h&&S&&!M,k=!h&&M,T=!h,P=!h&&(s||a),N=!h;return{noOptions:[g,C,v,I,O,j,E,A,k,T,P,N].every(e=>!e),canReply:g,canEdit:C,canPin:v,canUnpin:I,canDelete:O,canDeleteForAll:j,canForward:E,canFaveSticker:A,canUnfaveSticker:k,canCopy:T,canCopyLink:P,canSelect:N}}function ae(e){const{messageIds:t}=e.selectedMessages||{},{chatId:n,threadId:r}=k(e)||{},u=n&&P(e,n);if(!u||!t||!r)return{};const o=t.map(t=>u[t]&&ce(e,u[t],r)).filter(Boolean);return{canDelete:o.every(e=>e.canDelete),canDeleteForAll:o.every(e=>e.canDeleteForAll)}}function ie(e,t){const n=e.fileUploads.byMessageLocalId[t.previousLocalId||t.id];return n?n.progress:void 0}function se(e,t,n){if(n===o.MAIN_THREAD_ID){const n=i(e,t);if(!n)return;if(!n.lastReadInboxMessageId)return;return n.lastMessage?Object(c.sb)(n.lastMessage)?n.lastMessage.id:Math.min(n.lastMessage.id,n.lastReadInboxMessageId):n.lastReadInboxMessageId}{const r=K(e,t,n);if(!r)return;return r.lastReadInboxMessageId?r.lastMessageId?Math.min(r.lastReadInboxMessageId,r.lastMessageId):r.lastReadInboxMessageId:r.topMessageId}}function fe(e,t,n){if(n===o.MAIN_THREAD_ID){const n=i(e,t);if(!n||!n.unreadCount)return}else{const r=K(e,t,n);if(!r||r.lastMessageId===r.lastReadInboxMessageId)return}const r=x(e,t,n),u=L(e,t,n),d=P(e,t);if(!d||!r&&!u)return;const c=se(e,t,n);if(r){const e=r.find(e=>!c||e>c&&d[e]&&!d[e].isOutgoing);if(e)return e}if(u){const e=u.find(e=>!c||e>c&&d[e]&&!d[e].isOutgoing);if(e)return e}}function le(e){const{forwardMessages:t}=e;return Boolean(t.isModalShown)}function be(e,t){const n=Object.values(e.chats.byId).find(e=>Object(c.ob)(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 u=i(e,Number(n));return u&&Object(c.ob)(u)&&r[u.id].byId[t]}))}function he(e){const{selectedMessages:t}=e;return Boolean(t)}function me(e,t){const{messageIds:n}=e.selectedMessages||{};return!!n&&n.includes(t)}function pe(e,t,n){const r=P(e,t);if(r)return Object.values(r).filter(e=>e.groupedId===n&&e.forwardInfo).map(({forwardInfo:e})=>e.fromMessageId)}function ge(e,t,n){const r=P(e,t);if(r)return Object.keys(r).map(Number).filter(e=>r[e].groupedId===n)}function ye(e,t,n){const{messageIds:r}=e.selectedMessages||{};if(!r)return!1;const u=ge(e,t,n);return u&&u.every(e=>r.includes(e))}function ve(e){const{messageIds:t}=e.selectedMessages||{};return t?t.length:0}function Ie(e,t){const n=i(e,t);if(!n)return;if(!l(e,n))return;const r=P(e,t),u=R(e,t,o.MAIN_THREAD_ID);if(!r||!u)return;const d=Object(j.g)(u,e=>!r[e].isOutgoing&&Boolean(r[e].keyboardButtons)),c=Object(j.g)(u,e=>Boolean(r[e].shouldHideKeyboardButtons));return d&&c&&c>d?void 0:d?r[d]:void 0}function we(e,t,n,r){const{shouldAutoDownloadMediaFromContacts:u,shouldAutoDownloadMediaInPrivateChats:o,shouldAutoDownloadMediaInGroups:d,shouldAutoDownloadMediaInChannels:a}=e.settings.byKey;return Boolean(o&&Object(c.lb)(n.id)||d&&Object(c.kb)(n)||a&&Object(c.jb)(n)||u&&r&&(r.id===e.currentUserId||function(e,t){return e.contactList&&e.contactList.userIds.includes(t.id)}(e,r)))}function Oe(e,t){const n=Object(c.O)(t);if(!n)return;const{shouldAutoPlayVideos:r,shouldAutoPlayGifs:u}=e.settings.byKey,o=n.isGif||n.isRound;return r&&!o||u&&o}function je(e){return e.settings.byKey.shouldLoopStickers}function Ce(e){const{chatId:t,threadId:n}=k(e)||{};if(!t||!n)return;const r=Object(c.a)(t,n),u=e.localTextSearch.byChatThreadKey[r];return u&&u.isActive?u:void 0}function Ee(e){const{byChatId:t}=e.localMediaSearch,{chatId:n}=k(e)||{},r=e.users.selectedId;return r&&t[r]?r:n}function Se(e){const t=Ee(e);if(t)return e.localMediaSearch.byChatId[t]}function Me(e,t){return e.management.byChatId[t]}function Ae(e){const{chatId:t,threadId:n}=k(e)||{};if(!t||!n)return;if(Object(c.lb)(t))return"user";const r=i(e,t);return r?Object(c.kb)(r)?"group":"channel":void 0}function ke(e){const{mediaViewer:t}=e;return Boolean(t.messageId||t.avatarOwnerId)}function Te(e){const{users:t,isChatInfoShown:n,isStatisticsShown:o}=e,d=function(e){const{pollResults:t}=e;return Boolean(t.messageId)}(e),c=Boolean(!u.f&&Ce(e)),a=function(e){const{chatId:t,threadId:n}=k(e)||{};if(!t||!n)return;const r=e.management.byChatId[t];return r&&r.isActive?r:void 0}(e),i=void 0!==C(e).query,s=void 0!==E(e).query,{chatId:f}=k(e)||{},l=t.selectedId,b=g(e),h=Boolean(l&&b),m=Boolean(f&&b)&&n;return d?r.l.PollResults:c?r.l.Search:a?r.l.Management:o?r.l.Statistics:i?r.l.StickerSearch:s?r.l.GifSearch:h?r.l.UserInfo:m?r.l.ChatInfo:void 0}function Pe(e){return void 0!==Te(e)}function Ne(e){return e.globalSearch.query}function De(e){return e.payment.messageId}function Le(e){return e.payment.formId}function xe(e){return e.payment.nativeParams?e.payment.nativeParams.publishableKey:void 0}function Be(e){return e.payment.stripeCredentials}},function(e,t,n){"use strict";n.d(t,"n",(function(){return u})),n.d(t,"e",(function(){return o})),n.d(t,"d",(function(){return d})),n.d(t,"b",(function(){return c})),n.d(t,"i",(function(){return a})),n.d(t,"k",(function(){return i})),n.d(t,"f",(function(){return s})),n.d(t,"l",(function(){return f})),n.d(t,"c",(function(){return l})),n.d(t,"j",(function(){return b})),n.d(t,"h",(function(){return h})),n.d(t,"g",(function(){return m})),n.d(t,"a",(function(){return p})),n.d(t,"m",(function(){return g})),n.d(t,"o",(function(){return v}));var r=n(1);const u=function(){const{userAgent:e,platform:t}=window.navigator;let n;return-1!==["Macintosh","MacIntel","MacPPC","Mac68K"].indexOf(t)?n="Mac OS":-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}(),o="Mac OS"===u,d="iOS"===u,c="Android"===u,a=/^((?!chrome|android).)*safari/i.test(navigator.userAgent),i=window.matchMedia("(pointer: coarse)").matches,s=window.innerWidth<=r.T||window.innerWidth<=r.S&&window.innerHeight<=r.R,f=navigator.mediaDevices&&"getUserMedia"in navigator.mediaDevices&&(window.AudioContext||window.webkitAudioContext),l=(document.documentElement.style,u&&(o||d)),b="serviceWorker"in navigator,h=b,m=(window,Boolean((new Audio).canPlayType("audio/ogg; codecs=opus"))),p=window.devicePixelRatio||1,g=d;let y;function v(){return Boolean(y)}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=>{y=e})},function(e,t,n){"use strict";t.a=(...e)=>e.filter(Boolean).join(" ")},function(e,t,n){"use strict";function r(e,t,n=!0,r=!0){let u;return(...o)=>{u?(clearTimeout(u),u=void 0):n&&e(...o),u=self.setTimeout(()=>{r&&e(...o),u=void 0},t)}}function u(e,t,n=!0){let r,u,o;return(...d)=>{u=!0,o=d,r||(n&&(u=!1,e(...o)),r=self.setInterval(()=>{if(!u)return self.clearInterval(r),void(r=void 0);u=!1,e(...o)},t))}}function o(e){return a(h,e)}function d(e){return a(m,e)}function c(e){return a(i,e)}function a(e,t){let n,r=!1;return(...u)=>{n=u,r||(r=!0,e(()=>{r=!1,t(...n)}))}}function i(e){Promise.resolve().then(e)}function s(e){self.requestIdleCallback?self.requestIdleCallback(e):i(e)}n.d(t,"a",(function(){return r})),n.d(t,"g",(function(){return u})),n.d(t,"i",(function(){return o})),n.d(t,"h",(function(){return d})),n.d(t,"j",(function(){return c})),n.d(t,"d",(function(){return i})),n.d(t,"c",(function(){return s})),n.d(t,"e",(function(){return f})),n.d(t,"f",(function(){return l})),n.d(t,"b",(function(){return h}));const f=e=>new Promise(t=>{setTimeout(()=>t(),e)});function l(){return new Promise(e=>{requestAnimationFrame(e)})}let b;function h(e,t=!1){b?t?b.unshift(e):b.push(e):(b=[e],requestAnimationFrame(()=>{const e=b;b=void 0,e.forEach(e=>e())}))}function m(e){return h(e,!0)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return y})),n.d(t,"c",(function(){return O})),n.d(t,"b",(function(){return j}));var r=n(1),u=n(13),o=n(11);var d=n(3),c=n.p+"en-extra.e73049da90714ecdae3233e8ffa74d39.json",a=n.p+"es-extra.b80575cdf988e1a7e3a915abe97f63b4.json",i=n.p+"it-extra.78e5568451a888818c7e2209e05a9602.json",s=n.p+"pl-extra.38fd67a6c26e58f5c912568332c7c074.json",f=n.p+"ru-extra.5761b75bfbe92bb46eb8bba9acbdbb4c.json",l=n(45);const b={en:c,es:a,it:i,pl:s,ru:f},h=["value","zeroValue","oneValue","twoValue","fewValue","manyValue","otherValue"],m={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},p=new Map;let g;const{addCallback:y,removeCallback:v,runCallbacks:I}=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 w;async function O(e,t){if(g&&e===w)return document.documentElement.lang=e,void(t&&t());const n=await async function(e){const t=await u.c(r.y,e,u.a.Json);if(t)return t;const n=await Object(o.a)("fetchLangPack",{sourceLangPacks:r.z,langCode:e});if(n)return await u.d(r.y,e,n.langPack),n.langPack;return}(e);if(n){if(b[e])try{const t=await fetch(b[e]),r=await t.json(),u=Object(d.i)(r,(e,t)=>({key:t,value:e}));Object.assign(n,u)}catch(e){r.l&&console.error(e)}p.clear(),w=e,g=n,document.documentElement.lang=e,t&&t(),I(g)}}function j(e,t,n){if(void 0!==t){const r=p.get(`${e}_${t}_${n}`);if(r)return r}if(!g)return e;const r=g[e];if(!r)return e;const u=r["number"==typeof t?function(e){const t=w&&m[w]?m[w](e):0;return h[t]}(t):"value"];if(!u||!u.trim()){const t=e.split(".");return t[t.length-1]}if(void 0!==t){const r=function(e,t){return e.replace(/%\d?\$?[sdf@]/,String(t))}(u,"i"===n?Object(l.a)(t):t);return p.set(`${e}_${t}_${n}`,r),r}return u}},function(e,t,n){"use strict";n.d(t,"c",(function(){return s})),n.d(t,"a",(function(){return f})),n.d(t,"b",(function(){return l}));var r=n(70),u=n.n(r),o=n(1),d=n(22);let c;const a=new Map,i=new Map;function s(e,t=""){return c||(o.l&&console.log(">>> START LOAD WORKER"),c=new u.a,function(e){c.addEventListener("message",({data:t})=>{if("update"===t.type)e(t.update);else if("methodResponse"===t.type){const e=a.get(t.messageId);e&&(t.error?e.reject(t.error):e.resolve(t.response))}else if("methodCallback"===t.type){const e=a.get(t.messageId);e&&e.callback&&e.callback(...t.callbackArgs)}else if("unhandledError"===t.type)throw t.error})}(e)),b({type:"initApi",args:[t]})}function f(e,...t){if(c)return b({type:"callMethod",name:e,args:t});o.l&&console.warn("API is not initialized")}function l(e){e.isCanceled=!0;const{messageId:t}=i.get(e)||{};t&&c.postMessage({type:"cancelProgress",messageId:t})}function b(e){const t=Object(d.a)(a),n={messageId:t,...e},r={messageId:t},u=new Promise((e,t)=>{Object.assign(r,{resolve:e,reject:t})});if("function"==typeof n.args[1]){const e=n.args.pop();r.callback=e,i.set(e,r)}return a.set(t,r),u.catch(()=>{}).finally(()=>{a.delete(t),r.callback&&i.delete(r.callback)}),c.postMessage(n),u}},function(e,t,n){"use strict";n.d(t,"a",(function(){return u})),n.d(t,"d",(function(){return c})),n.d(t,"c",(function(){return a})),n.d(t,"b",(function(){return s}));var r=n(1);let u;!function(e){e[e.Auth=0]="Auth",e[e.Main=1]="Main",e[e.Extra=2]="Extra"}(u||(u={}));const o={},d={};async function c(e,t){if(!o[e]){switch(e){case u.Auth:o[u.Auth]=n.e(4).then(n.bind(null,92));break;case u.Main:r.l&&console.log(">>> START LOAD MAIN BUNDLE"),o[u.Main]=Promise.all([n.e(0),n.e(3)]).then(n.bind(null,91));break;case u.Extra:o[u.Extra]=Promise.all([n.e(0),n.e(2)]).then(n.bind(null,90))}o[e].then(f)}const c=await o[e];return d[e]||(d[e]=c),a(e,t)}function a(e,t){const n=d[e];if(n)return n[t]}const i=[];function s(e){i.includes(e)||i.push(e)}function f(){i.forEach(e=>{e()})}},function(e,t,n){"use strict";n.d(t,"a",(function(){return u})),n.d(t,"c",(function(){return o})),n.d(t,"d",(function(){return d})),n.d(t,"b",(function(){return c}));const r=self.caches;let u;async function o(e,t,n){if(!r)return;const o=new Request(t),d=await r.open(e),c=await d.match(o);if(c)switch(n){case u.Text:return c.text();case u.Blob:{const e=await c.blob();if("sticker"===t.substr(0,7))return new Blob([e],{type:"image/webp"});if(!e.type){const t=c.headers.get("Content-Type");if(t)return new Blob([e],{type:t})}return e}case u.Json:return c.json();default:return}}async function d(e,t,n){if(!r)return;const u="string"==typeof n||n instanceof Blob?n:JSON.stringify(n),o=new Request(t),d=new Response(u);return(await r.open(e)).put(o,d)}function c(e){if(r)return r.delete(e)}!function(e){e[e.Text=0]="Text",e[e.Blob=1]="Blob",e[e.Json=2]="Json"}(u||(u={}))},function(e,t,n){"use strict";n.d(t,"d",(function(){return o})),n.d(t,"a",(function(){return d})),n.d(t,"b",(function(){return c})),n.d(t,"g",(function(){return a})),n.d(t,"h",(function(){return i})),n.d(t,"c",(function(){return s})),n.d(t,"e",(function(){return f})),n.d(t,"f",(function(){return l}));var r=n(9);function u(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}"undefined"==typeof File&&(self.File=class extends Blob{constructor(e,t,n){if(n){const{type:t,...r}=n;super(e,{type:t}),u(this,"name",void 0),Object.assign(this,r)}else super(e),u(this,"name",void 0);this.name=t}});function o(e){const t=e.split(","),n=t[0].match(/:(.*?);/)[1],r=atob(t[1]);let u=r.length;const o=new Uint8Array(u);for(;u--;)o[u]=r.charCodeAt(u);return new Blob([o],{type:n})}function d(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 c(e,t){return new File([e],t,{lastModified:Date.now(),type:e.type})}function a(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 s(e){const t=await i(e);return Promise.race([Object(r.e)(2e3),new Promise((e,n)=>{t.onseeked=()=>{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 f(e){return(await fetch(e)).blob()}function l(e){const t=document.createElement("canvas");t.width=e.width,t.height=e.height;return t.getContext("2d").drawImage(e,0,0),t}},function(e,t,n){"use strict";n.d(t,"b",(function(){return o}));const r=/\uFE0F/g,u=String.fromCharCode(8205);function o(e){return e.indexOf(u)<0?e.replace(r,""):e}t.a=/(?:\u2624|\ud83d\udc68\ud83c\udffb\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffc-\udfff]|\ud83d\udc68\ud83c\udffc\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb\udffd-\udfff]|\ud83d\udc68\ud83c\udffd\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb\udffc\udffe\udfff]|\ud83d\udc68\ud83c\udffe\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb-\udffd\udfff]|\ud83d\udc68\ud83c\udfff\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb-\udffe]|\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\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\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\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\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\ud83e\udd1d\u200d\ud83e\uddd1\ud83c[\udffb-\udfff]|\ud83e\uddd1\ud83c\udffc\u200d\ud83e\udd1d\u200d\ud83e\uddd1\ud83c[\udffb-\udfff]|\ud83e\uddd1\ud83c\udffd\u200d\ud83e\udd1d\u200d\ud83e\uddd1\ud83c[\udffb-\udfff]|\ud83e\uddd1\ud83c\udffe\u200d\ud83e\udd1d\u200d\ud83e\uddd1\ud83c[\udffb-\udfff]|\ud83e\uddd1\ud83c\udfff\u200d\ud83e\udd1d\u200d\ud83e\uddd1\ud83c[\udffb-\udfff]|\ud83e\uddd1\u200d\ud83e\udd1d\u200d\ud83e\uddd1|\ud83d\udc6b\ud83c[\udffb-\udfff]|\ud83d\udc6c\ud83c[\udffb-\udfff]|\ud83d\udc6d\ud83c[\udffb-\udfff]|\ud83d[\udc6b-\udc6d])|(?:\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\uddd6-\udddd])(?:\ud83c[\udffb-\udfff])?\u200d[\u2640\u2642]\ufe0f|(?:\ud83d\udc68\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68|\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\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d[\udc68\udc69]|\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\u2764\ufe0f\u200d\ud83d\udc68|\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\u2764\ufe0f\u200d\ud83d[\udc68\udc69]|\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|\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|\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-\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},function(e,t,n){"use strict";var r=n(0),u=n(20);n(86);t.a=Object(r.h)(({color:e="blue"})=>r.a.createElement("div",{className:"Loading"},r.a.createElement(u.a,{color:e,withBackground:"white"===e})))},function(e,t,n){"use strict";var r=n(0),u=n(12),o=n(29);t.a=(e,t,n=!1,d=!1)=>{const c=Object(u.c)(e,t),a=Object(o.a)();return d&&Object(u.b)(a),Object(r.n)(()=>{n||c||Object(u.d)(e,t).then(a)},[e,a,c,t,n]),c}},function(e,t,n){"use strict";let r,u,o,d,c,a,i,s,f,l,b,h;n.d(t,"e",(function(){return r})),n.d(t,"b",(function(){return u})),n.d(t,"m",(function(){return o})),n.d(t,"d",(function(){return d})),n.d(t,"c",(function(){return c})),n.d(t,"l",(function(){return a})),n.d(t,"h",(function(){return i})),n.d(t,"a",(function(){return s})),n.d(t,"j",(function(){return f})),n.d(t,"f",(function(){return l})),n.d(t,"k",(function(){return b})),n.d(t,"i",(function(){return h})),n.d(t,"n",(function(){return m})),n.d(t,"g",(function(){return p})),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"}(u||(u={})),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.FoldersIncludedChats=28]="FoldersIncludedChats",e[e.FoldersExcludedChats=29]="FoldersExcludedChats",e[e.TwoFaDisabled=30]="TwoFaDisabled",e[e.TwoFaNewPassword=31]="TwoFaNewPassword",e[e.TwoFaNewPasswordConfirm=32]="TwoFaNewPasswordConfirm",e[e.TwoFaNewPasswordHint=33]="TwoFaNewPasswordHint",e[e.TwoFaNewPasswordEmail=34]="TwoFaNewPasswordEmail",e[e.TwoFaNewPasswordEmailCode=35]="TwoFaNewPasswordEmailCode",e[e.TwoFaEnabled=36]="TwoFaEnabled",e[e.TwoFaChangePasswordCurrent=37]="TwoFaChangePasswordCurrent",e[e.TwoFaChangePasswordNew=38]="TwoFaChangePasswordNew",e[e.TwoFaChangePasswordConfirm=39]="TwoFaChangePasswordConfirm",e[e.TwoFaChangePasswordHint=40]="TwoFaChangePasswordHint",e[e.TwoFaTurnOff=41]="TwoFaTurnOff",e[e.TwoFaRecoveryEmailCurrentPassword=42]="TwoFaRecoveryEmailCurrentPassword",e[e.TwoFaRecoveryEmail=43]="TwoFaRecoveryEmail",e[e.TwoFaRecoveryEmailCode=44]="TwoFaRecoveryEmailCode",e[e.TwoFaCongratulations=45]="TwoFaCongratulations"}(o||(o={})),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"}(d||(d={})),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"}(c||(c={})),function(e){e[e.ChatInfo=0]="ChatInfo",e[e.UserInfo=1]="UserInfo",e[e.Search=2]="Search",e[e.Management=3]="Management",e[e.Statistics=4]="Statistics",e[e.StickerSearch=5]="StickerSearch",e[e.GifSearch=6]="GifSearch",e[e.PollResults=7]="PollResults"}(a||(a={})),function(e){e[e.Inline=0]="Inline",e[e.ScheduledInline=1]="ScheduledInline",e[e.SharedMedia=2]="SharedMedia",e[e.ProfileAvatar=3]="ProfileAvatar",e[e.MiddleHeaderAvatar=4]="MiddleHeaderAvatar",e[e.Album=5]="Album",e[e.ScheduledAlbum=6]="ScheduledAlbum",e[e.SearchResult=7]="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"}(s||(s={})),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.Idle=0]="Idle",e[e.InProgress=1]="InProgress",e[e.Complete=2]="Complete",e[e.Error=3]="Error"}(l||(l={})),function(e){e[e.Profile=0]="Profile",e[e.SharedMedia=1]="SharedMedia",e[e.MemberList=2]="MemberList"}(b||(b={})),function(e){e[e.ShippingInfo=0]="ShippingInfo",e[e.Shipping=1]="Shipping",e[e.PaymentInfo=2]="PaymentInfo",e[e.Checkout=3]="Checkout"}(h||(h={}));const m="UPLOADING_WALLPAPER_SLUG";let p;!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"}(p||(p={}))},function(e,t,n){"use strict";n.d(t,"d",(function(){return u})),n.d(t,"e",(function(){return o})),n.d(t,"b",(function(){return d})),n.d(t,"c",(function(){return c})),n.d(t,"a",(function(){return r}));var r="AF🇦🇫93Afghanistan\nAO🇦🇴244Angola\nAL🇦🇱355Albania\nAD🇦🇩376Andorra\nAE🇦🇪971United Arab Emirates\nAR🇦🇷54Argentina\nAM🇦🇲374Armenia\nAG🇦🇬1268Antigua and Barbuda\nAU🇦🇺61Australia\nAT🇦🇹43Austria\nAZ🇦🇿994Azerbaijan\nBI🇧🇮257Burundi\nBE🇧🇪32Belgium\nBJ🇧🇯229Benin\nBF🇧🇫226Burkina Faso\nBD🇧🇩880Bangladesh\nBG🇧🇬359Bulgaria\nBH🇧🇭973Bahrain\nBS🇧🇸1242Bahamas\nBA🇧🇦387Bosnia and Herzegovina\nBY🇧🇾375Belarus\nBZ🇧🇿501Belize\nBO🇧🇴591Bolivia\nBR🇧🇷55Brazil\nBB🇧🇧1246Barbados\nBN🇧🇳673Brunei\nBT🇧🇹975Bhutan\nBW🇧🇼267Botswana\nCF🇨🇫236Central African Republic\nCA🇨🇦1Canada\nCH🇨🇭41Switzerland\nCL🇨🇱56Chile\nCN🇨🇳86China\nCI🇨🇮225Ivory Coast\nCM🇨🇲237Cameroon\nCD🇨🇩243DR Congo\nCG🇨🇬242Republic of the Congo\nCO🇨🇴57Colombia\nKM🇰🇲269Comoros\nCV🇨🇻238Cape Verde\nCR🇨🇷506Costa Rica\nCU🇨🇺53Cuba\nCY🇨🇾357Cyprus\nCZ🇨🇿420Czechia\nDE🇩🇪49Germany\nDJ🇩🇯253Djibouti\nDM🇩🇲1767Dominica\nDK🇩🇰45Denmark\nDO🇩🇴1Dominican Republic\nDZ🇩🇿213Algeria\nEC🇪🇨593Ecuador\nEG🇪🇬20Egypt\nER🇪🇷291Eritrea\nES🇪🇸34Spain\nEE🇪🇪372Estonia\nET🇪🇹251Ethiopia\nFI🇫🇮358Finland\nFJ🇫🇯679Fiji\nFR🇫🇷33France\nFM🇫🇲691Micronesia\nGA🇬🇦241Gabon\nGB🇬🇧44United Kingdom\nGE🇬🇪995Georgia\nGH🇬🇭233Ghana\nGN🇬🇳224Guinea\nGM🇬🇲220Gambia\nGW🇬🇼245Guinea-Bissau\nGQ🇬🇶240Equatorial Guinea\nGR🇬🇷30Greece\nGD🇬🇩1473Grenada\nGT🇬🇹502Guatemala\nGY🇬🇾592Guyana\nHN🇭🇳504Honduras\nHR🇭🇷385Croatia\nHT🇭🇹509Haiti\nHU🇭🇺36Hungary\nID🇮🇩62Indonesia\nIN🇮🇳91India\nIE🇮🇪353Ireland\nIR🇮🇷98Iran\nIQ🇮🇶964Iraq\nIS🇮🇸354Iceland\nIL🇮🇱972Israel\nIT🇮🇹39Italy\nJM🇯🇲1876Jamaica\nJO🇯🇴962Jordan\nJP🇯🇵81Japan\nKZ🇰🇿7Kazakhstan\nKE🇰🇪254Kenya\nKG🇰🇬996Kyrgyzstan\nKH🇰🇭855Cambodia\nKI🇰🇮686Kiribati\nKN🇰🇳1869Saint Kitts and Nevis\nKR🇰🇷82South Korea\nKW🇰🇼965Kuwait\nLA🇱🇦856Laos\nLB🇱🇧961Lebanon\nLR🇱🇷231Liberia\nLY🇱🇾218Libya\nLC🇱🇨1758Saint Lucia\nLI🇱🇮423Liechtenstein\nLK🇱🇰94Sri Lanka\nLS🇱🇸266Lesotho\nLT🇱🇹370Lithuania\nLU🇱🇺352Luxembourg\nLV🇱🇻371Latvia\nMA🇲🇦212Morocco\nMC🇲🇨377Monaco\nMD🇲🇩373Moldova\nMG🇲🇬261Madagascar\nMV🇲🇻960Maldives\nMX🇲🇽52Mexico\nMH🇲🇭692Marshall Islands\nMK🇲🇰389North Macedonia\nML🇲🇱223Mali\nMT🇲🇹356Malta\nMM🇲🇲95Myanmar\nME🇲🇪382Montenegro\nMN🇲🇳976Mongolia\nMZ🇲🇿258Mozambique\nMR🇲🇷222Mauritania\nMU🇲🇺230Mauritius\nMW🇲🇼265Malawi\nMY🇲🇾60Malaysia\nNA🇳🇦264Namibia\nNE🇳🇪227Niger\nNG🇳🇬234Nigeria\nNI🇳🇮505Nicaragua\nNL🇳🇱31Netherlands\nNO🇳🇴47Norway\nNP🇳🇵977Nepal\nNR🇳🇷674Nauru\nNZ🇳🇿64New Zealand\nOM🇴🇲968Oman\nPK🇵🇰92Pakistan\nPA🇵🇦507Panama\nPE🇵🇪51Peru\nPH🇵🇭63Philippines\nPW🇵🇼680Palau\nPG🇵🇬675Papua New Guinea\nPL🇵🇱48Poland\nKP🇰🇵850North Korea\nPT🇵🇹351Portugal\nPY🇵🇾595Paraguay\nQA🇶🇦974Qatar\nRO🇷🇴40Romania\nRU🇷🇺7Russia\nRW🇷🇼250Rwanda\nSA🇸🇦966Saudi Arabia\nSD🇸🇩249Sudan\nSN🇸🇳221Senegal\nSG🇸🇬65Singapore\nSB🇸🇧677Solomon Islands\nSL🇸🇱232Sierra Leone\nSV🇸🇻503El Salvador\nSM🇸🇲378San Marino\nSO🇸🇴252Somalia\nRS🇷🇸381Serbia\nSS🇸🇸211South Sudan\nST🇸🇹239São Tomé and Príncipe\nSR🇸🇷597Suriname\nSK🇸🇰421Slovakia\nSI🇸🇮386Slovenia\nSE🇸🇪46Sweden\nSZ🇸🇿268Eswatini\nSC🇸🇨248Seychelles\nSY🇸🇾963Syria\nTD🇹🇩235Chad\nTG🇹🇬228Togo\nTH🇹🇭66Thailand\nTJ🇹🇯992Tajikistan\nTM🇹🇲993Turkmenistan\nTL🇹🇱670Timor-Leste\nTO🇹🇴676Tonga\nTT🇹🇹1868Trinidad and Tobago\nTN🇹🇳216Tunisia\nTR🇹🇷90Turkey\nTV🇹🇻688Tuvalu\nTZ🇹🇿255Tanzania\nUG🇺🇬256Uganda\nUA🇺🇦380Ukraine\nUY🇺🇾598Uruguay\nUS🇺🇸1United States\nUZ🇺🇿998Uzbekistan\nVA🇻🇦3Vatican City\nVC🇻🇨1784Saint Vincent and the Grenadines\nVE🇻🇪58Venezuela\nVN🇻🇳84Vietnam\nVU🇻🇺678Vanuatu\nWS🇼🇸685Samoa\nYE🇾🇪967Yemen\nZA🇿🇦27South Africa\nZM🇿🇲260Zambia\nZW🇿🇼263Zimbabwe".split("\n").map(e=>({id:e.substr(0,2),flag:e.substr(2,4),code:"+"+e.match(/\d+/)[0],name:e.split(/\d+/)[1]}));function u(e){return r.find(t=>t.id===e)}function o(e){let t=e.replace(/[^\d+]+/g,"");t.startsWith("+")||(t="+"+t);const n=r.filter(e=>t.startsWith(e.code)).sort((e,t)=>e.code.length-t.code.length);return n[n.length-1]}function d(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){switch(e?e.id:"UNKNOWN"){case"RU":case"US":return/(\d{1,3})(\d{1,3})?(\d{1,2})?(\d{1,2})?()?/;case"GB":return/(\d{1,4})(\d{1,5})?()?()?()?/;case"UA":case"FI":case"AE":return/(\d{1,2})(\d{1,3})?(\d{1,2})?(\d{1,2})?()?/;default:return/(\d{1,3})(\d{1,3})?(\d{1,3})?(\d{1,3})?(\d{1,3})?/}}(t),(e,n,r,u,o,d)=>{const c=t&&"GB"===t.id?" ":"-";let a="";return n&&(a=""+n),r&&(a+=" "+r),u&&(a+=`${c}${u}`),o&&(a+=`${c}${o}`),d&&(a+=`${c}${d}`),a}),n}function c(e){const t=e.startsWith("+")?e:"+"+e,n=o(t);return n?`${n.code} ${d(t,n)}`:t}},function(e,t,n){"use strict";var r=n(0),u=n(8);n(78);t.a=({color:e="blue",withBackground:t})=>r.a.createElement("div",{className:Object(u.a)("Spinner",e,t&&"with-background")},r.a.createElement("div",null))},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(1),u=n(9);window.addEventListener("error",c),window.addEventListener("unhandledrejection",c);const o=Date.now();let d=!1;function c(e){e.preventDefault(),a(e instanceof ErrorEvent?e.error:e.reason)}Object(u.g)(window.alert,1e3);function a(e){if(console.error(e),!d){if(Date.now()-o<=5e3){if(localStorage.getItem(r.v))localStorage.removeItem(r.v);else{if(!localStorage.getItem(r.w))return;localStorage.removeItem(r.w)}return d=!0,void window.location.reload()}0}}},function(e,t,n){"use strict";t.a=e=>{let t;do{t=String(Math.random()).replace("0.","id")}while(e.hasOwnProperty(t));return t}},function(e,t,n){"use strict";n.d(t,"c",(function(){return c})),n.d(t,"d",(function(){return a})),n.d(t,"e",(function(){return i})),n.d(t,"h",(function(){return s})),n.d(t,"f",(function(){return f})),n.d(t,"g",(function(){return l})),n.d(t,"a",(function(){return b})),n.d(t,"b",(function(){return h}));var r=n(1),u=n(28),o=n(3);const d=[1,8,5,2,7,4,6];function c(e){if(e)switch(e.type){case"userTypeBot":case"userTypeRegular":return e.firstName;case"userTypeDeleted":case"userTypeUnknown":return"Deleted";default:return}}function a(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 i(e,t){if(e.id===r.Z)return t("ServiceNotifications").toLowerCase();if(e.type&&"userTypeBot"===e.type)return"bot";if(!e.status)return"";switch(e.status.type){case"userStatusEmpty":return t("ALongTimeAgo");case"userStatusLastMonth":return t("WithinAMonth");case"userStatusLastWeek":return t("WithinAWeek");case"userStatusOffline":{const{wasOnline:n}=e.status;if(!n)return t("LastSeen.Offline");const r=new Date,o=new Date(1e3*n);if(o>=r)return t("LastSeen.JustNow");const d=new Date(r.getTime()-o.getTime());if(d.getTime()/1e3<60)return t("LastSeen.JustNow");if(d.getTime()/1e3<3600){return t("LastSeen.MinutesAgo",Math.floor(d.getTime()/1e3/60))}const c=new Date;if(c.setHours(0,0,0,0),o>c){if(d.getTime()/1e3<21600){return t("LastSeen.HoursAgo",Math.floor(d.getTime()/1e3/60/60))}return t("LastSeen.TodayAt",Object(u.h)(o))}const a=new Date;return a.setDate(r.getDate()-1),c.setHours(0,0,0,0),o>a?t("LastSeen.YesterdayAt",Object(u.h)(o)):t("LastSeen.AtDate",Object(u.b)(o))}case"userStatusOnline":return t("Online");case"userStatusRecently":return t("Lately");default:return}}function s(e){const{id:t,status:n,type:u}=e;return!!n&&(t!==r.Z&&("userStatusOnline"===n.type&&"userTypeBot"!==u))}function f(e){return!(!e.status||"userTypeBot"===e.type||e.id===r.Z)&&("userTypeDeleted"===e.type||"userTypeUnknown"===e.type)}function l(e){return"userTypeBot"===e.type}function b(e,t,n){return Object(o.k)(e,e=>{const r=Date.now()/1e3;if(n&&n.includes(e))return r+172800-n.indexOf(e);const u=t[e];if(!u||!u.status)return 0;if("userStatusOnline"===u.status.type)return u.status.expires;if("userStatusOffline"===u.status.type&&u.status.wasOnline)return u.status.wasOnline;switch(u.status.type){case"userStatusRecently":return r-86400;case"userStatusLastWeek":return r-604800;case"userStatusLastMonth":return r-18144e3;default:return 0}},"desc")}function h(e){const t=e?Math.abs(e.id)%7:0;return d[t]}},function(e,t,n){"use strict";n.d(t,"w",(function(){return a})),n.d(t,"v",(function(){return i})),n.d(t,"t",(function(){return s})),n.d(t,"y",(function(){return f})),n.d(t,"u",(function(){return l})),n.d(t,"z",(function(){return b})),n.d(t,"j",(function(){return h})),n.d(t,"p",(function(){return m})),n.d(t,"i",(function(){return p})),n.d(t,"e",(function(){return g})),n.d(t,"f",(function(){return y})),n.d(t,"d",(function(){return v})),n.d(t,"x",(function(){return I})),n.d(t,"r",(function(){return w})),n.d(t,"m",(function(){return O})),n.d(t,"A",(function(){return j})),n.d(t,"c",(function(){return C})),n.d(t,"a",(function(){return E})),n.d(t,"o",(function(){return S})),n.d(t,"h",(function(){return M})),n.d(t,"g",(function(){return A})),n.d(t,"s",(function(){return k})),n.d(t,"b",(function(){return T})),n.d(t,"C",(function(){return P})),n.d(t,"B",(function(){return N})),n.d(t,"l",(function(){return D})),n.d(t,"k",(function(){return L})),n.d(t,"q",(function(){return x})),n.d(t,"n",(function(){return B}));var r=n(5),u=n(1),o=n(3),d=n(23),c=n(10);function a(e){return e>0}function i(e){return s(e)||f(e)}function s(e){return"chatTypeBasicGroup"===e.type}function f(e){return"chatTypeSuperGroup"===e.type}function l(e){return"chatTypeChannel"===e.type}function b(e){return"chatTypePrivate"===e.type||"chatTypeBasicGroup"===e.type}function h(e){switch(e.type){case"chatTypePrivate":return"PrivateChat";case"chatTypeBasicGroup":case"chatTypeSuperGroup":return"AccDescrGroup";case"chatTypeChannel":return"AccDescrChannel";default:return"Chat"}}function m(e){if("chatTypePrivate"===e.type||"chatTypeSecret"===e.type)return e.id}function p(e,t){return t&&e.id===t.id&&t.isSelf?Object(c.b)("SavedMessages"):e.title||Object(c.b)("HiddenName")}function g(e){if(e.fullInfo)return e.fullInfo.about}function y(e){const{username:t}=e,{inviteLink:n}=e.fullInfo||{};return n&&n.length?n:t?"t.me/"+t:""}function v(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 w(e){return Boolean(e.adminRights)}function O(e,t){return!!e.adminRights&&e.adminRights[t]}function j(e,t){return Boolean(e.currentUserBannedRights&&e.currentUserBannedRights[t]||e.defaultBannedRights&&e.defaultBannedRights[t])}function C(e,t){return t!==r.MAIN_THREAD_ID||!(e.isRestricted||e.migratedTo||e.isNotJoined)&&(!!e.isCreator||(!!a(e.id)||(l(e)?O(e,"postMessages"):w(e)||!j(e,"sendMessages"))))}function E(e,t=!1){if(!e)return{canAttachMedia:!1,canAttachPolls:!1,canSendStickers:!1,canSendGifs:!1,canAttachEmbedLinks:!1};const n=w(e);return{canAttachMedia:n||!j(e,"sendMedia"),canAttachPolls:(n||!j(e,"sendPolls"))&&(!a(e.id)||t),canSendStickers:n||!j(e,"sendStickers"),canSendGifs:n||!j(e,"sendGifs"),canAttachEmbedLinks:n||!j(e,"embedLinks")}}function S(e){return e.currentUserBannedRights&&e.currentUserBannedRights.sendMessages?"You are not allowed to send messages in this chat.":e.defaultBannedRights&&e.defaultBannedRights.sendMessages?"Sending messages is not allowed in this chat.":void 0}function M(e){if(e&&e.fullInfo)return e.fullInfo.slowMode}function A(e){return Math.max(e.joinDate||0,e.lastMessage?e.lastMessage.date:0)}function k(e){return e.folderId===u.f}function T(e){return s(e)||(f(e)||l(e))&&e.isCreator}function P(e,t,n,r){const u=n.excludedChatIds?new Set(n.excludedChatIds):void 0,o=n.excludedChatIds?new Set(n.includedChatIds):void 0,d=n.excludedChatIds?new Set(n.pinnedChatIds):void 0;return[(r||Object.keys(e).map(Number)).filter(r=>function(e,t,n,r,u,o){if(r&&r.has(e.id))return!1;if(u&&u.has(e.id))return!0;if(o&&o.has(e.id))return!0;if(k(e)&&t.excludeArchived)return!1;if(e.isMuted&&t.excludeMuted)return!1;if(!e.unreadCount&&!e.unreadMentionsCount&&!e.hasUnreadMark&&t.excludeRead)return!1;if(a(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(i(e))return!!t.groups;if(l(e))return!!t.channels}return!1}(e[r],n,t,u,o,d)),n.pinnedChatIds]}function N(e,t,n,r="all"){function u(e){if(!e||!e.lastMessage||e.migratedTo)return!1;switch(r){case"all":if(k(e))return!1;break;case"archived":if(!k(e))return!1}return!e.isRestricted&&!e.isNotJoined}const d=t.map(t=>e[t]).filter(u),c=new Set(t);return{pinnedChats:n?n.map(t=>e[t]).filter(u).filter(e=>c.has(e.id)):[],otherChats:Object(o.k)(n?d.filter(e=>!n.includes(e.id)):d,A,"desc")}}function D(e,t,n,r){const[u]=P(e,t,n,r),o=u.map(t=>e[t]).filter(e=>e&&e.lastMessage&&!e.isRestricted&&!e.isNotJoined);return{unreadDialogsCount:o.reduce((e,t)=>t.unreadCount||t.hasUnreadMark?e+1:e,0),hasActiveDialogs:o.some(e=>e.unreadMentionsCount||!e.isMuted&&(e.unreadCount||e.hasUnreadMark))}}function L(e,t,n,r,u){const{id:o,title:d,emoticon:c,description:a,pinnedChatIds:i,excludedChatIds:s,includedChatIds:f,excludeArchived:l,excludeMuted:b,excludeRead:h,...m}=n;if(Object.values(m).filter(Boolean).length>1||s&&s.length||f&&f.length){return u("Chats",function(e,t,n,r){const[u,o]=P(e,t,n,r),{pinnedChats:d,otherChats:c}=N(e,u,o,"folder");return d.length+c.length}(e,t,n,r))}return m.bots?u("FilterBots"):m.groups?u("FilterGroups"):m.channels?u("FilterChannels"):m.contacts?u("FilterContacts"):m.nonContacts?u("FilterNonContacts"):void 0}function x(e){return!!e&&e.id<0}function B(e,t){if(t&&!a(e))return t.isSelf?"You":Object(d.c)(t)}},function(e,t,n){"use strict";function r(e,t){const n=Object.keys(e);return n.length===Object.keys(t).length&&n.every(n=>e[n]===t[n])}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return a})),n.d(t,"c",(function(){return i})),n.d(t,"b",(function(){return b}));var r=n(1);const u=new Set(["scroll","mouseenter","mouseleave"]),o={},d=new Map,c={};function a(e,t,n){const r=s(t,e);f(r,e)?function(e,t,n){c[e]||(c[e]=0,document.addEventListener(e,h));(function(e){o[e]||(o[e]=new Map);return o[e]})(e).set(t,n),function(e){const t=d.get(e);if(t)return t;const n=new Set;return d.set(e,n),n}(t).add(e),c[e]++}(r,e,n):e.addEventListener(r,n)}function i(e,t,n){const r=s(t,e);f(r,e)?l(r,e):e.removeEventListener(r,n)}function s(e,t){const n=e.replace(/^on/,"").toLowerCase();return"change"===n&&"SELECT"!==t.tagName?"input":"doubleclick"===n?"dblclick":"focus"===n?"focusin":"blur"===n?"focusout":n}function f(e,t){return!u.has(e)&&"VIDEO"!==t.tagName&&"IFRAME"!==t.tagName}function l(e,t){c[e]--,c[e]||document.removeEventListener(e,h),o[e].delete(t),d.get(t).delete(e)}function b(e){const t=d.get(e);t&&(t.forEach(t=>l(t,e)),d.delete(e))}function h(e){const t=o[e.type];if(t){let n=!1,r=e.target;const u=()=>{n=!0},o=()=>{e.preventDefault()},d=new Proxy(e,{get:(e,t)=>"currentTarget"===t?r:"stopPropagation"===t||"stopImmediatePropagation"===t?u:"preventDefault"===t?o:Reflect.get(e,t)});for(;r&&r!==document.body;){const e=t.get(r);if(e&&(e(d),n))return;r=r.parentNode}}}r.l&&document.addEventListener("dblclick",()=>{console.log("DELEGATED EVENTS",{delegationRegistry:o,delegatedEventsByElement:d,documentEventCounters:c})})},function(e,t,n){"use strict";var r=n(0),u=n(8);t.a=(e=!1,t,n=!1,o="fast",d=!1)=>{const[c,a]=Object(r.r)(!e),i=Object(r.q)(),[s,f]=Object(r.r)(!1);e?(a(!1),f(!0),i.current&&(window.clearTimeout(i.current),i.current=void 0)):(f(!1),c||i.current||(i.current=window.setTimeout(()=>{a(!0),t&&t(),i.current=void 0},d?0:350)));const l=s||e&&n,b=Boolean(i.current),h=e||b;return{shouldRender:h,transitionClassNames:Object(u.a)(o&&"opacity-transition",o,l&&"open",h&&"shown",b&&"closing")}}},function(e,t,n){"use strict";n.d(t,"j",(function(){return a})),n.d(t,"k",(function(){return i})),n.d(t,"n",(function(){return s})),n.d(t,"h",(function(){return l})),n.d(t,"g",(function(){return b})),n.d(t,"b",(function(){return h})),n.d(t,"f",(function(){return m})),n.d(t,"c",(function(){return p})),n.d(t,"d",(function(){return y})),n.d(t,"e",(function(){return v})),n.d(t,"i",(function(){return I})),n.d(t,"a",(function(){return w})),n.d(t,"l",(function(){return j})),n.d(t,"m",(function(){return C}));var r=n(41),u=n(10);const o=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],d=["January","February","March","April","May","June","July","August","September","October","November","December"],c=d.map(e=>e.toLowerCase());function a(e){const t=new Date(e);return t.setHours(0,0,0,0),t}function i(e){return a(e).getTime()}function s(e){const t=new Date(1e3*e);return`${t.getFullYear()}-${t.getMonth()}`}function f(e){return`${e.getFullYear()}-${e.getMonth()+1}-${e.getDate()}`}function l(e){const t="number"==typeof e?new Date(e):e;return`${String(t.getHours()).padStart(2,"0")}:${String(t.getMinutes()).padStart(2,"0")}`}function b(e){const t="number"==typeof e?new Date(e):e,n=a(new Date);if(t>=n)return l(t);const r=new Date(n);if(r.setDate(n.getDate()-7),t>=r)return Object(u.b)("Weekday.Short"+o[t.getDay()]);const d=t.getFullYear()!==n.getFullYear();return g(t,Object(u.b)(d?"formatDateScheduleYear":"formatDateSchedule")||(d?"d MMM yyyy":"d MMM"))}function h(e){return g("number"==typeof e?new Date(e):e,Object(u.b)("formatterYearMax")||"dd.MM.yyyy")}function m(e,t=!1){return g(e,Object(u.b)(t?"formatterMonthYear2":"formatterMonthYear")||"MMM yyyy")}function p(e,t=!1,n=!1){const r="number"==typeof e?new Date(e):e,d=a(new Date);if(!n){if(f(r)===f(d))return(t?E:S)(Object(u.b)("Weekday.Today"));const e=new Date(d);if(e.setDate(d.getDate()-1),f(r)===f(e))return(t?E:S)(Object(u.b)("Weekday.Yesterday"));const n=new Date(d),c=new Date(d);if(n.setDate(d.getDate()-7),c.setDate(d.getDate()+7),r>=n&&r<=c){const e=o[r.getDay()];return t?E(Object(u.b)("Weekday.Short"+e)):S(Object(u.b)("Weekday."+e))}}const c=r.getFullYear()!==d.getFullYear(),i=t?c?"formatDateScheduleYear":"formatDateSchedule":c?"chatFullDate":"chatDate";return(t?E:S)(g(r,Object(u.b)(i)||"d MMMM yyyy"))}function g(e,t){const n=e.getDate(),r=e.getMonth();return t.replace("LLLL",Object(u.b)(d[r])).replace("MMMM",Object(u.b)("Month.Gen"+d[r])).replace("MMM",Object(u.b)("Month.Short"+d[r])).replace("MM",String(r+1).padStart(2,"0")).replace("dd",String(n).padStart(2,"0")).replace("d",String(n)).replace("yyyy",String(e.getFullYear()))}function y(e){const t="number"==typeof e?new Date(e):e;return`${p(t,!0)}, ${l(t)}`}function v(e){const t=Math.floor(e/3600),n=Math.floor(e%3600/60),r=Math.floor(e%3600%60);let u="";return t>0?(u+=String(t).padStart(2,"0")+":",u+=String(n).padStart(2,"0")+":"):u+=String(n)+":",u+=String(r).padStart(2,"0"),u}function I(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 u=(e=Math.floor(e/60))%60;e-=u;const o=(e=Math.floor(e/60))%60;return o>0&&t.push(String(o).padStart(2,"0")),t.push(String(u).padStart(o>0?2:1,"0")),t.push(String(r).padStart(2,"0")),`${t.join(":")},${String(n).padStart(2,"0")}`}function w(e){return e.toLocaleString("en-US",{year:"numeric",month:"short",day:"numeric"})}function O(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 j(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||!O(t,n-1,r||void 0)?void 0:`${r?r+"-":""}${String(n).padStart(2,"0")}-${String(t).padStart(2,"0")}`}const u=e.split(" "),o=t?u[0]:u[1],d=(t?u[1]:u[0]).toLowerCase(),a=c.findIndex(e=>e.startsWith(d));return-1!==a&&O(Number(o),a)?`${String(a+1).padStart(2,"0")}-${String(o).padStart(2,"0")}`:void 0}function C(e){return e+r.j/1e3}function E(e){return`${e[0].toLowerCase()}${e.slice(1)}`}function S(e){return`${e[0].toUpperCase()}${e.slice(1)}`}},function(e,t,n){"use strict";var r=n(0);t.a=()=>{const[,e]=Object(r.r)(!1);return Object(r.m)(()=>{e(e=>!e)},[])}},function(e){e.exports=JSON.parse('{"--color-primary":["#50A2E9","#868DF5"],"--color-background":["#FFFFFF","#212121"],"--color-background-own":["#EEFEDF","#A45D37"],"--color-chat-hover":["#F4F4F5","#2C2C2C"],"--color-chat-active":["#ededed","#292929"],"--color-text":["#000000","#FFFFFF"],"--color-text-secondary":["#707579","#AAAAAA"],"--color-borders":["#DADCE0","#100F10"],"--color-borders-input":["#DADCE0","#5B5B5A"],"--color-links":["#52A1EF","#868DF6"],"--color-gray":["#C4C9CC","#808080"],"--color-default-shadow":["#72727240","#21212140"],"--color-light-shadow":["#7272722B","#00000040"],"--color-green":["#4DCD5E","#868DF5"],"--color-text-meta-colored":["#4DCD5E","#868DF5"],"--color-reply-own-hover":["#DBF4CE","#A26947"],"--color-reply-own-active":["#C8EBBC","#B0714C"],"--color-accent-own":["#4FAE4E","#FFFFFF"],"--color-message-meta-own":["#4FAE4E","#D9BDAD"],"--color-own-links":["#52A1EF","#FFFFFF"],"--color-code-own":["#3C7940","#FFFFFF"]}')},function(e,t,n){"use strict";var r=n(0),u=n(8),o=n(20),d=n(33);n(80);t.a=({ref:e,type:t="button",onClick:n,onContextMenu:c,onMouseDown:a,onMouseEnter:i,onMouseLeave:s,onFocus:f,children:l,size:b="default",color:h="primary",className:m,round:p,pill:g,fluid:y,isText:v,isLoading:I,ariaLabel:w,href:O,download:j,disabled:C,ripple:E,faded:S,tabIndex:M})=>{let A=Object(r.q)(null);e&&(A=e);const[k,T]=Object(r.r)(!1),P=Object(u.a)("Button",m,b,h,p&&"round",g&&"pill",y&&"fluid",C&&"disabled",v&&"text",I&&"loading",E&&"has-ripple",S&&"faded",k&&"clicked"),N=Object(r.m)(e=>{!C&&n&&n(e),T(!0),setTimeout(()=>{T(!1)},400)},[C,n]),D=Object(r.m)(e=>{e.preventDefault(),!C&&a&&a(e)},[a,C]);return O?r.a.createElement("a",{ref:A,className:P,href:O,title:w,download:j,tabIndex:M},l,!C&&E&&r.a.createElement(d.a,null)):r.a.createElement("button",{ref:A,type:t,className:P,onClick:N,onContextMenu:c,onMouseDown:D,onMouseEnter:i&&!C?i:void 0,onMouseLeave:s&&!C?s:void 0,onFocus:f&&!C?f:void 0,"aria-label":w,title:w,tabIndex:M},I?r.a.createElement("div",null,r.a.createElement("span",null,"Please wait.."),r.a.createElement(o.a,{color:v?"blue":"white"})):l,!C&&E&&r.a.createElement(d.a,null))}},function(e,t,n){"use strict";var r=n(0),u=n(8);n(83);t.a=e=>{const{icon:t,className:n,children:o,onClick:d,href:c,download:a,disabled:i,destructive:s,ariaLabel:f}=e,l=Object(r.m)(e=>{if(i||!d)return e.stopPropagation(),void e.preventDefault();d(e)},[i,d]),b=Object(r.m)(e=>{if(13===e.keyCode||32===e.keyCode)return i||!d?(e.stopPropagation(),void e.preventDefault()):void d(e)},[i,d]),h=Object(u.a)("MenuItem",n,i&&"disabled",s&&"destructive"),m=r.a.createElement(r.a.Fragment,null,t&&r.a.createElement("i",{className:"icon-"+t}),o);return c?r.a.createElement("a",{tabIndex:0,className:h,href:c,download:a,"aria-label":f,title:f},m):r.a.createElement("div",{role:"button",tabIndex:0,className:h,onClick:l,onKeyDown:b,"aria-label":f,title:f},m)}},function(e,t,n){"use strict";var r=n(0),u=n(9);n(79);t.a=()=>{const[e,t]=Object(r.r)([]),n=Object(r.p)(()=>Object(u.a)(()=>{t([])},700,!1),[]),o=Object(r.m)(r=>{if(0!==r.button)return;const u=r.currentTarget,o=u.getBoundingClientRect(),d=u.offsetWidth/2;t([...e,{x:r.clientX-o.x-d/2,y:r.clientY-o.y-d/2,size:d}]),requestAnimationFrame(()=>{n()})},[e,n]);return r.a.createElement("div",{className:"ripple-container",onMouseDown:o},e.map(({x:e,y:t,size:n})=>r.a.createElement("span",{style:`left: ${e}px; top: ${t}px; width: ${n}px; height: ${n}px;`})))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return f})),n.d(t,"c",(function(){return l}));var r=n(73),u=n.n(r),o=n(7),d=n(14),c=n(9);let a,i;const s="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII=";async function f(e,t){for(b();!i.wasmReady;)await Object(c.e)(2e3);const{result:n,width:r,height:u}=await function(e,t){return new Promise(n=>{i.requests=i.requests||new Map,i.requests.set(e,n),i.postMessage({id:e,blob:t})})}(e,t);if(r&&u)return function({result:e,width:t,height:n}){a||(a=document.createElement("canvas"));return new Promise(r=>{const u=new ImageData(e,t,n);a.width=t,a.height=n;a.getContext("2d").putImageData(u,0,0),a.toBlob(e=>{r(null!=e?e:void 0)},"image/png",1)})}({result:n,width:r,height:u})}async function l(e,t){if(Object(o.o)()||"data:image/webp"!==t.substr(0,15))return t;b();const n=await f(e,Object(d.d)(t));if(!n)throw new Error("Can't convert webp to png. Url: "+t);return Object(d.a)(n)}function b(){i||(i=new u.a,i.wasmReady=!1,i.onmessage=h)}function h(e){const{id:t}=e.data;switch(e.data.type){case"initialized":i.wasmReady=!0;break;case"result":if(i.requests.has(t)){const n=i.requests.get(t);i.requests.delete(t),n(e.data)}}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return b}));var r=n(0),u=n(15),o=n(1),d=n(7),c=n(67),a=n(8),i=n(68),s=n(52);const f=/^[\d\wа-яё]$/i,l=/(\*\*|__).+?\1/g;function b(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 u.a.lastIndex=0,h(e,"big","jsx");case"emoji":return u.a.lastIndex=0,h(e,"small","jsx");case"emoji_html":return u.a.lastIndex=0,h(e,"small","html");case"br":return m(e,"jsx");case"br_html":return m(e,"html");case"highlight":return o=e,d=n.highlight,o.reduce((e,t)=>{if("string"!=typeof t||!d)return[...e,t];const n=t.toLowerCase(),u=n.indexOf(d.toLowerCase()),o=n[u+d.length];if(u<0||o&&o.match(f))return[...e,t];const c=[];return c.push(t.substring(0,u)),c.push(r.a.createElement("span",{className:"matching-text-highlight"},t.substring(u,u+d.length))),c.push(t.substring(u+d.length)),[...e,...c]},[]);case"links":return function(e){return e.reduce((e,t)=>{if("string"!=typeof t)return[...e,t];const n=[...t.match(p)||[],...t.match(g)||[]];if(!n.length)return[...e,t];const u=[];let o=n.shift(),d=0;for(;o;){const e=t.indexOf(o,d);u.push(t.substring(d,e)),o.startsWith("@")?u.push(r.a.createElement(i.a,{username:o},o)):u.push(r.a.createElement(s.a,{text:o,url:o})),d=e+o.length,o=n.shift()}return u.push(t.substring(d)),[...e,...u]},[])}(e);case"simple_markdown":return y(e,"jsx");case"simple_markdown_html":return y(e,"html")}var o,d;return e},[e])}function h(e,t,n){return d.c?e:e.reduce((e,o)=>{if("string"!=typeof o)return[...e,o];const d=o.split(u.a),i=o.match(u.a)||[];return e.push(d[0]),i.reduce((e,o,i)=>{const s=Object(c.a)(Object(u.b)(o)),f=Object(a.a)("emoji","small"===t&&"emoji-small");"jsx"===n&&e.push(r.a.createElement("img",{className:f,src:`./img-apple-${"big"===t?"160":"64"}/${s}.png`,alt:o})),"html"===n&&e.push(`${o}`);const l=2*i+2;return d[l]&&e.push(d[l]),e},e)},[])}function m(e,t){return e.reduce((e,n)=>"string"!=typeof n?[...e,n]:[...e,...n.split(/\r\n|\r|\n/g).reduce((e,n,u,o)=>{const d=n.trimLeft(),c=n.length-d.length;return e.push(String.fromCharCode(160).repeat(c)+d),u!==o.length-1&&e.push("jsx"===t?r.a.createElement("br",null):"
"),e},[])],[])}const p=new RegExp(o.U,"ig"),g=/@[\w\d_-]+/gi;function y(e,t){return e.reduce((e,n)=>{if("string"!=typeof n)return[...e,n];const u=n.split(l),o=n.match(l)||[];return e.push(u[0]),o.reduce((e,n,o)=>{"jsx"===t?e.push(n.startsWith("**")?r.a.createElement("b",null,n.replace(/\*\*/g,"")):r.a.createElement("i",null,n.replace(/__/g,""))):e.push(n.startsWith("**")?`${n.replace(/\*\*/g,"")}`:`${n.replace(/__/g,"")}`);const d=2*o+2;return u[d]&&e.push(u[d]),e},e)},[])}},function(e,t,n){"use strict";var r=n(0);t.a=(e=!1)=>{const[t,n]=Object(r.r)(e);return[t,Object(r.m)(()=>{n(!0)},[]),Object(r.m)(()=>{n(!1)},[])]}},function(e,t,n){"use strict";n.d(t,"q",(function(){return o})),n.d(t,"G",(function(){return d})),n.d(t,"r",(function(){return c})),n.d(t,"F",(function(){return a})),n.d(t,"K",(function(){return i})),n.d(t,"c",(function(){return s})),n.d(t,"I",(function(){return f})),n.d(t,"H",(function(){return l})),n.d(t,"L",(function(){return m})),n.d(t,"v",(function(){return y})),n.d(t,"d",(function(){return v})),n.d(t,"b",(function(){return I})),n.d(t,"J",(function(){return w})),n.d(t,"cb",(function(){return O})),n.d(t,"i",(function(){return j})),n.d(t,"j",(function(){return C})),n.d(t,"T",(function(){return E})),n.d(t,"bb",(function(){return S})),n.d(t,"f",(function(){return A})),n.d(t,"x",(function(){return k})),n.d(t,"ib",(function(){return T})),n.d(t,"jb",(function(){return P})),n.d(t,"t",(function(){return N})),n.d(t,"N",(function(){return D})),n.d(t,"M",(function(){return L})),n.d(t,"l",(function(){return x})),n.d(t,"E",(function(){return B})),n.d(t,"m",(function(){return R})),n.d(t,"gb",(function(){return F})),n.d(t,"fb",(function(){return U})),n.d(t,"O",(function(){return _})),n.d(t,"p",(function(){return G})),n.d(t,"hb",(function(){return $})),n.d(t,"n",(function(){return W})),n.d(t,"w",(function(){return K})),n.d(t,"lb",(function(){return H})),n.d(t,"mb",(function(){return V})),n.d(t,"e",(function(){return q})),n.d(t,"db",(function(){return J})),n.d(t,"k",(function(){return Y})),n.d(t,"P",(function(){return Z})),n.d(t,"Q",(function(){return X})),n.d(t,"S",(function(){return ee})),n.d(t,"R",(function(){return te})),n.d(t,"W",(function(){return ue})),n.d(t,"s",(function(){return oe})),n.d(t,"X",(function(){return de})),n.d(t,"V",(function(){return ae})),n.d(t,"U",(function(){return ie})),n.d(t,"Z",(function(){return fe})),n.d(t,"Y",(function(){return le})),n.d(t,"u",(function(){return be})),n.d(t,"ab",(function(){return he})),n.d(t,"a",(function(){return me})),n.d(t,"o",(function(){return pe})),n.d(t,"kb",(function(){return ge})),n.d(t,"eb",(function(){return ye})),n.d(t,"C",(function(){return ve})),n.d(t,"A",(function(){return Ie})),n.d(t,"y",(function(){return we})),n.d(t,"D",(function(){return Oe})),n.d(t,"z",(function(){return je})),n.d(t,"B",(function(){return Ce})),n.d(t,"g",(function(){return Ee})),n.d(t,"h",(function(){return Se}));var r=n(1),u=n(3);function o(e,t,n){return{...e,chats:{...e.chats,listIds:{...e.chats.listIds,[t]:n}}}}function d(e,t,n){const{[t]:r}=e.chats.listIds,u=r&&r.length?n.filter(e=>!r.includes(e)):n;return r&&!u.length?e:o(e,t,[...r||[],...u])}function c(e,t){return{...e,chats:{...e.chats,byId:t}}}function a(e,t,n){const{byId:r}=e.chats,o=r[t],d=n.isMin&&o&&!o.isMin,a={...o,...d?Object(u.j)(n,["isMin","accessHash"]):n};return a.id&&a.type?c(e,{...r,[t]:a}):e}function i(e,t){return Object.keys(t).forEach(n=>{e=a(e,Number(n),t[Number(n)])}),e}function s(e,t){const{byId:n}=e.chats;return Object.keys(t).map(Number).forEach(r=>{(!n[r]||n[r].isMin&&!t[r].isMin)&&(e=a(e,r,t[r]))}),e}function f(e,t,n){const u=n===r.f?"archived":"active";let o=e.chats.listIds;return Object.keys(o).forEach(e=>{const n=o[e]||[];e!==u||n.includes(t)?e!==u&&n.includes(t)&&(o={...o,[e]:n.filter(e=>e!==t)}):o={...o,[e]:[...n,t]}}),e=a(e={...e,chats:{...e.chats,listIds:o}},t,{folderId:n||void 0})}function l(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 b=n(5),h=n(6);function m(e,t,n=b.MAIN_THREAD_ID,r="thread"){return{...e,messages:{...e.messages,messageLists:t?[{chatId:t,threadId:n,type:r}]:void 0}}}function p(e,t,n){return g(e,t,{byId:n})}function g(e,t,n){const r=e.messages.byChatId[t]||{byId:{},threadsById:{}};return{...e,messages:{...e.messages,byChatId:{...e.messages.byChatId,[t]:{...r,...n}}}}}function y(e,t,n,r,u){return function(e,t,n,r){const u=e.messages.byChatId[t];return g(e,t,{threadsById:{...u&&u.threadsById,[n]:{...u&&u.threadsById[n],...r}}})}(e,t,n,{[r]:u})}function v(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=Object(h.m)(e,t);return r&&Object.keys(n).every(e=>Boolean(r[Number(e)]))?e:p(e,t,{...n,...r})}function w(e,t,n,r){const u=Object(h.m)(e,t)||{},o={...u[n],...r};return o.id?p(e,t,{...u,[n]:o}):e}function O(e,t,n,r){const u=Object(h.lb)(e,t)||{},o={...u[n],...r};return o.id?N(e,t,{...u,[n]:o},void 0):e}function j(e,t,n){const r=Object(h.m)(e,t);if(!r)return e;const o=Object.values(Object(u.m)(r,n)).filter(({forwardInfo:e})=>e&&e.isLinkedChannelPost),d=Object(u.j)(r,n);if(Object.keys(e.messages.byChatId[t].threadsById).map(Number).forEach(r=>{let u=Object(h.W)(e,t,r),o=Object(h.bb)(e,t,r),d=Object(h.Cb)(e,t,r),c=Object(h.eb)(e,t);n.forEach(e=>{u&&u.includes(e)&&(u=u.filter(t=>t!==e)),o&&o.includes(e)&&(o=o.filter(t=>t!==e)),d&&d.includes(e)&&(d=d.filter(t=>t!==e)),c&&c.includes(e)&&(c=c.filter(t=>t!==e))}),e=y(e,t,r,"listedIds",u),e=y(e,t,r,"outlyingIds",o),e=y(e,t,r,"viewportIds",d),e=y(e,t,r,"pinnedIds",c)}),o.length){const n=Object(h.x)(e),r=n&&n.chatId===t&&"thread"===n.type,u=n&&n.threadId;o.forEach(n=>{const{fromChatId:o,fromMessageId:d}=n.forwardInfo,c=Object(h.k)(e,o,d);r&&u===d&&(e=m(e,t)),c&&(e=w(e,o,d,{threadInfo:void 0}))})}return e=p(e,t,d)}function C(e,t,n){const r=Object(h.lb)(e,t);if(!r)return e;const o=Object(u.j)(r,n);let d=Object(h.jb)(e,t);return d&&(n.forEach(e=>{d.includes(e)&&(d=d.filter(t=>t!==e))}),e=y(e,t,b.MAIN_THREAD_ID,"scheduledIds",d)),e=N(e,t,o,void 0)}function E(e,t,n,r){const u=Object(h.W)(e,t,n),o=u&&u.length?r.filter(e=>!u.includes(e)):r;return u&&!o.length?e:y(e,t,n,"listedIds",M([...u||[],...o]))}function S(e,t,n,r){const u=Object(h.bb)(e,t,n),o=u&&u.length?r.filter(e=>!u.includes(e)):r;return u&&!o.length?e:y(e,t,n,"outlyingIds",M([...u||[],...o]))}function M(e){return e.sort((e,t)=>e-t)}function A(e,t,n,u){const o=Object(h.Cb)(e,t,n)||[];if(o.includes(u))return e;return y(e,t,n,"viewportIds",M([...o.length{e=T(e,t.chatId,t.threadId,t)}),e}function N(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 D(e,t,n,r=!1){return{...e,focusedMessage:{...e.focusedMessage,chatId:t,messageId:n,noHighlight:r}}}function L(e,t){return{...e,focusedMessage:{...e.focusedMessage,direction:t}}}function x(e,t,n){return{...e,selectedMessages:{chatId:t,messageIds:n?Array.prototype.concat([],n):[]}}}function B(e,t,n,r,o,d,c,a=!1){const{selectedMessages:i}=e;d&&(c=Object(h.Y)(e,t,d));const s=c||[o];if(!i)return x(e,t,s);const{messageIds:f}=i;let l;const b=s.filter(e=>!f.includes(e));if(b&&!b.length)l=f.filter(e=>!s.includes(e));else if(a&&f.length){const d=Object(h.w)(e,t,n,r),c=d.indexOf(f[f.length-1]),a=d.indexOf(o),i=Math.min(c,a),s=Math.max(c,a),b=d.slice(i,s+1);l=Object(u.o)([...f,...b])}else l=[...f,...b];return l.length?{...e,selectedMessages:{...i,messageIds:l}}:R(e)}function R(e){return{...e,selectedMessages:void 0}}function F(e,t,n,r,o){const d=r.map(t=>{const n=e.stickers.setsById[t.id];return n?{...n,...t}:t});return{...e,stickers:{...e.stickers,setsById:{...e.stickers.setsById,...Object(u.c)(d,"id")},[t]:{...e.stickers[t],hash:n,..."search"===t?{resultIds:o}:{setIds:r.map(({id:e})=>e)}}}}}function U(e,t,n){const r=e.stickers.setsById[t]||{};return{...e,stickers:{...e.stickers,setsById:{...e.stickers.setsById,[t]:{...r,...n}}}}}function _(e,t,n,r){const{results:u}=e.gifs.search;let o;if(t||!u)o=n;else{const e=new Set(u.map(e=>e.id));o=[...u,...n.filter(t=>!e.has(t.id))]}return{...e,gifs:{...e.gifs,search:{...e.gifs.search,offset:r,results:o}}}}function G(e,t){return{...e,animatedEmojis:t}}function $(e,t,n,r){const o=[...Object(h.tb)(e,t),...n||[]],d=Object(u.o)(o.map(({id:e})=>e)),c=Object(u.c)(o,"id"),a=d.map(e=>c[e]);return{...e,stickers:{...e.stickers,forEmoji:{emoji:t,stickers:a,hash:r}}}}function W(e){const{emoji:t,stickers:n,hash:r}=e.stickers.forEmoji||{};return t?$(e,t,n,r):e}var z=n(44);function K(e,t){return{...e,users:{...e.users,byId:t}}}function H(e,t,n){const{byId:r}=e.users,{hash:o,userIds:d}=e.contactList||{},c=r[t],a=n.isMin&&c&&!c.isMin,i={...c,...a?Object(u.j)(n,["isMin","accessHash"]):n};return i.id&&i.type?(i.isContact&&d&&!d.includes(t)&&(e={...e,contactList:{hash:o||0,userIds:[t,...d]}}),K(e,{...r,[t]:i})):e}function V(e,t){return Object.keys(t).map(Number).forEach(n=>{e=H(e,n,t[n])}),e}function q(e,t){const{byId:n}=e.users;return Object.keys(t).map(Number).forEach(r=>{(!n[r]||n[r].isMin&&!t[r].isMin)&&(e=H(e,r,t[r]))}),e}function J(e,t){return e.users.selectedId===t?e:{...e,users:{...e.users,selectedId:t}}}function Y(e,t){const{byId:n}=e.users,{hash:r,userIds:u}=e.contactList||{};return delete n[t],K(e={...e,contactList:{hash:r||0,userIds:u?u.filter(e=>e!==t):z.a}},n)}const Q=e=>`${e.chatId}_${e.id}`;function Z(e,t){return{...e,globalSearch:{...e.globalSearch,...t}}}function X(e,t){return Z(e,{currentContent:t})}function ee(e,t,n,r,o){const{resultsByType:d}=e.globalSearch||{},c=t.reduce((e,t)=>(e[Q(t)]=t,e),{}),a=d&&d[r]?d[r].foundIds:void 0;if(void 0!==a&&Object.keys(c).every(e=>a.includes(Q(c[e]))))return te(e,{messages:!1});const i=a||[],s=t.map(e=>Q(e)),f=Array.prototype.concat(i,s),l=Object(u.a)(i,f)?i:f;return Z(e=te(e,{messages:!1}),{resultsByType:{...(e.globalSearch||{}).resultsByType,[r]:{totalCount:n,nextOffsetId:o,foundIds:l}}})}function te(e,t){return Z(e,{fetchingStatus:{...e.globalSearch.fetchingStatus,...t}})}var ne=n(4);function re(e,t,n){return{...e,localTextSearch:{byChatThreadKey:{...e.localTextSearch.byChatThreadKey,[t]:n}}}}function ue(e,t,n,r,u){const o=Object(ne.a)(t,n);return re(e,o,{...e.localTextSearch.byChatThreadKey[o],isActive:r,query:u})}function oe(e,t,n,r,u,o){const d=Object(ne.a)(t,n);return re(e,d,{...e.localTextSearch.byChatThreadKey[d],results:{foundIds:r,totalCount:u,nextOffsetId:o}})}function de(e,t,n,r,o,d){const c=Object(ne.a)(t,n),{results:a}=e.localTextSearch.byChatThreadKey[c]||{},i=a&&a.foundIds||[],s=se(Object(u.o)(Array.prototype.concat(i,r)));return oe(e,t,n,Object(u.a)(i,s)?i:s,o,d)}function ce(e,t,n){return{...e,localMediaSearch:{byChatId:{...e.localMediaSearch.byChatId,[t]:n}}}}function ae(e,t,n){return ce(e,t,{...e.localMediaSearch.byChatId[t],currentType:n})}function ie(e,t,n,r,o,d){const{resultsByType:c}=e.localMediaSearch.byChatId[t]||{},a=c&&c[n]?c[n].foundIds:[],i=se(Object(u.o)(Array.prototype.concat(a,r)));return function(e,t,n,r,u,o){return ce(e,t,{...e.localMediaSearch.byChatId[t],resultsByType:{...(e.localMediaSearch.byChatId[t]||{}).resultsByType,[n]:{foundIds:r,totalCount:u,nextOffsetId:o}}})}(e,t,n,Object(u.a)(a,i)?a:i,o,d)}function se(e){return e.sort((e,t)=>e-t)}function fe(e,t){return{...e,management:{...e.management,progress:t}}}function le(e,t,n){return{...e,management:{...e.management,byChatId:{...e.management.byChatId,[t]:{...e.management.byChatId[t]||{},...n}}}}}function be(e,t){return{...e,settings:{...e.settings,byKey:{...e.settings.byKey,...t}}}}function he(e,t,n,r){switch(t){case"contact":return be(e,{...void 0!==n&&{hasPrivateChatsNotifications:!n},...void 0!==r&&{hasPrivateChatsMessagePreview:r}});case"group":return be(e,{...void 0!==n&&{hasGroupNotifications:!n},...void 0!==r&&{hasGroupMessagePreview:r}});case"broadcast":return be(e,{...void 0!==n&&{hasBroadcastNotifications:!n},...void 0!==r&&{hasBroadcastMessagePreview:r}});default:return}}function me(e,t){return{...e,blocked:{...e.blocked,ids:[t,...e.blocked.ids],totalCount:e.blocked.totalCount+1}}}function pe(e,t){return{...e,blocked:{...e.blocked,ids:e.blocked.ids.filter(e=>e!==t),totalCount:e.blocked.totalCount-1}}}function ge(e,t){return{...e,twoFaSettings:{...e.twoFaSettings,...t}}}function ye(e,t){return{...e,payment:{...e.payment,shippingOptions:t}}}function ve(e,t){return{...e,payment:{...e.payment,formId:t}}}function Ie(e,t){return{...e,payment:{...e.payment,step:t}}}function we(e,t){if(!t.content||!t.content.invoice)return e;const{title:n,text:r,description:u,photoUrl:o}=t.content.invoice;return{...e,payment:{...e.payment,invoiceContent:{title:n,text:r,description:u,photoUrl:o}}}}function Oe(e,t){return{...e,payment:{...e.payment,stripeCredentials:{...t}}}}function je(e,t){return{...e,payment:{...e.payment,...t}}}function Ce(e,t,n){if(!t||!n)return{...e,payment:{...e.payment,receipt:void 0}};const{invoice:r}=n.content,{photoUrl:u,text:o,title:d}=r||{};return{...e,payment:{...e.payment,receipt:{...t,photoUrl:u,text:o,title:d}}}}function Ee(e){return{...e,payment:{}}}function Se(e){return{...e,payment:{...e.payment,isPaymentModalOpen:!1}}}},function(e,t,n){"use strict";var r=n(0);t.a=function(e,t){const n=Object(r.q)(),{current:u}=n;return t&&void 0===e||(n.current=e),u}},function(e,t,n){"use strict";var r=n(0),u=n(8);t.a=Object(r.h)(({ref:e,id:t,className:n,value:o,label:d,error:c,success:a,disabled:i,readOnly:s,placeholder:f,autoComplete:l,inputMode:b,maxLength:h,onChange:m,onInput:p,onKeyPress:g,onKeyDown:y,onBlur:v})=>{const I=c||a||d,w=Object(u.a)("input-group",o&&"touched",c?"error":a&&"success",i&&"disabled",s&&"disabled",I&&"with-label",n);return r.a.createElement("div",{className:w},r.a.createElement("input",{ref:e,className:"form-control",type:"text",id:t,value:o||"",placeholder:f,maxLength:h,autoComplete:l,inputMode:b,disabled:i,readOnly:s,onChange:m,onInput:p,onKeyPress:g,onKeyDown:y,onBlur:v}),I&&r.a.createElement("label",{htmlFor:t},I))})},function(e,t,n){"use strict";var r=n(0),u=n(8),o=n(20);n(85);t.a=Object(r.h)(({id:e,name:t,value:n,label:d,subLabel:c,checked:a,disabled:i,round:s,blocking:f,isLoading:l,onChange:b,onCheck:h})=>{const m=Object(r.m)(e=>{b&&b(e),h&&h(e.currentTarget.checked)},[b,h]),p=Object(u.a)("Checkbox",i&&"disabled",s&&"round",l&&"loading",f&&"blocking");return r.a.createElement("label",{className:p},r.a.createElement("input",{type:"checkbox",id:e,name:t,value:n,checked:a,disabled:i,onChange:m}),r.a.createElement("div",{className:"Checkbox-main"},r.a.createElement("span",{className:"label"},d),c&&r.a.createElement("span",{className:"subLabel"},c)),l&&r.a.createElement(o.a,null))})},function(e,t,n){"use strict";n.d(t,"g",(function(){return r})),n.d(t,"f",(function(){return u})),n.d(t,"B",(function(){return o})),n.d(t,"i",(function(){return d})),n.d(t,"h",(function(){return c})),n.d(t,"r",(function(){return a})),n.d(t,"v",(function(){return i})),n.d(t,"s",(function(){return s})),n.d(t,"t",(function(){return f})),n.d(t,"u",(function(){return l})),n.d(t,"q",(function(){return b})),n.d(t,"e",(function(){return h})),n.d(t,"b",(function(){return m})),n.d(t,"c",(function(){return p})),n.d(t,"d",(function(){return g})),n.d(t,"E",(function(){return y})),n.d(t,"F",(function(){return v})),n.d(t,"G",(function(){return I})),n.d(t,"l",(function(){return w})),n.d(t,"n",(function(){return O})),n.d(t,"m",(function(){return j})),n.d(t,"k",(function(){return C})),n.d(t,"o",(function(){return E})),n.d(t,"J",(function(){return S})),n.d(t,"H",(function(){return M})),n.d(t,"I",(function(){return A})),n.d(t,"p",(function(){return k})),n.d(t,"C",(function(){return T})),n.d(t,"D",(function(){return P})),n.d(t,"j",(function(){return N})),n.d(t,"A",(function(){return D})),n.d(t,"z",(function(){return L})),n.d(t,"x",(function(){return x})),n.d(t,"y",(function(){return B})),n.d(t,"w",(function(){return R})),n.d(t,"a",(function(){return F}));const r=window.devicePixelRatio||1,u={begin:.8,end:1},o=300,d=500,c=10,a=320,i=15,s=2,f=.45,l=10,b=.5,h=20,m="300 10px Helvetica, Arial, sans-serif",p=45,g=50,y=30,v=1,I=.1,w=40,O=10,j=1,C=8,E=4,S=o,M=.1,A=.5,k=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],T=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],P=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],N=864e5,D=200,L=4,x=1e3,B=1,R=.5,F=["begin 200 fast","end 200 fast","labelFromIndex 200 fast floor","labelToIndex 200 fast ceil","xAxisScale 400","yMinViewport","yMaxViewport","yMinViewportSecond","yMaxViewportSecond","yMinMinimap","yMaxMinimap","yMinMinimapSecond","yMaxMinimapSecond","yAxisScale","yAxisScaleSecond"]},function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(50);function u(e){return Object(r.a)({onEsc:e})}},function(e,t,n){"use strict";n.d(t,"b",(function(){return d}));var r=n(0);let u,o=!1;const d=e=>{document.dispatchEvent(new Event("tt-event-heavy-animation-start")),o=!0,u&&(clearTimeout(u),u=void 0),u=window.setTimeout(()=>{o=!1,document.dispatchEvent(new Event("tt-event-heavy-animation-end")),u=void 0},e)};t.a=(e,t)=>{Object(r.n)(()=>(o&&e(),document.addEventListener("tt-event-heavy-animation-start",e),document.addEventListener("tt-event-heavy-animation-end",t),()=>{document.removeEventListener("tt-event-heavy-animation-end",t),document.removeEventListener("tt-event-heavy-animation-start",e)}),[t,e])}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));const r=[]},function(e,t,n){"use strict";function r(e){return String(e).replace(/\d(?=(\d{3})+$)/g,"$& ")}function u(e){return".0"===String(e.toFixed(1)).substr(-2)?Math.round(e):e.toFixed(1).replace(".",",")}function o(e){return e<1e3?e:e<1e6?u(e/1e3)+"K":u(e/1e6)+"M"}function d(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,"a",(function(){return r})),n.d(t,"b",(function(){return o})),n.d(t,"c",(function(){return d}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));const r=/[^\wа-яё]+/;function u(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)))}},function(e,t,n){"use strict";var r=n(0),u=n(27),o=n(69),d=n(51),c=n(42),a=n(8),i=n(43);n(81);t.a=({ref:e,containerRef:t,isOpen:n,className:s,style:f,children:l,positionX:b="left",positionY:h="top",autoClose:m=!1,noCloseOnBackdrop:p=!1,onCloseAnimationEnd:g,onClose:y,onMouseEnter:v,onMouseLeave:I})=>{let w=Object(r.q)(null);e&&(w=e);const O=t||w,{transitionClassNames:j}=Object(u.a)(n,g);Object(r.n)(()=>n&&y?Object(c.a)(y):void 0,[n,y]),Object(d.a)(([e])=>{void 0!==e&&Object(i.b)(200)},[n]);const C=((e,t,n)=>{const[u,o]=Object(r.r)(-1);Object(r.n)(()=>{o(-1)},[t]);return Object(r.m)(t=>{const r=e.current;if(!r)return;if(13===t.keyCode&&n)return void n();if(38!==t.keyCode&&40!==t.keyCode)return;const d=document.activeElement,c=Array.from(r.children);let a=d&&c.indexOf(d)||u;if(38===t.keyCode&&a>0)a--;else if(40===t.keyCode&&a{const n=new Uint8Array(t);let r=new s.a,u=new l.a;r.onmessage=e=>{null===e.data?u.postMessage({command:"done"}):u.postMessage({command:"encode",buffers:e.data},e.data.map(({buffer:e})=>e))},u.onmessage=t=>{"page"===t.data.message&&(e(new Blob([t.data.page],{type:"audio/wav"})),r.terminate(),r=void 0,u.terminate(),u=void 0)},u.postMessage({command:"init",wavBitDepth:16,wavSampleRate:48e3}),r.postMessage({command:"init",decoderSampleRate:48e3,outputBufferSampleRate:48e3}),r.postMessage({command:"decode",pages:n},[n.buffer])})}var h=n(34);const m={[r.ApiMediaFormat.DataUri]:d.a.Text,[r.ApiMediaFormat.BlobUrl]:d.a.Blob,[r.ApiMediaFormat.Lottie]:d.a.Json,[r.ApiMediaFormat.Progressive]:void 0,[r.ApiMediaFormat.Stream]:void 0},p=new Map,g=new Map;function y(e,t,n){if(t===r.ApiMediaFormat.Progressive)return a.h?function(e){const t="./progressive/"+e;return p.set(e,t),Promise.resolve(t)}(e):y(e,r.ApiMediaFormat.BlobUrl,n);if(!g.has(e)){const i=async function(e,t,n){if(!u.E){const n=e.startsWith("avatar")?u.G:u.F,r=await d.c(n,e,m[t]);if(r){let t=r;if("audio/ogg"!==r.type||a.g||(t=await b(t)),"image/webp"===r.type&&!Object(a.o)()&&t){const n=await Object(h.b)(e,t);n&&(t=n)}const n=w(t);return p.set(e,n),n}}if(t===r.ApiMediaFormat.Stream){const r=new MediaSource,u=URL.createObjectURL(r);let d=!1;return r.addEventListener("sourceopen",()=>{if(d)return;d=!0;const u=r.addSourceBuffer("audio/mpeg");Object(o.a)("downloadMedia",{url:e,mediaFormat:t},(e,t)=>{n&&n(e),1===e&&r.endOfStream(),t&&u.appendBuffer(t)})}),p.set(e,u),u}const i=await Object(o.a)("downloadMedia",{url:e,mediaFormat:t},n);if(!i)throw new Error("Failed to fetch media");let{prepared:s,mimeType:f}=i;if("audio/ogg"===f&&!a.g){const e=await Object(c.e)(s);URL.revokeObjectURL(s);const t=await b(e);s=w(t),f=e.type}if("image/webp"===f&&!Object(a.o)()){const t=await Object(c.e)(s);URL.revokeObjectURL(s);const n=await Object(h.b)(e,t);n&&(s=w(n),f=t.type)}return p.set(e,s),s}(e,t,n).catch(e=>{u.l&&console.warn(e)}).finally(()=>{g.delete(e)});g.set(e,i)}return g.get(e)}function v(e){return p.get(e)}function I(e){Object(o.b)(e)}function w(e){return e instanceof Blob?URL.createObjectURL(e):e}a.h&&navigator.serviceWorker.addEventListener("message",async e=>{const{type:t,messageId:n,params:u}=e.data;if("requestPart"!==t)return;const d=await Object(o.a)("downloadMedia",{mediaFormat:r.ApiMediaFormat.Progressive,...u});if(!d)return;const{arrayBuffer:c,mimeType:a,fullSize:i}=d;navigator.serviceWorker.controller.postMessage({type:"partResponse",messageId:n,result:{arrayBuffer:c,mimeType:a,fullSize:i}},[c])})},function(e,t,n){"use strict";n.d(t,"b",(function(){return o}));var r=n(9);let u=o();function o(){const e=.01*window.innerHeight;return document.documentElement.style.setProperty("--vh",e+"px"),{width:window.innerWidth,height:window.innerHeight}}const d=Object(r.g)(()=>{u=o()},250,!0);window.addEventListener("resize",d),window.addEventListener("orientationchange",d),t.a={get:()=>u}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));const r={Enter:"onEnter",Backspace:"onBackspace",Delete:"onDelete",Esc:"onEsc",Escape:"onEsc",ArrowUp:"onUp",ArrowDown:"onDown",Tab:"onTab"},u={onEnter:[],onDelete:[],onBackspace:[],onEsc:[],onUp:[],onDown:[],onTab:[]};function o(e){return d()||document.addEventListener("keydown",c,!0),Object.keys(e).forEach(t=>{const n=e[t];if(!n)return;const r=u[t];r&&r.push(n)}),()=>{!function(e){Object.keys(e).forEach(t=>{const n=e[t],r=u[t];if(r){const e=r.findIndex(e=>e===n);-1!==e&&r.splice(e,1)}}),d()||document.removeEventListener("keydown",c,!1)}(e)}}function d(){return Object.values(u).some(e=>Boolean(e.length))}function c(e){const t=r[e.key];if(!t)return;const{length:n}=u[t];if(!n)return;e.stopPropagation();(0,u[t][n-1])(e)}},function(e,t,n){"use strict";var r=n(0),u=n(38);t.a=(e,t)=>{const n=Object(u.a)(t);return Object(r.n)(()=>e(n||[]),t)}},function(e,t,n){"use strict";var r=n(0),u=n(2);const o=e=>{const t=[];let n=0;const r=e.length;let u;for(;n65535&&(u-=65536,t.push(String.fromCharCode(u>>>10&1023|55296)),u=56320|1023&u),t.push(String.fromCharCode(u))}return t.join("")};function d(e,t,n){let r;for(e=n?Math.floor(e/700):e>>1,e+=Math.floor(e/t),r=0;e>455;r+=36)e=Math.floor(e/35);return Math.floor(r+36*e/(e+38))}function c(e,t){const n=[],r=[],u=e.length;let c,a,i,s,f,l,b,h,m,p,g,y,v;for(c=128,i=0,s=72,f=e.lastIndexOf("-"),f<0&&(f=0),l=0;l=128)throw new RangeError("Illegal input >= 0x80");n.push(e.charCodeAt(l))}for(b=f>0?f+1:0;b=u)throw RangeError("punycode_bad_input(1)");if(g=(I=e.charCodeAt(b++))-48<10?I-22:I-65<26?I-65:I-97<26?I-97:36,g>=36)throw RangeError("punycode_bad_input(2)");if(g>Math.floor((2147483647-i)/m))throw RangeError("punycode_overflow(1)");if(i+=g*m,y=p<=s?1:p>=s+26?26:p-s,gMath.floor(2147483647/(36-y)))throw RangeError("punycode_overflow(2)");m*=36-y}if(a=n.length+1,s=d(i-h,a,0===h),Math.floor(i/a)>2147483647-c)throw RangeError("punycode_overflow(3)");c+=Math.floor(i/a),i%=a,t&&r.splice(i,0,e.charCodeAt(b-1)-65<26),n.splice(i,0,c),i++}var I;if(t)for(i=0,v=n.length;iObject(s.l)(t,["openTelegramLink"]))(({url:e,text:t,className:n,children:u,openTelegramLink:o})=>{const d=Object(r.m)(t=>!(!(t.ctrlKey||t.altKey||t.shiftKey||t.metaKey)&&e&&e.match(i.V))||(t.preventDefault(),o({url:e}),!1),[o,e]);if(!e)return;const c=Object(f.a)(n||"text-entity-link",t.length>50&&"long-word-break-all");return r.a.createElement("a",{href:l(e),title:b(e),target:"_blank",rel:"noopener noreferrer",className:c,onClick:d},u||t)}))},function(e,t,n){"use strict";n.d(t,"e",(function(){return r})),n.d(t,"b",(function(){return u})),n.d(t,"d",(function(){return o})),n.d(t,"a",(function(){return d})),n.d(t,"c",(function(){return c}));function r(e){return e>536870912?(e/1073741824).toFixed(1)+" GB":e>524288?(e/1048576).toFixed(1)+" MB":(e/1024).toFixed(1)+" KB"}function u(e){const{fileName:t,mimeType:n}=e;return o(t,n)}function o(e,t){return e&&-1!==e.indexOf(".")?e.split(".").pop():t.split("/").pop()}function d(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 c(e){return Boolean(e.previewBlobUrl||e.thumbnail)}},function(e,t,n){"use strict";n.d(t,"b",(function(){return u})),n.d(t,"a",(function(){return d}));const r={missing_payment_information:{field:"cardNumber",fieldError:"Incorrect card number"},invalid_number:{field:"cardNumber",fieldError:"Incorrect card number"},number:{field:"cardNumber",fieldError:"Incorrect card number"},exp_year:{field:"expiry",fieldError:"Incorrect year"},exp_month:{field:"expiry",fieldError:"Incorrect month"},invalid_expiry_year:{field:"expiry",fieldError:"Incorrect year"},invalid_expiry_month:{field:"expiry",fieldError:"Incorrect month"},cvc:{field:"cvv",fieldError:"Incorrect CVV"},invalid_cvc:{field:"cvv",fieldError:"Incorrect CVV"}};function u(e){const{message:t,code:n,param:u}=e,{field:o,fieldError:d,description:c}=u?r[u]:r[n];return{field:o,fieldError:d,description:c||t}}const o={ADDRESS_STREET_LINE1_INVALID:{field:"streetLine1",fieldError:"Incorrect street address"},ADDRESS_STREET_LINE2_INVALID:{field:"streetLine2",fieldError:"Incorrect street address"},ADDRESS_CITY_INVALID:{field:"city",fieldError:"Incorrect city"},ADDRESS_COUNTRY_INVALID:{field:"countryIso2",fieldError:"Incorrect country"},ADDRESS_POSTCODE_INVALID:{field:"postCode",fieldError:"Incorrect post code"},ADDRESS_STATE_INVALID:{field:"state",fieldError:"Incorrect state"},REQ_INFO_NAME_INVALID:{field:"fullName",fieldError:"Incorrect name"},REQ_INFO_PHONE_INVALID:{field:"phone",fieldError:"Incorrect phone"},REQ_INFO_EMAIL_INVALID:{field:"email",fieldError:"Incorrect email"}};function d(e){return Object.values(e).reduce((e,t)=>{const n=o[t.message];return n&&(e={...e,[n.field]:n.fieldError}),e},{})}},function(e,t,n){"use strict";n.d(t,"b",(function(){return o})),n.d(t,"a",(function(){return d}));var r=n(9);let u;function o(e,t){t||(u&&!u.isCancelled&&(u.isCancelled=!0),u=t={isCancelled:!1}),Object(r.b)(()=>{!t.isCancelled&&e()&&o(e,t)})}function d(e){Object(r.b)(()=>{e()&&d(e)})}},function(e,t,n){"use strict";var r=n(0),u=n(47);n(82);t.a=e=>{const{trigger:t,className:n,children:o,positionX:d="left",positionY:c="top"}=e,a=Object(r.q)(null),i=Object(r.q)(null),[s,f]=Object(r.r)(!1);return r.a.createElement("div",{ref:i,className:"DropdownMenu "+(n||""),onKeyDown:e=>{const t=a.current;if(!s||40!==e.keyCode||!t)return;const n=document.activeElement,r=Array.from(t.children);n&&-1!==r.indexOf(n)||r[0].focus()}},t({onTrigger:()=>{f(!s)},isOpen:s}),r.a.createElement(u.a,{ref:a,containerRef:i,isOpen:s,className:n||"",positionX:d,positionY:c,autoClose:!0,onClose:()=>{f(!1)}},o))}},function(e,t,n){"use strict";var r=n(0),u=n(22),o=n(1),d=n(26);const c=new Set(["key","ref","teactFastList","teactOrderKey"]),a={autoPlay:"autoplay",autoComplete:"autocomplete"},i={};function s(e,t,n,u,d,{skipComponentUpdate:c=!1,forceIndex:a=!1,fragment:i,moveDirection:g}={}){if(!c&&t&&n&&Object(r.d)(t)&&Object(r.d)(n)&&!Object(r.c)(t,n)&&(n=function(e,t){return e.componentInstance.props=t.componentInstance.props,Object(r.j)(e.componentInstance)}(t,n)),!c&&n&&Object(r.d)(n)&&n.componentInstance.isMounted&&l(n,u,d,e),t===n)return n;if(!t&&n){Object(r.d)(n)&&(n=f(n,u,d,e));const t=b(n);Object(r.k)(n,t),a&&e.childNodes[d]?e.insertBefore(t,e.childNodes[d]):(i||e).appendChild(t)}else if(t&&!n)e.removeChild(Object(r.b)(t)),Object(r.l)(t);else if(t&&n)if(Object(r.c)(t,n)){Object(r.d)(n)&&(n=f(n,u,d,e));const o=b(n);Object(r.k)(n,o),e.replaceChild(o,Object(r.b)(t)),Object(r.l)(t)}else{const u=Object(r.d)(t)&&Object(r.d)(n);if(u||Object(r.k)(n,Object(r.b)(t)),Object(r.f)(t)&&Object(r.f)(n)){if(g){const n=Object(r.b)(t),u=e.childNodes["up"===g?d:d+1];u?e.insertBefore(n,u):(i||e).appendChild(n)}u||function(e,t,n){const r=Object.keys(e.props),u=Object.keys(t.props);r.forEach(r=>{void 0!==e.props[r]&&void 0===t.props[r]&&p(n,r,e.props[r])}),u.forEach(r=>{void 0!==t.props[r]&&e.props[r]!==t.props[r]&&(void 0===e.props[r]?m(n,r,t.props[r]):function(e,t,n,r){"value"===t?e.value=void 0!==r?r:"":(p(e,t,n),m(e,t,r))}(n,r,e.props[r],t.props[r]))})}(t,n,Object(r.b)(t)),n.children=function(e,t,n){if(t.props.teactFastList)return function(e,t,n){const u=new Set(t.children.map(e=>{const t="props"in e&&e.props.key;return o.l&&Object(r.f)(e)&&!t&&console.warn("Missing `key` in `teactFastList`"),t}));let d=0;const c=e.children.reduce((e,r,o)=>{let c="props"in r?r.props.key:void 0;if(c&&!u.has(c))return s(n,r,void 0,t,-1),e;if(!c){const u=t.children[o],d=u&&"props"in u?u.props.key:void 0;if(!u||d)return s(n,r,void 0,t,-1),e;c="__indexKey#"+o}return e[c]={$element:r,index:d++,order:"props"in r?r.props.teactOrderKey:void 0},e},{});let a,i,f=[],l=0;t.children.forEach((e,r)=>{const u="props"in e?e.props.key:"__indexKey#"+r,o=c[u];if(!o)return a||(a=[],i=r),void a.push(e);a&&(f=f.concat(h(a,i,n,t)),i=void 0,a=void 0);const d="props"in e?e.props.teactOrderKey:void 0,b=o.index!==l&&o.order!==d,m=b&&l>o.index;b&&!m||l++,f.push(s(n,o.$element,e,t,r,{forceIndex:!0,...b&&{moveDirection:m?"down":"up"}}))}),a&&(f=f.concat(h(a,i,n,t)));return f}(e,t,n);const u=Math.max(e.children.length,t.children.length),d=[],c=t.children.length>e.children.length+1?document.createDocumentFragment():void 0;for(let r=0;r=e.children.length?{fragment:c}:void 0);u&&d.push(u)}c&&n.appendChild(c);return d}(t,n,u?e:Object(r.b)(t))}}return n}function f(e,t,n,u){if(!Object(r.d)(e))return e;const{componentInstance:o}=e;if(!o.isMounted){l(e=Object(r.i)(o),t,n,u);const d=e.children[0];Object(r.d)(d)&&(e.children=[f(d,e,0,u)]),o.isMounted=!0}return e}function l(e,t,n,r){const{componentInstance:u}=e;u.onUpdate=()=>{t.children[n]=s(r,t.children[n],u.$element,t,n,{skipComponentUpdate:!0})}}function b(e){if(Object(r.e)(e))return document.createTextNode("");if(Object(r.g)(e))return document.createTextNode(e.value);if(Object(r.d)(e))return b(e.children[0]);const{tag:t,props:n,children:u=[]}=e,o=document.createElement(t);return"object"==typeof n.ref&&(n.ref.current=o),Object.keys(n).forEach(e=>{m(o,e,n[e])}),e.children=u.map((t,n)=>s(o,void 0,t,e,n)),o}function h(e,t,n,r){if(1===e.length)return[s(n,void 0,e[0],r,t,{forceIndex:!0})];if(e.length>1){const u=document.createDocumentFragment(),o=e.map(e=>s(n,void 0,e,r,t,{fragment:u}));return n.childNodes[t]?n.insertBefore(u,n.childNodes[t]):n.appendChild(u),o}throw new Error("Unexpected input")}function m(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")?Object(d.a)(e,t,n):t.startsWith("data-")?e.setAttribute(t,n):c.has(t)||(e[a[t]||t]=n))}function p(e,t,n){"className"===t?e.className="":"value"===t?e.value="":"style"===t?e.style.cssText="":t.startsWith("on")?Object(d.c)(e,t,n):t.startsWith("data-")?e.removeAttribute(t):c.has(t)||delete e[a[t]||t]}t.a={render:function(e,t){if(!t)return;let n=t.getAttribute("data-teact-head-id");n||(n=Object(u.a)(i),i[n]={children:[]},t.setAttribute("data-teact-head-id",n));const r=i[n];r.children=[s(t,r.children[0],e,r,0)]}}},function(e,t,n){"use strict";var r=n(15);const u=new RegExp(`^(?:${r.a.source})+$`,"");t.a=e=>{if(e.length>24)return!1;if(!Boolean(e.match(u)))return!1;let t=0;for(;r.a.exec(e);)if(t++,t>3)return r.a.lastIndex=0,!1;return t}},function(e,t){},function(e,t){},function(e,t,n){"use strict";let r;n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return u})),n.d(t,"c",(function(){return o})),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 u=-1,o="MESSAGE_DELETED"},function(e,t){},function(e,t,n){"use strict";let r;n.d(t,"a",(function(){return 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={}))},function(e,t){},function(e,t){},function(e,t,n){"use strict";var r=n(55),u=n(30);let o=!1;const d=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?$/i,c=(e,t,n)=>(1-n)*e+n*t,a=Object.keys(u).map(e=>({property:e,colors:[i(u[e][0]),i(u[e][1])]}));function i(e){const t=d.exec(e);return{r:parseInt(t[1],16),g:parseInt(t[2],16),b:parseInt(t[3],16),a:t[4]?parseInt(t[4],16):void 0}}function s(e,t,n=1){a.forEach(({property:r,colors:u})=>{const o=Math.round(c(u[e].r,u[t].r,n)),d=Math.round(c(u[e].g,u[t].g,n)),a=Math.round(c(u[e].b,u[t].b,n)),i=u[e].a&&Math.round(c(u[e].a,u[t].a,n));document.documentElement.style.setProperty(r,i?`rgba(${o},${d},${a},${i/255})`:`rgb(${o},${d},${a})`)})}t.a=(e,t)=>{const n=o&&t,u="dark"===e?0:1,d="dark"===e?1:0,c=Date.now();document.documentElement.classList.remove("theme-"+("dark"===e?"light":"dark")),o&&document.documentElement.classList.add("disable-animations"),document.documentElement.classList.add("theme-"+e),setTimeout(()=>{document.documentElement.classList.remove("disable-animations")},500),o=!0,n?Object(r.b)(()=>{const e=Math.min((Date.now()-c)/200,1);return s(u,d,function(e){return 1-(1-e)**3.5}(e)),e<1}):s(u,d)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return d}));const r=["female_sign","male_sign","medical_symbol"];function u(e){const t=e.split("-").map(e=>parseInt(e,16));return String.fromCodePoint(...t)}function o(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 d(e){const t={categories:[],emojis:{}};for(let n=0;n({userOrChat:t?Object(d.Bb)(e,t):void 0}),(e,t)=>Object(o.l)(t,["openChat","openChatByUsername"]))(({username:e,userOrChat:t,children:n,openChat:u,openChatByUsername:o})=>r.a.createElement("a",{onClick:()=>{t?u({id:t.id}):e&&o({username:e.substring(1)})},className:"text-entity-link"},n))},function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(0);function u(e,t,n){Object(r.n)(()=>{const r=e=>{const r=t.current,u=e.target;r&&u&&(r.contains(e.target)&&!u.classList.contains("backdrop")||(e.preventDefault(),e.stopPropagation(),n&&n()))};return e&&n&&document.addEventListener("mousedown",r),()=>{document.removeEventListener("mousedown",r)}},[e,t,n])}},function(e,t,n){e.exports=function(){return new Worker(n.p+"c40704558924293a9c69.worker.js")}},function(e,t,n){e.exports=function(){return new Worker(n.p+"01705582fc3eca0e007b.worker.js")}},function(e,t,n){e.exports=function(){return new Worker(n.p+"0dbbe0a906f6c2adf071.worker.js")}},function(e,t,n){e.exports=function(){return new Worker(n.p+"a66075669d8d0ac2d740.worker.js")}},function(e,t,n){"use strict";var r=n(2),u=n(7),o=n(10),d=n(66);Object(r.b)("init",e=>{const{theme:t,animationLevel:n,messageTextSize:r,language:c}=e.settings.byKey;Object(o.c)(c),document.documentElement.style.setProperty("--message-text-size",r+"px"),document.body.classList.add("initial"),document.body.classList.add("animation-level-"+n),document.body.classList.add(u.k?"is-touch-env":"is-pointer-env"),Object(d.a)(t,n>0),u.i&&document.body.classList.add("is-safari"),u.d?document.body.classList.add("is-ios"):u.b&&document.body.classList.add("is-android")}),Object(r.b)("setIsUiReady",(e,t,n)=>{const{uiReadyState:r}=n;return 2===r&&document.body.classList.remove("initial"),{...e,uiReadyState:r}}),Object(r.b)("setAuthPhoneNumber",(e,t,n)=>{const{phoneNumber:r}=n;return{...e,authPhoneNumber:r}}),Object(r.b)("setAuthRememberMe",(e,t,n)=>({...e,authRememberMe:Boolean(n)})),Object(r.b)("clearAuthError",e=>({...e,authError:void 0}))},function(e,t,n){"use strict";var r=n(2),u=n(1),o=n(11);Object(r.b)("initApi",(e,t)=>{const n=localStorage.getItem(u.w)||void 0;return Object(o.c)(t.apiUpdate,n),{...e,authIsSessionRemembered:Boolean(n)}}),Object(r.b)("setAuthPhoneNumber",(e,t,n)=>{const{phoneNumber:r}=n;return Object(o.a)("provideAuthPhoneNumber",r),{...e,authIsLoading:!0,authError:void 0}}),Object(r.b)("setAuthCode",(e,t,n)=>{const{code:r}=n;return Object(o.a)("provideAuthCode",r),{...e,authIsLoading:!0,authError:void 0}}),Object(r.b)("setAuthPassword",(e,t,n)=>{const{password:r}=n;return Object(o.a)("provideAuthPassword",r),{...e,authIsLoading:!0,authError:void 0}}),Object(r.b)("uploadProfilePhoto",(e,t,n)=>{const{file:r}=n;Object(o.a)("uploadProfilePhoto",r)}),Object(r.b)("signUp",(e,t,n)=>{const{firstName:r,lastName:u}=n;return Object(o.a)("provideAuthRegistration",{firstName:r,lastName:u}),{...e,authIsLoading:!0,authError:void 0}}),Object(r.b)("returnToAuthPhoneNumber",e=>(Object(o.a)("restartAuth"),{...e,authError:void 0})),Object(r.b)("gotToAuthQrCode",e=>(Object(o.a)("restartAuthWithQr"),{...e,authIsLoadingQrCode:!0,authError:void 0})),Object(r.b)("saveSession",(e,t,n)=>{const{sessionId:r}=n;localStorage.setItem(u.w,r)}),Object(r.b)("signOut",()=>{!async function(){await Object(o.a)("destroy"),localStorage.removeItem(u.w),Object(r.d)().init()}()}),Object(r.b)("loadNearestCountry",e=>{"connectionStateReady"===e.connectionState&&(async()=>{const e=await Object(o.a)("fetchNearestCountry");Object(r.g)({...Object(r.e)(),authNearestCountry:e})})()})},function(e,t,n){"use strict";var r=n(2),u=n(1),o=n(37),d=n(10);Object(r.b)("apiUpdate",(e,t,n)=>{switch(u.l&&"updateUserStatus"!==n["@type"]&&console.log("[GramJs] UPDATE",n["@type"],{update:n}),n["@type"]){case"updateApiReady":!function(e){Object(d.c)(e.settings.byKey.language)}(e);break;case"updateAuthorizationState":!function(e){let t=Object(r.e)();const n="authorizationStateReady"===t.authState,u=e.authorizationState;switch(Object(r.g)({...t,authState:u,authIsLoading:!1}),t=Object(r.e)(),u){case"authorizationStateLoggingOut":Object(r.g)({...t,isLoggingOut:!0});break;case"authorizationStateWaitCode":Object(r.g)({...t,authIsCodeViaApp:e.isCodeViaApp});break;case"authorizationStateWaitPassword":Object(r.g)({...t,authHint:e.hint});break;case"authorizationStateWaitQrCode":Object(r.g)({...t,authIsLoadingQrCode:!1,authQrCode:e.qrCode});break;case"authorizationStateReady":{if(n)break;Object(r.g)({...t,isLoggingOut:!1,lastSyncTime:Date.now()});const{sessionId:u}=e;u&&t.authRememberMe&&Object(r.d)().saveSession({sessionId:u});break}}}(n);break;case"updateAuthorizationError":!function(e){Object(r.g)({...Object(r.e)(),authError:e.message})}(n);break;case"updateConnectionState":!function(e){const{connectionState:t}=e,n=Object(r.e)();Object(r.g)({...n,connectionState:t}),"connectionStateReady"===t&&"authorizationStateReady"===n.authState?Object(r.d)().sync():"connectionStateBroken"===t&&Object(r.d)().signOut()}(n);break;case"updateCurrentUser":!function(e){const{currentUser:t}=e;Object(r.g)({...Object(o.lb)(Object(r.e)(),t.id,t),currentUserId:t.id})}(n);break;case"error":"SESSION_REVOKED"===n.error.message&&t.signOut(),t.showError({error:n.error})}})},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){"use strict";n.r(t);n(21),function(){function e(){var t=Error.call(this,"ServiceWorker is not supported.");return Object.setPrototypeOf(t,e.prototype),t}e.prototype=Object.create(Error.prototype)}();var r=n.p+"serviceWorker.js";var u=n(1),o=n(7),d=n(2);o.j&&window.addEventListener("load",async()=>{try{await navigator.serviceWorker.register(r),u.l&&console.log("ServiceWorker registered"),await navigator.serviceWorker.ready,navigator.serviceWorker.controller?u.l&&console.log("ServiceWorker ready"):(u.l&&console.error("ServiceWorker not available"),Object(d.d)().showError({error:{message:"SERVICE_WORKER_DISABLED"}}))}catch(e){u.l&&console.error("ServiceWorker registration failed: ",e)}});var c=n(57);const a={isLeftColumnShown:!0,isChatInfoShown:!1,uiReadyState:0,authRememberMe:!0,blocked:{ids:[],totalCount:0},users:{byId:{}},chats:{listIds:{},isFullyLoaded:{},orderedPinnedIds:{},totalCount:{},byId:{}},messages:{byChatId:{}},scheduledMessages:{byChatId:{}},chatFolders:{byId:{}},fileUploads:{byMessageLocalId:{}},recentEmojis:["grinning","kissing_heart","christmas_tree","brain","trophy"],stickers:{setsById:{},added:{},recent:{stickers:[]},favorite:{stickers:[]},featured:{setIds:[]},search:{},forEmoji:{}},gifs:{saved:{},search:{}},globalSearch:{},localTextSearch:{byChatThreadKey:{}},localMediaSearch:{byChatId:{}},management:{byChatId:{}},topPeers:{},mediaViewer:{},audioPlayer:{},forwardMessages:{},pollResults:{},payment:{},notifications:[],errors:[],activeSessions:[],settings:{byKey:{messageTextSize:u.o,isBackgroundBlurred:!0,animationLevel:u.d,messageSendKeyCombo:"enter",theme:"light",shouldAutoDownloadMediaFromContacts:!0,shouldAutoDownloadMediaInPrivateChats:!0,shouldAutoDownloadMediaInGroups:!0,shouldAutoDownloadMediaInChannels:!0,shouldAutoPlayGifs:!0,shouldAutoPlayVideos:!0,shouldSuggestStickers:!0,shouldLoopStickers:!0,language:"en"},privacy:{}},twoFaSettings:{}};var i=n(5),s=n(9),f=n(3),l=n(6);const b=Object(s.g)((function(){Object(s.c)(()=>{const e=Object(d.e)();if(e.isLoggingOut)return;const t={...a,...Object(f.l)(e,["authState","authPhoneNumber","authRememberMe","authIsSessionRemembered","authNearestCountry","currentUserId","contactList","chatFolders","topPeers","recentEmojis"]),isChatInfoShown:m(e),users:p(e),chats:g(e),messages:y(e),globalSearch:{recentlyFoundChatIds:e.globalSearch.recentlyFoundChatIds},settings:v(e)},n=JSON.stringify(t);localStorage.setItem(u.v,n)})}),1e3,!1);function h(e){if(!u.u){if(localStorage.getItem(u.w))return Object(d.a)(b),function(e){u.l&&console.time("global-state-cache-read");const t=localStorage.getItem(u.v),n=t?JSON.parse(t):void 0;u.l&&console.timeEnd("global-state-cache-read");n&&(n.settings.byKey={...e.settings.byKey,...n.settings.byKey});return{...e,...n}}(e)}}function m(e){return window.innerWidth>u.Q&&e.isChatInfoShown}function p(e){const{users:{byId:t,selectedId:n}}=e;return{byId:t,selectedId:window.innerWidth>u.Q?n:void 0}}function g(e){const t=[...(e.chats.listIds.active||[]).slice(0,u.t)],{chatId:n}=Object(l.x)(e)||{};return{...e.chats,byId:Object(f.l)(e.chats.byId,n?[...t,n]:t),listIds:{active:t},isFullyLoaded:{},orderedPinnedIds:{active:e.chats.orderedPinnedIds.active}}}function y(e){const t={},{chatId:n}=Object(l.x)(e)||{};[...(e.chats.listIds.active||[]).slice(0,u.t),...n?[n]:[]].forEach(n=>{const r=e.messages.byChatId[n];if(!r)return;const u=r.threadsById[i.MAIN_THREAD_ID];u&&u.viewportIds&&(t[n]={byId:Object(f.l)(r.byId,u.viewportIds),threadsById:{[i.MAIN_THREAD_ID]:u}})});const r=Object(l.x)(e);return{byChatId:t,messageLists:!r||o.f?void 0:[{...r,threadId:i.MAIN_THREAD_ID,type:"thread"}]}}function v(e){const{byKey:t}=e.settings;return{byKey:t,privacy:{}}}u.u||(Object(d.b)("saveSession",()=>{Object(d.a)(b)}),Object(d.b)("signOut",()=>{Object(d.f)(b),localStorage.removeItem(u.v)})),Object(d.b)("init",()=>{const e=Object(f.d)(a);return h(e)||e});var I=n(0),w=n(49),O=(n(74),n(75),n(76),n(24)),j=n(36),C=n(27),E=n(14);const S=["400 1em Roboto","500 1em Roboto"];function M(){if("fonts"in document)return Promise.all(S.map(e=>document.fonts.load(e)))}var A=n(48),k=n(12),T=n(8),P=(n(77),n.p+"telegram-logo.df3a91becaa9678c529b4c4cadd45204.svg"),N=n.p+"auth-caption.4791dbecd189f14e85d8e9776308639d.png",D=n.p+"monkey.a3d5fcdc50b18dc55695f7dd4101a8c9.svg";function L(){const{listIds:e,byId:t}=Object(d.e)().chats;if(e.active)return Promise.all(e.active.slice(0,10).map(e=>{const n=t[e];if(!n)return;const r=Object(O.d)(n);return r?A.b(r,i.ApiMediaFormat.DataUri):void 0}))}const x={main:()=>Promise.all([Object(k.d)(k.a.Main,"Main").then(M),L()]),authPhoneNumber:()=>Promise.all([Object(E.g)(N),Object(E.g)(P)]),authCode:()=>Promise.all([Object(E.g)(D),M()]),authPassword:()=>Object(E.g)(D),authQrCode:M};var B=Object(d.h)(e=>({uiReadyState:e.uiReadyState,hasCustomBackground:Boolean(e.settings.byKey.customBackground),isCustomBackgroundColor:Boolean((e.settings.byKey.customBackground||"").match(/^#[a-f\d]{6,8}$/i)),isRightColumnShown:Object(l.U)(e)}),(e,t)=>Object(f.l)(t,["setIsUiReady"]))(({page:e,children:t,hasCustomBackground:n,isCustomBackgroundColor:r,isRightColumnShown:u,setIsUiReady:o})=>{const[d,c]=Object(j.a)(),{shouldRender:a,transitionClassNames:i}=Object(C.a)(!d,void 0,!0);return Object(I.n)(()=>{let t;return Promise.race([Object(s.e)(700),x[e]()]).then(()=>{c(),o({uiReadyState:1}),t=window.setTimeout(()=>{o({uiReadyState:2})},1e3)}),()=>{t&&(clearTimeout(t),t=void 0),o({uiReadyState:0})}},[]),I.a.createElement("div",{id:"UiLoader"},t,a&&I.a.createElement("div",{className:Object(T.a)("mask",i)},"main"===e?I.a.createElement(I.a.Fragment,null,I.a.createElement("div",{className:"left"}),I.a.createElement("div",{className:Object(T.a)("middle",n&&!r&&"custom-bg-image",n&&r&&"custom-bg-color",u&&"with-right-column")}),u&&I.a.createElement("div",{className:"right"})):I.a.createElement("div",{className:"blank"})))}),R=n(13),F=n(19),U=n(31),_=n(39),G=n(46),$=n(35),W=n(56),z=n(32),K=n(20);n(84);const H=200+u.c;var V=Object(I.h)(({id:e,value:t,isLoading:n,onChange:r})=>{const u=Object(I.q)(null),[o,d]=Object(I.r)(),[c,a]=Object(I.r)(F.a);function i(e){d(e),a(function(e=""){return e.length?F.a.filter(t=>Object(G.a)(t.name,e)):F.a}(e))}const s=Object(I.m)(e=>{const{countryId:t}=e.currentTarget.firstElementChild.dataset,n=F.a.find(e=>e.id===t);n&&r(n),setTimeout(()=>i(void 0),H)},[r]),f=Object(I.m)(e=>{i(e.currentTarget.value)},[]),l=Object(I.m)(e=>{if(8!==e.keyCode)return;const n=e.currentTarget;t&&void 0===o&&(n.value=""),i(n.value)},[o,t]);return I.a.createElement(W.a,{className:"CountryCodeInput",trigger:({onTrigger:r,isOpen:d})=>{const c=()=>{if(d)return;setTimeout(()=>{u.current.select()},50),r();const e=document.getElementById("auth-phone-number-form");e.scrollTo({top:e.scrollHeight,behavior:"smooth"})},a=void 0!==o?o:t&&t.name||"";return I.a.createElement("div",{className:Object(T.a)("input-group",t&&"touched")},I.a.createElement("input",{ref:u,className:Object(T.a)("form-control",d&&"focus"),type:"text",id:e,value:a,autoComplete:"off",onClick:c,onFocus:c,onInput:f,onKeyDown:l}),I.a.createElement("label",null,"Country"),n?I.a.createElement(K.a,{color:"black"}):I.a.createElement("i",{onClick:c,className:Object(T.a)("css-icon-down",d&&"open")}))}},c.map(e=>I.a.createElement(z.a,{key:e.id,className:t&&e.id===t.id?"selected":"",onClick:s},I.a.createElement("span",{"data-country-id":e.id}),I.a.createElement("span",{className:"country-flag"},Object($.a)(e.flag,["hq_emoji"])),I.a.createElement("span",{className:"country-name"},e.name),I.a.createElement("span",{className:"country-code"},e.code))),!c.length&&I.a.createElement(z.a,{key:"no-results",className:"no-results",disabled:!0},I.a.createElement("span",null,"No countries matched your filter.")))}),q=n(40),J=n(16);let Y=!1;var Q=Object(I.h)(Object(d.h)(e=>Object(f.l)(e,["connectionState","authState","authPhoneNumber","authIsLoading","authIsLoadingQrCode","authError","authRememberMe","authNearestCountry"]),(e,t)=>Object(f.l)(t,["setAuthPhoneNumber","setAuthRememberMe","clearAuthError","loadNearestCountry","gotToAuthQrCode"]))(({connectionState:e,authState:t,authPhoneNumber:n,authIsLoading:r,authIsLoadingQrCode:d,authError:c,authRememberMe:a,authNearestCountry:i,setAuthPhoneNumber:s,setAuthRememberMe:f,loadNearestCountry:l,clearAuthError:b,gotToAuthQrCode:h})=>{const m=Object(I.q)(null),[p,g]=Object(I.r)(),[y,v]=Object(I.r)(),[w,O]=Object(I.r)(!1),[j,C]=Object(I.r)(),S=p?`${p.code} ${y||""}`:y,A=S&&S.replace(/[^\d]+/g,"").length>=10;Object(I.n)(()=>{o.k||m.current.focus()},[p]),Object(I.n)(()=>{"connectionStateReady"!==e||i||l()},[e,i,l]),Object(I.n)(()=>{!i||p||w||g(Object(F.d)(i))},[p,i,w]);const k=Object(I.m)(e=>{const t=Object(F.e)(e),n=!p||t&&t.id!==p.id?t:p;e.length?(!p||n&&n.code!==p.code)&&g(n):g(void 0),v(Object(F.b)(e,n))},[p]);Object(I.n)(()=>{void 0===y&&n&&k(n)},[n,y,k]),Object(I.o)(()=>{m.current&&j&&m.current.setSelectionRange(...j)},[j]),Object(I.n)(()=>{setTimeout(()=>{R.b(u.F),R.b(u.G),R.b(u.H),R.b(u.k),R.b(u.y)},2e3)},[]);const T=Object(I.m)(e=>{c&&b(),Y||(Y=!0,M(),Object(E.g)(D));const{value:t,selectionStart:n,selectionEnd:r}=e.target;C(n&&r&&r{f(e.target.checked)},[f]);const N="authorizationStateWaitPhoneNumber"===t;return I.a.createElement("div",{id:"auth-phone-number-form",className:"custom-scroll"},I.a.createElement("div",{className:"auth-form"},I.a.createElement("div",{id:"logo"}),I.a.createElement("div",{className:"caption-image"}),I.a.createElement("p",{className:"note"},"Please confirm your country and",I.a.createElement("br",null),"enter your phone number."),I.a.createElement("form",{action:"",onSubmit:function(e){e.preventDefault(),r||A&&s({phoneNumber:S})}},I.a.createElement(V,{id:"sign-in-phone-code",value:p,isLoading:!i&&!p,onChange:g}),I.a.createElement(_.a,{ref:m,id:"sign-in-phone-number",label:"Phone Number",value:S,error:c,inputMode:"tel",onChange:T}),I.a.createElement(q.a,{id:"sign-in-keep-session",label:"Keep me signed in",checked:Boolean(a),onChange:P}),A&&(N?I.a.createElement(U.a,{type:"submit",ripple:!0,isLoading:r},"Next"):I.a.createElement(J.a,null)),N&&I.a.createElement(U.a,{isText:!0,ripple:!0,isLoading:d,onClick:h},"Log in by QR code"))))})),Z=n(17);var X=()=>{const e=Object(Z.a)(k.a.Auth,"AuthCode");return e?I.a.createElement(e,null):I.a.createElement(J.a,null)};var ee=()=>{const e=Object(Z.a)(k.a.Auth,"AuthPassword");return e?I.a.createElement(e,null):I.a.createElement(J.a,null)};var te=()=>{const e=Object(Z.a)(k.a.Auth,"AuthRegister");return e?I.a.createElement(e,null):I.a.createElement(J.a,null)};var ne=()=>{const e=Object(Z.a)(k.a.Auth,"AuthQrCode");return e?I.a.createElement(e,null):I.a.createElement(J.a,null)};n(87);var re=Object(I.h)(Object(d.h)(e=>Object(f.l)(e,["authState"]),(e,t)=>Object(f.l)(t,["initApi"]))(({authState:e,initApi:t})=>{switch(Object(I.n)(()=>{t()},[t]),e){case"authorizationStateWaitCode":return I.a.createElement(B,{page:"authCode",key:"authCode"},I.a.createElement(X,null));case"authorizationStateWaitPassword":return I.a.createElement(B,{page:"authPassword",key:"authPassword"},I.a.createElement(ee,null));case"authorizationStateWaitRegistration":return I.a.createElement(te,null);case"authorizationStateWaitQrCode":return I.a.createElement(B,{page:"authQrCode",key:"authQrCode"},I.a.createElement(ne,null));case"authorizationStateWaitPhoneNumber":default:return I.a.createElement(B,{page:"authPhoneNumber",key:"authPhoneNumber"},I.a.createElement(Q,null))}}));var ue=()=>{const e=Object(Z.a)(k.a.Main,"Main");return e?I.a.createElement(e,null):void 0};function oe(){return d.c.createElement(B,{page:"main",key:"main"},d.c.createElement(ue,null))}var de=Object(d.h)(e=>Object(f.l)(e,["authState","authIsSessionRemembered"]))(({authState:e,authIsSessionRemembered:t})=>{if(Object(I.n)(()=>{Object(w.b)()},[]),e)switch(e){case"authorizationStateWaitPhoneNumber":case"authorizationStateWaitCode":case"authorizationStateWaitPassword":case"authorizationStateWaitRegistration":case"authorizationStateWaitQrCode":return d.c.createElement(re,null);case"authorizationStateClosed":case"authorizationStateClosing":case"authorizationStateLoggingOut":case"authorizationStateReady":return oe()}return t?oe():d.c.createElement(re,null)});n(88);u.l&&console.log(">>> INIT"),Object(d.d)().init(),u.l&&console.log(">>> START INITIAL RENDER"),c.a.render(d.c.createElement(de,null),document.getElementById("root")),u.l&&console.log(">>> FINISH INITIAL RENDER"),document.addEventListener("dblclick",()=>{console.log("GLOBAL STATE",Object(d.e)())})}]); \ No newline at end of file diff --git a/dist/main.d3f5c9af3d3cbfc7c7ae.css b/dist/main.d3f5c9af3d3cbfc7c7ae.css deleted file mode 100644 index af26ba6b..00000000 --- a/dist/main.d3f5c9af3d3cbfc7c7ae.css +++ /dev/null @@ -1 +0,0 @@ -#UiLoader{height:100%}@media (max-width:600px){#UiLoader{height:calc(var(--vh, 1vh)*100)}}#UiLoader .mask{position:fixed;top:0;left:0;right:0;margin:0 auto;width:100%;max-width:1680px;height:100%;z-index:var(--z-ui-loader-mask);display:flex}#UiLoader .mask .left{flex:1;background:var(--color-background);min-width:15.5rem;max-width:26.5rem}@media (min-width:1680px){#UiLoader .mask .left{border-left:1px solid var(--color-borders)}}@media (max-width:1275px){#UiLoader .mask .left{flex:2}}@media (max-width:925px){#UiLoader .mask .left{min-width:26.5rem}}@media (max-width:600px){#UiLoader .mask .left{max-width:none;width:100vw}}#UiLoader .mask .middle{flex:3;border-left:1px solid var(--color-borders);border-right:1px solid var(--color-borders);position:relative;z-index:1;overflow:hidden}#UiLoader .mask .middle:before{content:"";display:block;position:absolute;top:0;left:0;bottom:0;right:0;background:no-repeat 50%;background-size:cover;z-index:-1;transform-origin:left center}.theme-dark body.initial #UiLoader .mask .middle:before{background-color:#0f0f0f}.theme-light body.initial #UiLoader .mask .middle:before,body:not(.initial) #UiLoader .mask .middle:before{background-image:url(chat-bg.0e9c45048ff468c28042bcf15ff9e0d2.jpg)}#UiLoader .mask .middle.with-right-column:before{transform:scale(.67)}@media screen and (min-width:1276px){#UiLoader .mask .middle:before{margin:-16rem -5rem -20rem 0}}#UiLoader .mask .middle.custom-bg-image:before{margin:-1rem;background-image:none!important}@media (max-width:1275px){#UiLoader .mask .middle{flex:3;border-right:none}}@media (max-width:600px){#UiLoader .mask .middle{display:none}}#UiLoader .mask .right{position:absolute;top:0;right:0;z-index:1;height:100%;width:var(--right-column-width);min-width:15.5rem;max-width:26.5rem;border-left:1px solid var(--color-borders);background:var(--color-background)}#UiLoader .blank{flex:1;background:var(--color-background)}.Spinner{--spinner-size:2rem;position:relative;display:flex;align-items:center;justify-content:center;width:var(--spinner-size);height:var(--spinner-size)}.Spinner>div{position:absolute;top:0;left:0;right:0;bottom:0;background-repeat:no-repeat;background-size:100%;animation-name:spin;animation-duration:1s;animation-iteration-count:infinite;animation-timing-function:linear}.Spinner.with-background:before{content:"";position:absolute;left:-.125rem;top:-.125rem;bottom:-.125rem;right:-.125rem;border-radius:50%;background:rgba(0,0,0,.25)}.Spinner.white>div{background-image:var(--spinner-white-data)}.Spinner.white.with-background>div{background-image:var(--spinner-white-thin-data)}.Spinner.blue>div{background-image:var(--spinner-blue-data)}.Spinner.black>div{background-image:var(--spinner-black-data)}.Spinner.green>div{background-image:var(--spinner-green-data)}.Spinner.gray>div{background-image:var(--spinner-gray-data)}@keyframes spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}@keyframes ripple-animation{0%{transform:scale(0);opacity:1}50%{opacity:1}to{opacity:0;transform:scale(2)}}.ripple-container{position:absolute;top:0;left:0;bottom:0;right:0}body.animation-level-0 .ripple-container{display:none}.ripple-container span{position:absolute;display:block;background-color:var(--ripple-color,rgba(0,0,0,.08));border-radius:50%;transform:scale(0);animation:ripple-animation .7s}.Button{outline:none!important;display:flex;align-items:center;justify-content:center;width:100%;height:3.5rem;border:0;border-radius:var(--border-radius-default);background:transparent;padding:.625rem;color:#fff;line-height:1.2;cursor:pointer;text-transform:uppercase;flex-shrink:0;position:relative;overflow:hidden;transition:background-color .15s,color .15s;text-decoration:none!important}.Button.clicked,.Button:active,body.animation-level-0 .Button{transition:none!important}.Button.disabled{opacity:.5!important;cursor:default;pointer-events:none}.Button.round{width:3.5rem;border-radius:50%}.Button.round i{font-size:1.5rem}.Button.primary{background:var(--color-primary);color:var(--color-white);--ripple-color:rgba(0,0,0,0.08)}.Button.primary:not(.disabled):not(:disabled).active,.Button.primary:not(.disabled):not(:disabled):active,.Button.primary:not(.disabled):not(:disabled):focus,.Button.primary:not(.disabled):not(:disabled):hover{background:var(--color-primary-shade)}body.animation-level-0 .Button.primary:not(.disabled):not(:disabled):active{background:var(--color-primary-shade-darker)}.Button.secondary{background:var(--color-background);color:rgba(var(--color-text-secondary-rgb),.75);--ripple-color:rgba(0,0,0,0.08)}.Button.secondary:not(.disabled):not(:disabled).active,.Button.secondary:not(.disabled):not(:disabled):active,.Button.secondary:not(.disabled):not(:disabled):focus,.Button.secondary:not(.disabled):not(:disabled):hover{background:var(--color-primary);color:#fff}body.animation-level-0 .Button.secondary:not(.disabled):not(:disabled):active{background:var(--color-primary-shade)}.Button.gray{background:var(--color-background);color:var(--color-text-secondary);--ripple-color:rgba(0,0,0,0.08)}.Button.gray:not(.disabled):not(:disabled).active,.Button.gray:not(.disabled):not(:disabled):active,.Button.gray:not(.disabled):not(:disabled):focus,.Button.gray:not(.disabled):not(:disabled):hover{color:var(--color-primary)}body.animation-level-0 .Button.gray:not(.disabled):not(:disabled):active{background:var(--color-chat-hover)}.Button.danger{background:var(--color-background);color:var(--color-error);--ripple-color:rgba(var(--color-error-rgb),.16)}.Button.danger:not(.disabled):not(:disabled).active,.Button.danger:not(.disabled):not(:disabled):active,.Button.danger:not(.disabled):not(:disabled):focus,.Button.danger:not(.disabled):not(:disabled):hover{background:var(--color-error);color:var(--color-white)}body.animation-level-0 .Button.danger:not(.disabled):not(:disabled):active{background:var(--color-error-shade)}.Button.text{background:none}.Button.text.primary{color:var(--color-primary);background:none}.Button.text.primary:not(.disabled):not(:disabled).active,.Button.text.primary:not(.disabled):not(:disabled):active,.Button.text.primary:not(.disabled):not(:disabled):focus,.Button.text.primary:not(.disabled):not(:disabled):hover{background:rgba(var(--color-primary-shade-rgb),.08)}body.animation-level-0 .Button.text.primary:not(.disabled):not(:disabled):active{background:rgba(var(--color-primary-shade-rgb),.16)}.Button.text.secondary{background:none;color:var(--color-text-secondary)}.Button.text.danger:not(.disabled):not(:disabled).active,.Button.text.danger:not(.disabled):not(:disabled):active,.Button.text.danger:not(.disabled):not(:disabled):focus,.Button.text.danger:not(.disabled):not(:disabled):hover{background:rgba(var(--color-error-rgb),.08);color:var(--color-error)}body.animation-level-0 .Button.text.danger:not(.disabled):not(:disabled):active{background:rgba(var(--color-error-rgb),.16)}.Button.faded{opacity:.75}.Button.faded.activated,.Button.faded:not(.disabled):not(:disabled).active,.Button.faded:not(.disabled):not(:disabled):active,.Button.faded:not(.disabled):not(:disabled):focus,.Button.faded:not(.disabled):not(:disabled):hover{opacity:1}.Button.translucent{background-color:initial;color:var(--color-text-secondary);--ripple-color:rgba(var(--color-text-secondary-rgb),0.08)}.Button.translucent:not(.disabled):not(:disabled).active,.Button.translucent:not(.disabled):not(:disabled):active,.Button.translucent:not(.disabled):not(:disabled):focus,.Button.translucent:not(.disabled):not(:disabled):hover{background-color:rgba(var(--color-text-secondary-rgb),.08)}body.animation-level-0 .Button.translucent:not(.disabled):not(:disabled):active{background-color:rgba(var(--color-text-secondary-rgb),.16)}.Button.translucent.activated{color:var(--color-primary)}.Button.translucent-white{background-color:initial;color:hsla(0,0%,100%,.5);--ripple-color:hsla(0,0%,100%,0.08)}.Button.translucent-white:not(.disabled):not(:disabled).active,.Button.translucent-white:not(.disabled):not(:disabled):active,.Button.translucent-white:not(.disabled):not(:disabled):focus,.Button.translucent-white:not(.disabled):not(:disabled):hover{background-color:hsla(0,0%,100%,.08);color:#fff}body.animation-level-0 .Button.translucent-white:not(.disabled):not(:disabled):active{background-color:hsla(0,0%,100%,.16)}.Button.dark{background-color:rgba(0,0,0,.75);color:#fff;--ripple-color:hsla(0,0%,100%,0.08)}.Button.dark:not(.disabled):not(:disabled).active,.Button.dark:not(.disabled):not(:disabled):active,.Button.dark:not(.disabled):not(:disabled):focus,.Button.dark:not(.disabled):not(:disabled):hover{background-color:rgba(0,0,0,.85);color:#fff}body.animation-level-0 .Button.dark:not(.disabled):not(:disabled):active{background-color:rgba(0,0,0,.95)}.Button.smaller{height:2.75rem;padding:.3125rem}.Button.smaller.round{width:2.75rem}.Button.smaller.pill{height:2.5rem;border-radius:1.25rem;padding:.3125rem 1rem}.Button.smaller.with-icon{padding-left:.75rem;padding-right:1.25rem}.Button.smaller.with-icon i{font-size:1.5rem;margin-right:.5rem}@media (max-width:600px){.Button.smaller{height:2.5rem}.Button.smaller.round{width:2.5rem}}.Button.tiny{height:2.25rem;padding:.4375rem;border-radius:var(--border-radius-default-small);font-size:.875rem;font-weight:500}.Button.tiny.round{width:2.25rem;height:2.25rem;border-radius:50%}.Button.tiny i{font-size:1.25rem}.Button.tiny.pill{height:2rem;border-radius:1rem;padding:.3125rem 1rem;font-size:1rem}.Button.fluid{padding-left:1.75rem;padding-right:1.75rem;width:auto}.Button.fluid.tiny{padding-left:1.375rem;padding-right:1.375rem}.Button.pill{border-radius:1.75rem;padding-left:1.75rem;padding-right:1.75rem;text-transform:none}.Button.loading{position:relative;pointer-events:none}.Button.loading .Spinner{position:absolute;right:.875rem;top:.875rem;--spinner-size:1.8rem}.Button .emoji{vertical-align:-3px}.Menu.fluid .bubble{min-width:13.5rem;width:auto}.Menu .backdrop{position:fixed;left:-100vw;right:-100vw;top:-100vh;bottom:-100vh;z-index:var(--z-menu-backdrop)}.Menu .bubble{display:block;list-style:none;padding:.5rem 0;margin:0;position:absolute;background-color:var(--color-background);box-shadow:0 .25rem .5rem .1rem var(--color-default-shadow);border-radius:var(--border-radius-default);min-width:13.5rem;z-index:var(--z-menu-bubble);transform:scale(.2);transition:opacity .2s cubic-bezier(.2,0,.2,1),transform .2s cubic-bezier(.2,0,.2,1)!important;--offset-y:calc(100% + 0.5rem);--offset-x:0}.Menu .bubble.open{transform:scale(1)}.Menu .bubble.closing{transition:opacity .2s ease-in,transform .2s ease-in!important}body.animation-level-0 .Menu .bubble{transform:none!important;transition:opacity .15s!important}body.has-open-dialog .Menu .bubble{transition:none!important}.Menu .bubble.top{top:var(--offset-y)}.Menu .bubble.bottom{bottom:var(--offset-y)}.Menu .bubble.left{left:var(--offset-x)}.Menu .bubble.right{right:var(--offset-x)}.DropdownMenu,.MenuItem{position:relative}.MenuItem{width:100%;background:none;border:none!important;box-shadow:none!important;outline:none!important;display:flex;padding:1rem;overflow:hidden;line-height:1.5rem;white-space:nowrap;color:var(--color-text);--ripple-color:rgba(0,0,0,0.08);cursor:pointer}.MenuItem:focus,.MenuItem:hover{background-color:var(--color-chat-hover)}.MenuItem i{font-size:1.5rem;color:var(--color-text-secondary)}.MenuItem .menu-item-name,.MenuItem i{margin-right:2rem}.MenuItem.disabled{opacity:.5!important;cursor:default!important}.MenuItem.destructive{color:var(--color-error)}.MenuItem.destructive i{color:inherit}.MenuItem:not(.has-ripple):not(.disabled):active{background-color:var(--color-chat-active);transition:none!important}.MenuItem>.Switcher{margin-left:auto}.CountryCodeInput .input-group{cursor:pointer;z-index:var(--z-country-code-input-group)}.CountryCodeInput .input-group .Spinner{position:absolute;top:1rem;right:.75rem;opacity:.5;--spinner-size:1.5rem}.CountryCodeInput .input-group .css-icon-down{position:absolute;top:1.125rem;right:1rem;width:.75rem;height:.75rem;border:2px solid var(--color-text-secondary);border-top:0;border-left:0;transform:scaleY(1) rotate(45deg);transition:color .2s ease,transform .2s ease,top .2s ease}.CountryCodeInput .input-group .css-icon-down.open{border-color:var(--color-primary);transform:scaleY(-1) rotate(45deg);top:1.5rem}.CountryCodeInput .bubble{width:100%;max-height:23.5rem;overflow-y:auto;transform-origin:top center!important;transform:scale(.95)}.CountryCodeInput .bubble.open{transform:scaleY(1)}.CountryCodeInput .MenuItem button{display:flex;align-items:center}.CountryCodeInput .MenuItem.no-results button{justify-content:center;padding:.5rem 1rem}.CountryCodeInput .MenuItem.no-results button span{font-size:.875rem}.CountryCodeInput .country-flag{font-size:2rem;margin-right:2rem}.CountryCodeInput .country-flag .emoji{width:2rem;height:2rem;display:inline-block;vertical-align:4px;margin:-.5rem .125rem}.CountryCodeInput .country-name{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-right:1rem;text-align:left}.CountryCodeInput .country-code{margin-left:auto;opacity:.5}.Checkbox{display:block;position:relative;padding-left:4.5rem;text-align:left;margin-bottom:1.5rem;line-height:1.5rem;cursor:pointer}.Checkbox.disabled{pointer-events:none;opacity:.5}.Checkbox.round .Checkbox-main:before{border-radius:50%}.Checkbox.round .Checkbox-main:after{background:var(--color-primary) url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTIiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEzLjkuOEw1LjggOC45IDIuMSA1LjJjLS40LS40LTEuMS0uNC0xLjYgMC0uNC40LS40IDEuMSAwIDEuNkw1IDExLjJjLjQuNCAxLjEuNCAxLjYgMGw4LjktOC45Yy40LS40LjQtMS4xIDAtMS42LS41LS40LTEuMi0uNC0xLjYuMXoiIGZpbGw9IiNGRkYiLz48L3N2Zz4=) no-repeat 50% 50%;background-size:12px;border-radius:50%}.Checkbox.loading .Checkbox-main:after,.Checkbox.loading .Checkbox-main:before{opacity:0!important}.Checkbox.loading .Spinner{position:absolute;left:.375rem;top:.125rem;opacity:0;animation:fade-in .2s ease forwards;--spinner-size:1.25rem}.Checkbox.blocking input:not(:checked)~.Checkbox-main:before{border-color:var(--color-error)}.Checkbox.blocking input:not(:checked)~.Checkbox-main:after{background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMCAwaDI0djI0SDB6Ii8+PHBhdGggZmlsbD0iI2U1MzkzNSIgZmlsbC1ydWxlPSJub256ZXJvIiBkPSJNMTggM2EzIDMgMCAwMTMgM3YxMmEzIDMgMCAwMS0zIDNINmEzIDMgMCAwMS0zLTNWNmEzIDMgMCAwMTMtM2gxMnptLTIgOEg4YTEgMSAwIDAwMCAyaDhhMSAxIDAgMDAwLTJ6Ii8+PC9nPjwvc3ZnPg==);opacity:1;background-size:1.375rem;background-position:-.125rem -.125rem}.Checkbox input{position:absolute;z-index:var(--z-below);opacity:0}.Checkbox .Checkbox-main:after,.Checkbox .Checkbox-main:before{content:"";display:block;position:absolute;left:1.1875rem;top:.1875rem;width:1.125rem;height:1.125rem}.Checkbox .Checkbox-main:before{border:2px solid var(--color-borders);border-radius:.25rem;background-color:var(--color-white);transition:border-color .1s ease}.Checkbox .Checkbox-main:after{background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAyMCI+PHBhdGggZD0iTTE2LjcgMEMxOC41IDAgMjAgMS41IDIwIDMuM3YxMy4zYzAgMS44LTEuNSAzLjMtMy4zIDMuM0gzLjNDMS41IDIwIDAgMTguNSAwIDE2LjdWMy4zQzAgMS41IDEuNSAwIDMuMyAwaDEzLjR6bS0uOCA0LjhsLTguMSA4LjEtMy43LTMuN2MtLjQtLjQtMS4xLS40LTEuNiAwLS40LjQtLjQgMS4xIDAgMS42TDcgMTUuMmMuNC40IDEuMS40IDEuNiAwbDguOS04LjljLjQtLjQuNC0xLjEgMC0xLjYtLjUtLjQtMS4yLS40LTEuNi4xeiIgZmlsbD0iIzRlYTRmNiIvPjwvc3ZnPg==);background-size:contain;background-repeat:no-repeat;opacity:0;transition:opacity .1s ease}.Checkbox .Checkbox-main .label{display:block}.Checkbox .Checkbox-main .subLabel{display:block;font-size:.875rem;line-height:1rem;color:var(--color-text-secondary)}.Checkbox input:checked~.Checkbox-main:before{border-color:var(--color-primary)}.Checkbox input:checked~.Checkbox-main:after{opacity:1}.Loading{display:flex;height:100%;align-items:center;justify-content:center}.Loading .Spinner{--spinner-size:2.75rem}.auth-form{width:100%;max-width:25.5rem;margin:0 auto;padding:6rem 1rem 1rem;text-align:center}@media (min-width:600px) and (min-height:450px){.auth-form{padding:6.8rem 1.5rem 1.5rem}}.auth-form #logo,.auth-form .AvatarEditable label{display:block;margin-left:auto;margin-right:auto;width:7.5rem;height:7.5rem;margin-bottom:1.75rem}@media (min-width:600px) and (min-height:450px){.auth-form #logo,.auth-form .AvatarEditable label{width:10rem;height:10rem;margin-bottom:2.5rem}}.auth-form #logo{background-size:100%;background:url(telegram-logo.df3a91becaa9678c529b4c4cadd45204.svg) 50% no-repeat}.auth-form .caption-image{margin-bottom:.5rem;height:19px;background:url(auth-caption.4791dbecd189f14e85d8e9776308639d.png) 50% no-repeat;background-size:auto 100%}@media (min-width:600px){.auth-form .caption-image{height:48px;background-size:273px auto}}.auth-form h2{font-size:1.25rem;line-height:1}@media (min-width:600px){.auth-form h2{font-size:2rem;line-height:1.5}}.auth-form .note{font-size:.875rem;line-height:1.35;margin-bottom:2.5rem;color:var(--color-text-secondary)}@media (min-width:600px){.auth-form .note{font-size:1rem;margin-bottom:3rem}}#auth-code-form,#auth-password-form,#auth-phone-number-form,#auth-qr-form,#auth-registration-form{height:100%;overflow-y:auto}#auth-phone-number-form form{min-height:26.25rem}#auth-phone-number-form .Button{margin-top:2.75rem}#auth-phone-number-form .Button+.Button{margin-top:1rem}#auth-code-form h2,#auth-password-form h2,.auth-number-edit{display:flex;align-items:center;justify-content:center}.auth-number-edit{width:2.5rem;height:2.5rem;padding:.5rem;font-size:1.5rem;color:var(--color-text-secondary);opacity:.75;cursor:pointer}.auth-number-edit:focus,.auth-number-edit:hover{opacity:1}#auth-qr-form .qr-container{height:280px;opacity:1;transform:scale(1);transition:transform .3s cubic-bezier(.34,1.56,.64,1),opacity .3s}#auth-qr-form .qr-container.pre-animate{opacity:.5;transform:scale(.8)}#auth-qr-form h3{margin:1.5rem 0 1rem}#auth-qr-form ol{list-style:none;counter-reset:item;padding:0 2rem}#auth-qr-form ol li{counter-increment:item;text-align:left;margin:.75rem 0;display:flex}#auth-qr-form ol li:before{content:counter(item);display:flex;justify-content:center;align-items:center;min-width:1.4rem;height:1.4rem;padding:0;margin:0 .75rem 0 0;background:var(--color-primary);border-radius:50%;font-size:smaller;color:#fff}#sign-in-password{word-break:normal!important}@font-face{font-family:Roboto;font-style:normal;font-weight:400;font-display:swap;src:local("Roboto"),local("Roboto-Regular"),url(KFOmCnqEu92Fr1Mu72xKKTU1Kvnz.499af208fa04aa805317cf014d869692.woff2) format("woff2");unicode-range:u+0460-052f,u+1c80-1c88,u+20b4,u+2de0-2dff,u+a640-a69f,u+fe2e-fe2f}@font-face{font-family:Roboto;font-style:normal;font-weight:400;font-display:swap;src:local("Roboto"),local("Roboto-Regular"),url(KFOmCnqEu92Fr1Mu5mxKKTU1Kvnz.6b69287db14836e8ccee577d6457b127.woff2) format("woff2");unicode-range:u+0400-045f,u+0490-0491,u+04b0-04b1,u+2116}@font-face{font-family:Roboto;font-style:normal;font-weight:400;font-display:swap;src:local("Roboto"),local("Roboto-Regular"),url(KFOmCnqEu92Fr1Mu7mxKKTU1Kvnz.350ec982325895563ada47d14c7936da.woff2) format("woff2");unicode-range:u+1f??}@font-face{font-family:Roboto;font-style:normal;font-weight:400;font-display:swap;src:local("Roboto"),local("Roboto-Regular"),url(KFOmCnqEu92Fr1Mu4WxKKTU1Kvnz.af30acd9d70ade5b828db02d25348da2.woff2) format("woff2");unicode-range:u+0370-03ff}@font-face{font-family:Roboto;font-style:normal;font-weight:400;font-display:swap;src:local("Roboto"),local("Roboto-Regular"),url(KFOmCnqEu92Fr1Mu7WxKKTU1Kvnz.62afd8a72052ca925aafb4006fddff88.woff2) format("woff2");unicode-range:u+0102-0103,u+0110-0111,u+1ea0-1ef9,u+20ab}@font-face{font-family:Roboto;font-style:normal;font-weight:400;font-display:swap;src:local("Roboto"),local("Roboto-Regular"),url(KFOmCnqEu92Fr1Mu7GxKKTU1Kvnz.009379f5feecd3ef689ad46e029b31e6.woff2) format("woff2");unicode-range:u+0100-024f,u+0259,u+1e??,u+2020,u+20a0-20ab,u+20ad-20cf,u+2113,u+2c60-2c7f,u+a720-a7ff}@font-face{font-family:Roboto;font-style:normal;font-weight:400;font-display:swap;src:local("Roboto"),local("Roboto-Regular"),url(KFOmCnqEu92Fr1Mu4mxKKTU1Kg.465390c6e54c60f4a15ff698f372e858.woff2) format("woff2");unicode-range:u+00??,u+0131,u+0152-0153,u+02bb-02bc,u+02c6,u+02da,u+02dc,u+2000-206f,u+2074,u+20ac,u+2122,u+2191,u+2193,u+2212,u+2215,u+feff,u+fffd}@font-face{font-family:Roboto;font-style:normal;font-weight:500;font-display:swap;src:local("Roboto Medium"),local("Roboto-Medium"),url(KFOlCnqEu92Fr1MmEU9fCRc4AMP6lbBP.66efaee062df58309edc4cdfaef3f094.woff2) format("woff2");unicode-range:u+0460-052f,u+1c80-1c88,u+20b4,u+2de0-2dff,u+a640-a69f,u+fe2e-fe2f}@font-face{font-family:Roboto;font-style:normal;font-weight:500;font-display:swap;src:local("Roboto Medium"),local("Roboto-Medium"),url(KFOlCnqEu92Fr1MmEU9fABc4AMP6lbBP.3e1bb90afe5eb4a94c5ffdb911fd21d0.woff2) format("woff2");unicode-range:u+0400-045f,u+0490-0491,u+04b0-04b1,u+2116}@font-face{font-family:Roboto;font-style:normal;font-weight:500;font-display:swap;src:local("Roboto Medium"),local("Roboto-Medium"),url(KFOlCnqEu92Fr1MmEU9fCBc4AMP6lbBP.acd64c8bf32762464b8f2c0600dc2b89.woff2) format("woff2");unicode-range:u+1f??}@font-face{font-family:Roboto;font-style:normal;font-weight:500;font-display:swap;src:local("Roboto Medium"),local("Roboto-Medium"),url(KFOlCnqEu92Fr1MmEU9fBxc4AMP6lbBP.cab892ae9aa422233ea43db289e0c038.woff2) format("woff2");unicode-range:u+0370-03ff}@font-face{font-family:Roboto;font-style:normal;font-weight:500;font-display:swap;src:local("Roboto Medium"),local("Roboto-Medium"),url(KFOlCnqEu92Fr1MmEU9fCxc4AMP6lbBP.01bafbfbc1e4ebe0139d259614d5c12d.woff2) format("woff2");unicode-range:u+0102-0103,u+0110-0111,u+1ea0-1ef9,u+20ab}@font-face{font-family:Roboto;font-style:normal;font-weight:500;font-display:swap;src:local("Roboto Medium"),local("Roboto-Medium"),url(KFOlCnqEu92Fr1MmEU9fChc4AMP6lbBP.d3c211af53a789d2f9fd79599baca39a.woff2) format("woff2");unicode-range:u+0100-024f,u+0259,u+1e??,u+2020,u+20a0-20ab,u+20ad-20cf,u+2113,u+2c60-2c7f,u+a720-a7ff}@font-face{font-family:Roboto;font-style:normal;font-weight:500;font-display:swap;src:local("Roboto Medium"),local("Roboto-Medium"),url(KFOlCnqEu92Fr1MmEU9fBBc4AMP6lQ.324b1e6d0f5ae7c6ab42fed5516c7b3d.woff2) format("woff2");unicode-range:u+00??,u+0131,u+0152-0153,u+02bb-02bc,u+02c6,u+02da,u+02dc,u+2000-206f,u+2074,u+20ac,u+2122,u+2191,u+2193,u+2212,u+2215,u+feff,u+fffd}*,:after,:before{box-sizing:border-box}html{font-family:sans-serif;line-height:1.15;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;-ms-overflow-style:scrollbar;-webkit-tap-highlight-color:rgba(0,0,0,0)}article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}body{margin:0;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol;font-size:1rem;font-weight:400;line-height:1.5;color:#212529;text-align:left;background-color:#fff}[tabindex="-1"]:focus{outline:none!important}hr{box-sizing:initial;height:0;overflow:visible}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5rem;font-weight:500}p{margin-top:0;margin-bottom:1rem}abbr[data-original-title],abbr[title]{text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;cursor:help;border-bottom:0}address{font-style:normal;line-height:inherit}address,dl,ol,ul{margin-bottom:1rem}dl,ol,ul{margin-top:0}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}dt{font-weight:500}dd{margin-bottom:.5rem;margin-left:0}blockquote{margin:0 0 1rem}dfn{font-style:italic}b,strong{font-weight:500}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:initial}sub{bottom:-.25em}sup{top:-.5em}a{color:theme-color("primary");text-decoration:none;background-color:initial;-webkit-text-decoration-skip:objects}a:hover{color:#0056b3;text-decoration:underline}a:not([href]):not([tabindex]),a:not([href]):not([tabindex]):focus,a:not([href]):not([tabindex]):hover{color:inherit;text-decoration:none}a:not([href]):not([tabindex]):focus{outline:0}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}pre{margin-top:0;margin-bottom:1rem;overflow:auto;-ms-overflow-style:scrollbar}figure{margin:0 0 1rem}img{vertical-align:middle;border-style:none}svg:not(:root){overflow:hidden}[role=button],a,area,button,input:not([type=range]),label,select,summary,textarea{touch-action:manipulation}table{border-collapse:collapse}caption{padding-top:.75rem;padding-bottom:.75rem;color:#868e96;text-align:left;caption-side:bottom}th{text-align:inherit}label{display:inline-block;margin-bottom:.5rem}button{border-radius:0}button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}button,input,optgroup,select,textarea{margin:0;font-family:inherit;font-size:inherit;line-height:inherit}button,input{overflow:visible}button,select{text-transform:none}[type=reset],[type=submit],button,html [type=button]{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{padding:0;border-style:none}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=date],input[type=datetime-local],input[type=month],input[type=time]{-webkit-appearance:listbox}textarea{overflow:auto;resize:vertical}fieldset{min-width:0;padding:0;margin:0;border:0}legend{display:block;width:100%;max-width:100%;padding:0;margin-bottom:.5rem;font-size:1.5rem;line-height:inherit;color:inherit;white-space:normal}progress{vertical-align:initial}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{outline-offset:-2px;-webkit-appearance:none}[type=search]::-webkit-search-cancel-button,[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{font:inherit;-webkit-appearance:button}output{display:inline-block}summary{display:list-item}template{display:none}[hidden]{display:none!important}:root{--color-background:#fff;--color-background-selected:#f4f4f5;--color-background-own:#eefedf;--color-background-own-selected:#d4fcae;--color-background-own-rgb:238,254,223;--color-text:#000;--color-text-lighter:#2e3939;--color-text-secondary:#707579;--color-text-secondary-rgb:112,117,121;--color-text-meta:#686c72;--color-text-meta-rgb:104,108,114;--color-text-meta-colored:#4fae4e;--color-text-green:#4fae4e;--color-text-green-rgb:79,174,78;--color-borders:#dadce0;--color-borders-input:#dadce0;--color-webpage-initial-background:#2e3939;--color-interactive-active:var(--color-primary);--color-interactive-inactive:rgba(var(--color-text-secondary-rgb),0.25);--color-interactive-buffered:rgba(var(--color-text-secondary-rgb),0.25);--color-primary:#50a2e9;--color-primary-rgb:80,162,233;--color-primary-shade:#4a95d6;--color-primary-shade-darker:#4388c4;--color-primary-shade-rgb:74,149,214;--color-green:#4dcd5e;--color-green-darker:#41ac4f;--color-error:#e53935;--color-error-shade:#d33431;--color-error-rgb:229,57,53;--color-warning:#fb8c00;--color-yellow:#fdd764;--color-links:#52a1ef;--color-links-hover:#2d8dec;--color-links-darker:#157be0;--color-links-darker-hover:#1166ba;--color-own-links:#fff;--color-placeholders:#a2acb4;--color-code:#4a729a;--color-code-bg:rgba(112,117,121,0.08);--color-code-own:#3c7940;--color-code-own-bg:rgba(112,117,121,0.08);--color-accent-own:#4fae4e;--color-message-meta-own:#4fae4e;--color-reply-hover:#f4f4f4;--color-reply-active:#e8e9ea;--color-reply-own-hover:#dbf4ce;--color-reply-own-active:#c8ebbc;--color-white:#fff;--color-gray:#c4c9cc;--color-chat-hover:#f4f4f5;--color-chat-active:#ededed;--color-selection-highlight:#3993fb;--color-selection-highlight-emoji:rgba(57,147,251,0.7);--color-user-1:#e17076;--color-user-2:#7bc862;--color-user-4:#65aadd;--color-user-5:#a695e7;--color-user-6:#ee7aae;--color-user-7:#6ec9cb;--color-user-8:#faa774;--color-default-shadow:hsla(0,0%,44.7%,0.25);--color-light-shadow:hsla(0,0%,44.7%,0.17);--border-radius-default:0.75rem;--border-radius-default-small:0.625rem;--border-radius-default-tiny:0.375rem;--border-radius-messages:0.75rem;--border-radius-messages-small:0.375rem;--messages-container-width:45.5rem;--right-column-width:26.5rem;--header-height:3.625rem;--symbol-menu-width:26.25rem;--symbol-menu-height:23.25rem;--symbol-menu-footer-height:3rem;--z-ui-loader-mask:2000;--z-right-column:900;--z-header-menu:990;--z-header-menu-backdrop:980;--z-modal:1000;--z-media-viewer:1500;--z-drop-area:55;--z-notification:50;--z-animation-fade:50;--z-menu-bubble:21;--z-menu-backdrop:20;--z-message-highlighted:13;--z-message-context-menu:12;--z-mobile-search:11;--z-middle-header:10;--z-middle-footer:10;--z-country-code-input-group:10;--z-message-select-control:9;--z-message-select-area:8;--z-sticky-date:9;--z-register-add-avatar:5;--z-media-viewer-head:3;--z-below:-1;--spinner-white-data:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZD0iTTEwLjggMjIuNEM2IDIxLjkgMi4xIDE4IDEuNiAxMy4yLjkgNy4xIDUuNCAxLjkgMTEuMyAxLjVjLjQgMCAuNy0uMy43LS43IDAtLjQtLjQtLjgtLjgtLjhDNC44LjQtLjIgNS45IDAgMTIuNS4yIDE4LjYgNS40IDIzLjggMTEuNSAyNGM2LjYuMiAxMi00LjggMTIuNC0xMS4yIDAtLjQtLjMtLjgtLjgtLjgtLjQgMC0uNy4zLS43LjctLjMgNS45LTUuNSAxMC40LTExLjYgOS43eiIgZmlsbD0iI2ZmZiIvPjwvc3ZnPg==);--spinner-white-thin-data:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZmlsbD0iI2ZmZiIgZD0iTTEyIDIzQzUuOSAyMyAxIDE4LjEgMSAxMlM1LjkgMSAxMiAxVjBDNS40IDAgMCA1LjQgMCAxMnM1LjQgMTIgMTIgMTIgMTItNS40IDEyLTEyaC0xYzAgNi4xLTQuOSAxMS0xMSAxMXoiLz48L3N2Zz4=);--spinner-blue-data:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZD0iTTEwLjggMjIuNEM2IDIxLjkgMi4xIDE4IDEuNiAxMy4yLjkgNy4xIDUuNCAxLjkgMTEuMyAxLjVjLjQgMCAuNy0uMy43LS43IDAtLjQtLjQtLjgtLjgtLjhDNC44LjQtLjIgNS45IDAgMTIuNS4yIDE4LjYgNS40IDIzLjggMTEuNSAyNGM2LjYuMiAxMi00LjggMTIuNC0xMS4yIDAtLjQtLjMtLjgtLjgtLjgtLjQgMC0uNy4zLS43LjctLjMgNS45LTUuNSAxMC40LTExLjYgOS43eiIgZmlsbD0iIzRlYTRmNiIvPjwvc3ZnPg==);--spinner-black-data:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZD0iTTEwLjggMjIuNEM2IDIxLjkgMi4xIDE4IDEuNiAxMy4yLjkgNy4xIDUuNCAxLjkgMTEuMyAxLjVjLjQgMCAuNy0uMy43LS43IDAtLjQtLjQtLjgtLjgtLjhDNC44LjQtLjIgNS45IDAgMTIuNS4yIDE4LjYgNS40IDIzLjggMTEuNSAyNGM2LjYuMiAxMi00LjggMTIuNC0xMS4yIDAtLjQtLjMtLjgtLjgtLjgtLjQgMC0uNy4zLS43LjctLjMgNS45LTUuNSAxMC40LTExLjYgOS43eiIgZmlsbD0iIzJlMzkzOSIvPjwvc3ZnPg==);--spinner-green-data:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZD0iTTEwLjggMjIuNEM2IDIxLjkgMi4xIDE4IDEuNiAxMy4yLjkgNy4xIDUuNCAxLjkgMTEuMyAxLjVjLjQgMCAuNy0uMy43LS43IDAtLjQtLjQtLjgtLjgtLjhDNC44LjQtLjIgNS45IDAgMTIuNS4yIDE4LjYgNS40IDIzLjggMTEuNSAyNGM2LjYuMiAxMi00LjggMTIuNC0xMS4yIDAtLjQtLjMtLjgtLjgtLjgtLjQgMC0uNy4zLS43LjctLjMgNS45LTUuNSAxMC40LTExLjYgOS43eiIgZmlsbD0iIzRmYWU0ZSIvPjwvc3ZnPg==);--spinner-gray-data:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZD0iTTEwLjggMjIuNEM2IDIxLjkgMi4xIDE4IDEuNiAxMy4yLjkgNy4xIDUuNCAxLjkgMTEuMyAxLjVjLjQgMCAuNy0uMy43LS43IDAtLjQtLjQtLjgtLjgtLjhDNC44LjQtLjIgNS45IDAgMTIuNS4yIDE4LjYgNS40IDIzLjggMTEuNSAyNGM2LjYuMiAxMi00LjggMTIuNC0xMS4yIDAtLjQtLjMtLjgtLjgtLjgtLjQgMC0uNy4zLS43LjctLjMgNS45LTUuNSAxMC40LTExLjYgOS43eiIgZmlsbD0iIzcwNzU3OSIvPjwvc3ZnPg==);--drag-target-border:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='100%25' height='100%25' fill='none' rx='8' ry='8' stroke='%23DDDFE0' stroke-width='4' stroke-dasharray='9.1, 10.5' stroke-dashoffset='3' stroke-linecap='round'/%3E%3C/svg%3E");--drag-target-border-hovered:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='100%25' height='100%25' fill='none' rx='8' ry='8' stroke='%2363A2E3' stroke-width='4' stroke-dasharray='9.1, 10.5' stroke-dashoffset='3' stroke-linecap='round'/%3E%3C/svg%3E");--layer-transition:300ms cubic-bezier(0.33,1,0.68,1);--layer-blackout-opacity:0.3;--slide-transition:450ms cubic-bezier(0.25,1,0.5,1);--select-transition:200ms ease-out;--vh:1vh}@media (min-width:1276px) and (max-width:1680px){:root{--right-column-width:25vw}}@media (max-width:600px){:root{--right-column-width:100vw;--header-height:3.5rem;--symbol-menu-width:100vw;--symbol-menu-height:14.6875rem;--layer-transition:450ms cubic-bezier(0.25,1,0.5,1)}}.m-0{margin:0!important}.mt-0,.my-0{margin-top:0!important}.mr-0,.mx-0{margin-right:0!important}.mb-0,.my-0{margin-bottom:0!important}.ml-0,.mx-0{margin-left:0!important}.m-1{margin:.25rem!important}.mt-1,.my-1{margin-top:.25rem!important}.mr-1,.mx-1{margin-right:.25rem!important}.mb-1,.my-1{margin-bottom:.25rem!important}.ml-1,.mx-1{margin-left:.25rem!important}.m-2{margin:.5rem!important}.mt-2,.my-2{margin-top:.5rem!important}.mr-2,.mx-2{margin-right:.5rem!important}.mb-2,.my-2{margin-bottom:.5rem!important}.ml-2,.mx-2{margin-left:.5rem!important}.m-3{margin:1rem!important}.mt-3,.my-3{margin-top:1rem!important}.mr-3,.mx-3{margin-right:1rem!important}.mb-3,.my-3{margin-bottom:1rem!important}.ml-3,.mx-3{margin-left:1rem!important}.m-4{margin:1.5rem!important}.mt-4,.my-4{margin-top:1.5rem!important}.mr-4,.mx-4{margin-right:1.5rem!important}.mb-4,.my-4{margin-bottom:1.5rem!important}.ml-4,.mx-4{margin-left:1.5rem!important}.m-5{margin:2rem!important}.mt-5,.my-5{margin-top:2rem!important}.mr-5,.mx-5{margin-right:2rem!important}.mb-5,.my-5{margin-bottom:2rem!important}.ml-5,.mx-5{margin-left:2rem!important}.m-6{margin:3rem!important}.mt-6,.my-6{margin-top:3rem!important}.mr-6,.mx-6{margin-right:3rem!important}.mb-6,.my-6{margin-bottom:3rem!important}.ml-6,.mx-6{margin-left:3rem!important}.p-0{padding:0!important}.pt-0,.py-0{padding-top:0!important}.pr-0,.px-0{padding-right:0!important}.pb-0,.py-0{padding-bottom:0!important}.pl-0,.px-0{padding-left:0!important}.p-1{padding:.25rem!important}.pt-1,.py-1{padding-top:.25rem!important}.pr-1,.px-1{padding-right:.25rem!important}.pb-1,.py-1{padding-bottom:.25rem!important}.pl-1,.px-1{padding-left:.25rem!important}.p-2{padding:.5rem!important}.pt-2,.py-2{padding-top:.5rem!important}.pr-2,.px-2{padding-right:.5rem!important}.pb-2,.py-2{padding-bottom:.5rem!important}.pl-2,.px-2{padding-left:.5rem!important}.p-3{padding:1rem!important}.pt-3,.py-3{padding-top:1rem!important}.pr-3,.px-3{padding-right:1rem!important}.pb-3,.py-3{padding-bottom:1rem!important}.pl-3,.px-3{padding-left:1rem!important}.p-4{padding:1.5rem!important}.pt-4,.py-4{padding-top:1.5rem!important}.pr-4,.px-4{padding-right:1.5rem!important}.pb-4,.py-4{padding-bottom:1.5rem!important}.pl-4,.px-4{padding-left:1.5rem!important}.p-5{padding:2rem!important}.pt-5,.py-5{padding-top:2rem!important}.pr-5,.px-5{padding-right:2rem!important}.pb-5,.py-5{padding-bottom:2rem!important}.pl-5,.px-5{padding-left:2rem!important}.p-6{padding:3rem!important}.pt-6,.py-6{padding-top:3rem!important}.pr-6,.px-6{padding-right:3rem!important}.pb-6,.py-6{padding-bottom:3rem!important}.pl-6,.px-6{padding-left:3rem!important}.input-group{position:relative;margin-bottom:1.5rem}.input-group label{display:block;padding:0 .25rem;position:absolute;left:.75rem;top:.95rem;background-color:var(--color-background);font-size:1rem;font-weight:400;color:var(--color-placeholders);transition:transform .15s ease-out,color .15s ease-out;cursor:text;pointer-events:none;transform-origin:left center;white-space:nowrap}.input-group.with-arrow:after{content:"";position:absolute;height:.75rem;width:.75rem;border-left:1px solid var(--color-text-secondary);border-bottom:1px solid var(--color-text-secondary);transform:rotate(-45deg);right:2rem;top:1rem}.input-group.error label,.input-group .form-control.focus+label,.input-group .form-control:focus+label,.input-group.success label,.input-group.touched label{transform:scale(.75) translate(-.5rem,-2.25rem)}.input-group .form-control::placeholder,.input-group input::placeholder{color:var(--color-placeholders)}.input-group.touched label{color:var(--color-text-secondary)}.input-group.error label{color:var(--color-error)!important}.input-group.success label{color:var(--color-text-green)!important}.input-group.disabled{opacity:.5;pointer-events:none}.form-control{--border-width:1px;display:block;width:100%;height:3.375rem;padding:calc(.75rem - var(--border-width)) calc(.9rem - var(--border-width));border:var(--border-width) solid var(--color-borders-input);border-radius:var(--border-radius-default);color:var(--color-text);background-color:var(--color-background);outline:none;transition:border-color .15s ease;word-break:break-word;-webkit-appearance:none;font-size:1rem;line-height:1.25rem}.form-control:hover{border-color:var(--color-primary)}.form-control:hover+label{color:var(--color-primary)}.form-control.focus,.form-control:focus{border-color:var(--color-primary);box-shadow:inset 0 0 0 1px var(--color-primary);caret-color:var(--color-primary)}.form-control.focus+label,.form-control:focus+label{color:var(--color-primary)}.form-control:disabled{background:none!important}.error .form-control{border-color:var(--color-error);box-shadow:inset 0 0 0 1px var(--color-error);caret-color:var(--color-error)}.success .form-control{border-color:var(--color-text-green);box-shadow:inset 0 0 0 1px var(--color-text-green);caret-color:var(--color-text-green)}select.form-control option{line-height:2rem}textarea.form-control{resize:none;overflow:hidden;line-height:1.3125rem;padding-top:calc(1rem - var(--border-width));padding-bottom:calc(1rem - var(--border-width))}.input-group.password-input{position:relative}.input-group.password-input .form-control{padding-right:3.375rem}.input-group.password-input .toggle-password{position:absolute;top:0;right:0;width:3.375rem;height:3.375rem;display:flex;align-items:center;justify-content:center;cursor:pointer;outline:none!important;color:var(--color-text-secondary);opacity:.7;font-size:1.5rem}.input-group.password-input .toggle-password:focus,.input-group.password-input .toggle-password:hover{opacity:1}@font-face{font-family:icomoon;src:url(icomoon.725349c653bfc70090f1988dc81ac837.woff2) format("woff2"),url(icomoon.02d3a207ccbd1adab3d528c444440b16.woff) format("woff");font-weight:400;font-style:normal;font-display:block}[class*=" icon-"],[class^=icon-]{font-family:icomoon!important;speak:none;font-style:normal;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.icon-darkmode:before{content:"\e979"}.icon-animations:before{content:"\e97a"}.icon-enter:before{content:"\e97b"}.icon-fontsize:before{content:"\e97c"}.icon-permissions:before{content:"\e976"}.icon-card:before{content:"\e977"}.icon-truck:before{content:"\e978"}.icon-share-filled:before{content:"\e95a"}.icon-bold:before{content:"\e961"}.icon-bot-command:before{content:"\e962"}.icon-calendar-filter:before{content:"\e963"}.icon-comments:before{content:"\e964"}.icon-comments-sticker:before{content:"\e965"}.icon-arrow-down:before{content:"\e966"}.icon-email:before{content:"\e967"}.icon-italic:before{content:"\e968"}.icon-link:before{content:"\e969"}.icon-mention:before{content:"\e96a"}.icon-monospace:before{content:"\e96b"}.icon-next:before{content:"\e96c"}.icon-password-off:before{content:"\e96d"}.icon-pin-list:before{content:"\e96e"}.icon-previous:before{content:"\e96f"}.icon-replace:before{content:"\e970"}.icon-schedule:before{content:"\e971"}.icon-strikethrough:before{content:"\e972"}.icon-underlined:before{content:"\e973"}.icon-zoom-in:before{content:"\e974"}.icon-zoom-out:before{content:"\e975"}.icon-select:before{content:"\e960"}.icon-folder:before{content:"\e913"}.icon-bots:before{content:"\e915"}.icon-calendar:before{content:"\e916"}.icon-cloud-download:before{content:"\e917"}.icon-colorize:before{content:"\e918"}.icon-forward:before{content:"\e927"}.icon-reply:before{content:"\e947"}.icon-help:before{content:"\e92a"}.icon-info:before{content:"\e92b"}.icon-info-filled:before{content:"\e91b"}.icon-delete-filled:before{content:"\e91c"}.icon-delete:before{content:"\e91d"}.icon-edit:before{content:"\e923"}.icon-new-chat-filled:before{content:"\e939"}.icon-send:before{content:"\e94a"}.icon-send-outline:before{content:"\e94b"}.icon-add-user-filled:before{content:"\e904"}.icon-add-user:before{content:"\e905"}.icon-delete-user:before{content:"\e91e"}.icon-microphone:before{content:"\e935"}.icon-microphone-alt:before{content:"\e93b"}.icon-poll:before{content:"\e938"}.icon-revote:before{content:"\e93a"}.icon-photo:before{content:"\e940"}.icon-document:before{content:"\e91f"}.icon-camera:before{content:"\e90e"}.icon-camera-add:before{content:"\e90f"}.icon-logout:before{content:"\e932"}.icon-saved-messages:before{content:"\e948"}.icon-settings:before{content:"\e94e"}.icon-phone:before{content:"\e93f"}.icon-attach:before{content:"\e909"}.icon-copy:before{content:"\e91a"}.icon-channel:before{content:"\e911"}.icon-group:before{content:"\e929"}.icon-user:before{content:"\e959"}.icon-non-contacts:before{content:"\e928"}.icon-active-sessions:before{content:"\e902"}.icon-admin:before{content:"\e906"}.icon-download:before{content:"\e921"}.icon-location:before{content:"\e930"}.icon-stop:before{content:"\e952"}.icon-archive:before{content:"\e908"}.icon-unarchive:before{content:"\e953"}.icon-readchats:before{content:"\e933"}.icon-unread:before{content:"\e957"}.icon-message:before{content:"\e934"}.icon-lock:before{content:"\e931"}.icon-unlock:before{content:"\e954"}.icon-mute:before{content:"\e937"}.icon-unmute:before{content:"\e955"}.icon-pin:before{content:"\e941"}.icon-unpin:before{content:"\e956"}.icon-smallscreen:before{content:"\e95e"}.icon-fullscreen:before{content:"\e95f"}.icon-large-pause:before{content:"\e92e"}.icon-large-play:before{content:"\e92f"}.icon-pause:before{content:"\e93d"}.icon-play:before{content:"\e943"}.icon-channelviews:before{content:"\e912"}.icon-message-succeeded:before{content:"\e900"}.icon-message-read:before{content:"\e901"}.icon-message-pending:before{content:"\e94c"}.icon-message-failed:before{content:"\e94d"}.icon-favorite:before{content:"\e93e"}.icon-keyboard:before{content:"\e944"}.icon-delete-left:before{content:"\e945"}.icon-recent:before{content:"\e946"}.icon-gifs:before{content:"\e94f"}.icon-stickers:before{content:"\e95b"}.icon-smile:before{content:"\e950"}.icon-animals:before{content:"\e907"}.icon-eats:before{content:"\e922"}.icon-sport:before{content:"\e951"}.icon-car:before{content:"\e910"}.icon-lamp:before{content:"\e92c"}.icon-language:before{content:"\e92d"}.icon-flag:before{content:"\e926"}.icon-more:before{content:"\e936"}.icon-search:before{content:"\e949"}.icon-remove:before{content:"\e95c"}.icon-add:before{content:"\e903"}.icon-check:before{content:"\e914"}.icon-close:before{content:"\e919"}.icon-arrow-left:before{content:"\e90d"}.icon-arrow-right:before{content:"\e93c"}.icon-down:before{content:"\e920"}.icon-up:before{content:"\e958"}.icon-eye-closed:before{content:"\e925"}.icon-eye:before{content:"\e924"}.icon-muted-chat:before{content:"\e95d"}.icon-avatar-archived-chats:before{content:"\e90a"}.icon-avatar-deleted-account:before{content:"\e90b"}.icon-avatar-saved-messages:before{content:"\e90c"}.icon-pinned-chat:before{content:"\e942"}.media-inner{position:relative}.media-inner img,.media-inner video{display:block;object-fit:cover}.media-inner video{background:no-repeat 50% 50%;background-size:contain}.media-inner .media-loading,.media-inner .thumbnail~.full-media{position:absolute}.media-inner .thumbnail.empty{visibility:hidden}.animated-close-icon{position:absolute;transform:rotate(-45deg)}.animated-close-icon,.animated-close-icon:after,.animated-close-icon:before{width:1.125rem;height:.125rem;border-radius:.125rem;background-color:var(--color-text-secondary);transition:transform var(--slide-transition)}.animated-close-icon:after,.animated-close-icon:before{position:absolute;left:0;top:0;content:""}.animated-close-icon:before{transform:rotate(90deg)}.animated-close-icon.no-transition,.animated-close-icon.no-transition:after,.animated-close-icon.no-transition:before{transition:none}.animated-close-icon.state-back{transform:rotate(180deg)}.animated-close-icon.state-back:before{transform:rotate(45deg) scaleX(.75) translateY(-.375rem)}.animated-close-icon.state-back:after{transform:rotate(-45deg) scaleX(.75) translateY(.375rem)}.chat-list{height:100%;overflow-y:auto;padding:0 .125rem .5rem .4375rem}.chat-list .scroll-container{position:relative}.chat-list .ListItem.chat-item-clickable{margin:0}@media (max-width:600px){.chat-list{padding-left:0;padding-right:0}}.chat-list .no-results{color:var(--color-text-meta);margin-top:2rem;text-align:center}html{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:optimizeSpeed}body,html{width:100%;height:100%;background:var(--color-background);margin:0;padding:0;font-size:16px;font-family:Roboto,Helvetica Neue,Apple Color Emoji,sans-serif;color:var(--color-text);overflow:hidden}@media (max-width:600px){body,html{height:calc(var(--vh, 1vh)*100)}}body.cursor-grabbing,body.cursor-grabbing *{cursor:grabbing!important}#root{height:100%;max-width:1680px;margin:0 auto}@media (max-width:600px){#root{height:calc(var(--vh, 1vh)*100)}}#middle-column-portals,#portals{position:absolute;top:0;left:0;right:0}.hidden{visibility:hidden}.no-selection{user-select:none;-webkit-user-select:none!important}.visually-hidden{position:absolute!important;width:0;height:0;overflow:hidden;clip:rect(0,0,0,0);z-index:-1}.not-implemented{opacity:.5}.not-implemented,.not-implemented *{cursor:not-allowed!important}*{box-sizing:border-box}.disable-animations #root *{transition:none!important}.custom-scroll,.custom-scroll-x{scrollbar-width:thin;scrollbar-color:rgba(90,90,90,0) transparent;transition:scrollbar-color .3s ease;-webkit-overflow-scrolling:touch;pointer-events:auto}.custom-scroll-x::-webkit-scrollbar-thumb,.custom-scroll::-webkit-scrollbar-thumb{background-color:rgba(90,90,90,0);border-radius:.35rem}.custom-scroll-x:focus,.custom-scroll-x:focus-within,.custom-scroll-x:hover,.custom-scroll:focus,.custom-scroll:focus-within,.custom-scroll:hover{scrollbar-color:rgba(90,90,90,.3) transparent}.custom-scroll-x:focus-within::-webkit-scrollbar-thumb,.custom-scroll-x:focus::-webkit-scrollbar-thumb,.custom-scroll-x:hover::-webkit-scrollbar-thumb,.custom-scroll:focus-within::-webkit-scrollbar-thumb,.custom-scroll:focus::-webkit-scrollbar-thumb,.custom-scroll:hover::-webkit-scrollbar-thumb{background-color:rgba(90,90,90,.3)}.custom-scroll::-webkit-scrollbar{width:.375rem}.custom-scroll-x::-webkit-scrollbar{height:.35rem}.no-scrollbar{scrollbar-width:none}.no-scrollbar::-webkit-scrollbar{display:none}.emoji-small{background:no-repeat;background-size:1.25rem;color:transparent;display:inline-block;width:1.25rem;height:1.25rem;margin-right:1px;overflow:hidden}.emoji-small::selection{background-color:var(--color-selection-highlight-emoji);color:transparent}div[role=button]{outline:none!important;cursor:pointer}.opacity-transition{opacity:1;transition:opacity .15s ease}.opacity-transition:not(.open){opacity:0}.opacity-transition:not(.shown){display:none}.opacity-transition.slow{transition-duration:.3s}.color-primary{color:var(--color-primary)!important}.color-danger{color:var(--color-error)!important}.text-muted{color:var(--color-text-secondary)!important}@keyframes grow-icon{0%{transform:scale(.5);opacity:.8}50%{transform:scale(1.1);opacity:1}to{transform:scale(1)}}@keyframes hide-icon{0%{transform:scale(1);opacity:.4}to{transform:scale(.5);opacity:0}} \ No newline at end of file diff --git a/dist/report.html b/dist/report.html index 6284b17c..11e04427 100644 --- a/dist/report.html +++ b/dist/report.html @@ -3,7 +3,7 @@ - telegram-t [13 Apr 2021 at 23:19] + telegram-t [14 Apr 2021 at 00:31]