mirror of
https://github.com/danog/telegram-tt.git
synced 2024-12-15 18:57:12 +01:00
2 lines
27 KiB
JavaScript
2 lines
27 KiB
JavaScript
|
(window.webpackJsonp=window.webpackJsonp||[]).push([[5],{100:function(e,t,n){"use strict";var r=n(18),a=n(35),o=n(109);t.a=()=>{const e=Object(a.a)();return Object(o.a)(()=>r.a(e),[e]),r.b}},105:function(e,t,n){"use strict";var r=n(0),a=n(51);var o=n(8),c=n(45),i=n(32),l=n(54),u=n(100),s=n(29),f=n(118);n(146);t.a=e=>{const{title:t,className:n,isOpen:d,header:m,hasCloseButton:h,noBackdrop:b,children:p,onClose:v,onCloseAnimationEnd:g,onEnter:E}=e,{shouldRender:j,transitionClassNames:O}=Object(i.a)(d,g),y=Object(r.q)(null);Object(r.n)(()=>d?Object(a.a)({onEsc:v,onEnter:E}):void 0,[d,v,E]),Object(r.n)(()=>d&&y.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 r=n.findIndex(e=>e.isSameNode(document.activeElement));let a=0;r>=0&&(a=t.shiftKey?r>0?r-1:n.length-1:r<n.length-1?r+1:0),n[a].focus()}return document.addEventListener("keydown",t,!1),()=>{document.removeEventListener("keydown",t,!1)}}(y.current):void 0,[d]),Object(l.a)(([e])=>(document.body.classList.toggle("has-open-dialog",d),(d||!d&&void 0!==e)&&Object(c.b)(200),()=>{document.body.classList.remove("has-open-dialog")}),[d]);const w=Object(u.a)();if(!j)return;const N=Object(o.a)("Modal",n,O,b&&"transparent-backdrop");return r.a.createElement(f.a,null,r.a.createElement("div",{ref:y,className:N,tabIndex:-1,role:"dialog"},r.a.createElement("div",{className:"modal-container"},r.a.createElement("div",{className:"modal-backdrop",onClick:v}),r.a.createElement("div",{className:"modal-dialog"},m||(t?r.a.createElement("div",{className:"modal-header"},h&&r.a.createElement(s.a,{round:!0,color:"translucent",size:"smaller",ariaLabel:w("Close"),onClick:v},r.a.createElement("i",{className:"icon-close"})),r.a.createElement("div",{className:"modal-title"},t)):void 0),r.a.createElement("div",{className:"modal-content custom-scroll"},p)))))}},109:function(e,t,n){"use strict";var r=n(41);t.a=(e,t)=>{const n=Object(r.a)(t);n&&!t.some((e,t)=>e!==n[t])||e(n||[])}},112:function(e,t,n){"use strict";var r=n(0),a=n(9),o=n(8),c=n(45),i=n(127);let l,u;async function s(){return l||(l=n.e(7).then(n.bind(null,188)),u=(await l).default),l}setTimeout(s,5e3);t.a=Object(r.h)(({className:e,id:t,animationData:n,play:l,playSegment:f,speed:d,noLoop:m,size:h,quality:b,isLowPriority:p,onLoad:v})=>{const[g,E]=Object(r.r)(),j=Object(r.q)(null),O=Object(r.q)(!1),y=Object(r.q)(!1),w=Object(r.q)();w.current=l;const N=Object(r.q)();N.current=f,Object(r.n)(()=>{if(g||!n)return;const e=()=>{if(!j.current)return;const e=new u(t,j.current,n,{noLoop:m,size:h,quality:b,isLowPriority:p},v);d&&e.setSpeed(d),E(e)};u?e():s().then(()=>{Object(a.b)(()=>{j.current&&e()})})},[g,n,t,p,m,v,b,h,d]),Object(r.n)(()=>()=>{g&&g.destroy()},[g]);const k=Object(r.m)((e=!1)=>{g&&(w.current||N.current)&&(N.current?g.playSegment(N.current):e?g.goToAndPlay(0):g.play())},[g]),C=Object(r.m)(()=>{g&&g.pause()},[g]),L=Object(r.m)(()=>{y.current=!0,g&&(O.current||(O.current=g.isPlaying()),C())},[g,C]),A=Object(r.m)(()=>{O.current&&k(),O.current=!1,y.current=!1},[k]),M=Object(r.m)(()=>{Object(a.b)(A)},[A]);Object(r.n)(()=>{g&&(l||f?y.current?O.current=!0:k(m):y.current?O.current=!1:C())},[g,l,f,m,k,C]),Object(c.a)(L,A),Object(i.a)(L,M);const P=Object(o.a)("AnimatedSticker",e),T=h?`width: ${h}px; height: ${h}px;`:void 0;return r.a.createElement("div",{ref:j,className:P,style:T})})},118:function(e,t,n){"use strict";var r=n(0),a=n(61);t.a=({containerId:e,className:t,children:n})=>{const o=Object(r.q)(document.createElement("div"));return Object(r.o)(()=>{const n=document.querySelector(e||"#portals");if(!n)return;const r=o.current;return t&&r.classList.add(t),n.appendChild(r),()=>{a.a.render(void 0,r),n.removeChild(r)}},[t,e]),a.a.render(n,o.current)}},121:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(5),a=n(50);const o={MonkeyIdle:n.p+"TwoFactorSetupMonkeyIdle.dea4a492c144df84ddab778dc8a3f0cd.tgs",MonkeyTracking:n.p+"TwoFactorSetupMonkeyTrack
|
||
|
//# sourceMappingURL=5.294e62985cca088ea56f.js.map
|