mirror of
https://github.com/danog/telegram-tt.git
synced 2025-01-11 07:18:22 +01:00
2 lines
94 KiB
JavaScript
2 lines
94 KiB
JavaScript
|
(window.webpackJsonp=window.webpackJsonp||[]).push([[0],Array(94).concat([function(e,t,n){"use strict";var a=n(11),r=n(31),c=n(103);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(6),c=n(8),s=n(132),i=n(163),o=n(35),l=n(47),u=n(34);n(197);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:j,contextActions:E,onClick:y}=e;let N=Object(a.q)(null);t&&(N=t);const{isContextMenuOpen:T,contextMenuPosition:C,handleBeforeContextMenu:M,handleContextMenu:w,handleContextMenuClose:I,handleContextMenuHide:L}=Object(s.a)(N,!E),S=Object(a.m)(()=>N.current,[]),k=Object(a.m)(()=>N.current.closest(".custom-scroll"),[]),A=Object(a.m)(()=>N.current.querySelector(".ListItem-context-menu .bubble"),[]),{positionX:x,positionY:D,style:_}=Object(i.a)(C,S,k,A),R=Object(a.m)(e=>{!b&&y&&y(e)},[b,y]),P=Object(a.m)(e=>{g||r.k||(!E||2!==e.button&&y||M(e),0===e.button&&(y?R(e):w(e)))},[g,E,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",j&&"multiline");return a.a.createElement("div",{ref:N,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&&E?w:void 0},n&&a.a.createElement("i",{className:"icon-"+n}),j&&a.a.createElement("div",{className:"multiline-item"},h),!j&&h,!b&&!g&&f&&a.a.createElement(o.a,null)),E&&void 0!==C&&a.a.createElement(l.a,{isOpen:T,positionX:x,positionY:D,style:_,className:"ListItem-context-menu",autoClose:!0,onClose:I,onCloseAnimationEnd:L},E.map(e=>a.a.createElement(u.a,{key:e.title,icon:e.icon,destructive:e.destructive,disabled:!e.handler,onClick:e.handler},e.title))))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return s})),n.d(t,"c",(function(){return i})),n.d(t,"b",(function(){return o}));var a=n(0),r=n(9),c=n(43);function s({rootRef:e,throttleMs:t,debounceMs:n,shouldSkipFirst:s,margin:i,threshold:o,isDisabled:l},u){const d=Object(a.q)(),m=Object(a.q)(),h=Object(a.q)(),b=Object(a.q)();m.current=u;const f=Object(a.m)(()=>{h.current=!0},[]),p=Object(a.m)(()=>{h.current=!1,b.current&&(b.current(),b.current=void 0)},[]);Object(c.a)(f,p),Object(a.n)(()=>{if(!l)return()=>{d.current&&(d.current.observer.disconnect(),d.current.callbacks.clear(),d.current=void 0)}},[l]);return{observe:Object(a.m)((a,c)=>{d.current||function(){const a=new Map,c=new Map,l=()=>{const e=Array.from(c.values());e.forEach(t=>{const n=a.get(t.target);n&&n(t,e)}),m.current&&m.current(e),c.clear()},u=t?r.g:n?r.a:void 0,f=u?u(l,t||n,!s):l,p=new IntersectionObserver(e=>{e.forEach(e=>{c.set(e.target,e)}),h.current?b.current=()=>{f()}:f()},{root:e.current,rootMargin:i?i+"px":void 0,threshold:o});d.current={observer:p,callbacks:a}}();const l=d.current;return l.observer.observe(a),c&&l.callbacks.set(a,c),()=>{c&&l.callbacks.delete(a),l.observer.unobserve(a)}},[l]),freeze:f,unfreeze:p}}function i(e,t,n){Object(a.n)(()=>t?t(e.current,n):void 0,[])}function o(e,t,n){const[r,c]=Object(a.r)(!t);return i(e,t,e=>{c(e.isIntersecting),n&&n(e)}),r}},function(e,t,n){"use strict";var a=n(0),r=n(4),c=n(48),s=n(31);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(7),i=n(5),o=n(37),l=n(3),u=n(94),d=n(101),m=n(122),h=n(148);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.cd4fd6a179e38dfb7ad5.js.map
|