telegram-tt/dist/0.8f53410f7d80b6334fb0.js

2 lines
107 KiB
JavaScript
Raw Normal View History

2021-08-05 16:36:56 +02:00
(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),i=n(9),s=n(150),o=n(182),l=n(25),d=n(16),u=n(44),m=n(55),b=n(43);n(216);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:I}=e;let M=Object(a.q)(null);t&&(M=t);const[k,S,L]=Object(l.a)(),{isContextMenuOpen:A,contextMenuPosition:x,handleBeforeContextMenu:D,handleContextMenu:R,handleContextMenuClose:F,handleContextMenuHide:_}=Object(s.a)(M,!w),P=Object(a.m)(()=>M.current,[]),U=Object(a.m)(()=>M.current.closest(".custom-scroll"),[]),B=Object(a.m)(()=>M.current.querySelector(".ListItem-context-menu .bubble"),[]),{positionX:q,positionY:H,style:$}=Object(o.a)(x,P,U,B),K=Object(a.m)(e=>{!g&&I&&(I(e),r.n&&!v&&(S(),Object(c.b)(L)))},[g,S,I,v,L]),z=Object(a.m)(e=>{E||r.n||(!w||2!==e.button&&I||D(e),0===e.button&&(I?K(e):R(e)))},[E,w,I,D,R,K]),V=Object(d.a)(),Y=Object(i.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:M,className:Y,dir:V.isRtl?"rtl":void 0,style:p},a.a.createElement("div",{className:Object(i.a)("ListItem-button",k&&"active"),role:"button",ref:n,tabIndex:0,onClick:!E&&r.n?K:void 0,onMouseDown:z,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:F,onCloseAnimationEnd:_},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 i})),n.d(t,"c",(function(){return s})),n.d(t,"b",(function(){return o}));var a=n(0),r=n(10),c=n(37);function i({rootRef:e,throttleMs:t,debounceMs:n,shouldSkipFirst:i,margin:s,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.c)(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,!i):l,p=new IntersectionObserver(e=>{e.forEach(e=>{c.set(e.target,e)}),b.current?h.current=()=>{f()}:f()},{root:e.current,rootMargin:s?s+"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 s(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 s(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),i=n(31);t.a=(e,t=!1,n=r.ApiMediaFormat.BlobUrl,s,o)=>{const l=e?c.c(e):void 0,d=Object(i.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,s,d,o]),l}},function(e,t,n){"use strict";var a=n(0),r=n(1),c=n(13),i=n(7),s=n(4),o=n(22),l=n(3),d=n(16),u=n(114),m=n(138),b=n(161);t.a=Object(a.h)(Object(r.h)((e,{userId:t,forceShowSelf:n})=>{const{lastSyncTime:a,serverTimeOffset:r}=e,c=Object(i.Jb)(e,t);return{lastSyncTime:a,user:c,isSavedMessages:!n&&c&&c.isSelf,areMessagesLoaded:Boolean(Object(i.n)(e,t)),serverTimeOffset:r}},(e,t)=>Object(l.l)(t,["loadFullUser","openMediaViewer"]))(({typingStatus:e,avatarSize:t="medium",status:n,withMediaViewer:r,wi
//# sourceMappingURL=0.8f53410f7d80b6334fb0.js.map