telegram-tt/dist/0.249523113dbd50d60d0c.js
Alexander Zinchuk de5a1342a8 [Build]
2021-08-03 01:36:17 +03:00

2 lines
102 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

(window.webpackJsonp=window.webpackJsonp||[]).push([[0],Array(108).concat([function(e,t,n){"use strict";var a=n(0),r=n(6),c=n(10),s=n(9),i=n(148),o=n(178),l=n(25),d=n(16),u=n(43),m=n(55),b=n(42);n(212);t.a=e=>{const{ref:t,buttonRef:n,icon:h,className:f,style:p,children:O,disabled:g,ripple:v,narrow:j,inactive:E,focus:y,destructive:C,multiline:N,isStatic:T,contextActions:w,onClick:M}=e;let I=Object(a.q)(null);t&&(I=t);const[S,L,k]=Object(l.a)(),{isContextMenuOpen:A,contextMenuPosition:x,handleBeforeContextMenu:D,handleContextMenu:R,handleContextMenuClose:_,handleContextMenuHide:P}=Object(i.a)(I,!w),F=Object(a.m)(()=>I.current,[]),U=Object(a.m)(()=>I.current.closest(".custom-scroll"),[]),B=Object(a.m)(()=>I.current.querySelector(".ListItem-context-menu .bubble"),[]),{positionX:q,positionY:H,style:$}=Object(o.a)(x,F,U,B),K=Object(a.m)(e=>{!g&&M&&(M(e),r.n&&!v&&(L(),Object(c.b)(k)))},[g,L,M,v,k]),V=Object(a.m)(e=>{E||r.n||(!w||2!==e.button&&M||D(e),0===e.button&&(M?K(e):R(e)))},[E,w,M,D,R,K]),z=Object(d.a)(),W=Object(s.a)("ListItem",f,!T&&"no-selection",v&&"has-ripple",j&&"narrow",g&&"disabled",E&&"inactive",x&&"has-menu-open",y&&"focus",C&&"destructive",N&&"multiline",T&&"is-static");return a.a.createElement("div",{ref:I,className:W,dir:z.isRtl?"rtl":void 0,style:p},a.a.createElement("div",{className:Object(s.a)("ListItem-button",S&&"active"),role:"button",ref:n,tabIndex:0,onClick:!E&&r.n?K:void 0,onMouseDown:V,onContextMenu:!E&&w?R:void 0},h&&a.a.createElement("i",{className:"icon-"+h}),N&&a.a.createElement("div",{className:"multiline-item"},O),!N&&O,!g&&!E&&v&&a.a.createElement(u.a,null)),w&&void 0!==x&&a.a.createElement(m.a,{isOpen:A,positionX:q,positionY:H,style:$,className:"ListItem-context-menu",autoClose:!0,onClose:_,onCloseAnimationEnd:P},w.map(e=>a.a.createElement(b.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(10),c=n(51);function s({rootRef:e,throttleMs:t,debounceMs:n,shouldSkipFirst:s,margin:i,threshold:o,isDisabled:l},d){const u=Object(a.q)(),m=Object(a.q)(),b=Object(a.q)(0),h=Object(a.q)();m.current=d;const f=Object(a.m)(()=>{b.current++},[]),p=Object(a.m)(()=>{b.current&&(b.current--,!b.current&&h.current&&(h.current(),h.current=void 0))},[]);Object(c.a)(f,p),Object(a.n)(()=>{if(!l)return()=>{u.current&&(u.current.observer.disconnect(),u.current.callbacks.clear(),u.current=void 0)}},[l]);return{observe:Object(a.m)((a,c)=>{u.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()},d=t?r.h:n?r.a:void 0,f=d?d(l,t||n,!s):l,p=new IntersectionObserver(e=>{e.forEach(e=>{c.set(e.target,e)}),b.current?h.current=()=>{f()}:f()},{root:e.current,rootMargin:i?i+"px":void 0,threshold:o});u.current={observer:p,callbacks:a}}();const l=u.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(8),c=n(57),s=n(31);t.a=(e,t=!1,n=r.ApiMediaFormat.BlobUrl,i,o)=>{const l=e?c.c(e):void 0,d=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?d():setTimeout(d,o-e)})}},[t,e,l,n,i,d,o]),l}},function(e,t,n){"use strict";var a=n(0),r=n(1),c=n(13),s=n(7),i=n(4),o=n(22),l=n(3),d=n(16),u=n(114),m=n(137),b=n(158);t.a=Object(a.h)(Object(r.h)((e,{userId:t,forceShowSelf:n})=>{const{lastSyncTime:a,serverTimeOffset:r}=e,c=Object(s.Jb)(e,t);return{lastSyncTime:a,user:c,isSavedMessages:!n&&c&&c.isSelf,areMessagesLoaded:Boolean(Object(s.n)(e,t)),serverTimeOffset:r}},(e,t)=>Object(l.l)(t,["loadFullUser","openMediaViewer"]))(({typingStatus:e,avatarSize:t="medium",status:n,withMediaViewer:r,withUsername:s,withFullInfo:l,withUpdatingStatus:h,noStatusOrTyping:f,noRtl:p,user:O,isSavedMessages:g,areMessagesLoaded:v,lastSyncTime:j,loadFullUser:E,openMediaViewer:y,serverTimeOffset:C})=>{const{id:N}=O||{},T=Object(i.bb)(O);Object(a.n)(()=>{l&&j&&N&&E({userId:N})},[N,E,j,l]);const w=Object(a.m)((e,n)=>{O&&n&&(e.stopPropagation(),y({avatarOwnerId:O.id,origin:"jumbo"===t?c.h.ProfileAvatar:c.h.MiddleHeaderAvatar}))},[O,t,y]),M=Object(d.a)();if(O)return a.a.createElement("div",{className:"ChatInfo",dir:!p&&M.isRtl?"rtl":void 0},a.a.createElement(u.a,{key:O.id,size:t,user:O,isSavedMessages:g,onClick:r?w:void 0}),a.a.createElement("div",{className:"info"},g?a.a.createElement("div",{className:"title"},a.a.createElement("h3",null,M("SavedMessages"))):a.a.createElement("div",{className:"title"},a.a.createElement("h3",{dir:"auto"},T&&Object(o.a)(T)),O&&O.isVerified&&a.a.createElement(m.a,null)),(n||!g&&!f)&&(n?a.a.createElement("span",{className:"status",dir:"auto"},n):h&&!v?a.a.createElement("span",{className:"status",dir:"auto"},M("Updating")):O?e?a.a.createElement(b.a,{typingStatus:e}):a.a.createElement("div",{className:"status "+(Object(i.Cb)(O)?"online":"")},s&&O.username&&a.a.createElement("span",{className:"handle"},O.username),a.a.createElement("span",{className:"user-status",dir:"auto"},Object(i.cb)(M,O,C))):void 0)))}))},function(e,t,n){"use strict";var a=n(0),r=n(56);var c=n(9),s=n(51),i=n(39),o=n(58),l=n(16),d=n(38),u=n(21),m=n(127);n(153);t.a=({title:e,className:t,isOpen:n,header:b,hasCloseButton:h,noBackdrop:f,children:p,onClose:O,onCloseAnimationEnd:g,onEnter:v,shouldSkipHistoryAnimations:j})=>{const{shouldRender:E,transitionClassNames:y}=Object(i.a)(n,g,j,void 0,j),C=Object(a.q)(null);Object(a.n)(()=>n?Object(r.a)({onEsc:O,onEnter:v}):void 0,[n,O,v]),Object(a.n)(()=>n&&C.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<n.length-1?a+1:0),n[r].focus()}return document.addEventListener("keydown",t,!1),()=>{document.removeEventListener("keydown",t,!1)}}(C.current):void 0,[n]);const{forceClose:N}=Object(d.a)(n,O);Object(a.n)(()=>()=>{n&&N()},[]),Object(o.a)(([e])=>(document.body.classList.toggle("has-open-dialog",n),(n||!n&&void 0!==e)&&Object(s.b)(200),()=>{document.body.classList.remove("has-open-dialog")}),[n]);const T=Object(l.a)();if(!E)return;const w=Object(c.a)("Modal",t,y,f&&"transparent-backdrop");return a.a.createElement(m.a,null,a.a.createElement("div",{ref:C,className:w,tabIndex:-1,role:"dialog"},a.a.createElement("div",{className:"modal-container"},a.a.createElement("div",{className:"modal-backdrop",onClick:O}),a.a.createElement("div",{className:"modal-dialog"},b||(e?a.a.createElement("div",{className:"modal-header"},h&&a.a.createElement(u.a,{round:!0,color:"translucent",size:"smaller",ariaLabel:T("Close"),onClick:O},a.a.createElement("i",{className:"icon-close"})),a.a.createElement("div",{className:"modal-title"},e)):void 0),a.a.createElement("div",{className:"modal-content custom-scroll"},p)))))}},function(e,t,n){"use strict";var a=n(0),r=n(1),c=n(2),s=n(6),i=n(31),o=n(29),l=n(9),d=n(51);n(198);const u={slide:450,"slide-reversed":450,"mv-slide":400,"slide-fade":400,"zoom-fade":150,"scroll-slide":500,fade:150,"slide-layers":s.l?450:300,"push-slide":300,reveal:350},m=Symbol("CLEANED_UP");t.a=({ref:e,activeKey:t,name:n,direction:s="auto",renderCount:b,shouldRestoreHeight:h,shouldCleanup:f,cleanupExceptionKey:p,id:O,className:g,onStart:v,onStop:j,children:E})=>{const{animationLevel:y}=Object(r.e)().settings.byKey;let C=Object(a.q)(null);e&&(C=e);const N=Object(a.q)({}),T=Object(o.a)(t),w=Object(a.q)(),M=Object(i.a)(),I=void 0!==T&&t!==T;!b&&I&&(N.current={[T]:N.current[T]}),N.current[t]=E,Object(a.o)(()=>{function e(){!f||void 0!==p&&p===T||(N.current={[T]:m},M())}const a=C.current,r=a.children;if(1===r.length&&!I)return void r[0].classList.add("active");const i=Array.from(a.childNodes);if(!I||!i.length)return;w.current&&(clearTimeout(w.current),w.current=void 0);const o=-1===s||"auto"===s&&T>t||"inverse"===s&&T<t;a.classList.remove("animating"),a.classList.toggle("backwards",o);const l=Object.keys(N.current).map(Number),O=b?T:l.indexOf(T),g=b?t:l.indexOf(t);if("none"===n||0===y)return i.forEach((e,t)=>{e instanceof HTMLElement&&(e.classList.remove("from","through","to"),e.classList.toggle("active",t===g))}),void e();if(i.forEach((e,t)=>{e instanceof HTMLElement&&(e.classList.remove("active"),e.classList.toggle("from",t===O),e.classList.toggle("through",t>O&&t<g||t<O&&t>g),e.classList.toggle("to",t===g))}),"scroll-slide"===n){const e=a.offsetWidth;a.scrollBy({left:g>O?e:-e,behavior:"smooth"})}y>0&&Object(d.b)(u[n]+c.c),requestAnimationFrame(()=>{a.classList.add("animating"),w.current=window.setTimeout(()=>{requestAnimationFrame(()=>{if(a.classList.remove("animating","backwards"),i.forEach((e,t)=>{e instanceof HTMLElement&&(e.classList.remove("from","through","to"),e.classList.toggle("active",t===g))}),"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(),j&&j()})},u[n]+c.c),v&&v()})},[t,T,I,s,n,v,j,b,h,f,p,y,M]),Object(a.o)(()=>{if(h){const e=C.current,t=e.querySelector(".active")||e.querySelector(".from");t&&(t.style.height="auto",e.style.height=t.clientHeight+"px",e.style.flexBasis=t.clientHeight+"px")}},[h,E]);const S=N.current,L=Object.keys(b?new Array(b).fill(void 0):S).map(Number).map(e=>{const n=S[e];return"function"==typeof n?a.a.createElement("div",{key:e},n(e===t,e===T,t)):void 0}),k=Object(l.a)("Transition",g,0===y&&"scroll-slide"===n?"slide":n);return a.a.createElement("div",{ref:C,id:O,className:k},L)}},function(e,t,n){"use strict";var a=n(0),r=n(8),c=n(2),s=n(4),i=n(49),o=n(9),l=n(22),d=n(110),u=n(117),m=n(16);n(200);t.a=Object(a.h)(({className:e,size:t="large",chat:n,user:b,text:h,withOnlineStatus:f,isSavedMessages:p,lastSyncTime:O,onClick:g})=>{const v=b&&Object(s.sb)(b);let j;p||v||(b?j=Object(s.e)(b):n&&(j=Object(s.e)(n)));const E=Object(d.a)(j,!1,r.ApiMediaFormat.DataUri,O),{shouldRenderFullMedia:y,transitionClassNames:C}=Object(u.a)(E,"slow"),N=Object(m.a)();let T="";if(p)T=a.a.createElement("i",{className:"icon-avatar-saved-messages"});else if(v)T=a.a.createElement("i",{className:"icon-avatar-deleted-account"});else if(y)T=a.a.createElement("img",{src:E,className:C+" avatar-media",alt:"",decoding:"async"});else if(b){const e=Object(s.bb)(b);T=e?Object(i.c)(e,2):void 0}else if(n){const e=Object(s.k)(N,n);T=e&&Object(i.c)(e,Object(s.ob)(n.id)?2:1)}else h&&(T=Object(i.c)(h,2));const w=!p&&b&&Object(s.Cb)(b),M=Object(o.a)("Avatar size-"+t,e,"color-bg-"+Object(s.Z)(b||n),p&&"saved-messages",v&&"deleted-account",f&&w&&"online",g&&"interactive",!p&&!y&&"no-photo"),I=Object(a.m)(e=>{g&&g(e,p||y)},[g,p,y]),S=(b||n)&&(b||n).id;return a.a.createElement("div",{className:M,onClick:I,"data-test-sender-id":c.N?S:void 0},"string"==typeof T?Object(l.a)(T,["jumbo"===t?"hq_emoji":"emoji"]):T)})},function(e,t,n){"use strict";var a=n(13),r=n(0),c=n(10),s=n(157);t.a=({ref:e,className:t,onLoadMore:n,onScroll:i,onKeyDown:o,items:l,itemSelector:d=".ListItem",preloadBackwards:u=20,sensitiveArea:m=800,noScrollRestore:b=!1,noScrollRestoreOnTop:h=!1,noFastList:f,cacheBuster:p,children:O})=>{let g=Object(r.q)(null);e&&(g=e);const v=Object(r.q)({}),[j,E]=Object(r.p)(()=>n?[Object(c.a)((e=!1)=>{n({direction:a.e.Backwards,noScroll:e})},1e3,!0,!1),Object(c.a)(()=>{n({direction:a.e.Forwards})},1e3,!0,!1)]:[],[n,l]);Object(r.n)(()=>{if(!j)return;if(u>0&&(!l||l.length<u))return void j(!0);const{scrollHeight:e,clientHeight:t}=g.current;t&&e<=t&&j()},[l,j,u]),Object(r.o)(()=>{const e=g.current,t=v.current;let n;if(t.listItemElements=e.querySelectorAll(d),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&&(t.currentAnchor=e,t.currentAnchorTop=e.getBoundingClientRect().top)}b||h&&0===e.scrollTop||(Object(s.a)(e,n),t.isScrollTopJustUpdated=!0)},[l,d,b,h,p]);const y=Object(r.m)(e=>{if(E&&j){const{listItemElements:e,isScrollTopJustUpdated:t,currentAnchor:n,currentAnchorTop:a}=v.current;if(t)return void(v.current.isScrollTopJustUpdated=!1);const r=e.length,c=g.current,{scrollTop:i,scrollHeight:o,offsetHeight:l}=c,d=i<=(r?e[0].offsetTop:0)+m,u=(r?e[r-1].offsetTop+e[r-1].offsetHeight:o)-(i+l)<=m;let b=!1;if(d){const t=e[0];if(t){const e=t.getBoundingClientRect().top,r=n&&n.offsetParent&&n!==t?n.getBoundingClientRect().top:e;n&&void 0!==a&&r>a&&(v.current.currentAnchor=t,v.current.currentAnchorTop=e,b=!0,Object(s.a)(c),E())}}if(u){const t=e[r-1];if(t){const e=t.getBoundingClientRect().top,r=n&&n.offsetParent&&n!==t?n.getBoundingClientRect().top:e;n&&void 0!==a&&r<a&&(v.current.currentAnchor=t,v.current.currentAnchorTop=e,b=!0,Object(s.a)(c),j())}}if(!b)if(n&&n.offsetParent)v.current.currentAnchorTop=n.getBoundingClientRect().top;else{const t=e[0];t&&(v.current.currentAnchor=t,v.current.currentAnchorTop=t.getBoundingClientRect().top)}}i&&i(e)},[j,E,i,m]);return r.a.createElement("div",{ref:g,className:t,onScroll:y,teactFastList:!f,onKeyDown:o},O)}},function(e,t,n){"use strict";var a=n(0),r=n(9),c=n(21);n(254);t.a=({isShown:e,className:t,color:n="primary",ariaLabel:s,disabled:i,onClick:o,children:l})=>{const d=Object(r.a)("FloatingActionButton",e&&"revealed",t);return a.a.createElement(c.a,{className:d,color:n,round:!0,disabled:i,onClick:e&&!i?o:void 0,ariaLabel:s,tabIndex:-1},l)}},function(e,t,n){"use strict";var a=n(0),r=n(39);const c={fast:200,slow:350};t.a=(e,t="fast",n=!1)=>{const s=Boolean(e),i=!Object(a.q)(s).current&&!n,[o,l]=Object(a.r)(!s),{shouldRender:d,transitionClassNames:u}=Object(r.a)(s,void 0,!i,t);return Object(a.n)(()=>{d&&(i?setTimeout(()=>{l(!1)},c[t]):l(!1))},[i,d,t]),{shouldRenderThumb:o,shouldRenderFullMedia:d,transitionClassNames:u}}},function(e,t,n){"use strict";n.d(t,"c",(function(){return i})),n.d(t,"d",(function(){return o})),n.d(t,"e",(function(){return l})),n.d(t,"a",(function(){return d})),n.d(t,"b",(function(){return u})),n.d(t,"j",(function(){return p})),n.d(t,"l",(function(){return g})),n.d(t,"g",(function(){return v})),n.d(t,"i",(function(){return j})),n.d(t,"m",(function(){return E})),n.d(t,"k",(function(){return y})),n.d(t,"n",(function(){return C})),n.d(t,"h",(function(){return N})),n.d(t,"f",(function(){return T}));var a=n(2),r=n(6),c=n(54),s=n(4);const i="(max-height: 640px)",o=parseInt(getComputedStyle(document.documentElement).fontSize,10),l=200,d={width:640,height:640},u="1258816259753933",m={width:100,height:100};let b,h,f;function p(e,t,n,a){const s=t||n?1.625:0;return(function(e,t){const n=e?30:29;if(!r.l)return n;const{width:a}=c.a.get();return b||(b=Math.min(30,a/o-4.5)),h||(h=Math.min(29,a/o-7)),f||(f=Math.min(29,a/o-4.5)),e?b:t?f:h}(e,a)-s)*o}function O({width:e,height:t,fromOwnMessage:n,isForwarded:a,isWebPagePhoto:r,isGif:c,noAvatars:s}){const i=t/e;return T(p(n,a,r,s),function(e,t){return e&&t&&t>=.75&&t<=1.25?20*o:27*o}(c,i),e,t)}function g(e,t){const n=window.matchMedia(i),{width:a,height:r}=c.a.get();let s=t&&n.matches?10:8.25;return e&&(s=n.matches?10:15),{width:a,height:r-s*o}}function v(e,t,n,a,r){const{width:c,height:i}=Object(s.V)(e)||m;return O({width:c,height:i,fromOwnMessage:t,isForwarded:n,isWebPagePhoto:a,noAvatars:r})}function j(e,t,n,a){const{width:r,height:c}=Object(s.db)(e)||m;return O({width:r,height:c,fromOwnMessage:t,isForwarded:n,isGif:e.isGif,noAvatars:a})}function E(){return{width:2*o,height:2*o}}function y(e){return e?{width:3*o,height:3*o}:{width:3.375*o,height:3.375*o}}function C(e){const{width:t}=e;let{height:n}=e;e.id===u&&(n=t);const c=n&&t&&n/t,s=o*(r.l?a.Jb:a.Ib),i=c?s*c:s;return c&&i>s?{width:Math.round(s/c),height:s}:{width:s,height:i}}function N({width:e,height:t},n,a=!1){const{width:r,height:c}=g(n,a);return T(r,c,e,t)}function T(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(10),c=n(9),s=n(51),i=n(126);let o,l;async function d(){return o||(o=n.e(7).then(n.bind(null,197)),l=(await o).default),o}setTimeout(d,5e3);t.a=Object(a.h)(({className:e,id:t,animationData:n,play:o,playSegment:u,speed:m,noLoop:b,size:h,quality:f,isLowPriority:p,onLoad:O})=>{const[g,v]=Object(a.r)(),j=Object(a.q)(null),E=Object(a.q)(!1),y=Object(a.q)(!1),C=Object(a.q)();C.current=o;const N=Object(a.q)();N.current=u,Object(a.n)(()=>{if(g||!n)return;const e=()=>{if(!j.current)return;const e=new l(t,j.current,n,{noLoop:b,size:h,quality:f,isLowPriority:p},O);m&&e.setSpeed(m),v(e)};l?e():d().then(()=>{Object(r.b)(()=>{j.current&&e()})})},[g,n,t,p,b,O,f,h,m]),Object(a.n)(()=>()=>{g&&g.destroy()},[g]);const T=Object(a.m)((e=!1)=>{g&&(C.current||N.current)&&(N.current?g.playSegment(N.current):e?g.goToAndPlay(0):g.play())},[g]),w=Object(a.m)(()=>{g&&g.pause()},[g]),M=Object(a.m)(()=>{y.current=!0,g&&(E.current||(E.current=g.isPlaying()),w())},[g,w]),I=Object(a.m)(()=>{E.current&&T(),E.current=!1,y.current=!1},[T]),S=Object(a.m)(()=>{Object(r.b)(I)},[I]);Object(a.n)(()=>{g&&(o||u?y.current?E.current=!0:T(b):y.current?E.current=!1:w())},[g,o,u,b,T,w]),Object(s.a)(M,I),Object(i.a)(M,S);const L=Object(c.a)("AnimatedSticker",e),k=h?`width: ${h}px; height: ${h}px;`:void 0;return a.a.createElement("div",{ref:j,className:L,style:k})})},function(e,t,n){"use strict";var a=n(0),r=n(16),c=n(112),s=n(21);t.a=Object(a.h)(({isOpen:e,onClose:t,onCloseAnimationEnd:n,title:i,header:o,text:l,textParts:d,confirmLabel:u="Confirm",confirmHandler:m,confirmIsDestructive:b,isButtonsInOneRow:h})=>{const f=Object(r.a)();return a.a.createElement(c.a,{className:"confirm",title:i,header:o,isOpen:e,onClose:t,onCloseAnimationEnd:n,onEnter:m},l&&l.split("\\n").map(e=>a.a.createElement("p",null,e)),d,a.a.createElement("div",{className:h?"dialog-buttons mt-2":""},a.a.createElement(s.a,{className:"confirm-dialog-button",isText:!0,onClick:m,color:b?"danger":"primary"},u),a.a.createElement(s.a,{className:"confirm-dialog-button",isText:!0,onClick:t},f("Cancel"))))})},function(e,t,n){"use strict";var a=n(0),r=n(9),c=n(39),s=n(22),i=n(16);n(253);t.a=Object(a.h)(({text:e="Nothing found.",description:t})=>{const n=Object(i.a)(),{transitionClassNames:o}=Object(c.a)(!0);return a.a.createElement("div",{className:Object(r.a)("NothingFound",o,t&&"with-description")},e,t&&a.a.createElement("p",{className:"description"},Object(s.a)(n(t),["br"])))})},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var a=n(0),r=n(52),c=n(31);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(6),c=n(8),s=n(10),i=n(57),o=n(31);t.a=(e,t=!1,n=c.ApiMediaFormat.BlobUrl,l,d)=>{const u=e?i.c(e):void 0,m=n===c.ApiMediaFormat.Stream||r.h&&n===c.ApiMediaFormat.Progressive,b=Object(o.a)(),[h,f]=Object(a.r)(u&&!m?1:0),p=Object(a.q)(),O=Object(a.p)(()=>Object(s.h)(e=>{(!d||Date.now()-p.current>d)&&f(e)},500,!0),[d]);return Object(a.n)(()=>{!t&&e&&(u?m&&setTimeout(()=>{f(.75)},1500):(f(0),p.current&&i.a(O),p.current=Date.now(),i.b(e,n,O).then(()=>{const e=Date.now()-p.current;p.current=void 0,!d||e>=d?b():setTimeout(b,d-e)})))},[t,e,u,n,l,b,m,d,O]),Object(a.n)(()=>{t&&p.current&&(i.a(O),f(0))},[O,t]),{mediaData:u,downloadProgress:h}}},function(e,t,n){"use strict";var a=n(0),r=n(9);n(223);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],d=l-4,u=l-1,m=2*d*Math.PI,b=Object(a.q)(null);Object(a.n)(()=>{if(!b.current)return;const t=b.current.firstElementChild,n=m-Math.min(Math.max(.05,e),1)*m;t?t.firstElementChild.setAttribute("stroke-dashoffset",n.toString()):b.current.innerHTML=`<svg\n viewBox="0 0 ${2*u} ${2*u}"\n height="${2*u}"\n width="${2*u}"\n >\n <circle\n stroke="white"\n fill="transparent"\n stroke-width=2\n stroke-dasharray="${m} ${m}"}\n stroke-dashoffset="${n}"\n stroke-linecap="round"\n r=${d}\n cx=${u}\n cy=${u}\n />\n </svg>`},[b,m,u,d,e]);const h=Object(r.a)("ProgressSpinner size-"+t,s&&"transparent",n&&"square",i&&"no-cross");return a.a.createElement("div",{ref:b,className:h,onClick:o})})},function(e,t,n){"use strict";var a=n(0),r=n(9),c=n(16),s=n(26);n(230);var i=Object(a.h)(({id:e,label:t,subLabel:n,value:i,name:o,checked:l,disabled:d,hidden:u,isLoading:m,onChange:b})=>{const h=Object(c.a)(),f=Object(r.a)("Radio",d&&"disabled",u&&"hidden-widget",m&&"loading");return a.a.createElement("label",{className:f,dir:h.isRtl?"rtl":void 0},a.a.createElement("input",{type:"radio",name:o,value:i,id:e,checked:l,onChange:b,disabled:d||u}),a.a.createElement("div",{className:"Radio-main"},a.a.createElement("span",{className:"label",dir:h.isRtl?"auto":void 0},t),n&&a.a.createElement("span",{className:"subLabel",dir:h.isRtl?"auto":void 0},n)),m&&a.a.createElement(s.a,null))});t.a=Object(a.h)(({id:e,name:t,options:n,selected:r,disabled:c,loadingOption:s,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(i,{name:t,label:e.label,subLabel:e.subLabel,value:e.value,checked:e.value===r,hidden:e.hidden,disabled:c,isLoading:s?s===e.value:void 0,onChange:l})))})},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var a=n(0);function r(e,t){Object(a.n)(()=>(e&&!document.hasFocus()&&e(),e&&window.addEventListener("blur",e),t&&window.addEventListener("focus",t),()=>{t&&window.removeEventListener("focus",t),e&&window.removeEventListener("blur",e)}),[e,t])}},function(e,t,n){"use strict";var a=n(0),r=n(67);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";var a=n(0),r=n(1),c=n(13),s=n(4),i=n(7),o=n(22),l=n(3),d=n(16),u=n(114),m=n(137),b=n(158);t.a=Object(a.h)(Object(r.h)((e,{chatId:t})=>{const{lastSyncTime:n}=e,a=Object(i.g)(e,t);return{lastSyncTime:n,chat:a,onlineCount:a?Object(i.o)(e,a):void 0,areMessagesLoaded:Boolean(Object(i.n)(e,t))}},(e,t)=>Object(l.l)(t,["loadFullChat","openMediaViewer"]))(({typingStatus:e,avatarSize:t="medium",withMediaViewer:n,withUsername:r,withFullInfo:i,withUpdatingStatus:l,withChatType:h,noRtl:f,chat:p,onlineCount:O,areMessagesLoaded:g,lastSyncTime:v,loadFullChat:j,openMediaViewer:E})=>{const y=p&&Object(s.qb)(p),{id:C,isMin:N,isRestricted:T}=p||{};Object(a.n)(()=>{C&&!N&&i&&v&&j({chatId:C})},[C,N,v,i,j,y]);const w=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]),M=Object(d.a)();if(p)return a.a.createElement("div",{className:"ChatInfo",dir:!f&&M.isRtl?"rtl":void 0},a.a.createElement(u.a,{key:p.id,size:t,chat:p,onClick:n?w:void 0}),a.a.createElement("div",{className:"info"},a.a.createElement("div",{className:"title"},a.a.createElement("h3",{dir:"auto"},Object(o.a)(Object(s.k)(M,p))),p.isVerified&&a.a.createElement(m.a,null)),function(){if(l&&!g&&!T)return a.a.createElement("span",{className:"status",dir:"auto"},M("Updating"));if(!p)return;if(e)return a.a.createElement(b.a,{typingStatus:e});if(h)return a.a.createElement("div",{className:"status",dir:"auto"},M(Object(s.l)(p)));const t=r?p.username:void 0,n=function(e,t){const n=e(Object(s.l)(t)),{membersCount:a}=t;if(t.isRestricted)return"Channel"===n?"channel is inaccessible":"group is inaccessible";if(!a)return n;return e("Channel"===n?"Subscribers":"Members",a,"i")}(M,p),c=O?", "+M("OnlineCount",O,"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";n.d(t,"a",(function(){return l})),n.d(t,"b",(function(){return d}));var a=n(1),r=n(13),c=n(2),s=n(51),i=n(62);let o=!1;function l(e,t,n,s=0,i=c.B,o,l,d){const m=function(e,t,n=c.B,a){const{offsetTop:s}=t,{scrollTop:i}=e;if(void 0===a){const t=s-e.scrollTop;if(t<-n)return i+(t+n);if(t>n)return i+(t-n)}else{if(a===r.b.Up)return s+n;if(a===r.b.Down)return Math.max(0,s-n)}return i}(e,t,i,o);o!==r.b.Static?(Object(a.e)().settings.byKey.animationLevel===c.f&&(l=0),u(e,t,m,n,s,l,d)):u(e,t,m,n,s,0)}function d(){return o}function u(e,t,n,a,r=0,l,d){const{offsetTop:u,offsetHeight:h}=t,{scrollTop:f,offsetHeight:p,scrollHeight:O}=e,g=!d&&e.dataset.normalHeight?Number(e.dataset.normalHeight):p;let v;switch(f!==n&&(e.scrollTop=n),a){case"start":v=u-r-n;break;case"end":v=u+h+r-(n+g);break;case"nearest":case"center":case"centerOrTop":v=h<g?u+h/2-(n+g/2):u-r-n}if(v<0){const e=-n;v=Math.max(v,e)}else if(v>0){const e=O-(n+g);v=Math.min(v,e)}if(0===v)return;const j=n+v;if(0===l)return void(e.scrollTop=j);o=!0;const E=Math.abs(v),y=E<c.E?b:m,C=l||c.D+E/c.B*(c.C-c.D),N=Date.now(),T=Object(s.b)();Object(i.b)(()=>{const t=Math.min((Date.now()-N)/C,1),n=v*(1-y(t));return e.scrollTop=Math.round(j-n),o=t<1,o||T(),o})}function m(e){return 1-(1-e)**5}function b(e){return 1-(1-e)**3.5}},,function(e,t,n){"use strict";var a=n(0),r=n(13),c=n(3),s=n(31),i=n(29);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,d=e.slice(Math.max(0,o),l+1);let u,m;switch(n){case r.e.Forwards:u=i>0,m=o>=0;break;case r.e.Backwards:u=i<c,m=l<=c-1}return{newViewportIds:d,areSomeLocal:u,areAllLocal:m}}t.a=(e,t,n=!1,l=30,d=!1)=>{const u=Object(a.q)(),m=Object(a.q)((()=>{if(!t||u.current)return;const{newViewportIds:e}=o(t,t[0],r.e.Forwards,l);return e})()),b=Object(s.a)(),h=Object(i.a)(t),f=Object(i.a)(n);if(t&&!n&&(t!==h||n!==f)){const{offsetId:e=t[0],direction:n=r.e.Forwards}=u.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&&d){const t=m.current;e({offsetId:t[t.length-1]})}},[t,n,e,d]);const p=Object(a.m)(({direction:n,noScroll:a})=>{const s=m.current,i=s?n===r.e.Backwards?s[s.length-1]:s[0]:void 0;if(!t)return void(e&&e({offsetId:i}));a||(u.current={...u.current,direction:n,offsetId:i});const{newViewportIds:d,areSomeLocal:h,areAllLocal:f}=o(t,i,n,l);!h||s&&Object(c.a)(s,d)||(m.current=d,b()),!f&&e&&e({offsetId:i})},[t,l,e,b]);return n?[t]:[m.current,p]}},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(0),r=n(8),c=n(2),s=n(118),i=n(109),o=n(110),l=n(117),d=n(25),u=n(119);n(228);t.a=({sticker:e,isInline:t=!1,observeIntersection:n,lastSyncTime:m,forceLoadPreview:b})=>{const h=Object(a.q)(null),[f,p]=Object(d.a)(),O="sticker"+e.id,g=Object(i.b)(h,n),v=e.thumbnail&&e.thumbnail.dataUri,j=Object(o.a)(O+"?size=m",!g&&!b,r.ApiMediaFormat.BlobUrl,m),{transitionClassNames:E}=Object(l.a)(j,"slow"),y=Object(o.a)(O,!g,r.ApiMediaFormat.Lottie,m),C=Boolean(y),[N,T]=Object(a.r)(String(Math.random())),w=Object(a.m)(()=>{T(String(Math.random()))},[]);let M;M=t?.5*Object(s.n)(e).width:c.Ob;const I=`width: ${M}px; height: ${M}px;`;return a.a.createElement("div",{ref:h,className:"AnimatedEmoji media-inner",style:I,onClick:w},!f&&v&&a.a.createElement("img",{src:v,className:e.id===s.b?"like-sticker-thumb":void 0,alt:""}),!f&&j&&a.a.createElement("img",{src:j,className:E,alt:""}),C&&a.a.createElement(u.a,{key:O,id:O,animationData:y,size:M,quality:1,play:g&&N,noLoop:!0,onLoad:p}))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var a=n(6);function r(e,t){if(!t&&e===document.activeElement)return;const n=window.getSelection(),r=document.createRange(),c=e.lastChild||e;a.n||c&&c.nodeValue?(r.selectNodeContents(c),r.collapse(!1),n.removeAllRanges(),n.addRange(r)):e.focus()}},,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,c=!1;function s(e){t.excludedClosestSelector&&(e.target.matches(t.excludedClosestSelector)||e.target.closest(t.excludedClosestSelector))||(n=e,"mousedown"===e.type?(document.addEventListener("mousemove",o),document.addEventListener("mouseup",i)):"touchstart"===e.type&&(document.addEventListener("touchmove",o),document.addEventListener("touchend",i),document.addEventListener("touchcancel",i),"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 i(e){n&&(t.withCursor&&document.body.classList.remove("cursor-grabbing"),document.body.classList.remove("no-selection"),document.removeEventListener("mouseup",i),document.removeEventListener("mousemove",o),document.removeEventListener("touchcancel",i),document.removeEventListener("touchend",i),document.removeEventListener("touchmove",o),n=void 0,c?t.onRelease&&t.onRelease(e):!t.onClick||"button"in e&&0!==e.button||t.onClick(e)),c=!1,r=void 0}function o(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 s=e.pageX-n.pageX,i=e.pageY-n.pageY;(Math.abs(s)>=15||Math.abs(i)>=15)&&(c=!0),t.onDrag&&(e.preventDefault(),t.onDrag(e,n,{dragOffsetX:s,dragOffsetY:i})),t.onSwipe&&function(e,n,c){if(!r){const e=Math.abs(n),t=Math.abs(c);if(n&&c){if(Math.max(e,t)/Math.min(e,t)<2)return}e>=50?r="x":t>=50&&(r="y")}!function(e,t,n,r,c){"x"===t?c(e,n<0?a.Left:a.Right):"y"===t&&c(e,r<0?a.Up:a.Down)}(e,r,n,c,t.onSwipe)}(e,s,i)}}return e.addEventListener("mousedown",s),e.addEventListener("touchstart",s,{passive:!0}),()=>{e.removeEventListener("mousedown",s),e.removeEventListener("touchstart",s)}}},function(e,t,n){"use strict";var a=n(0);n(207);t.a=()=>a.a.createElement("span",{className:"VerifiedIcon"})},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var a=n(29);function r(e,t=!1,n=!1){const r=Object(a.a)(e,t);return n||null!=e?e:r}},function(e,t,n){"use strict";var a=n(2);t.a=e=>{e.play().catch(e=>{a.r&&console.warn(e)})}},function(e,t,n){"use strict";var a=n(0),r=n(10),c=n(161);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";n.d(t,"a",(function(){return s}));var a=n(8),r=n(6);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.d||(t=t.replace(/<img[^>]+alt="([^"]+)"[^>]*>/gm,"$1"));return t=t.replace(/<\/?span([^>]*)?>/g,""),t=t.replace(/&nbsp;/g," "),t=t.replace(/<div><br([^>]*)?><\/div>/g,"\n"),t=t.replace(/<br([^>]*)?>/g,"\n"),t=t.replace(/<\/div>(\s*)<div>/g,"\n"),t=t.replace(/<div>/g,"\n"),t=t.replace(/<\/div>/g,""),t=t.replace(/^`{3}(.*[\n\r][^]*?^)`{3}/gm,"<pre>$1</pre>"),t=t.replace(/[`]{3}([^`]+)[`]{3}/g,"<pre>$1</pre>"),t=t.replace(/[`]{1}([^`\n]+)[`]{1}/g,"<code>$1</code>"),t=t.replace(/[*]{2}([^*\n]+)[*]{2}/g,"<b>$1</b>"),t=t.replace(/[_]{2}([^*\n]+)[_]{2}/g,"<i>$1</i>"),t=t.replace(/[~]{2}([^~\n]+)[~]{2}/g,"<s>$1</s>"),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.dataset.entityType===a.ApiMessageEntityTypes.Url?a.ApiMessageEntityTypes.Url: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 d,u;r===a.ApiMessageEntityTypes.TextUrl&&(d=e.href);r===a.ApiMessageEntityTypes.MentionName&&(u=Number(e.dataset.userId));return{index:i,entity:{type:r,offset:o,length:l,...d&&{url:d},...u&&{userId:u}}}}(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 d}));var a=n(0),r=n(39),c=n(9),s=n(48),i=n(29),o=n(25);n(218);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(219);let d;!function(e){e.None="none",e.Document="document",e.QuickFile="quick_file"}(d||(d={}));t.b=Object(a.h)(({isOpen:e,withQuick:t,onHide:n,onFileSelect:o})=>{const d=Object(a.q)(null),u=Object(i.a)(t),{shouldRender:m,transitionClassNames:b}=Object(r.a)(e);Object(a.n)(()=>e?Object(s.a)(n):void 0,[e,n]);const h=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&&(d.current=window.setTimeout(()=>{n()},150))},[n]);if(!m)return;const O=Object(c.a)("DropArea",b);return a.a.createElement("div",{className:O,onDragLeave:p,onDragOver:()=>{d.current&&window.clearTimeout(d.current)},onDrop:n},a.a.createElement(l,{onFileSelect:h}),(t||u)&&a.a.createElement(l,{onFileSelect:f,isQuick:!0}))})},,function(e,t,n){"use strict";var a=n(0),r=n(1),c=n(7),s=n(4),i=n(22),o=n(9),l=n(16),d=n(114);n(201);t.a=Object(a.h)(Object(r.h)((e,{chatOrUserId:t})=>{if(!t)return{};return{chat:t?Object(c.g)(e,t):void 0,user:Object(s.ob)(t)?Object(c.Jb)(e,t):void 0}})(({icon:e,title:t,isMinimized:n,canClose:r,onClick:c,clickArg:u,chat:m,user:b,className:h})=>{const f=Object(l.a)();let p,O;if(e&&t)p=a.a.createElement("div",{className:"item-icon"},a.a.createElement("i",{className:"icon-"+e})),O=t;else if(m||b){p=a.a.createElement(d.a,{chat:m,user:b,size:"small",isSavedMessages:b&&b.isSelf});const e=!m||b&&!b.isSelf?Object(s.ab)(b):Object(s.k)(f,m,b);O=e?Object(i.a)(e):void 0}const g=Object(o.a)("PickerSelectedItem",h,n&&"minimized",r&&"closeable");return a.a.createElement("div",{className:g,onClick:()=>c(u),title:n?O:void 0,dir:f.isRtl?"rtl":void 0},p,!n&&a.a.createElement("div",{className:"item-name",dir:"auto"},O),r&&a.a.createElement("div",{className:"item-remove"},a.a.createElement("i",{className:"icon-close"})))}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var a=n(1),r=n(2),c=n(6),s=n(62);function i(e,t,n=300){Object(a.e)().settings.byKey.animationLevel===r.f&&(n=0),c.e?function(e,t,n){const{scrollLeft:a,offsetWidth:r,scrollWidth:c}=e;let i=t-a;if(i<0){const e=-a;i=Math.max(i,e)}else if(i>0){const e=c-(a+r);i=Math.min(i,e)}if(0===i)return;const o=a+i;if(0===n)return void(e.scrollLeft=o);const l=Date.now();Object(s.a)(()=>{const t=Math.min((Date.now()-l)/n,1),a=i*(1-function(e){return 1-(1-e)**3.5}(t));return e.scrollLeft=Math.round(o-a),t<1})}(e,t,n):e.scrollTo({left:t,...n&&{behavior:"smooth"}})}},function(e,t,n){"use strict";var a=n(0);t.a=(e,t)=>{Object(a.n)(()=>{if(e)return e.addEventListener("wheel",t,{passive:!0}),()=>{e.removeEventListener("wheel",t)};function t(t){t.deltaX||(e.scrollLeft+=t.deltaY/4)}},[e,t])}},function(e,t,n){"use strict";var a=n(0),r=n(1),c=n(10);t.a=(e,t,n,s)=>{const{loadMessage:i}=Object(r.d)(),o=Object(a.p)(()=>{const n=Object(c.h)(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),r=n(6);let c=0;t.a=(e,t,n,s)=>{const[i,o]=Object(a.r)(!1),[l,d]=Object(a.r)(void 0),u=Object(a.m)(e=>{t||2!==e.button||document.body.classList.add("no-selection")},[t]),m=Object(a.m)(e=>{document.body.classList.remove("no-selection"),t||n&&e.target.matches("a.text-entity-link[href]")||(e.preventDefault(),l||(document.body.classList.remove("no-selection"),0===c&&document.body.classList.add("has-context-menu"),c++,o(!0),d({x:e.clientX,y:e.clientY})))},[t,n,l]),b=Object(a.m)(()=>{o(!1)},[]),h=Object(a.m)(()=>{d(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.n||s)return;const a=e.current;if(!a)return;let c;const i=()=>{c&&(clearTimeout(c),c=void 0)},u=e=>{t||r.l&&window.document.body.classList.contains("enable-symbol-menu-transforms")||(i(),c=window.setTimeout(()=>(e=>{i();const{clientX:t,clientY:r,target:c}=e.touches[0];l||n&&c.matches("a.text-entity-link[href]")||(a.addEventListener("touchend",(function e(t){a.removeEventListener("touchend",e,!0),t.stopImmediatePropagation(),t.preventDefault(),t.stopPropagation()}),!0),document.body.classList.add("no-selection"),o(!0),d({x:t,y:r}))})(e),250))};return a.addEventListener("touchstart",u,{passive:!0}),a.addEventListener("touchcancel",i,!0),a.addEventListener("touchend",i,!0),a.addEventListener("touchmove",i,{passive:!0}),()=>{i(),a.removeEventListener("touchstart",u),a.removeEventListener("touchcancel",i,!0),a.removeEventListener("touchend",i,!0),a.removeEventListener("touchmove",i)}},[l,t,s,e,n]),{isContextMenuOpen:i,contextMenuPosition:l,handleBeforeContextMenu:u,handleContextMenu:m,handleContextMenuClose:b,handleContextMenuHide:h}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return d})),n.d(t,"b",(function(){return m}));var a=n(0),r=n(1),c=n(8),s=n(4),i=n(22),o=n(78),l=n(59);function d(e,t,n){const a=e.content.text;if(!a||!a.text){const t=Object(s.P)(e);return t?[t]:void 0}const{text:r,entities:c}=a;return m(r,c,t,n)}function u(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=[];return a.filter((e,t)=>t>n&&e.offset>=c&&e.offset<c+s).map(t=>e(t,a.indexOf(t),a,r)).filter(Boolean).forEach(e=>{let t=!1;e.organizedIndexes.forEach(e=>{t||i.has(e)||(t=!0),i.add(e)}),t&&o.push(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 b(e,n,r,s);const d=[];let m=!1;const O=u(t);function g(t,d,u,O){const v=[],{entity:j,nestedEntities:E}=u,{offset:y,length:C,type:N}=j;let T=e.substring(t,y);const w=T.length;T&&(m&&T.length>0&&"\n"===T[0]&&(T=T.substr(1),m=!1),T&&v.push(...b(T,n,r,s)));const M=t+w,I=M+C;let S=e.substring(y,y+C);const L=[];if(m&&S.length>0&&"\n"===S[0]&&(S=S.substr(1),m=!1),N===c.ApiMessageEntityTypes.Pre&&(m=!0),E.length){let e=M;E.forEach((t,n)=>{const{renderResult:a,entityEndIndex:r}=g(e,I,t,n===E.length-1);L.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`<b>${r}</b>`;case c.ApiMessageEntityTypes.Italic:return`<i>${r}</i>`;case c.ApiMessageEntityTypes.Underline:return`<u>${r}</u>`;case c.ApiMessageEntityTypes.Code:return`<code class="text-entity-code">${r}</code>`;case c.ApiMessageEntityTypes.Pre:return`\`\`\`<br/>${r}<br/>\`\`\``;case c.ApiMessageEntityTypes.Strike:return`<del>${r}</del>`;case c.ApiMessageEntityTypes.MentionName:return`<a\n class="text-entity-link"\n data-entity-type="${c.ApiMessageEntityTypes.MentionName}"\n data-user-id="${e.userId}"\n contenteditable="false"\n dir="auto"\n >${r}</a>`;case c.ApiMessageEntityTypes.Url:case c.ApiMessageEntityTypes.TextUrl:return`<a\n class="text-entity-link"\n href=${h(a,e)}\n data-entity-type="${e.type}"\n dir="auto"\n >${r}</a>`;default:return r}}(j,S,L):function(e,t,n){const r="string"==typeof t&&t,s=n.length?n:t;if(!r)return b(s);switch(e.type){case c.ApiMessageEntityTypes.Bold:return a.a.createElement("strong",null,b(s));case c.ApiMessageEntityTypes.Blockquote:return a.a.createElement("blockquote",null,b(s));case c.ApiMessageEntityTypes.BotCommand:return a.a.createElement("a",{onClick:f,className:"text-entity-link",dir:"auto"},b(s));case c.ApiMessageEntityTypes.Hashtag:case c.ApiMessageEntityTypes.Cashtag:return a.a.createElement("a",{onClick:p,className:"text-entity-link",dir:"auto"},b(s));case c.ApiMessageEntityTypes.Code:return a.a.createElement("code",{className:"text-entity-code"},b(s));case c.ApiMessageEntityTypes.Email:return a.a.createElement("a",{href:"mailto:"+r,target:"_blank",rel:"noopener noreferrer",className:"text-entity-link",dir:"auto"},b(s));case c.ApiMessageEntityTypes.Italic:return a.a.createElement("em",null,b(s));case c.ApiMessageEntityTypes.MentionName:return a.a.createElement(o.a,{userId:e.userId},b(s));case c.ApiMessageEntityTypes.Mention:return a.a.createElement(o.a,{username:r},b(s));case c.ApiMessageEntityTypes.Phone:return a.a.createElement("a",{href:"tel:"+r,className:"text-entity-link",dir:"auto"},b(s));case c.ApiMessageEntityTypes.Pre:return a.a.createElement("pre",{className:"text-entity-pre"},b(s));case c.ApiMessageEntityTypes.Strike:return a.a.createElement("del",null,b(s));case c.ApiMessageEntityTypes.TextUrl:case c.ApiMessageEntityTypes.Url:return a.a.createElement(l.a,{url:h(r,e),text:r},b(s));case c.ApiMessageEntityTypes.Underline:return a.a.createElement("ins",null,b(s));default:return b(s)}}(j,S,L);if(Array.isArray(k)?v.push(...k):v.push(k),O&&I<d){let t=e.substring(I,d);m&&t.length>0&&"\n"===t[0]&&(t=t.substring(1)),t&&v.push(...b(t,n,r,s))}return{renderResult:v,entityEndIndex:I}}let v=0;return O.forEach((t,n)=>{const{renderResult:a,entityEndIndex:r}=g(v,e.length,t,n===O.length-1);d.push(...a),v=r}),d}function b(e,t,n,a){if(Array.isArray(e)){const r=[];return e.forEach(e=>{r.push(...b(e,t,n,a))}),r}if(a)return Object(i.a)(e,["escape_html","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 h(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 c}));var a=n(0),r=n(10);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(9),c=n(25),s=n(16),i=n(20),o=n(21);n(199);t.a=Object(a.h)(({ref:e,children:t,parentContainerClassName:n,value:l,inputId:d,className:u,focused:m,isLoading:b,placeholder:h,disabled:f,autoComplete:p,canClose:O,onChange:g,onReset:v,onFocus:j,onBlur:E})=>{let y=Object(a.q)(null);e&&(y=e);const[C,N,T]=Object(c.a)(m);Object(a.n)(()=>{y.current&&(m?y.current.focus():y.current.blur())},[m,h]);const w=Object(s.a)();const M=Object(a.m)(e=>{if("ArrowDown"===e.key||"Enter"===e.key){const e=document.querySelector(`.${n} .ListItem-button`);e&&e.focus()}},[n]);return a.a.createElement("div",{className:Object(r.a)("SearchInput",u,C&&"has-focus"),dir:w.isRtl?"rtl":void 0},t,a.a.createElement("input",{ref:y,id:d,type:"text",dir:"auto",placeholder:h||w("Search"),className:"form-control",value:l,disabled:f,autoComplete:p,onChange:function(e){const{currentTarget:t}=e;g(t.value)},onFocus:function(){N(),j&&j()},onBlur:function(){T(),E&&E()},onKeyDown:M}),a.a.createElement("i",{className:"icon-search"}),b&&a.a.createElement(i.a,null),!b&&(l||O)&&v&&a.a.createElement(o.a,{round:!0,size:"tiny",color:"translucent",onClick:v},a.a.createElement("span",{className:"icon-close"})))})},function(e,t,n){"use strict";var a=n(6);t.a=(e,t)=>{a.e&&(e.style.overflow="hidden"),void 0!==t&&(e.scrollTop=t),a.e&&(e.style.overflow="")}},function(e,t,n){"use strict";var a=n(0),r=n(1),c=n(7),s=n(4),i=n(22),o=n(16);n(208);t.a=Object(a.h)(Object(r.h)((e,{typingStatus:t})=>{if(!t.userId)return{};return{typingUser:Object(c.Jb)(e,t.userId)}})(({typingStatus:e,typingUser:t})=>{const n=Object(o.a)(),r=t&&!t.isSelf&&Object(s.ab)(t);return a.a.createElement("p",{className:"typing-status",dir:n.isRtl?"rtl":"auto"},r&&a.a.createElement("span",{className:"sender-name",dir:"auto"},Object(i.a)(r)),n(e.action).replace("{user}","").trim(),a.a.createElement("span",{className:"ellipsis"}))}))},function(e,t,n){"use strict";var a=n(0),r=n(1),c=n(7),s=n(4),i=n(3),o=n(16),l=n(22),d=n(114),u=n(112),m=n(21);n(211);t.a=Object(a.h)(Object(r.h)((e,{chat:t})=>{const n=Object(s.ob)(t.id),a=Object(c.P)(e,t.id),r=n&&Object(c.Jb)(e,Object(s.W)(t)),i=r&&Object(s.Bb)(r)&&!t.isSupport,o=n&&!a&&!i,l=n?Object(s.ab)(Object(c.Jb)(e,Object(s.W)(t))):void 0;return{isPrivateChat:n,isChatWithSelf:a,isBot:i,isChannel:Object(s.mb)(t),isBasicGroup:Object(s.lb)(t),isSuperGroup:Object(s.qb)(t),currentUserId:e.currentUserId,canDeleteForAll:o,contactName:l}},(e,t)=>Object(i.l)(t,["leaveChannel","deleteHistory","deleteChannel","deleteChatUser","blockContact"]))(({isOpen:e,chat:t,isChannel:n,isPrivateChat:r,isChatWithSelf:c,isBot:i,isBasicGroup:b,isSuperGroup:h,currentUserId:f,canDeleteForAll:p,contactName:O,onClose:g,onCloseAnimationEnd:v,leaveChannel:j,deleteHistory:E,deleteChannel:y,deleteChatUser:C,blockContact:N})=>{const T=Object(o.a)(),w=Object(s.k)(T,t),M=Object(a.m)(()=>{E({chatId:t.id,shouldDeleteForAll:!0}),g()},[E,t.id,g]),I=Object(a.m)(()=>{E({chatId:t.id,shouldDeleteForAll:!0}),N({contactId:t.id,accessHash:t.accessHash}),g()},[E,t.id,t.accessHash,N,g]),S=Object(a.m)(()=>{r?E({chatId:t.id,shouldDeleteForAll:!1}):b?(C({chatId:t.id,userId:f}),E({chatId:t.id,shouldDeleteForAll:!1})):!n&&!h||t.isCreator?(n||h)&&t.isCreator&&y({chatId:t.id}):j({chatId:t.id}),g()},[r,b,n,h,f,t.isCreator,t.id,g,E,C,j,y]);return a.a.createElement(u.a,{isOpen:e,className:"DeleteChatModal",header:a.a.createElement("div",{className:"modal-header",dir:T.isRtl?"rtl":void 0},a.a.createElement(d.a,{size:"tiny",chat:t,isSavedMessages:c}),a.a.createElement("h3",{className:"modal-title"},T(n&&!t.isCreator?"LeaveChannel":n&&t.isCreator?"ChannelDelete":b||h?"Group.LeaveGroup":"DeleteChatUser"))),onClose:g,onCloseAnimationEnd:v},n&&t.isCreator?a.a.createElement("p",null,Object(l.a)(T("ChatList.DeleteAndLeaveGroupConfirmation",w),["simple_markdown"])):n&&!t.isCreator||b||h?a.a.createElement("p",null,Object(l.a)(T("ChannelLeaveAlertWithName",w),["simple_markdown"])):a.a.createElement("p",null,Object(l.a)(T("ChatList.DeleteChatConfirmation",O),["simple_markdown"])),i&&a.a.createElement(m.a,{color:"danger",className:"confirm-dialog-button",isText:!0,onClick:I},T("DeleteAndStop")),p&&a.a.createElement(m.a,{color:"danger",className:"confirm-dialog-button",isText:!0,onClick:M},O?Object(l.a)(T("ChatList.DeleteForEveryone",O)):T("DeleteForAll")),a.a.createElement(m.a,{color:"danger",className:"confirm-dialog-button",isText:!0,onClick:S},T(n&&!t.isCreator?"LeaveChannel":n&&t.isCreator?"Chat.Input.Delete":b||h?"Group.LeaveGroup":p?"ChatList.DeleteForCurrentUser":"Delete")),a.a.createElement(m.a,{className:"confirm-dialog-button",isText:!0,onClick:g},T("Cancel")))}))},function(e,t,n){"use strict";var a=n(0),r=n(39),c=n(29),s=n(9);t.a=({isOpen:e,isCustom:t,id:n,className:i,onClick:o,children:l})=>{const{shouldRender:d,transitionClassNames:u}=Object(r.a)(e,void 0,void 0,!t&&void 0),m=Object(c.a)(e),b=Object(c.a)(l),h=Object(a.q)();return m&&!e&&(h.current=b),d&&a.a.createElement("div",{id:n,className:Object(s.a)(i,u),onClick:o},e?l():h.current())}},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(29);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(60),c=n(4),s=n(109),i=n(123),o=n(110),l=n(182),d=n(183);t.a=Object(a.h)(({message:e,observeIntersection:t,smaller:n,uploadProgress:u,withDate:m,datetime:b,className:h,sender:f,isSelected:p,isSelectable:O,onCancelUpload:g,onMediaClick:v,onDateClick:j})=>{const E=Object(a.q)(null),y=e.content.document,C=Object(r.b)(y)||"",{fileName:N,size:T,timestamp:w}=y,M=v&&Boolean(y.mediaType),I=Object(s.b)(E,t),[S,L]=Object(a.r)(!1),{mediaData:k,downloadProgress:A}=Object(i.a)(Object(c.E)(e,"download"),!S),{isUploading:x,isTransferring:D,transferProgress:R}=Object(c.r)(e,u||A,S),_=Object(r.c)(y),P=_?Object(c.F)(e):void 0,F=_?y.previewBlobUrl:void 0,U=Object(o.a)(Object(c.E)(e,"pictogram"),!I),B=Object(a.m)(()=>{M?v():x?g&&g():L(e=>!e)},[M,x,g,v]),q=Object(a.m)(()=>{j(e.id,e.chatId)},[j,e.id,e.chatId]);return Object(a.n)(()=>{S&&k&&(Object(l.a)(k,N),L(!1))},[N,k,S]),a.a.createElement(d.a,{ref:E,name:N,extension:C,size:T,timestamp:m?b||w:void 0,thumbnailDataUri:P,previewData:F||U,smaller:n,isTransferring:D,isUploading:x,transferProgress:R,className:h,sender:f,isSelectable:O,isSelected:p,actionIcon:M?Object(c.wb)(e)?"icon-play":"icon-eye":"icon-download",onClick:B,onDateClick:j?q:void 0})})},function(e,t,n){"use strict";var a=n(0),r=n(15),c=n(24);t.a=Object(a.h)(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";n.d(t,"a",(function(){return i}));var a=n(0),r=n(166),c=n(31),s=n(6);function i(e,t=!1,n){const i=Object(a.q)(null),o=Object(c.a)();return Object(a.n)(()=>{const a=i.current;if(!e||!a||t)return;const c=new Image,o=()=>{a.width=c.width,a.height=c.height;const e=a.getContext("2d",{alpha:!1});s.c&&(e.filter="blur(2px)"),e.drawImage(c,-4,-4,a.width+8,a.height+8),s.c||Object(r.a)(e,0,0,a.width,a.height,2,2)};c.onload=()=>{n?requestAnimationFrame(o):o()},c.src=e},[i,e,o,t,n]),i}},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),d=l.data;let u,m,b,h,f,p,O,g,v,j,E,y,C=c-1,N=s-1,T=i+1,w=[],M=[],I=[],S=a[i],L=r[i],k=[],A=[];for(;o-- >0;){for(y=E=0,f=0;f<s;f++){for(u=d[y]*T,m=d[y+1]*T,b=d[y+2]*T,p=1;p<=i;p++)O=y+((p>C?C:p)<<2),u+=d[O++],m+=d[O++],b+=d[O++];for(h=0;h<c;h++)w[E]=u,M[E]=m,I[E]=b,0==f&&(k[h]=((O=h+T)<C?O:C)<<2,A[h]=(O=h-i)>0?O<<2:0),g=y+k[h],v=y+A[h],u+=d[g++]-d[v++],m+=d[g++]-d[v++],b+=d[g++]-d[v++],E++;y+=c<<2}for(h=0;h<c;h++){for(j=h,u=w[j]*T,m=M[j]*T,b=I[j]*T,p=1;p<=i;p++)j+=p>N?0:c,u+=w[j],m+=M[j],b+=I[j];for(E=h<<2,f=0;f<s;f++)d[E]=u*S>>>L,d[E+1]=m*S>>>L,d[E+2]=b*S>>>L,0==h&&(k[f]=((O=f+T)<N?O:N)*c,A[f]=(O=f-i)>0?O*c:0),g=h+k[f],v=h+A[f],u+=w[g]-w[v],m+=M[g]-M[v],b+=I[g]-I[v],E+=c<<2}}e.putImageData(l,t,n)}},function(e,t,n){"use strict";var a=n(0),r=n(2),c=n(9),s=n(48),i=n(39),o=n(80),l=n(25),d=n(16),u=n(21);n(243);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:b})=>{const h=Object(a.q)(null),f=Object(a.q)(null),{shouldRender:p,transitionClassNames:O}=Object(i.a)(e),[g,v,j]=Object(l.a)(),[E,y]=Object(a.r)(""),[C,N]=Object(a.r)(!1),[T,w]=Object(a.r)(),[M,I]=Object(a.r)({});Object(a.n)(()=>e?Object(s.a)(b):void 0,[e,b]),Object(o.a)(e,h,b),Object(a.n)(()=>{g?f.current.focus():(y(""),N(!1))},[g]),Object(a.n)(()=>{p||(j(),I({}),w(void 0))},[j,p]),Object(a.n)(()=>{if(!e||!n)return;const t={};let{parentElement:a}=n.commonAncestorContainer;for(;a&&a.id!==r.z;){const e=m[a.tagName];e&&(t[e]=!0),a=a.parentElement}I(t)},[e,n,v]);const S=Object(a.m)(()=>{if(n)return n.toString()},[n]),L=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 w(void 0);let r="";a<n-t&&(r="mask-right"),a>0&&(r+=" mask-left"),w(r)}function A(e){if(M[e])return"active";if("monospace"===e||"strikethrough"===e){if(Object.keys(M).some(t=>t!==e&&!!M[t]))return"disabled"}else if(M.monospace||M.strikethrough)return"disabled"}const x=Object(a.m)(()=>{I(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"),I(e=>({...e,italic:!e.italic}))},[]),R=Object(a.m)(()=>{document.execCommand("underline"),I(e=>({...e,underline:!e.underline}))},[]),_=Object(a.m)(()=>{if(M.strikethrough){const e=L();if(!n||!e||"DEL"!==e.tagName||!e.textContent)return;return e.replaceWith(e.textContent),void I(e=>({...e,strikethrough:!1}))}const e=S();document.execCommand("insertHTML",!1,`<del>${e}</del>`),b()},[L,S,b,n,M.strikethrough]),P=Object(a.m)(()=>{if(M.monospace){const e=L();if(!n||!e||"CODE"!==e.tagName||!e.textContent)return;return e.replaceWith(e.textContent),void I(e=>({...e,monospace:!1}))}const e=S();document.execCommand("insertHTML",!1,`<code class="text-entity-code" dir="auto">${e}</code>`),b()},[L,S,b,n,M.monospace]);function F(){const e=E.includes("://")?E:"http://"+E;if(C){const t=L();if(!t||"A"!==t.tagName)return;return t.href=e,void b()}const t=S();!function(){if(!n)return;const e=window.getSelection();e&&(e.removeAllRanges(),e.addRange(n))}(),document.execCommand("insertHTML",!1,`<a href=${e} class="text-entity-link" dir="auto">${t}</a>`),b()}const U=Object(a.m)(e=>{const t={KeyK:v,KeyB:x,KeyU:R,KeyI:D,KeyM:P,KeyS:_}[e.code];!e.altKey&&(e.ctrlKey||e.metaKey)&&t&&(e.preventDefault(),e.stopPropagation(),t())},[x,D,R,P,_,v]);Object(a.n)(()=>(e&&document.addEventListener("keydown",U),()=>document.removeEventListener("keydown",U)),[e,U]);const B=Object(d.a)();if(!p)return;const q=Object(c.a)("TextFormatter",O,g&&"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:h,className:q,style:$,onKeyDown:function(e){"Enter"===e.key&&g&&(F(),e.preventDefault())}},a.a.createElement("div",{className:"TextFormatter-buttons"},a.a.createElement(u.a,{color:"translucent",ariaLabel:"Bold text",className:A("bold"),onClick:x},a.a.createElement("i",{className:"icon-bold"})),a.a.createElement(u.a,{color:"translucent",ariaLabel:"Italic text",className:A("italic"),onClick:D},a.a.createElement("i",{className:"icon-italic"})),a.a.createElement(u.a,{color:"translucent",ariaLabel:"Underlined text",className:A("underline"),onClick:R},a.a.createElement("i",{className:"icon-underlined"})),a.a.createElement(u.a,{color:"translucent",ariaLabel:"Strikethrough text",className:A("strikethrough"),onClick:_},a.a.createElement("i",{className:"icon-strikethrough"})),a.a.createElement(u.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(u.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(u.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",dir:"auto",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(u.a,{color:"translucent",ariaLabel:B("Save"),className:"color-primary",onClick:F},a.a.createElement("i",{className:"icon-check"}))))))})},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(2);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=>{if(!e)return;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.r&&console.error(e)}}},function(e,t,n){"use strict";var a=n(0),r=n(30),c=n(4),s=n(110),i=n(117);n(251);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.F)(e),d=Object(s.a)(Object(c.E)(e,"pictogram")),{shouldRenderThumb:u,shouldRenderFullMedia:m,transitionClassNames:b}=Object(i.a)(d,"slow"),h=Object(c.Q)(e);return a.a.createElement("div",{id:`${t}${e.id}`,className:"Media scroll-item",onClick:n?o:void 0},u&&a.a.createElement("img",{src:l,alt:""}),m&&a.a.createElement("img",{src:d,className:b+" full-media",alt:""}),h&&a.a.createElement("span",{className:"video-duration"},h.isGif?"GIF":Object(r.e)(h.duration)))})},function(e,t,n){"use strict";var a=n(0),r=n(4),c=n(115),s=n(47),i=n(46),o=n(108),l=n(111),d=n(128),u=n(144),m=n(131),b=n(16),h=n(20);n(191);t.a=Object(a.h)(({itemIds:e,selectedIds:t,filterValue:n,filterPlaceholder:f,notFoundText:p,searchInputId:O,isLoading:g,noScrollRestore:v,onSelectedIdsChange:j,onFilterChange:E,onLoadMore:y})=>{const C=Object(a.q)(null),N=t.length>10;Object(a.n)(()=>{setTimeout(()=>{requestAnimationFrame(()=>{C.current.focus()})},500)},[]);const T=Object(a.m)(e=>{const n=[...t];n.includes(e)?n.splice(n.indexOf(e),1):n.push(e),j(n),E("")},[t,j,E]),w=Object(a.m)(e=>{const{value:t}=e.currentTarget;E(t)},[E]),[M,I]=Object(m.a)(y,e,Boolean(n)),S=Object(b.a)();return a.a.createElement("div",{className:"Picker"},a.a.createElement("div",{className:"picker-header custom-scroll",dir:S.isRtl?"rtl":void 0},t.map((e,n)=>a.a.createElement(u.a,{chatOrUserId:e,isMinimized:N&&n<t.length-5,canClose:!0,onClick:T,clickArg:e})),a.a.createElement(i.a,{id:O,ref:C,value:n,onChange:w,placeholder:f||S("SelectChat")})),M&&M.length?a.a.createElement(c.a,{className:"picker-list custom-scroll",items:M,onLoadMore:I,noScrollRestore:v},M.map(e=>a.a.createElement(o.a,{key:e,className:"chat-item-clickable picker-list-item",onClick:()=>T(e),ripple:!0},a.a.createElement(s.a,{label:"",checked:t.includes(e)}),Object(r.ob)(e)?a.a.createElement(l.a,{userId:e}):a.a.createElement(d.a,{chatId:e})))):g||!M||M.length?a.a.createElement(h.a,null):a.a.createElement("p",{className:"no-results"},p||"Sorry, nothing found."))})},,function(e,t,n){"use strict";var a=n(0),r=n(6),c=n(30),s=n(4);var i=n(9),o=n(22);var l=n(123),d=n(39),u=n(140),m=n(180),b=n(184),h=n(16),f=n(21),p=n(124),O=n(32);n(225);const g=r.l?20:25,v=r.l?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)(({theme:e,message:t,senderTitle:n,uploadProgress:E,target:y,date:C,lastSyncTime:N,className:T,isSelectable:w,isSelected:M,onPlay:I,onReadMedia:S,onCancelUpload:L,onDateClick:k})=>{const{content:{audio:A,voice:x},isMediaUnread:D}=t,R=Boolean(x),_=Object(a.q)(!1),P=Object(h.a)(),[F,U]=Object(a.r)(!1),B=N,{mediaData:q,downloadProgress:H}=Object(l.a)(Object(s.E)(t,"inline"),!B,Object(s.D)(t,"inline"));const{isBuffered:$,bufferedProgress:K,bufferingHandlers:V,checkBuffering:z}=Object(u.a)(),{isPlaying:W,playProgress:Y,playPause:G,setCurrentTime:X,duration:J}=Object(m.a)(Object(s.C)(t),Object(s.q)(t),q,V,z,F,(function(){U(!0),I(t.id,t.chatId)}),Object(s.xb)(t));Object(a.n)(()=>{U(W)},[W]);const{isDownloadStarted:Q,downloadProgress:Z,handleDownloadClick:ee}=Object(b.a)(Object(s.E)(t,"download"),Object(s.u)(t)),te=F&&!$,{isUploading:ne,isTransferring:ae,transferProgress:re}=Object(s.r)(t,Q?Z:E||H,te||Q),{shouldRender:ce,transitionClassNames:se}=Object(d.a)(ae),ie=Object(a.m)(()=>{ne?L&&L():(W||I(t.id,t.chatId),U(!F),G())},[W,ne,t.id,t.chatId,L,I,G,F]);Object(a.n)(()=>{W&&S&&D&&S()},[W,D,S]);const oe=Object(a.m)(e=>{if(_.current){const t=e.currentTarget.closest(".seekline,.waveform");if(t){const{width:n,left:a}=t.getBoundingClientRect();X(J*((e.clientX-a)/n))}}},[J,X]),le=Object(a.m)(e=>{_.current=!0,oe(e)},[oe]),de=Object(a.m)(()=>{_.current=!1},[]),ue=Object(a.m)(()=>{k(t.id,t.chatId)},[k,t.id,t.chatId]);const me={handleStartSeek:le,handleSeek:oe,handleStopSeek:de},be=Object(s.yb)(t),he=Object(a.p)(()=>x&&function(e,t=0,n=!1,{handleStartSeek:r,handleSeek:c,handleStopSeek:s},i){const{waveform:o,duration:l}=e;if(!o)return;const d="dark"===i?"#494B75":"#CBCBCB",u="dark"===i?"#C0BBED":"#B0DEA6",m="dark"===i?"#868DF5":"#54a3e6",b="dark"===i?"#FFFFFF":"#53ad53",h=Math.min(l/30,1),f=Math.round(g+(v-g)*h),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:O,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 d=0;d<t;d++){var i,o,l;const t=Math.floor(d*r),u=((null!==(i=e[t-1])&&void 0!==i?i:c)+(null!==(o=e[t])&&void 0!==o?o:c)+(null!==(l=e[t+1])&&void 0!==l?l:s))/3;a[d]=u,n<u&&(n=u)}return{data:a,peak:n}}(p,f),{src:E,width:y,height:C}=function(e,t,{peak:n,fillStyle:a,progressFillStyle:r}){const c=4*e.length,s=document.createElement("canvas");s.width=2*c,s.height=46,s.style.width=c+"px",s.style.height="23px";const i=s.getContext("2d");return i.scale(2,2),e.forEach((c,s)=>{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}}(O,t,{peak:j,fillStyle:n?u:d,progressFillStyle:n?b:m});return a.a.createElement("img",{src:E,alt:"",width:y,height:C,className:"waveform",draggable:!1,onMouseDown:r,onMouseMove:c,onMouseUp:s})}(x,Y,be,me,e),[x,Y,be,me,e]),fe=Object(i.a)("Audio media-inner",T,be&&!y&&"own",y&&"bigger",M&&"audio-is-selected"),pe=["toggle-play"];te?pe.push("loading"):W?pe.push("pause"):W||pe.push("play");const Oe=W||Y>0&&Y<1,ge=Object(i.a)("content",Oe&&"with-seekline");return a.a.createElement("div",{className:fe,dir:P.isRtl?"rtl":void 0},w&&a.a.createElement("div",{className:"message-select-control"},M&&a.a.createElement("i",{className:"icon-select"})),a.a.createElement(f.a,{round:!0,ripple:!r.l,size:y?"smaller":"tiny",className:pe.join(" "),ariaLabel:W?"Pause audio":"Play audio",onClick:ie,isRtl:P.isRtl},a.a.createElement("i",{className:"icon-play"}),a.a.createElement("i",{className:"icon-pause"})),ce&&a.a.createElement("div",{className:Object(i.a)("media-loading",se,te&&"interactive")},a.a.createElement(p.a,{progress:re,transparent:!0,size:y?"m":"s",onClick:te?ie:void 0,noCross:!te})),A&&a.a.createElement(f.a,{round:!0,size:"tiny",className:"download-button",ariaLabel:Q?"Cancel download":"Download",onClick:ee},a.a.createElement("i",{className:Q?"icon-close":"icon-arrow-down"})),"searchResult"===y&&a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{className:ge},a.a.createElement("div",{className:"content-row"},a.a.createElement("p",{className:"title",dir:"auto"},Object(o.a)(function(){if(R)return n||"Voice";const{title:e,fileName:t}=A;return e||t}())),a.a.createElement("div",{className:"message-date"},C&&a.a.createElement(O.a,{className:"date",onClick:ue},Object(c.g)(P,1e3*C)))),Oe&&j(Y,K,me),!Oe&&a.a.createElement("p",{className:"duration",dir:"auto"},Y>0?Object(c.e)(J*Y)+" / ":void 0,function(){if(R)return Object(c.e)(x.duration);const{performer:e}=A;return a.a.createElement(a.a.Fragment,null,e&&Object(o.a)(e),e&&n&&a.a.createElement("span",null,"•"),n&&Object(o.a)(n))}()))),"searchResult"!==y&&A&&function(e,t,n,r,s,i,l,d){const{title:u,performer:m,duration:b,fileName:h}=t,f=n||r>0&&r<1;return a.a.createElement("div",{className:"content"},a.a.createElement("p",{className:"title",dir:"auto"},Object(o.a)(u||h)),f&&j(r,s,i),!f&&a.a.createElement("div",{className:"meta",dir:"auto"},a.a.createElement("span",{className:"performer"},Object(o.a)(m||"Unknown")),l&&a.a.createElement(a.a.Fragment,null," ","•"," ",a.a.createElement(O.a,{className:"date",onClick:d},Object(c.d)(e,1e3*l)))),a.a.createElement("p",{className:"duration",dir:"auto"},r>0?Object(c.e)(b*r)+" / ":void 0,Object(c.e)(b)))}(P,A,W,Y,K,me,C,k?ue:void 0),"searchResult"!==y&&x&&function(e,t,n){return a.a.createElement("div",{className:"content"},t,a.a.createElement("p",{className:"voice-duration",dir:"auto"},Object(c.e)(e.duration),n&&a.a.createElement("span",null,"•")))}(x,he,D))})},function(e,t,n){"use strict";var a=n(0),r=n(145),c=n(29),s=n(146),i=n(16),o=n(9),l=n(22);n(205);var d=Object(a.h)(({className:e,title:t,active:n,badgeCount:r,isBadgeActive:c,previousActiveTab:s,onClick:i,clickArg:d})=>{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(d),ref:u},a.a.createElement("span",null,Object(l.a)(t),!!r&&a.a.createElement("span",{className:Object(o.a)("badge",c&&"active")},r),a.a.createElement("i",null)))});n(206);t.a=Object(a.h)(({tabs:e,activeTab:t,big:n,onSwitchTab:o})=>{const l=Object(a.q)(null),u=Object(c.a)(t);Object(s.a)(l.current),Object(a.n)(()=>{const e=l.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 m=Object(i.a)();return a.a.createElement("div",{className:"TabList no-selection no-scrollbar "+(n?"big":""),ref:l,dir:m.isRtl?"rtl":void 0},e.map((e,n)=>a.a.createElement(d,{key:e.title,title:m(e.title),active:n===t,badgeCount:e.badgeCount,isBadgeActive:e.isBadgeActive,previousActiveTab:u,onClick:o,clickArg:n})))})},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 <Shift> 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 cant logout other sessions if less than 24 hours have passed since you logged on the current session",BOTS_TOO_MUCH:"There are too many bots in this chat/channel",BOT_GROUPS_BLOCKED:"This bot can't be added to groups",USERS_TOO_MUCH:"The maximum number of users has been exceeded",USER_CHANNELS_TOO_MUCH:"One of the users you tried to add is already in too many channels/supergroups",USER_KICKED:"This user was kicked from this supergroup/channel",USER_NOT_MUTUAL_CONTACT:"The provided user is not a mutual contact",USER_PRIVACY_RESTRICTED:"The user's privacy settings do not allow you to do this",INVITE_HASH_EMPTY:"The invite hash is empty",INVITE_HASH_EXPIRED:"The invite link has expired",INVITE_HASH_INVALID:"The invite hash is invalid",CHANNELS_TOO_MUCH:"You have joined too many channels/supergroups",USER_ALREADY_PARTICIPANT:"You already in the group",SCHEDULE_DATE_INVALID:"Invalid schedule date provided",WALLPAPER_DIMENSIONS_INVALID:"The wallpaper dimensions are invalid, please select another file"};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";var a=n(0),r=n(1),c=n(4),s=n(16);t.a=({chat:e,privateChatUser:t,handleDelete:n,folderId:i,isPinned:o,isMuted:l})=>{const d=Object(s.a)(),{toggleChatPinned:u,updateChatMutedState:m,toggleChatArchived:b,toggleChatUnread:h}=Object(r.d)();return Object(a.p)(()=>{if(!e)return;const a=t&&t.isSelf,r=e.unreadCount||e.hasUnreadMark?{title:d("MarkAsRead"),icon:"readchats",handler:()=>h({id:e.id})}:{title:d("MarkAsUnread"),icon:"unread",handler:()=>h({id:e.id})},s=o?{title:d("UnpinFromTop"),icon:"unpin",handler:()=>u({id:e.id,folderId:i})}:{title:d("PinToTop"),icon:"pin",handler:()=>u({id:e.id,folderId:i})},f=l?{title:d("ChatList.Unmute"),icon:"unmute",handler:()=>m({chatId:e.id,isMuted:!1})}:{title:d("ChatList.Mute"),icon:"mute",handler:()=>m({chatId:e.id,isMuted:!0})},p=Object(c.kb)(e)?{title:d("Unarchive"),icon:"unarchive",handler:()=>b({id:e.id})}:{title:d("Archive"),icon:"archive",handler:()=>b({id:e.id})};return[r,s,...a?[]:[f,p],{title:Object(c.ob)(e.id)?d("Delete"):d(Object(c.c)(e)?"DeleteChat":Object(c.mb)(e)?"LeaveChannel":"Group.LeaveGroup"),icon:"delete",destructive:!0,handler:n}]},[e,t,d,o,n,h,u,i,m,b,l])}},function(e,t,n){"use strict";var a=n(0),r=n(30),c=n(16),s=n(177);n(210);t.a=Object(a.h)(({message:e,outgoingStatus:t})=>{const n=Object(c.a)();return a.a.createElement("div",{className:"LastMessageMeta"},t&&a.a.createElement(s.a,{status:t}),a.a.createElement("span",{className:"time"},Object(r.g)(n,1e3*e.date)))})},function(e,t,n){"use strict";var a,r=n(0),c=n(113);n(209);!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=Object(r.h)(({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,d]=Object(a.r)("bottom"),[u,m]=Object(a.r)("");return Object(a.n)(()=>{const a=t();if(!e||!a)return;let{x:i,y:l}=e;const u={width:0,left:0,height:0,top:0},b=r(),h=n(),f=a.getBoundingClientRect(),p=b?{width:b.offsetWidth,height:b.offsetHeight}:u,O=h?h.getBoundingClientRect():u;let g;i+p.width+c<O.width+O.left?(i+=3,g="left"):i-p.width>0?(g="right",i-=3):(g="left",i=16),o(g),l+p.height<O.height+O.top?d("top"):(d("bottom"),l-p.height<O.top+s&&(l=O.top+s+p.height));const v="left"===g?Math.min(i-f.left,O.width-p.width-16):Math.max(i-f.left,p.width+16);m(`left: ${v}px; top: ${l-f.top}px;`)},[e,c,s,r,n,t]),{positionX:i,positionY:l,style:u}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var a=n(0),r=n(29),c=n(31),s=n(52);function i(e,t){const n=Object(r.a)(e,!0),i=Object(a.q)(),o=Object(c.a)(),l=null!=e,d=null!=n;return l&&i.current&&(clearTimeout(i.current),i.current=void 0),Object(s.a)(()=>{t&&!l&&d&&!i.current&&(i.current=window.setTimeout(()=>{i.current=void 0,o()},t))},[e]),i.current&&t&&!l?n:e}},function(e,t,n){"use strict";var a=n(0),r=n(181),c=n(58),s=n(161),i=n(52);t.a=(e,t,n,o,l,d=!1,u,m=!1)=>{const b=Object(a.q)(null),[h,f]=Object(a.r)(!1);let p=h;const[O,g]=Object(a.r)(0);Object(i.a)(()=>{b.current=Object(r.a)(e,(e,n)=>{switch(e){case"onPlay":f(!0);break;case"onPause":f(!1);break;case"onTimeUpdate":{const{proxy:e}=b.current,n=e.duration&&Number.isFinite(e.duration)?e.duration:t;g(e.currentTime/n);break}}o&&o[e]&&o[e](n)},u);const{proxy:n}=b.current;h||n.paused||(f(!0),p=!0),l&&l(n)},[e]);const{play:v,pause:j,setCurrentTime:E,proxy:y,destroy:C}=b.current,N=y.duration&&Number.isFinite(y.duration)?y.duration:t;Object(a.n)(()=>{N&&!Object(s.a)(y)&&g(y.currentTime/N)},[N,O,y]),Object(a.n)(()=>()=>{C(m)},[C,m]),Object(c.a)(([e,t])=>{e===d&&n===t||y.src&&y.paused||d&&n&&!h&&v(n)},[d,n,h,v,y.src,y.paused]);const T=Object(a.m)(()=>{h?j():n&&v(n)},[n,j,v,h]);return{isPlaying:p,playProgress:O,playPause:T,setCurrentTime:E,audioProxy:y,duration:N}}},function(e,t,n){"use strict";n.d(t,"b",(function(){return u})),n.d(t,"a",(function(){return m}));var a=n(6),r=n(139),c=n(161),s=n(1),i=n(4);const o=new Map;let l,d=[];function u(){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=d[d.indexOf(e)+1];if(!t)return;if(!o.has(t))return void Object(s.d)().openAudioPlayer(Object(i.Eb)(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)),d.includes(e)||d.push(e));const{audio:u,proxy:m,handlers:b}=o.get(e);return b.push(t),{play(t){l&&l!==e&&o.get(l).audio.pause(),l=e,u.src||(u.src=t,u.preload="auto",t.includes("/progressive/")&&a.j&&Object(c.b)(u)),Object(r.a)(u)},pause(){l===e&&u.pause()},setCurrentTime(t){l===e&&(u.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&&(d=d.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(39),c=n(117),s=n(9),i=n(30),o=n(60),l=n(118),d=n(22),u=n(16),m=n(124),b=n(32);n(224);t.a=Object(a.h)(({ref:e,name:t,size:n,extension:h="",timestamp:f,sender:p,thumbnailDataUri:O,previewData:g,className:v,smaller:j,isTransferring:E,isUploading:y,isSelectable:C,isSelected:N,transferProgress:T,actionIcon:w,onClick:M,onDateClick:I})=>{const S=Object(u.a)();let L=Object(a.q)(null);e&&(L=e);const{shouldRender:k,transitionClassNames:A}=Object(r.a)(E,void 0,!0),x=Object(o.a)(h),D=Object(o.e)(n),{shouldRenderThumb:R,shouldRenderFullMedia:_,transitionClassNames:P}=Object(c.a)(g,"slow"),{width:F,height:U}=Object(l.k)(j),B=Object(s.a)("File",v,j&&"smaller",M&&!y&&"interactive",N&&"file-is-selected");return a.a.createElement("div",{ref:L,className:B,dir:S.isRtl?"rtl":void 0},C&&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:y?void 0:M},O||g?a.a.createElement("div",{className:"file-preview media-inner"},R&&a.a.createElement("img",{src:O,width:F,height:U,className:"thumbnail",alt:""}),_&&a.a.createElement("img",{src:g,className:"full-media "+P,width:F,height:U,alt:""})):a.a.createElement("div",{className:"file-icon "+x},h.length<=4&&a.a.createElement("span",{className:"file-ext",dir:"auto"},h)),k&&a.a.createElement("div",{className:Object(s.a)("file-progress",x,A)},a.a.createElement(m.a,{progress:T,size:j?"s":"m",onClick:y?M:void 0})),M&&a.a.createElement("i",{className:Object(s.a)("action-icon",w||"icon-download",k&&"hidden")})),a.a.createElement("div",{className:"file-info"},a.a.createElement("div",{className:"file-title",dir:"auto"},Object(d.a)(t)),a.a.createElement("div",{className:"file-subtitle",dir:"auto"},a.a.createElement("span",null,E&&T?Math.round(100*T)+"%":D),p&&a.a.createElement("span",{className:"file-sender"},Object(d.a)(p)),!p&&f&&a.a.createElement(a.a.Fragment,null," ",a.a.createElement(b.a,{onClick:I},Object(i.d)(S,1e3*f))))),p&&f&&a.a.createElement(b.a,{onClick:I},Object(i.g)(S,1e3*f)))})},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var a=n(0),r=n(123),c=n(182);function s(e,t){const[n,s]=Object(a.r)(!1),{mediaData:i,downloadProgress:o}=Object(r.a)(e,!n);Object(a.n)(()=>{n&&i&&(Object(c.a)(i,t),s(!1))},[t,i,n]),Object(a.n)(()=>{s(!1)},[e]);const l=Object(a.m)(e=>{e.stopPropagation(),s(e=>!e)},[]);return{isDownloadStarted:n,downloadProgress:o,handleDownloadClick:l}}},function(e,t,n){"use strict";var a=n(0),r=n(2),c=n(39),s=n(9),i=n(48),o=n(127);n(231);t.a=Object(a.h)(({message:e,duration:t=3e3,containerId:n,onDismiss:l})=>{const[d,u]=Object(a.r)(!0),m=Object(a.q)(null),{transitionClassNames:b}=Object(c.a)(d),h=Object(a.m)(()=>{u(!1),setTimeout(l,150+r.c)},[l]);Object(a.n)(()=>d?Object(i.a)(h):void 0,[d,h]),Object(a.n)(()=>(m.current=window.setTimeout(h,t),()=>{m.current&&(clearTimeout(m.current),m.current=void 0)}),[t,h]);const f=Object(a.m)(()=>{m.current&&(clearTimeout(m.current),m.current=void 0)},[]),p=Object(a.m)(()=>{m.current=window.setTimeout(h,t)},[t,h]);return a.a.createElement(o.a,{className:"Notification-container",containerId:n},a.a.createElement("div",{className:Object(s.a)("Notification",b),onClick:h,onMouseEnter:f,onMouseLeave:p},a.a.createElement("div",{className:"content"},e)))})},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));function a(e,t){const{commonAncestorContainer:n}=e;let a=n,r=1;for(;a&&a.id!==t&&r<5;)a=a.parentElement,r++;return Boolean(a&&a.id===t)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));var a=n(0),r=n(2),c=n(50),s=n(66),i=n(134),o=n(3),l=n(25);let d,u,m,b;const h=/(<br>|<br\s?\/>)/g;try{b=new RegExp("(^|\\s):[-+_:\\p{L}\\p{N}]*$","gui")}catch(e){b=new RegExp("(^|\\s):[-+_:\\d\\wа-яё]*$","gi")}function f(e,t,f,p=r.z,O,g,v,j=!1){const[E,y,C]=Object(l.a)(),[N,T]=Object(a.r)(),[w,M]=Object(a.r)(),[I,S]=Object(a.r)({}),[L,k]=Object(a.r)(),[A,x]=Object(a.r)({}),[D,R]=Object(a.r)(!1),[_,P]=Object(a.r)(c.a),F=Object(a.p)(()=>N&&f.length?Object.values(Object(o.m)(N,f)):[],[N,f]);Object(a.n)(()=>{if(j)return;const e=()=>{T(m.emojis)};m?e():async function(){d||(d=n.e(1).then(n.t.bind(null,324,3)),u=(await d).default,m=Object(s.b)(u));return d}().then(e)},[j]),Object(a.n)(()=>{if(!N||j)return;const e=Object.values(N),t=Object(o.c)(e,"native"),n=g?Object(o.i)(g,e=>Object.values(Object(o.m)(t,e))):{},a=v?Object(o.i)(v,e=>Object.values(Object(o.m)(t,e))):{};S({...n,...a}),M([...Object.keys(n),...Object.keys(a)]);const r=e.reduce((e,t)=>(t.names.forEach(n=>{e[n]||(e[n]=[]),e[n].push(t)}),e),{});x(r),k(Object.keys(r))},[j,g,N,v]),Object(a.n)(()=>{if(!(e&&t&&N&&w&&w.length))return void C();const n=t.includes(":")&&function(e){const t=e.replace(h,"\n").replace(/\n$/i,"").match(b);return t?t[0].trim():void 0}(t);if(!n)return P(c.a),void C();const a=n.length>2&&n.endsWith(":"),r=n.substr(1,a?n.length-2:void 0);let s=[];if(R(a),r){if(r.length>=2){const e=w.filter(e=>e.startsWith(r)).sort();s=s.concat(Object(o.h)(Object.values(Object(o.m)(I,e))));const t=L.filter(e=>e.startsWith(r));s=s.concat(Object(o.h)(Object.values(Object(o.m)(A,t)))),s=Object(o.o)(s)}}else s=F;s.length?(a||y(),P(s.slice(0,36))):C()},[N,I,w,A,L,t,e,y,F,C,R]);const U=Object(a.m)((e,n)=>{const a=t.lastIndexOf(":",n?t.lastIndexOf(":")-1:void 0);if(-1!==a){O(`${t.substr(0,a)}${e}`);const n=document.getElementById(p);requestAnimationFrame(()=>{Object(i.a)(n,!0)})}C()},[t,p,O,C]);return Object(a.n)(()=>{E&&D&&_.length&&U(_[0].native,!0)},[_,U,E,D]),{isEmojiTooltipOpen:E,closeEmojiTooltip:C,filteredEmojis:_,insertEmoji:U}}},function(e,t,n){"use strict";var a=n(0),r=n(15),c=n(24);t.a=Object(a.h)(e=>{const{isOpen:t}=e,n=Object(c.a)(r.a.Extra,"EmojiTooltip",!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(2),s=n(7),i=n(10),o=n(134),l=n(9),d=n(3),u=n(6),m=n(56),b=n(162),h=n(25),f=n(65),p=n(186),O=n(16),g=n(22),v=n(167);const j=u.l?256:416;t.a=Object(a.h)(Object(r.h)(e=>{const{chatId:t,threadId:n}=Object(s.z)(e)||{},{messageSendKeyCombo:a}=e.settings.byKey;return{currentChatId:t,messageSendKeyCombo:a,replyingToId:t&&n?Object(s.ob)(e,t,n):void 0,noTabCapture:e.isPollModalOpen||e.payment.isPaymentModalOpen}},(e,t)=>Object(d.l)(t,["editLastMessage","replyToNextMessage"]))(({id:e,isAttachmentModalInput:t,editableInputId:n,html:r,placeholder:s,forcedPlaceholder:d,shouldSetFocus:E,shouldSuppressFocus:y,shouldSuppressTextFormatter:C,onUpdate:N,onSuppressedFocus:T,onSend:w,currentChatId:M,replyingToId:I,noTabCapture:S,messageSendKeyCombo:L,editLastMessage:k,replyToNextMessage:A})=>{const x=Object(a.q)(null),D=Object(a.q)(null),R=Object(O.a)(),_=Object(a.q)(!1),[P,F,U]=Object(h.a)(),[B,q]=Object(a.r)(),[H,$]=Object(a.r)();Object(a.n)(()=>{t&&W(!1)},[t]),Object(b.a)(([e])=>{r!==x.current.innerHTML&&(x.current.innerHTML=r),r!==D.current.innerHTML&&(D.current.innerHTML=r),void 0!==e&&e!==r&&W(!r.length)},[r]);const K=Object(a.m)(()=>{x.current.closest(".from, .to")?setTimeout(K,350):Object(o.a)(x.current)},[]),V=Object(a.m)(()=>{U(),function(){const e=window.getSelection();e&&(e.removeAllRanges?e.removeAllRanges():e.empty&&e.empty())}()},[U]);function z(){if(u.e)return;const e=window.getSelection();if(!e||!e.rangeCount||_.current)return void U();const t=e.getRangeAt(0),a=t.toString().trim();if(C||!Object(p.a)(t,n||c.z)||!a||Object(f.a)(a)||!t.START_TO_END)return void U();const r=t.getBoundingClientRect(),s=x.current.getBoundingClientRect();let i=r.left+r.width/2-s.left;i<90?i=90:i>s.width-90&&(i=s.width-90),q({x:i,y:r.top-s.top}),$(t),F()}function W(e=!1){const t=x.current,n=D.current,a=Number(t.style.height.replace("px","")),r=Math.min(n.scrollHeight,j);if(r===a)return;const c=Math.round(50*Math.log(Math.abs(r-a))),s=()=>{t.style.height=r+"px",t.style.transitionDuration=c+"ms",t.classList.toggle("overflown",n.scrollHeight>j)};e?requestAnimationFrame(s):s()}Object(a.n)(()=>{u.n||K()},[M,K,I,E]),Object(a.n)(()=>{if(S)return;const e=Object(i.a)(e=>{"Tab"===e.key&&(e.preventDefault(),requestAnimationFrame(K))},2e3,!0,!1);return Object(m.a)({onTab:e})},[K,S]),Object(a.n)(()=>{const e=x.current;function t(){e.blur()}return y&&e.addEventListener("focus",t),()=>{e.removeEventListener("focus",t)}},[y]);const Y=Object(l.a)("form-control custom-scroll",r.length>0&&"touched",y&&"focus-disabled");return a.a.createElement("div",{id:e,onClick:y?T:void 0,dir:R.isRtl?"rtl":void 0},a.a.createElement("div",{ref:x,id:n||c.z,className:Y,contentEditable:!0,dir:"auto",onClick:K,onChange:function(e){const{innerHTML:t,textContent:n}=e.currentTarget;if(N("<br>"===t?"":t),!(u.n||n&&n.length)){const e=window.getSelection();e&&(x.current.blur(),e.removeAllRanges(),Object(o.a)(x.current,!0))}},onKeyDown:function(e){if(e.metaKey&&!r.length){const t="ArrowDown"===e.key?1:"ArrowUp"===e.key?-1:void 0;if(t)return e.preventDefault(),void A({targetIndexDelta:t})}"Enter"!==e.key||e.shiftKey?"ArrowUp"!==e.key||r.length||e.metaKey?e.target.addEventListener("keyup",(function t(){z(),e.target.removeEventListener("keyup",t)})):(e.preventDefault(),k()):u.e||u.b||!("enter"===L&&!e.shiftKey||"ctrl-enter"===L&&(e.ctrlKey||e.metaKey))||(e.preventDefault(),U(),w())},onMouseDown:function(e){2===e.button?!0!==_.current&&(_.current=!0,document.addEventListener("mousedown",(function e(){setTimeout(()=>{_.current=!1},100),window.removeEventListener("mouseup",e)})),document.addEventListener("keydown",(function e(t){"Esc"!==t.key&&"Escape"!==t.key||(setTimeout(()=>{_.current=!1},100),window.removeEventListener("keydown",e))}))):e.target.addEventListener("mouseup",(function t(){z(),e.target.removeEventListener("mouseup",t)}))},onContextMenu:function(e){u.b&&(e.preventDefault(),e.stopPropagation())},onTouchCancel:function(){u.b&&z()}}),a.a.createElement("div",{ref:D,className:Object(l.a)(Y,"clone"),dir:"auto"}),!d&&a.a.createElement("span",{className:"placeholder-text",dir:"auto"},s),a.a.createElement(v.a,{isOpen:P,anchorPosition:B,selectedRange:H,onClose:V}),d&&a.a.createElement("span",{className:"forced-placeholder"},Object(g.a)(d)))}))},function(e,t,n){"use strict";var a=n(0),r=n(4),c=n(9),s=n(40),i=n(22),o=n(30),l=n(16),d=n(169),u=n(32),m=n(59);n(252);t.a=Object(a.h)(({message:e,senderTitle:t,onMessageClick:n})=>{const b=Object(l.a)();let h=Object(r.R)(e);if(!h){const t=Object(r.m)(e);if(t){const{url:n,domain:a}=t,c=Object(r.O)(b,e);h={siteName:a.replace(/^www./,""),url:n.includes("://")?n:n.includes("@")?"mailto:"+n:"http://"+n,description:c!==n?c:void 0}}}const f=Object(a.m)(()=>{n(e.id,e.chatId)},[n,e.id,e.chatId]);if(!h)return;const{siteName:p,url:O,displayUrl:g,title:v,description:j,photo:E,video:y}=h,C=!t&&Object(s.a)(j,170),N=Object(c.a)("WebLink scroll-item",!E&&!y&&"without-media");return a.a.createElement("div",{className:N,"data-initial":(p||g)[0],dir:b.isRtl?"rtl":void 0},E&&a.a.createElement(d.a,{message:e}),a.a.createElement("div",{className:"content"},a.a.createElement(u.a,{isRtl:b.isRtl,className:"site-title",onClick:f},Object(i.a)(v||p||g)),C&&a.a.createElement(u.a,{isRtl:b.isRtl,className:"site-description",onClick:f},Object(i.a)(C)),a.a.createElement(m.a,{url:O,className:"site-name",text:"",isRtl:b.isRtl},O.replace("mailto:","")||g),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:f,isRtl:b.isRtl},Object(o.g)(b,1e3*e.date))))})},function(e,t,n){},,,function(e,t,n){"use strict";var a=n(0),r=n(1),c=n(2),s=n(6),i=n(29),o=n(3),l=n(4),d=n(7),u=n(131);let m;!function(e){e[e.Move=0]="Move",e[e.Opacity=1]="Opacity",e[e.None=2]="None"}(m||(m={}));var b=n(115),h=n(20),f=n(16),p=n(8),O=n(68),g=n(22),v=n(10),j=n(9),E=n(147),y=n(175),C=n(25),N=n(110),T=n(114),w=n(137),M=n(158),I=n(176),S=n(159),L=n(108),k=n(49),A=n(160);n(213);var x=Object(a.h)(({chat:e,isPinned:t,isMuted:n})=>{const r=Boolean(e.unreadCount||e.hasUnreadMark||t),c=Object(j.a)("Badge",n&&"muted",t&&"pinned",Boolean(e.unreadCount||e.hasUnreadMark)&&"unread");function s(){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:c},Object(k.b)(e.unreadCount))):a.a.createElement("div",{className:c},Object(k.b)(e.unreadCount)):e.hasUnreadMark?a.a.createElement("div",{className:c}):t?a.a.createElement("div",{className:c},a.a.createElement("i",{className:"icon-pinned-chat"})):void 0}return a.a.createElement(A.a,{isCustom:!0,className:"Badge-transition",isOpen:r},s)});n(214);var D,R=Object(a.h)(Object(r.h)((e,{chatId:t})=>{const n=Object(d.g)(e,t);if(!n||!n.lastMessage)return{};const{senderId:a,replyToMessageId:r,isOutgoing:c}=n.lastMessage,s=a?Object(d.Jb)(e,a):void 0,i=Object(l.s)(n.lastMessage),o=i&&r?Object(d.l)(e,n.id,r):void 0,{targetUserIds:u,targetChatId:m}=i||{},b=Object(l.W)(n),{byId:h}=e.users,{chatId:f,threadId:O,type:g}=Object(d.z)(e)||{};return{chat:n,isMuted:Object(l.Hb)(n,Object(d.fb)(e),Object(d.eb)(e)),lastMessageSender:s,...c&&{lastMessageOutgoingStatus:Object(d.gb)(e,n.lastMessage)},...b&&{privateChatUser:Object(d.Jb)(e,b)},usersById:h,actionTargetUserIds:u,actionTargetChatId:m,actionTargetMessage:o,draft:Object(d.C)(e,t,p.MAIN_THREAD_ID),messageListType:g,animationLevel:e.settings.byKey.animationLevel,isSelected:t===f&&O===p.MAIN_THREAD_ID,lastSyncTime:e.lastSyncTime}},(e,t)=>Object(o.l)(t,["openChat","focusLastMessage"]))(({style:e,chatId:t,folderId:n,orderDiff:r,animationType:i,isPinned:o,chat:d,isMuted:u,usersById:b,privateChatUser:h,actionTargetUserIds:p,lastMessageSender:k,lastMessageOutgoingStatus:A,actionTargetMessage:D,actionTargetChatId:R,draft:_,messageListType:P,animationLevel:F,isSelected:U,lastSyncTime:B,openChat:q,focusLastMessage:H})=>{const $=Object(a.q)(null),[K,V,z]=Object(C.a)(),[W,Y,G]=Object(C.a)(),{lastMessage:X,typingStatus:J}=d||{},Q=X&&Object(l.gb)(X);Object(E.a)(t,Q?X.replyToMessageId:void 0,D);const Z=X&&!Object(l.N)(X)?Object(l.F)(X):void 0,ee=Object(N.a)(X?Object(l.E)(X,"micro"):void 0),te=Boolean(X&&Object(l.J)(X)),ne=Object(a.p)(()=>p?p.map(e=>b&&b[e]).filter(Boolean):void 0,[p,b]);Object(a.o)(()=>{const e=$.current;if(0!==F&&e){if(i===m.Opacity)e.style.opacity="0",Object(v.b)(()=>{e.classList.add("animate-opacity"),e.style.opacity="1"});else{if(i!==m.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+c.c)}},[F,r,i]);const ae=Object(a.m)(()=>{q({id:t,shouldReplaceHistory:!0}),U&&"thread"===P&&H()},[U,P,q,t,H]);const re=Object(y.a)({chat:d,privateChatUser:h,handleDelete:function(){Y(),V()},folderId:n,isPinned:o,isMuted:u}),ce=Object(f.a)();if(!d)return;const se=Object(j.a)("Chat chat-item-clickable",Object(l.ob)(t)?"private":"group",U&&"selected");return a.a.createElement(L.a,{ref:$,className:se,style:e,ripple:!s.l,contextActions:re,onClick:ae},a.a.createElement("div",{className:"status"},a.a.createElement(T.a,{chat:d,user:h,withOnlineStatus:!0,isSavedMessages:h&&h.isSelf,lastSyncTime:B})),a.a.createElement("div",{className:"info"},a.a.createElement("div",{className:"title"},a.a.createElement("h3",null,Object(g.a)(Object(l.k)(ce,d,h))),d.isVerified&&a.a.createElement(w.a,null),u&&a.a.createElement("i",{className:"icon-muted-chat"}),d.lastMessage&&a.a.createElement(I.a,{message:d.lastMessage,outgoingStatus:A})),a.a.createElement("div",{className:"subtitle"},function(){if(J&&X&&J.timestamp>1e3*X.date)return a.a.createElement(M.a,{typingStatus:J});if(_&&_.text.length)return a.a.createElement("p",{className:"last-message",dir:ce.isRtl?"auto":"ltr"},a.a.createElement("span",{className:"draft"},ce("Draft")),Object(g.a)(_.text));if(!X)return;if(Q){const e=d&&(Object(l.mb)(d)||X.senderId===X.chatId)?d:k;return a.a.createElement("p",{className:"last-message",dir:ce.isRtl?"auto":"ltr"},Object(g.a)(Object(O.a)(ce,X,e,ne,D,R,{asPlain:!0})))}const e=Object(l.K)(ce,t,k);return a.a.createElement("p",{className:"last-message",dir:ce.isRtl?"auto":"ltr"},e&&a.a.createElement(a.a.Fragment,null,a.a.createElement("span",{className:"sender-name"},Object(g.a)(e)),a.a.createElement("span",{className:"colon"},":")),function(e,t,n,r){if(!n)return Object(g.a)(Object(l.O)(e,t));return a.a.createElement("span",{className:"media-preview"},a.a.createElement("img",{src:n,alt:"",className:r?"round":void 0}),Object(l.Q)(t)&&a.a.createElement("i",{className:"icon-play"}),Object(g.a)(Object(l.O)(e,t,!0)))}(ce,X,ee||Z,te))}(),a.a.createElement(x,{chat:d,isPinned:o,isMuted:u}))),W&&a.a.createElement(S.a,{isOpen:K,onClose:z,onCloseAnimationEnd:G,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:c},users:{byId:s},lastSyncTime:i}=e,o="folder"!==t?D[t]:void 0,l=n?Object(d.j)(e,n):void 0;return{chatsById:r,usersById:s,lastSyncTime:i,...o?{listIds:a[o],orderedPinnedIds:c[o]}:{chatFolder:l},notifySettings:Object(d.fb)(e),notifyExceptions:Object(d.eb)(e)}},(e,t)=>Object(o.l)(t,["loadMoreChats","preloadTopChatMessages","openChat","openNextChat"]))(({folderType:e,folderId:t,noChatsText:n="Chat list is empty.",isActive:r,chatFolder:d,chatsById:f,usersById:p,listIds:O,orderedPinnedIds:g,lastSyncTime:v,notifySettings:j,notifyExceptions:E,loadMoreChats:y,preloadTopChatMessages:C,openChat:N,openNextChat:T})=>{const[w,M]=Object(a.p)(()=>"folder"===e&&d?Object(l.Gb)(f,p,d,j,E):[O,g],[e,d,f,p,j,E,O,g]),[I,S]=Object(a.p)(()=>{if(!w||"folder"===e&&!d)return[];const t=Object(l.Fb)(f,w,M,e),n=[...t.pinnedChats,...t.otherChats],a=n.map(({id:e})=>e);return[n.reduce((e,t,n)=>(e[t.id]=n,e),{}),a]},[w,M,e,d,f]),L=Object(i.a)(I),k=Object(a.p)(()=>I&&L?Object(o.i)(I,(e,t)=>e-(void 0!==L[t]?L[t]:1/0)):{},[I,L]),A=Object(a.m)(()=>{y({listType:"archived"===e?"archived":"active"})},[y,e]),[x,D]=Object(u.a)(v?A:void 0,S,void 0,c.m,"all"===e&&!c.a),_=x&&Object(l.Fb)(f,x,M,e);Object(a.n)(()=>{v&&"all"===e&&C()},[v,e,C]);const P=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?m.None:r===1/0||r===-1/0||t(a)&&c<=s||n(a)&&s<c?m.Opacity:m.Move},[n,t,s,c,e])}(k);return Object(a.n)(()=>{const e=e=>{if(r&&S){if(s.i&&(s.f&&e.metaKey||!s.f&&e.ctrlKey)&&e.code.startsWith("Digit")){const[,t]=e.code.match(/Digit(\d)/)||[];if(!t)return;const n=Number(t)-1;if(n>S.length-1)return;N({id:S[n],shouldReplaceHistory:!0})}if(e.altKey){const t="ArrowDown"===e.key?1:"ArrowUp"===e.key?-1:void 0;if(!t)return;e.preventDefault(),T({targetIndexDelta:t,orderedIds:S})}}};return document.addEventListener("keydown",e,!1),()=>{document.removeEventListener("keydown",e,!1)}}),a.a.createElement(b.a,{className:"chat-list custom-scroll",items:x,onLoadMore:D,preloadBackwards:c.m,noFastList:!0,noScrollRestore:!0},x&&x.length&&_?function(){const e=S.indexOf(x[0]),n=e+_.pinnedChats.length;return a.a.createElement("div",{className:"scroll-container",style:s.b?`height: ${S.length*c.k}px`:void 0,teactFastList:!0},_.pinnedChats.map(({id:n},r)=>a.a.createElement(R,{key:n,teactOrderKey:r,chatId:n,isPinned:!0,folderId:t,animationType:P(n),orderDiff:k[n],style:`top: ${(e+r)*c.k}px;`})),_.otherChats.map((e,r)=>a.a.createElement(R,{key:e.id,teactOrderKey:Object(l.i)(e),chatId:e.id,folderId:t,animationType:P(e.id),orderDiff:k[e.id],style:`top: ${(n+r)*c.k}px;`})))}():x&&!x.length?a.a.createElement("div",{className:"no-results"},n):a.a.createElement(h.a,{key:"loading"}))}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return p}));var a=n(0),r=n(8),c=n(2),s=n(4),i=n(53);function o(e,t){const n=t.username.toLowerCase(),a=Object(s.bb)(t),r=a&&a.toLowerCase(),c=e.toLowerCase();return n.startsWith(c)||r&&Object(i.a)(r,c)}var l=n(134),d=n(25),u=n(3),m=n(10);const b=Object(m.h)(e=>e(),500,!0),h=/(<br>|<br\s?\/>)/g,f=new RegExp("(^|\\s)@[\\w\\d_-]*$","gi");function p(e,t,n,i=c.z,m,p,O,g){const[v,j,E]=Object(d.a)(),[y,C]=Object(a.r)(""),[N,T]=Object(a.r)(),w=Object(a.p)(()=>(p||[]).map(e=>g&&g[e]).filter(Boolean),[p,g]),M=Object(a.m)((e,t)=>{(m||p)&&g?b(()=>{const n=(t?w:[]).filter(t=>!e||o(e,t)),a=(m||[]).map(({userId:e})=>g[e]).filter(t=>!(!t||t.id===O)&&(!e||o(e,t)));T(Object(u.o)(n.concat(a)))}):T(void 0)},[O,m,p,w,g]);Object(a.n)(()=>{if(!e||!t.length)return void E();const n=t.includes("@")&&function(e){const t=e.replace(h,"\n").replace(/\n$/i,"").match(f);return t?t[0].trim():void 0}(t);if(n){const e=n?n.substr(1):"";C(e),M(e,function(e){return e.startsWith("@")}(t))}else E()},[e,t,M,j,E]),Object(a.n)(()=>{N&&N.length?j():E()},[j,E,N]);const I=Object(a.m)((e,a=!1)=>{if(!e.username&&!Object(s.ab)(e))return;const c=e.username?"@"+e.username:`<a\n class="text-entity-link"\n data-entity-type="${r.ApiMessageEntityTypes.MentionName}"\n data-user-id="${e.id}"\n contenteditable="false"\n dir="auto"\n >${Object(s.ab)(e)}</a>`,o=t.lastIndexOf("@");if(-1!==o){n(`${t.substr(0,o)}${c}&nbsp;`);const e=document.getElementById(i);requestAnimationFrame(()=>{Object(l.a)(e,a)})}E()},[t,i,n,E]);return{isMentionTooltipOpen:v,mentionFilter:y,closeMentionTooltip:E,insertMention:I,mentionFilteredUsers:N}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var a=n(0),r=n(166),c=n(52),s=n(17),i=n(31);const o=new Map;function l(e){const t=Object(a.q)();let n=!1;Object(c.a)(()=>{if(n=!0,t.current=void 0,!e)return;const a=new Image;if(a.src=e,!a.width)return;const c=Object(s.f)(a);Object(r.a)(c.getContext("2d"),0,0,c.width,c.height,2,2),t.current=c.toDataURL()},[e]);const l=function(e,t=!1,n){const c=Object(a.q)(e?o.get(e):void 0),l=Object(a.q)(),d=Object(i.a)();return l.current&&t&&(clearTimeout(l.current),l.current=void 0),Object(a.n)(()=>{if(!e||c.current||t)return;const a=new Image;a.onload=()=>{const t=Object(s.f)(a);Object(r.a)(t.getContext("2d"),0,0,t.width,t.height,2,2);const n=t.toDataURL();c.current=n,d(),o.size>=1e3&&o.clear(),o.set(e,n)},n?l.current=window.setTimeout(()=>{a.src=e},n):a.src=e},[e,n,d,t]),c.current}(e||void 0,Boolean(t.current));return t.current||!n&&l||e||void 0}},,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){}])]);
//# sourceMappingURL=0.249523113dbd50d60d0c.js.map