2021-06-12 19:37:48 +02:00
|
|
|
(window.webpackJsonp=window.webpackJsonp||[]).push([[0],Array(104).concat([function(e,t,n){"use strict";var a=n(0),r=n(7),c=n(8),s=n(144),i=n(172),o=n(24),l=n(43),d=n(52),u=n(42);n(206);t.a=e=>{const{ref:t,buttonRef:n,icon:m,className:h,style:b,children:f,disabled:p,ripple:O,narrow:g,inactive:v,focus:j,destructive:E,multiline:y,isStatic:T,contextActions:N,onClick:C}=e;let w=Object(a.q)(null);t&&(w=t);const{isContextMenuOpen:M,contextMenuPosition:L,handleBeforeContextMenu:S,handleContextMenu:I,handleContextMenuClose:A,handleContextMenuHide:k}=Object(s.a)(w,!N),x=Object(a.m)(()=>w.current,[]),D=Object(a.m)(()=>w.current.closest(".custom-scroll"),[]),R=Object(a.m)(()=>w.current.querySelector(".ListItem-context-menu .bubble"),[]),{positionX:_,positionY:F,style:P}=Object(i.a)(L,x,D,R),U=Object(a.m)(e=>{!p&&C&&C(e)},[p,C]),B=Object(a.m)(e=>{v||r.l||(!N||2!==e.button&&C||S(e),0===e.button&&(C?U(e):I(e)))},[v,N,C,S,I,U]),q=Object(o.a)(),H=Object(c.a)("ListItem",h,!T&&"no-selection",O&&"has-ripple",g&&"narrow",p&&"disabled",v&&"inactive",L&&"has-menu-open",j&&"focus",E&&"destructive",y&&"multiline",T&&"is-static");return a.a.createElement("div",{ref:w,className:H,dir:q.isRtl?"rtl":void 0,style:b},a.a.createElement("div",{className:"ListItem-button",role:"button",ref:n,tabIndex:0,onClick:!v&&r.l?U:void 0,onMouseDown:B,onContextMenu:!v&&N?I:void 0},m&&a.a.createElement("i",{className:"icon-"+m}),y&&a.a.createElement("div",{className:"multiline-item"},f),!y&&f,!p&&!v&&O&&a.a.createElement(l.a,null)),N&&void 0!==L&&a.a.createElement(d.a,{isOpen:M,positionX:_,positionY:F,style:P,className:"ListItem-context-menu",autoClose:!0,onClose:A,onCloseAnimationEnd:k},N.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(48);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)(),h=Object(a.q)(),b=Object(a.q)();m.current=d;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()=>{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.g: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)}),h.current?b.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(5),c=n(53),s=n(25);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(2),c=n(19),s=n(6),i=n(4),o=n(22),l=n(3),d=n(24),u=n(110),m=n(132),h=n(155);t.a=Object(a.h)(Object(r.h)((e,{userId:t,forceShowSelf:n})=>{const{lastSyncTime:a}=e,r=Object(s.Fb)(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,noRtl:p,user:O,isSavedMessages:g,areMessagesLoaded:v,lastSyncTime:j,loadFullUser:E,openMediaView
|