telegram-tt/dist/0.c7f4f28275e328788ccd.js

2 lines
91 KiB
JavaScript
Raw Normal View History

2021-05-11 01:58:23 +02:00
(window.webpackJsonp=window.webpackJsonp||[]).push([[0],Array(98).concat([function(e,t,n){"use strict";var a=n(11),r=n(34),c=n(107);t.a=()=>{const e=Object(r.a)();return Object(c.a)(()=>a.a(e),[e]),a.b}},function(e,t,n){"use strict";var a=n(0),r=n(8),c=n(7),s=n(138),i=n(165),o=n(38),l=n(49),u=n(37);n(198);t.a=e=>{const{ref:t,icon:n,className:d,style:m,children:h,disabled:b,ripple:f,narrow:p,inactive:g,focus:O,destructive:v,multiline:E,contextActions:j,onClick:y}=e;let T=Object(a.q)(null);t&&(T=t);const{isContextMenuOpen:N,contextMenuPosition:C,handleBeforeContextMenu:M,handleContextMenu:w,handleContextMenuClose:S,handleContextMenuHide:I}=Object(s.a)(T,!j),L=Object(a.m)(()=>T.current,[]),A=Object(a.m)(()=>T.current.closest(".custom-scroll"),[]),k=Object(a.m)(()=>T.current.querySelector(".ListItem-context-menu .bubble"),[]),{positionX:x,positionY:D,style:_}=Object(i.a)(C,L,A,k),R=Object(a.m)(e=>{!b&&y&&y(e)},[b,y]),P=Object(a.m)(e=>{g||r.k||(!j||2!==e.button&&y||M(e),0===e.button&&(y?R(e):w(e)))},[g,j,y,M,w,R]),F=Object(c.a)("ListItem no-selection",d,f&&"has-ripple",p&&"narrow",b&&"disabled",g&&"inactive",C&&"has-menu-open",O&&"focus",v&&"destructive",E&&"multiline");return a.a.createElement("div",{ref:T,className:F,style:m},a.a.createElement("div",{className:"ListItem-button",role:"button",tabIndex:0,onClick:!g&&r.k?R:void 0,onMouseDown:P,onContextMenu:!g&&j?w:void 0},n&&a.a.createElement("i",{className:"icon-"+n}),E&&a.a.createElement("div",{className:"multiline-item"},h),!E&&h,!b&&!g&&f&&a.a.createElement(o.a,null)),j&&void 0!==C&&a.a.createElement(l.a,{isOpen:N,positionX:x,positionY:D,style:_,className:"ListItem-context-menu",autoClose:!0,onClose:S,onCloseAnimationEnd:I},j.map(e=>a.a.createElement(u.a,{key:e.title,icon:e.icon,destructive:e.destructive,disabled:!e.handler,onClick:e.handler},e.title))))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return s})),n.d(t,"c",(function(){return i})),n.d(t,"b",(function(){return o}));var a=n(0),r=n(9),c=n(45);function s({rootRef:e,throttleMs:t,debounceMs:n,shouldSkipFirst:s,margin:i,threshold:o,isDisabled:l},u){const d=Object(a.q)(),m=Object(a.q)(),h=Object(a.q)(),b=Object(a.q)();m.current=u;const f=Object(a.m)(()=>{h.current=!0},[]),p=Object(a.m)(()=>{h.current=!1,b.current&&(b.current(),b.current=void 0)},[]);Object(c.a)(f,p),Object(a.n)(()=>{if(!l)return()=>{d.current&&(d.current.observer.disconnect(),d.current.callbacks.clear(),d.current=void 0)}},[l]);return{observe:Object(a.m)((a,c)=>{d.current||function(){const a=new Map,c=new Map,l=()=>{const e=Array.from(c.values());e.forEach(t=>{const n=a.get(t.target);n&&n(t,e)}),m.current&&m.current(e),c.clear()},u=t?r.g:n?r.a:void 0,f=u?u(l,t||n,!s):l,p=new IntersectionObserver(e=>{e.forEach(e=>{c.set(e.target,e)}),h.current?b.current=()=>{f()}:f()},{root:e.current,rootMargin:i?i+"px":void 0,threshold:o});d.current={observer:p,callbacks:a}}();const l=d.current;return l.observer.observe(a),c&&l.callbacks.set(a,c),()=>{c&&l.callbacks.delete(a),l.observer.unobserve(a)}},[l]),freeze:f,unfreeze:p}}function i(e,t,n){Object(a.n)(()=>t?t(e.current,n):void 0,[])}function o(e,t,n){const[r,c]=Object(a.r)(!t);return i(e,t,e=>{c(e.isIntersecting),n&&n(e)}),r}},function(e,t,n){"use strict";var a=n(0),r=n(5),c=n(50),s=n(34);t.a=(e,t=!1,n=r.ApiMediaFormat.BlobUrl,i,o)=>{const l=e?c.c(e):void 0,u=Object(s.a)();return Object(a.n)(()=>{if(!t&&e&&!l){const t=Date.now();c.b(e,n).then(()=>{const e=Date.now()-t;!o||e>=o?u():setTimeout(u,o-e)})}},[t,e,l,n,i,u,o]),l}},function(e,t,n){"use strict";var a=n(0),r=n(2),c=n(19),s=n(6),i=n(4),o=n(22),l=n(3),u=n(98),d=n(105),m=n(127),h=n(150);t.a=Object(a.h)(Object(r.h)((e,{userId:t,forceShowSelf:n})=>{const{lastSyncTime:a}=e,r=Object(s.Db)(e,t);return{lastSyncTime:a,user:r,isSavedMessages:!n&&r&&r.isSelf,areMessagesLoaded:Boolean(Object(s.m)(e,t))}},(e,t)=>Object(l.l)(t,["loadFullUser","openMediaViewer"]))(({typingStatus:e,avatarSize:t="medium",status:n,withMediaViewer:r,withUsername:s,withFullInfo:l,withUpdatingStatus:b,noStatusOrTyping:f,user:p,isSavedMessages:g,areMessagesLoaded:O,lastSyncTime:v,loadFu
//# sourceMappingURL=0.c7f4f28275e328788ccd.js.map