mirror of
https://github.com/danog/telegram-tt.git
synced 2024-11-27 12:55:11 +01:00
2 lines
14 KiB
JavaScript
2 lines
14 KiB
JavaScript
"use strict";(self.webpackChunktelegram_t=self.webpackChunktelegram_t||[]).push([[830],{7799:(e,t,n)=>{n.d(t,{Z:()=>u});var o=n(4050),r=n(9118),c=n(6752),s=n(8674),a=n(5332);let l,i;async function d(){return l||(l=n.e(941).then(n.bind(n,7941)),i=(await l).default),l}setTimeout(d,3e3);const u=(0,o.X$)((e=>{let{className:t,id:n,animationData:l,play:u,playSegment:m,speed:p,noLoop:f,size:g,quality:h,isLowPriority:v,color:Z,forceOnHeavyAnimation:w,onLoad:b,onEnded:y}=e;const[C,E]=(0,o.eJ)(),x=(0,o.sO)(null),k=(0,o.sO)(!1),P=(0,o.sO)(!1),I=(0,o.sO)(!0),T=(0,o.sO)();T.current=u;const A=(0,o.sO)();A.current=m,(0,o.d4)((()=>{if(C||!l)return;const e=()=>{if(!x.current)return;const e=new i(n,x.current,l,{noLoop:f,size:g,quality:h,isLowPriority:v},b,Z,y);p&&e.setSpeed(p),E(e)};i?e():d().then((()=>{(0,r.T2)((()=>{x.current&&e()}))}))}),[Z,C,l,n,v,f,b,h,g,p,y]),(0,o.d4)((()=>{C&&C.setColor(Z)}),[Z,C]),(0,o.d4)((()=>()=>{C&&C.destroy()}),[C]);const N=(0,o.I4)((function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];C&&(T.current||A.current)&&(A.current?C.playSegment(A.current):e?C.goToAndPlay(0):C.play())}),[C]),S=(0,o.I4)((()=>{C&&C.pause()}),[C]),L=(0,o.I4)((()=>{P.current=!0,C&&(k.current||(k.current=C.isPlaying()),S())}),[C,S]),O=(0,o.I4)((()=>{k.current&&N(),k.current=!1,P.current=!1}),[N]),B=(0,o.I4)((()=>{(0,r.T2)(O)}),[O]);(0,o.d4)((()=>{C&&(u||m?P.current?k.current=!0:N(f):P.current?k.current=!1:S())}),[C,u,m,f,N,S]),(0,o.d4)((()=>{C&&(I.current?I.current=!1:l&&(C.changeData(l),N()))}),[N,C,l]),(0,s.ZP)(L,O,w),(0,a.Z)(L,B);const F=(0,c.Z)("AnimatedSticker",t),R=g?`width: ${g}px; height: ${g}px;`:void 0;return o.ZP.createElement("div",{ref:x,className:F,style:R})}))},172:(e,t,n)=>{n.d(t,{Z:()=>p});var o=n(4050),r=n(6137),c=n(3716),s=n(8415),a=n(2155),l=n(6752),i=n(2340),d=n(6202),u=n(1212),m=n(9107);const p=(0,o.X$)((e=>{let{className:t,size:n="large",chat:p,user:f,photo:g,userStatus:h,text:v,isSavedMessages:Z,lastSyncTime:w,onClick:b}=e;const y=f&&(0,s.NB)(f),C=f&&(0,s.pK)(f.id);let E;Z||y||(f?E=(0,s.RT)(f):p?E=(0,s.RT)(p):g&&(E=`photo${g.id}?size=m`));const x=(0,d.Z)(E,!1,r.IU.BlobUrl,w),k=Boolean(x),{transitionClassNames:P}=(0,u.Z)(k,void 0,k,"slow"),I=(0,m.Z)();let T="";if(Z)T=o.ZP.createElement("i",{className:"icon-avatar-saved-messages"});else if(y)T=o.ZP.createElement("i",{className:"icon-avatar-deleted-account"});else if(C)T=o.ZP.createElement("i",{className:"icon-reply-filled"});else if(x)T=o.ZP.createElement("img",{src:x,className:(0,l.Z)("avatar-media",P),alt:"",decoding:"async"});else if(f){const e=(0,s.Js)(f);T=e?(0,a.Xv)(e,2):void 0}else if(p){const e=(0,s.U)(I,p);T=e&&(0,a.Xv)(e,(0,s.YC)(p.id)?2:1)}else v&&(T=(0,a.Xv)(v,2));const A=!Z&&f&&h&&(0,s.kM)(f,h),N=(0,l.Z)(`Avatar size-${n}`,t,`color-bg-${(0,s.Rs)(f||p)}`,Z&&"saved-messages",y&&"deleted-account",C&&"replies-bot-account",A&&"online",b&&"interactive",!Z&&!x&&"no-photo"),S=Boolean(Z||x),L=(0,o.I4)((e=>{b&&b(e,S)}),[b,S]),O=(f||p)&&(f||p).id;return o.ZP.createElement("div",{className:N,onClick:L,"data-test-sender-id":c.Cg?O:void 0},"string"==typeof T?(0,i.Z)(T,["jumbo"===n?"hq_emoji":"emoji"]):T)}))},7324:(e,t,n)=>{n.d(t,{x:()=>c,Z:()=>s});var o=n(6137),r=n(647);const c={MonkeyIdle:n(8760),MonkeyTracking:n(6917),MonkeyClose:n(6257),MonkeyPeek:n(7785),FoldersAll:n(9356),FoldersNew:n(5485),DiscussionGroups:n(6978),CameraFlip:n(5665),HandFilled:n(2456),HandOutline:n(5667),Speaker:n(8763),VoiceAllowTalk:n(401),VoiceMini:n(5106),VoiceMuted:n(487),VoiceOutlined:n(5740),Peach:n(3677),Eggplant:n(5435),Cumshot:n(1879),JoinRequest:n(5095),Invite:n(7879)};function s(e){const t=c[e].replace(window.location.origin,"");return r.he(`file${t}`,o.IU.Lottie)}},7551:(e,t,n)=>{n.d(t,{Z:()=>l});var o=n(4050),r=n(9107),c=n(2313),s=n(3103),a=n(231);const l=(0,o.X$)((e=>{let{isOpen:t,onClose:n,onCloseAnimationEnd:l,title:i,header:d,text:u,textParts:m,confirmLabel:p="Confirm",confirmHandler:f,confirmIsDestructive:g,isButtonsInOneRow:h,children:v}=e;const Z=(0,r.Z)(),w=(0,o.sO)(null),b=(0,o.I4)((e=>{-1===e&&f()}),[f]),y=(0,c.Z)(w,t,b,".Button");return o.ZP.createElement(s.Z,{className:"confirm",title:i,header:d,isOpen:t,onClose:n,onCloseAnimationEnd:l},u&&u.split("\\n").map((e=>o.ZP.createElement("p",null,e))),m||v,o.ZP.createElement("div",{className:h?"dialog-buttons mt-2":"",ref:w,onKeyDown:y},o.ZP.createElement(a.Z,{className:"confirm-dialog-button",isText:!0,onClick:f,color:g?"danger":"primary"},p),o.ZP.createElement(a.Z,{className:"confirm-dialog-button",isText:!0,onClick:n},Z("Cancel"))))}))},1273:(e,t,n)=>{n.d(t,{Z:()=>u});var o=n(1713),r=n(4050),c=n(9118),s=n(7675),a=n(7361);const l=".ListItem",i=20,d=800,u=e=>{let{ref:t,className:n,onLoadMore:u,onScroll:m,onKeyDown:p,items:f,itemSelector:g=l,preloadBackwards:h=i,sensitiveArea:v=d,withAbsolutePositioning:Z,maxHeight:w,noScrollRestore:b=!1,noScrollRestoreOnTop:y=!1,noFastList:C,cacheBuster:E,children:x}=e,k=(0,r.sO)(null);t&&(k=t);const P=(0,r.sO)({}),[I,T]=(0,r.Ye)((()=>u?[(0,c.Ds)((function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];u({direction:o.Uq.Backwards,noScroll:e})}),1e3,!0,!1),(0,c.Ds)((()=>{u({direction:o.Uq.Forwards})}),1e3,!0,!1)]:[]),[u,f]);(0,r.d4)((()=>{if(!I)return;if(h>0&&(!f||f.length<h))return void I(!0);const{scrollHeight:e,clientHeight:t}=k.current;t&&e<=t&&I()}),[f,I,h]),(0,r.bt)((()=>{const e=k.current,t=P.current;let n;if(t.listItemElements=e.querySelectorAll(g),t.currentAnchor&&Array.from(t.listItemElements).includes(t.currentAnchor)){const{scrollTop:o}=e;n=o+(t.currentAnchor.getBoundingClientRect().top-t.currentAnchorTop)}else{const e=t.listItemElements[0];e&&(t.currentAnchor=e,t.currentAnchorTop=e.getBoundingClientRect().top)}Z||b||y&&0===e.scrollTop||((0,s.Z)(e,n),t.isScrollTopJustUpdated=!0)}),[f,g,b,y,E,Z]);const A=(0,r.I4)((e=>{if(T&&I){const{isScrollTopJustUpdated:e,currentAnchor:t,currentAnchorTop:n}=P.current,o=P.current.listItemElements;if(e)return void(P.current.isScrollTopJustUpdated=!1);const r=o.length,c=k.current,{scrollTop:s,scrollHeight:a,offsetHeight:l}=c,i=s<=(r?o[0].offsetTop:0)+v,d=(r?o[r-1].offsetTop+o[r-1].offsetHeight:a)-(s+l)<=v;let u=!1;if(i){const e=o[0];if(e){const o=e.getBoundingClientRect().top,r=null!=t&&t.offsetParent&&t!==e?t.getBoundingClientRect().top:o;t&&void 0!==n&&r>n&&(P.current.currentAnchor=e,P.current.currentAnchorTop=o,u=!0,T())}}if(d){const e=o[r-1];if(e){const o=e.getBoundingClientRect().top,r=null!=t&&t.offsetParent&&t!==e?t.getBoundingClientRect().top:o;t&&void 0!==n&&r<n&&(P.current.currentAnchor=e,P.current.currentAnchorTop=o,u=!0,I())}}if(!u)if(null!=t&&t.offsetParent)P.current.currentAnchorTop=t.getBoundingClientRect().top;else{const e=o[0];e&&(P.current.currentAnchor=e,P.current.currentAnchorTop=e.getBoundingClientRect().top)}}m&&m(e)}),[I,T,m,v]);return r.ZP.createElement("div",{ref:k,className:n,onScroll:A,teactFastList:!C&&!Z,onKeyDown:p},Z&&null!=f&&f.length?r.ZP.createElement("div",{teactFastList:!C,style:`position: relative;${a.wZ?` height: ${w}px;`:void 0}`},x):x)}},3103:(e,t,n)=>{n.d(t,{Z:()=>p});var o=n(4050),r=n(517),c=n(6752),s=n(8674),a=n(1212),l=n(274),i=n(9107),d=n(6590),u=n(231),m=n(2898);const p=e=>{let{dialogRef:t,title:n,className:p,isOpen:f,header:g,hasCloseButton:h,noBackdrop:v,children:Z,onClose:w,onCloseAnimationEnd:b,onEnter:y,shouldSkipHistoryAnimations:C}=e;const{shouldRender:E,transitionClassNames:x}=(0,a.Z)(f,b,C,void 0,C),k=(0,o.sO)(null);(0,o.d4)((()=>f?(0,r.Z)({onEsc:w,onEnter:y}):void 0),[f,w,y]),(0,o.d4)((()=>f&&k.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 o=n.findIndex((e=>e.isSameNode(document.activeElement)));let r=0;o>=0&&(r=t.shiftKey?o>0?o-1:n.length-1:o<n.length-1?o+1:0),n[r].focus()}return document.addEventListener("keydown",t,!1),()=>{document.removeEventListener("keydown",t,!1)}}(k.current):void 0),[f]);const{forceClose:P}=(0,d.ZP)(f,w);(0,o.d4)((()=>()=>{f&&P()}),[]),(0,l.Z)((e=>{let[t]=e;return document.body.classList.toggle("has-open-dialog",f),(f||!f&&void 0!==t)&&(0,s.YW)(200),()=>{document.body.classList.remove("has-open-dialog")}}),[f]);const I=(0,i.Z)();if(!E)return;const T=(0,c.Z)("Modal",p,x,v&&"transparent-backdrop");return o.ZP.createElement(m.Z,null,o.ZP.createElement("div",{ref:k,className:T,tabIndex:-1,role:"dialog"},o.ZP.createElement("div",{className:"modal-container"},o.ZP.createElement("div",{className:"modal-backdrop",onClick:w}),o.ZP.createElement("div",{className:"modal-dialog",ref:t},g||(n?o.ZP.createElement("div",{className:"modal-header"},h&&o.ZP.createElement(u.Z,{round:!0,color:"translucent",size:"smaller",ariaLabel:I("Close"),onClick:w},o.ZP.createElement("i",{className:"icon-close"})),o.ZP.createElement("div",{className:"modal-title"},n)):void 0),o.ZP.createElement("div",{className:"modal-content custom-scroll"},Z)))))}},2898:(e,t,n)=>{n.d(t,{Z:()=>c});var o=n(4050),r=n(2916);const c=e=>{let{containerId:t,className:n,children:c}=e;const s=(0,o.sO)();return s.current||(s.current=document.createElement("div")),(0,o.bt)((()=>{const e=document.querySelector(t||"#portals");if(!e)return;const o=s.current;return n&&o.classList.add(n),e.appendChild(o),()=>{r.Z.render(void 0,o),e.removeChild(o)}}),[n,t]),r.Z.render(c,s.current)}},5332:(e,t,n)=>{n.d(t,{Z:()=>r});var o=n(4050);function r(e,t){(0,o.d4)((()=>(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])}},8360:(e,t,n)=>{n.d(t,{Z:()=>r});var o=n(7204);function r(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const r=(0,o.Z)(e,t);return n||null!=e?e:r}},7407:(e,t,n)=>{n.d(t,{Z:()=>i});var o=n(4050),r=n(1713),c=n(782),s=n(5326),a=n(7204);function l(e,t,n,o){const{length:c}=e,s=o?e.indexOf(o):0,a=t===r.Uq.Forwards?s:s+1||c,l=Math.max(0,a-n),i=a+n-1,d=e.slice(Math.max(0,l),i+1);let u,m;switch(t){case r.Uq.Forwards:u=a>0,m=l>=0;break;case r.Uq.Backwards:u=a<c,m=i<=c-1}return{newViewportIds:d,areSomeLocal:u,areAllLocal:m}}const i=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:30;const d=(0,o.sO)(),u=(0,o.sO)((()=>{if(!t||d.current)return;const{newViewportIds:e}=l(t,r.Uq.Forwards,i,t[0]);return e})()),m=(0,s.Z)();n&&(d.current={});const p=(0,a.Z)(t),f=(0,a.Z)(n);if(t&&!n&&(t!==p||n!==f)){const{offsetId:e=t[0],direction:n=r.Uq.Forwards}=d.current||{},{newViewportIds:o}=l(t,n,i,e);u.current&&(0,c.et)(u.current,o)||(u.current=o)}const g=(0,o.I4)((n=>{let{direction:o,noScroll:s}=n;const a=u.current,p=a?o===r.Uq.Backwards?a[a.length-1]:a[0]:void 0;if(!t)return void(e&&e({offsetId:p}));s||(d.current={...d.current,direction:o,offsetId:p});const{newViewportIds:f,areSomeLocal:g,areAllLocal:h}=l(t,o,i,p);!g||a&&(0,c.et)(a,f)||(u.current=f,m()),!h&&e&&e({offsetId:p})}),[t,i,e,m]);return n?[t]:[u.current,g]}},6202:(e,t,n)=>{n.d(t,{Z:()=>a});var o=n(4050),r=n(6137),c=n(647),s=n(5326);const a=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:r.IU.BlobUrl,a=arguments.length>3?arguments[3]:void 0,l=arguments.length>4?arguments[4]:void 0;const i=e?c.UV(e):void 0,d=(0,s.Z)();return(0,o.d4)((()=>{if(!t&&e&&!i){const t=Date.now();c.he(e,n).then((()=>{const e=Date.now()-t;!l||e>=l?d():setTimeout(d,l-e)}))}}),[t,e,i,n,a,d,l]),i}},4319:(e,t,n)=>{n.d(t,{yl:()=>r,TE:()=>s,VP:()=>a});var o=n(3716);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)},a=e=>{if(!e)return;const t=document.createElement("canvas"),n=t.getContext("2d"),o=new Image;o.onload=e=>{if(n&&e.currentTarget){const o=e.currentTarget;t.width=o.width,t.height=o.height,n.drawImage(o,0,0,o.width,o.height),t.toBlob(l,"image/png",1)}},o.src=e};async function l(e){if(e&&r)try{var t,n;await(null===(t=(n=navigator.clipboard).write)||void 0===t?void 0:t.call(n,[new ClipboardItem({[e.type]:e})]))}catch(e){o.eM&&console.error(e)}}},2972:(e,t,n)=>{function o(e){e.offsetWidth}n.d(t,{Z:()=>o})},7675:(e,t,n)=>{n.d(t,{z:()=>c,Z:()=>s});var o=n(7361),r=n(2972);function c(e){e.style.display="none",(0,r.Z)(e),e.style.display=""}const s=(e,t)=>{o.cj&&(e.style.overflow="hidden"),void 0!==t&&(e.scrollTop=t),o.cj&&(e.style.overflow="")}},4753:(e,t,n)=>{n.d(t,{Z:()=>r});var o=n(3716);const r=e=>{e.play().catch((t=>{o.eM&&console.warn(t,e)}))}},1879:(e,t,n)=>{e.exports=n.p+"Cumshot.7a17984a6b80787dab34..tgs"},5435:(e,t,n)=>{e.exports=n.p+"Eggplant.7693d877087b802d04be..tgs"},3677:(e,t,n)=>{e.exports=n.p+"Peach.a289b2c54c563f11208f..tgs"},5665:(e,t,n)=>{e.exports=n.p+"CameraFlip.1a9fe44cf01fcb22347d..tgs"},2456:(e,t,n)=>{e.exports=n.p+"HandFilled.f87939d160f1dc288586..tgs"},5667:(e,t,n)=>{e.exports=n.p+"HandOutline.f9831751ba60df30c484..tgs"},8763:(e,t,n)=>{e.exports=n.p+"Speaker.04bb3743412b41ff83c5..tgs"},401:(e,t,n)=>{e.exports=n.p+"VoiceAllowTalk.a9cc7c39ec438973ddc9..tgs"},5106:(e,t,n)=>{e.exports=n.p+"VoiceMini.bf00ffdf69625c579569..tgs"},487:(e,t,n)=>{e.exports=n.p+"VoiceMuted.a4b4ec6bfd7c6c5fb275..tgs"},5740:(e,t,n)=>{e.exports=n.p+"VoiceOutlined.91b394ab3562cdfad6bc..tgs"},7879:(e,t,n)=>{e.exports=n.p+"Invite.4502ec3aa4249d6e6723..tgs"},5095:(e,t,n)=>{e.exports=n.p+"Requests.af9f19772695a8898810..tgs"},6257:(e,t,n)=>{e.exports=n.p+"TwoFactorSetupMonkeyClose.604c4c833d322b7e6c3e..tgs"},8760:(e,t,n)=>{e.exports=n.p+"TwoFactorSetupMonkeyIdle.dea4a492c144df84ddab..tgs"},7785:(e,t,n)=>{e.exports=n.p+"TwoFactorSetupMonkeyPeek.1905436b042520363d7e..tgs"},6917:(e,t,n)=>{e.exports=n.p+"TwoFactorSetupMonkeyTracking.eb5a7a6f166fb7589c12..tgs"},6978:(e,t,n)=>{e.exports=n.p+"DiscussionGroupsDucks.9ea453d1be9d1b0ee77a..tgs"},9356:(e,t,n)=>{e.exports=n.p+"FoldersAll.3f9f9e243d19f0fbf9aa..tgs"},5485:(e,t,n)=>{e.exports=n.p+"FoldersNew.9a40d71c0c8be70f5bd1..tgs"}}]);
|
|
//# sourceMappingURL=830.c399d95513279da988a1.js.map
|